Blockchain-based data processing method and apparatus, and device and storage medium

By introducing cross-chain communication protocols into the blockchain network, the secure reading and storage of off-chain data is realized, the problem of storage pressure on blockchain networks is solved, the data storage cost is reduced and the application scope is improved.

WO2024244333A1PCT designated stage expired Publication Date: 2024-12-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2023/133703
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-31
Filing Date
2023-11-23
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

As the blockchain network gradually increases in the transaction data stored, the storage pressure increases, and even some transaction data cannot be stored. It is difficult for the existing technology to effectively solve this problem.

Method used

By introducing a cross-chain communication protocol into the blockchain network, the node device can generate and send off-chain read requests, and the terminal device can read off-chain data from the target network device and verify the validity of the data through the data verification function. Implement safe reading and storage of off-chain data.

Benefits of technology

Reduces the data storage pressure of blockchain networks, reduces data storage costs, and realizes interoperability between on-chain and off-chain, avoids the data used for verification for each transaction data on the chain, and improves the Scope of application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023133703_05122024_PF_FP_ABST
    Figure CN2023133703_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a blockchain-based data processing method and apparatus, and a device and a storage medium, which are applied to the field of blockchains, etc. The method comprises: sending an original reading request regarding target transaction data to a node device in a blockchain network, such that the node device calls a service function in a cross-chain communication protocol according to the original reading request; receiving a first off-chain reading request, which is sent by the node device, wherein the first off-chain reading request is generated by the node device by means of the service function; according to the first off-chain reading request, reading a transaction data packet from a target network device; forwarding the transaction data packet to the node device; and if the node device verifies that the transaction data packet has validity, receiving the target transaction data, which is returned by the node device, wherein the target transaction data which is returned by the node device is obtained by means of parsing the transaction data packet by the node device. By means of the present application, the storage pressure on a blockchain can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Blockchain-based data processing method, device, equipment, and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 31, 2023, with application number 202310647015.6 and application name “Blockchain-based data processing method, device, equipment and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to fields such as blockchain, and in particular to a blockchain-based data processing method, device, equipment, and storage medium. Background Art

[0003] Blockchain is a novel application model for computer technologies, including distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a series of data blocks linked using cryptographic methods. Each block contains multiple transaction data, which are used to verify the validity of the transaction data (to prevent counterfeiting) and generate the next block. Over time, the amount of transaction data stored on the blockchain increases, placing significant storage pressure on the blockchain and even rendering some transaction data impossible to store.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a blockchain-based data processing method, apparatus, device, and storage medium, which can reduce the storage pressure of the blockchain.

[0006] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, including:

[0007] Sending an original read request for target transaction data to a node device in the blockchain network, so that the node device calls a business function in the cross-chain communication protocol according to the original read request; the original read request carries transaction attribute information of the target transaction data;

[0008] Receiving a first off-chain read request sent by a node device; the first off-chain read request is generated by the node device through a business function; the first off-chain read request is generated based on transaction attribute information and device attribute information of a target network device, the device attribute information being obtained by querying the cross-chain communication protocol when the node device determines through the business function that the target transaction data belongs to off-chain data of the blockchain network; the target network device is a device used to read off-chain data of the blockchain network;

[0009] Reading a transaction data packet from a target network device according to the first off-chain read request; the transaction data packet is read by the target network device from an external device associated with the blockchain network;

[0010] The transaction data packet is forwarded to the node device, which verifies the validity of the transaction data packet based on the data verification function associated with the cross-chain communication protocol and obtains the verification result;

[0011] If the verification result indicates that the transaction data packet is valid, the target transaction data returned by the receiving node device is received; the target transaction data returned by the node device is obtained by parsing the transaction data packet by the node device.

[0012] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, including:

[0013] Receiving an original read request for target transaction data sent by a terminal device; the original read request carries transaction attribute information of the target transaction data;

[0014] Calling a business function in the cross-chain communication protocol according to the original read request. If the business function indicates that the target transaction data belongs to the off-chain data of the blockchain network, querying the cross-chain communication protocol of the blockchain network for the device attribute information of the target network device used to read the off-chain data of the blockchain network;

[0015] Based on the transaction attribute information and the device attribute information, a first off-chain read request is generated in the business function, and the first off-chain read request is sent to the terminal device. The terminal device is used to read the transaction data packet from the target network device according to the first off-chain read request. The transaction data packet is read by the target network device from an external device associated with a node device in the blockchain network;

[0016] Receive the transaction data packet sent by the terminal device, verify the validity of the transaction data packet according to the data verification function associated with the cross-chain communication protocol, and obtain the verification result;

[0017] If the verification result indicates that the transaction data packet is valid, the transaction data packet is parsed to obtain target transaction data, and the parsed target transaction data is returned to the terminal device.

[0018] An embodiment of the present application provides, on one hand, a blockchain-based data processing device, comprising:

[0019] A sending module is used to send an original read request for target transaction data to a node device in the blockchain network, so that the node device calls a business function in the cross-chain communication protocol according to the original read request; the original read request carries transaction attribute information of the target transaction data;

[0020] A first receiving module, configured to receive a first off-chain read request sent by a node device; the first off-chain read request is generated by the node device through a business function; the first off-chain read request is generated based on transaction attribute information and device attribute information of a target network device; the device attribute information is obtained by querying the cross-chain communication protocol when the node device determines through the business function that the target transaction data belongs to off-chain data of the blockchain network; the target network device is a device used to read off-chain data of the blockchain network;

[0021] a reading module, configured to read a transaction data packet from a target network device according to a first off-chain read request; the transaction data packet is read by the target network device from an external device associated with the blockchain network;

[0022] The forwarding module is used to forward the transaction data packet to the node device. The node device is used to verify the validity of the transaction data packet based on the data verification function associated with the cross-chain communication protocol and obtain the verification result;

[0023] The second receiving module is configured to receive target transaction data returned by the node device if the verification result indicates that the transaction data packet is valid; the target transaction data returned by the node device is obtained by parsing the transaction data packet by the node device.

[0024] An embodiment of the present application provides, on one hand, a blockchain-based data processing device, comprising:

[0025] A first receiving module is configured to receive an original read request for target transaction data sent by a terminal device; the original read request carries transaction attribute information of the target transaction data;

[0026] A query module is used to call a business function in the cross-chain communication protocol according to the original read request. If the business function indicates that the target transaction data belongs to the off-chain data of the blockchain network, the cross-chain communication protocol of the blockchain network is used to query the device attribute information of the target network device for reading the off-chain data of the blockchain network;

[0027] A generation module is configured to generate a first off-chain read request in a business function based on the transaction attribute information and the device attribute information, invoke the business function in the cross-chain communication protocol, and send the first off-chain read request to the terminal device. The terminal device is configured to read the transaction data packet from the target network device based on the first off-chain read request. The transaction data packet is read by the target network device from an external device associated with a node device in the blockchain network.

[0028] The second receiving module is used to receive the transaction data packet sent by the terminal device, verify the validity of the transaction data packet according to the data verification function associated with the cross-chain communication protocol, and obtain a verification result;

[0029] The sending module is used to parse the transaction data packet to obtain target transaction data if the verification result indicates that the transaction data packet is valid, and return the parsed target transaction data to the terminal device.

[0030] On one hand, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0031] On one hand, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0032] On one hand, an embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0033] In this application, the node devices in the blockchain network pre-generate a set of universal cross-chain communication protocols. The cross-chain communication protocol is used to indicate how to securely read off-chain data through the blockchain network. For example, the cross-chain communication protocol includes a business function for issuing off-chain read requests and a data verification function for verifying off-chain data. Through this cross-chain communication protocol, secure reading of off-chain data can be achieved to ensure the security of the read transaction data and achieve interoperability between the chain and the off-chain. Specifically, when a terminal device needs to read target transaction data, the terminal device can send an original read request for the target transaction data to the node device in the blockchain network. The original read request carries transaction attribute information of the target transaction data. After receiving the original read request, the node device can determine whether the target transaction data belongs to the off-chain data of the blockchain network by calling the business function in the cross-chain communication protocol. If it is determined that the target transaction data belongs to the off-chain data of the blockchain network, the device attribute information of the target network device used to read the off-chain data of the blockchain network can be queried from the above-mentioned cross-chain communication protocol. Furthermore, the node device generates a first off-chain read request based on the device attribute information and the transaction attribute information, and sends the first off-chain read request to the terminal device. The first off-chain read request is used to instruct the target network device to return a transaction data packet to the terminal device. After receiving the first off-chain read request, the terminal device reads the transaction data packet from the target network device and forwards the transaction data packet to the node device. The node device calls the data verification function to verify the validity of the transaction data packet. When the transaction data packet is valid, the transaction data packet can be parsed to obtain the target transaction data, and the parsed target transaction data is sent to the terminal device. In this way, off-chain data can be securely read on the chain, and the validity of the off-chain data (i.e., the target transaction data) can be ensured. At the same time, by reading off-chain data through a set of universal cross-chain communication protocols, there is no need to store data for verification separately on the chain for each transaction data, nor is there a need for the terminal device to perceive the interaction details of storing the transaction data in an external device, and no additional credit assumptions are required. This improves the scope of application of this application and enables universal reading of off-chain data. In addition, the target transaction data is read by the target network device from the external device associated with the blockchain network, and the validity of the target transaction data can be ensured, so the target transaction data is provided with the possibility of off-chain storage, which can reduce the data storage pressure of the blockchain network and reduce the data storage cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0035] FIG1 is a schematic diagram of the architecture of a blockchain-based data processing system provided by this application;

[0036] FIG2 is a schematic diagram of the structure of a blockchain provided by this application;

[0037] FIG3 is a schematic diagram of a scenario of interaction between a terminal device, a target network device, and a node device in a blockchain network provided by the present application;

[0038] FIG4 is a flow chart of a data processing method based on blockchain provided by this application;

[0039] FIG5 is a schematic diagram of a scenario in which a second off-chain read request is generated based on a URL template provided by the present application;

[0040] FIG6 is a flowchart of a blockchain-based data processing method provided by this application;

[0041] FIG7 is a schematic diagram of a scenario for querying the balance of a user corresponding to a terminal device provided by the present application;

[0042] FIG8 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application;

[0043] FIG9 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application;

[0044] FIG10 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0046] First, let's introduce the blockchain data processing system used in this solution. See Figure 1, which is a schematic diagram of the structure of a blockchain data processing system provided by an embodiment of the present invention. The blockchain data processing system includes a blockchain network, a terminal device 105, a network device 106, and an external device 107.

[0047] The terminal device 105 may include a data processing application for writing transaction data to or reading transaction data from the blockchain network. For example, the data processing application may be a blockchain application. The terminal device 105 has communication connections with the network device 106 and each node device in the blockchain network, so that the terminal device 105 can exchange information with the network device 106 and each node device in the blockchain network.

[0048] Among them, the external device 107 may refer to a device for storing off-chain data of a blockchain network, and the external device 107 may be a node device in another blockchain network, or the external device 107 may refer to a database device, and the database device may be a node device in a non-blockchain network, such as a database device may refer to a device specifically used to store transaction data.

[0049] The network device 106 is a device used to read off-chain data from the external device 107. The network device 106 is equivalent to an entry point for reading off-chain data from the external device 107. The network device 106 can specifically be a gateway device. The network device 106 has a network connection with the external device 107 and each node device in the blockchain network, so that the network device 107 can exchange information with the external device 107 and the node devices in the blockchain network.

[0050] Among them, the blockchain network is an end-to-end decentralized network composed of multiple node devices. The node devices in the blockchain network can be called background processing devices of the data processing application in the terminal device 105. The number of node devices in the blockchain network can be deployed according to actual needs. This application does not limit the number of node devices; as shown in Figure 1, the blockchain network includes 4 node devices as an example, and the 4 node devices are node device 101, node device 102, node device 103 and node device 104.

