[go: up one dir, main page]

CN113329081A - Block chain service access method, device and computer readable storage medium - Google Patents

Block chain service access method, device and computer readable storage medium Download PDF

Info

Publication number
CN113329081A
CN113329081A CN202110592689.1A CN202110592689A CN113329081A CN 113329081 A CN113329081 A CN 113329081A CN 202110592689 A CN202110592689 A CN 202110592689A CN 113329081 A CN113329081 A CN 113329081A
Authority
CN
China
Prior art keywords
block chain
blockchain
node
network
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110592689.1A
Other languages
Chinese (zh)
Inventor
赵建
崔洲伟
相韶华
林霖
梁立新
张翌维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Technology University
Original Assignee
Shenzhen Technology University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Technology University filed Critical Shenzhen Technology University
Priority to CN202110592689.1A priority Critical patent/CN113329081A/en
Publication of CN113329081A publication Critical patent/CN113329081A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种区块链服务接入方法、装置及计算机可读存储介质,物联网终端通过预设网络协议向目标区块链代理节点发送区块链消息;目标区块链代理节点调用区块链SDK客户端,将通过消息代理服务端接收的区块链消息转发至区块链网络;区块链网络执行对应于区块链消息的服务响应。通过本发明的实施,直接在物联网终端构造区块链消息,通过网络请求发送到区块链代理节点并由区块链代理节点中转至区块链网络,实现了物联网终端与区块链网络的轻量级连接,能更广泛的支持硬件条件有限的物联网瘦终端接入区块链服务,扩展了区块链服务接入的应用场景。

Figure 202110592689

The invention discloses a blockchain service access method, device and computer-readable storage medium. An IoT terminal sends a blockchain message to a target blockchain proxy node through a preset network protocol; the target blockchain proxy node calls the The blockchain SDK client forwards the blockchain message received through the message broker server to the blockchain network; the blockchain network executes the service response corresponding to the blockchain message. Through the implementation of the present invention, the blockchain message is directly constructed in the IoT terminal, sent to the blockchain proxy node through a network request, and then transferred to the blockchain network by the blockchain proxy node, thereby realizing the IoT terminal and the blockchain. The lightweight connection of the network can more widely support IoT thin terminals with limited hardware conditions to access blockchain services, and expand the application scenarios of blockchain service access.

Figure 202110592689

Description

