CN112583712B - Block chain router and block chain network system - Google Patents

Block chain router and block chain network system Download PDF

Info

Publication number
CN112583712B
CN112583712B CN201910942912.3A CN201910942912A CN112583712B CN 112583712 B CN112583712 B CN 112583712B CN 201910942912 A CN201910942912 A CN 201910942912A CN 112583712 B CN112583712 B CN 112583712B
Authority
CN
China
Prior art keywords
node
target
service
routing
layer
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.)
Active
Application number
CN201910942912.3A
Other languages
Chinese (zh)
Other versions
CN112583712A (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910942912.3A priority Critical patent/CN112583712B/en
Publication of CN112583712A publication Critical patent/CN112583712A/en
Application granted granted Critical
Publication of CN112583712B publication Critical patent/CN112583712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects

Abstract

The application provides a blockchain router and a blockchain network, the blockchain network comprising: the system comprises a block chain router, a computing node, a storage node and a control node, wherein the block chain router receives a service routing request through a network layer; determining a target node responding to the service routing request by adopting a preset consensus algorithm based on a built-in security module through a system layer; the target node is at least one of a computing node, a storage node and a control node; the service routing request is routed through the network layer to the target node by a routing layer to cause the target node to respond to the service routing request. The block chain router can perform consensus selection on the basis of the security module to route the target node, so that the consensus efficiency is improved, and through setting the calculation node, the storage node and the control node, the isolation of data calculation, storage and flow control is realized, and the block chain network data processing, data circulation and data storage can be standardized.

Description

Block chain router and block chain network system
Technical Field
The application relates to the technical field of the internet, in particular to a blockchain router and a blockchain network.
Background
With the rapid development of internet technology, providing services through a server cluster network is becoming an important service mode at present. Existing service-providing networks are typically centralized networks, which are prone to single point failure problems. To address this problem, blockchain networks have been developed, which are a new direction of decentralization or partial decentralization.
In a blockchain network, different intelligent contracts are usually deployed at different nodes, wherein the intelligent contracts represent a service processing program, and functions such as installation and calling of the intelligent contracts need to exchange data and store data, so that the consensus of the blockchain network is realized, and the realization of the consensus of the blockchain network is realized through routers in the blockchain network. Existing routers are typically directed to conventional networks for routing designated packets from a source IP address to a destination IP address. Thus existing routers are unable to meet the demands of blockchain networks.
Disclosure of Invention
The application provides a block chain router and a block chain network, which are suitable for the block chain network and can improve the consensus efficiency of the block chain network.
A first aspect of the present application provides a blockchain router, comprising:
A network layer for receiving a service routing request;
the system layer is used for determining a target node responding to the service routing request by adopting a preset consensus algorithm based on the built-in security module; the target node is at least one of a computing node, a storage node and a control node;
and the routing layer is used for routing the service routing request to the target node through the network layer so that the target node responds to the service routing request.
A second aspect of the present application provides a blockchain network comprising a blockchain router as in the first aspect, and the compute, storage and control nodes communicatively connected to the blockchain router.
The block chain router receives a service routing request through a network layer; determining a target node responding to the service routing request by adopting a preset consensus algorithm based on a built-in security module through a system layer; the target node is at least one of a computing node, a storage node and a control node; the service routing request is routed through the network layer to the target node by a routing layer to cause the target node to respond to the service routing request. The block chain router is internally provided with the safety module, a target node can be determined by adopting a preset consensus algorithm based on the safety module, calculation routing, storage routing and control routing are performed, the consensus efficiency is improved, and through setting the calculation node, the storage node and the control node, the isolation of data calculation, storage and flow control is realized, and the block chain network data processing, data flow and data storage can be standardized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a block chain network architecture diagram according to one embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a block chain router according to an embodiment of the present disclosure;
FIG. 3 is a block chain network architecture according to another embodiment of the present application;
FIG. 4 is a schematic diagram of an installation process of a smart contract according to another embodiment of the present application;
FIG. 5 is a schematic diagram of a call flow of an intelligent contract according to an embodiment of the present application;
fig. 6 is a schematic diagram of a control routing packet according to an embodiment of the present application;
fig. 7 is a schematic diagram of a data routing packet according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a memory packet according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a block chain router according to an embodiment of the present application;
FIG. 10 is a flowchart illustrating a method for processing services according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the disclosed concepts in any way, but to illustrate the concepts of the present application to those skilled in the art with reference to the specific embodiments.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms referred to in this application are explained first:
PKI: public Key Infrastructure, the public key infrastructure is provided with a PKI security module in the block link router, so that the block link router has a trusted computing security environment, and the block link router authenticates and authorizes itself and external entities through PKI technology. So that the blockchain router can employ efficient consensus algorithms, such as RAFT consensus algorithms, POS consensus algorithms, and the like.
RAFT consensus algorithm: the distributed consistency algorithm is characterized in that the distributed consistency algorithm is a distributed system strong consistency algorithm, and each node has three states of Follower, candida and Leader. Two of the most important things to implement the Raft consensus algorithm are: the selector and the replication log.
POS consensus algorithm: is a randomly selected consensus algorithm.
Intelligent contract: the system is a program deployed on nodes of a blockchain network, at least comprises a control part, a data processing part and a storage part, wherein the three parts can be arranged on the same node or different nodes, and for an intelligent contract, the selection of the nodes is selected through a blockchain router consensus algorithm, and the consensus algorithm can be designated when the intelligent contract is registered. May be deployed on a physical machine, or on a virtual machine, or in a Docker container.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. In the following description of the embodiments, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Example 1
The present embodiment provides a blockchain network for providing corresponding services to clients.
As shown in fig. 1, a schematic block chain network structure is provided in this embodiment, where the block chain network includes: the system comprises a block chain router, a control node, a calculation node and a storage node.
Wherein m, n and s are positive integers. The block chain router is internally provided with a security module, which can be a PKI security module, and the security module is stored with a PKI key for authenticating whether the routing message comes from a legal block chain router.
A blockchain network may include a plurality of blockchain routers, a plurality of computing nodes, a plurality of storage nodes, and a plurality of control nodes.
The block link router is used for receiving the service routing request, determining a target node by adopting a preset consensus algorithm based on the security module, and routing the service routing request to the target node, wherein the target node is at least one of a calculation node, a storage node and a control node.
Specifically, as shown in fig. 2, the blockchain router includes: the system comprises a network layer, a system layer and a routing layer, wherein the network layer is used for receiving a service routing request; the system layer is used for determining a target node responding to the service routing request by adopting a preset consensus algorithm based on the built-in security module; the target node is at least one of a computing node, a storage node and a control node; the routing layer is configured to route the service routing request to the target node through the network layer, so that the target node responds to the service routing request.
The computing node is used for receiving the data to be processed when being determined as the target node, and carrying out corresponding data processing on the data to be processed.
And the storage node is used for receiving the data request when being determined as the target node and carrying out corresponding data storage or reading processing according to the data request.
And the control node is used for receiving the control message when being determined as the target node and performing corresponding flow control according to the control message.
Specifically, the network layer of the blockchain router may receive a service routing request of the client, or may receive a service routing request of the control node, where the service routing request may be any request that needs the blockchain router to perform routing, for example, the blockchain router may receive a service request of the client, and the routing layer of the blockchain router needs to route the service request to the corresponding control node to respond to the client; for example, the blockchain router may receive a computing node contention request sent by the control node, need to route the contention request to each computing node, the network layer of the blockchain router receives a storage node contention request sent by the control node, need the routing layer to route the contention request to each storage node, and so on.
The computing node can receive the intelligent contract installation package, namely the data to be processed, sent by the control node, and perform intelligent contract installation and deployment processing. A contention request sent by the blockchain router may also be received, the blockchain router may be responded to based on the contention request, and so on.
The storage node can receive the data request sent by the control node, perform corresponding data storage or reading processing, can also receive the data request sent by the computing node, can also receive the competition request sent by the blockchain router, and responds to the blockchain router; etc.
The control node can receive the competition request sent by the block chain router and respond to the block chain router; the method can also receive the deployment requests of the computing nodes and the storage nodes of the intelligent contracts sent by the service registration center, and carry out corresponding flow control; etc.
According to the embodiment, the safety module is built in the block chain router, the target node can be determined by adopting a preset consensus algorithm based on the safety module, calculation routing, storage routing and control routing are performed, the consensus efficiency is improved, and through setting the calculation node, the storage node and the control node, the isolation of data calculation, storage and flow control is realized, and the block chain network data processing, data circulation and data storage can be standardized.
Example two
The present embodiment further supplements the blockchain network provided in the first embodiment.
Fig. 3 is a schematic diagram of a block chain network according to the present embodiment.
As an implementation manner, the blockchain network may optionally further include a service registry on the basis of the first embodiment. Optionally, the routing layers include a control sub-routing layer, a computation sub-routing layer, and a storage sub-routing layer to implement the corresponding routing functions, respectively.
The service registration center is used for receiving the service registration request and registering the service according to the service registration request.
The service registry may be a distributed node of the blockchain network, selected by a consensus at the system layer of the blockchain router. The service registry is used for maintaining a registered service table, and may include a service name and a service URL, and may further include other relevant information, which may be specifically set according to actual requirements. When the blockchain router cannot find the corresponding service table, the blockchain router can synchronously inquire the service registry. The service registration center can also be a node with a safe computing environment, namely, a PKI security module can be built in the service registration center, so that the security of data is ensured.
Optionally, the service registry is specifically configured to receive a service registration request of the target smart contract sent by the client, and broadcast a first competition request of a control node of the target smart contract; the service registration request of the target intelligent contract comprises identification information of the target intelligent contract to be registered;
the network layer of the block chain router receives the first competition request, the control sub-routing layer further determines a routing path, broadcasts through the network layer according to the determined routing path and receives reply information returned by each control node, and the system layer of the block chain router determines a target control node corresponding to the target intelligent contract according to the reply information of each control node and broadcasts through the network layer by the control sub-routing layer; the reply information of the control node comprises address information of the control node;
the service registration center receives target control node information broadcast by the block chain router and performs service registration on the target intelligent contract.
Specifically, the user may initiate a service registration request of the smart contract through the client, and the service registration center receives the service registration request of the target smart contract sent by the client, and broadcasts a contention request of a control node controlling the target smart contract, so as to distinguish the first contention request. The network layer of the blockchain router receives the first competition request, which is equivalent to receiving a service routing request, each control node registers the service which can be provided by the control node in the service registration center in advance, for example, which control nodes can provide the service of the intelligent contract, the control sub-routing layer of the blockchain router can determine which control nodes can compete for controlling the target intelligent contract according to the identification information of the target intelligent contract, after determining the routing path, the first competition request can be broadcast to the control nodes, after receiving the first competition request, each control node can return reply information, the returned reply information comprises the address information of the control node, and the returned reply information can also comprise the representation information about participation in competition. After receiving the reply information returned by each control node, the system layer can determine the target control node for controlling the target intelligent contract from the control nodes by adopting a preset consensus algorithm, and the control sub-routing layer broadcasts the determined target control node related information, such as address information and other related information of the target control node, after receiving the target control node related information, the service registration center performs service registration on the target intelligent contract, such as recording a service name (which can be identification information of the target intelligent contract) and a corresponding service URL, wherein the service URL can be an address of the target control node or a URL of the target intelligent contract provided by the target control node. So long as the blockchain router can find the corresponding control node when routing.
Optionally, the service registry is further configured to send a deployment request to the target control node for deploying the compute node and/or the storage node of the target smart contract;
according to the deployment request, the target control node broadcasts a second competition request of the computing node of the target intelligent contract and a third competition request of the storage node of the target intelligent contract;
the network layer of the block chain router receives the second competition request, the calculation sub-routing layer determines a routing path, the second competition request is routed to each calculation node through the network layer, the reply information returned by each calculation node is received, the system layer determines a target calculation node according to the reply information of each calculation node, and the calculation sub-routing layer broadcasts through the network layer;
the network layer of the block chain router receives the third competition request, the storage sub-routing layer determines a routing path, the third competition request is routed to each storage node through the network layer, the reply information returned by each storage node is received, the system layer determines a target storage node according to the reply information of each storage node, and the storage sub-routing layer broadcasts through the network layer;
the target control node sends a data processing part installation package of the target intelligent contract to the target computing node, and sends a storage part installation package of the target intelligent contract to the target storage node;
The target computing node receives a data processing part installation package of the target intelligent contract and installs and deploys a data processing part of the target intelligent contract;
the target storage node receives the access portion installation package of the target smart contract and installs the access portion deploying the target smart contract.
Specifically, in order to realize isolation of flow control, data calculation and storage, a target computing node and a target storage node corresponding to a target intelligent contract are required to be deployed, a data processing part of the target intelligent contract is installed on the target computing node, and an access part of the target intelligent contract is installed on the target storage node.
The target compute node and the target storage node also need to be identified by the blockchain router through consensus by a certain consensus algorithm. Such as RAFT consensus algorithm, POS consensus algorithm, etc. The specific implementation process is similar to the determination process of the target control node, and will not be described in detail herein.
Optionally, the blockchain router may store and maintain a service table, which may include a service name and a service URL, and may also go to a service registry to search if the blockchain router cannot be found locally during routing. The block chain router and the service registration center can perform identity authentication through a PKI mechanism, and can elect the service registration through a bottom consensus algorithm.
Optionally, the service registration request of the target intelligent contract further includes identification information of a target consensus algorithm;
after receiving the reply information returned by each control node, the block chain router adopts a target consensus algorithm to determine the target control node corresponding to the target intelligent contract by the system layer, and the block chain router supports multiple consensus algorithms.
Specifically, the blockchain router can support multiple consensus algorithms, a user can specify a target consensus algorithm to be adopted by the service through the client, and the system layer of the blockchain router can perform consensus according to the target consensus algorithm specified by the user to determine the target control node.
The consensus for the target computing node, the target storage node, also supports a variety of consensus algorithms.
Optionally, the network layer of the blockchain router may further receive a service request for calling the intelligent contract sent by the client, where the service request for calling the intelligent contract includes identification information of the requested target service;
the control sub-routing layer of the block chain router acquires a corresponding service URL according to the identification information of the target service, and sends the identification information carrying the target service and a call request of the corresponding service URL to a target control node corresponding to the target service;
The target control node sends a data processing request to a target computing node where a data processing part of the intelligent contract to be called is located according to the calling request, so that the target computing node executes the data processing part of the intelligent contract to be called;
and the target control node receives an execution result returned by the target computing node and feeds the execution result back to the client. Alternatively, the target control node may send the execution result to the blockchain router, and the blockchain router network layer feeds back the execution result to the client.
Optionally, the target control node further sends a data request to a target storage node where the access part of the intelligent contract to be called is located according to the call request, so that the target storage node executes the access part of the intelligent contract to be called to perform corresponding data storage or reading processing;
the target control node also receives the execution result returned by the target storage node and feeds the execution result back to the client. Alternatively, the target control node may send the execution result to the blockchain router, and the blockchain router network layer feeds back the execution result to the client.
Optionally, when the target computing node has a data access requirement, the target computing node acquires address information of a target storage node where an access part of the intelligent contract to be called is located from the target control node, and calls the access part of the intelligent contract to be called according to the address information of the target storage node.
Optionally, the control sub-routing layer of the blockchain router may locally find a corresponding service URL according to the identification information of the target service; if the block chain router does not locally exist the service URL corresponding to the identification information of the target service, sending a query request to a service registration center;
the service registration center receives the query request and returns a service URL corresponding to the identification information of the target service to the blockchain router.
As another implementation manner, based on the first embodiment, optionally, the preset consensus algorithm is a RAFT consensus algorithm or a POS consensus algorithm.
Specifically, since the block chain router is internally provided with the security module, efficient consensus algorithms such as RAFT consensus algorithm, POS consensus algorithm and other efficient consensus algorithms can be adopted. On the basis of ensuring data safety, the consensus efficiency is improved.
Illustratively, as shown in fig. 4, a schematic diagram of an installation flow of the smart contract provided in this embodiment is provided.
Illustratively, as shown in fig. 5, a call flow diagram of the smart contract provided in this embodiment is shown.
For each node (including service registry, blockchain router, control node, computing node, storage node) in the blockchain network, the specific implementation is as follows:
1. Control node
The control node can process control command words, intelligent contract names, source service names, URL of services, control command bodies and consensus algorithm in the control routing message. Fig. 6 is a schematic diagram of a control routing packet according to the present embodiment.
Wherein, the route type: designating a control sub-routing layer; version: designating a control layer protocol name and version; length: specifying a subsequent-to-reserved field length; control command words including { install, upgrade, uninstall, capacity expansion, load scheduling, monitor, shrink, start, stop, notify }, etc., the control command words controlling the lifecycle of the smart contract; message check value: the system layer of the block chain router needs to verify the information to judge whether the information is the information transmitted by the trusted router or not; consensus algorithm: the consensus algorithm which is expected to be adopted by the corresponding route is indicated, the consensus algorithm can be an algorithm built in the router, the algorithm with high performance can be selected at the moment, and the machine which is appointed by the source service corresponding URL can participate in consensus, and the corresponding consensus algorithm can be appointed.
In the intelligent contract installation stage, based on the control routing message, the system layer of the block chain router can select relevant data processing and storage nodes according to the storage protocol and the data protocol of the intelligent contract through a consensus algorithm, and finally, the intelligent contract is deployed and installed on a target node.
2. Computing node
And the computing node receives the input data, performs data computation and data processing, and outputs the data. In addition, the control message transmitted by the control node needs to be processed. The method can process the name, the source URL address, the data length, the data volume, the destination service data volume name, the destination service URL address, the destination service 2 name and the destination service 2 URL address of the source service in the data routing message. Fig. 7 is a schematic diagram of a data routing packet according to the present embodiment.
Wherein, the data volume: different data body protocol standards may be followed. The data volume protocol standard may run different data processing programs, the data processing programs may run on different virtual machines, the data processing programs, and the virtual machines running the data processing programs may be specified in the data volume protocol.
In the call stage of the intelligent contract, the calculation sub-routing layer of the blockchain router can indicate the source of data { the name of source service, the source URL address, the data volume }, the destination of the data } { the destination service name and the destination service URL }, and the router completes data routing according to the registered service name and the service URL, wherein the destination of the data can be specified in a plurality.
3. Storage node
The storage node receives the incoming data and stores and reads the data. In addition, it is necessary to process the control message from the control node. The storage node can process the name, the source URL address, the data length, the data volume, the data check value, the destination storage service name, the destination storage service URL address, the destination storage service 2 name and the destination storage service 2 URL address of the source service in the storage message transmitted by the blockchain router. Fig. 8 is a schematic diagram of a storage message provided in this embodiment.
In the invocation phase of the intelligent contract, the storage sub-routing layer of the blockchain router may specify the protocol of the data storage and the purpose of the data: { store protocol name, source service name, store destination URL, store data content, content Hash }, where the destination of the data may be multiple. Further, the storage protocol may be specified in a version field.
According to the blockchain network, the control node, the computing node and the storage node are divided, data computation, flow control and data storage are separated, a data sub-protocol can be defined in a data body message of the computing node, a storage sub-protocol can be defined in a data body message of the storage node, and data and storage of different blockchains are connected, so that the problem of cross-chain access is solved.
4. Block chain router
The block link router has a trusted computing safety environment, can be internally provided with a PKI secret key, authenticates and authorizes the block link router and an external entity through a PKI technology, and mainly realizes a block chain consensus function, a routing function and an identity verification function in the block link router, wherein the block link router can comprise a system layer, a network layer and a routing layer. As shown in fig. 9, a logic structure diagram of a blockchain router according to the present embodiment is shown.
Wherein, the system layer: the bottom layer is a hardware driving layer, and the upper layer comprises a security authentication module, a consensus module and a control management module.
Specifically, the security authentication module: the system has a trusted computing environment, a PKI key is built in, the key is stored in a system security area, and a routing message can be authenticated from a legal router.
And a consensus module: the built-in security consensus algorithm can be realized in a plug-in manner, and the consensus algorithm can be updated through a security authentication module; because of the trusted environment, efficient consensus algorithms, such as Raft, POS, can be used; and in the consensus phase, realizing a consensus algorithm for three routing requests of a routing layer, and selecting consensus nodes.
And the control management module: logic of the block chain router is realized, system bootstrap is realized, a routing request is processed, a security authentication module and a consensus module are called, and a routing forwarding function is completed.
Network layer: messages of the routing layer may be transmitted in the network layer by TCP/IP protocols, HTTP/HTTPs protocols, and other P2P network protocols.
Routing layer: the method comprises a control sub-routing layer, a calculation sub-routing layer and a storage sub-routing layer, and is used for performing storage layer routing, control layer routing and data layer routing respectively.
Storage layer routing: in the intelligent contract installation stage, through the consensus algorithm of the block chain router, relevant data processing and storage nodes are selected according to the storage protocol and the data protocol of the intelligent contract, and finally the intelligent contract deployment is installed on a target node.
Data layer routing: in the calculation phase of the smart contract, from of the data is indicated: { name of source service, source URL address, data body }, to of data: { destination service name, destination service URL }, the router completes the data routing according To the registered service name and service URL, to may designate a plurality.
Version: the name and version of the data layer protocol are specified.
Length: specifying the length of the reserved field.
Message check value: and (3) performing related verifiable fingerprint algorithms such as a Hash algorithm and signing on the version-to-consensus algorithm, and the like, wherein the router needs to verify the information to judge whether the information is transmitted by a trusted router.
Consensus algorithm: the consensus algorithm indicating the hope of adopting the corresponding route can be an algorithm built in the router, and the algorithm with high performance can be selected at the moment, or the consensus algorithm corresponding to the machine participation consensus designated by the source service corresponding URL can be designated.
Storage layer routing: storing data in the intelligent contract, realizing data storage, indicating a protocol of data storage and a destination To: { store protocol name, source service name, store destination URL, store data content, content Hash }, there may be multiple To.
The stored protocol: may be specified in a version field.
Router maintenance: the router maintains { service name, service URL } table, first searches the local cached { service name, service URL table }, if the service registry on the deblocking chain cannot be found to find synchronization, the router and the service registry perform identity authentication through PKI mechanism, and elects the service registry through the underlying consensus algorithm.
5. Service registry
The service registry may be a distributed node of the blockchain network, and is formed by electing a blockchain router, maintaining { service names, service URL } tables, and synchronously querying the service registry when the blockchain router cannot find the corresponding { service names, service URL } tables, which may be trusted computing nodes.
It should be noted that, in this embodiment, each of the possible embodiments may be implemented separately, or may be implemented in any combination without conflict, which is not limited to the implementation of the present application.
According to the embodiment, the safety module is built in the block chain router, the target node can be determined by adopting a preset consensus algorithm based on the safety module, calculation routing, storage routing and control routing are performed, the consensus efficiency is improved, and through setting the calculation node, the storage node and the control node, the isolation of data calculation, storage and flow control is realized, and the block chain network data processing, data circulation and data storage can be standardized. And moreover, the intelligent contract can be automatically installed, so that the convenience of user operation is improved, and the user experience is improved.
Example III
The present embodiment provides a service processing method, which is used for the blockchain network in the foregoing embodiment. The execution subject of the embodiment is a processing apparatus of a service, which may be provided in a computer device. The computer device is the blockchain router described above.
As shown in fig. 10, a flow chart of a method for processing a service according to the present embodiment is shown, where the method includes:
In step 301, a blockchain router receives a service routing request.
Step 302, the blockchain router determines a target node responding to the service routing request by adopting a preset consensus algorithm based on the built-in security module.
The target node is at least one of a computing node, a storage node and a control node.
In step 303, the blockchain router routes the service routing request to the target node to cause the target node to respond to the service routing request.
It should be noted that, in this embodiment, specific operations of each step are consistent with those of the blockchain router in the blockchain network embodiment described above, and are not described herein again.
According to the service processing method provided by the embodiment, the safety module is built in the block chain router, the target node can be determined by adopting a preset consensus algorithm based on the safety module, calculation routing, storage routing and control routing are performed, the consensus efficiency is improved, and through setting the calculation node, the storage node and the control node, the isolation of data calculation, storage and flow control is realized, and the block chain network data processing, data flow and data storage can be standardized.
Example IV
The method provided in the first embodiment is further described in the present embodiment.
As an implementation manner, on the basis of the first embodiment, optionally, the method further includes:
in step 4011, the blockchain router receives a first competing request of a control node serving a target smart contract broadcast by a registry.
In step 4012, the blockchain router broadcasts a first contention request.
In step 4013, the blockchain router receives reply messages returned by each control node, where the reply messages include address information of the control node.
In step 4014, the blockchain router determines, according to the reply information of each control node, a target control node corresponding to the target intelligent contract.
In step 4015, the blockchain router broadcasts the target control node information to enable the service registry to service register the target smart contract.
Optionally, the method may further include:
the block chain router receives a second competition request of a computing node of a target intelligent contract and a third competition request of a storage node of the target intelligent contract, wherein the second competition request is broadcast by a target control node;
the block chain router routes the second competition request to each computing node, receives the reply information returned by each computing node, determines a target computing node according to the reply information of each computing node, and broadcasts the reply information so that the target control node sends a data processing part installation package of the target intelligent contract to the target computing node;
The blockchain router receives the third competition request, routes the third competition request to each storage node, receives the reply information returned by each storage node, determines a target storage node according to the reply information of each storage node, and broadcasts the target storage node so that the target control node sends a storage part installation package of the target intelligent contract to the target storage node.
Optionally, the block chain router determines, according to the reply information of each control node, a target control node corresponding to the target intelligent contract, including:
and the blockchain router adopts a target consensus algorithm appointed by the client to determine a target control node corresponding to the target intelligent contract, and supports various consensus algorithms.
Optionally, the method may further include:
the block chain router receives a service request for calling the intelligent contract sent by the client, wherein the service request for calling the intelligent contract comprises identification information of a target service requested by the client;
the block chain router acquires a corresponding service URL according to the identification information of the target service, and sends a calling request carrying the identification information of the target service and the corresponding service URL to a target control node corresponding to the target service, so that the target control node calls a corresponding intelligent contract according to the calling request;
The blockchain router feeds back the intelligent contract execution result to the client.
It should be noted that, the method may further include all steps executable by the blockchain router in the blockchain network, and specific operations are consistent with the blockchain network embodiments described above, which are not described herein in detail.
It should be noted that, in this embodiment, specific operations of each step are consistent with those of the blockchain router in the blockchain network embodiment described above, and are not described herein again.
It should be noted that, in this embodiment, each of the possible embodiments may be implemented separately, or may be implemented in any combination without conflict, which is not limited to the implementation of the present application.
According to the service processing method provided by the embodiment, the safety module is built in the block chain router, the target node can be determined by adopting a preset consensus algorithm based on the safety module, calculation routing, storage routing and control routing are performed, the consensus efficiency is improved, and through setting the calculation node, the storage node and the control node, the isolation of data calculation, storage and flow control is realized, and the block chain network data processing, data flow and data storage can be standardized.
In some embodiments, a service processing method may be further provided, where the execution body is a computing node in the blockchain network, and specific operation steps are consistent with those in the foregoing embodiments and are not described herein.
In some embodiments, a service processing method may be further provided, where the execution body is a control node in the blockchain network, and specific operation steps are consistent with those in the foregoing embodiments and are not described herein.
In some embodiments, a service processing method may be further provided, where the execution body is a storage node in the blockchain network, and specific operation steps are consistent with those in the foregoing embodiments and are not described herein.
In some embodiments, a service processing method may be further provided, where the execution body is a service registry in the blockchain network, and specific operation steps are consistent with those in the foregoing embodiments, and are not described herein again.
Example five
The present embodiment provides a computer device, configured to perform the method provided in the foregoing embodiment, where the computing device is the block chain router.
Fig. 11 is a schematic structural diagram of a computer device according to the present embodiment. The computer device 50 includes: at least one processor 51 and a memory 52;
the memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the methods provided by the above embodiments.
According to the computer equipment of the embodiment, the safety module is built in the block chain router, the target node can be determined by adopting a preset consensus algorithm based on the safety module, calculation routing, storage routing and control routing are performed, the consensus efficiency is improved, and through setting the calculation node, the storage node and the control node, the isolation of data calculation, storage and flow control is realized, and the block chain network data processing, data circulation and data storage can be standardized.
Example six
The present embodiment provides a computer readable storage medium having a computer program stored therein that when executed implements the blockchain network provided by any of the embodiments above.
According to the computer readable storage medium of the embodiment, the security module is built in the blockchain router, the target node can be determined by adopting a preset consensus algorithm based on the security module, calculation routing, storage routing and control routing are performed, the consensus efficiency is improved, and isolation of data calculation, storage and flow control is realized by arranging the calculation node, the storage node and the control node, so that blockchain network data processing, data circulation and data storage can be standardized.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above. The specific working process of the above-described device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (11)

