Data processing method and device based on block chain, equipment, medium and product
By using two oracles for verification and transmission between different blockchains, the decentralization and trust problems of data interaction between blockchains are solved, and secure and accurate cross-chain data transmission is achieved, ensuring the security of user property.
Patent Information
- Application Number
- CN202411883757.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-19
AI Technical Summary
How to achieve decentralized, trustless, secure and accurate data interaction between different blockchains, and solve the shortcomings of relying on centralized third parties and trust issues in the existing technology.
Two oracles, one for verification and the other for transmission, achieve efficient, accurate and secure cross-chain data transmission. The specific steps include receiving block identification information, obtaining transaction proof information, determining transaction proof, and verifying the accuracy of data transmission through matching.
Trustless and decentralized cross-chain data transmission is realized, ensuring the security and accuracy of data transmission, and effectively protecting the safety of users' property.
Smart Images

Figure CN119766413A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based data processing method, device, equipment, medium and product. Background Art
[0002] With the development of blockchain technology, different blockchain platforms have emerged to support different blockchains. At this time, data exchange between different blockchains is required.
[0003] Generally, secure and accurate data interaction between different blockchains can be achieved through a centralized third party. However, this implementation method violates the most basic trustless intermediary feature of blockchain, and requires users to trust the centralized third party.
[0004] Therefore, how to achieve decentralized, trustless, secure and accurate data interaction between different blockchains has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a blockchain-based data processing method, device, equipment, medium and product to achieve decentralized, trustless, secure and efficient cross-chain data interaction.
[0006] In a first aspect, the present application provides a blockchain-based data processing method, which is applied to a computer device, wherein a first block in a first blockchain is deployed in the computer device; the method comprises:
[0007] After receiving the block identification information sent by the first oracle, obtaining transaction proof information from the second oracle according to the block identification information; wherein the block identification information indicates the second block in the second blockchain that sends data to the first block;
[0008] Determine the first transaction proof according to the transaction proof information, and obtain the second transaction proof sent by the first oracle;
[0009] If it is determined that the first transaction proof and the second transaction proof match, the transaction data sent by the second oracle is received; wherein the transaction data indicates the data sent by the second block to the second oracle.
[0010] In a second aspect, the present application provides another blockchain-based data processing method, which is applied to a computer device, wherein a second block in a second blockchain is deployed in the computer device; the method comprises:
[0011] In response to a transaction processing request initiated by a client corresponding to the second block, determining to-be-verified data and block-related data corresponding to the transaction processing request;
[0012] The block-related data is sent to a first oracle, and the data to be verified is sent to a second oracle; wherein the second oracle is used to send the data to be verified to the first block of the first blockchain.
[0013] In a third aspect, the present application provides a blockchain-based data processing device, which is applied to a computer device, wherein a first block in a first blockchain is deployed in the computer device; the device comprises:
[0014] An acquiring unit, configured to acquire transaction proof information from a second oracle according to the block identification information after receiving the block identification information sent by the first oracle; wherein the block identification information indicates a second block in the second blockchain that sends data to the first block;
[0015] A determining unit, configured to determine a first transaction proof according to the transaction proof information, and obtain a second transaction proof sent by the first oracle;
[0016] A receiving unit is used to receive transaction data sent by a second oracle if it is determined that the first transaction proof and the second transaction proof match; wherein the transaction data indicates data sent by the second block to the second oracle.
[0017] In a fourth aspect, the present application provides another blockchain-based data processing device, which is applied to a computer device, wherein a second block in a second blockchain is deployed in the computer device; the device comprises:
[0018] a response unit, configured to respond to a transaction processing request initiated by a client corresponding to the second block, and determine the to-be-verified data and block-related data corresponding to the transaction processing request;
[0019] A sending unit is used to send the block-related data to a first oracle, and send the data to be verified to a second oracle; wherein the second oracle is used to send the data to be verified to a first block of a first blockchain.
[0020] In a fifth aspect, the present application provides a computer device, comprising: a processor, and a memory communicatively connected to the processor;
[0021] The memory stores computer-executable instructions;
[0022] The processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect, or implements the method described in the second aspect.
[0023] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect, or to implement the method described in the second aspect.
[0024] In a seventh aspect, the present application provides a computer program product, characterized in that it includes a computer program, which, when executed by a processor, implements the method described in the first aspect, or implements the method described in the second aspect.
[0025] The blockchain-based data processing method, device, equipment, medium and product provided by the present application can obtain transaction proof information from the second oracle according to the block identification information after receiving the block identification information sent by the first oracle; then, according to the transaction proof information, determine the first transaction proof, and obtain the second transaction proof sent by the first oracle. At this time, the accuracy of data transmission can be determined by confirming whether the first transaction proof and the second transaction proof determined by two independent oracles match. If it is determined that the first transaction proof and the second transaction proof match, it means that the data in the second oracle is accurate. At this time, the first block in the first blockchain can receive the transaction data sent by the second oracle. This implementation method can achieve efficient, accurate, secure, trustless and decentralized cross-chain data transmission through two oracles, one for verification and the other for transmission, so as to effectively ensure the accurate and stable conduct of transactions, thereby ensuring the property safety of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0027] Figure 1 A data processing method based on blockchain provided in an embodiment of the present application;
[0028] Figure 2 Another data processing method based on blockchain provided in the embodiment of the present application;
[0029] Figure 3 A schematic diagram of the architecture of a blockchain-based data processing system provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application;
[0031] Figure 5 A schematic diagram of the structure of another blockchain-based data processing device provided in an embodiment of the present application;
[0032] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.
[0033] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0034] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0035] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0036] It should be noted that the blockchain-based data processing methods, devices, equipment, media and products provided in this application can be used in the field of blockchain technology, and can also be used in any field other than blockchain technology. The application does not limit the application field of the blockchain-based data processing methods, devices, equipment, media and products.
[0037] First, the professional terms involved in this application are explained:
[0038] Cross-chain bridge: is a cross-chain messaging protocol that can transfer tokens between different blockchains;
[0039] Merkle proof: provides a method to prove whether a transaction exists in a certain block in the blockchain through the full block header information in the blockchain;
[0040] NFT: The full name is Non-Fungible Token, which refers to non-fungible tokens. It is a trusted digital equity certificate with unique characteristics in the blockchain network. It is a data object that can record and process multi-dimensional and complex attributes on the blockchain. For example, digital collections can be understood as a kind of NFT;
[0041] JSON format: a lightweight data exchange format;
[0042] XML format: Extensible Markup Language, a simple data storage language.
[0043] With the continuous development of multi-blockchain technology, how to interact with data between different blockchains has become a technical problem that needs to be solved urgently.
[0044] In related technologies, secure and accurate data interaction between different blockchains can be achieved through a centralized third party. However, this implementation method not only violates the most basic trustless intermediary feature of blockchain, but also requires users to trust the centralized third party. At the same time, the centralized third party lacks transparency, which in turn poses certain security risks.
[0045] The inventors also found that data interaction between different blockchains can be achieved through a decentralized cross-chain bridge. However, this implementation requires users to trust the blockchain network. At the same time, the cross-chain bridge achieves data interaction by linking different blockchain networks. When the blockchain network is attacked, it may cause data transmission errors, which in turn poses certain security risks.
[0046] Therefore, how to achieve decentralized, trustless, secure and accurate data interaction between different blockchains has become a technical problem that needs to be solved urgently.
[0047] The blockchain-based data processing method provided in this application aims to utilize two oracles, one for verifying data and the other for transmitting data, so as to achieve secure and efficient cross-chain data transmission, thereby solving the above technical problems of the prior art.
[0048] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0049] Figure 1 A flowchart of a blockchain-based data processing method provided in an embodiment of the present application is provided, wherein the method is applied to a computer device in which a first block in a first blockchain is deployed.
[0050] Optionally, the first block in the first blockchain can be understood as a block that receives a cross-chain message. In this case, the first block in the first blockchain can receive a cross-chain message sent by the second block in the second blockchain. In an embodiment of the present application, a transaction processing request can be initiated by a client corresponding to the second block in the second blockchain, and the transaction data corresponding to the transaction processing request can be sent to the first block in the first blockchain corresponding to the transaction processing request through the second block, through the blockchain-based data processing method provided in an embodiment of the present application.
[0051] In one example, the initiated transaction processing request may include, but is not limited to: transfer transaction request, status update request, NFT transfer request, etc. There is no limitation on the type of transaction processing request here, which is subject to what can be implemented.
[0052] Based on this, Figure 1 As shown, the method comprises the following steps:
[0053] S101. After receiving the block identification information sent by the first oracle, obtain transaction proof information from the second oracle according to the block identification information.
[0054] The block identification information indicates a second block in a second blockchain that sends data to the first block.
[0055] In one example, the first oracle and the second oracle communicate with the first block in the first blockchain and the second block in the second blockchain respectively, thereby completing cross-chain data transmission. At this time, the first oracle can be understood as an oracle for verifying data, and the second oracle can be understood as an oracle for transmitting data.
[0056] Optionally, the block identification information may uniquely indicate the second block. In this case, the block identification information may be a block hash corresponding to the second block.
[0057] In one example, the first block can obtain transaction proof information from the second oracle based on the block identification information by receiving the block identification information sent by the first oracle.
[0058] In one example, the transaction proof information may include, but is not limited to: transaction identification information and transaction path information, wherein the transaction identification information may uniquely identify the transaction data corresponding to the transaction processing request, and the transaction path information includes all transaction data included in the second block. Optionally, the transaction identification information may be understood as a transaction hash value, and the transaction path information may be understood as a Merkle path.
[0059] In one example, the first oracle and the second oracle can be deployed on the same node off-chain, or on different nodes off-chain, which is not limited in this application.
[0060] S102. Determine the first transaction proof based on the transaction proof information, and obtain the second transaction proof sent by the first oracle.
[0061] In one example, when the transaction proof information includes a transaction hash value and a Merkle path, the first transaction proof can be understood as a Merkle root determined based on the transaction hash value and the Merkle path.
[0062] In one example, the second transaction proof is data of the same type as the first transaction proof. For example, when the first transaction proof is a Merkle root, the second transaction proof is also a Merkle root.
[0063] In one example, the second transaction proof included in the first oracle can be understood as the Merkle root stored in the block header of the second block.
[0064] S103. If it is determined that the first transaction proof and the second transaction proof match, the transaction data sent by the second oracle is received.
[0065] The transaction data indicates the data sent by the second block to the second oracle.
[0066] In one example, if the first transaction proof and the second transaction proof are the same, it means that the first transaction proof and the second transaction proof match.
[0067] It can be seen from the above description that the first block in the first blockchain in the embodiment of the present application can obtain transaction proof information from the second oracle according to the block identification information after receiving the block identification information sent by the first oracle; then, according to the transaction proof information, determine the first transaction proof, and obtain the second transaction proof sent by the first oracle. At this time, the accuracy of data transmission can be determined by confirming whether the first transaction proof and the second transaction proof determined by two independent oracles match. If it is determined that the first transaction proof and the second transaction proof match, it means that the data in the second oracle is accurate. At this time, the first block in the first blockchain can receive the transaction data sent by the second oracle. This implementation method can achieve efficient, accurate, secure, trustless and decentralized cross-chain data transmission through two oracles, one for verification and the other for transmission, so as to effectively ensure the accuracy and stability of transactions, thereby ensuring the property safety of users.
[0068] Optionally, the transaction proof information includes transaction identification information and transaction path information. In this case, when determining the first transaction proof based on the transaction proof information, the location of the transaction identification information in the transaction path information can be determined first; then, starting from the location, the transaction path indicated by the transaction path information is hashed to each data in the transaction path information to obtain the first transaction proof.
[0069] In one example, the transaction path information may indicate a Merkle path. In this case, the transaction path information may be represented by a Merkle tree. In this case, the transaction path information may include multiple nodes, each node being used to indicate data of a transaction. In this case, the data corresponding to each node is also the transaction hash value corresponding to each transaction data.
[0070] At this time, after performing a hash operation on each data included in the transaction path information according to the transaction path indicated by the transaction path information, a Merkle root, that is, the first transaction proof, is obtained.
[0071] In the above implementation, the starting position of the hash operation can be determined from the transaction path information based on the transaction identification information obtained from the second oracle, so as to ensure the degree of matching between the first transaction proof and the transaction identification information, thereby obtaining an accurate first transaction proof, thereby ensuring the accuracy of data verification.
[0072] Optionally, with respect to the above S103: if it is determined that the first transaction proof and the second transaction proof match, receiving the transaction data sent by the second oracle specifically includes the following process:
[0073] If it is determined that the first transaction proof and the second transaction proof match, the initial transaction data sent by the second oracle is received; wherein the initial transaction data indicates the data after the contract identification information and the transaction data are packaged; the contract identification information indicates the smart contract deployed in the first block stored in the second block; the transaction data indicates the transaction occurring in the second block; then, the initial transaction data is unpacked, and after the transaction data is obtained, the transaction data is received.
[0074] In one example, the contract identification information may include but is not limited to: contract name, contract version, contract function, etc. The specific content of the contract identification information is not limited here, and it is based on the description of the first block in the first blockchain. Transaction data may indicate but is not limited to the following types: asset transfer data, data call messages, state synchronization data, etc. The types of transaction data are not limited here, and it is based on meeting actual needs.
[0075] In this implementation, the accuracy and security of the transmitted transaction data can be further guaranteed by receiving the packaged initial transaction data, and accurate and secure transaction data can be obtained after unpacking the initial transaction data.
[0076] Optionally, if it is determined that the first transaction proof and the second transaction proof do not match, data transmission failure information is generated and sent to the second oracle. At this time, the second oracle can send the data transmission failure information to the second block in the second blockchain, so that the client corresponding to the second block of the second blockchain resends the transaction data.
[0077] Optionally, in the embodiment of the present application, after unpacking the initial transaction data to obtain the transaction data and before receiving the transaction data, the smart contract indicated by the contract identification information can be matched with the smart contract deployed in the first block, and the transaction data can be received when it is determined that the smart contract indicated by the contract identification successfully matches the smart contract deployed in the first block.
[0078] For example, if the contract identification information includes the contract name, contract version, and contract function, then the contract name, contract version, and contract function of the smart contract deployed in the first block can be matched with the contract identification information. If they are the same, it means that the smart contract indicated by the contract identification is successfully matched with the smart contract deployed in the first block. At this time, the transaction data obtained after the unpacking process can be received.
[0079] In the above implementation, the consistency of transaction data transmission can be determined by the contract identifier. At the same time, it can also prevent erroneous calls or malicious attacks, thereby helping to further ensure the security and effectiveness of cross-chain transmission of transaction data and help ensure the accurate conduct of transactions.
[0080] Optionally, when it is determined that the smart contract indicated by the contract identifier does not match the smart contract deployed in the first block, contract expiration information is generated and sent to the second oracle; the second oracle is used to send the contract expiration information to the second block.
[0081] In one example, the contract expiration information may include at least one of the following: failure prompt information, specific content of failure, matching time information, smart contract name, smart contract address, etc.
[0082] At this time, after sending the contract expiration information to the second oracle, the contract expiration information can be sent to the second block through the second oracle, so that the second block can re-acquire the contract identifier of the smart contract deployed in the first block, so that the smart contract information can be updated / synchronized in time to ensure smooth and effective cross-chain data interaction.
[0083] Optionally, after the first block in the first blockchain receives the transaction data according to the steps described above, transaction display information can be generated according to the transaction data, and the transaction display information can be displayed in the client corresponding to the first block.
[0084] In one example, the transaction display information can be understood as data obtained after formatting the transaction data, for example, the transaction data can be converted into json format or xml format, etc. At this time, the corresponding visualization component can be selected in the client corresponding to the first block to display the transaction display information.
[0085] In one example, a corresponding visualization component may be selected according to the data type of the transaction data, and the transaction data may be displayed in the visualization component, thereby displaying the transaction display information in the client corresponding to the first block.
[0086] This implementation method can convert the received transaction data into visual data and display it in the display interface of the client, so that the user can view the transaction data intuitively and clearly.
[0087] Figure 2 Another blockchain-based data processing method provided in an embodiment of the present application is applied to a computer device, in which a second block in a second blockchain is deployed. Optionally, the second block in the second blockchain can be understood as a block for sending a cross-chain message. In this case, the second block in the second blockchain can send a cross-chain message to the first block in the first blockchain mentioned above.
[0088] In one example, the computer device on which the second block in the second blockchain is deployed and the computer device on which the first block in the first blockchain is deployed may be the same device or may be different devices, which is not limited here.
[0089] like Figure 2 As shown, the method comprises the following steps:
[0090] S201. In response to a transaction processing request initiated by a client corresponding to a second block, determine the data to be verified and the block-related data corresponding to the transaction processing request.
[0091] In one example, the transaction processing request may be as mentioned above: transfer transaction request, status update request, NFT transfer request, etc. There is no limitation on the type of transaction processing request here, which is subject to what can be implemented.
[0092] In one example, the data to be verified may be determined based on the transaction-related data requested to be processed by the transaction processing request. At this time, the data to be verified may include but is not limited to transaction data, transaction identification information, contract identification information, etc.
[0093] In one example, the block-related data can be determined based on the block-related information corresponding to the second block and the first block respectively. At this time, the block-related data may include but is not limited to: the block identification information of the second block, and the smart contract address corresponding to the smart contract deployed by the first block (that is, the data transmission address described below).
[0094] S202: Send block-related data to the first oracle, and send the data to be verified to the second oracle.
[0095] The second oracle is used to send the data to be verified to the first block of the first blockchain.
[0096] At this time, the block-related data sent to the first oracle is used to obtain the accurate second transaction proof stored in the second block, and accurately transmit the second transaction proof to the first block; the data to be verified sent to the second oracle is used to obtain the transaction proof information stored in the second block, and send the transaction proof information to the first block, so that the first block can calculate the first transaction proof based on the transaction proof information, thereby verifying the first transaction proof and the second transaction proof to determine whether there is an error in the data transmitted by the second oracle.
[0097] It can be known from the above description that the second block in the second blockchain in the embodiment of the present application can respond to the transaction processing request initiated by the client corresponding to the second block, determine the data to be verified and the block-related data corresponding to the transaction processing request, so as to determine the data for two purposes, thereby realizing data verification and data transmission in a branch path, thereby facilitating the effective realization of data verification and data transmission. At this time, the first block can directly obtain the transaction proof and calculate the transaction proof at the same time by sending the block-related data to the first oracle and sending the data to be verified to the second oracle, so that it can be determined simply and quickly whether there is an error in the data transmission based on the acquired transaction proof and the calculated transaction proof, thereby realizing trustless, decentralized, secure and efficient cross-chain data transmission.
[0098] Optionally, in a case where the transaction processing request includes: transaction identification information and transaction data, in response to the transaction processing request initiated by the client corresponding to the second block, determining the data to be verified corresponding to the transaction processing request specifically includes the following process:
[0099] First, in response to a transaction processing request initiated by a client corresponding to the second block, the pre-stored contract identification information corresponding to the first block is obtained, wherein the contract identification information is used to indicate the smart contract deployed in the first block.
[0100] Then, the contract identification information and transaction data are packaged and processed to obtain the initial transaction data.
[0101] This implementation method can package the contract identification information and transaction data that need to be transmitted to the first block, which is conducive to further ensuring the security of cross-chain data.
[0102] Finally, the data to be verified is determined based on the initial transaction data and transaction identification information.
[0103] In one example, the initial transaction data and transaction identification information can be processed according to the data communication protocol that the cross-chain data interaction relies on to determine the data to be verified to ensure that the data to be verified can be accurately transmitted to the second oracle.
[0104] Optionally, the transaction processing request may also include: a data transmission address. At this time, the block identification information of the second block may be determined in response to the transaction processing request initiated by the client corresponding to the second block; and then, the block-related data may be determined according to the block identification information and the data transmission address.
[0105] The data transmission address is used to indicate the smart contract address corresponding to the first block.
[0106] This implementation method can add a data transmission address to the block-related data, thereby ensuring the accuracy of the data transmitted by the first oracle. At the same time, it can also expand the data transmission address so that the first oracle can be used for the verification of multiple cross-chain messages at the same time, thereby broadening the use scenarios of the first oracle, improving the utilization rate and processing performance of the first oracle, and saving costs.
[0107] Optionally, the block-related data may include block identification information; in this case, after the block-related data is sent to the first oracle, the first oracle can accurately obtain the block header information of the block corresponding to the block identification information from the second block according to the block identification information. In this case, after receiving the block identification information sent by the first oracle, the second block sends the block header information of the block corresponding to the block identification information to the first oracle.
[0108] Among them, the block header information includes the second transaction proof.
[0109] Afterwards, the first oracle can send the received block header information and block identification information to the first block according to the data transmission address for data verification.
[0110] Optionally, the data to be verified may include transaction identification information; in this case, after the data to be verified is sent to the second oracle, the second oracle can obtain the transaction path information corresponding to the transaction identification information from the second block according to the transaction identification information. In this case, after receiving the transaction identification information sent by the second oracle, the second block determines the block identification information corresponding to the transaction identification information; then, the transaction path information corresponding to the block indicated by the block identification information is sent to the second oracle.
[0111] Afterwards, after receiving the block identification information sent by the first block, the second oracle can determine the transaction path information and transaction identification information under the block corresponding to the block identification information as transaction proof information, and send it to the first block, so that the first block can generate a first transaction proof based on the transaction proof information for data verification.
[0112] In a possible implementation, assuming that the first oracle and the second oracle in the embodiment of the present application are used as a group of target oracles, the embodiment of the present application can also deploy multiple groups of target oracles in the off-chain nodes, and verify the cross-chain transaction data according to the multiple groups of target oracles. At this time, after the multiple groups of target oracles are verified (or the number of groups of target oracles that pass the verification meets the requirements), the first block in the first blockchain can receive the transaction data transmitted across the chain to further ensure the accuracy of the cross-chain data transmission, thereby further ensuring the security of the transaction data.
[0113] Figure 3 A schematic diagram of the architecture of a blockchain-based data processing system provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the blockchain-based data processing system includes at least: a first blockchain, a second blockchain, a first oracle and a second oracle; cross-chain smart contracts are deployed in the first blockchain and the second blockchain, and the first oracle and the second oracle are deployed in off-chain nodes.
[0114] The second block in the second blockchain is used to respond to the transaction processing request initiated by the client corresponding to the second block, determine the data to be verified and the block-related data corresponding to the transaction processing request, and send the data to be verified to the second oracle, and send the block-related data to the first oracle.
[0115] The first block in the first blockchain is used to obtain transaction proof information from the second oracle according to the block identification information after receiving the block identification information sent by the first oracle; then, determine the first transaction proof according to the transaction proof information, and obtain the second transaction proof sent by the first oracle; if it is determined that the first transaction proof and the second transaction proof match, receive the transaction data sent by the second oracle.
[0116] Alternatively, if Figure 3 As shown, the second blockchain may include a data construction module, a first data transmission module and a first data verification module, and the first blockchain may include a second data construction module, a second data transmission module and a second data verification module.
[0117] Among them, the first data construction module is used to respond to the transaction processing request initiated by the client corresponding to the second block, obtain the pre-stored contract identification information corresponding to the first block, and then package the contract identification information and the transaction data included in the transaction processing request to obtain the initial transaction data.
[0118] The first data verification module is used to determine the initial transaction data and the transaction identification information included in the transaction processing request as data to be verified, and send them to the second oracle; and send the block identification information corresponding to the second block and the smart contract address (that is, the data transmission address) of the smart contract deployed by the first block to the data transmission module.
[0119] The first data transmission module is used to determine the smart contract address and block identification information as block-related data and send them to the first oracle.
[0120] At this time, the second oracle is used to obtain and store the transaction path information from the second block according to the transaction identification information after receiving the data to be verified.
[0121] At this time, the first oracle is used to obtain and store the block header information from the second block according to the block identification information after receiving the block-related data; then, the block identification information and the block header information are sent to the second data transmission module of the first blockchain.
[0122] The second data transmission module is used to send the block identification information and the second transaction proof to the second data verification module.
[0123] The second data verification module is used to obtain transaction proof information from the second oracle according to the block identification information, and calculate the first transaction proof according to the transaction proof information; then, the first transaction proof is matched with the second transaction proof. If they match, the initial transaction data stored in the second oracle is received and the initial transaction data is sent to the second data construction module.
[0124] The second data construction module is used to unpack the initial transaction data, and after obtaining the transaction data, receive the transaction data. At this time, the transaction display information determined by the transaction data can also be sent to the client corresponding to the second block.
[0125] In the above implementation, decentralized, trustless, secure, and efficient cross-chain data interaction processing is achieved, ensuring the performance of the blockchain-based data processing system.
[0126] Figure 4 A schematic structural diagram of a blockchain-based data processing device provided in an embodiment of the present application, wherein the device is applied to a computer device in which a first block in a first blockchain is deployed.
[0127] like Figure 4 As shown, the blockchain-based data processing device 400 includes:
[0128] The acquisition unit 401 is used to obtain transaction proof information from the second oracle according to the block identification information after receiving the block identification information sent by the first oracle; wherein the block identification information indicates the second block in the second blockchain that sends data to the first block.
[0129] The determination unit 402 is used to determine the first transaction proof according to the transaction proof information, and obtain the second transaction proof sent by the first oracle.
[0130] The receiving unit 403 is used to receive the transaction data sent by the second oracle if it is determined that the first transaction proof and the second transaction proof match; wherein the transaction data indicates the data sent by the second block to the second oracle.
[0131] Optionally, the determining unit 402 is configured to:
[0132] Determine the location of the transaction identification information in the transaction path information;
[0133] Starting from the current location, according to the transaction path indicated by the transaction path information, a hash operation is performed on each data included in the transaction path information to obtain a first transaction certificate.
[0134] Optionally, the receiving unit 403 is configured to:
[0135] If it is determined that the first transaction proof and the second transaction proof match, the initial transaction data sent by the second oracle is received; wherein the initial transaction data indicates the data after the contract identification information and the transaction data are packaged and processed; the contract identification information indicates the smart contract deployed in the first block stored in the second block; and the transaction data indicates the transaction occurring in the second block;
[0136] The initial transaction data is unpacked and after obtaining the transaction data, the transaction data is received.
[0137] Optionally, the receiving unit 403 is further configured to:
[0138] Before receiving the transaction data, the smart contract indicated by the contract identification information is matched with the smart contract deployed in the first block, and the transaction data is received when it is determined that the smart contract indicated by the contract identification successfully matches the smart contract deployed in the first block.
[0139] Optionally, the device is also used for:
[0140] When it is determined that the smart contract indicated by the contract identifier does not match the smart contract deployed in the first block, contract expiration information is generated and sent to the second oracle; the second oracle is used to send the contract expiration information to the second block.
[0141] Optionally, the device is also used for:
[0142] Transaction display information is generated according to the transaction data, and the transaction display information is displayed in the client corresponding to the first block.
[0143] Figure 5 A schematic structural diagram of another blockchain-based data processing device provided in an embodiment of the present application, wherein the device is applied to a computer device in which a second block in a second blockchain is deployed.
[0144] like Figure 5 As shown, the blockchain-based data processing device 500 includes:
[0145] The response unit 501 is used to respond to the transaction processing request initiated by the client corresponding to the second block, and determine the to-be-verified data and block-related data corresponding to the transaction processing request.
[0146] The sending unit 502 is used to send block-related data to the first oracle, and send the data to be verified to the second oracle; wherein the second oracle is used to send the data to be verified to the first block of the first blockchain.
[0147] Optionally, the transaction processing request includes: transaction identification information and transaction data; in this case, the response unit 501 is used to:
[0148] In response to a transaction processing request initiated by a client corresponding to the second block, obtaining pre-stored contract identification information corresponding to the first block; wherein the contract identification information is used to indicate the smart contract deployed in the first block;
[0149] After packaging the contract identification information and transaction data, the initial transaction data is obtained;
[0150] The data to be verified is determined based on the initial transaction data and transaction identification information.
[0151] Optionally, the transaction processing request includes: a data transmission address; in this case, the response unit 501 is used to:
[0152] In response to a transaction processing request initiated by a client corresponding to the second block, determining block identification information of the second block;
[0153] Determine block-related data based on block identification information and data transmission address; wherein the data transmission address is used to indicate the smart contract address corresponding to the first block.
[0154] Optionally, the block-related data includes block identification information; in this case, the device is further used to:
[0155] After sending the block-related data to the first oracle, after receiving the block identification information sent by the first oracle, the block header information of the block corresponding to the block identification information is sent to the first oracle; wherein the block header information includes the second transaction proof.
[0156] Optionally, the data to be verified includes transaction identification information; in this case, the device is further used to:
[0157] After sending the data to be verified to the second oracle, after receiving the transaction identification information sent by the second oracle, determining the block identification information corresponding to the transaction identification information;
[0158] The transaction proof information corresponding to the block indicated by the block identification information is sent to the second oracle.
[0159] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the computer device 600 includes: a processor 601, and a memory 602 communicatively connected to the processor;
[0160] Memory 602 stores computer executable instructions;
[0161] The processor 601 executes the computer-executable instructions stored in the memory 602 to implement any of the above methods.
[0162] Optionally, the computer device 600 may further include: a receiver 603 and a transmitter 604 .
[0163] The receiver 603 is used to receive instructions and data sent by an external device, and the transmitter 604 is used to send instructions and data to the external device.
[0164] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement any of the above methods.
[0165] An embodiment of the present application also provides a computer program product, including a computer program, which implements any of the above methods when executed by a processor.
[0166] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, 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 the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0167] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0168] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0169] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0170] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.
[0171] If the integrated unit / module is implemented in the form of a software program module 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 application, 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, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0172] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0173] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0174] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data processing method based on blockchain, characterized in that: Applied to a computer device, wherein a first block in a first blockchain is deployed in the computer device; the method comprises: After receiving the block identification information sent by the first oracle, obtaining transaction proof information from the second oracle according to the block identification information; wherein the block identification information indicates the second block in the second blockchain that sends data to the first block; Determine the first transaction proof according to the transaction proof information, and obtain the second transaction proof sent by the first oracle; If it is determined that the first transaction proof and the second transaction proof match, the transaction data sent by the second oracle is received; wherein the transaction data indicates the data sent by the second block to the second oracle.
2. The method according to claim 1, characterized in that: The transaction proof information includes transaction identification information and transaction path information; determining a first transaction proof according to the transaction proof information includes: Determine the location of the transaction identification information in the transaction path information; Starting from the location, according to the transaction path indicated by the transaction path information, a hash operation is performed on each data included in the transaction path information to obtain the first transaction certificate.
3. The method according to claim 1, characterized in that: If it is determined that the first transaction proof and the second transaction proof match, receiving the transaction data sent by the second oracle, including: If it is determined that the first transaction proof and the second transaction proof match, the initial transaction data sent by the second oracle is received; wherein the initial transaction data indicates data after the contract identification information and the transaction data are packaged and processed; the contract identification information indicates the smart contract deployed in the first block stored in the second block; and the transaction data indicates the transaction occurring in the second block; The initial transaction data is unpacked to obtain the transaction data, and then the transaction data is received.
4. The method according to claim 3, characterized in that Before receiving the transaction data, the method further includes: The smart contract indicated by the contract identification information is matched with the smart contract deployed in the first block, and the transaction data is received when it is determined that the smart contract indicated by the contract identification successfully matches the smart contract deployed in the first block.
5. The method according to claim 4, characterized in that The method further comprises: When it is determined that the smart contract indicated by the contract identifier does not match the smart contract deployed in the first block, contract expiration information is generated and sent to the second oracle; the second oracle is used to send the contract expiration information to the second block.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Transaction display information is generated according to the transaction data, and the transaction display information is displayed in a client corresponding to the first block.
7. A data processing method based on blockchain, characterized in that: Applied to a computer device, wherein a second block in a second blockchain is deployed in the computer device; the method comprises: In response to a transaction processing request initiated by a client corresponding to the second block, determining to-be-verified data and block-related data corresponding to the transaction processing request; The block-related data is sent to a first oracle, and the data to be verified is sent to a second oracle; wherein the second oracle is used to send the data to be verified to the first block of the first blockchain.
8. The method according to claim 7, characterized in that The transaction processing request includes: transaction identification information and transaction data; in response to the transaction processing request initiated by the client corresponding to the second block, determining the data to be verified corresponding to the transaction processing request, including: In response to a transaction processing request initiated by a client corresponding to the second block, obtaining pre-stored contract identification information corresponding to the first block; wherein the contract identification information is used to indicate the smart contract deployed in the first block; After packaging the contract identification information and the transaction data, initial transaction data is obtained; The data to be verified is determined according to the initial transaction data and the transaction identification information.
9. The method according to claim 7, characterized in that: The transaction processing request includes: a data transmission address; in response to the transaction processing request initiated by the client corresponding to the second block, determining block-related data corresponding to the transaction processing request, including: In response to a transaction processing request initiated by a client corresponding to the second block, determining block identification information of the second block; Determine the block-related data according to the block identification information and the data transmission address; wherein the data transmission address is used to indicate the smart contract address corresponding to the first block.
10. The method according to any one of claims 7 to 9, characterized in that: The block-related data includes block identification information; after sending the block-related data to the first oracle, the method further includes: After receiving the block identification information sent by the first oracle, the block header information of the block corresponding to the block identification information is sent to the first oracle; wherein the block header information includes the second transaction proof.
11. The method according to any one of claims 7 to 9, characterized in that: The data to be verified includes transaction identification information; after sending the data to be verified to the second oracle, the method further includes: After receiving the transaction identification information sent by the second oracle, determining the block identification information corresponding to the transaction identification information; The transaction proof information corresponding to the block indicated by the block identification information is sent to the second oracle.
12. A data processing device based on blockchain, characterized in that: Applied to a computer device, wherein a first block in a first blockchain is deployed in the computer device; the device comprises: An acquiring unit, configured to acquire transaction proof information from a second oracle according to the block identification information after receiving the block identification information sent by the first oracle; wherein the block identification information indicates a second block in the second blockchain that sends data to the first block; A determining unit, configured to determine a first transaction proof according to the transaction proof information, and obtain a second transaction proof sent by the first oracle; A receiving unit is used to receive transaction data sent by a second oracle if it is determined that the first transaction proof and the second transaction proof match; wherein the transaction data indicates data sent by the second block to the second oracle.
13. A data processing device based on blockchain, characterized in that: Applied to a computer device, wherein a second block in a second blockchain is deployed in the computer device; the device comprises: a response unit, configured to respond to a transaction processing request initiated by a client corresponding to the second block, and determine the to-be-verified data and block-related data corresponding to the transaction processing request; A sending unit is used to send the block-related data to a first oracle, and send the data to be verified to a second oracle; wherein the second oracle is used to send the data to be verified to a first block of a first blockchain.
14. A computer device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6, or to implement the method according to any one of claims 7 to 11.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method according to any one of claims 1 to 6, or to implement the method according to any one of claims 7 to 11.
16. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6, or implements the method according to any one of claims 7 to 11.
Citation Information
Patent Citations
Oracle machine deployment method and device, electronic equipment and storage medium
CN111176668A
Service management method, device and system based on oracle machine-as-a-service platform
CN113076371A
Cross-block chain system for executing transactions, cross-chain transaction method and device
CN114255031A
Matchmaking transaction method and system based on block chain oracle machine
CN115358825A
Data transmission system, data transmission method, and storage medium
CN116846652A