A cross-chain transaction implementation method and device based on blockchain technology
By designing a cross-chain transaction method for relay chains and committee group nodes, the performance bottlenecks and security risks of cross-chain transactions in blockchain technology are solved, efficient and secure cross-chain intercommunication and resource access are achieved, and the speed and efficiency of cross-chain transactions are improved.
Patent Information
- Application Number
- CN202310525437.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-05-10
AI Technical Summary
Existing blockchain technology faces performance bottlenecks, scalability challenges, and security risks in cross-chain transactions, making it difficult to achieve efficient and secure cross-chain interoperability and resource access.
By building a blockchain-based cross-chain transaction method, designing relay chains and committee group nodes, we can achieve access control, consensus decision-making and resource access for cross-chain transactions, optimize cross-chain fees, and improve the speed and efficiency of cross-chain transactions.
It effectively improves the access control and consensus efficiency of the cross-chain architecture, optimizes resource access between cross-chain applications, and improves the speed and efficiency of cross-chain transactions.
Smart Images

Figure CN116599959B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a method and device for implementing cross-chain transactions based on blockchain technology. Background Art
[0002] Blockchain technology, as a peer-to-peer distributed ledger based on cryptographic algorithms, has unique characteristics such as multi-party participation, openness and transparency, traceability, and non-tamperability. It has successfully technically solved the security issues brought about by the centralized trust model.
[0003] However, over time, numerous heterogeneous blockchain platforms have emerged, and the applications they support are becoming increasingly diverse. Furthermore, achieving interoperability between different blockchains requires a series of cross-chain transactions and verification processes, which leads to performance bottlenecks and scalability challenges. Cross-chain transactions can require additional time and resources, limiting the overall system's throughput and processing power. Furthermore, information transmission and verification between multiple blockchain systems requires the establishment of mutual trust. However, differences in security and trustworthiness between different blockchain systems can lead to security risks and trust issues in cross-chain interactions. Integrating these heterogeneous underlying technology platforms, breaking through the boundaries of upper-layer applications, and building a more open cross-chain interaction environment have become pressing needs in the current development of blockchain technology.
[0004] Based on this, how to build efficient, scalable, secure and controllable cross-chain interoperability technology, effectively allocate resource access between cross-chain applications, and improve the speed and efficiency of cross-chain transactions has become an urgent problem to be solved. Summary of the Invention
[0005] The purpose of this invention is to provide a cross-chain transaction implementation method and device based on blockchain technology to address the shortcomings of the existing technology. It effectively allocates resource access between cross-chain applications and improves the speed and efficiency of cross-chain transactions by building an efficient, scalable, secure and controllable cross-chain intercommunication technology.
[0006] An embodiment of the present application provides a method for implementing cross-chain transactions based on blockchain technology, the method comprising:
[0007] Receiving an access request from a blockchain to be accessed, wherein the blockchain to be accessed includes a cross-chain transaction, the access request being generated by the member chain and sent to the relay chain;
[0008] Based on the access request of the blockchain, a destination gateway node is constructed, wherein the destination gateway node is generated by the committee group node and determined after being empowered by a preset control policy;
[0009] According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, the relay chain that receives the cross-chain transaction is used as the destination chain, and is forwarded and / or verified by the proxy node of the source chain and the gateway node of the destination chain to realize the cross-chain transaction.
[0010] Optionally, receiving an access request to a blockchain to be accessed includes:
[0011] Determine the blockchain to be connected;
[0012] According to the blockchain to be accessed, the member chain sends an access request to the relay chain of the cross-chain architecture; wherein, the relay chain generates a globally unique identifier for the blockchain to be accessed, and creates a new unauthorized gateway node and assigns it to the blockchain to be accessed, and the access request includes the registration attribute information of the blockchain to be accessed.
[0013] Optionally, before constructing the destination gateway node based on the access request of the blockchain, the method further includes:
[0014] Configuring parameters, starting the gateway node on the relay chain, and receiving authorization information sent by the committee group node, wherein the parameters include network connection parameters, identity authentication parameters, or cross-chain transaction parameters;
[0015] Based on the communication connection between the proxy node and the gateway node, the proxy node and the gateway node are monitored, managed, and data is synchronized, and the access request is processed; wherein, the monitoring of the node includes monitoring the node operation status, the performance and throughput of processing cross-chain transaction requests.
[0016] Optionally, the committee group node includes multiple committee group member nodes, and the committee group node is used to generate cross-chain transaction consensus decisions, participate in access control decisions of the relay chain, and predict cross-chain transaction congestion.
[0017] Optionally, generating a cross-chain transaction consensus decision includes:
[0018] Sending endorsement request information to each of the committee member nodes, wherein the endorsement information includes the first private key signature of the committee member node;
[0019] receiving and verifying the request endorsement information;
[0020] Verifying and confirming the request endorsement information, generating verification information to be sent to the committee member node, wherein the verification information includes the second private key signature of the committee member node;
[0021] Receive the request endorsement information and the verification information sent by each member node of the committee group to generate the cross-chain transaction consensus result, wherein the consensus result includes a third private key signature.
[0022] Optionally, after generating the cross-chain transaction consensus decision, the method further includes:
[0023] The cross-chain transaction consensus result is broadcasted within the relay chain, and the broadcast information is synchronized to the memory pool of the committee group. After the committee group completes several cross-chain transactions, the transactions are packaged. The committee group is composed of multiple committee group nodes.
[0024] Another embodiment of the present application provides a method for determining committee members, the method comprising:
[0025] The committee group node sends the committee group formation information to each proxy node in the member chain through the authorized gateway node. The proxy node u that receives the information responds to the committee group information, sends the information of the proxy node u to the committee group node and signs it. The committee group node records the proxy node vector L according to the response time order. u =[p1,p2,…,p u ];
[0026] According to the vector L u Accumulate the historical trust value R of the elements in the set in turn and record it in the set G i ={p1,p2,…,p i}, when the accumulated value reaches the expected parameter X, the set G i The proxy node members in are the committee members; the expected parameter X is pre-set by the highest authority administrator of the relay chain, and the historical trust value R satisfies: a is the number of times the current proxy node has joined the committee group and participated in consensus decision-making in normal behavior in the past, and b is the number of times the current proxy node has joined the committee group and participated in consensus decision-making in abnormal behavior in the past.
[0027] Another embodiment of the present application provides a cross-chain transaction implementation device based on blockchain technology, which is applied to a cross-chain architecture. The device includes:
[0028] A receiving module, configured to receive an access request from a blockchain to be accessed, wherein the blockchain to be accessed includes a cross-chain transaction, and the access request is generated by the member chain and sent to the relay chain;
[0029] A construction module, configured to construct a destination gateway node based on the access request of the blockchain, wherein the destination gateway node is generated by the committee group node and determined after being empowered by a preset control policy;
[0030] An implementation module is used to, according to the destination gateway node, use the member chain that generates the cross-chain transaction as the source chain, the relay chain that receives the cross-chain transaction as the destination chain, and forward and / or verify it through the proxy node of the source chain and the gateway node of the destination chain to implement the cross-chain transaction.
[0031] Optionally, the receiving module includes:
[0032] A determination unit, used to determine the blockchain to be connected;
[0033] A sending unit is configured to send an access request from a member chain to a relay chain of a cross-chain architecture according to the blockchain to be accessed; wherein the relay chain generates a globally unique identifier for the blockchain to be accessed, and creates an unauthorized gateway node and assigns it to the blockchain to be accessed, and the access request includes registration attribute information of the blockchain to be accessed.
[0034] Optionally, before the building module, the device further includes:
[0035] A configuration module, configured to configure parameters, activate gateway nodes on the relay chain, and receive authorization information sent by the committee group node, wherein the parameters include network connection parameters, identity authentication parameters, or cross-chain transaction parameters;
[0036] A monitoring module is used to monitor, manage, synchronize data between the proxy node and the gateway node and process the access request based on the communication connection between the proxy node and the gateway node; wherein the monitoring of the node includes monitoring the node operating status, the performance and throughput of processing cross-chain transaction requests.
[0037] Another embodiment of the present application provides a method for determining members of a committee group, the method comprising:
[0038] The sending module is used for the committee group node to send the committee group formation information to each proxy node in the member chain through the authorized gateway node. The proxy node u that receives the information responds to the committee group information, sends the information of the proxy node u to the committee group node and signs it. The committee group node records the proxy node vector L according to the response time sequence. u =[p1,p2,…,p u ];
[0039] Accumulation module, used to calculate the vector L u Accumulate the historical trust value R of the elements in the set in turn and record it in the set G i ={p1,p2,…,p i}, when the accumulated value reaches the expected parameter X, the set G iThe proxy node members in are the committee members; the expected parameter X is pre-set by the highest authority administrator of the relay chain, and the historical trust value R satisfies: a is the number of times the current proxy node has joined the committee group and participated in consensus decision-making in normal behavior in the past, and b is the number of times the current proxy node has joined the committee group and participated in consensus decision-making in abnormal behavior in the past.
[0040] Yet another embodiment of the present application provides a storage medium storing a computer program, wherein the computer program is configured to implement any of the above methods when executed.
[0041] Yet another embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement any of the above methods.
[0042] Compared with the existing technology, the present invention first receives an access request from the blockchain to be accessed, and then constructs a destination gateway node based on the access request of the blockchain. According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, and the relay chain that receives the cross-chain transaction is used as the destination chain. After forwarding and / or verification by the proxy node of the source chain and the gateway node of the destination chain, cross-chain transactions are realized. By designing the gateway node on the relay chain, the access control of the cross-chain architecture is effectively improved. Through the committee group node, the efficiency and accuracy of the consensus are improved. At the same time, by optimizing the cross-chain fees, the access to resources between cross-chain applications is effectively allocated, and the speed and efficiency of cross-chain transactions are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a hardware structure block diagram of a computer terminal for implementing a cross-chain transaction method based on blockchain technology provided by an embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of the structure of a cross-chain architecture provided by an embodiment of the present invention;
[0045] Figure 3 This is a flowchart of a method for implementing cross-chain transactions based on blockchain technology provided by an embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of a cross-chain architecture access control process provided by an embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram of a process for implementing cross-chain transactions provided by an embodiment of the present invention;
[0048] Figure 6 1 is a flow chart of a method for determining committee members provided by an embodiment of the present invention;
[0049] Figure 7 This is a schematic diagram of the structure of a cross-chain transaction implementation device based on blockchain technology provided by an embodiment of the present invention;
[0050] Figure 8 It is a structural diagram of a device for determining committee group members provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limiting the present invention.
[0052] The embodiment of the present invention first provides a cross-chain transaction implementation method based on blockchain technology. The method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.
[0053] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 This is a hardware structure diagram of a computer terminal for implementing a cross-chain transaction method based on blockchain technology provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0054] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the cross-chain transaction implementation method based on blockchain technology in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0055] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a communications provider of a computer terminal. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0056] The core of cross-chain interoperability technology lies in achieving data trust boundaries across a single blockchain system, thereby enabling trust transfer between independent blockchain systems. This in turn enables trusted cross-chain information acquisition and consistent transaction execution, promoting the cross-chain flow of information and value between different blockchains. Relay chain cross-chain technology connects multiple blockchains, enabling data exchange and value transfer between them. Through relay chain cross-chain technology, interoperability between different blockchains can be achieved, improving the scalability and performance of blockchains and providing a broader space for the development of blockchain applications.
[0057] See also Figure 2 , Figure 2 This is a structural diagram of a cross-chain architecture provided by an embodiment of the present invention, wherein the cross-chain architecture includes a relay chain and a member chain, the relay chain includes a gateway node and a committee group node, the member chain includes a proxy node, and the proxy node is communicatively connected to the gateway node.
[0058] Specifically, the relay chain, as a relay facility for cross-chain transactions, primarily functions as a hub for cross-chain interaction and communication, enabling interoperability and data sharing between different member chains. As the primary blockchain for cross-chain transactions, each member chain maintains its own unique characteristics and independence, such as consensus algorithm, block size, transaction speed, and storage space. Subject to resource access control policies, member chains can interact and communicate with the relay chain across chains, thereby enabling interoperability and data sharing between different blockchains. Gateway nodes are a key node type in the relay chain. They receive information from the relay chain and connect to proxy nodes on member chains, enabling connections between member chains and the relay chain, as well as cross-chain interaction and communication between different blockchains. They can also filter and forward cross-chain transactions according to resource access control policies. Committee nodes are special nodes on the relay chain responsible for verifying and recording the progress of cross-chain transactions. In the Relay Chain, the committee node group is composed of a specific set of nodes that can be considered validators and block producers on the Relay Chain. This group organizes nodes involved in access control decisions, cross-chain transaction consensus, and cross-chain transaction congestion prediction within the Relay Chain. Proxy nodes, located on member chains and connected to gateway nodes, handle cross-chain transactions and communications. Proxy nodes authenticate senders and recipients of cross-chain transactions and convert and exchange data on member chains for matching and processing with data on the Relay Chain. This enables interoperability between data of varying formats and structures.
[0059] See also Figure 3 , Figure 3 The flowchart of a cross-chain transaction implementation method based on blockchain technology provided by an embodiment of the present invention may include the following steps:
[0060] S301: Receive an access request from a blockchain to be accessed, wherein the blockchain to be accessed includes a cross-chain transaction, and the access request is generated by the member chain and sent to the relay chain.
[0061] Specifically, the receiving of an access request from a blockchain to be accessed may include: determining the blockchain to be accessed; based on the blockchain to be accessed, sending an access request by a member chain to a relay chain of a cross-chain architecture; wherein the relay chain generates a globally unique identifier for the blockchain to be accessed, and creates an unauthorized gateway node and assigns it to the blockchain to be accessed, and the access request includes registration attribute information of the blockchain to be accessed.
[0062] Exemplarily, for the blockchain to be accessed, the recommended member chain can send an access application to the relay chain of the cross-chain architecture. The relay chain generates a globally unique identifier for the blockchain to be accessed, and creates an unauthorized gateway node and assigns it to the blockchain to be accessed. The committee group in the relay chain can reach a consensus on the access application through a smart contract and update the access control policy table information. The relay chain authorizes the corresponding gateway node based on the consensus result, and the blockchain to be accessed is connected to the cross-chain architecture to become a member chain. Among them, the access application sent by the recommended member chain to the relay chain can include the registration attribute information of the blockchain.
[0063] S302: Based on the access request of the blockchain, a destination gateway node is constructed, wherein the destination gateway node is generated by the committee group node and determined after being empowered by a preset control policy.
[0064] Specifically, before constructing the destination gateway node based on the access request of the blockchain, the method may further include:
[0065] Step 1: Configure parameters, start the gateway node on the relay chain, and receive authorization information sent by the committee group node, where the parameters include network connection parameters, identity verification parameters, or cross-chain transaction parameters;
[0066] Step 2: Based on the communication connection between the proxy node and the gateway node, monitor, manage, synchronize data and process the access request of the proxy node and the gateway node; wherein, monitoring the node includes monitoring the node operation status, the performance and throughput of processing cross-chain transaction requests.
[0067] For example, when creating a destination gateway node, it is necessary to download, install, and configure the corresponding node information based on the type of relay chain and the selected node software to start the gateway node on the relay chain. Before starting the gateway node, it is necessary to configure the node parameters to ensure the correctness and validity of the node. After the configuration is complete, the gateway node on the relay chain can be started to listen for authorization information from the committee group node, where the node parameters include network connection parameters, identity verification parameters, cross-chain transaction parameters, etc. After receiving the authorization information sent by the committee group node, the gateway node will connect to the proxy node on the member chain and begin to synchronize data and process cross-chain transaction requests. In order to ensure the stability and reliability of the gateway node on the relay chain, the node needs to be monitored and managed, including monitoring the node's operating status, the performance and throughput of processing cross-chain transaction requests, etc. If any problems are found, timely measures need to be taken to troubleshoot and recover.
[0068] It should be noted that the committee group node includes multiple committee group member nodes, which can be generated by selecting honest and efficient nodes in the member chain. The selected committee group members will re-select committee group members after completing several transactions, and the committee group nodes can be used to generate cross-chain transaction consensus decisions, participate in the access control decisions of the relay chain, and predict cross-chain transaction congestion.
[0069] The weight of the destination gateway node can be determined by the following formula:
[0070]
[0071] Where n is the number of times the current node has participated in the committee group in history, β is the time forgetting factor, and R is the historical trust of the following registered nodes.
[0072] A committee node is designed within the cross-chain architecture to form committees, receive consensus information from member nodes, record their historical trustworthiness, and record and predict the average time required for each transaction on the relay chain over the next time period. This effectively records committee status and manages committee member nodes, providing more precise control over committee formation and decision-making. It also controls gateway node authorization and predicts cross-chain network congestion.
[0073] In an optional implementation, generating a cross-chain transaction consensus decision may include:
[0074] 1. Sending an endorsement request message to each member node of the committee group, wherein the endorsement message includes the signature of the first private key of the committee group node;
[0075] 2. Receive and verify the endorsement request information;
[0076] 3. Verify and confirm the endorsement request information, generate verification information, and send it to the committee member node, wherein the verification information includes the second private key signature of the committee member node;
[0077] 4. Receive the request endorsement information and the verification information sent by each member node of the committee group to generate the cross-chain transaction consensus result, wherein the consensus result includes the third private key signature.
[0078] Exemplarily, a request for endorsement information is sent to each committee member node; wherein, the endorsement information sent to the committee member node is signed using the private key of the committee member node on the relay chain; after receiving the endorsement request, the committee member verifies the data. If the node confirms the information, it signs the message with its own private key and sends the verification message and its own signature to the committee member node on the relay chain; after receiving the endorsement signatures of all committee members, the committee member node signs the consensus result.
[0079] After generating a cross-chain transaction consensus decision, the method may further include: broadcasting the cross-chain transaction consensus result within the relay chain, synchronizing the broadcast information to the memory pool of the committee group, and packaging after the committee group completes several cross-chain transactions, wherein the committee group is composed of multiple committee group nodes.
[0080] In an optional implementation, access control of member chains can also be achieved by controlling the permissions of the destination gateway node on the relay chain. The destination gateway node acts as a bridge between the member chain and the relay chain. It does not have executable permissions on the relay chain, which determines whether the member chain can successfully perform cross-chain interoperability. When the destination gateway node is granted executable permissions on the relay chain, it indicates that the member chain has entered the cross-chain architecture.
[0081] S303: According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, the relay chain that receives the cross-chain transaction is used as the destination chain, and the cross-chain transaction is forwarded and / or verified by the proxy node of the source chain and the gateway node of the destination chain to realize the cross-chain transaction.
[0082] Specifically, the pre-initiating cross-chain node needs to first send a pre-cross-chain application. The application is decided by the corresponding gateway node and the application feedback information is returned. The decision content includes the cross-chain transaction fee, which is calculated by the model by predicting the impending congestion on the relay chain. After receiving the application feedback information, the pre-initiating cross-chain node recognizes the feedback result and sends the cross-chain transaction information within the specified time. The cross-chain transaction information is forwarded or verified by the proxy node, the corresponding gateway node, the relay chain, and the destination chain gateway node on its chain, and the transaction communication is completed with the destination node. The source node pays the cross-chain fee and the cross-chain transaction is completed.
[0083] During the pre-application phase for cross-chain transactions, the congestion of the relay chain is predicted, and the fees for cross-chain transactions are increased or decreased. This allows for predictions of cross-chain transactions on the relay chain, and subsequent dynamic adjustments to fees to change the fees involved in cross-chain transactions, thereby impacting the congestion of cross-chain transactions on the relay chain and ensuring the efficiency and stability of the relay chain cross-chain system.
[0084] When the destination gateway node forwards cross-chain transactions, it obtains access control policies from the relay chain and can control access to resources between member chains. For inter-chain resource access, the destination gateway node can conveniently and reliably obtain the resource access control policy information of the connected member chain, thereby more effectively prohibiting illegal cross-chain transactions between member chains.
[0085] For example, before a node on a member chain wants to conduct a cross-chain transaction, it must first initiate a pre-cross-chain application to the relay chain. The gateway node first detects the legitimacy of the cross-chain application. The detection method can be: the gateway node corresponding to the chain where the application initiating node is located on the relay chain verifies the destination chain authority and the current status of the destination node based on the application information provided by the node. The specific verification method for determining the current destination node is: sending a node discovery protocol to the destination chain. The node discovery protocol finds the node by broadcasting within the destination chain and determines whether the node is in a connected state on the chain. The destination chain returns the result of the node discovery protocol to its gateway node. The gateway node determines the current status of the node based on the result returned by the destination chain; the gateway node determines the current status of the node based on the set X consisting of different cross-chain fees collected up to the time period t-1 and the ratio of successfully completed cross-chain transactions in the historical cross-chain data. tk Calculate the fees required for cross-chain applications; the gateway node obtains the average time H required for each transaction on the relay chain in the next time period t from the committee group node. t , where the committee group nodes can be determined using the long short-term memory network model, and the cell state is controlled by the gating system. The final output of the model is to predict the average time H required for each transaction on the relay chain in the next time period t t The committee group node records the different cross-chain fees n from the start of the cross-chain architecture to the time period t-1 k The ratio of successfully completed cross-chain transactions p k The set X tk ={(n1,p1),(n2,p2),…,(n k ,p k )}.
[0086] In the LSTM network model, the following formula can be used to view the average time H required for each transaction on the relay chain at time t-1: t-1 and set X tk Output a vector f t :
[0087] f t =σ(W fh H t-1 +W fx X tk +b f )
[0088] Where σ(·) is the sigmoid activation function, W fh is the average time H required for each transaction on the relay chain at time t-1 t-1 The weight, W fx is the set X tk The weight of b f is the activation function sigmoid weight.
[0089] In the long short-term memory network model, the following formula can also be used to determine the update information i t , and then use the tanh activation function to get the new candidate cell information a t :
[0090] i t =σ(W ih H t-1 +W ix X tk +b i )
[0091] a t =tanh(W ah H t-1 +W ax X tk +b a )
[0092] Among them, W ih is the average time H required for each transaction on the relay chain at time t-1 t-1 The weight, W ix is the set X tk The weight of b i is the activation function sigmoid weight, W ah is the average time H required for each transaction on the relay chain at time t-1 t-1 The weight, W ax is the set X tk The weight of b a is the activation function tanh weight.
[0093] In the long short-term memory network model, the old cell state C is updated using the following formula t-1 Change to new cell state C t :
[0094] C t =f t *C t-1 +i t *a t
[0095] In the long short-term memory network model, the state characteristics of the output cell can be determined using the following formula: t, and then the new cell state C t With state feature O t Multiplying them together gives the average time H required for each transaction on the relay chain within the final output time period t t :
[0096] O t =σ(W oh H t-1 +W ox X tk +b o )
[0097] H t =O t *tanh(C t )
[0098] Among them, W oh is the average time H required for each transaction on the relay chain at time t-1 t-1 The weight, W ox is the set X tk The weight of b o is the activation function sigmoid weight.
[0099] The fee E required to cross the chain is calculated by using the following formula i :
[0100]
[0101] in, is the cost calculation factor, H t It is the average time required to predict each transaction on the relay chain in the next time period t.
[0102] In an optional embodiment, the gateway node returns the application feedback information I connect The gateway node of the relay chain sends the information to the member chain proxy node, and the gateway node temporarily stores the application feedback information I connect If the transaction information sent by the node snID is not received within the specified time, the I pre-stored in its gateway node will be deleted. apply and I connect If the transaction information sent by the node snID is received within the specified time, I apply and I connectContinue to store in the gateway node until the cross-chain transaction is completed and deleted. After receiving the application feedback information and approving the transaction fee, the source node initiates a cross-chain transaction cc-tx. The chain where the source node is located is called the source chain, and the chain where the destination node is located is called the destination chain. After the cross-chain transaction issued by the source node is verified by the proxy node in the source chain, the cross-chain transaction information cc-tx is sent to the corresponding gateway node. The gateway node chain of the source chain selects the pre-stored application feedback information I according to the request information of the cross-chain transaction cc-tx. connect Verify the legitimacy of the request; for legal cross-chain transactions cc-tx, the gateway node will send the cross-chain transaction cc-tx and the node's valid application feedback information I connect The cross-chain transaction cc-tx is sent to the Relay Chain Committee. The Relay Chain Committee verifies the validity of the cross-chain transaction cc-tx based on the verification information. Once verified, the Relay Chain Committee signs the cross-chain transaction cc-tx, generating the signed cross-chain transaction cc-tx-s. The destination chain's gateway node listens on the Relay Chain, obtains the signed cross-chain transaction cc-tx-s, verifies the signature, parses the corresponding identifier of the cross-chain transaction, and sends it to the destination chain's proxy node. The destination chain's proxy node forwards the cross-chain transaction request cc-tx-s to the destination node. The destination node responds to the cross-chain transaction request and sets the status on the destination chain. Upon completion, the execution result is appended to the end of the cross-chain transaction cc-tx, which is now called cc-tx-resp. The cross-chain transaction cc-tx-resp is verified and signed by the Relay Chain Committee. The re-signed cross-chain transaction cc-tx-resp-s is returned to the source node, which verifies and updates the transaction status and pays the cross-chain fee.
[0103] It should be noted that when the nth cross-chain transaction is completed in the cross-chain architecture, each committee member node will be rewarded. The reward V obtained by each committee member node can be calculated using the following formula:
[0104]
[0105] Among them, E k The fee paid by the source node for the k-th cross-chain transaction; N is the number of node members currently making up the committee group; T is the number of cross-chain transactions successfully completed by the formula group in this round.
[0106] Among them, after each round of committee members complete the verification and consensus tasks, work rewards are given to enhance the enthusiasm of committee members and encourage them to increase their chances of becoming committee member nodes, thereby improving their own data processing capabilities and network speed.
[0107] It can be seen that the present invention first receives an access request from the blockchain to be accessed, and then constructs a destination gateway node based on the access request of the blockchain. According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, and the relay chain that receives the cross-chain transaction is used as the destination chain. After forwarding and / or verification by the proxy node of the source chain and the gateway node of the destination chain, cross-chain transactions are realized. By designing the gateway node on the relay chain, the access control of the cross-chain architecture is effectively improved, and the efficiency and accuracy of the consensus are improved through the committee group node. At the same time, by optimizing the cross-chain fees, the access to resources between cross-chain applications is effectively allocated, and the speed and efficiency of cross-chain transactions are improved.
[0108] In order to more clearly illustrate the above features and effects of the present application, an embodiment is given below and described in detail with reference to the accompanying drawings.
[0109] For example, we will take the example of blockchain Paral-4 connecting to Relay-1 (connected member chains include Paral-1, Paral-2, and Paral-3) to explain its implementation in detail. Figure 4 , Figure 4 This is a schematic diagram of a cross-chain architecture access control process provided by an embodiment of the present invention, which may include the following steps:
[0110] Step 1: Member chain registration. Blockchain Paral-4 looks for one of the member chains Paral-1, Paral-2, and Paral-3 as the recommended member chain and sends registration attribute information to the relay chain. The relay chain generates a globally unique identifier CC-P4 for the blockchain Paral-4 and establishes a new unauthorized gateway node for connecting to the blockchain Paral-4.
[0111] Step 2: The blockchain initiates an access application. The recommended member chain of blockchain Paral-4 submits its application information for Paral-4 access to the relay chain to the committee group. This information primarily includes the blockchain identifier CC-P4 and blockchain attributes. The committee group sets the access status to "PREJOIN-ING" and the voting status to "VOTESTART." All member nodes of the committee group participate in the vote. Before voting, they check whether the access status is "PREJOINING" and the voting status is "VOTESTART." Only when both check results are "true" can the member nodes of the committee group vote. Once all member nodes of the committee group have voted, the voting status is set to "VOTESUCCCESS."
[0112] Step 3: The committee makes a decision on the access application. When the voting status of the Paral-4 access application is updated to "VOTESUCCESS", the committee obtains the attribute information of the Paral-4 blockchain and the access control list information on the relay chain committee group node based on the application information. The committee matches the attribute information of the Paral-4 blockchain with each item in the access control policy list. If all matches are successful, the access status of the Paral-4 blockchain is set to "PREJOINFINISHED".
[0113] Step 4: The chain committee group node authorizes the gateway node; when the access status of the blockchain Paral-4 is set to "PREJOIN FINISHED", the committee group node broadcasts the access status of the blockchain Paral-4 in the relay chain and authorizes the gateway node of the blockchain Paral-4. Paral-4 is officially connected to the relay chain inter-chain system as a member chain.
[0114] Among them, the process of cross-chain architecture access control is mainly reflected in the recommendation of member chains to join the relay chain cross-chain system, the participation of committee groups in consensus, and the empowerment of committee group nodes to gateway nodes.
[0115] See also Figure 5 , Figure 5 This is a flow chart of implementing a cross-chain transaction provided by an embodiment of the present invention. Taking the example of a cross-chain transaction initiated by member chain Para-1 (source chain) to member chain Para-2 (destination chain), node A first initiates a pre-cross-chain transaction application to the proxy node on member chain Para-1. The gateway node returns the application feedback information. Node A approves the application feedback information and sends the cross-chain transaction information within the specified time. The transaction is then forwarded or verified by the source chain gateway node, relay chain, and destination chain gateway node, and then the transaction is initiated to node B on member chain Para-2 (destination chain). Specifically, the following steps may be included:
[0116] Step 5-1. Set the pre-cross-chain application information; Node A edits the cross-chain application information. The cross-chain application information I_apply contains the following information:
[0117] I_apply=(scID,snID,dcID,dnID,CID,AID,signature)
[0118] Among them, scID refers to the chain number of the pre-cross-chain node; snID refers to the pre-cross-chain node address; dcID refers to the chain address of the destination node; dnID refers to the destination node number; CID refers to the source chain block number; AID refers to the cross-chain application number; signature refers to the pre-cross-chain node signature.
[0119] Step 5-2: Pre-cross-chain application information processing: The cross-chain application information is connected to the gateway node of the relay chain via the proxy node of member chain Para-1. The gateway node makes a decision on the cross-chain application. The decision includes but is not limited to the following:
[0120] A1. Is the source chain authorized for cross-chain transactions?
[0121] B1. Whether the gateway node of the destination chain Para-2 is authorized;
[0122] C1. The status of the destination node B;
[0123] D1. Whether the destination node B is set to refuse cross-chain information reception;
[0124] The gateway node obtains the fees required for the current transaction from the committee group node on the relay chain and edits the application feedback information. The application feedback information I_connect includes:
[0125] I_apply=(scID,snID,dnID,verify,AID,expense,time)
[0126] Among them, scID refers to the chain number of the pre-cross-chain node; snID refers to the pre-cross-chain node address; dnID refers to the destination node number; verify is the cross-chain application verification result; AID refers to the cross-chain application number; expense is the fee required for this cross-chain transaction. time is the final time limit for issuing cross-chain transaction information; if the gateway node finds that the pre-cross-chain transaction is invalid when making a decision on the pre-cross-chain application, the verify status in the application feedback information is set to: INVALID; otherwise, the verify status in the feedback application information is set to: SUCCEED.
[0127] Step 5-3: The source node approves and initiates the cross-chain transaction. Node A receives the application feedback information from the gateway node via the proxy node. Based on the application feedback information, it determines whether the cross-chain fee meets expectations and whether to initiate the cross-chain transaction immediately. After confirming the transaction, Node A initiates a cross-chain transaction cc-tx to the proxy node on member chain Para-1. The request information includes but is not limited to the following:
[0128] A2. Source chain ID, destination chain ID;
[0129] B2. Source cross-chain application identifier, destination cross-chain application identifier;
[0130] C2. Source cross-chain application account ID, destination cross-chain application account ID;
[0131] D2. Specific transaction parameters;
[0132] Step 5-4: The source chain gateway node forwards the cross-chain transaction; the gateway node of member chain Para-1 continuously monitors the cross-chain transactions of the member chain. When the gateway node of member chain Para-1 monitors and obtains the cross-chain transaction cc-tx on the member chain, it jumps to the step of judging whether the attribute information of cc-tx is consistent with the pre-stored application feedback information I_connect. If not, the cross-chain transaction request is ignored. Otherwise, the process goes to the step of parsing the request information of cc-tx to continue processing.
[0133] The parsing request information of cc-tx includes but is not limited to the following: destination member chain identifier;
[0134] Step 5-5: The relay chain verifies and forwards the cross-chain transaction request. The relay chain committee node receives the cross-chain transaction cc-tx and the corresponding verification information. It first verifies the validity of the cross-chain transaction cc-tx based on the verification information. If the verification fails, it goes to step 5-5-1. Otherwise, it goes to step 5-5-2.
[0135] Step 5-5-1: For the cross-chain transaction cc-tx that fails the validity verification, the relay chain contract sets the status of the cross-chain transaction (cc-tx relay status) to INVALID-TX, and the process ends;
[0136] Step 5-5-2: For the cross-chain transaction cc-tx that has successfully been validated, the relay chain contract parses the request information of cc-tx, including but not limited to the following. After the parsing is completed, go to step 5-5-3:
[0137] A3. Source parachain identifier;
[0138] B3. Destination parachain identifier;
[0139] Step 5-5-3: The committee group node obtains the corresponding inter-chain access control list information according to the source member chain identifier and updates it;
[0140] Step 5-5-4: The relay chain committee signs the cross-chain transaction information cc-tx and obtains the signed cross-chain transaction information cc-tx-s;
[0141] Steps 5-6: The destination chain gateway node forwards the cross-chain transaction request; the gateway node of member chain Para-2 continuously monitors the cross-chain transaction information of the relay chain; the gateway facility of member chain Para-2 monitors and obtains the cross-chain transaction cc-tx-s on the relay chain; the gateway node matches the cross-chain transaction entry strategy for cc-tx-s, including but not limited to the following:
[0142] Verify that the signature of cc-tx-s is the signature of the relay chain committee group node;
[0143] Determine whether the destination chain identifier of cc-tx-s is the identifier of member chain Para-2;
[0144] The parsing request information of cc-tx-s includes but is not limited to the following:
[0145] A4. Source chain identification;
[0146] B4. Destination chain identifier;
[0147] The gateway node connects to the member chain's proxy node and sends cc-tx-s to the member chain. The proxy node then broadcasts the cross-chain transaction request cc-tx-s within the member chain.
[0148] Steps 5-7: The destination node responds to the cross-chain transaction request; the destination node B parses the cross-chain transaction cc-tx-s; based on the transaction details, the destination node B responds and adds the execution result to the end of the cross-chain transaction cc-tx. The new transaction information is called the cross-chain transaction result cc-tx resp (i.e., cross-chain transaction request + result), and its status (cc-tx status) on the member chain Para-2 is set to SUCCEED.
[0149] Steps 5-8: The source node receives the cross-chain transaction response and pays the cross-chain transaction fee. The cross-chain transaction information cc-tx-resp is verified and signed by the relay chain committee group, and the re-signed cross-chain transaction information cc-tx-resp-s is returned to the source node. The source node verifies and updates the transaction status and pays the cross-chain fee to the committee group node. After receiving the cross-chain fee paid by source node A, the committee group node sends a cross-chain receipt to node A through the gateway node and proxy node. After node A receives the cross-chain receipt, it marks the completion of the cross-chain transaction.
[0150] In summary, this application designs a gateway node on the relay chain, which effectively improves the access control of the cross-chain system; by designing a committee group node, in which the committee group node selects members by weight accumulation for consensus and decision-making on the relay chain, the efficiency and accuracy of the consensus are improved; at the same time, by optimizing cross-chain fees, it effectively allocates access to resources between cross-chain applications, and improves the speed and efficiency of cross-chain transactions.
[0151] See also Figure 6 , Figure 6 This is a flow chart of a method for determining committee members provided by an embodiment of the present invention, which may include the following steps:
[0152] S601: The committee group node sends the committee group formation information to each proxy node in the member chain through the authorized gateway node. The proxy node u that receives the information responds to the committee group information, sends the information of the proxy node u to the committee group node and signs it. The committee group node records the proxy node vector L according to the response time sequence. u =[p1,p2,…,p u ].
[0153] S602: According to vector L u Accumulate the historical trust value R of the elements in the set in turn and record it in the set G i ={p1,p2,…,p i}, when the accumulated value reaches the expected parameter X, the set G i The proxy node members in are the committee members; the expected parameter X is pre-set by the highest authority administrator of the relay chain, and the historical trust value R satisfies: a is the number of times the current proxy node has joined the committee group and participated in consensus decision-making in normal behavior in the past, and b is the number of times the current proxy node has joined the committee group and participated in consensus decision-making in abnormal behavior in the past.
[0154] The selection of committee members is designed to enable rapid verification and consensus within the cross-chain architecture. Selected committee members are highly trustworthy and responsive, enabling rapid and accurate decision-making and consensus within the relay chain, ensuring the relay chain's cross-chain architecture maintains superior cross-chain processing capabilities.
[0155] Another embodiment of the present application provides a cross-chain transaction implementation device based on blockchain technology, such as Figure 7 The schematic diagram of the structure of a cross-chain transaction implementation device based on blockchain technology is shown, and the device includes:
[0156] A receiving module 701 is configured to receive an access request from a blockchain to be accessed, wherein the blockchain to be accessed includes a cross-chain transaction, and the access request is generated by the member chain and sent to the relay chain;
[0157] A construction module 702 is configured to construct a destination gateway node based on the access request of the blockchain, wherein the destination gateway node is generated by the committee group node and determined after being authorized by a preset control policy;
[0158] The implementation module 703 is used to use the member chain that generates the cross-chain transaction as the source chain and the relay chain that receives the cross-chain transaction as the destination chain according to the destination gateway node, and to implement the cross-chain transaction through forwarding and / or verification by the proxy node of the source chain and the gateway node of the destination chain.
[0159] Specifically, the receiving module includes:
[0160] A determination unit, used to determine the blockchain to be connected;
[0161] A sending unit is configured to send an access request from a member chain to a relay chain of a cross-chain architecture according to the blockchain to be accessed; wherein the relay chain generates a globally unique identifier for the blockchain to be accessed, and creates an unauthorized gateway node and assigns it to the blockchain to be accessed, and the access request includes registration attribute information of the blockchain to be accessed.
[0162] Specifically, before the building module, the device further includes:
[0163] A configuration module, configured to configure parameters, activate gateway nodes on the relay chain, and receive authorization information sent by the committee group node, wherein the parameters include network connection parameters, identity authentication parameters, or cross-chain transaction parameters;
[0164] A monitoring module is used to monitor, manage, synchronize data between the proxy node and the gateway node and process the access request based on the communication connection between the proxy node and the gateway node; wherein the monitoring of the node includes monitoring the node operating status, the performance and throughput of processing cross-chain transaction requests.
[0165] Compared with the existing technology, the present invention first receives an access request from the blockchain to be accessed, and then constructs a destination gateway node based on the access request of the blockchain. According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, and the relay chain that receives the cross-chain transaction is used as the destination chain. After forwarding and / or verification by the proxy node of the source chain and the gateway node of the destination chain, cross-chain transactions are realized. By designing the gateway node on the relay chain, the access control of the cross-chain architecture is effectively improved. Through the committee group node, the efficiency and accuracy of the consensus are improved. At the same time, by optimizing the cross-chain fees, the access to resources between cross-chain applications is effectively allocated, and the speed and efficiency of cross-chain transactions are improved.
[0166] Another embodiment of the present application provides a device for determining members of a committee group, such as Figure 8 FIG. 1 is a schematic diagram of a structure of a device for determining committee group members, wherein the device comprises:
[0167] The sending module 801 is used for the committee group node to send the committee group formation information to each proxy node in the member chain through the authorized gateway node. The proxy node u that receives the information responds to the committee group information, sends the information of the proxy node u to the committee group node and signs it. The committee group node records the proxy node vector L according to the response time sequence. u =[p1,p2,…,p u ];
[0168] Accumulation module 802, for vector L u Accumulate the historical trust value R of the elements in the set in turn and record it in the set G i ={p1,p2,…,p i}, when the accumulated value reaches the expected parameter X, the set G i The proxy node members in are the committee members; the expected parameter X is pre-set by the highest authority administrator of the relay chain, and the historical trust value R satisfies: a is the number of times the current proxy node has joined the committee group and participated in consensus decision-making in normal behavior in the past, and b is the number of times the current proxy node has joined the committee group and participated in consensus decision-making in abnormal behavior in the past.
[0169] An embodiment of the present invention further provides a storage medium, in which a computer program is stored. The computer program is configured to implement the steps of any of the above method embodiments when running.
[0170] Specifically, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for performing the following steps:
[0171] S301: Receive an access request from a blockchain to be accessed, wherein the blockchain to be accessed includes a cross-chain transaction, and the access request is generated by the member chain and sent to the relay chain;
[0172] S302: Constructing a destination gateway node based on the access request of the blockchain, wherein the destination gateway node is generated by the committee group node and determined after being empowered by a preset control policy;
[0173] S303: According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, the relay chain that receives the cross-chain transaction is used as the destination chain, and the cross-chain transaction is forwarded and / or verified by the proxy node of the source chain and the gateway node of the destination chain to realize the cross-chain transaction.
[0174] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0175] Compared with the existing technology, the present invention first receives an access request from the blockchain to be accessed, and then constructs a destination gateway node based on the access request of the blockchain. According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, and the relay chain that receives the cross-chain transaction is used as the destination chain. After forwarding and / or verification by the proxy node of the source chain and the gateway node of the destination chain, cross-chain transactions are realized. By designing the gateway node on the relay chain, the access control of the cross-chain architecture is effectively improved. Through the committee group node, the efficiency and accuracy of the consensus are improved. At the same time, by optimizing the cross-chain fees, the access to resources between cross-chain applications is effectively allocated, and the speed and efficiency of cross-chain transactions are improved.
[0176] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.
[0177] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0178] Specifically, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0179] S301: Receive an access request from a blockchain to be accessed, wherein the blockchain to be accessed includes a cross-chain transaction, and the access request is generated by the member chain and sent to the relay chain;
[0180] S302: Constructing a destination gateway node based on the access request of the blockchain, wherein the destination gateway node is generated by the committee group node and determined after being empowered by a preset control policy;
[0181] S303: According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, the relay chain that receives the cross-chain transaction is used as the destination chain, and the cross-chain transaction is forwarded and / or verified by the proxy node of the source chain and the gateway node of the destination chain to realize the cross-chain transaction.
[0182] Compared with the existing technology, the present invention first receives an access request from the blockchain to be accessed, and then constructs a destination gateway node based on the access request of the blockchain. According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, and the relay chain that receives the cross-chain transaction is used as the destination chain. After forwarding and / or verification by the proxy node of the source chain and the gateway node of the destination chain, cross-chain transactions are realized. By designing the gateway node on the relay chain, the access control of the cross-chain architecture is effectively improved. Through the committee group node, the efficiency and accuracy of the consensus are improved. At the same time, by optimizing the cross-chain fees, the access to resources between cross-chain applications is effectively allocated, and the speed and efficiency of cross-chain transactions are improved.
[0183] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0184] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0185] In the several embodiments provided by the present invention, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0186] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0187] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0188] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned memory includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0189] The embodiments of the present invention are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A cross-chain transaction implementation method based on blockchain technology, applied to a cross-chain architecture, wherein the cross-chain architecture includes a relay chain and a member chain, the relay chain includes a gateway node and a committee group node, the member chain includes a proxy node, and the proxy node is communicatively connected to the gateway node, characterized in that: The method comprises: Receiving an access request from a blockchain to be accessed, wherein the blockchain to be accessed includes a cross-chain transaction, the access request being generated by the member chain and sent to the relay chain; Based on the access request of the blockchain, a destination gateway node is constructed, wherein the destination gateway node is generated by the committee group node and determined after being empowered by a preset control policy; the committee group node includes multiple committee group member nodes, and the committee group node is used to generate cross-chain transaction consensus decisions, participate in the access control decisions of the relay chain, and predict cross-chain transaction congestion; wherein, generating cross-chain transaction consensus decisions includes sending request endorsement information to each of the committee group member nodes, wherein the endorsement information includes the first private key signature of the committee group node; receiving and verifying the request endorsement information; verifying and confirming the request endorsement information, and generating verification information sent to the committee group node, wherein the verification information includes the second private key signature of the committee group member node; receiving the request endorsement information and the verification information sent by each of the committee group member nodes to generate the cross-chain transaction consensus result, wherein the consensus result includes the third private key signature; the committee group node sends the committee group formation information to each proxy node in the member chain through the authorized gateway node, and the proxy node that receives the information In response to the committee group information, the proxy node is sent to the committee group node The committee group node records the proxy node vector according to the response time sequence. ; According to the vector Sequentially compare the historical trust values of the elements in the set Accumulate and record in collection When the accumulated value reaches the expected parameter When, collection The proxy node members in are the committee members; among them, the expected parameters Pre-set by the highest authority administrator of the relay chain, historical trust value satisfy: , The number of times the current proxy node has joined the committee group and participated in consensus decision-making. The number of times the current proxy node has joined the committee group and participated in abnormal consensus decision-making behavior in history; According to the destination gateway node, the member chain that generates the cross-chain transaction is used as the source chain, the relay chain that receives the cross-chain transaction is used as the destination chain, and is forwarded and / or verified by the proxy node of the source chain and the gateway node of the destination chain to realize the cross-chain transaction.
2. The method according to claim 1, characterized in that The receiving an access request for a blockchain to be accessed includes: Determine the blockchain to be connected; According to the blockchain to be accessed, the member chain sends an access request to the relay chain of the cross-chain architecture; wherein, the relay chain generates a globally unique identifier for the blockchain to be accessed, and creates a new unauthorized gateway node and assigns it to the blockchain to be accessed, and the access request includes the registration attribute information of the blockchain to be accessed.
3. The method according to claim 1, characterized in that Before constructing the destination gateway node based on the access request of the blockchain, the method further includes: Configuring parameters, starting the gateway node on the relay chain, and receiving authorization information sent by the committee group node, wherein the parameters include network connection parameters, identity authentication parameters, or cross-chain transaction parameters; Based on the communication connection between the proxy node and the gateway node, the proxy node and the gateway node are monitored, managed, and data is synchronized, and the access request is processed; wherein, the monitoring of the node includes monitoring the node operation status, the performance and throughput of processing cross-chain transaction requests.
4. The method according to claim 3, characterized in that After generating the cross-chain transaction consensus decision, the method further includes: The cross-chain transaction consensus result is broadcasted within the relay chain, and the broadcast information is synchronized to the memory pool of the committee group. After the committee group completes several cross-chain transactions, the transactions are packaged. The committee group is composed of multiple committee group nodes.
5. A cross-chain transaction implementation device based on blockchain technology, applied to a cross-chain architecture, wherein the cross-chain architecture includes a relay chain and a member chain, the relay chain includes a gateway node and a committee group node, the member chain includes a proxy node, and the proxy node is communicatively connected to the gateway node, characterized in that: The device comprises: A receiving module, configured to receive an access request from a blockchain to be accessed, wherein the blockchain to be accessed includes a cross-chain transaction, and the access request is generated by the member chain and sent to the relay chain; A construction module is used to construct a destination gateway node based on the access request of the blockchain, wherein the destination gateway node is generated by the committee group node and determined after being empowered by a preset control policy; the committee group node includes multiple committee group member nodes, and the committee group node is used to generate cross-chain transaction consensus decisions, participate in the access control decisions of the relay chain, and predict cross-chain transaction congestion; wherein, generating cross-chain transaction consensus decisions includes sending request endorsement information to each of the committee group member nodes, wherein the endorsement information includes the first private key signature of the committee group node; receiving and verifying the request endorsement information; verifying and confirming the request endorsement information, and generating verification information sent to the committee group node, wherein the verification information includes the second private key signature of the committee group member node; receiving the request endorsement information and the verification information sent by each of the committee group member nodes to generate the cross-chain transaction consensus result, wherein the consensus result includes the third private key signature; the committee group node sends the committee group formation information to each proxy node in the member chain through the authorized gateway node, and the proxy node that receives the information In response to the committee group information, the proxy node is sent to the committee group node The committee group node records the proxy node vector according to the response time sequence. ; According to the vector Sequentially compare the historical trust values of the elements in the set Accumulate and record in collection When the accumulated value reaches the expected parameter When, collection The proxy node members in are the committee members; among them, the expected parameters Pre-set by the highest authority administrator of the relay chain, historical trust value satisfy: , The number of times the current proxy node has joined the committee group and participated in consensus decision-making. The number of times the current proxy node has joined the committee group and participated in abnormal consensus decision-making behavior in history; An implementation module is used to, according to the destination gateway node, use the member chain that generates the cross-chain transaction as the source chain, the relay chain that receives the cross-chain transaction as the destination chain, and forward and / or verify it through the proxy node of the source chain and the gateway node of the destination chain to implement the cross-chain transaction.
6. A storage medium, characterized in that The storage medium stores a computer program, wherein the computer program is configured to implement the method according to any one of claims 1 to 4 when executed.
7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the computer program to implement the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Relay chain cross-chain architecture-oriented access control and resource access control method and system
CN113572825A
Multi-mode trust cross-chain consensus method and system, medium, equipment and terminal
CN115499129A