1. A blockchain router, comprising:
a network layer for receiving a service routing request;
The system layer is used for determining a target node responding to the service routing request by adopting a preset consensus algorithm based on the built-in security module; the target node is at least one of a computing node, a storage node and a control node;
a routing layer for routing the service routing request to the target node through the network layer to cause the target node to respond to the service routing request;
the routing layer comprises a control sub-routing layer, and when the target node is the control node, the network layer is used for receiving a first competition request of the control node of the target intelligent contract broadcasted by the service registration center;
the control sub-routing layer is configured to broadcast the first contention request through the network layer, and receive reply information returned by each control node, where the reply information of the control node includes address information of the control node.
2. The blockchain router of claim 1, wherein the block router is configured to,
the system layer is used for determining a target control node corresponding to the target intelligent contract according to the reply information of each control node;
the control sub-routing layer is further configured to broadcast, through the network layer, the target control node information, so that the service registry performs service registration on the target intelligent contract.
3. The blockchain router of claim 2, wherein the routing layer includes a compute sub-routing layer, the network layer to receive a second competing request of a compute node of the target smart contract broadcast by the target control node when the target node is the compute node;
the computing sub-routing layer is used for routing the second competition request to each computing node through the network layer and receiving reply information returned by each computing node;
the system layer is used for determining a target computing node according to the reply information of each computing node,
the computing sub-routing layer is further configured to broadcast, through the network layer, the target computing node information, so that the target control node sends a data processing part installation package of the target smart contract to the target computing node.
4. The blockchain router of claim 3, wherein the routing layer includes a storage sub-routing layer that, when the target node is the storage node,
the network layer is used for receiving a third competition request of the storage node of the target intelligent contract, which is broadcasted by the target control node;
The storage sub-routing layer is used for routing the third competition request to each storage node through the network layer and receiving reply information returned by each storage node;
the system layer is used for determining a target storage node according to the reply information of each storage node;
the storage sub-routing layer is further configured to broadcast, through the network layer, the target storage node information, so that the target control node sends a storage part installation package of the target smart contract to the target storage node.
5. The blockchain router of claim 2, wherein,
the system layer is used for determining a target control node corresponding to the target intelligent contract by adopting a target consensus algorithm appointed by the client, and the blockchain router supports a plurality of consensus algorithms.
6. The blockchain router of claim 2, comprising:
the network layer is used for receiving a service request for calling the intelligent contract sent by the client, wherein the service request for calling the intelligent contract comprises identification information of a target service of the request;
the control sub-routing layer is used for acquiring a corresponding service URL according to the identification information of the target service, and sending a calling request carrying the identification information of the target service and the corresponding service URL to a target control node corresponding to the target service through the network layer so that the target control node calls a corresponding intelligent contract according to the calling request;
The network layer is further configured to feed back an intelligent contract execution result sent by the target control node to the client.
7. The blockchain router of claim 6, comprising:
the control sub-routing layer is used for searching a corresponding service URL from the local according to the identification information of the target service; if the block chain router does not have the service URL corresponding to the identification information of the target service locally, sending a query request to the service registry, and receiving the service URL corresponding to the identification information of the target service returned by the service registry according to the query request.
8. The blockchain router of claim 1, comprising:
the system layer is used for determining a service registration center through consensus election.
9. The blockchain router of any of claims 1-8, comprising:
the system layer is used for carrying out identity authentication and authentication on any service routing request received by the network layer based on the built-in security module.
10. The blockchain router of any of claims 1-8, wherein the predetermined consensus algorithm is a RAFT consensus algorithm or a POS consensus algorithm.
11. A blockchain network system comprising the blockchain router of any of claims 1-10, and the compute node, storage node, and control node communicatively coupled to the blockchain router.
CN201910942912.3A 2019-09-30 2019-09-30 Block chain router and block chain network system Active CN112583712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910942912.3A CN112583712B (en) 2019-09-30 2019-09-30 Block chain router and block chain network system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910942912.3A CN112583712B (en) 2019-09-30 2019-09-30 Block chain router and block chain network system