[0051] It is understandable that each node device can receive the transaction data to be recorded when performing normal operations, and maintain the blockchain based on the received transaction data to be recorded. In order to ensure information intercommunication within the blockchain network, a network connection 10 can exist between each node device in the blockchain network, and data can be transmitted between the node devices through the above network connection 10. For example, when any node device in the blockchain network receives the transaction data to be recorded, the other node devices in the blockchain network will verify the transaction data to be recorded according to the consensus algorithm, and after successful verification (i.e., after reaching a consensus), the transaction data to be recorded will be stored as data in the blockchain, so that the data stored on all node devices in the blockchain network are consistent.

[0052] It is understandable that data or blocks can be transferred between node devices via the network connection 10. The network connection between the above-mentioned node devices can be based on node identification. For each node device in the blockchain network, there is a node identification corresponding to it, and each of the above-mentioned node devices can store the node identifications of other node devices with which it is connected, so that the acquired data or generated blocks can be broadcast to other node devices based on the node identifications of other node devices. For example, the node device 101 can maintain a node identification list, which stores the node names and node identifications of other node devices, as shown in Table 1:

[0053] Table 1

[0054] Among them, the node identifier can be the Internet Protocol (IP) address for interconnection between networks or any other information that can be used to identify the node device in the blockchain network. Table 1 only uses the IP address as an example for explanation.

[0055] Assuming that the node identifier of node device 101 is 117.xxx.xxx.174, node device 101 can send a data synchronization request to node device 102 through 117.xxx.xxx.174, and node device 102 can know that the data synchronization request is sent by node device 101 through the node identifier 117.xxx.xxx.174; similarly, node device 102 can send transaction data A to node device 101 through the node identifier 117.xxx.xxx.145, and node device 101 can know that the transaction data A is sent by node device 101 through the node identifier 117.xxx.xxx.145. The same is true for data transmission between other node devices, so they will not be elaborated one by one.

[0056] It is understandable that the above-mentioned network connection does not limit the connection method. It can be directly or indirectly connected through wired communication, directly or indirectly connected through wireless communication, or through other connection methods. This application does not limit this.

[0057] As shown in Figure 2, the blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information feature value, version number, timestamp and difficulty value, and the block body stores the input information. The next block of the genesis block uses the genesis block as its parent block. The next block also includes a block header and a block body. The block header stores the input information feature value of the current block, the block header feature value, version number, timestamp and difficulty value of the parent block, and so on. As a result, the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.

[0058] It is understandable that in order to reduce the storage pressure of the blockchain network, some transaction data is stored off-chain in the blockchain network. That is, the data stored off-chain in the blockchain network can be called off-chain data. In order for the node devices in the blockchain network to store transaction data off-chain in an orderly manner and for the terminal devices to be able to safely read the off-chain data in the blockchain network, the node devices in the blockchain network can pre-deploy a cross-chain communication protocol. The cross-chain communication protocol is used to instruct the reading of off-chain data related to the blockchain network through the chain. Specifically, the cross-chain communication protocol includes the following contents:

[0059] ① A business function used by a node device to send an off-chain read request to a terminal device. ② Device attribute information and a request generation template for network devices associated with the blockchain network. A network device may refer to an entry for reading off-chain data from an external device. The number of network devices may be one or more. A request generation template for a network device refers to a request generation template adapted to the network device. The request generation template is used to generate an off-chain read request adapted to the network device. An off-chain read request adapted to the network device refers to an off-chain read request that the network device can successfully parse. The request generation template includes the device attribute information of the corresponding network device. Device attribute information may include the IP address (URL address) and device name of the network device, etc. ③ A data verification function used to verify off-chain data. This data verification function is used to indicate how to verify the validity of off-chain data.

[0060] Optionally, the cross-chain communication protocol can be stored in the form of a smart contract on a node device in the blockchain network. The cross-chain communication protocol has a unique protocol identifier in the blockchain network, which can also be called a protocol address (or contract address). A smart contract can refer to a protocol defined in a digital form and needs to be run in a trusted environment. The trusted environment can refer to a blockchain platform. The blockchain platform can be deployed on each node device in the blockchain network, that is, the blockchain is established on the blockchain platform. The blockchain platform can be a back-end processing application for the data processing application in the terminal device 105. The blockchain platform can be used to manage (such as permission management) and maintain (such as updating and repairing) the data processing application in the terminal device 105.

[0061] Among them, node device 101, node device 102, node device 103 and node device 104 can all be independent physical servers, or they can be server clusters or distributed systems composed of at least two physical servers, or they can be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal device 105 can specifically refer to a vehicle-mounted terminal, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a screen speaker, a smart watch, etc., but is not limited to this. The terminal device and the server can be directly or indirectly connected via wired or wireless communication. At the same time, the number of terminal devices and servers can be one or at least two, and this application does not limit this. Network device 106 and external device 107 can both be servers or terminal devices.

[0062] In this application, the device attribute information of a network device may include at least one of the IP address (or URL address) or device name of the network device; the transaction attribute information of the target transaction data may include the data volume of the target transaction data, the object identifier of the object (e.g., user or organization) to which the target transaction data belongs, the purpose of the target transaction data, etc. The object identifier may include the public key or account number (e.g., payment account number) of the object in the blockchain network. The blockchain data processing system shown in FIG1 can implement the blockchain-based data processing method of this application. Referring to FIG3 , terminal device 20a in FIG3 may refer to terminal device 105 in FIG1 . Node device 21a in FIG3 may refer to any node device in the blockchain network in FIG1 . The blockchain network to which node device 21a belongs may be referred to as blockchain network a. The blockchain 26b of blockchain network a stores a cross-chain communication protocol 27b (which can also be understood as node device 21a deploying cross-chain communication protocol 27b). The node device 22a in FIG3 may refer to the external device 107 in FIG1 . For example, the external device is any node device in the blockchain network b. Each node device in the blockchain network b stores a blockchain 28b. The network device 23a in FIG3 may refer to the network device 106 in FIG1 . As shown in FIG3 , the blockchain data processing method may include the following steps S30 to S36:

[0063] S30: Terminal device 20a sends an original read request for transaction data 31c to node device 21a. Terminal device 20a may display a data reading interface 30c of a data processing application. This data reading interface 30c may include transaction data 31c to be downloaded from blockchain network a and a download control 32c. Transaction data 31c may refer to on-chain data or off-chain data. On-chain data in blockchain network a refers to transaction data stored in blockchain 26b of blockchain network a, while off-chain data in blockchain network a refers to transaction data stored by a node device in blockchain network a on an external device. The external device may be a node device in blockchain network b associated with blockchain network a, or a database device associated with blockchain network a. In response to the triggering operation of the download control 32c in the data reading interface 30c, terminal device 20 generates an original read request for transaction data 31c and sends this original read request to server 21a. Since the terminal device 20a does not perceive whether the transaction data 31c belongs to on-chain data, the original read request may refer to an on-chain read request for the transaction data 31c, and the original read request carries the transaction attribute information of the transaction data 31c; the transaction attribute information of the transaction data 31c may include the data volume of the transaction data 31c, the object identifier of the object to which the transaction data 31c belongs (such as a user or institution), the purpose of the transaction data 31c, etc.

[0064] S31. Node device 21a determines whether transaction data 31c belongs to on-chain data based on the business function in the cross-chain communication protocol 27b (the business function can be obtained by calling the function name carried in the original read request). If transaction data 31c belongs to on-chain data, step S32 is executed; if transaction data 31c does not belong to on-chain data, that is, transaction data 31c belongs to off-chain data, step S33 is executed. Specifically, node device 21a can also determine whether transaction data 31c belongs to on-chain data based on the off-chain storage rules in the cross-chain communication protocol 27b. In one embodiment, when the off-chain data storage rules indicate that transaction data with a data volume greater than a data volume threshold is stored off-chain, node device 21a can obtain the data volume of transaction data 31c from the transaction attribute information of transaction data 31c. When the data volume of transaction data 31c is less than or equal to the data volume threshold, it is determined that transaction data 31c belongs to on-chain data; when the data volume of transaction data 31c is greater than the data volume threshold, it is determined that transaction data 31c belongs to off-chain data. In one embodiment, when the off-chain data storage rules indicate that transaction data with a real-time level less than the real-time level threshold should be stored off-chain, node device 21a can obtain the purpose of transaction data 31c from the transaction attribute information of transaction data 31c and determine the real-time level of transaction data 31c based on the purpose of transaction data 31c. If the real-time level of transaction data 31c is greater than or equal to the real-time level threshold, transaction data 31c is determined to be on-chain data; if the real-time level of transaction data 31c is less than the real-time level threshold, transaction data 31c is determined to be off-chain data. In one embodiment, when the off-chain data storage rules indicate that transaction data with a security level less than the security level threshold should be stored off-chain, node device 21a can obtain the object identifier corresponding to transaction data 31c from the transaction attribute information of transaction data 31c and determine the security level of transaction data 31c based on the object to which transaction data 31c belongs. If the security level of transaction data 31c is greater than or equal to the security level threshold, it is determined that transaction data 31c belongs to on-chain data; if the security level of transaction data 31c is less than the security level threshold, it is determined that transaction data 31c belongs to off-chain data. In particular, other node devices in blockchain network a can also determine that transaction data 31c belongs to off-chain data in the above manner. If the majority (e.g., 51%) of the node devices in the blockchain network determine that transaction data 31c belongs to on-chain data, step S32 is executed; if the majority (e.g., 51%) of the node devices in the blockchain network determine that transaction data 31c belongs to off-chain data, step S33 is executed. Similarly, off-chain data storage rules can also be stored in business functions, that is, the off-chain storage rules of the business function are used to determine whether transaction data 31c belongs to off-chain data.

[0065] S32. If the transaction data 31c is on-chain data, the node device 21a reads the transaction data 31c from the blockchain 26b and returns the transaction data 31c to the terminal device 20a.

[0066] S33. If the transaction data 31c is off-chain data, the node device 21a can call the business function in the cross-chain communication protocol and return an off-chain read request to the terminal device 20a. The off-chain read request can be generated based on the device attribute information of the network device 23a and the transaction attribute information of the transaction data 31c.

[0067] S34. Terminal device 20a can read the transaction data packet from network device 23a based on the off-chain read request. Specifically, network device 23a can query the storage information associated with the transaction attribute information in the off-chain read request and read the transaction data packet from blockchain 28b based on the storage information. The transaction data packet may include transaction data 31c and signature information of the organization to which network device 23a belongs. The signature information is used to verify whether the transaction data packet was sent by network device 23a and whether the transaction data 31c in the transaction data packet has been tampered with. The signature information of the organization to which network device 23a belongs is obtained by signing transaction data 31c using the private key of the organization to which network device 23a belongs. The transaction data 31c is read by network device 23a from blockchain 28b in node device 22a. In particular, the signature information of the organization to which the network device 23a belongs can be obtained by the node device 21a using the private key of the organization to which it belongs to sign the transaction data 31c during the process of storing the transaction data 31c. The node device 22a stores the transaction data packet including the transaction data 31c, and the network device 23a reads the transaction data packet from the node device 22a and returns it to the terminal device 20a.

[0068] S35. The terminal device 20a forwards the transaction data packet to the node device 21a.

[0069] S36. When node device 21a confirms that the transaction data 31c is valid, it returns the transaction data 31c to terminal device 20a. After receiving the transaction data packet, node device 21a can call the data verification function in the cross-chain communication protocol to verify the validity of the transaction data 31c in the transaction data packet, such as performing a hash operation on the transaction data 31c to obtain the hash value of the transaction data 31c, and using the public key of the organization to which the network device belongs to verify the signature information of the organization to which the network device belongs to obtain the signature verification data. If the signature verification data matches the hash value of the transaction data 31c, it is determined that the transaction data 31c has been verified. Further, when it is determined that the transaction data 31c is valid, the transaction data 31c is sent to terminal device 20a.

