A heterogeneous data cross-chain interaction communication method based on a relay node
By constructing a cross-chain communication architecture based on relay nodes and an IBE mechanism, the problems of data sharing and security among multiple institutional chains in intelligent transportation systems are solved, achieving efficient and secure cross-chain data interaction and supporting the comprehensive integration of intelligent transportation networks.
Patent Information
- Application Number
- CN202310547953.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-15
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-05-15
AI Technical Summary
In intelligent transportation systems, data sharing and information security among multiple organizations face significant challenges. In particular, during data transmission, malicious nodes may spread false information, affecting traffic order and driving safety. Existing technologies lack effective cross-organizational data communication solutions.
A new cross-chain communication architecture consisting of an institutional chain and a relay node chain is constructed by adopting a heterogeneous data cross-chain interaction communication method based on relay nodes. The IBE mechanism is used for identity authentication and encrypted communication, cross-chain data sharing is realized through relay nodes, and cross-chain contracts are deployed for data transmission.
It improves the efficiency of cross-chain data sharing, ensures the security of data during the cross-chain process, realizes reliable data interaction between different institutional chains in the intelligent transportation network, and supports data sharing and collaboration.
Smart Images

Figure CN116566979B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchains, and particularly relates to a heterogeneous data cross-chain interaction communication method based on relay nodes. BACKGROUND
[0002] Safe and efficient data interaction communication among multiple agencies in intelligent transportation is of great significance to the construction of intelligent transportation integration of smart cities, although the use of blockchain technology can improve privacy and data security in intelligent transportation, but data sharing and information security of different agency chains still face great challenges;
[0003] Intelligent transportation system (ITS) generates an image of the city and its transportation by accessing data from different agencies (vehicle terminals, infrastructure, enterprises, government, etc.), thereby relieving urban traffic congestion and improving road safety, however, during data transmission, if the data provider is destroyed by a malicious node, such as a fake agency spreading false information, it will affect the traffic order and driving safety, therefore, studying a safe and reliable data sharing mechanism among different agencies in ITS is of great significance to the construction of an efficient and interconnected transportation network;
[0004] There is basically no data communication scheme among cross-agency chains in the prior art, how to enable different agencies in ITS to have ownership of their own transportation data and dynamically and safely share data among different agencies to form a comprehensive and integrated intelligent transportation network is a direction that needs to be further studied;
[0005] In view of the above, the present application provides a heterogeneous data cross-chain interaction communication method based on relay nodes. SUMMARY
[0006] In view of the above, the present application provides a heterogeneous data cross-chain interaction communication method based on relay nodes.
[0007] A heterogeneous data cross-chain interaction communication method based on relay nodes, characterized in that a new cross-chain communication architecture composed of agency chains and relay node chains is constructed, the relay node chains are formed by relay nodes connected to each other to form a cross-chain network, the relay nodes include master nodes, cross-chain nodes, light nodes, and the master nodes perform identity security authentication and data supervision on other relay nodes joining the cross-chain network;
[0008] Each agency chain corresponds to a relay node, and the relay node performs cross-chain operation after identity authentication by an IBE mechanism, safely accesses the cross-chain network and securely communicates with other relay nodes in the cross-chain network;
[0009] Each said mechanism chain deploys a corresponding cross-chain contract and utilizes the cross-chain contract to perform data transmission with the user contract, receives a user cross-chain request and thus realizes inter-chain data interaction communication.
[0010] The above technical solution has the beneficial effects of:
[0011] The present scheme proposes an innovative heterogeneous cross-chain interaction mechanism based on relay nodes, which proposes a cross-chain model architecture composed of relay nodes, relay node chains and cross-chain agencies, and designs an IBE-based relay node security access and communication scheme. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 The present application is a schematic diagram of the intelligent traffic network cross-chain communication architecture;
[0013] Figure 2 The present application is a schematic diagram of the cross-chain model architecture based on relay nodes;
[0014] Figure 3 The present application is a schematic diagram of the relay node encryption communication process based on IBE;
[0015] Figure 4 The present application is a schematic diagram of the RNCCP structure constructed by the relay node;
[0016] Figure 5 The present application is a schematic diagram of the cross-chain transaction state transition;
[0017] Figure 6 The present application is a schematic diagram of the cross-chain interaction flow;
[0018] Figure 7 The present application is a cross-chain interaction structure flow chart;
[0019] Figure 8 The present application is a cross-chain reading result diagram of traffic data;
[0020] Figure 9a 、 Figure 9b 、 Figure 9c The present application is a schematic diagram of intelligent cross-chain contract performance test;
[0021] Figure 10a 、 Figure 10b The present application is a schematic diagram of the overall cross-chain performance test. DETAILED DESCRIPTION
[0022] The foregoing and other technical contents, features and effects of the present application will be described below in conjunction with the accompanying drawings. Figures 1 to 10bIn the detailed description of the embodiments, it will be clear that the structural content mentioned in the following embodiments is all referred to the drawings.
[0023] In the blockchain-based intelligent transportation scenario, different transportation agencies adopt different types of blockchains according to their functional requirements, such as: the transportation department and the transportation enterprise need to supervise and authenticate data, and the bottom layer adopts a consortium chain network, while the vehicle end, the road end, the cloud end and other transportation infrastructures need to share a large amount of dynamic data, and the bottom layer adopts a chain-on-chain-offline collaborative storage mode, in addition, the user or other small data sources can adopt a private chain network, however, due to the independence of different blockchains, the data communication and interaction between transportation agencies are hindered;
[0024] In view of the above situation, this section provides a heterogeneous cross-chain interaction solution applied in the intelligent transportation scenario, and a new cross-chain communication architecture composed of agency chains and relay node chains is constructed, and the model structure of the architecture is as shown in Figure 1 Each heterogeneous agency chain adopts the heterogeneous cross-chain interaction mechanism based on relay nodes proposed in this solution for data sharing and interaction;
[0025] The relay node accesses the relay node chain securely using the IBE mechanism, and communicates securely with other nodes.
[0026] The agency chain accesses the cross-chain network through its corresponding relay node, and each agency chain performs different functions and responsibilities in the intelligent transportation scenario;
[0027] In the case of non-cross-chain interaction, the user on the agency chain processes the business logic within the blockchain where he / she is located;
[0028] If cross-chain operation needs to be performed, the relay node forwards the cross-chain transaction request and cooperates with other agency chains to process the operation;
[0029] This solution mainly includes the following contents:
[0030] I. Heterogeneous cross-chain interaction mechanism based on relay nodes
[0031] In order to realize the data trusted interconnection and sharing between multiple blockchains in ITS, as well as the demand for high throughput and low delay of this application scenario, this paper proposes a new heterogeneous cross-chain interaction model based on relay nodes to meet the demand for cross-chain interoperability in the intelligent transportation scenario;
[0032] This model adopts a cross-chain architecture with multiple relay nodes, and the relay node and the blockchain adopt a one-to-one mode, that is, each blockchain has a corresponding relay node, and each relay node only connects one chain;
[0033] The interconnection communication between the relay nodes is realized through LibP2P, forming a relay node chain, and the nodes can be connected to each other and forward the request to each other;
[0034] The cross-chain transaction in the communication process is defined according to the set RNCCP cross-chain data transmission protocol, and the data circulation between the blockchains and the safe calling of the contract are realized through the interaction between the relay nodes;
[0035] As shown in the accompanying Figure 2 , the architecture of the cross-chain model in the intelligent transportation scenario is described in detail, which is composed of relay nodes, relay node chains, agency chains and cross-chain contracts. The relay node chain is formed by the blockchains connected by the relay nodes, and after the identity authentication, the nodes in the network can directly interact and communicate through LibP2P;
[0036] The relay node chain defines three types of relay nodes: master node, cross-chain node and light node.
[0037] In ITS, there is only one master node in the cross-chain network, which is assumed by the relay node corresponding to the transportation department chain. This node has all the cross-chain transaction data and data proof information in the cross-chain network, and performs identity security authentication and data supervision on other relay nodes joining the cross-chain network. In addition to the master node, the nodes in the cross-chain network can be cross-chain nodes and light nodes;
[0038] The difference lies in that the two nodes participating in the cross-chain interaction act as cross-chain nodes in this cross-chain process, storing the cross-chain transaction data of both parties, while the other nodes not participating in the cross-chain act as light nodes in this transaction process, i.e. cross-chain nodes and light nodes only store the transaction data related to the cross-chain node;
[0039] In view of the data cross-chain communication demand in ITS, each agency chain needs to deploy the corresponding cross-chain contract. The agency chain accesses the cross-chain network through the relay node, uses the cross-chain contract and the user contract to transfer data, receives the cross-chain request of the user, and thus realizes the inter-chain data interaction communication;
[0040] For example, in the accompanying Figure 2 , taking traffic enterprise A and transportation department B as an example, they can deploy agency chain A and agency chain B respectively, and deploy the corresponding cross-chain contract and user contract on the blockchain, connect chain A and chain B through the relay node chain, and thus realize the data interaction communication between user L of enterprise A and user Z of transportation department B.
[0041] In order to improve the cross-chain transaction verification efficiency and the utilization rate of cross-chain storage space, different storage schemes are designed for different types of relay nodes in this model:
[0042] (1) For all cross-chain transaction information occurring on the relay node chain, the main node in the cross-chain network stores it, while the cross-chain node and the light node only need to store the transaction data related to themselves and save the block header information for subsequent verification;
[0043] (2) Non-cross-chain transactions occurring only on a single blockchain do not need to be processed by the relay node and are only processed, verified and stored by the business node of the blockchain;
[0044] In this way, the cross-chain transaction processing efficiency is improved, and unnecessary storage overhead is reduced.
[0045] II. Relay node security access and communication based on IBE
[0046] 2.1 IBE mechanism
[0047] In the IBE scheme, the trusted third party is the key generation center (PKG). Given the user identity, the PKG verifies the authenticity of the user identity. After verification, the PKG generates a user private key based on the user identity and the system master private key. Other users in the encrypted communication only need to use the public key of the other party for encryption, without the need to obtain the public key through a certificate;
[0048] The IBE mechanism usually consists of four steps: setup, extract, encryption and decryption, which form a four-tuple (G, K, E, D) about the algorithm. The specific steps are described as follows:
[0049] Let ID = {ID1, ID2,..., ID n} be the set of user identities, where ID is the identity number of the user, M is the plaintext message to be encrypted, and C is the encrypted ciphertext;
[0050] (1) Algorithm G is executed in the setup phase, and the input is a security parameter k, and the output is system parameters (params) and a master key s:
[0051] (params, s) <- G(1 k )
[0052] (2) Algorithm K is executed in the extract phase, and the input is the user identity ID, the system parameter params, and the output is the public key PK and the private key SK corresponding to the identity:
[0053] (PK, SK) <- K(params, ID)
[0054] (3) Algorithm E is executed in the encrypt phase, and the input is the encrypted message M <- {0, 1} *, public key PK and system parameters params, output the ciphertext C after encrypting M:
[0055] C←E(M,PK,params)
[0056] (4) Algorithm D is executed in the decrypt phase, the input is the encrypted ciphertext C, private key SK and system parameters params, and the output is the plaintext M corresponding to the ciphertext C:
[0057] M←D(C,SK,params)
[0058] The encryption and decryption processes of IBE mechanism are required to meet the consistency constraint, that is and D(C,SK,params)=M.
[0059] 2.2 Relay node security access and communication scheme
[0060] The relay node of the agency chain in the intelligent transportation system needs to be authenticated before performing cross-chain operations. In the relay node access scheme based on IBE, the unique ID of the relay node is used as the public key, and then the digital certificate issued by the third party is replaced, simplifying the authentication process.
[0061] The scheme first needs to be initialized, and the trusted PKG runs the initialization algorithm to generate system parameters {e, P, P pub , H1, H2} and master key s. Where e:G1×G1→G2 is called a bilinear mapping, G1 and G2 are two q-order cyclic groups, G1 is an additive group, and G2 is a multiplicative group, and satisfy and Both e(aP,bQ)=e(P,Q) ab , then select a hash function for key generation and identity authentication:
[0062] H1:{0,1} * →G1
[0063] H2:G2→{0,1} n
[0064] When the relay node accesses the cross-chain network for the first time, it needs to be authenticated by the transportation department in the cross-chain network, and request a private key from the PKG in the ITS cross-chain network for identity verification and data security transmission during cross-chain. The PKG uses the function to map the relay node identity ID∈{0,1} * into an elliptic curve point PK ID of order q, that is, the public key PK ID =H1(ID), and then generate the private key SK ID of the nodeID , where s is the master key, and the private key is sent securely to the relay node;
[0065] After a relay node is connected to the cross-chain network, its corresponding institutional chain can directly use the relay node's identity ID for identity verification and conduct cross-chain data communication with other institutional chains. In order to ensure the security of cross-chain transactions between relay nodes, cross-chain transactions need to be encrypted.
[0066] The encrypted communication process based on IBE is as follows: First, when relay node A of organization chain A sends communication message M to relay node B of organization chain B, it calculates PK using the identity ID of relay node B. ID =H1(ID), then randomly select Then generate the corresponding ciphertext C=<U,V> Where U = rP, g ID =e(PK) ID ,P pub After receiving the ciphertext C, relay node B uses its private key SK. ID Decrypt the ciphertext: The specific encrypted communication process is as follows: Figure 3 As shown.
[0067] III. Heterogeneous Cross-Chain Communication Protocol
[0068] The Relay Node Cross-Chain Protocol (RNCCP) enables trusted cross-chain contract interoperability and data transfer. This protocol specifies the consistency of data structures and operational objects for cross-chain transactions, defines the lifecycle of cross-chain transactions between different heterogeneous blockchains in ITS scenarios, and provides a consistent calling interface to the upper-layer cross-chain platform.
[0069] It mainly includes the following:
[0070] 3.1 RNCCP Data Structure
[0071] The RNCCP protocol is applied to relay nodes and mainly revolves around the RNCCP data structure. This data structure uniformly defines the necessary fields of the cross-chain transaction objects constructed by relay nodes, specifically as follows: Figure 4 As shown, the key fields are explained below:
[0072] CrossTxNo: is a unique number corresponding to a cross-chain transaction. It is composed of the source chain number, the destination chain number, and the auto-incrementing number corresponding to the source chain and the destination chain. The cross-chain transaction number is generated by the relay node. Therefore, all blockchains participating in cross-chain transactions need to keep a ledger containing all blockchain numbers in the relay node corresponding to their own chain.
[0073] SrcContractInfo and DestContractInfo contain the contract name and contract version information of the corresponding cross-chain contract;
[0074] CrossChainData: This is byte data that is parsed into JSON cross-chain transaction data corresponding to different transaction types, depending on the transaction type.
[0075] Proof: Verification information for the legality of cross-chain transactions. It needs to be constructed collaboratively by multiple relay nodes and includes the hash of the cross-chain transaction, the block number where the transaction is located, the Merkle root hash value, and the signature of the cross-chain node for the transaction. The Proof field is used for transaction atomicity verification, signature verification, block header verification, etc.
[0076] The relay node parses the cross-chain message initiated by the source chain, verifies the transaction and signs it, then constructs the cross-chain message into a cross-chain transaction object that conforms to the RNCCP data structure, and sends it to the relay node of the destination chain for processing.
[0077] 3.2 Cross-chain transaction lifecycle
[0078] The RNCCP protocol defines the lifecycle of cross-chain transactions, with different stages of cross-chain transactions corresponding to different transaction states. Figure 5 The lifecycle of a cross-chain transaction is represented by a transaction state transition diagram. The "StartCrossTx" state indicates the start of the cross-chain transaction, the "Executed" state indicates that the cross-chain transaction has been executed, and the "Completed" state indicates that the cross-chain transaction has been completed.
[0079] The state of a cross-chain transaction is generated and transitions according to different cross-chain steps. During the cross-chain process, the cross-chain smart contract controls the transformation of the cross-chain transaction lifecycle and implements the logic for the transition between different states.
[0080] When initiating a cross-chain transaction, a "current state" field is set in the data structure of the transaction object to indicate the state of the cross-chain transaction. This state can be "StartCrossTx", "Exeuted", or "Completed".
[0081] Each independent cross-chain transaction starts in an empty state NULL to indicate that the transaction does not exist. The transaction is created through the cross-chain contract of chain A, and the transaction is initially given the "StartCrossTx" state.
[0082] Subsequently, cross-chain transactions are executed in cross-chain contracts on the B chain, and the transaction is given the "Exeuted" state.
[0083] Finally, the cross-chain contract passed to the A chain completes the entire cross-chain transaction and is assigned a "Completed" status.
[0084] IV. Cross-chain interaction process
[0085] The cross-chain model proposed in this paper mainly relies on cross-chain contracts and relay nodes of both chains for cross-chain interaction. One or more cross-chain contracts corresponding to the institution chain need to be deployed on the institution chain. The institution chain accesses the cross-chain network through the relay node and transmits data with the user contract through the cross-chain contract to receive the user's cross-chain request;
[0086] The request types in the cross-chain interaction process are mainly divided into three categories: contract invocation, event listening, and relay node interaction.
[0087] Contract invocation is mainly for users, user contracts, and cross-chain contracts, providing users with interfaces for cross-chain interaction.
[0088] Event listening is for cross-chain contracts and relay nodes. Cross-chain nodes listen to cross-chain events of the contract to perform corresponding processing.
[0089] Relay node interaction is for node invocation between blockchains participating in cross-chain.
[0090] Taking one-way cross-chain data interaction from user A of transportation enterprise chain A to user B of transportation department chain B as an example, the specific cross-chain process is shown in Figure 6 The specific steps are as follows:
[0091] Step 1: The user of chain A deploys a user contract and invokes the user contract to send cross-chain request data.
[0092] Step 2: After receiving the cross-chain request and request data from the user, the user contract invokes the cross-chain contract of chain A, sends a cross-chain transaction request (CCTXrequest), and sets the cross-chain transaction state Current-State = NULL.
[0093] Step 3: After receiving the CCTXrequest, the cross-chain contract of chain A creates a unique cross-chain transaction number CrossTxNo = <SrcChainNo: DestChainNo: Number> according to the source chain number, destination chain number, and self-increment code, generates a cross-chain transaction object, and then sets the cross-chain transaction state Current-State = StartCrossTx. Finally, it sends a "startCrossTxEvent" event with the cross-chain transaction object, indicating the start of cross-chain transaction.
[0094] Step 4: The relay node corresponding to chain A asynchronously listens to events on the blockchain.
[0095] Step 5: After listening to the "startCrossTxEvent" event and cross-chain transaction, the relay node of chain A encapsulates the cross-chain transaction according to the defined RNCCP cross-chain protocol, and transmits the encapsulated cross-chain transaction data to the relay node of chain B using LibP2P;
[0096] Step 6: After receiving the cross-chain message sent by the node of chain A, the relay node of chain B verifies the Proof field of the cross-chain transaction. After verification, it converts the cross-chain transaction into a transaction object acceptable to chain B according to the RNCCP protocol. Then, it calls the cross-chain contract to parse the cross-chain transaction object; according to the parsed cross-chain object, it calls the cross-chain contract to perform the corresponding cross-chain operation;
[0097] Step 7: The cross-chain contract of chain B performs cross-chain operation and on-chain, and after execution, sends "ExecutedEvent" event and sets Current-State = Executed, indicating that the cross-chain operation has been executed;
[0098] Step 8: The relay node of chain B asynchronously listens to the "ExecutedEvent" event sent by the cross-chain contract;
[0099] Step 9: The relay node of chain B encapsulates and processes the listened event and the result of cross-chain transaction, and sends the cross-chain transaction response CCTXresponse to the cross-chain node of chain A;
[0100] Step 10: After receiving the CCTXresponse sent by the relay node of chain B, the relay node of chain A parses and verifies the transaction according to the RNCCP protocol, and calls the cross-chain contract to send the cross-chain transaction result;
[0101] Step 11: After receiving the cross-chain transaction result, the cross-chain contract of chain A on-chain, and calls the user contract to send the result;
[0102] Step 12: After receiving the result, the user contract of chain A returns the cross-chain result to user A.
[0103] At this point, the cross-chain transaction process is completed, and after that, user B on the blockchain can query the cross-chain result by deploying user contract B on chain B.
[0104] Five, based on the above scheme, the algorithm implementation includes intelligent cross-chain contract, relay node and related implementation algorithm of relay node identity authentication;
[0105] The above mainly introduces the overall architecture of cross-chain in the intelligent transportation scenario and the detailed implementation scheme. This section mainly introduces the algorithm implementation based on the above scheme, including the intelligent cross-chain contract, the relay node end, and the related implementation algorithm of relay node identity authentication;
[0106] 5.1 Intelligent cross-chain interaction contract
[0107] The execution logic of the intelligent cross-chain contract, which is a code that can be automatically executed according to events in the blockchain, is very important. The cross-chain interaction intelligent contract designed in this paper serves as a bridge connecting users, blockchains, and relay node chains (as shown in the accompanying Figure 7 The main function of the cross-chain contract is to realize the cross-chain interoperation logic processing between heterogeneous chains. The cross-chain contract inherits the Sto contract and contains two contract reference objects (Add, StrCon) and cross-chain interaction algorithms.
[0108] 1. Parent contract. The Sto contract defines related cross-chain contract events, contract objects, and necessary parameters in the cross-chain process. The names and corresponding descriptions of the cross-chain contract events and parameters are shown in Table 1. The data structure of the contract object has been shown in the accompanying Figure 4 .
[0109] Table 1 Cross-chain transaction fields
[0110]
[0111] 2. Contract object. Add and StrOpe are contract reference objects. The Add contract sets the relay node set and the blockchain number, and other related information. The StrOpe contract contains algorithms for processing string type data, which is used for cross-chain contract data processing.
[0112] 3. Cross-chain interaction algorithm. The detailed description of these key algorithms is as follows:
[0113] initialize(). As shown in Algorithm 1 in Table 2, the initialization function is used for the initialization of the cross-chain contract, which can only be initialized once. The input of the function is the contract version Version. In this function, the owner of the contract is set to msg.sender, the version of the contract is set, the contract reference object is set, and finally the contract initialization flag is set to true.
[0114] Table 2 Contract initialization algorithm
[0115]
[0116] createCrossChainTxNo(). As shown in Algorithm 2 in Table 3, the algorithm encodes and splices the source chain number, the destination chain number, and the self-incrementing number to generate a unique cross-chain transaction number. The algorithm inputs are the numbers of the source chain and the destination chain, and the output is the generated cross-chain transaction number;
[0117] Table 3: Cross-chain transaction creation algorithm
[0118]
[0119]
[0120] startCrossChainTx(). As shown in Algorithm 3 in Table 4, the algorithm is called by a user contract on the blockchain to initiate a cross-chain transaction and issue a startCrossChainTxEvent on the chain to provide a relay node for listening. The execution and confirmation of the cross-chain transaction are similar to the algorithm process, except that the cross-chain transaction execution algorithm needs to perform operations related to the ledger;
[0121] Table 4: Cross-chain transaction initiation algorithm
[0122]
[0123] 5.2 Relay node
[0124] As an important bridge connecting different regional blockchains in ITS, the cross-chain network composed of relay nodes must have the following functions: (1) secure transmission of data between nodes; (2) trusted node identity authentication; (3) message broadcasting and subscription. To achieve secure interaction and communication between nodes in the cross-chain network, this study uses LibP2P to build a point-to-point communication network between nodes.
[0125] The relay node module includes communication between nodes and communication between nodes and blockchains. The communication between nodes uses the LibP2P framework, and the communication between nodes and blockchains uses the event listening mechanism and blockchain SDK to achieve. The following gives the main algorithm for inter-node communication;
[0126] nodesCommunication(). As shown in Algorithm 4 in Table 5, this algorithm creates p2p nodes for two relay nodes A and B, assuming that node A is the server responsible for listening, and node B is the client responsible for connecting the server and establishing a communication channel with the server. Node A opens a listening port, and node B connects through the "multiaddr" encoded address of node A. After that, the two nodes can communicate through multiple concurrent streams in an encrypted channel. The input of this algorithm is the listening port of node A and the address of node A, as well as the Host object in the p2p network. In the algorithm, it is determined whether it is a server or a client according to whether the node address dest is empty. If it is empty, it is a server, and then a port is opened for listening. When a client node connects, the read-write stream is started according to the protocol specified by pid. If dest is not empty, it means that the node is a client. After parsing the multiaddress of the server from dest, the multiaddress of the node is added to peerstore. After that, the communication stream between the two nodes is opened, and the non-blocking read-write byte stream and read-write process start communication.
[0127] Communication algorithm for relay nodes in Table 5
[0128]
[0129]
[0130] 5.3 Identity authentication of relay nodes based on IBE
[0131] When a relay node applies to join the network, it needs to communicate with the master node first. After the master node's authentication, it can join the cross-chain network. After the master node's authentication, the multiaddress of the relay node obtained in 4.2 is added to peerstore, and then the address of the node is broadcast to other nodes in the network. All nodes in the cross-chain network save a copy of the multiaddress of all nodes in the account book, so as to facilitate subsequent communication between cross-chain nodes.
[0132] relayNodeAuthentication(). As shown in Algorithm 5 in Table 6, this algorithm is used for identity authentication of relay nodes when joining the network. This algorithm is based on IBE mechanism, and generates its public and private key pair when the node starts, which is used for encryption and decryption of the node's identity. The identity is authenticated by the master node corresponding to the traffic department chain in intelligent transportation. If the identity matches, the authentication is passed, and the subsequent cross-chain data interaction can be performed.
[0133] Identity authentication algorithm for nodes in Table 6
[0134]
[0135]
[0136] VI. Experiment and Results Analysis (Experiment Evaluation)
[0137] In this section, we first introduce the experimental environment used in this paper. Then, we simulate the cross-chain mechanism proposed in this paper on Hyperledger Fabric and FISCO BCOS blockchain, and analyze the performance of the mechanism through experimental testing.
[0138] 6.1 Experiment Implementation (Setup)
[0139] To test the feasibility and performance of the proposed relay node-based cross-chain mechanism, HyperLedger Fabric and FISCO BCOS were used to construct a network environment for a heterogeneous cross-chain interaction architecture based on relay nodes. The experimental environment was as follows: CPU, Intel Xeon E5; Memory, 64GB; L3 cache, 35MB; Operating system, Ubuntu 18.04.
[0140] We wrote and deployed smart contracts for cross-chain communication, and used Java and Go languages to write execution algorithms for the corresponding relay nodes for the two institutional chains respectively. Then, we simulated a scenario of cross-chain interaction between two heterogeneous institutional chains in ITS. (See attached...) Figure 8 Finally, based on the results of the two traffic data read across chains, we used Hyperledger Caliper and Jmeter tools, with the NGSIM dataset, to write a script to evaluate the performance of the cross-chain contract and the overall cross-chain process.
[0141] The NGSIM dataset contains traffic flow data for highways and urban roads in six U.S. cities, including information such as vehicle trajectories and speeds. This dataset has become one of the most widely used datasets in the field of transportation research. It can be used to help researchers analyze and simulate traffic flow, evaluate the effectiveness of traffic control strategies and algorithms, and develop and test intelligent transportation systems.
[0142] 6.2 Performance Evaluation
[0143] 6.2.1 Cross-chain contract performance. To study the efficiency of each algorithm in the cross-chain contract, we control the Send Rate in the interval [100, 650] and [1600, 2150], and construct tests at intervals of 50 TPS growth rate to test the impact of different numbers of transaction requests on cross-chain performance. The performance of different cross-chain functions, including "cross-chain read", "cross-chain write", "create cross-chain object", and "initiate cross-chain event", is obtained, including: throughput, average transaction latency, and CPU usage percentage, as shown in Figure 9a , Figure 9b , Figure 9c , where the number of transactions contained in each block in the blockchain is set to the optimal value under this hardware condition, and txNumber = 10000 for each test group. As can be seen from Figure 9a , Figure 9b , (i) in the early stage, increasing the Send Rate can significantly improve the throughput of cross-chain transactions, and when the Send Rate reaches a certain value, the transaction throughput and average transaction latency tend to be stable; (ii) the throughput of the "cross-chain read" operation in the stable period is about 2020 TPS, and the delay time has little effect, and the throughput of the "cross-chain write" operation is about 435.4 TPS, meeting the demand of the ITS system for cross-chain read operations.
[0144] 6.2.2 Overall cross-chain performance. We use Jmeter to test the performance of the complete cross-chain process of the cross-chain mechanism proposed in this paper. This test sets Ramp-up = 1s, Ramp-up = 5s, and Ramp-up = 10s to test the impact of different numbers of concurrent transactions on the average execution time of transactions under the condition of a fixed 10000 transactions, as shown in Figure 10a . It can be concluded that for different numbers of concurrent transactions, the average execution time is slightly lower than the other two cases when Ramp-up = 10s. Therefore, we set Ramp-up = 10s and test the total number of cross-chain transactions as 10000 and the number of concurrent transactions as 50, 100, 200, 400, and 500. To more clearly observe the cross-chain execution performance in different stages, we average every 100 transaction execution times of the 10000 test data, and finally obtain 100 average values, as shown in Figure 10b . Analysis shows that for the cross-chain mechanism proposed in this paper, when the number of concurrent transactions is stable at 200 and the Ramp-up time is 10s, the overall performance of the mechanism is best, with an overall average execution time of 2328ms, and the average execution time of the cross-chain mechanism fluctuates little in the stable period, with good stability, and can be applied to the ITS network environment.
[0145] 6.2.3 Cross-chain performance comparison. Compared with existing cross-chain solutions, as shown in Table 7, the cross-chain solution based on relay nodes proposed in this paper is stable in both security and performance, suitable for complex ITS cross-chain network scenarios, and can well solve the cross-chain interoperability between heterogeneous blockchains.
[0146] Table 7 Comparison of cross-chain solutions
[0147]
[0148] In summary, the cross-chain mechanism proposed in this paper proposes a new solution for data interaction in the intelligent transportation scenario. The mechanism can also meet the demand of cross-chain interaction of heterogeneous chains in the intelligent transportation scenario in terms of thread parallelism and transaction efficiency, etc. To some extent, it solves the data intercommunication of multiple transportation blockchains, thereby improving the interoperability between transportation infrastructure, enterprises and related departments.
[0149] The above is only to illustrate the present application, it should be understood that the present application is not limited to the above examples, various modifications in accordance with the idea of the present application are within the scope of the present application.
Claims
1. A method for heterogeneous data cross-chain interaction communication based on a relay node, characterized in that, The cross-chain communication architecture is constructed by a chain of institutions and a chain of relay nodes, the chain of relay nodes is formed by the relay nodes connected with each other to form a cross-chain network, and the relay nodes include master nodes, cross-chain nodes, light nodes, and the master nodes perform identity security authentication and data supervision on other relay nodes in the cross-chain network; Each chain of institutions corresponds to a relay node, and the relay node realizes cross-chain operation after identity authentication by an IBE mechanism, safely accesses the cross-chain network, and securely communicates with other relay nodes in the cross-chain network, wherein all cross-chain transaction information occurring on the chain of relay nodes is stored by the master nodes in the cross-chain network, and the cross-chain nodes and the light nodes only store transaction data related to themselves and save block header information for subsequent verification; for non-cross-chain transactions occurring only on a single blockchain, no relay node is required, and only the business nodes of the blockchain are required to process, verify, and store the transactions; Each chain of institutions deploys a corresponding cross-chain contract and uses the cross-chain contract to transmit data with a user contract, receives a user cross-chain request, and realizes inter-chain data interaction and communication. 2.The heterogeneous data cross-chain interaction communication method based on a relay node according to claim 1, wherein, The relay nodes access the cross-chain network based on the IBE mechanism, use the unique ID of the relay node as a public key, and include the following steps: S1: When the chain of institutions accesses the cross-chain network for the first time through the corresponding relay node, the identity of the chain of institutions is authenticated by the master nodes in the cross-chain network, and the private key is requested from the PKG in the cross-chain network for identity authentication and secure data transmission during cross-chain, wherein the PKG is a trusted third party and a key generation center; S2: After the chain of institutions accesses the cross-chain network through the corresponding relay node, the identity of the chain of institutions is directly authenticated using the identity ID of the relay node, and cross-chain data communication is performed with other chains of institutions. 3.The heterogeneous data cross-chain interaction communication method based on a relay node according to claim 1, wherein, In cross-chain communication interaction, a cross-chain communication protocol based on relay nodes is used for cross-chain contract interoperation and data transmission, the cross-chain communication protocol based on relay nodes is applied to the relay nodes, and the data structure around the cross-chain communication protocol based on relay nodes is expanded, the data structure uniformly defines the necessary fields of the cross-chain transaction object constructed by the relay nodes, and the data structure includes: CrossTxNo: a unique number corresponding to a cross-chain transaction, which is spliced from a source chain number, a destination chain number, and a self-incrementing number corresponding to the source chain and the destination chain, and the cross-chain transaction number is generated by the relay node; SrcContractInfo and DestContractInfo: contain contract name and contract version information of the corresponding cross-chain contract; CrossChainData: is byte data, which is parsed into JSON cross-chain transaction data corresponding to different transaction types according to different transaction types; Proof: cross-chain transaction legality verification information, which needs to be constructed by multiple relay nodes; The relay node parses the cross-chain message initiated by the source chain of institutions, verifies and signs the transaction, then constructs the cross-chain message into a cross-chain transaction object conforming to the data structure of the cross-chain communication protocol based on relay nodes, and sends it to the relay node of the destination chain of institutions for processing.
4. The heterogeneous data cross-chain interaction communication method based on a relay node according to claim 1, characterized in that, The requests in the cross-chain interaction process are divided into three types: contract calling, event listening and relay node interaction; The contract calling is between users, user contracts and cross-chain contracts, and provides an interface for cross-chain interaction for users; The event listening is between cross-chain contracts and relay nodes, and cross-chain nodes listen to cross-chain events of the contracts to perform corresponding processing; The relay node interaction is between nodes of participating blockchains in cross-chain.
5. The heterogeneous data cross-chain interaction communication method based on a relay node according to claim 1, characterized in that, The main nodes in the cross-chain network store all cross-chain transaction information occurring on the relay node chain, and cross-chain nodes and light nodes only store transaction data related to themselves.
6. The heterogeneous data cross-chain interaction communication method based on a relay node according to claim 1, characterized in that, Non-cross-chain transactions generated within a single blockchain do not need to be processed by the relay node, but are processed, verified and stored by the blockchain.
Citation Information
Patent Citations
Cross-chain system and method based on trusted execution environment
CN113923044A
Block chain cross-chain data processing method, relay chain, application chain and cross-chain network
CN114615095A