Publications (2)

Publication Number Publication Date
CN112583712A CN112583712A (en) 2021-03-30
CN112583712B true CN112583712B (en) 2023-05-30

Family

ID=75117316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910942912.3A Active CN112583712B (en) 2019-09-30 2019-09-30 Block chain router and block chain network system

Country Status (1)

Country Link
CN (1) CN112583712B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347212B (en) * 2021-08-05 2021-11-05 北京微芯区块链与边缘计算研究院 Trusted service scheduling method, device, equipment and storage medium based on block chain
CN114079632B (en) * 2021-10-09 2023-06-30 中国互联网络信息中心 Trusted inter-domain routing method and system based on blockchain
CN114827002B (en) * 2022-03-17 2023-04-07 西安电子科技大学 Multi-domain network security path calculation method, system, device, medium and terminal
CN114510540A (en) * 2022-04-19 2022-05-17 北京微芯感知科技有限公司 Data processing method, calculation storage separation system and block chain network architecture
CN115529352A (en) * 2022-09-20 2022-12-27 蚂蚁区块链科技(上海)有限公司 Routing processing method and device for computing service

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107018125A (en) * 2017-02-17 2017-08-04 阿里巴巴集团控股有限公司 A kind of block catenary system, date storage method and device
CN107360238A (en) * 2017-07-25 2017-11-17 光载无限(北京)科技有限公司 Intelligent contract gateway based on block chain CPOW common recognition algorithms
WO2018073482A1 (en) * 2016-10-18 2018-04-26 Nokia Technologies Oy Accession control for network nodes
CN108494835A (en) * 2018-03-08 2018-09-04 郑州云海信息技术有限公司 The realization method and system of distributed dynamic routing based on Raft algorithms
CN108681963A (en) * 2018-03-29 2018-10-19 深圳市网心科技有限公司 Multi-tiling chain integral traffic control method, system, electronic device and storage medium
CN108876370A (en) * 2018-06-12 2018-11-23 北京航空航天大学 The architectural framework of the shared open data of transregional piece of chain under a kind of isomery multichain framework
CN108959310A (en) * 2017-05-23 2018-12-07 易链科技(深圳)有限公司 Data processing method, device and computer readable storage medium based on block chain
CN109347955A (en) * 2018-10-19 2019-02-15 北京奇艺世纪科技有限公司 A kind of block chain network system and information processing method
CN109361610A (en) * 2018-09-19 2019-02-19 深圳市贝优通新能源技术开发有限公司 A kind of intelligent router based on block chain technology
EP3460941A1 (en) * 2017-09-20 2019-03-27 Hepu Technology Development (Beijing) Co. Ltd. An energy internet router
CN109660601A (en) * 2018-11-26 2019-04-19 北京瑞卓喜投科技发展有限公司 A kind of block chain common recognition method and block chain are known together device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10586210B2 (en) * 2016-11-30 2020-03-10 International Business Machines Corporation Blockchain checkpoints and certified checkpoints

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018073482A1 (en) * 2016-10-18 2018-04-26 Nokia Technologies Oy Accession control for network nodes
CN107018125A (en) * 2017-02-17 2017-08-04 阿里巴巴集团控股有限公司 A kind of block catenary system, date storage method and device
CN108959310A (en) * 2017-05-23 2018-12-07 易链科技(深圳)有限公司 Data processing method, device and computer readable storage medium based on block chain
CN107360238A (en) * 2017-07-25 2017-11-17 光载无限(北京)科技有限公司 Intelligent contract gateway based on block chain CPOW common recognition algorithms
EP3460941A1 (en) * 2017-09-20 2019-03-27 Hepu Technology Development (Beijing) Co. Ltd. An energy internet router
CN108494835A (en) * 2018-03-08 2018-09-04 郑州云海信息技术有限公司 The realization method and system of distributed dynamic routing based on Raft algorithms
CN108681963A (en) * 2018-03-29 2018-10-19 深圳市网心科技有限公司 Multi-tiling chain integral traffic control method, system, electronic device and storage medium
CN108876370A (en) * 2018-06-12 2018-11-23 北京航空航天大学 The architectural framework of the shared open data of transregional piece of chain under a kind of isomery multichain framework
CN109361610A (en) * 2018-09-19 2019-02-19 深圳市贝优通新能源技术开发有限公司 A kind of intelligent router based on block chain technology
CN109347955A (en) * 2018-10-19 2019-02-15 北京奇艺世纪科技有限公司 A kind of block chain network system and information processing method
CN109660601A (en) * 2018-11-26 2019-04-19 北京瑞卓喜投科技发展有限公司 A kind of block chain common recognition method and block chain are known together device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
" 区块链框架下能源互联网多模块协同自治模式初探";曾鸣,等;《中国电机工程学报》;20170715;全文 *
"Blockchain-based electricity trading with Digitalgrid router";Kenji Tanaka,等;《2017 IEEE International Conference on Consumer Electronics - Taiwan (ICCE-TW)》;20170727;全文 *
"基于命名数据网络的区块链信息传输机制";刘江,等;《通信学报》;20180130;全文 *