[0070] In summary, based on the above steps S30 to S36, cross-chain storage of transaction data can be achieved, avoiding storing all transaction data in the same blockchain network, reducing the data storage pressure of the blockchain network, and at the same time, there is no need for the terminal device to perceive the interaction details of storing transaction data in the off-chain node device, that is, there is no need to improve the data processing application in the terminal device to adapt to the off-chain data storage, reducing development costs. Based on the above steps S30 to S36, a set of universal cross-chain communication protocols is used to securely read off-chain data. There is no need to store data for verification separately on the chain for each transaction data, and no additional credit assumptions are required. The application scope of this application is improved, and universal reading of off-chain data can be achieved. At the same time, the cross-chain communication protocol enables a node device in a blockchain network to read data from another blockchain network, thereby achieving interoperability between different blockchain networks, that is, achieving message communication between different blockchain networks.

[0071] Further, please refer to Figure 4, which is a flowchart of a blockchain-based data processing method provided in an embodiment of the present application. As shown in Figure 4, the method can be executed by the terminal device in Figure 1. The blockchain-based data processing method can include the following steps S101 to S105:

[0072] S101. Send an original read request for target transaction data to a node device in the blockchain network; the original read request carries transaction attribute information of the target transaction data.

[0073] In this application, the transaction data to be read by a terminal device is referred to as target transaction data. This target transaction data may be on-chain data or off-chain data of a blockchain network. Off-chain data of a blockchain network may refer to transaction data stored by a node device in the blockchain network in an external device; on-chain data of a blockchain network may refer to transaction data stored by a node device in the blockchain network on the blockchain (i.e., the blockchain ledger) within the blockchain network. The terminal device may generate an original read request for the target transaction data and send this original read request to any node device in the blockchain network. Since the terminal device is unaware of whether the node device stores the target transaction data on-chain or off-chain, i.e., the terminal device assumes that the target transaction data is stored on-chain in the blockchain network, the original read request may refer to an on-chain read request for the target transaction data. This original read request may carry transaction attribute information of the target transaction data. This transaction attribute information may include the data volume of the target transaction data, the object identifier of the object (e.g., user or organization) to which the target transaction data belongs, the purpose of the target transaction data, etc. The object identifier may include the public key or account number (e.g., payment account) of the object in the blockchain network. The original read request may also include the protocol address (i.e., contract address) corresponding to the cross-chain communication protocol and the function identifier of the business function (the business function is used to perform operations related to the target transaction data, such as reading the target transaction data). After receiving the original read request, the node device can call the cross-chain communication protocol based on the protocol address, and further call the business function in the cross-chain communication protocol through the function identifier. If the target transaction data is the balance of a user's payment account, and the original read request is a request to read the balance, then the business function used to read the balance can be balanceOf, that is, the original read request can carry the function identifier of balanceOf.

[0074] S102. Receive a first off-chain read request sent by a node device; the first off-chain read request is generated by the node device through a business function; the above-mentioned first off-chain read request is generated based on the above-mentioned transaction attribute information and the device attribute information of the target network device, and the above-mentioned device attribute information is obtained by querying from the above-mentioned cross-chain communication protocol when the above-mentioned node device determines through the business function that the above-mentioned target transaction data belongs to the off-chain data of the above-mentioned blockchain network. The target network device is a device for reading the off-chain data of the above-mentioned blockchain network.

[0075] In this application, after the node device receives the above-mentioned original read request, it can call the business function in the cross-chain communication protocol through the original read request, and determine whether the target transaction data belongs to off-chain data based on the business function in the cross-chain communication protocol. For the specific judgment process, please refer to step S31 in the corresponding embodiment of Figure 3, and the repeated parts will not be repeated. When the node device determines that the target transaction data belongs to off-chain data, it can query the device attribute information of the target network device used to read the off-chain data of the blockchain network based on the cross-chain communication protocol, generate a first on-chain read request based on the business function and the device attribute information and transaction attribute information, and send the first on-chain read request to the terminal device.

[0076] It should be noted that the target network device may refer to an entry point for reading off-chain data from a blockchain network, and the number of target network devices may be one or more. The first off-chain read request may include additional data, an initial verification function and a request generation template in the cross-chain communication protocol, and the protocol address of the cross-chain communication protocol. The additional data and the initial verification function are used to verify the transaction data packet returned by the network device. The additional data may include at least one of the public key of the organization to which the network device belongs, the standard data volume or standard data format of the target transaction data, etc. The standard data volume refers to the data volume of the target transaction data when it has not been tampered with, and the standard data format may refer to the data format of the target transaction data when it has not been tampered with. The request generation template is used to indicate how to generate an off-chain read request that is compatible with the target network device. The request generation template may include device attribute information of the target network device, such as the IP address of the target network device.

[0077] Optionally, the original read request may also carry a protocol address (which can be understood as a contract address) of a cross-chain communication protocol associated with the terminal device and the node device. The protocol address in the original read request is obtained by the terminal device and is used to indicate the cross-chain communication protocol that the terminal device expects to trigger. The first off-chain read request carries the protocol address. After receiving the first off-chain read request, the terminal device may compare the protocol address in the first off-chain read request with the protocol address in the original read request. If the protocol address in the first off-chain read request is the same as the protocol address in the original read request, it is determined that the first off-chain read request is triggered by the cross-chain communication protocol indicated in the original read request, and the terminal device may execute step S103. If the protocol address in the first off-chain read request is different from the protocol address in the original read request, it is determined that the first off-chain read request is not triggered by the cross-chain communication protocol indicated by the original read request, and the terminal device may end this process. This can avoid returning erroneous data to the terminal device.

[0078] S103. Read a transaction data packet from the target network device according to the first off-chain read request; the transaction data packet is read by the target network device from an external device associated with the blockchain network.

[0079] In this application, after the terminal device receives the first off-chain read request, it can read the transaction data packet from the target network device according to the off-chain read request, wherein the transaction data packet may include the target transaction data, or may include the encoded data after encoding the target transaction data (the encoded data can be subsequently decoded by the node device to restore the target transaction data). Of course, even if the transaction data packet already contains the target transaction data, the transaction data packet still needs to be forwarded to the node device, because the node device needs to verify the validity of the target transaction data in the transaction data packet. When the validity is verified, the target transaction data is returned. At this time, the target transaction data obtained by the terminal device from the node device is valid and reliable. The transaction data packet may also include the signature information of the organization to which the target network device belongs (the signature information can be provided to the node device for verification to ensure the validity of the target transaction data). The transaction data packet can be read by the network device from an external device associated with the blockchain network. The external device can refer to any node device in an associated blockchain network that has an associated relationship with the blockchain network, or the external device can refer to a database device associated with the blockchain network. That is to say, the target transaction data can be stored on a blockchain in another blockchain network, so that interoperability between different blockchain networks can be achieved.

[0080] It should be noted that the target network device is typically maintained by the organization to which the blockchain network belongs. Therefore, the node devices in the blockchain network store the public and private keys of the organization to which the target network device belongs. Furthermore, the signature information of the organization to which the target network device belongs can be obtained by the node device in the blockchain network signing the target transaction data using the private key of the organization to which the network device belongs during the process of storing the target transaction data. In other words, the external device stores a transaction data packet including the target transaction data and the signature information of the organization to which the target network device belongs. Alternatively, the signature information of the organization to which the target network device belongs can be obtained by the target network device signing the target transaction data using the private key of the organization to which the network device belongs after reading the target transaction data from the external device. In other words, the external device stores the target transaction data.

[0081] Optionally, based on the above-mentioned first off-chain read request, the specific process of reading the transaction data packet from the above-mentioned target network device can be: the terminal device can generate a second off-chain read request adapted to the target network device based on the first off-chain read request, and the second off-chain read request adapted to the target network device refers to an off-chain read request that the target network device can successfully parse. The request format of the second off-chain read request is the request format indicated by the request generation template, and the request format includes any one of the Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol Secure (HTTPS). The second off-chain read request can be used to instruct the target network device to read the target transaction data from the external device. The second off-chain read request includes one or more of callback data, a protocol address corresponding to the cross-chain communication protocol, or device attribute information of the target network device. The callback data is used to indicate the off-chain read method required by the target network device to read the target transaction data (the off-chain read method is an off-chain read method function that can be used to read the target transaction data). Specifically, the target transaction data can be read from the external device via the off-chain read method. The callback data is obtained by encoding the transaction attribute information and the method identifier of the off-chain read method. The off-chain read method can refer to a function used to read off-chain data. Further, the terminal device can send the second off-chain read request to the target network device, and the target network device is used to generate a request response message based on the second off-chain read request. The terminal device can receive the request response message returned by the target network device and, for example, determine whether the request response message is a successful response message based on the status value of the request response message. For example, if the status value is 200, the request response message is determined to be a successful response message. Alternatively, the terminal device can query whether the request response message includes a transaction data packet. If so, the terminal device determines that the request response message is a successful response message and obtains the transaction data packet from the request response message. The terminal device reads the transaction data packet from the target network device via the first off-chain read request, thereby achieving interconnection and interoperability between the terminal device and the target network device and improving the efficiency of reading transaction data packets.

[0082] It is understandable that the request response message may include a successful response message or a failed response message. The successful response message is used to indicate that the target network device has successfully read the transaction data packet from the external device, that is, the successful response message includes the transaction data packet. The failed response message is used to indicate that the target network device cannot read the transaction data packet from the external device. The failed response message may include a status value. Taking the request format indicated by the request generation template as HTTPS as an example, a status value of [400, 499] indicates that the second off-chain read request is invalid. For example, a status value of 404 indicates that the target network device does not support the contract address in the second off-chain read request (for example, the contract address is incorrect, that is, the contract address is different from the protocol address of the cross-chain communication protocol). A status value of 400 indicates that the data format of the callback data is invalid, that is, the target network device cannot parse the callback data. A status value of [500, 599] indicates that an abnormality has occurred in the target network device. For example, a status value of 500 indicates that an error has occurred inside the target network device.

[0083] Optionally, the first off-chain read request includes a protocol address of a cross-chain communication protocol, a request generation template within the cross-chain communication protocol, and callback data, where the request generation template is compatible with the target network device. The callback data includes an off-chain read method for instructing the target network device to read the target transaction data, where the off-chain read method is stored locally on the target network device. Optionally, taking the example of a request format indicated by the request generation template as HTTPS, the specific process for generating a second off-chain read request compatible with the target network device based on the first off-chain read request may be as follows: if the request generation template includes a data field and a sender field, then replacing the sender field with the protocol address and replacing the data field with the callback data in the request generation template to obtain a GET request for the target transaction data. This GET request may also be referred to as a GET request, and the request format of the GET request is JSON. Furthermore, the GET request is determined to be a second off-chain read request compatible with the target network device. Generating a second off-chain read request compatible with the target network device using the request generation template within the cross-chain communication protocol can improve the target network device's parsing success rate for the second off-chain read request.

[0084] It should be noted that the target network device may include multiple cross-chain communication protocols, and different cross-chain communication protocols have different functions. Different cross-chain communication protocols can be associated with different blockchain networks. A cross-chain communication protocol is associated with one or more methods (also referred to as functions or method interfaces). Different methods are used to implement different functions. For example, the cross-chain communication protocol may include a data update function and the above-mentioned business function. The above-mentioned data update function is used to update off-chain data.

[0085] For example, as shown in Figure 5, the request generation template can also be called a Uniform Resource Locator (URL) template. When the request generation template is: `https: / / example.com / gateway / {sender} / {data}.json`, it indicates that the request generation template includes a data field and a sender field, that is, {data}, https: / / example.com / gateway / represents the IP address of the target network device, {sender} represents the sender field, which is used to carry the protocol address of the cross-chain communication protocol, and {data} represents the data field, which is used to carry callback data. The second off-chain read request generated based on the first off-chain read request is: https: / / example.com / gateway / 0x226159d592E2b063810a10Ebf6dcbADA94Ed68b8 / 0xd5fa2b00.js on; where https: / / example.com / gateway represents the IP address of the target network device, 0x226159d592E2b063810a10Ebf6dcbADA94Ed68b8 represents the protocol address of the cross-chain communication protocol, and 0xd5fa2b00 represents callback data, which is obtained by encoding the off-chain read method for reading the target transaction data and the parameters required to read the target transaction data (such as the account number of the object to which the target transaction data belongs).

