CN112948433B - Cross-blockchain query method, device, system, equipment and medium - Google Patents
Cross-blockchain query method, device, system, equipment and medium Download PDFInfo
- Publication number
- CN112948433B CN112948433B CN202110207921.5A CN202110207921A CN112948433B CN 112948433 B CN112948433 B CN 112948433B CN 202110207921 A CN202110207921 A CN 202110207921A CN 112948433 B CN112948433 B CN 112948433B
- Authority
- CN
- China
- Prior art keywords
- cross
- link
- transaction
- chain
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 230000008569 process Effects 0.000 claims abstract description 33
- 238000004590 computer program Methods 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 7
- 230000008859 change Effects 0.000 abstract description 12
- 238000010586 diagram Methods 0.000 description 19
- 238000010276 construction Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000013475 authorization Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 125000002015 acyclic group Chemical group 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000002844 melting Methods 0.000 description 1
- 230000008018 melting Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the disclosure relates to a method, a device, a system, equipment and a medium for querying a cross-region block chain, wherein the method comprises the following steps: acquiring a cross-link query request initiated by a transaction party, wherein the cross-link query request comprises service information and blockchain information; inquiring pre-constructed cross-chain association relation data based on service information and blockchain information to obtain a cross-chain inquiry result, wherein the cross-chain association relation data comprises transaction association relations among a plurality of blockchains; and returning the cross-chain query result to the transaction party. By adopting the technical scheme, the association relation and the state change process of the business data in different block chains can be queried through the cross-chain association relation data established based on the cross-chain transaction in advance, so that the tracking query of the data circulation process is realized.
Description
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method, apparatus, device, system, and medium for querying a blockchain.
Background
In the prior art, inter-blockchain transactions can be realized among different blockchain networks, and then data of the inter-chain transactions can be stored for subsequent inquiry.
However, the data storage of the cross-chain transaction is at a monitoring level, the data is stored only around two blockchains where the cross-chain transaction occurs currently, the cross-chain query has limited results, and the query requirements of integrity and relevance cannot be met.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, an apparatus, a device, a system, and a medium for querying a cross-blockchain.
The embodiment of the disclosure provides a cross-blockchain query method, which comprises the following steps:
acquiring a cross-chain query request initiated by a transaction party, wherein the cross-chain query request comprises service information and blockchain information;
inquiring pre-constructed cross-chain association relation data based on the service information and the blockchain information to obtain a cross-chain inquiry result, wherein the cross-chain association relation data comprises transaction association relations among a plurality of blockchains;
And returning the cross-chain query result to the transaction party.
The embodiment of the disclosure also provides a device for querying a cross-region block chain, which comprises:
the system comprises a query request acquisition module, a query module and a transaction module, wherein the query request acquisition module is used for acquiring a cross-link query request initiated by a transaction party, and the cross-link query request comprises service information and blockchain information;
the query module is used for querying pre-constructed cross-chain association relation data based on the service information and the blockchain information to obtain a cross-chain query result;
and the result feedback module is used for returning the cross-chain query result to the transaction party.
The disclosed embodiments also provide a cross-block chain query system that includes a plurality of cross-chain query nodes and a plurality of cross-chain transaction nodes,
The cross-chain query node is used for executing the cross-block chain query method provided by the embodiment of the disclosure after the cross-chain transaction node completes the cross-chain transaction among the block chain nodes corresponding to different block chains.
The embodiment of the disclosure also provides a cross-region block chain service device, which comprises: a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instructions from the memory and execute the instructions to implement a cross-blockchain query method as provided by the embodiments of the present disclosure.
The disclosed embodiments also provide a computer readable storage medium storing a computer program for performing a cross-blockchain query method as provided by the disclosed embodiments.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: according to the cross-blockchain query scheme provided by the embodiment of the disclosure, a cross-chain query node obtains a cross-chain query request initiated by a transaction party, wherein the cross-chain query request comprises service information and blockchain information; inquiring pre-constructed cross-chain association relation data based on service information and blockchain information to obtain a cross-chain inquiry result, wherein the cross-chain association relation data comprises transaction association relations among a plurality of blockchains; and returning the cross-chain query result to the transaction party. By adopting the technical scheme, the association relation and the state change process of the business data in different block chains can be queried through the cross-chain association relation data established based on the cross-chain transaction in advance, so that the tracking query of the data circulation process is realized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a cross-blockchain query method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a cross-block chain query provided by an embodiment of the present disclosure;
FIG. 3 is a schematic illustration of a directed acyclic graph provided by an embodiment of the present disclosure;
FIG. 4 is a flow chart of another method for cross-blockchain querying provided by embodiments of the present disclosure;
FIG. 5 is a first state diagram of a directed acyclic graph provided by an embodiment of the present disclosure;
FIG. 6 is a second state diagram of a directed acyclic graph provided by an embodiment of the disclosure;
FIG. 7 is a third state diagram of a directed acyclic graph provided by an embodiment of the disclosure;
FIG. 8 is a fourth state diagram of a directed acyclic graph provided by an embodiment of the disclosure;
FIG. 9 is a fifth state diagram of a directed acyclic graph according to an embodiment of the disclosure
Fig. 10 is a schematic structural diagram of a cross-block chain query system according to an embodiment of the present disclosure;
Fig. 11 is a schematic structural diagram of a cross-block chain query device according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of a cross-block chain service device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
Fig. 1 is a flow chart of a cross-blockchain query method provided by an embodiment of the present disclosure, where the method may be performed by a cross-blockchain query device, where the device may be implemented in software and/or hardware, and may be generally integrated in a cross-blockchain service device.
In the embodiment of the disclosure, the cross-block chain (simply referred to as cross-chain) query method may be implemented by a cross-chain query node after the cross-chain transaction is implemented by a cross-chain transaction node, or the cross-chain query method may also be implemented by a cross-chain service node, where the cross-chain service node may also implement the cross-chain transaction, and is not particularly limited. Exemplary, fig. 2 is a schematic diagram of a cross-region blockchain query provided by an embodiment of the present disclosure, where a cross-chain transaction node may implement a cross-chain transaction between two blockchain nodes corresponding to a blockchain 1 and a blockchain 2, and then the cross-chain query node may implement a cross-chain query. In the embodiment of the disclosure, a cross-link query method implemented by a cross-link query node is taken as an example for explanation. As shown in fig. 1, the method includes:
Step 101, acquiring a cross-link query request initiated by a transaction party, wherein the cross-link query request comprises service information and blockchain information.
The transaction party can be a user corresponding to a blockchain link point participating in a cross-chain transaction, wherein the cross-chain transaction refers to a transaction between blockchain nodes corresponding to different blockchains, and as shown in fig. 2, the cross-chain transaction refers to a transaction between a first blockchain node corresponding to a blockchain 1 and a second blockchain node corresponding to a blockchain 2.
The cross-chain query request refers to a query for performing a business data association and a state change process in a blockchain, wherein the association and the state change process are generated by a cross-chain transaction. The service information refers to information related to service data of a transaction party, for example, when the service data is a contract, the service information may be a contract identifier, that is, a contract ID. The blockchain information refers to the characterization information of the blockchain where the transaction party is located, for example, the blockchain information may be a blockchain name.
Specifically, the cross-link query node may obtain a cross-link query request transmitted by the transaction party through the located blockchain node, where the cross-link query request may include service information and blockchain information.
Step 102, inquiring pre-constructed cross-chain association relation data based on service information and blockchain information to obtain a cross-chain inquiry result, wherein the cross-chain association relation data comprises transaction association relations among a plurality of blockchains.
The cross-chain association relationship data may be understood as association relationship data between service data generated by a cross-chain transaction among a plurality of different blockchains. The cross-chain association data may include cross-chain state data and directed acyclic graphs, the cross-chain state data being structured in the form of state machines. The cross-link state data may include transaction association information of at least one cross-link data, where the transaction association information includes parameter information of current cross-link data, uplink association data and downlink association data, and the parameter information of the current cross-link data includes service information, query information, cross-link flag bits, blockchain information and blockchain attribute information. Referring to table 1, table 1 is a data structure of cross-chain state data.
TABLE 1 data structure for Cross-chain State data
As shown in table 1, taking transaction association information of cross-link data 1 as an example, association data 1 and association data 2 … are downlink association data of cross-link data 1, and if there is no uplink association data of cross-link data 1, the table is not displayed, and if there is any, the table can be added. The service information in the parameter information of the current cross-link data is represented by the main key (also called a main key), the query information is represented by the query key, the cross-link flag bit represents the state of the cross-link transaction and can comprise the state of the uplink transaction and the state of the downlink transaction, the blockchain information represents the blockchain where the cross-link data 1 is located, and the blockchain attribute information can comprise the block height and the block hash value. The blockchain information and blockchain attribute information are used for subsequent data indexing.
The directed acyclic graph can be established based on the cross-link data and the association relation of the uplink association data and the downlink association data, wherein the uplink association data and the downlink association data are the cross-link data. The directed acyclic graph refers to a directed acyclic graph (DIRECTED ACYCLIC GRAPH, DAG) of relationships between cross-chain data. The uplink associated data and the downlink associated data of the cross-link data are used as the cross-link data, and the uplink associated data and the downlink associated data of the cross-link data are also provided with the cross-link data and are not reflected in the transaction associated information of the current cross-link data. Fig. 3 is a schematic diagram of a directed acyclic graph provided by an embodiment of the disclosure, and fig. 3 is a directed acyclic graph corresponding to cross-link state data of table 1, for example, in the graph, cross-link data 1 completes a specific cross-link transaction based on association data 1 and association data 2 … and association data n, then cross-link data 1 is associated with association data 1 and association data 2 … and association data n, and downlink association data of cross-link data 1 is association data 1 and association data 2 … and association data n; the downlink associated data of the cross-chain data m is associated data k.
In the embodiment of the present disclosure, querying pre-built cross-link association relationship data based on service information and blockchain information to obtain a cross-link query result may include: inquiring cross-link state data in the cross-link association relationship data based on the service information and the blockchain information, and determining corresponding target cross-link data; determining a corresponding target directed acyclic graph based on the target cross-chain data; and determining the transaction association information of the target cross-link data and the target directed acyclic graph as a cross-link query result. The method comprises the steps that query can be conducted in cross-link state data based on service information and blockchain information to determine target cross-link data corresponding to the service information, and transaction association information of the target cross-link data is determined; the method can search in the directed acyclic graph based on the service information, determine the corresponding target directed acyclic graph, and intuitively determine the uplink associated data and the downlink associated data of the target cross-link data based on the target directed acyclic graph.
Step 103, returning the cross-chain query result to the transaction party.
The cross-link query node can return the determined transaction association information of the target cross-link data and the target directed acyclic graph to a transaction party making a cross-link query request as a cross-link query result. When the blockchain of the transaction party is the source blockchain and the blockchain of the other transaction party is the target blockchain, after the cross-chain transaction is completed between the transaction party and the other transaction party, the transaction party can determine the association relationship between the business data of the blockchain of the transaction party and the business data of the other transaction party corresponding to the other blockchain and the transaction state change process of the business data through the cross-chain query.
According to the cross-blockchain query scheme provided by the embodiment of the disclosure, a cross-chain query node obtains a cross-chain query request initiated by a transaction party, wherein the cross-chain query request comprises service information and blockchain information; inquiring pre-constructed cross-chain association relation data based on service information and blockchain information to obtain a cross-chain inquiry result, wherein the cross-chain association relation data comprises transaction association relations among a plurality of blockchains; and returning the cross-chain query result to the transaction party. By adopting the technical scheme, the association relation and the state change process of the business data in different block chains can be queried through the cross-chain association relation data established based on the cross-chain transaction in advance, so that the tracking query of the data circulation process is realized.
In some embodiments, the cross-chain query method may further comprise: and constructing cross-link association relation data based on the cross-link data and the cross-link transaction result in the cross-link transaction process. Optionally, constructing cross-link association relationship data based on the cross-link data and the cross-link transaction result in the cross-link transaction process includes: receiving a cross-link transaction request of a first transaction party to obtain cross-link data of the first transaction party; receiving a processing result of the second transaction party based on the cross-link transaction request to obtain a cross-link transaction result; and correlating the cross-link data with the cross-link transaction result to obtain corresponding cross-link correlation data. Optionally, associating the cross-link data with the cross-link transaction result to obtain corresponding cross-link association relationship data, including: based on the cross-chain data and the cross-chain transaction result, a directed acyclic graph about the cross-chain transaction request is constructed.
The first transaction party and the second transaction party are two blockchain nodes for performing cross-chain transaction, the cross-chain data refers to business data participating in the cross-chain transaction in the blockchain, the cross-chain transaction result refers to transaction execution results among blockchain nodes corresponding to different blockchains, and the cross-chain data and the cross-chain transaction result can be obtained from the cross-chain transaction nodes. After the cross-link transaction is completed among the block chain nodes corresponding to different block chains, the cross-link data of the cross-link transaction success can be stored according to the data structure of the table 1 to obtain corresponding cross-link state data, and then a directed acyclic graph is constructed based on the cross-link state data.
In some embodiments, returning the cross-chain query results to the transaction party may include: and returning a cross-chain query result based on the query authority of the transaction party. The query authority refers to authority for allowing cross-chain query, and the query authority can comprise all public and authorized public.
In the embodiment of the disclosure, if the transaction party directly participates in the cross-chain transaction, that is, the transaction party is a right party of the cross-chain data, the query authority can be totally disclosed, that is, all information can be queried, and the cross-chain query result is directly returned to the transaction party; if the transaction party does not directly participate in the cross-chain transaction but only has the related information of the cross-chain data, the query authority can be disclosed as authorization, and only the related information of the cross-chain data authorized by the equity party can be queried, namely if the currently queried cross-chain data is authorized, the cross-chain query result is returned to the transaction party; otherwise, a prompt message rejecting the query may be returned. And a cross-link query result is returned based on the query authority, so that the flexibility of the cross-link query is improved.
Fig. 4 is a flow chart of another cross-blockchain query method provided by an embodiment of the present disclosure, where the cross-blockchain query method is further optimized based on the above embodiment. As shown in fig. 4, the method includes:
Step 201, constructing cross-link association relationship data based on cross-link data and cross-link transaction results in the cross-link transaction process.
Optionally, constructing cross-link association relationship data based on the cross-link data and the cross-link transaction result in the cross-link transaction process includes: receiving a cross-link transaction request of a first transaction party to obtain cross-link data of the first transaction party; receiving a processing result of the second transaction party based on the cross-link transaction request to obtain a cross-link transaction result; and correlating the cross-link data with the cross-link transaction result to obtain corresponding cross-link correlation data. Optionally, associating the cross-link data with the cross-link transaction result to obtain corresponding cross-link association relationship data, including: based on the cross-chain data and the cross-chain transaction result, a directed acyclic graph about the cross-chain transaction request is constructed.
Step 202, acquiring a cross-link query request initiated by a transaction party.
The cross-chain query request comprises service information and blockchain information;
step 203, querying cross-link state data in the cross-link association relationship data based on the service information and the blockchain information, and determining corresponding target cross-link data.
Step 204, determining a corresponding target directed acyclic graph based on the target cross-chain data.
Step 205, determining transaction association information of target cross-link data and a target directed acyclic graph as a cross-link query result.
Step 206, returning the cross-chain query result to the transaction party.
Optionally, returning the cross-chain query result to the transaction party may include: and returning a cross-chain query result based on the query authority of the transaction party.
The cross-blockchain query method provided by the embodiments of the present disclosure is specifically described below by way of a specific example. Taking the trade financing scenario as an example, the blockchain 1 in fig. 2 may be a trade chain, the blockchain 2 may be a financing chain, the trade chain may be a business chain in which a supplier and a core enterprise record trade transaction contracts, and the financing chain may be a business chain in which a bank records financing and paying. The cross-chain transaction can be completed between the core enterprise and the bank through the cross-chain transaction node, and the specific process comprises the following steps: the core enterprise can issue a financing application, and trade contracts of the suppliers and the core enterprise are pushed to a financing chain through a cross-chain transaction node; the bank performs financing and money releasing on the trade contract which agrees to money releasing, and submits the financing and money releasing record to the trade chain through the cross-chain transaction node.
After the cross-chain transaction is completed, the trade contract and the financing and paying records are cross-chain data, and the cross-chain query node can construct cross-chain association relation data based on the trade contract, the financing and paying records and the cross-chain transaction result. The core enterprise or the bank can send a cross-link query request to the cross-link query node as a transaction party of the cross-link transaction, and the cross-link query node can return transaction association information of the trade contract and the corresponding directed acyclic graph to the core enterprise as a cross-link query result or return transaction association information of the financing and paying record and the corresponding directed acyclic graph to the bank as a cross-link query result.
Because the core enterprise and the bank directly participate in the cross-chain transaction, the query authority of the core enterprise and the bank is totally disclosed as the rights party of the cross-chain data; and the suppliers which record the trade contract with the core enterprise do not directly participate in the cross-chain transaction, but have the related information of the trade contract, can perform cross-chain inquiry of part of the trade contract based on the authorization of the core enterprise, the inquiry authority is the authorization disclosure, and the cross-chain inquiry result of the authorized trade contract can be obtained.
The trade associated information of the trade contract is shown in table 2 and the trade associated information of the financing record is shown in table 3.
Table 2 transaction-related information for trade contracts
TABLE 3 transaction related information for financing and fund transfer records
Optionally, it is assumed that the trade chain is a business chain for recording trade contracts between the provider a and the core enterprise b, the financing chain is a business chain for recording financing and paying by the bank c, and the insurance policy is a business chain for insurance policy record of the insurance policy party Ding Jilu. The specific cross-chain transaction flow may include: applying for 7 trade contracts to conduct cross-chain transaction, specifically, submitting contract information to a financing chain in a cross-chain manner for financing application, wherein 5 parts are firstly followed by 2 parts; carrying out 2 financing and paying according to 4 contracts in the third order; 2 financing and releasing records are applied for cross-chain transaction, and the financing and releasing records are submitted to a security chain in a cross-chain manner to apply for security; and the step D performs a warranty on 2 financing and money transfer records.
Tables 4-8 reflect the change process of the cross-link state data in the cross-link association relationship data in the cross-link transaction process, wherein 'combination' in the tables represents trade contract, 'melting' represents financing and releasing record, and 'guarantee' represents warranty record; fig. 5-9 illustrate the process of changing the directed acyclic graph in the cross-chain association data during the cross-chain transaction. When a first initiates 5 trade contracts to cross a chain, the data of the state of the cross-chain is shown in table 4, a directed acyclic graph is shown in fig. 5, and fig. 5 is a first state schematic diagram of the directed acyclic graph provided by an embodiment of the disclosure; when the third party appoints 3 trade contracts to initiate a financing cross-chain, the cross-chain state data is shown in table 5, the directed acyclic graph is shown in fig. 6, fig. 6 is a second state schematic diagram of the directed acyclic graph provided by the embodiment of the disclosure, and it is seen that the cross-chain state data and the directed acyclic graph are both changed according to the cross-chain transaction result; when a first initiates 2 trade contracts to cross a chain, the data of the state of the cross-chain is shown in a table 6, a directed acyclic graph is shown in fig. 7, and fig. 7 is a third state schematic diagram of the directed acyclic graph provided by an embodiment of the disclosure; when a trade contract is selected to initiate a financing cross-chain, the cross-chain state data is shown in table 7, the directed acyclic graph is shown in fig. 8, and fig. 8 is a fourth state diagram of the directed acyclic graph provided by an embodiment of the present disclosure; when the sender initiates a warranty cross-chain with respect to 2 financing records, the cross-chain state data is shown in table 8, the directed acyclic graph is shown in fig. 9, and fig. 9 is a fifth state diagram of the directed acyclic graph according to an embodiment of the present disclosure.
TABLE 4 first State of Cross-chain State data
TABLE 5 second State of Cross-chain State data
TABLE 6 third State of Cross-chain State data
TABLE 7 fourth State of Cross-chain State data
TABLE 8 fifth State of Cross-chain State data
The above examples illustrate the process of changing the cross-chain state data and the directed acyclic graph in the construction process in the cross-chain association relationship data. The change process of the business data in the specified blockchain can be queried based on the cross-chain association relationship data, for example, the information change process of the contract in the trade chain can be queried according to the contract id of the trade contract 2.
The cross-chain query method provided by the embodiment of the disclosure does not influence the business in the blockchain regardless of the cross-chain transaction state or result between the blockchains, and can query the state change process of the business data in the blockchain.
According to the cross-blockchain query scheme provided by the embodiment of the disclosure, after cross-chain query nodes finish cross-chain transactions among blockchain nodes corresponding to different blockchains, cross-chain association relationship data is built based on cross-chain data and cross-chain transaction results in the cross-chain transaction process; acquiring a cross-link query request initiated by a transaction party; inquiring cross-link state data in the cross-link association relationship data based on the service information and the blockchain information, and determining corresponding target cross-link data; determining a corresponding target directed acyclic graph based on the target cross-chain data; determining transaction association information of target cross-link data and a target directed acyclic graph as a cross-link query result; and returning the cross-chain query result to the transaction party. By adopting the technical scheme, the association relation and the state change process of the business data in different block chains can be queried through the cross-chain association relation data established based on the cross-chain transaction in advance, so that the tracking query of the data circulation process is realized.
Fig. 10 is a schematic structural diagram of a cross-block chain query system provided by an embodiment of the present disclosure, where the cross-block chain query system includes a plurality of cross-chain query nodes 302 and a plurality of cross-chain transaction nodes 301, and the cross-chain query nodes 302 are configured to execute the cross-block chain query method provided in the embodiment of the present disclosure after the cross-chain transaction nodes 301 complete cross-chain transactions between the block chain nodes corresponding to different block chains.
After the cross-link transaction nodes finish the cross-link transaction among the block-link nodes corresponding to different block-links, the cross-link query node can acquire related data of the cross-link transaction and construct cross-link association relationship data, so that when a cross-link query request sent by a transaction party is received, the cross-link association relationship data can be queried, and transaction association information of target cross-link data and a target directed acyclic graph are returned to the transaction party as a cross-link query result.
Fig. 11 is a schematic structural diagram of a cross-block chain query device provided by an embodiment of the present disclosure, where the device may be implemented by software and/or hardware, and may be generally integrated in a cross-block chain service device, and may implement a query of cross-block chain data by executing a cross-block chain query method. As shown in fig. 11, the apparatus includes:
a query request acquisition module 401, configured to acquire a cross-link query request initiated by a transaction party, where the cross-link query request includes service information and blockchain information;
The query module 402 is configured to query pre-constructed cross-chain association relationship data based on the service information and the blockchain information, so as to obtain a cross-chain query result;
and the result feedback module 403 is configured to return the cross-link query result to the transaction party.
According to the cross-blockchain query scheme provided by the embodiment of the disclosure, a cross-chain query node obtains a cross-chain query request initiated by a transaction party, wherein the cross-chain query request comprises service information and blockchain information; inquiring pre-constructed cross-chain association relation data based on service information and blockchain information to obtain a cross-chain inquiry result, wherein the cross-chain association relation data comprises transaction association relations among a plurality of blockchains; and returning the cross-chain query result to the transaction party. By adopting the technical scheme, the association relation and the state change process of the business data in different block chains can be queried through the cross-chain association relation data established based on the cross-chain transaction in advance, so that the tracking query of the data circulation process is realized.
Optionally, the device further includes an association relationship construction module, specifically configured to:
And constructing cross-link association relation data based on the cross-link data and the cross-link transaction result in the cross-link transaction process.
Optionally, the association relationship construction module is specifically configured to:
Receiving a cross-link transaction request of a first transaction party to obtain cross-link data of the first transaction party;
receiving a processing result of the second transaction party based on the cross-link transaction request to obtain a cross-link transaction result;
And correlating the cross-link data with the cross-link transaction result to obtain corresponding cross-link correlation data.
Optionally, the association relationship construction module is specifically configured to:
and constructing and obtaining a directed acyclic graph about the cross-chain transaction request based on the cross-chain data and the cross-chain transaction result.
Optionally, the cross-link state data is constructed in a state machine form, and the cross-link state data includes transaction association information of at least one cross-link data.
Optionally, the query module 402 is specifically configured to:
Inquiring the cross-link state data in the cross-link association relationship data based on the service information and the blockchain information, and determining corresponding target cross-link data;
determining a corresponding target directed acyclic graph based on the target cross-chain data;
And determining the transaction association information of the target cross-chain data and the target directed acyclic graph as the cross-chain query result.
Optionally, the result feedback module 403 is specifically configured to:
and returning the cross-chain query result based on the query authority of the transaction party.
The cross-blockchain query device provided by the embodiment of the disclosure can execute the cross-blockchain query method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 12 is a schematic structural diagram of a cross-blockchain service device of an electronic device of a communication device according to an embodiment of the disclosure. As shown in fig. 12, the cross-blockchain service device 500 includes one or more processors 501 and memory 502.
The processor 501 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities and may control other components in the cross-blockchain service device 500 to perform desired functions.
Memory 502 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by the processor 501 to implement the cross-blockchain querying method of embodiments of the present disclosure described above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, and the like may also be stored in the computer-readable storage medium.
In one example, the cross-blockchain service device 500 may further include: an input device 503 and an output device 504, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
In addition, the input device 503 may also include, for example, a keyboard, a mouse, and the like.
The output device 504 may output various information to the outside, including the determined distance information, direction information, and the like. The output device 504 may include, for example, a display, speakers, a printer, and a communication network and remote output apparatus connected thereto, etc.
Of course, for simplicity, only some of the components of the cross-blockchain service device 500 that are relevant to the present disclosure are shown in fig. 12, components such as buses, input/output interfaces, etc. are omitted. In addition, the cross-blockchain service device 500 may include any other suitable components depending on the particular application.
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the method of cross-blockchain querying provided by embodiments of the present disclosure.
The computer program product may write program code for performing the operations of embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Further, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to perform the method of cross-blockchain querying provided by embodiments of the present disclosure.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method for querying a cross-region block chain, the method comprising:
acquiring a cross-chain query request initiated by a transaction party, wherein the cross-chain query request comprises service information and blockchain information;
Inquiring pre-constructed cross-link association relation data based on the service information and the blockchain information to obtain a cross-link inquiry result, wherein the cross-link association relation data is generated due to cross-link transaction, comprises transaction association relations among a plurality of blockchains and comprises cross-link state data, the cross-link state data is constructed in a state machine mode, the cross-link state data comprises transaction association information of at least one piece of cross-link data, the transaction association information comprises parameter information, uplink association data and downlink association data of current cross-link data, the parameter information of the current cross-link data comprises service information, inquiry information, cross-link flag bits, blockchain information and blockchain attribute information, and the cross-link flag bits represent the state of the cross-link transaction and comprise the state of uplink transaction and the state of downlink transaction;
And returning the cross-chain query result to the transaction party.
2. The method according to claim 1, wherein the method further comprises:
And constructing cross-link association relation data based on the cross-link data and the cross-link transaction result in the cross-link transaction process.
3. The method according to claim 2, wherein constructing cross-chain association relationship data based on the cross-chain data and the cross-chain transaction result in the cross-chain transaction process comprises:
Receiving a cross-link transaction request of a first transaction party to obtain cross-link data of the first transaction party;
receiving a processing result of the second transaction party based on the cross-link transaction request to obtain a cross-link transaction result;
And correlating the cross-link data with the cross-link transaction result to obtain corresponding cross-link correlation data.
4. The method of claim 3, wherein associating the cross-chain data with the cross-chain transaction result to obtain corresponding cross-chain association relationship data comprises:
and constructing and obtaining a directed acyclic graph about the cross-link transaction request based on the cross-link data and the cross-link transaction result so as to obtain the cross-link association relationship data.
5. The method of claim 4, wherein querying pre-built cross-chain association relationship data based on service information and blockchain information to obtain a cross-chain query result comprises:
Inquiring the cross-link state data in the cross-link association relationship data based on the service information and the blockchain information, and determining corresponding target cross-link data;
determining a corresponding target directed acyclic graph based on the target cross-chain data;
And determining the transaction association information of the target cross-chain data and the target directed acyclic graph as the cross-chain query result.
6. The method of claim 1, wherein returning the cross-chain query result to the transaction party comprises:
and returning the cross-chain query result based on the query authority of the transaction party.
7. A cross-block chain query device, comprising:
the system comprises a query request acquisition module, a query module and a transaction module, wherein the query request acquisition module is used for acquiring a cross-link query request initiated by a transaction party, and the cross-link query request comprises service information and blockchain information;
The query module is used for querying pre-built cross-link association relation data based on the service information and the blockchain information to obtain a cross-link query result, wherein the cross-link association relation data is generated due to cross-link transaction, comprises transaction association relation among a plurality of blockchains and comprises cross-link state data, the cross-link state data is built in a state machine mode, the cross-link state data comprises transaction association information of at least one piece of cross-link data, the transaction association information comprises parameter information, uplink association data and downlink association data of current cross-link data, the parameter information of the current cross-link data comprises service information, query information, cross-link flag bits, blockchain information and blockchain attribute information, and the cross-link flag bits represent states of the cross-link transaction, including states of uplink transaction and states of downlink transaction;
and the result feedback module is used for returning the cross-chain query result to the transaction party.
8. A cross-block chain query system is characterized in that the cross-block chain query system comprises a plurality of cross-chain query nodes and a plurality of cross-chain transaction nodes,
The cross-chain query node is configured to execute the cross-blockchain query method of any of claims 1-6 after the cross-chain transaction node completes a cross-chain transaction between blockchain nodes corresponding to different blockchains.
9. A cross-blockchain service device, the cross-blockchain service device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the cross-blockchain querying method of any of the preceding claims 1-6.
10. A computer readable storage medium, characterized in that the storage medium stores a computer program for executing the cross-blockchain querying method of any of the preceding claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110207921.5A CN112948433B (en) | 2021-02-24 | 2021-02-24 | Cross-blockchain query method, device, system, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110207921.5A CN112948433B (en) | 2021-02-24 | 2021-02-24 | Cross-blockchain query method, device, system, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112948433A CN112948433A (en) | 2021-06-11 |
CN112948433B true CN112948433B (en) | 2024-06-04 |
Family
ID=76246029
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110207921.5A Active CN112948433B (en) | 2021-02-24 | 2021-02-24 | Cross-blockchain query method, device, system, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112948433B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113612761B (en) * | 2021-07-30 | 2022-03-22 | 立信(重庆)数据科技股份有限公司 | Block chain-based investigation data chaining method and system |
CN115459921B (en) * | 2022-08-25 | 2024-04-30 | 浪潮云信息技术股份公司 | Agent re-encryption and directed acyclic graph-based cross-chain method and system |
CN115357664B (en) * | 2022-10-21 | 2023-03-21 | 北京航空航天大学 | Multidirectional trusted system based on block chain and data query method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109299338A (en) * | 2018-10-31 | 2019-02-01 | 山东云息网络科技有限公司 | Transregional piece of chain data management system of one kind and method |
CN110266655A (en) * | 2019-05-30 | 2019-09-20 | 中国工商银行股份有限公司 | A kind of across chain interconnected method, equipment and system based on block chain |
CN110941647A (en) * | 2019-11-11 | 2020-03-31 | 华中科技大学 | Block chain cross-chain interaction method and system based on DAG |
CN111181968A (en) * | 2019-12-30 | 2020-05-19 | 北京金山云网络技术有限公司 | Cross-block chain communication method and device, cross-chain service system and cross-chain transaction system |
CN111489256A (en) * | 2019-01-25 | 2020-08-04 | 京东数字科技控股有限公司 | Cross-chain processing method, equipment and system for multi-chain block chain system |
CN111581251A (en) * | 2020-04-23 | 2020-08-25 | 傲林科技有限公司 | Digital asset query method, device and storage medium for cross-chain transaction |
CN111666323A (en) * | 2020-05-15 | 2020-09-15 | 西安纸贵互联网科技有限公司 | Cross-chain intercommunication method and system for block chain |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11194837B2 (en) * | 2018-05-01 | 2021-12-07 | International Business Machines Corporation | Blockchain implementing cross-chain transactions |
MX2019008597A (en) * | 2018-12-13 | 2019-09-09 | Alibaba Group Holding Ltd | Off-chain smart contract service based on trusted execution environment. |
-
2021
- 2021-02-24 CN CN202110207921.5A patent/CN112948433B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109299338A (en) * | 2018-10-31 | 2019-02-01 | 山东云息网络科技有限公司 | Transregional piece of chain data management system of one kind and method |
CN111489256A (en) * | 2019-01-25 | 2020-08-04 | 京东数字科技控股有限公司 | Cross-chain processing method, equipment and system for multi-chain block chain system |
CN110266655A (en) * | 2019-05-30 | 2019-09-20 | 中国工商银行股份有限公司 | A kind of across chain interconnected method, equipment and system based on block chain |
CN110941647A (en) * | 2019-11-11 | 2020-03-31 | 华中科技大学 | Block chain cross-chain interaction method and system based on DAG |
CN111181968A (en) * | 2019-12-30 | 2020-05-19 | 北京金山云网络技术有限公司 | Cross-block chain communication method and device, cross-chain service system and cross-chain transaction system |
CN111581251A (en) * | 2020-04-23 | 2020-08-25 | 傲林科技有限公司 | Digital asset query method, device and storage medium for cross-chain transaction |
CN111666323A (en) * | 2020-05-15 | 2020-09-15 | 西安纸贵互联网科技有限公司 | Cross-chain intercommunication method and system for block chain |
Non-Patent Citations (4)
Title |
---|
Leveraging blockchain for immutable logging and querying across multiple sites;Ozdayi, Mustafa Safa等;《BMC MEDICAL GENOMICS》;20200812;第13卷;全文 * |
一种改进的区块链跨链技术;魏昂;;网络空间安全(第06期);全文 * |
区块链+物联网技术在贸易金融中的应用研究;王辉;冯晓晨;;现代商业;20200328(第09期);全文 * |
区块链的数据管理技术综述;张志威等;《软件学报》;20200915(第9期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112948433A (en) | 2021-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112948433B (en) | Cross-blockchain query method, device, system, equipment and medium | |
CN110495132B (en) | System and method for generating, uploading and executing code blocks within distributed network nodes | |
CN107609848B (en) | Intellectual property licensing method and system based on Internet of things | |
CN110032599B (en) | Data structure reading and updating method and device, and electronic equipment | |
WO2022161181A1 (en) | Data processing method and apparatus based on blockchain, and electronic device | |
US20230216689A1 (en) | Systems, apparatus and methods for local state storage of distributed ledger data without cloning | |
US10797887B2 (en) | Confidential blockchain transactions | |
CN107534671A (en) | The polymerization of Distributed Services entity and association is with combining | |
US20210329067A1 (en) | Matching methods, apparatuses, and devices based on trusted asset data | |
KR20030001369A (en) | Method for workflow processing through computer network | |
TW201802739A (en) | Invoice title information change method, device and invoice management system | |
CN112287311A (en) | Service implementation method and device based on block chain | |
CN111489100A (en) | Order creating method, device, equipment and medium based on big data | |
US20210105148A1 (en) | Collaboration hub with blockchain verification | |
CN112269915B (en) | Service processing method, device, equipment and storage medium | |
CN112258324B (en) | Contract approval method, contract approval server, device and medium | |
CN111506784B (en) | Asset creditor matching method, device, computer equipment and storage medium | |
CN112783954B (en) | Data access method, device and server | |
CN111414591A (en) | Workflow management method and device | |
CN114417323B (en) | Data reference method, device, equipment and medium | |
KR20200093779A (en) | Block chain based product purchasing agent method and system | |
US20240028570A1 (en) | Secure zero knowledge data transformation and validation | |
US12052369B2 (en) | Method for securing private structured databases within a public blockchain | |
US12051066B2 (en) | Systems and methods for validating asset destinations in blockchain networks | |
US20230162178A1 (en) | Blockchain transaction rebroadcast |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |