A cross-chain verification system and method based on a second-layer network
By deploying Layer 2 in the blockchain system to independently perform cross-chain verification, it solves the problem of overburdening the chain of custody in cross-chain verification and improves verification efficiency and system scalability.
Patent Information
- Application Number
- CN202410440025.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-04-12
AI Technical Summary
Complex computing operations are required when the target chain performs cross-chain verification, resulting in an increase in burden, especially when the data that requires cross-chain verification increases.
Layer 2 is deployed between the business chain and the chain of custody to independently perform cross-chain verification of business data and reduce the burden on the chain of custody.
By transferring the cross-chain verification processing pressure from the chain of custody to the second-layer network Layer2, the burden on the chain of custody is reduced and the efficiency of cross-chain verification is improved, thereby improving the efficiency of regulatory data reporting of the business chain and the scalability of the entire chain of custody system. .
Smart Images

Figure CN118200014B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and more specifically, to a cross-chain verification system and method based on a second-layer network. Background Art
[0002] With the booming development of blockchain technology, different blockchain frameworks have emerged. However, due to the different underlying protocols of these frameworks, "data islands" have been formed. Cross-chain technology, also known as blockchain interoperability technology, provides the ability for blockchains to communicate with each other. Among them, cross-chain verification is the basis for achieving blockchain interoperability. Through cross-chain verification, the interoperability protocol can verify and confirm transactions between the source chain and the target chain network, ensure the authenticity, accuracy and integrity of cross-chain data transmission, and realize the reliable and trustworthy transmission of real data between different chains.
[0003] However, complex computing operations need to be performed when the target chain performs cross-chain verification. If the amount of data that needs cross-chain verification increases, the burden on the target chain will increase. Summary of the invention
[0004] In view of this, the present invention provides a cross-chain verification system and method based on a two-layer network, deploys a two-layer network Layer2 between the business chain and the supervision chain, performs cross-chain verification of business data, and reduces the burden of the supervision chain.
[0005] In order to achieve the above-mentioned invention object, the specific technical solution provided by the present invention is as follows:
[0006] In a first aspect, an embodiment of the present invention provides a cross-chain verification system based on a layer 2 network, including a business chain, a layer 2 network Layer 2, and a supervision chain;
[0007] The business chain is used to store business data;
[0008] The second-layer network Layer2 is used to receive the business data and cross-chain verification transactions synchronized by the business chain, perform cross-chain verification on the cross-chain verification transactions, and if the verification is successful, store the business data in the database, construct blocks corresponding to the batch business data that pass the cross-chain verification to obtain block information, and upload the block information to the supervision chain for evidence storage;
[0009] The custody chain is used to store block information corresponding to business data that has passed cross-chain verification.
[0010] In some embodiments, it also includes:
[0011] The cross-chain middleware is used to synchronize the business data and on-chain proof information corresponding to the business data notarization transaction after monitoring the business data notarization transaction on the business chain, construct a cross-chain verification transaction according to the on-chain proof information, and send the cross-chain verification transaction and the business data to the second-layer network Layer2.
[0012] In some embodiments, the layer 2 network Layer 2 includes an interface layer, a service layer, a core layer and a storage layer;
[0013] The interface layer is used to provide a cross-chain verification interface for cross-chain verification services, and receives the business data and cross-chain verification transactions synchronized by the business chain through the cross-chain verification interface;
[0014] The service layer is used to provide cross-chain verification services for the cross-chain verification transactions received by the interface layer;
[0015] The core layer is used to receive the cross-chain verified business data sent by the service layer, send the cross-chain verified business data to the storage layer, batch pack the cross-chain verified business data to build blocks, and obtain block information;
[0016] The storage layer is used to store the business data that has passed the cross-chain verification into the database.
[0017] In some embodiments, the core layer comprises:
[0018] A data storage component, used to send the business data verified through the cross-chain to the storage layer, and calculate the hash value of the business data verified through the cross-chain;
[0019] Data batch processing component, used to batch collect the hash values corresponding to multiple business data verified through cross-chain verification;
[0020] The merkle tree processing component is used to construct a merkle tree based on the hash values corresponding to multiple business data verified through cross-chain verification;
[0021] A block processing component, used to construct a block according to the merkle tree and obtain the block information;
[0022] The chain management component is used to call the data storage function of the supervision chain to store the block information on the supervision chain.
[0023] In some embodiments, the custody chain is also used to obtain cross-chain verified business data stored on the second-layer network Layer2 based on the block hash value, the previous block hash value and the merkle tree root in the stored block information.
[0024] In some embodiments, the service layer is also used to generate a system log if cross-chain verification of the business data fails.
[0025] In a second aspect, an embodiment of the present invention provides a cross-chain verification method based on a layer 2 network, which is applied to the layer 2 network Layer 2 in a cross-chain verification system. The cross-chain verification method includes:
[0026] Receive business data synchronized by the business chain and verify transactions across the chain;
[0027] Performing cross-chain verification on the cross-chain verification transaction;
[0028] If the verification is successful, the business data is stored in the database;
[0029] Build blocks corresponding to batch business data verified through cross-chain verification and obtain block information;
[0030] The block information is uploaded to the custody chain for evidence storage.
[0031] In some embodiments, the receiving of service chain synchronized service data includes:
[0032] Receive the cross-chain verification transaction and the business data sent by the cross-chain middleware. The cross-chain verification transaction is constructed by the cross-chain middleware after it monitors the business data evidence transaction on the business chain, synchronizing the business data and on-chain proof information corresponding to the business data evidence transaction, and based on the on-chain proof information.
[0033] In some embodiments, the step of constructing a block corresponding to batch business data verified through cross-chain verification to obtain block information includes:
[0034] Calculate the hash value corresponding to the business data;
[0035] Batch collect hash values corresponding to multiple business data verified through cross-chain verification;
[0036] Build a merkle tree based on the hash values corresponding to multiple business data verified through cross-chain verification;
[0037] A block is constructed according to the merkle tree to obtain the block information.
[0038] In some embodiments, it also includes:
[0039] If verification fails, a system log is generated.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0041] The present invention discloses a cross-chain verification system and method based on a two-layer network, in which a two-layer network Layer2 is deployed between a business chain and a supervision chain. The two-layer network Layer2 independently performs cross-chain verification of business data, and transfers the cross-chain verification processing pressure from the supervision chain to the two-layer network Layer2, thereby reducing the burden of the supervision chain and improving the cross-chain verification efficiency, thereby improving the supervision data reporting efficiency of the business chain and improving the scalability of the entire supervision chain system. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1 A schematic diagram of the structure of a cross-chain verification system based on a layer 2 network disclosed in an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of the structure of a Layer 2 network disclosed in an embodiment of the present invention;
[0045] Figure 3 The present invention is a flowchart of a cross-chain verification method based on a layer 2 network disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0048] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0049] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0050] It should be noted that the business data (including but not limited to business party equipment information, business party information, business processing information, etc.) and data (including but not limited to data used for analysis, stored data, transaction data, etc.) involved in this application are all information and data authorized by enterprises or individuals or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0051] An embodiment of the present invention provides a cross-chain verification system and method based on a two-layer network. Before introducing the technical solution provided by an embodiment of the present invention, an application scenario involved in the present invention is first described.
[0052] Exemplarily, the regional equity market is a private equity market that mainly serves small and medium-sized enterprises within the provincial administrative region. In order to achieve the security, tamper-proofing and traceability of the business processing of the regional equity market, a business chain for processing the business processing of the regional equity market is constructed. Based on the regulatory authorities' requirements for the standardization of the business of the operating institutions of each regional equity market and the supervision of the business processing process, a regulatory chain is constructed to perform cross-chain penetration supervision on the business processing process of the regional equity market. However, complex computing operations need to be performed when performing cross-chain verification. If the amount of data that needs to be verified across the chain increases, the burden on the regulatory chain will increase. How to reduce the burden of the regulatory chain during the cross-chain verification process is a technical problem that urgently needs to be solved in this field.
[0053] Figure 1 The schematic diagram of the structure of a cross-chain verification system based on a two-layer network disclosed in an embodiment of the present invention is as follows: Figure 1 As shown, the cross-chain verification system based on the second-layer network includes: a business chain 11, a second-layer network 12 and a supervision chain 13.
[0054] Business Chain 11 is the underlying blockchain on the business side of the “supervision chain-local business chain” two-layer chain architecture, used to store business data.
[0055] Taking the regional equity market as an example, the business chain 11 is a blockchain built by a regional equity market operator. The business chain 11 includes multiple nodes. The regional equity market operator processes business through the business chain, such as equity registration, equity change, etc. Correspondingly, the business data stored in the business chain 11 can be equity registration data, equity change data, etc.
[0056] The English name of the second-layer network 12 is Layer2, which is a side chain parallel to the supervision chain 13. It is used to receive business data and cross-chain verification transactions synchronized with the business chain 11, and perform cross-chain verification on cross-chain verification transactions. If the verification is successful, the business data is stored in the database, and the block corresponding to the batch business data that has passed the cross-chain verification is constructed to obtain the block information, and the block information is uploaded to the supervision chain 13 for evidence storage.
[0057] The supervision chain 13 is the underlying blockchain on the supervision side of the "supervision chain-local business chain" two-layer chain architecture, which is used to store block information corresponding to business data that has passed cross-chain verification.
[0058] The supervision chain 13 is a blockchain built by the regulatory agency, including multiple nodes. Taking the regional equity market as an example, the supervision chain 13 is used to perform cross-chain penetration supervision on the business processing of the regional equity market.
[0059] The second layer network 12 is to improve scalability through off-chain expansion without changing the basic protocol of the blockchain, such as block size, consensus mechanism, etc. Off-chain expansion is to establish a second layer network outside the supervision chain, and obtain some processing and storage tasks from the supervision chain to achieve faster transactions on the second layer network, thereby greatly reducing the transaction load on the supervision chain.
[0060] It can be seen that the cross-chain verification system based on the two-layer network disclosed in this embodiment deploys the two-layer network Layer2 between the business chain and the supervision chain. The two-layer network Layer2 independently performs cross-chain verification of business data, and transfers the cross-chain verification processing pressure from the supervision chain to the two-layer network Layer2, thereby reducing the burden of the supervision chain and being able to effectively respond to the suddenness of the supervision data reporting business, such as the centralized and unified data reporting requirements in a certain time period, thereby improving the scalability of the entire supervision chain system.
[0061] At the same time, the original supervision chain must perform cross-chain verification on the business chain for each business data synchronized from the business chain and store it on the supervision chain. This embodiment performs cross-chain verification processing through the second-layer network Layer2 without having to wait for the confirmation time of the supervision chain, thereby improving the efficiency of cross-chain verification.
[0062] In addition, the second-layer network Layer 2 is unaware of the existence of the second-layer network Layer 2. From the perspective of the business chain, the efficiency of regulatory reporting has been improved without the need to improve the business chain, thereby improving the user experience.
[0063] For further information, see Figure 2 The second-layer network Layer2 includes the interface layer, service layer, core layer and storage layer.
[0064] The interface layer is used to provide a cross-chain verification interface for cross-chain verification services, and receive business data and cross-chain verification transactions synchronized with the business chain through the cross-chain verification interface;
[0065] The service layer is used to provide cross-chain verification services for cross-chain verification transactions received by the interface layer;
[0066] The core layer is used to receive the cross-chain verified business data sent by the service layer, send the cross-chain verified business data to the storage layer, batch pack the cross-chain verified business data to build blocks, and obtain block information;
[0067] The storage layer is used to store cross-chain verified business data in the database. The database is an off-chain database, which reduces the amount of data that needs to be stored in the Layer 2 network.
[0068] Furthermore, the service layer is also used to generate system logs if cross-chain verification fails, so that staff can view relevant information about the business data that failed the cross-chain verification.
[0069] Furthermore, the cross-chain verification system based on the second-layer network also includes a cross-chain middleware, which can be used as an access layer of the second-layer network Layer2, or as a device between the service chain and the second-layer network Layer2. The present invention does not make specific limitations.
[0070] Specifically, the cross-chain middleware is used to synchronize the business data and on-chain proof information corresponding to the business data evidence transaction after monitoring the business data evidence transaction on the business chain, construct a cross-chain verification transaction based on the on-chain proof information, and send the cross-chain verification transaction and business data to the second-layer network Layer2. Among them, the on-chain proof information includes the block hash value and timestamp of the business data evidenced on the business chain, the hash value of the previous block, etc., which is used to prove the authenticity of the business data evidenced on the business chain. The second-layer network Layer2 performs cross-chain verification on the business chain based on the cross-chain verification transaction.
[0071] Furthermore, the interface layer of the second-layer network Layer2 receives the business data and cross-chain verification transactions of the business chain sent by the cross-chain middleware through the cross-chain verification interface.
[0072] Furthermore, the service layer of Layer 2 of the second layer network includes a cross-chain verification component, which is used to perform cross-chain verification operations on business data, ensure that cross-chain data is truly stored in the business chain, and prevent forged data from being reported to the supervision chain. Exemplarily, based on the on-chain proof information of the business data in the cross-chain verification transaction, verify whether the business data is truly stored in the business chain.
[0073] Furthermore, the core layer of the second-layer network Layer2 includes: data storage component, data batch processing component, merkle tree processing component, block processing component and chain management component.
[0074] The data storage component is used to send the business data verified by the cross-chain to the storage layer and calculate the hash value of the business data verified by the cross-chain. Specifically, the hash value of the business data verified by the cross-chain is calculated according to the hash algorithm. The hash algorithm can generate a unique hash value of fixed length from data of non-fixed length. By calculating the hash value of the business data verified by the cross-chain, the storage space of the business data can be reduced.
[0075] The data batch processing component is used to batch collect the hash values corresponding to multiple business data verified through cross-chain. Specifically, the hash values corresponding to multiple business data verified through cross-chain can be collected in batches at regular intervals, that is, a batch of hash values corresponding to multiple business data verified through cross-chain can be collected at fixed intervals, or the hash values corresponding to multiple business data verified through cross-chain can be collected in batches at quantitative intervals, that is, the number of hash values collected in each batch is the same fixed value.
[0076] The merkle tree processing component is used to build a merkle tree based on the hash values corresponding to multiple business data verified through cross-chain verification, and generate a merkle path, i.e., the merkle tree root, used to prove that the hash value of the business data exists in the second-layer network Layer2.
[0077] The merkle tree is a binary tree structure. Each leaf node of the merkle tree stores a hash value. The business data itself is not stored in the merkle tree, so the merkle tree can store batches of business data hash values. The merkle tree has tamper-proof capabilities. Based on the collision resistance characteristics of the hash function, if any underlying business data is tampered with, its hash value will inevitably change, which can be detected by the hash value stored in the upper intermediate node in the merkle tree.
[0078] In addition, the merkle tree has the ability to efficiently verify transactions, that is, there is an authentication path from business data to the merkle tree root, namely the merkle path, which can quickly complete the existence verification of business data.
[0079] The block processing component is used to build blocks based on the merkle tree and obtain block information. Specifically, the block is built and the merkle tree root is stored in the block header. The block itself will be associated with subsequent blocks through the block hash value. The block information includes the hash value of the block itself, the merkle tree root, the block timestamp, the hash value of the previous block, etc.
[0080] The chain management component is used to call the data storage function of the supervision chain and store the block information on the supervision chain.
[0081] By storing block information on the supervision chain, the supervision chain can anchor the block of the second-layer network Layer2, so that the supervision chain can obtain the business data stored on the second-layer network Layer2 that has passed cross-chain verification based on the block hash value, previous block hash value and merkle tree root in the stored block information, ensuring that data tampering can be discovered in a timely manner.
[0082] An embodiment of the present invention also discloses a cross-chain verification method based on a two-layer network, which is applied to the two-layer network Layer2 in the above-mentioned cross-chain verification system. The cross-chain verification method based on the two-layer network can be implemented by a computer program, such as by a computer program deployed on the two-layer network Layer2.
[0083] like Figure 3 The schematic diagram of the process of the cross-chain verification method based on the second-layer network shown in the figure, a cross-chain verification method based on the second-layer network disclosed in this embodiment specifically includes the following steps:
[0084] S301: Receive business data synchronized by the business chain and cross-chain verification transactions;
[0085] Business data refers to the business data corresponding to the business data notarization transaction on the business chain, such as equity registration data, equity change data, etc.
[0086] The cross-chain verification transaction is constructed based on the on-chain proof information after synchronizing the business data corresponding to the business data evidence transaction and the on-chain proof information. The on-chain proof information includes the block hash value and timestamp of the business data stored on the business chain, the hash value of the previous block, etc., which is used to prove the authenticity of the business data stored on the business chain.
[0087] S302: Perform cross-chain verification on the cross-chain verification transaction;
[0088] Exemplarily, based on the on-chain proof information of the business data in the cross-chain verification transaction, verify whether the business data is truly stored in the business chain.
[0089] S303: If the verification is successful, the business data is stored in the database;
[0090] This database is an off-chain database, which reduces the amount of data that needs to be stored in the Layer 2 network.
[0091] S304: Construct a block corresponding to the batch business data verified through cross-chain verification and obtain block information;
[0092] Specifically, batch business data refers to hash values corresponding to multiple business data verified through cross-chain collection in periodic batches, that is, hash values are collected at fixed intervals. Batch business data may also refer to hash values corresponding to multiple business data verified through cross-chain collection in quantitative batches, that is, the number of hash values collected in each batch is the same fixed value.
[0093] That is, the hash values corresponding to multiple business data verified through cross-chain are packaged, blocks are generated, and block information is obtained.
[0094] S305: Upload the block information to the supervision chain for evidence storage.
[0095] By storing block information on the supervision chain, the supervision chain can anchor the block of the second-layer network Layer2, so that the supervision chain can obtain the business data stored on the second-layer network Layer2 and verified through cross-chain based on the stored block information, ensuring that data tampering can be discovered in a timely manner.
[0096] Furthermore, if the verification fails, a system log is generated to facilitate staff to view relevant information of the business data that failed the cross-chain verification.
[0097] Furthermore, an optional implementation method of the above S301 is: receiving cross-chain verification transactions and business data sent by the cross-chain middleware. The cross-chain verification transaction is that after the cross-chain middleware monitors the business data notarization transaction on the business chain, it synchronizes the business data and on-chain proof information corresponding to the business data notarization transaction, and constructs it according to the on-chain proof information.
[0098] Among them, the cross-chain middleware can be used as the access layer of the second-layer network Layer2, or as a device between the business chain and the second-layer network Layer2.
[0099] Furthermore, an optional implementation of the above S304 includes the following steps:
[0100] A1: Calculate the hash value corresponding to the business data;
[0101] A2: Batch collect the hash values corresponding to multiple business data verified through cross-chain;
[0102] A3: Build a merkle tree based on the hash values corresponding to multiple business data verified through cross-chain verification;
[0103] A4: Build blocks based on the merkle tree and obtain block information.
[0104] For the specific implementation of A1-A4, please refer to the specific functions of the core layer of the Layer 2 network in the above embodiment, which will not be repeated here.
[0105] This embodiment discloses a cross-chain verification method based on a two-layer network. The second-layer network Layer2 independently performs cross-chain verification of business data, transferring the cross-chain verification processing pressure from the supervision chain to the second-layer network Layer2, reducing the burden of the supervision chain, and improving the efficiency of cross-chain verification, thereby improving the efficiency of reporting supervision data of the business chain and improving the scalability of the entire supervision chain system.
[0106] Based on the cross-chain verification method based on a two-layer network disclosed in the above embodiment, this embodiment correspondingly discloses a cross-chain verification device based on a two-layer network, including:
[0107] Data receiving unit, used to receive business data synchronized by business chain and cross-chain verification transactions;
[0108] A cross-chain verification unit, used to perform cross-chain verification on the cross-chain verification transaction;
[0109] A data storage unit, used to store the business data in a database if the verification is successful;
[0110] The block construction unit is used to construct blocks corresponding to batch business data verified through cross-chain verification and obtain block information;
[0111] The information uploading unit is used to upload the block information to the supervision chain for evidence storage.
[0112] In some embodiments, the data receiving unit is specifically used to receive the cross-chain verification transaction and the business data sent by the cross-chain middleware. The cross-chain verification transaction is that the cross-chain middleware synchronizes the business data and on-chain proof information corresponding to the business data evidence transaction after monitoring the business data evidence transaction on the business chain, and constructs it according to the on-chain proof information.
[0113] In some embodiments, the block construction unit is specifically used to calculate the hash value corresponding to the business data; batch collect the hash values corresponding to multiple business data verified through cross-chain; build a merkle tree according to the hash values corresponding to the multiple business data verified through cross-chain; build a block according to the merkle tree to obtain the block information.
[0114] In some embodiments, it also includes:
[0115] The log generation unit is used to generate a system log if the verification fails.
[0116] This embodiment discloses a cross-chain verification device based on a two-layer network. The second-layer network Layer2 independently performs cross-chain verification of business data, transferring the cross-chain verification processing pressure from the supervision chain to the second-layer network Layer2, reducing the burden of the supervision chain, and improving the efficiency of cross-chain verification, thereby improving the efficiency of reporting supervision data of the business chain and improving the scalability of the entire supervision chain system.
[0117] The embodiment of the present invention also discloses an electronic device, on which a Layer 2 network Layer2 is deployed, and the electronic device may be a server or a server cluster. The electronic device disclosed in this embodiment includes a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the cross-chain verification method based on the Layer 2 network described in any one of the implementation methods in the above embodiments.
[0118] An embodiment of the present invention further discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the cross-chain verification method based on a second-layer network described in any one of the implementation methods in the above embodiments is implemented.
[0119] An embodiment of the present invention also discloses a computer program product, including a computer program, which, when executed by a processor, implements the cross-chain verification method based on a second-layer network described in any one of the implementation methods in the above embodiments.
[0120] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0121] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0122] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0123] The above-mentioned embodiments may be combined arbitrarily. For the above description of the disclosed embodiments, the features recorded in the embodiments in this specification may be replaced or combined with each other, so that professional and technical personnel in this field can implement or use the present application.
[0124] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A cross-chain verification system based on a second-layer network, characterized in that: Including business chain, Layer 2 network and supervision chain; The business chain is used to store business data; The second-layer network Layer2 is used to receive the business data and cross-chain verification transactions synchronized by the business chain, perform cross-chain verification on the cross-chain verification transactions, and if the verification is successful, store the business data in the database, construct blocks corresponding to the batch business data that pass the cross-chain verification to obtain block information, and upload the block information to the supervision chain for evidence storage; The custody chain is used to store block information corresponding to business data verified across the chain; The second-layer network Layer2 is a side chain parallel to the supervision chain, including an interface layer, a service layer, a core layer and a storage layer; The interface layer is used to provide a cross-chain verification interface for cross-chain verification services, and receives the business data and cross-chain verification transactions synchronized by the business chain through the cross-chain verification interface; The service layer is used to provide cross-chain verification services for the cross-chain verification transactions received by the interface layer; The core layer is used to receive the cross-chain verified business data sent by the service layer, send the cross-chain verified business data to the storage layer, batch pack the cross-chain verified business data to build blocks, and obtain block information; The storage layer is used to store the business data verified through cross-chain into the database; The core layer comprises: A data storage component, used to send the business data verified through the cross-chain to the storage layer, and calculate the hash value of the business data verified through the cross-chain; Data batch processing component, used to batch collect the hash values corresponding to multiple business data verified through cross-chain verification; A merkle tree processing component is used to construct a merkle tree according to the hash values corresponding to the multiple business data verified through cross-chain, and generate a merkle tree root for proving that the hash value of the business data exists in the second-layer network Layer2; A block processing component, configured to construct a block according to the merkle tree, store the merkle tree root in a block header, and obtain the block information, wherein the block is associated with subsequent blocks through a block hash value; The chain management component is used to call the data storage function of the supervision chain to store the block information on the supervision chain.
2. According to the cross-chain verification system based on the second-layer network according to claim 1, it is characterized in that: Also includes: The cross-chain middleware is used to synchronize the business data and on-chain proof information corresponding to the business data notarization transaction after monitoring the business data notarization transaction on the business chain, construct a cross-chain verification transaction according to the on-chain proof information, and send the cross-chain verification transaction and the business data to the second-layer network Layer2.
3. The cross-chain verification system based on the second-layer network according to claim 1 is characterized in that: The custody chain is also used to obtain the cross-chain verified business data stored on the second-layer network Layer2 based on the block hash value, the previous block hash value and the merkle tree root in the stored block information.
4. The cross-chain verification system according to claim 1, characterized in that: The service layer is also used to generate a system log if the cross-chain verification of the business data fails.
5. A cross-chain verification method based on a second-layer network, characterized in that: The second-layer network Layer2 applied in the cross-chain verification system, the cross-chain verification method includes: Receive business data synchronized by the business chain and verify transactions across the chain; Performing cross-chain verification on the cross-chain verification transaction; If the verification is successful, the business data is stored in the database; Build blocks corresponding to batch business data verified through cross-chain verification and obtain block information; Upload the block information to the custody chain for evidence storage; The second-layer network Layer2 is a side chain parallel to the supervision chain, including an interface layer, a service layer, a core layer and a storage layer; Providing a cross-chain verification interface for cross-chain verification services through the interface layer, and receiving business data and cross-chain verification transactions synchronized by the business chain through the cross-chain verification interface; Providing, through the service layer, a cross-chain verification service for the cross-chain verification transaction received by the interface layer; The core layer receives the cross-chain verified business data sent by the service layer, sends the cross-chain verified business data to the storage layer, batch-packages the cross-chain verified business data into blocks, and obtains block information; The business data verified through the cross-chain is stored in the database through the storage layer; The core layer also includes: a data storage component, a data batch processing component, a merkle tree processing component, a block processing component and a chain management component; Sending the cross-chain verified business data to the storage layer through the data storage component, and calculating the hash value of the cross-chain verified business data; Batch collect hash values corresponding to multiple business data verified through cross-chain through the data batch processing component; Construct a merkle tree according to the hash values corresponding to the multiple business data verified through the cross-chain through the merkle tree processing component, and generate a merkle tree root for proving that the hash value of the business data exists in the second-layer network Layer2; Building a block according to the merkle tree through a block processing component, storing the merkle tree root in a block header, and obtaining the block information, wherein the block is associated with subsequent blocks through a block hash value; The data notarization function of the supervision chain is called through the chain management component to store the block information on the supervision chain.
6. The cross-chain verification method based on the second-layer network according to claim 5 is characterized in that: The receiving of service chain synchronized service data includes: Receive the cross-chain verification transaction and the business data sent by the cross-chain middleware. The cross-chain verification transaction is constructed by the cross-chain middleware after it monitors the business data evidence transaction on the business chain, synchronizing the business data and on-chain proof information corresponding to the business data evidence transaction, and based on the on-chain proof information.
7. The cross-chain verification method based on the second-layer network according to claim 5 is characterized in that: Also includes: If verification fails, a system log is generated.
Citation Information
Patent Citations
Supervisable privacy protection cross-block chain system based on CP-ABE
CN113595735A