[0086] Optionally, taking the request format indicated by the request generation template as HTTPS as an example, the specific process of generating a second off-chain read request adapted to the above-mentioned target network device based on the above-mentioned first off-chain read request can be: If the above-mentioned request generation template does not include a data field but includes a sender field, the terminal device can generate a processing request and use the processing request as the second off-chain read request. The processing request can be called a POST request, and the content type information used to declare the request body format can be added to the request header, that is, the content type information Content-Type of the request header of the processing request should be application / json (the content type information is used to declare that the request body is in json format). The request body is in json format, and the request body includes a sender field {sender} and a data field {data}, both of which are string types and are hexadecimal encoded with a 0x prefix. Specifically, if the above-mentioned request generation template includes a sender field but does not include a data field, the content type information used to declare the request body format is added to the request header; the data field and the sender field are added to the initial request body, the callback data is used as the field value of the data field in the initial request body, and the protocol address is used as the field value of the sender field in the initial request body to obtain the request body; the sender field is replaced with the protocol address in the request generation template, and a processing request for the target transaction data is generated based on the replaced request generation template, request header, and request body, and the processing request is determined as a second off-chain read request adapted to the target network device. By generating a second off-chain read request adapted to the target network device through the request generation template in the cross-chain communication protocol, the target network device can improve the success rate of parsing the second off-chain read request.

[0087] For example, as shown in Figure 5, when the request generation template is: `https: / / example.com / gateway / {sender}.json` (i.e., the URL template), indicating that the request generation template does not include the data field (i.e., {data}) but includes the sender field (i.e., {sender}), the second off-chain read request generated based on the first off-chain read request is shown in Table 2 below. In Table 2, curl-D-XPOSTH "Content-Type: application / json"—data represents the request header. {"data":"0xd5fa2b00","sender":"0x226159d592E2b063810a10Ebf6dcbADA94Ed68b8"} represents the request body, "0xd5fa2b00" represents the callback data, and "0x226159d592E2b063810a10Ebf6dcbADA94Ed68b8" represents the protocol address. In Table 2, https: / / example.com / gateway / 0x226159d592E2b063810a10Ebf6dcbADA94Ed68b8.json represents the request URL (i.e., the replaced request generation template), https: / / example.com / gateway / represents the IP address of the target network device, and 0x226159d592E2b063810a10Ebf6dcbADA94Ed68b8 represents the protocol address.

[0088] Table 2

[0089] Optionally, the first off-chain read request carries request generation templates corresponding to N candidate network devices. These request generation templates are arranged in descending order of the candidate network device's credibility in the first off-chain read request, where N is an integer greater than 1. The credibility of a candidate network device can be determined based on one or more of the candidate network device's transaction data reading efficiency, network stability, or security. The terminal device can obtain the ranking order of the N request generation templates in the first off-chain read request, obtain the candidate network device i corresponding to the request generation template with the lowest ranking order, and determine this candidate network device i as the target network device for reading off-chain data from the blockchain network. Specifically, when there are multiple candidate network devices available, the terminal device can prioritize the candidate network device with the highest credibility as the target network device for reading transaction data packets. This can improve the success rate of reading transaction data packets, as well as the efficiency and security of reading transaction data packets.

[0090] Optionally, if the request response message is a response failure message and the status value carried by the request response message is within a first threshold range, the first threshold range indicates that the target network device failed to parse the data in the second off-chain read request, i.e., the second off-chain read request is incompatible with the target network device. In this case, if a new target network device is selected for retrying, data parsing failure will still occur. Therefore, the terminal device can suspend sending the second off-chain read request to the remaining network devices, i.e., no further retry is required, and the acquisition of the target transaction data is suspended. The remaining network devices are the network devices other than candidate network device i among the N candidate network devices. If the request response message is a response failure message and the status value carried by the request response message is within a second threshold range, the second threshold range indicates that the target network device has an abnormality. The terminal device can then re-determine the target network device for reading the off-chain data of the blockchain network from the remaining network devices according to the sequence number of the remaining network devices and re-send the second off-chain read request to the new target network device, i.e., select a different candidate network device for retrying. The state value is adaptively used to select whether to retry and obtain the transaction data packet. This can avoid the waste of resources caused by invalid retries and improve the success rate of reading transaction data packets through effective retries.

[0091] It should be noted that the first threshold range and the second threshold range can be pre-set, such as data in the cross-chain communication protocol, the first threshold range can refer to [400, 499], and the second threshold range can refer to [500, 599].

[0092] It should be noted that, if the target network device responds successfully, the message format of the request response message returned by the target network device when the second chain read request is the aforementioned GET request is the same as the message format of the request response message returned when the second chain read request is the aforementioned POST request. For example, when the target network device responds successfully, the Content-Type (content type) of the response header in the returned request response message should be application / json, and the response body should be in JSON format. The response body contains a data field of character type string, data, as the response result (i.e., transaction data packet). The response result is hexadecimal-encoded, using 0x as the prefix. For example, the request response message may be as shown in Table 3, where 200 in Table 3 represents a status value, indicating that the request response message is a successful response message. UTF-8 (8-bit, Universal Character Set / Unicode Transformation Format) is a variable-length character encoding for Unicode, indicating that the character encoding of the request response message header is UTF-8. "0xdeadbeefdecafbad" represents the transaction data packet, i.e., the target transaction data is encoded based on UTF-8.

[0093] Table 3

[0094] It should be noted that, in the case where the target network device fails to respond, the message format of the request response message returned by the target network device when the read request under the second chain is the above-mentioned GET request is the same as the message format of the request response message returned when the read request under the second chain is the above-mentioned POST request. The response header of the request response message includes a status value, the content type (message format) is application / json, the response body should be in json format, and the response body should contain a message field message of string type. The value of the message field is a readable error message, which is used to reflect the reason for the response failure. For example, the request response message can be as shown in Table 4, where 404 in Table 4 represents the status value, reflecting that the request response message belongs to a response failure message, and "Gateway address not supported." indicates the reason for the target network device's response failure, that is, the target network device does not support the cross-chain communication protocol indicated by the protocol address.

[0095] Table 4

[0096] Optionally, the terminal device may count the number of times the second off-chain read request is sent. If the number of times exceeds a threshold, and the request response message returned by the target network device is a response failure message, the step of re-determining the target network device for reading off-chain data from the blockchain network according to the sequence number of the remaining network devices is suspended. The threshold number of times may be pre-set in the cross-chain communication protocol, such as 4, to avoid infinite retries that may cause network congestion.

[0097] S104. Forward the transaction data packet to the node device. The node device is used to verify the validity of the transaction data packet based on the data verification function associated with the cross-chain communication protocol to obtain a verification result.

[0098] In this application, after the terminal device obtains the transaction data packet, it can forward the transaction data packet to the node device. The node device can be used to verify the validity of the target transaction data or encoded data (i.e., the data after encoding the target transaction data) in the transaction data packet based on the data verification function associated with the cross-chain communication protocol to obtain a verification result. The data verification function can be obtained by the terminal device adding the public key of the institution to which the target network device belongs and the transaction data packet to the initial verification function. The data verification function is used to indicate how to verify the validity of the transaction data packet, such as by verifying the signature information of the institution to which the target network device belongs to verify the validity of the transaction data packet, or by verifying the data format or data volume of the target transaction data to verify the validity of the transaction data packet.

[0099] Optionally, the first off-chain read request carries the initial verification function in the cross-chain communication protocol and additional data for verifying the target transaction data, such as the additional data may refer to one or more of the public key of the institution to which the target network device belongs, the standard data format or data volume of the target transaction data, etc.; the specific process of forwarding the transaction data packet to the above-mentioned node device may be: the terminal device may add the transaction data packet and the public key to the initial verification function to obtain the data verification function associated with the cross-chain communication protocol (in fact, it can be understood as the function identifier and parameters of the data verification function, and the parameters include the transaction data packet and the public key). Then, the terminal device may send the data verification function to the node device (it can also be understood as sending the function identifier and parameters of the data verification function to the node device, so that the node device can call the data verification function based on the function identifier (specifically, a function with a verification function code in the node device), and the node device verifies the transaction data packet through the data verification function and parameters); the node device is also used to verify the validity of the transaction data packet in the data verification function based on the data verification rules and the additional data in the data verification function to obtain a verification result. After the terminal device receives the first off-chain read request, it only needs to add the additional data in the first off-chain read request to the initial verification function without reservation and without modification. That is, the terminal device is opaque to the additional data, that is, the terminal device does not need to perceive the verification details of the transaction data packet by the node device; in other words, there is no need to modify the data processing application in the terminal device to adapt to the off-chain data verification process, thereby reducing development costs.

[0100] S105. If the verification result indicates that the transaction data packet is valid, the target transaction data returned by the node device is received; the target transaction data returned by the node device is obtained by parsing the transaction data packet by the node device.

[0101] In the present application, when the verification result indicates that the transaction data packet is valid, the node device can send the target transaction data to the terminal device; when the verification result indicates that the target transaction data is not valid, the node device can return a read failure message to the terminal device, and the read failure message is used to indicate that the target transaction data is not valid. When verifying that the transaction data packet is valid, the node device can parse the transaction data packet, obtain the target transaction data, and then return the target transaction data to the terminal device. Among them, if the transaction data packet directly contains the target transaction data, then the target transaction data packet can be obtained by decapsulating the transaction data packet; if the transaction data packet contains the encoded data corresponding to the target transaction data, then after decapsulating the transaction data packet, the encoded data needs to be decoded to obtain the target transaction data. This can avoid sending invalid transaction data to the terminal device, avoid wasting resources, and improve the off-chain reading security of transaction data.

[0102] In this application, the node devices in the blockchain network pre-generate a set of universal cross-chain communication protocols. The cross-chain communication protocol is used to indicate how to securely read off-chain data through the blockchain network. For example, the cross-chain communication protocol includes a business function for issuing off-chain read requests and a data verification function for verifying off-chain data. Through this cross-chain communication protocol, secure reading of off-chain data can be achieved to ensure the security of the read transaction data and achieve interoperability between the chain and the off-chain. Specifically, when a terminal device needs to read target transaction data, the terminal device can send an original read request for the target transaction data to the node device in the blockchain network. The original read request carries transaction attribute information of the target transaction data. After receiving the original read request, the node device can determine whether the target transaction data belongs to the off-chain data of the blockchain network by calling the business function in the cross-chain communication protocol. If it is determined that the target transaction data belongs to the off-chain data of the blockchain network, the device attribute information of the target network device used to read the off-chain data of the blockchain network can be queried from the above-mentioned cross-chain communication protocol. Furthermore, the node device generates a first off-chain read request based on the device attribute information and the transaction attribute information, and sends the first off-chain read request to the terminal device. The first off-chain read request is used to instruct the target network device to return a transaction data packet to the terminal device. After receiving the first off-chain read request, the terminal device reads the transaction data packet from the target network device and forwards the transaction data packet to the node device. The node device calls the data verification function to verify the validity of the transaction data packet. When the transaction data packet is valid, the transaction data packet can be parsed to obtain the target transaction data, and the parsed target transaction data is sent to the terminal device. In this way, off-chain data can be securely read on the chain, and the validity of the off-chain data (i.e., the target transaction data) can be ensured. At the same time, by reading off-chain data through a set of universal cross-chain communication protocols, there is no need to store data for verification separately on the chain for each transaction data, nor is there a need for the terminal device to perceive the interaction details of storing the transaction data in an external device, and no additional credit assumptions are required. This improves the scope of application of this application and enables universal reading of off-chain data. In addition, the target transaction data is read by the target network device from the external device associated with the blockchain network, and the validity of the target transaction data can be ensured, so the target transaction data is provided with the possibility of off-chain storage, which can reduce the data storage pressure of the blockchain network and reduce the data storage cost.

[0103] Further, please refer to Figure 6, which is a flowchart of a blockchain-based data processing method provided by an embodiment of the present application. As shown in Figure 6, the method can be executed by any node device in Figure 1. Among them, the blockchain-based data processing method can include the following steps S201 to S205:

[0104] S201. Receive an original read request for target transaction data sent by a terminal device; the original read request carries transaction attribute information of the target transaction data.

[0105] In this application, a node device in a blockchain network can receive an original read request for the target transaction data sent by a terminal device. The original read request carries the transaction attribute information of the target transaction data. After receiving the original read request, the node device can call the cross-chain communication protocol (also known as a smart contract) in the blockchain network, and then further call the business function in the cross-chain communication protocol. The business function can verify whether the target transaction data belongs to the off-chain data of the blockchain network. When the target transaction data belongs to the off-chain data of the blockchain network, step S202 is executed; when the target transaction data belongs to the on-chain data of the blockchain network, the node device can read the target transaction data from the blockchain in the blockchain network, return the target transaction data to the terminal device, and end this process. Among them, the implementation process of verifying whether the target transaction data belongs to the on-chain data in the blockchain network can refer to step S31 in Figure 3.

[0106] S202. Call a business function in the cross-chain communication protocol according to the original read request. If the business function indicates that the target transaction data belongs to the off-chain data of the blockchain network, query the cross-chain communication protocol of the blockchain network for device attribute information of the target network device used to read the off-chain data of the blockchain network.

[0107] In this application, the node device can call the business function in the cross-chain communication protocol according to the original read request, wherein the cross-chain communication protocol records the device attribute information of the target network device used to read the off-chain data of the blockchain network. Therefore, if the target transaction data belongs to the off-chain data of the blockchain network, the device attribute information of the target network device used to read the off-chain data of the blockchain network can be queried from the cross-chain communication protocol in the blockchain network.

[0108] Optionally, when there are multiple network devices used to read off-chain data, the node device may query the cross-chain communication protocol of the blockchain network for device attribute information corresponding to N candidate network devices for reading off-chain data of the blockchain network; the N candidate network devices include the target network device, and N is an integer greater than 1. A candidate network device refers to a network device used to read off-chain data in the blockchain network. The N candidate network devices may be distributed in different regions and may belong to the same organization or different organizations.

[0109] S203. Based on the above-mentioned transaction attribute information and the above-mentioned device attribute information, a first off-chain read request is generated in the business function, and the above-mentioned first off-chain read request is sent to the above-mentioned terminal device. The above-mentioned terminal device is used to read the transaction data packet from the above-mentioned target network device according to the above-mentioned first off-chain read request. The above-mentioned transaction data packet is read by the above-mentioned target network device from an external device associated with the node device in the above-mentioned blockchain network.

[0110] In this application, the node device can generate a first off-chain read request based on the transaction attribute information and the device attribute information, call the service function in the cross-chain communication protocol, and send the first off-chain read request to the terminal device. After receiving the first off-chain read request, the terminal device can read the transaction data packet from the target network device according to the first off-chain read request. The transaction data packet may include signature information of the organization to which the target network device belongs. The transaction data packet may be read by the network device from an external device associated with the blockchain network.

[0111] Optionally, when there are multiple network devices used to read off-chain data, the node device may generate a first off-chain read request based on the transaction attribute information and the device attribute information corresponding to each of the N candidate network devices. By sending the device attribute information corresponding to each of the N candidate network devices to the terminal device, the terminal device can autonomously select an appropriate target network device to read the transaction data packet, thereby improving the success rate of reading the transaction data packet.

[0112] Optionally, the specific process of generating the first off-chain read request based on the transaction attribute information and the device attribute information corresponding to the N candidate network devices can be as follows: the node device can obtain the credibility corresponding to the N candidate network devices from the device attribute information of the N candidate network devices, and sort the device attribute information corresponding to the N candidate network devices in descending order of credibility. The device attribute information corresponding to the sorted N candidate network devices is added to the device list; and the first off-chain read request is generated based on the device list and the transaction attribute information. By sorting the device attribute information corresponding to the N candidate network devices, it is beneficial for the terminal device to give priority to network devices with high credibility as target network devices, thereby improving the success rate of reading transaction data packets and improving the efficiency of reading transaction data packets.

[0113] Optionally, the specific process of generating the first off-chain read request based on the device list and transaction attribute information can be: obtaining the protocol address (i.e., contract address) of the cross-chain communication protocol based on the protocol identifier of the cross-chain communication protocol in the transaction attribute information, generating callback data based on the content requested by the original read request, specifically determining the off-chain read method that the target network device should adopt based on the content requested by the original read request (such as the target transaction data) (the off-chain read method is used to instruct the target network device to read the transaction data packet), and then encoding the off-chain read method to obtain the callback data. After the target network device obtains the callback data, it can decode the callback data to obtain the off-chain read method. In the business function, the first off-chain read request is generated based on the protocol address, device list, function identifier of the data verification function, additional data, and callback data; the protocol address, device list, and callback data in the first off-chain read request are used to instruct the terminal device to obtain the transaction data packet through the target network device; the function identifier and additional data in the first off-chain read request are used to instruct the terminal device to request to call the data verification function, with the transaction data packet and additional data serving as parameters in the data verification function, and the data verification function is used to verify the validity of the transaction data packet using the additional data.

[0114] It should be noted that the first off-chain read request may refer to an error response message returned by the node device to the terminal device in response to the original read request (the error response message is used to indicate that the requested target transaction data belongs to off-chain data, that is, the target transaction data cannot be directly queried in the blockchain network, so an error response message is returned). The content contained in the error response message is shown in Table 5 below. The error OffchainLookup in Table 5 represents the error response message, which can also be called the error query method. The error response message includes the following content: 1. Sender field sender: indicates the protocol address of the cross-chain communication protocol that triggers the sending of the error response message; 2. URLs: can also be called a device list, which includes a request generation template for N candidate network devices for reading off-chain data of the blockchain network, also called a URL template. The URL template can contain two replacement parameters, {sender} and {data}. After receiving the error response message, the terminal device can replace {sender} in the URL template with the value of the sender parameter (protocol address), encoded in hexadecimal format with a lowercase 0x prefix; and replace {data} with the value of the callData parameter (i.e., callback data), encoded in hexadecimal format with a 0x prefix. The replaced URL template is called the second off-chain read request. Specifically, the URL template can contain only {sender} without {data}. 3. callData (callback data): Used to indicate the off-chain read method used by the target network device to read the transaction data packet. The callback data can specifically be the encoded value of the off-chain read method. This callback data can be opaque to the terminal device (i.e., the terminal device does not need to understand the meaning of the encoded value). The node device and the target network device can standardize it as needed, as long as both parties can correctly encode and decode the off-chain read method. 4. callbackFunction: Specifies the callback method, also known as the initial verification function. 5. extraData: Additional data required by the initial verification function. The terminal device retains and provides it to the initial verification function without modification. This value is opaque to the client. The initial verification function is used to decode and verify the data returned by the target network device (such as the target transaction data in the transaction data packet). The initial verification function has parameters (bytes response, bytes extraData), where response is the response field and extraData is the additional data field. When the terminal device receives the transaction data packet, the transaction data packet can be used as the field value of the response field, and the additional data in the first off-chain read request can be used as the field value of extraData.

[0115] Table 5

[0116] S204. Receive the transaction data packet sent by the terminal device, verify the validity of the transaction data packet according to the data verification function associated with the cross-chain communication protocol, and obtain a verification result.

[0117] In the present application, after the terminal device obtains the transaction data packet, it can forward the transaction data packet to the node device. The node device can call the data verification function in the cross-chain communication protocol, and verify the validity of the target transaction data in the transaction data packet through the data verification function to obtain a verification result. The data verification function can be obtained by the terminal device adding the public key of the organization to which the target network device belongs and the transaction data packet to the initial verification function (the data verification function obtained by the terminal device is actually the function identifier and parameters corresponding to the data verification function (the parameters include the public key and the transaction data packet), and the specific function code of the data verification function is stored in the node device). The data verification function is used to indicate how to verify the validity of the target transaction data in the transaction data packet, such as by verifying the signature information of the organization to which the target network device belongs to verify the validity of the target transaction data, or by verifying the data format or data volume of the target transaction data to verify the validity of the target transaction data. The verification result is used to indicate whether the transaction data packet is valid or not. The validity of the transaction data packet means that the target transaction data has not been tampered with or the target transaction data is returned by a legitimate target network device. The invalidity of the transaction data packet means that the target transaction data has been tampered with or the target transaction data is not returned by a legitimate target network device. After receiving the data verification function (actually receiving the function identifier and parameters corresponding to the data verification function), the node device can call the data verification function associated with the cross-chain communication protocol through the function identifier, and verify the target transaction data through the data verification function and the parameters. This helps to ensure the security of reading off-chain data.

[0118] Optionally, the first off-chain read request carries the initial verification function in the cross-chain communication protocol and additional data for verifying the target transaction data; step S204 includes: the node device can receive the data verification function sent by the terminal device, and the data verification function is obtained by the terminal device adding the transaction data packet and the additional data to the initial verification function. The node device can verify the target transaction data in the data verification function according to the additional data and data verification rules in the data verification function to obtain a verification result.

[0119] Optionally, the transaction data packet also includes signature information of the organization to which the target network device belongs; the data verification function includes data verification rules and the public key of the organization to which the target network device belongs, that is, the additional data includes the public key of the organization to which the target network device belongs, and the data verification rule is used to instruct the verification of the above-mentioned signature information; the above-mentioned verification of the validity of the above-mentioned target transaction data in the above-mentioned transaction data packet according to the data verification function associated with the above-mentioned cross-chain communication protocol, and the specific process of obtaining the verification result can be: the node device can perform a hash operation on the target transaction data in the transaction data packet to obtain a hash value of the transaction data packet. Then, based on the public key of the organization to which the target network device belongs, the signature information is verified to obtain verification data, that is, based on the public key of the organization to which the target network device belongs, the signature information is decrypted to obtain the verification data. If the similarity between the hash value of the transaction data packet and the verification data is less than or equal to the similarity threshold, it is determined that the hash value of the transaction data packet does not match the above-mentioned verification data, that is, the target transaction data is not returned by the target network device, or the target transaction data has been tampered with, and a verification result indicating that the above-mentioned target transaction data is invalid is generated. If the similarity between the hash value of the transaction data packet and the signature verification data is greater than the similarity threshold, it is determined that the hash value of the transaction data packet matches the above-mentioned signature verification data, that is, the target transaction data is returned by the target network device and the target transaction data has not been tampered with, then a verification result indicating that the above-mentioned transaction data packet is valid is generated.

[0120] Optionally, the data verification function includes data verification rules and a standard data format of the target transaction data, that is, the additional data includes the standard data format of the target transaction data, and the data verification rules are used to indicate verification of the data format of the target transaction data; the above-mentioned data verification function associated with the above-mentioned cross-chain communication protocol verifies the validity of the above-mentioned target transaction data in the above-mentioned transaction data packet, and the specific process of obtaining the verification result can be: if the data format of the target transaction data in the transaction data packet is not the standard data format, indicating that the returned target transaction data has been tampered with or the target transaction data has been read incorrectly, then a verification result indicating that the target transaction data is not valid is generated; if the data format of the target transaction data in the transaction data packet is the standard data format, indicating that the returned target transaction data has not been tampered with, and the target transaction data has been read correctly, then a verification result indicating that the transaction data packet is valid is generated.

[0121] Optionally, the data verification function includes data verification rules and the standard data volume of the target transaction data, that is, the standard data volume of the target transaction data is included in the additional data, and the data verification rules are used to indicate the verification of the data volume of the target transaction data; the above-mentioned data verification function associated with the above-mentioned cross-chain communication protocol verifies the validity of the above-mentioned target transaction data in the above-mentioned transaction data packet, and the specific process of obtaining the verification result can be: if the difference between the data volume of the target transaction data in the transaction data packet and the standard data volume is greater than the difference threshold, indicating that the returned target transaction data has been tampered with (or part of the data is missing) or the target transaction data is read incorrectly, then a verification result indicating that the transaction data packet is not valid is generated; if the difference between the data volume of the target transaction data in the transaction data packet and the standard data volume is less than or equal to the difference threshold, indicating that the returned target transaction data has not been tampered with, and the target transaction data is read correctly, then a verification result indicating that the transaction data packet is valid is generated.

[0122] S205: If the verification result indicates that the transaction data packet is valid, the transaction data packet is parsed to obtain target transaction data, and the parsed target transaction data is returned to the terminal device.

[0123] In this application, if the above verification result indicates that the above transaction data packet is valid, the node device can parse the transaction data packet. If the transaction data packet carries the target transaction data, the node device can obtain the target transaction data after decapsulating the transaction data packet, and return the target transaction data in the above transaction data packet to the above terminal device. If the transaction data packet carries the encoded data after encoding the target transaction data, the node device needs to continue to decode the encoded data to obtain the target transaction data after decapsulating the transaction data packet to obtain the encoded data, and return the target transaction data in the above transaction data packet to the above terminal device. This can avoid sending invalid transaction data to the terminal device, avoid wasting resources, and improve the off-chain reading security of transaction data.

[0124] It should be noted that the above-mentioned blockchain networks and associated blockchain networks may refer to blockchain networks that meet the access conditions of the cross-chain communication protocol. The access conditions may include that the blockchain network is legal (such as the node devices in the blockchain network belong to legal individuals or legal institutions), the stability of the blockchain network (such as network stability, storage stability) is greater than the stability threshold, the security level of the blockchain network is greater than the security level threshold, etc.

[0125] For example, as shown in Table 6, the example of a terminal device needing to query the balance of the addr address is used for explanation. That is, the target transaction data that needs to be read is the balance of the addr address. The business function in the cross-chain communication protocol (i.e., smart contract) in this application is a function function for querying the balance of the account address. The business function can be expressed as: function balanceOf(address addr) public view returns(uint balance). This business function is used to instruct the node device to return the balance of the addr address when verifying the validity of the queried balance based on the data verification function. The data verification function can be expressed as: function balanceOfWithProof(bytes calldata response, bytes calldata extraData) public view returns(uint balance), which can also be called a balance verification function. In Table 6, OffchainLookup may refer to the first off-chain read request returned by the business function (also referred to as an error response message, i.e., the business function detects that the balance of the addr address belongs to off-chain data, so the business function returns the error response message, which is used to instruct the terminal device to obtain the transaction data packet containing the balance of the addr address from the target network device). The data included in OffchainLookup can be described in detail in conjunction with Figure 7 below.

[0126] Table 6

[0127] Specifically, as shown in FIG7 , the process of querying the user's balance through the above-mentioned business function includes the following steps S70 to S74:

[0128] S70, the terminal device sends an original read request to the node device; when the user corresponding to the terminal device (Xiao Li) needs to query the balance, that is, the balance can be called the target transaction data, the terminal device can display a balance query page 70a on the data processing application (such as a payment application), and the balance query page 70a includes the user information of the user corresponding to the terminal device (such as name, nickname, account address) and the query control 71b. The terminal device responds to the trigger operation for the query control 71b, generates a query request about the user's balance, and uses the query request as an original read request to send the original read request to the node device. The original query request carries the account address of the user corresponding to the terminal device, which can be called an addr address. The original query request can also carry the protocol address of the cross-chain communication protocol and the function identifier of the business function. Then, when the node device receives the original query request, it can call the cross-chain communication protocol based on the protocol address, and then call the business function in the cross-chain communication protocol based on the function identifier.

[0129] S71. The node device sends a first off-chain read request to the terminal device. After receiving the original read request, the node device may call function balanceOf(address addr) public view returns(uint balance) to verify whether the balance is stored off-chain in the blockchain. If it is determined that the balance is stored off-chain in the blockchain, that is, the balance belongs to off-chain data of the blockchain network, the node device may return a first off-chain read request to the terminal device. The first off-chain read request may be the OffchainLookup shown in Table 6. As shown in Table 6, the first off-chain read request carries the protocol address (the field value of the sender field), a URL template, callback data (callDate), an initial verification function, and additional data (extraData). The initial verification function is the field value of the callback function field callbackFunction. The initial verification function is a function that verifies the validity of the balance, which may also be called balanceOfWithProof. The additional data includes the addr address of the user corresponding to the terminal device.

[0130] S72. The terminal device adds the protocol address and callback data to the URL template to obtain a second off-chain read request, and sends the second off-chain read request to the target network device. After receiving the first off-chain read request, the terminal device may select a candidate network device from the urls as the target network device, replace the sender field in the URL template corresponding to the target network device with the protocol address, and replace the data field in the URL template corresponding to the target network device with callData to obtain the second off-chain read request, and send the second off-chain read request to the target network device.

[0131] S73. The target network device returns a transaction data packet (balance with signature information) to the terminal device. After receiving the second off-chain read request, the target network device can obtain the balance with signature information of the addr address (also called a transaction data packet) and return the balance with signature information to the terminal device.

[0132] S74. The terminal device can add the transaction data packet and additional data to the initial verification function to obtain a data verification function, which it then sends to the node device. The terminal device can add the signed balance and extraData to the initial verification function to obtain a balance verification function (i.e., a data verification function). The balance verification function is then sent to the node device. The node device executes the balance verification function to decode and verify the signed balance and extraData. Upon successful verification, the balance is returned to the terminal device. The terminal device can display the balance returned by the node device (i.e., the target transaction data) on the query result interface 72a, e.g., if the balance is 123.

[0133] It should be noted that the balance with signature information here can refer to the signature of the organization to which the target network device belongs. The node device can query the public key of the organization to which the target network device belongs from the blockchain based on the addr address and verify the signature based on the public key. If the signature verification passes, the balance verification is determined to be passed. Alternatively, the signature information can refer to the signature of the user corresponding to the terminal device. The addr address can refer to the user's public key. The node device can verify the signature based on the user's public key. If the signature verification passes, the balance verification is determined to be passed. For the specific verification process, please refer to the above step S204.

[0134] In this application, the node devices in the blockchain network pre-generate a set of universal cross-chain communication protocols. The cross-chain communication protocol is used to indicate how to securely read off-chain data through the blockchain network. For example, the cross-chain communication protocol includes a business function for issuing off-chain read requests and a data verification function for verifying off-chain data. Through this cross-chain communication protocol, secure reading of off-chain data can be achieved to ensure the security of the read transaction data and achieve interoperability between the chain and the off-chain. Specifically, when a terminal device needs to read target transaction data, the terminal device can send an original read request for the target transaction data to the node device in the blockchain network. The original read request carries transaction attribute information of the target transaction data. After receiving the original read request, the node device can determine whether the target transaction data belongs to the off-chain data of the blockchain network by calling the business function in the cross-chain communication protocol. If it is determined that the target transaction data belongs to the off-chain data of the blockchain network, the device attribute information of the target network device used to read the off-chain data of the blockchain network can be queried from the above-mentioned cross-chain communication protocol. Furthermore, the node device generates a first off-chain read request based on the device attribute information and the transaction attribute information, and sends the first off-chain read request to the terminal device. The first off-chain read request is used to instruct the target network device to return a transaction data packet to the terminal device. After receiving the first off-chain read request, the terminal device reads the transaction data packet from the target network device and forwards the transaction data packet to the node device. The node device calls the data verification function to verify the validity of the transaction data packet. When the transaction data packet is valid, the transaction data packet can be parsed to obtain the target transaction data, and the parsed target transaction data is sent to the terminal device. In this way, off-chain data can be securely read on the chain, and the validity of the off-chain data (i.e., the target transaction data) can be ensured. At the same time, by reading off-chain data through a set of universal cross-chain communication protocols, there is no need to store data for verification separately on the chain for each transaction data, nor is there a need for the terminal device to perceive the interaction details of storing the transaction data in an external device, and no additional credit assumptions are required. This improves the scope of application of this application and enables universal reading of off-chain data. In addition, the target transaction data is read by the target network device from the external device associated with the blockchain network, and the validity of the target transaction data can be ensured, so the target transaction data is provided with the possibility of off-chain storage, which can reduce the data storage pressure of the blockchain network and reduce the data storage cost.

[0135] Please refer to Figure 8, which is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The above-mentioned blockchain-based data processing device can be a computer program (including program code) running on a terminal device. For example, the blockchain-based data processing device is an application software; the device can be used to execute the corresponding steps of the method provided in the embodiment of the present application. As shown in Figure 8, the blockchain-based data processing device may include:

[0136] A sending module 810 is configured to send an original read request regarding target transaction data to a node device in the blockchain network, so that the node device calls a service function in the cross-chain communication protocol according to the original read request; the original read request carries transaction attribute information of the target transaction data;

[0137] A first receiving module 811 is configured to receive a first off-chain read request sent by a node device. The first off-chain read request is generated by the node device through a business function. The first off-chain read request is generated based on transaction attribute information and device attribute information of a target network device. The device attribute information is obtained by querying the cross-chain communication protocol when the node device determines through the business function that the target transaction data belongs to off-chain data of the blockchain network. The target network device is a device used to read off-chain data of the blockchain network.

[0138] A reading module 812 is configured to read a transaction data packet from the target network device according to the first off-chain read request; the transaction data packet is read by the target network device from an external device associated with the blockchain network;

[0139] Forwarding module 813, configured to forward the transaction data packet to the node device, which verifies the validity of the transaction data packet based on a data verification function associated with the cross-chain communication protocol and obtains a verification result;

[0140] The second receiving module 814 is configured to receive target transaction data returned by the node device if the verification result indicates that the transaction data packet is valid; the target transaction data returned by the node device is obtained by parsing the transaction data packet by the node device.

[0141] Optionally, the reading module 812 may include a generating unit 81a, a first sending unit 82a, and a receiving unit 83a;

[0142] A generating unit 81a is configured to generate a second off-link read request adapted to the target network device according to the first off-link read request;

[0143] The first sending unit 82a is configured to send the second off-link read request to the target network device; the target network device is configured to generate a request response message according to the second off-link read request;

[0144] The receiving unit 83a is configured to receive the request response message returned by the target network device, and if the request response message is a successful response message, obtain the transaction data packet from the request response message.

[0145] Optionally, the first off-chain read request includes a protocol address of a cross-chain communication protocol, a request generation template in the cross-chain communication protocol, and callback data, where the request generation template is adapted to the target network device; the protocol address and callback data are used together to instruct the target network device to read target transaction data from an external device;

[0146] Optionally, the generation unit 81a is specifically used to replace the sender field with the protocol address in the request generation template and replace the data field with callback data if the request generation template includes a data field and a sender field, to obtain an acquisition request for the target transaction data, and to determine the above acquisition request as a second off-chain read request adapted to the above target network device.

[0147] Alternatively, the generation unit 81a is specifically configured to add content type information for declaring the format of the request body to the request header if the request generation template includes a sender field but does not include a data field; add a data field and a sender field to the initial request body, use the callback data as the field value of the data field in the initial request body, and use the protocol address as the field value of the sender field in the initial request body to obtain the request body; replace the sender field with the protocol address in the request generation template, generate a processing request for the target transaction data based on the replaced request generation template, request header, and request body, and determine the processing request as a second off-chain read request adapted to the target network device.

[0148] Optionally, the first off-chain read request includes request generation templates corresponding to N candidate network devices, respectively. The request generation templates corresponding to the N candidate network devices are arranged in the device list of the first off-chain read request in descending order of the credibility of the corresponding candidate network devices, where N is an integer greater than 1.

[0149] The generation unit 81a is further used to obtain the arrangement sequence numbers of the N request generation templates in the first off-chain reading request, obtain the candidate network device i corresponding to the request generation template with the smallest arrangement sequence number, and determine the candidate network device i as the target network device for reading the off-chain data of the blockchain network.

[0150] Optionally, the sending module 810 is further used to suspend sending the second off-chain read request to the remaining network devices if the request response message is a response failure message and the status value carried by the request response message is within the first threshold range; the remaining network devices are network devices other than candidate network device i among the N candidate network devices; if the request response message is a response failure message and the status value carried by the request response message is within the second threshold range, then according to the arrangement sequence of the remaining network devices, the target network device for reading the off-chain data of the blockchain network is re-determined from the remaining network devices, and the second off-chain read request is re-sent to the determined target network device.

[0151] Optionally, the sending module 810 is further used to count the number of times the above-mentioned second off-chain read request is sent; if the above-mentioned number of transmissions is greater than the number threshold, and the request response message returned by the above-mentioned target network device is a response failure message, then the execution of the above-mentioned step of re-determining the target network device for reading the off-chain data of the above-mentioned blockchain network from the above-mentioned remaining network devices according to the arrangement sequence number of the above-mentioned remaining network devices is suspended.

[0152] Optionally, the first off-chain read request includes the initial verification function in the cross-chain communication protocol and additional data for verifying the transaction data packet; the sending module 810 may include an adding unit 84b and a second sending unit 85b;

[0153] An adding unit 84b is configured to add the transaction data packet and the additional data to the initial verification function to obtain a data verification function associated with the cross-chain communication protocol;

[0154] The second sending unit 85b is used to send the above-mentioned data verification function to the above-mentioned node device; the above-mentioned node device is also used to verify the validity of the above-mentioned target transaction data contained in the above-mentioned transaction data packet in the above-mentioned data verification function based on the data verification rules and the above-mentioned additional data in the above-mentioned data verification function to obtain a verification result.

[0155] In this application, the node devices in the blockchain network pre-generate a set of universal cross-chain communication protocols, which are used to indicate how to securely read off-chain data through the blockchain network. For example, the cross-chain communication protocol includes a business function for issuing a first off-chain read request, and a data verification function for verifying off-chain data, etc. Through this cross-chain communication protocol, secure reading of off-chain data can be achieved to ensure the security of the read transaction data and to achieve interoperability between on-chain and off-chain.

[0156] Please refer to Figure 9, which is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The above-mentioned blockchain-based data processing device can be a computer program (including program code) running on a network device. For example, the blockchain-based data processing device is an application software; the device can be used to execute the corresponding steps of the method provided in the embodiment of the present application. As shown in Figure 9, the blockchain-based data processing device may include:

[0157] The first receiving module 910 is configured to receive an original read request for target transaction data sent by a terminal device; the original read request carries transaction attribute information of the target transaction data;

[0158] Query module 911 is configured to call a service function in the cross-chain communication protocol according to the original read request. If the service function indicates that the target transaction data belongs to off-chain data of the blockchain network, query the cross-chain communication protocol of the blockchain network for device attribute information of the target network device used to read the off-chain data of the blockchain network.

[0159] A generation module 912 is configured to generate a first off-chain read request in a business function based on the transaction attribute information and the device attribute information, and send the first off-chain read request to a terminal device. The terminal device is configured to read a transaction data packet from the target network device based on the first off-chain read request. The transaction data packet is read by the target network device from an external device associated with a node device in the blockchain network.

[0160] The second receiving module 913 is configured to receive the transaction data packet sent by the terminal device, verify the validity of the transaction data packet according to the data verification function associated with the cross-chain communication protocol, and obtain a verification result;

[0161] The sending module 914 is configured to parse the transaction data packet to obtain target transaction data if the verification result indicates that the transaction data packet is valid, and return the parsed target transaction data to the terminal device.

[0162] Optionally, the transaction data packet further includes signature information of the organization to which the target network device belongs; the data verification function includes data verification rules and a public key of the organization to which the target network device belongs, and the data verification rules are used to instruct verification of the signature information;

[0163] The second receiving module 913 may include an operation unit 91a, a processing unit 92a and a first generating unit 93a;

[0164] The computing unit 91a is configured to perform a hash operation on the target transaction data in the transaction data packet to obtain a hash value of the transaction data packet;

[0165] Processing unit 92a is used to verify the signature information according to the public key of the organization to which the target network device belongs, and obtain signature verification data;

[0166] The first generating unit 93a is configured to generate a verification result indicating that the transaction data packet is valid if the hash value of the transaction data packet matches the signature verification data.

[0167] Optionally, the query module 911 is specifically configured to query, from the cross-chain communication protocol of the blockchain network, device attribute information corresponding to N candidate network devices of the off-chain data of the blockchain network; the N candidate network devices include the target network device, where N is an integer greater than 1;

[0168] The generation module 912 is specifically used to generate a first off-chain read request in the business function based on the transaction attribute information and the device attribute information corresponding to the N candidate network devices.

[0169] The generation module 912 may include an acquisition unit 94b, a sorting unit 95b, and a second generation unit 96b;

[0170] An acquiring unit 94b is configured to acquire the credibility corresponding to each of the N candidate network devices from the device attribute information of the N candidate network devices;

[0171] The sorting unit 95b is configured to sort the request generation templates corresponding to the N candidate network devices in descending order of their respective credibility;

[0172] The second generation unit 96b is used to add the request generation templates corresponding to the sorted N candidate network devices to the device list; and generate a first off-chain read request in the business function based on the device list and transaction attribute information.

[0173] Optionally, the second generation unit 96b is specifically used to obtain the protocol address of the cross-chain communication protocol according to the protocol identifier of the cross-chain communication protocol in the transaction attribute information; generate callback data according to the content requested by the original read request; in the business function, generate a first off-chain read request according to the protocol address, device list, function identifier of the data verification function, additional data and callback data; the protocol address, device list and callback data in the first off-chain read request are used to instruct the terminal device to obtain the transaction data packet through the target network device; the function identifier and additional data in the first off-chain read request are used to instruct the terminal device to request to call the data verification function, and the transaction data packet and additional data are used as parameters in the data verification function, and the data verification function is used to verify the validity of the transaction data packet through the additional data.

[0174] In this application, the node devices in the blockchain network pre-generate a set of universal cross-chain communication protocols. The cross-chain communication protocol is used to indicate how to securely read off-chain data through the blockchain network. For example, the cross-chain communication protocol includes a business function for issuing off-chain read requests and a data verification function for verifying off-chain data. Through this cross-chain communication protocol, secure reading of off-chain data can be achieved to ensure the security of the read transaction data and achieve interoperability between the chain and the off-chain. Specifically, when a terminal device needs to read target transaction data, the terminal device can send an original read request for the target transaction data to the node device in the blockchain network. The original read request carries transaction attribute information of the target transaction data. After receiving the original read request, the node device can determine whether the target transaction data belongs to the off-chain data of the blockchain network by calling the business function in the cross-chain communication protocol. If it is determined that the target transaction data belongs to the off-chain data of the blockchain network, the device attribute information of the target network device used to read the off-chain data of the blockchain network can be queried from the above-mentioned cross-chain communication protocol. Furthermore, the node device generates a first off-chain read request based on the device attribute information and the transaction attribute information, and sends the first off-chain read request to the terminal device. The first off-chain read request is used to instruct the target network device to return a transaction data packet to the terminal device. After receiving the first off-chain read request, the terminal device reads the transaction data packet from the target network device and forwards the transaction data packet to the node device. The node device calls the data verification function to verify the validity of the transaction data packet. When the transaction data packet is valid, the transaction data packet can be parsed to obtain the target transaction data, and the parsed target transaction data is sent to the terminal device. In this way, off-chain data can be securely read on the chain, and the validity of the off-chain data (i.e., the target transaction data) can be ensured. At the same time, by reading off-chain data through a set of universal cross-chain communication protocols, there is no need to store data for verification separately on the chain for each transaction data, nor is there a need for the terminal device to perceive the interaction details of storing the transaction data in an external device, and no additional credit assumptions are required. This improves the scope of application of this application and enables universal reading of off-chain data. In addition, the target transaction data is read by the target network device from the external device associated with the blockchain network, and the validity of the target transaction data can be ensured, so the target transaction data is provided with the possibility of off-chain storage, which can reduce the data storage pressure of the blockchain network and reduce the data storage cost.

[0175] Please refer to Figure 10, which is a structural diagram of a computer device provided in an embodiment of the present application. As shown in Figure 10, the above-mentioned computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may also be at least one storage device away from the aforementioned processor 1001. As shown in Figure 10, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module and a device control application.

[0176] In the computer device 1000 shown in FIG10 , the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0177] Sending an original read request for target transaction data to a node device in the blockchain network, so that the node device calls a business function in the cross-chain communication protocol according to the original read request; the original read request carries transaction attribute information of the target transaction data;

[0178] Receiving a first off-chain read request sent by a node device; the first off-chain read request is generated by the node device through a business function; the first off-chain read request is generated based on transaction attribute information and device attribute information of a target network device, the device attribute information being obtained by querying the cross-chain communication protocol when the node device determines through the business function that the target transaction data belongs to off-chain data of the blockchain network; the target network device is a device used to read off-chain data of the blockchain network;

[0179] Reading a transaction data packet from a target network device according to the first off-chain read request; the transaction data packet is read by the target network device from an external device associated with the blockchain network;

[0180] The transaction data packet is forwarded to the node device, which verifies the validity of the transaction data packet based on the data verification function associated with the cross-chain communication protocol and obtains the verification result;

[0181] If the verification result indicates that the transaction data packet is valid, the target transaction data returned by the receiving node device is received; the target transaction data returned by the node device is obtained by parsing the transaction data packet by the node device.

[0182] It should be noted that the collection and processing of relevant data in the application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject. For example, before obtaining or using the transaction attribute information of the target transaction data or the device attribute information of the device (such as terminal devices, node devices, network devices), separate authorization is required from the user to whom the target transaction data belongs and the user to whom the device belongs.

[0183] It should be understood that the computer device 1000 described in the embodiments of the present application can execute the description of the blockchain-based data processing method in the corresponding embodiments above, and can also execute the description of the blockchain-based data processing device in the corresponding embodiments above, which will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated here.

[0184] In addition, it should be noted that the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the aforementioned blockchain-based data processing device, and the computer program includes program instructions. When the processor executes the program instructions, it can perform the description of the blockchain-based data processing method in the corresponding embodiment above. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0185] As an example, the above program instructions may be deployed on a computer device for execution, or deployed on at least two computer devices at one location for execution, or executed on at least two computer devices distributed at at least two locations and interconnected via a communication network. The at least two computer devices distributed at at least two locations and interconnected via a communication network may constitute a blockchain network.

[0186] The computer-readable storage medium can be the blockchain-based data processing device provided in any of the aforementioned embodiments, or the central storage unit of the computer device, such as the computer device's hard drive or memory. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, the computer-readable storage medium can include both the central storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or is about to be output.

[0187] The terms "first," "second," and the like in the description, claims, and drawings of the embodiments of the present application are used to distinguish between contents in different media, rather than to describe a specific order. In addition, the terms "including" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other steps and units inherent to these processes, methods, apparatuses, products, or devices.

[0188] The present application also provides a computer program product, including a computer program / instructions. When executed by a processor, the computer program / instructions implement the blockchain-based data processing method described in the corresponding embodiments above. Therefore, they will not be described in detail here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the embodiments of the computer program product involved in this application, please refer to the description of the method embodiments of this application.

[0189] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0190] The methods and related devices provided in the embodiments of the present application are described with reference to the method flow charts and / or structural diagrams provided in the embodiments of the present application. Specifically, each process and / or box in the method flow charts and / or structural diagrams, as well as the combination of processes and / or boxes in the flow charts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable network connection device to produce a machine, so that the instructions executed by the processor of the computer or other programmable network connection device generate a device for implementing the functions specified in one or more processes in the flow chart and / or one or more boxes in the structural diagram. These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable network connection device to operate in a specific manner, so that the instructions stored in the computer-readable memory generate an article of manufacture including an instruction device, which implements the functions specified in one or more processes in the flow chart and / or one or more boxes in the structural diagram. These computer program instructions can also be loaded onto a computer or other programmable network-connected device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the structural diagram.

[0191] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method based on blockchain, characterized in that: include: Sending an original read request for target transaction data to a node device in the blockchain network, so that the node device calls a business function in the cross-chain communication protocol according to the original read request; the original read request carries transaction attribute information of the target transaction data; receiving a first off-chain read request sent by the node device; the first off-chain read request is generated by the node device through the business function; The first off-chain read request is generated according to the transaction attribute information and device attribute information of the target network device, the device attribute information is obtained by querying the cross-chain communication protocol when the node device determines through the business function that the target transaction data belongs to the off-chain data of the blockchain network, and the target network device is a device for reading the off-chain data of the blockchain network; Reading a transaction data packet from the target network device according to the first off-chain read request; the transaction data packet is read by the target network device from an external device associated with the blockchain network; Forwarding the transaction data packet to the node device, the node device is used to verify the validity of the transaction data packet based on the data verification function associated with the cross-chain communication protocol to obtain a verification result; If the verification result indicates that the transaction data packet is valid, the target transaction data returned by the node device is received; the target transaction data returned by the node device is obtained by parsing the transaction data packet by the node device.

2. The method according to claim 1, characterized in that The step of reading a transaction data packet from the target network device according to the first off-chain read request includes: Generate a second off-link read request adapted to the target network device according to the first off-link read request; Sending the second off-chain read request to the target network device; the target network device is used to generate a request response message according to the second off-chain read request; The request response message returned by the target network device is received, and if the request response message is a successful response message, a transaction data packet is obtained from the request response message.

3. The method according to claim 2, characterized in that The first off-chain read request includes a protocol address of the cross-chain communication protocol, a request generation template in the cross-chain communication protocol, and callback data, wherein the request generation template is adapted to the target network device; the protocol address and the callback data are used together to instruct the target network device to read the target transaction data from the external device; The step of generating, according to the first off-link read request, a second off-link read request adapted to the target network device comprises: If the request generation template includes a data field and a sender field, the sender field is replaced by the protocol address in the request generation template, and the data field is replaced by the callback data to obtain an acquisition request for the target transaction data; The acquisition request is determined as a second off-link read request adapted to the target network device.

4. The method according to claim 2, characterized in that The first off-chain read request includes a protocol address of the cross-chain communication protocol, a request generation template in the cross-chain communication protocol, and callback data, wherein the request generation template is adapted to the target network device; the protocol address and the callback data are used together to instruct the target network device to read the target transaction data from the external device; The step of generating, according to the first off-link read request, a second off-link read request adapted to the target network device comprises: If the request generation template includes a sender field and does not include a data field, adding content type information for declaring the request body format to the request header; Adding a data field and the sender field to the initial request body, using the callback data as the field value of the data field in the initial request body, and using the protocol address as the field value of the sender field in the initial request body, to obtain a request body; The protocol address is used to replace the sender field in the request generation template, and a processing request for the target transaction data is generated according to the replaced request generation template, the request header and the request body, and the processing request is determined as a second off-chain read request adapted to the target network device.

5. The method according to claim 2, characterized in that The first off-chain read request includes request generation templates corresponding to N candidate network devices, respectively, and the request generation templates corresponding to the N candidate network devices are arranged in the first off-chain read request in descending order of credibility of the candidate network devices, where N is an integer greater than 1; the method further includes: Obtain N request generation templates, read the arrangement sequence numbers in the requests under the first chain respectively, and obtain the candidate network device i corresponding to the request generation template with the smallest arrangement sequence number; The candidate network device i is determined as a target network device for reading off-chain data of the blockchain network.

6. The method according to claim 5, characterized in that The method further comprises: If the request response message is a response failure message, and the status value carried by the request response message is within the first threshold range, suspending sending the second off-chain read request to the remaining network devices; the remaining network devices are network devices other than the candidate network device i among the N candidate network devices; If the request response message is a response failure message and the status value carried by the request response message is within the second threshold range, then according to the arrangement sequence of the remaining network devices, the target network device for reading the off-chain data of the blockchain network is re-determined from the remaining network devices, and the second off-chain read request is re-sent to the determined target network device.

7. The method according to claim 6, characterized in that The method further comprises: Counting the number of times the second off-chain read request is sent; If the number of transmissions is greater than the number threshold, and the request response message returned by the target network device is a response failure message, then the step of re-determining the target network device for reading the off-chain data of the blockchain network from the remaining network devices according to the arrangement sequence of the remaining network devices is suspended.

8. The method according to claim 1, characterized in that The first off-chain read request includes an initial verification function in the cross-chain communication protocol and additional data for verifying the transaction data packet; forwarding the transaction data packet to the node device includes: Add the transaction data packet and the additional data to the initial verification function to obtain a data verification function associated with the cross-chain communication protocol; The data verification function is sent to the node device; the node device is also used to verify the validity of the transaction data packet in the data verification function by executing the data verification function to obtain a verification result.

9. A data processing method based on blockchain, characterized in that: include: Receiving an original read request for target transaction data sent by a terminal device; The original read request carries transaction attribute information of the target transaction data; Calling a service function in the cross-chain communication protocol according to the original read request, and if the service function indicates that the target transaction data belongs to off-chain data of the blockchain network, querying the cross-chain communication protocol of the blockchain network for device attribute information of the target network device for reading the off-chain data of the blockchain network; According to the transaction attribute information and the device attribute information, a first off-chain read request is generated in the business function, Sending the first off-chain read request to the terminal device, the terminal device is used to read a transaction data packet from the target network device according to the first off-chain read request, the transaction data packet is read by the target network device from an external device associated with a node device in the blockchain network; Receive the transaction data packet sent by the terminal device, verify the validity of the transaction data packet according to the data verification function associated with the cross-chain communication protocol, and obtain a verification result; If the verification result indicates that the transaction data packet is valid, the transaction data packet is parsed to obtain the target transaction data, and the target transaction data obtained by parsing is returned to the terminal device.

10. The method according to claim 9, characterized in that The transaction data packet also includes signature information of the organization to which the target network device belongs; the data verification function includes a data verification rule and a public key of the organization to which the target network device belongs, and the data verification rule is used to instruct to verify the signature information; The validating the transaction data packet according to the data verification function associated with the cross-chain communication protocol to obtain the verification result includes: Performing a hash operation on the transaction data packet to obtain a hash value of the transaction data packet; Performing signature verification on the signature information according to the public key of the organization to which the target network device belongs to obtain signature verification data; If the hash value of the transaction data packet matches the signature verification data, a verification result indicating that the transaction data packet is valid is generated.

11. The method according to claim 9, characterized in that The querying, from the cross-chain communication protocol of the blockchain network, of the device attribute information of the target network device for reading the off-chain data of the blockchain network includes: Querying, from the cross-chain communication protocol of the blockchain network, device attribute information corresponding to N candidate network devices respectively for reading off-chain data of the blockchain network; the N candidate network devices include the target network device, and N is an integer greater than 1; Generating a first off-chain read request in the business function according to the transaction attribute information and the device attribute information includes: According to the transaction attribute information and the device attribute information respectively corresponding to the N candidate network devices, a first off-chain read request is generated in the business function.

12. The method according to claim 11, characterized in that Generating a first off-chain read request in the business function according to the transaction attribute information and the device attribute information respectively corresponding to the N candidate network devices includes: Obtaining, from the device attribute information of the N candidate network devices, the credibility corresponding to each of the N candidate network devices; Sorting the request generation templates corresponding to the N candidate network devices respectively in descending order of the credibility respectively corresponding to the N candidate network devices; Add the request generation templates corresponding to the sorted N candidate network devices to the device list; According to the device list and the transaction attribute information, a first off-chain read request is generated in the business function.

13. The method according to claim 12, characterized in that Generating a first off-chain read request in the business function according to the device list and the transaction attribute information includes: According to the protocol identifier of the cross-chain communication protocol in the transaction attribute information, obtaining the protocol address of the cross-chain communication protocol; Generate callback data according to the content requested by the original read request; In the business function, a first off-chain read request is generated according to the protocol address, the device list, the function identifier of the data verification function, the additional data and the callback data; the protocol address, the device list and the callback data in the first off-chain read request are used to instruct the terminal device to obtain the transaction data packet through the target network device; the function identifier and the additional data in the first off-chain read request are used to instruct the terminal device to request to call the data verification function, the transaction data packet and the additional data are used as parameters in the data verification function, and the data verification function is used to verify the validity of the transaction data packet through the additional data.

14. A data processing device based on blockchain, characterized in that: include: A sending module, configured to send an original read request about target transaction data to a node device in a blockchain network, so that the node device calls a business function in a cross-chain communication protocol according to the original read request; the original read request carries transaction attribute information of the target transaction data; A first receiving module, configured to receive a first off-chain read request sent by the node device; the first off-chain read request is generated by the node device through the business function; The first off-chain read request is generated according to the transaction attribute information and device attribute information of the target network device, the device attribute information is obtained by querying the cross-chain communication protocol when the node device determines through the business function that the target transaction data belongs to the off-chain data of the blockchain network, and the target network device is a device for reading the off-chain data of the blockchain network; A reading module, configured to read a transaction data packet from the target network device according to the first off-chain reading request; the transaction data packet is read by the target network device from an external device associated with the blockchain network; A forwarding module, used to forward the transaction data packet to the node device, and the node device is used to verify the validity of the transaction data packet based on the data verification function associated with the cross-chain communication protocol to obtain a verification result; The second receiving module is used to receive the target transaction data returned by the node device if the verification result indicates that the transaction data packet is valid; the target transaction data returned by the node device is obtained by parsing the transaction data packet by the node device.

15. A data processing device based on blockchain, characterized in that: include: A first receiving module, configured to receive an original read request for target transaction data sent by a terminal device; The original read request carries transaction attribute information of the target transaction data; A query module, configured to call a service function in the cross-chain communication protocol according to the original read request, and if the service function indicates that the target transaction data belongs to off-chain data of the blockchain network, query the cross-chain communication protocol of the blockchain network for device attribute information of the target network device for reading the off-chain data of the blockchain network; A generating module, configured to generate a first off-chain read request in the business function according to the transaction attribute information and the device attribute information, and send the first off-chain read request to the terminal device, wherein the terminal device is configured to read a transaction data packet from the target network device according to the first off-chain read request, wherein the transaction data packet is read by the target network device from an external device associated with a node device in the blockchain network; A second receiving module is used to receive the transaction data packet sent by the terminal device, verify the validity of the transaction data packet according to the data verification function associated with the cross-chain communication protocol, and obtain a verification result; The sending module is used to parse the transaction data packet to obtain the target transaction data if the verification result indicates that the transaction data packet is valid, and return the target transaction data obtained by parsing to the terminal device.

16. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Cross-blockchain communication method and device, cross-chain service system and cross-chain transaction system

    CN111181968A

  • Cross-block-chain data migration method, device and equipment and storage medium

    CN111309711A

  • Cross-chain interaction method and device, electronic equipment and storage medium

    CN116032924A

  • Data processing method and device based on block chain network, and related equipment

    CN116137627A

  • Blockchain implementing cross-chain transactions

    WO2019211225A1

Cited By

  • Data product right confirmation management method based on block chain evidence storage

    CN120833166A