Block chain service access method, device and computer readable storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a block chain service access method, apparatus, and computer readable storage medium.
Background
The blockchain is a unique distributed database and has natural advantages of distributed security, non-tampering, uniqueness, non-reversibility and the like. The characteristics of blockchain technology make more and more fields focus on the application of blockchains. In the field of internet of things, the block chain technology can be applied to ensuring the accuracy of data sources and the safe transmission and storage of data.
However, in the related art, as for the block link access mode of the internet of things device, the internet of things terminal is usually directly accessed to the block link network, and this mode usually requires that the internet of things terminal has a relatively strong hardware condition, cannot support a very common single chip microcomputer in the internet of things terminal, and has a relatively large limitation.
Disclosure of Invention
The embodiments of the present invention mainly aim to provide a method and an apparatus for accessing a block chain service, and a computer-readable storage medium, which can at least solve the problem that a block chain access manner provided in the related art requires a terminal of an internet of things to have a relatively strong hardware condition, resulting in a relatively large application limitation.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides a method for accessing a block chain service, where the method includes:
the terminal of the Internet of things sends a block chain message to a target block chain agent node through a preset network protocol;
the target block chain agent node calls a block chain SDK client and forwards the block chain message received by the message agent server to a block chain network;
the blockchain network performs a service response corresponding to the blockchain message.
To achieve the above object, a second aspect of the embodiments of the present invention provides a block chain service access apparatus, including:
the sending module is used for sending the block chain message to the target block chain agent node through a preset network protocol by the terminal of the Internet of things;
the forwarding module is used for the target block chain proxy node to call a block chain SDK client and forward the block chain message received by the message proxy server to a block chain network;
a response module for the blockchain network to perform a service response corresponding to the blockchain message.
To achieve the above object, a third aspect of embodiments of the present invention provides an electronic apparatus, including: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of any one of the above methods for accessing a blockchain service.
To achieve the above object, a fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of any one of the above block chain service access methods.
According to the block chain service access method, device and computer readable storage medium provided by the embodiment of the invention, the terminal of the internet of things sends a block chain message to the target block chain agent node through a preset network protocol; the target block chain agent node calls a block chain SDK client and forwards the block chain message received by the message agent server to a block chain network; the blockchain network performs a service response corresponding to the blockchain message. By implementing the method, the device and the system, the blockchain message is directly constructed at the Internet of things terminal, the blockchain message is sent to the blockchain agent node through the network request and is transferred to the blockchain network from the blockchain agent node, so that the lightweight connection between the Internet of things terminal and the blockchain network is realized, the Internet of things thin terminal access blockchain service with limited hardware conditions can be more widely supported, and the application scene of blockchain service access is expanded.
Other features and corresponding effects of the present invention are set forth in the following portions of the specification, and it should be understood that at least some of the effects are apparent from the description of the present invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a system architecture diagram of a block chain service access system according to a first embodiment of the present invention;
fig. 2 is a basic flowchart of a block chain service access method according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for allocating a blockchain proxy node according to a first embodiment of the present invention;
fig. 4 is a schematic flowchart of a block chain SDK client creating method according to a first embodiment of the present invention;
fig. 5 is a schematic specific flowchart of a method for interacting a terminal of the internet of things and a block chain network of a super book according to a first embodiment of the present invention;
fig. 6 is a block chain service access device according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to a third embodiment of the invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The intelligent agent creates an unprecedented digital currency form, namely the bitcoin, is unique in solving the problem of data consistency among a plurality of dynamic nodes under the condition of no central coordination, and shows the great value of the block chain technology. The block chain is used as a unique distributed database and has natural advantages of distributed safety, non-tampering, uniqueness, non-reversibility and the like. The characteristics of blockchain technology make more and more fields focus on the application of blockchains. In the field of internet of things, the block chain technology can be applied to ensuring the accuracy of data sources and the safe transmission and storage of data. Specific examples include, but are not limited to, the following application scenarios: the environmental data such as temperature, humidity, PM2.5 concentration and the like acquired by the environmental sensor in public places are transmitted and stored through the block chain, so that the data acquired by the meteorological bureau are safer and more reliable. Water meters, electric meters, gas meters and the like in the home are connected into a block chain network, and automatic payment of life resource consumption can be realized. The door lock of the house is accessed into the block chain network, the transfer of the door lock control right and the sharing of the house can be realized through the intelligent contract of the block chain, the delivery of rent is realized through the block chain network, and wider sharing economy is realized. Aiming at the application scenes, how to safely and efficiently realize the access of the Internet of things equipment with limited hardware resources to the blockchain network is a key problem.
Most of the internet of things edge devices are thin terminals with limited resources, and currently, the popular internet of things devices and data access modes are internet of things management platforms based on a cloud server and connected to centralized management, such as an aricloud internet of things platform and a Baidu cloud internet of things platform. In such a centralized management architecture model, the internet of things application lacks functions of auditing and auditable and also lacks a mechanism for independently verifying data integrity, privacy conditions, or reliability. This approach leads to problems of insecurity of data, easy tampering, data opacity, etc.
In order to solve the above problems, with the development of a block chain technology and the advantages of distributed security, inflexibility, traceability and the like, researchers provide that the internet of things equipment and data are directly accessed to a block chain network. At present, the mode of accessing the Internet of things equipment to a block chain is mainly a light node mode, and in the light node mode, the light node mode is realized by deploying light nodes at the Internet of things terminal. In the mode, the Internet of things equipment can be directly accessed to the block chain network service, and the method has good safety, but has the defect that the Internet of things equipment is required to have at least hardware conditions such as raspberry pi (Raspberry Pi), can not support a very common singlechip in the Internet of things terminal, and has great limitation.
The first embodiment:
in order to solve the problem that the application limitation is large due to the fact that a block chain access mode provided in the related art requires that an internet of things terminal has a strong hardware condition, the present embodiment provides a block chain service access method applied to a block chain service access system, as shown in fig. 1, the block chain service access system is a system architecture diagram of the block chain service access system provided in the present embodiment, and includes three major parts: the system comprises an internet of things terminal, a block chain proxy node service and a block chain network, wherein the internet of things terminal is provided with a Message construction client, the client can be preferably realized by adopting an MQTT (Message queue Telemetry Transport protocol) client, the block chain proxy node service comprises a plurality of SDK (Software Development Kit) proxy nodes, each SDK proxy node is provided with a Message proxy server and an SDK rear end, correspondingly, the Message proxy server can be preferably realized by adopting the MQTT server, and the block chain network is provided with a plurality of different block chain nodes.
As shown in fig. 2, which is a basic flowchart of the block chain service access method provided in this embodiment, the block chain service access method provided in this embodiment includes the following steps:
step 201, the terminal of the internet of things sends a block chain message to the target block chain agent node through a preset network protocol.
Specifically, the network protocol of this embodiment may be preferably implemented by using an MQTT protocol, which is a lightweight communication protocol based on a Publish/Subscribe (Publish/Subscribe) mode, and the protocol is constructed on a TCP/IP protocol. MQTT has the advantage of providing real-time reliable messaging services to remote devices with minimal code and limited bandwidth. As an instant messaging protocol with low cost and low bandwidth occupation, the MQTT is more suitable for the Internet of things thin terminal with limited hardware conditions.
In this embodiment, the hash algorithm and the digital signature verification algorithm of the corresponding blockchain system are implemented at the terminal node of the internet of things, a blockchain message can be directly constructed at a message construction client deployed at the terminal of the internet of things, and then the blockchain message is sent to the blockchain agent node through a network request.
Step 202, the target block chain proxy node calls the block chain SDK client, and forwards the block chain message received through the message proxy server to the block chain network.
Specifically, the blockchain network provides SDKs in various languages, including Go, Java, JavaScript, and the like, and the client needs to interact with the blockchain network service through the SDKs. The SDK operation needs certain hardware resource support, and general Internet of things equipment is difficult to meet requirements. In the system architecture design, the problem of the connection block chain service of the Internet of things thin terminal with limited hardware resources is solved by introducing a block chain SDK proxy node.
In this embodiment, the message proxy server may be an MQTT server, the block chain SDK proxy node deploys the MQTT server and a block chain SDK back end, the MQTT server may receive a block chain message sent by the internet of things terminal, and the block chain SDK back end sends the message to the block chain network, so that the block chain SDK proxy node serves as a bridge between the internet of things terminal and the block chain network.
Step 203, the blockchain network performs a service response corresponding to the blockchain message.
Specifically, the internet of things terminal interacts with the blockchain network through the SDK proxy node to obtain blockchain services, and similarly, response data of the blockchain network is forwarded to the internet of things terminal through the blockchain proxy node.
As shown in fig. 3, which is a schematic flow chart of a method for allocating a blockchain proxy node provided in this embodiment, in an optional implementation manner of this embodiment, before the step of sending a blockchain message to the blockchain proxy node by using a preset network protocol, the internet of things terminal specifically includes the following flows:
301, the terminal of the internet of things sends a node allocation request to a blockchain network through an initial blockchain agent node;
step 302, the blockchain network inquires and registers an intelligent contract based on the node allocation request, and determines a target blockchain agent node;
and step 303, the blockchain network returns the node information of the target blockchain agent node to the internet of things terminal through the initial blockchain agent node.
Specifically, the registration intelligence contract of the present embodiment includes a plurality of legally registered blockchain proxy nodes. In practical applications, a device with limited terminal resources may connect to the blockchain SDK proxy service node to obtain information on the blockchain. The connection mode enables the IOT equipment to trust the proxy nodes to a certain extent, and if the proxy nodes are attacked by security, the proxy nodes can provide false blockchain information for the IOT equipment.
Therefore, the embodiment provides a dynamic selection mechanism for the block chain SDK proxy service node, which allows the internet of things device to obtain the block chain SDK proxy service node list instead of relying on a single trusted node. In a blockchain network, a system will deploy a registration contract for blockchain SDK proxy nodes, and any node that provides blockchain SDK proxy services will need to register through the registration of the intelligent contract (chain code). The whole communication will include the following stages: firstly, a service provider of any operation block chain SDK proxy node needs to register in a block chain SDK proxy node registration contract; secondly, the terminal node of the Internet of things interacts with the registration contract of the SDK proxy node of the block chain through the SDK proxy node of the initial block chain for the first time, and the contract selects one service node from the node list to return; and finally, the terminal of the Internet of things interacts with the block chain network through the newly acquired SDK proxy node to acquire the block chain service.
In this embodiment, a specific procedure for dynamically and securely selecting the proxy node is introduced as follows: a. the terminal of the Internet of things requests dynamic allocation of the agent nodes through the initial agent nodes and is used for interacting with the block chain network in subsequent services; b. the initial agent node requests to register an intelligent contract (chain code); c. registering contract dynamic allocation block chain SDK proxy nodes and returning the SDK proxy nodes to the initial proxy nodes; d. the initial proxy node transfers the distributed proxy node information to the Internet of things terminal; e. the terminal of the Internet of things requests block chain service through the newly distributed agent nodes; f. and connecting the newly distributed agent nodes with the block chain network to provide block chain transfer service for the terminal of the Internet of things.
With the increase of terminals of the internet of things which want to access the blockchain network, the blockchain SDK proxy node is used as an important transfer node, and the security and the performance of the blockchain SDK proxy node directly influence the security and the performance of the blockchain network accessed by the internet of things. The embodiment dynamically and safely selects the block chain agent node, avoids single-point faults and potential safety hazards of the fixed node, and can effectively improve the overall safety and performance of the system.
In addition, the present embodiment further describes an implementation algorithm of the above-mentioned registered intelligent contract, where the inputs of the algorithm are: without input, the output is: dynamically selecting a proxy node connection information; a. declaring a proxy node list chain code structure body, wherein the structure body attribute comprises a node name and a node connection address, the node name is used as the key value of the map, and the node connection address is used as the value of the map; b. compiling a node registration Register () method for registering qualified proxy nodes; writing a getRandomNode () method, and randomly returning to an agent node; c. the method comprises the following steps of realizing an Init () function and an Invoke () function of a chain code, wherein the Init () function is an interface which must be realized by the chain code, the processing logic when the chain code is initialized or upgraded is realized by the Init () function, and the logic which is processed when the chain code is called or inquired in operation is realized by the Invoke () function, namely, the Register () function and the getRandomNode () function are called; d. main () main function is implemented, and the shim.start () method is called in the main function.
Further, in an optional implementation manner of this embodiment, the method for acquiring a blockchain proxy node further includes: periodically counting performance parameters of a plurality of legally registered block chain agent nodes by a block chain network; and the blockchain network correspondingly records the security levels aiming at a plurality of legally registered blockchain agent nodes in the registered intelligent contract according to the performance parameters.
Correspondingly, the step of querying and registering the intelligent contract based on the node allocation request and determining the target blockchain proxy node in the blockchain network specifically includes: the block chain network inquires and registers an intelligent contract based on the node distribution request; and the blockchain network determines the blockchain agent node with the highest security level in the registered intelligent contract as the target blockchain agent node.
Specifically, in this embodiment, the dynamic allocation manner of the target blockchain agent nodes may be random allocation or regular allocation, and in order to ensure the security and performance of the allocated agent nodes to the maximum extent, the intelligent registration contract of this embodiment may track the historical performance of each agent node, and then give a certain security incentive to each agent node according to the performance, where the performance is positively correlated with the security level, and then allocate the agent node with the highest security level in the registration contract to the internet of things terminal according to the node allocation request.
Further, in another optional implementation manner of this embodiment, the step of determining the target blockchain proxy node by querying the registration intelligent contract based on the node allocation request in the blockchain network specifically includes: the method comprises the steps that a block chain network obtains a terminal attribute or a target request service attribute of an Internet of things terminal; the blockchain network inquires a registration intelligent contract based on the node allocation request, and determines a blockchain proxy node corresponding to the terminal attribute or the target request service attribute as a target blockchain proxy node. In other implementations, the blockchain proxy nodes may also be adaptively allocated according to the difference between the terminals of the internet of things requesting access to the blockchain service or the difference between services requested by the terminals of the internet of things, so as to meet the adaptability between the terminals or services and the nodes, and further ensure the performance of the blockchain service.
As shown in fig. 4, which is a flowchart illustrating a method for creating a blockchain SDK client provided in this embodiment, in an optional implementation manner of this embodiment, before the step of invoking the blockchain SDK client by the target blockchain proxy node and forwarding a blockchain message received by the message proxy server to a blockchain network, the method specifically includes the following steps:
step 401, a target block chain agent node creates a Fabric-SDK object and configures a config.yaml file;
step 402, the target blockchain agent node creates a blockchain channel and adds channel information;
step 403, the target blockchain agent node initializes the SDK, instantiates a blockchain channel, and implements various APIs to obtain the created blockchain SDK client.
Specifically, in this embodiment, the proxy node interacts with the blockchain network through the Fabric-SDK application interface, and the configuration content of the config.yaml file includes: client, passageway, node, sequencing node, the passageway information includes: channel name, channel configuration, sequencing organization name and resource management terminal instance.
In addition, the embodiment also takes a super account book block chain network as an example, provides a specific block chain service access implementation, and details of a communication method and a process of interaction between an internet of things terminal and the super account book network through a block chain SDK proxy service node will be described. Fig. 5 is a specific flowchart of the method for interacting the internet of things terminal and the super ledger block-chain network provided in this embodiment, and the detailed steps are as follows:
1. the terminal of the Internet of things constructs a transaction proposal and carries out signature, and the transaction proposal is sent to a block chain SDK proxy service node through an MQTT protocol;
2. after receiving the proxy service node, the MQTT service transaction end of the block chain SDK proxy service node transfers the data to the block chain node P1 through the block chain SDK client;
3. the block link node P1 executes a response to acquire the proposal of the transaction by the link code S1;
4. the response generated in the chain code S1 is read into the book reading set as a simulation proposal;
5. returning the transaction proposal endorsed by the P1 node to the block chain SDK proxy service node;
6. the block chain SDK proxy service node transmits the endorsement transaction proposal to the Internet of things client through the MQTT protocol;
7. the Internet of things client signs the complete transaction and sends the signature to the agent node;
8. the agent node sends the signed and endorsed transaction to the sorting node O1;
9. after packaged transaction through a sequencing node in O1, an Order node in O1 broadcasts the transaction to P1, the P1 verifies the transaction before submitting the transaction to ledger L1, and then a P1 node confirms the transaction and writes the transaction into the ledger;
10. and the new transaction is successfully updated into the blockchain account book, the latest state of the account book is written into the database for storage, and the latest state becomes the world state.
It should be noted that some relevant components are disposed on the block link points of the present embodiment, wherein the components of O1 are described as follows: ordering the nodes of the packed transaction, the components of P1 are described as: the Peer node in the organization, the component of S1, is described as: chain code on the P1 node, the element of L1 is described as: ledger on P1 node.
According to the block chain service access method provided by the embodiment of the invention, an Internet of things terminal sends a block chain message to a target block chain agent node through a preset network protocol; the target block chain agent node calls a block chain SDK client and forwards the block chain message received by the message agent server to a block chain network; the blockchain network performs a service response corresponding to the blockchain message. By implementing the method, the device and the system, the blockchain message is directly constructed at the Internet of things terminal, the blockchain message is sent to the blockchain agent node through the network request and is transferred to the blockchain network from the blockchain agent node, so that the lightweight connection between the Internet of things terminal and the blockchain network is realized, the Internet of things thin terminal access blockchain service with limited hardware conditions can be more widely supported, and the application scene of blockchain service access is expanded.
Second embodiment:
in order to solve the problem that the application limitation is large due to the fact that the block link access method provided in the related art requires that the terminal of the internet of things has a strong hardware condition, this embodiment shows a block link service access device, and referring to fig. 6 specifically, the block link service access device of this embodiment includes:
a sending module 601, configured to send a blockchain message to a target blockchain proxy node through a preset network protocol by an internet of things terminal;
a forwarding module 602, configured to invoke the blockchain SDK client by the target blockchain proxy node, and forward the blockchain message received by the message proxy server to the blockchain network;
a response module 603 for the blockchain network to perform a service response corresponding to the blockchain message.
In some embodiments of this embodiment, the block chain service access device further includes: and (5) a query module. Specifically, the sending module is further configured to: the terminal of the Internet of things sends a node allocation request to a block chain network through an initial block chain agent node; the query module is configured to: the block chain network inquires and registers an intelligent contract based on the node allocation request, and determines a target block chain agent node; wherein the registration intelligent contract comprises a plurality of legally registered blockchain agent nodes; the response module is further configured to: and the block chain network returns the node information of the target block chain agent node to the terminal of the Internet of things through the initial block chain agent node.
Further, in some embodiments of this embodiment, the block chain service access device further includes: a statistic module and a recording module. Specifically, the statistical module is configured to: periodically counting performance parameters of a plurality of legally registered block chain agent nodes by a block chain network; the recording module is configured to: the block chain network correspondingly records the security levels aiming at a plurality of legally registered block chain agent nodes in a registered intelligent contract according to the performance parameters; the query module is specifically configured to: the block chain network inquires and registers an intelligent contract based on the node distribution request; and the blockchain network determines the blockchain agent node with the highest security level in the registered intelligent contract as the target blockchain agent node.
In some embodiments of this embodiment, the block chain service access device further includes: a creation module to: the target block chain agent node creates a Fabric-SDK object and configures a config.yaml file; the target block chain agent node creates a block chain channel and adds channel information; the target block chain agent node initializes the SDK, instantiates a block chain channel and realizes various APIs to obtain a block chain SDK client end after the creation; the configuration content of the config.yaml file comprises: client, channel, node and sequencing node; the channel information includes: channel name, channel configuration, sequencing organization name and resource management terminal instance.
It should be noted that, the block chain service access method in the foregoing embodiment can be implemented based on the block chain service access device provided in this embodiment, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the block chain service access device described in this embodiment may refer to the corresponding process in the foregoing method embodiment, and details are not described here again.
By adopting the block chain service access device provided by the embodiment, the terminal of the internet of things sends a block chain message to the target block chain agent node through a preset network protocol; the target block chain agent node calls a block chain SDK client and forwards the block chain message received by the message agent server to a block chain network; the blockchain network performs a service response corresponding to the blockchain message. By implementing the method, the device and the system, the blockchain message is directly constructed at the Internet of things terminal, the blockchain message is sent to the blockchain agent node through the network request and is transferred to the blockchain network from the blockchain agent node, so that the lightweight connection between the Internet of things terminal and the blockchain network is realized, the Internet of things thin terminal access blockchain service with limited hardware conditions can be more widely supported, and the application scene of blockchain service access is expanded.
The third embodiment:
the present embodiment provides an electronic apparatus, as shown in fig. 7, which includes a processor 701, a memory 702, and a communication bus 703, wherein: the communication bus 703 is used for realizing connection communication between the processor 701 and the memory 702; the processor 701 is configured to execute one or more computer programs stored in the memory 702 to implement at least one step of the block chain service access method in the first embodiment.
The present embodiments also provide a computer-readable storage medium including volatile or non-volatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program modules or other data. Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact disk Read-Only Memory), Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The computer-readable storage medium in this embodiment may be used for storing one or more computer programs, and the stored one or more computer programs may be executed by a processor to implement at least one step of the method in the first embodiment.
The present embodiment also provides a computer program, which can be distributed on a computer readable medium and executed by a computing device to implement at least one step of the method in the first embodiment; and in some cases at least one of the steps shown or described may be performed in an order different than that described in the embodiments above.
The present embodiments also provide a computer program product comprising a computer readable means on which a computer program as shown above is stored. The computer readable means in this embodiment may include a computer readable storage medium as shown above.
It will be apparent to those skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software (which may be implemented in computer program code executable by a computing device), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
In addition, communication media typically embodies computer readable instructions, data structures, computer program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to one of ordinary skill in the art. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of embodiments of the present invention, and the present invention is not to be considered limited to such descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A method for accessing a block chain service, comprising:
the terminal of the Internet of things sends a block chain message to a target block chain agent node through a preset network protocol;
the target block chain agent node calls a block chain SDK client and forwards the block chain message received by the message agent server to a block chain network;
the blockchain network performs a service response corresponding to the blockchain message.
2. The method for accessing blockchain services according to claim 1, wherein before the step of sending the blockchain message to the blockchain proxy node by the terminal of the internet of things through the predetermined network protocol, the method further comprises:
the terminal of the Internet of things sends a node allocation request to the blockchain network through an initial blockchain agent node;
the blockchain network inquires and registers an intelligent contract based on the node distribution request, and determines the target blockchain agent node; wherein the registration intelligent contract comprises a plurality of legally registered blockchain proxy nodes;
and the block chain network returns the node information of the target block chain agent node to the Internet of things terminal through the initial block chain agent node.
3. A block chain service access method as claimed in claim 2, further comprising:
the block chain network periodically counts performance parameters of the plurality of legally registered block chain agent nodes;
the block chain network correspondingly records security levels aiming at the plurality of legally registered block chain agent nodes in the registered intelligent contract according to the performance parameters;
the step of the blockchain network inquiring a registration intelligent contract based on the node allocation request and determining the target blockchain agent node comprises the following steps:
the blockchain network inquires and registers an intelligent contract based on the node distribution request;
and the blockchain network determines the blockchain agent node with the highest security level in the registered intelligent contract as the target blockchain agent node.
4. A blockchain service access method according to any one of claims 1 to 3, wherein the target blockchain proxy node invokes a blockchain SDK client, and further comprises, before the step of forwarding the blockchain message received through the message proxy server to the blockchain network:
the target block chain agent node creates a Fabric-SDK object and configures a config.yaml file; yaml file, wherein the configuration content of the config comprises: client, channel, node and sequencing node;
the target block chain agent node creates a block chain channel and adds channel information; wherein the channel information includes: the method comprises the following steps of channel name, channel configuration, sequencing organization name and resource management terminal example;
and the target block chain agent node initializes the SDK, instantiates the block chain channel and realizes various APIs to obtain the block chain SDK client end after the block chain SDK client end is established.
5. A block chain service access apparatus, comprising:
the sending module is used for sending the block chain message to the target block chain agent node through a preset network protocol by the terminal of the Internet of things;
the forwarding module is used for the target block chain proxy node to call a block chain SDK client and forward the block chain message received by the message proxy server to a block chain network;
a response module for the blockchain network to perform a service response corresponding to the blockchain message.
6. A block chain service access arrangement as claimed in claim 5, further comprising: a query module;
the sending module is further configured to: the terminal of the Internet of things sends a node allocation request to the blockchain network through an initial blockchain agent node;
the query module is configured to: the blockchain network inquires and registers an intelligent contract based on the node distribution request, and determines the target blockchain agent node; wherein the registration intelligent contract comprises a plurality of legally registered blockchain proxy nodes;
the response module is further configured to: and the block chain network returns the node information of the target block chain agent node to the Internet of things terminal through the initial block chain agent node.
7. A block chain service access arrangement as claimed in claim 6, further comprising: a counting module and a recording module;
the statistic module is configured to: the block chain network periodically counts performance parameters of the plurality of legally registered block chain agent nodes;
the recording module is configured to: the block chain network correspondingly records security levels aiming at the plurality of legally registered block chain agent nodes in the registered intelligent contract according to the performance parameters;
the query module is specifically configured to: the blockchain network inquires and registers an intelligent contract based on the node distribution request; and the blockchain network determines the blockchain agent node with the highest security level in the registered intelligent contract as the target blockchain agent node.
8. A block chain service access arrangement according to any one of claims 5 to 7, further comprising: a creation module;
the creation module is configured to: the target block chain agent node creates a Fabric-SDK object and configures a config.yaml file; the target block chain agent node creates a block chain channel and adds channel information; the target block chain agent node initializes the SDK, instantiates the block chain channel and realizes various APIs to obtain the block chain SDK client end after the block chain SDK client end is established; yaml file, wherein the configuration content of the config comprises: client, channel, node and sequencing node; the channel information includes: channel name, channel configuration, sequencing organization name and resource management terminal instance.
9. An electronic device, comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the block chain service access method according to any one of claims 1 to 4.
10. A computer readable storage medium, storing one or more programs, which are executable by one or more processors, for performing the steps of the block chain service access method according to any one of claims 1 to 4.
CN202110592689.1A 2021-05-28 2021-05-28 Block chain service access method, device and computer readable storage medium Pending CN113329081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110592689.1A CN113329081A (en) 2021-05-28 2021-05-28 Block chain service access method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110592689.1A CN113329081A (en) 2021-05-28 2021-05-28 Block chain service access method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113329081A true CN113329081A (en) 2021-08-31