Also Published As

Publication number Publication date
CN112583712A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN112583712B (en) Block chain router and block chain network system
US11271892B2 (en) Network communication method and system, device, and storage medium
US10637794B2 (en) Resource subscription method, resource subscription apparatus, and resource subscription system
CN101123565B (en) P2P system and resource query method for this system
WO2019029327A1 (en) Discovery method and device for network function service
CN112953821B (en) Message transmission method and device
CN110474792B (en) Network configuration method, equipment and system
KR20070059049A (en) System of mobile game on-line and method for communication between mobile game terminals
CN112055048B (en) P2P network communication method and system for high-throughput distributed account book
EP2612487A1 (en) Method and arrangement in a peer-to-peer network
CN110602108A (en) Data communication method, device, equipment and storage medium based on block chain network
CN112583572B (en) Block chain network, service processing method, device and equipment
WO2018036521A1 (en) Resource adjustment method, apparatus, and system
WO2020258849A1 (en) Method and apparatus for sending authenticable message in cross-chain manner
WO2017000583A1 (en) Terminal access method and corresponding terminal, base station and main core network
CN109618015B (en) Data center-based de-stacking implementation method and device
CN113612732B (en) Resource calling method and device and multiparty secure computing system
CN112866351B (en) Data interaction method, device, server and storage medium
CN115150457A (en) Micro-service management method, vehicle-mounted system and vehicle-mounted equipment
JP2009508211A (en) Independent message processing system and method transparent to endpoints
CN113055195A (en) Multi-domain controller cluster based on SDON and SDON system
CN111340481A (en) Data processing method, device and equipment based on multi-link block chain network
CN111885157B (en) Internet of things inter-network device communication method and system and edge node
CN116633699B (en) Product anti-counterfeiting traceability information trusted processing method and system based on block chain
US20240090069A1 (en) Decentralized session management

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
GR01 Patent grant
GR01 Patent grant