Family

ID=77422289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110592689.1A Pending CN113329081A (en) 2021-05-28 2021-05-28 Block chain service access method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113329081A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114860743A (en) * 2022-04-29 2022-08-05 国网安徽省电力有限公司电力科学研究院 Internet of things terminal high-speed uplink proxy service method, system and storage medium
CN114911795A (en) * 2022-04-24 2022-08-16 谢轩豪 Medical data processing method and application
CN115022053A (en) * 2022-06-08 2022-09-06 京东科技控股股份有限公司 Method, apparatus and system for accessing a blockchain network
CN115190162A (en) * 2022-06-27 2022-10-14 杭州溪塔科技有限公司 Proxy service configuration method and proxy service system in block chain
CN115314374A (en) * 2022-07-06 2022-11-08 京东科技信息技术有限公司 Block chain node deployment method, device, storage medium and program product
WO2023040450A1 (en) * 2021-09-15 2023-03-23 支付宝(杭州)信息技术有限公司 Blockchain service network establishment
CN120151352A (en) * 2025-05-15 2025-06-13 中债金科信息技术有限公司 Node proxy service system of block chain network, construction method, device and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404798A (en) * 2010-09-09 2012-04-04 中国移动通信集团河南有限公司 Location information acquisition and service control method, device and system
CN104660707A (en) * 2015-03-09 2015-05-27 浙江万朋网络技术有限公司 Geographical location based proxy server equilibrium distributing method
CN107528856A (en) * 2017-09-27 2017-12-29 福建实达电脑设备有限公司 Internet of Things mist end equipment based on block chain platform access authentication method beyond the clouds
CN108737179A (en) * 2018-05-21 2018-11-02 北京顺丰同城科技有限公司 Facility information processing method, device, terminal device and storage medium
CN110266817A (en) * 2019-07-15 2019-09-20 武汉天喻信息产业股份有限公司 Blockchain-based cross-channel data sharing model, sharing method and device
CN110300102A (en) * 2019-06-17 2019-10-01 中电科大数据研究院有限公司 A kind of Internet of Things safety access system and method based on block chain
CN111277635A (en) * 2020-01-14 2020-06-12 深圳市网心科技有限公司 A method, device, device and computer medium for external node access to blockchain
CN112787890A (en) * 2021-01-19 2021-05-11 北京笔新互联网科技有限公司 Block chain monitoring system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404798A (en) * 2010-09-09 2012-04-04 中国移动通信集团河南有限公司 Location information acquisition and service control method, device and system
CN104660707A (en) * 2015-03-09 2015-05-27 浙江万朋网络技术有限公司 Geographical location based proxy server equilibrium distributing method
CN107528856A (en) * 2017-09-27 2017-12-29 福建实达电脑设备有限公司 Internet of Things mist end equipment based on block chain platform access authentication method beyond the clouds
CN108737179A (en) * 2018-05-21 2018-11-02 北京顺丰同城科技有限公司 Facility information processing method, device, terminal device and storage medium
CN110300102A (en) * 2019-06-17 2019-10-01 中电科大数据研究院有限公司 A kind of Internet of Things safety access system and method based on block chain
CN110266817A (en) * 2019-07-15 2019-09-20 武汉天喻信息产业股份有限公司 Blockchain-based cross-channel data sharing model, sharing method and device
CN111277635A (en) * 2020-01-14 2020-06-12 深圳市网心科技有限公司 A method, device, device and computer medium for external node access to blockchain
CN112787890A (en) * 2021-01-19 2021-05-11 北京笔新互联网科技有限公司 Block chain monitoring system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023040450A1 (en) * 2021-09-15 2023-03-23 支付宝(杭州)信息技术有限公司 Blockchain service network establishment
CN114911795A (en) * 2022-04-24 2022-08-16 谢轩豪 Medical data processing method and application
CN114860743A (en) * 2022-04-29 2022-08-05 国网安徽省电力有限公司电力科学研究院 Internet of things terminal high-speed uplink proxy service method, system and storage medium
CN115022053A (en) * 2022-06-08 2022-09-06 京东科技控股股份有限公司 Method, apparatus and system for accessing a blockchain network
CN115190162A (en) * 2022-06-27 2022-10-14 杭州溪塔科技有限公司 Proxy service configuration method and proxy service system in block chain
CN115190162B (en) * 2022-06-27 2023-11-28 杭州溪塔科技有限公司 Proxy service configuration method and proxy service system in block chain
CN115314374A (en) * 2022-07-06 2022-11-08 京东科技信息技术有限公司 Block chain node deployment method, device, storage medium and program product
CN115314374B (en) * 2022-07-06 2024-02-06 京东科技信息技术有限公司 Block chain node deployment method, device, storage medium and program product
CN120151352A (en) * 2025-05-15 2025-06-13 中债金科信息技术有限公司 Node proxy service system of block chain network, construction method, device and medium

Similar Documents

Publication Publication Date Title
CN113329081A (en) Block chain service access method, device and computer readable storage medium
Pustišek et al. Approaches to front-end IoT application development for the ethereum blockchain
WO2020253347A1 (en) Container cluster management method, device and system
WO2021109735A1 (en) Cross-chain-network-based resource processing method, and device
US10244059B2 (en) Systems and methods for the demand-driven deployment of location-neutral software
CN112235420B (en) Data synchronization method, system and related equipment based on block chain
CN108833251B (en) Method and apparatus for controlling network interconnection
CN113259479B (en) Data processing method and equipment
JP2024505692A (en) Data processing methods, devices and computer equipment based on blockchain networks
CN114172966A (en) Service calling method and device and service processing method and device under unitized architecture
EP4521329A1 (en) Management method for blockchain network, and related device
CN113535335B (en) Virtual resource allocation method and device based on block chain and electronic equipment
WO2021013185A1 (en) Virtual machine migration processing and strategy generation method, apparatus and device, and storage medium
CN110955724A (en) Blockchain-based data processing method, device, node device and storage medium
CN114285859A (en) Data processing method, device, equipment and storage medium for interlayer zone block chain service
CN110660466A (en) Personal health data chaining method and system of Internet of things by combining block chains
CN116566656A (en) Resource access method, device, equipment and computer storage medium
CN114428723A (en) Test system, system test method, related device and storage medium
CN115017169A (en) Management method and system of multi-cloud management platform
US20070016669A1 (en) Web service grid architecture
Bagchi Using blockchain technology and smart contracts for access management in IoT devices
CN113034137A (en) Data processing method and device based on block chain and related equipment
US11575574B2 (en) Heterogeneous cross-cloud service interoperability
CN115842866B (en) Data processing method, device, computer readable medium and electronic device
WO2020199982A1 (en) Information verification method and apparatus, and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210831