Cross-chain data transmission method and system

By generating a linear key matrix and a set of security vectors to encrypt the data, and using a distributed storage system of main chain, parallel chain, and relay chain to transmit the data, the problems of security and efficiency in cross-chain data transmission are solved, and efficient and secure data transmission is achieved.

CN119519962BActive Publication Date: 2026-06-05CHINA MOBILE ZIJIN INNOVATION INST CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE ZIJIN INNOVATION INST CO LTD
Filing Date
2024-11-18
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

How to improve data transmission efficiency while ensuring the security of cross-chain data transmission has become an urgent problem to be solved.

Method used

A linear key matrix is ​​generated based on the access policies of each attribute. This matrix is ​​then combined with a set of security vectors and a master key to encrypt the data to be transmitted, generating the target encrypted ciphertext. This ciphertext is then transmitted through a distributed storage system consisting of a main chain, parallel chains, and a relay chain. An attribute-based encryption algorithm is used to resist quantum attacks.

Benefits of technology

It improves the overall execution efficiency, computing performance, and system security of blockchain network data transmission, ensuring the security and reliability of the data transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119519962B_ABST
    Figure CN119519962B_ABST
Patent Text Reader

Abstract

The application discloses a cross-chain data transmission method and system, relates to the technical field of blockchains, and applies to a data possession end. The method comprises the following steps: generating a corresponding linear key matrix according to an access strategy of each attribute; encrypting to-be-transmitted data according to a security vector set and the linear key matrix to obtain target encrypted ciphertext; sending the target encrypted ciphertext to a main chain, and storing the target encrypted ciphertext to a target storage position through the main chain, so that a data user end obtains the target encrypted ciphertext through a relay chain and a parallel chain. The blockchains in the data transmission system are divided into the main chain, the parallel chain and the relay chain. Then, data is stored on a distributed storage network. Finally, an attribute-based encryption algorithm is used to resist quantum attacks and ensure the safety of data in the transmission process, so that the overall execution efficiency, the computing performance and the system safety of the blockchain network data transmission are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and in particular to cross-chain data transmission methods and systems. Background Technology

[0002] With the advancement of science and technology, traditional factories, logistics and transportation, and traditional agriculture are undergoing digital transformation. Crucially vital in this digital revolution is the data from various IoT sensors. This data provides key information such as the environment and operating status of equipment. Proper use and analysis of this data by professionals can improve production technology, optimize resource allocation, significantly enhance the efficiency of factory production and transportation, and improve service quality. Different types of data can yield more information, leading to numerous demands for data transmission. Therefore, data management and cross-platform transmission have become key challenges in fields such as smart factories, enabling better data utilization.

[0003] Blockchain, an innovative technology that emerged alongside the introduction of digital currencies, is becoming a revolutionary force reshaping various industries. Essentially, blockchain is a distributed, decentralized ledger system that securely and publicly records various transactions within a computer network. Each part of the chain contains a timestamp and a cryptographic reference to the previous block, forming an immutable and chronologically ordered sequence. This sophisticated design ensures data integrity. Based on these characteristics, blockchain is well-suited as a distributed storage system for storing various types of IoT data. Furthermore, the rise of cross-chain technology allows for asset transfer and information sharing between different blockchains, further enhancing the interoperability of blockchain networks and providing a relatively secure and reliable platform for data transmission. Currently, cross-chain technology is widely used for data transmission between different smart factories. Therefore, how to improve data transmission efficiency while ensuring the security of cross-chain data transmission has become a pressing issue. Summary of the Invention

[0004] The main purpose of this application is to provide a cross-chain data transmission method and system, aiming to solve the technical problem of how to improve data transmission efficiency while ensuring the security of cross-chain data transmission.

[0005] To achieve the above objectives, this application proposes a cross-chain data transmission method, which is applied to the data owner and includes:

[0006] Generate the corresponding linear key matrix according to the access strategy of each attribute;

[0007] The data to be transmitted is encrypted using the security vector set and the linear key matrix to obtain the target encrypted ciphertext.

[0008] The target encrypted ciphertext is sent to the main chain, and the target encrypted ciphertext is stored in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and parachain.

[0009] In one embodiment, the step of encrypting the data to be transmitted based on the security vector set and the linear key matrix to obtain the target encrypted ciphertext includes:

[0010] Obtain the confidential value and retrieve the master key generated by the key generation terminal on the parachain;

[0011] The data to be transmitted is encrypted using the security vector set, the confidential value, the master key, and the linear key matrix to obtain the target encrypted ciphertext.

[0012] In one embodiment, the step of encrypting the data to be transmitted based on the security vector set, the confidential value, the master key, and the linear key matrix to obtain the target encrypted ciphertext includes:

[0013] A first computational ciphertext is generated based on the security vector set, the confidential value, and the master key;

[0014] Generate a second computational ciphertext based on the linear key matrix;

[0015] The target attribute ciphertext is determined based on the first computed ciphertext, the second computed ciphertext, and the attribute computed ciphertext;

[0016] The data to be transmitted is encrypted according to the target attribute ciphertext to obtain the target encrypted ciphertext.

[0017] In one embodiment, before the step of encrypting the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext, the method further includes:

[0018] Send the identity code to the key generator for authentication and obtain the authentication result;

[0019] When the authentication result is successful, the set of security vectors sent by the key generator is obtained.

[0020] To achieve the above objectives, this application proposes a cross-chain data transmission method, which is applied to the data user end, and the method includes:

[0021] A data transmission request is sent to the relay chain, and the data transmission request is authenticated by the relay chain.

[0022] When the blockchain authentication result is successful, obtain the data digest and data address;

[0023] Based on the data digest and the data address, the target encrypted ciphertext is obtained at the target storage location through the relay chain and parachain.

[0024] In one embodiment, the step of obtaining the data digest and data address when the blockchain authentication result is an authentication pass result includes:

[0025] When the blockchain authentication result is successful, data is locked based on time lock and preset hash lock, and a locked data packet is generated according to the attribute encryption strategy;

[0026] Upon receiving data confirmation information from a predetermined proportion of target nodes, the locked data packet is decrypted based on a predetermined subkey to obtain a data digest and a data address.

[0027] In one embodiment, after the step of obtaining the target encrypted ciphertext at the target storage location based on the data digest and the data address via the relay chain and parachain, the method further includes:

[0028] When the data usage conditions are met, the target encrypted ciphertext is decrypted based on the subkey set fed back by the key generation end to obtain the decrypted plaintext data;

[0029] When the decrypted plaintext data equals the preset plaintext data, the current decryption result is determined to be a successful decryption result;

[0030] Based on the successful decryption result, the data to be transmitted corresponding to the target encrypted ciphertext is obtained.

[0031] To achieve the above objectives, this application proposes a cross-chain data transmission method, which is applied at the key generation end, and the method includes:

[0032] The initialization process is performed based on the global attribute base and security parameters to determine the initialization result;

[0033] When the initialization result is a successful result, the attribute description matrix of each attribute is determined based on the preset matrix function and the attribute set;

[0034] The corresponding master key is generated based on the attribute description matrix and sent to the relay chain, so that the master key can be sent to the parachain through the relay chain.

[0035] In one embodiment, the cross-chain data transmission method further includes:

[0036] When a target attribute exists in the user attribute set, the target attribute vector is determined according to a preset vector function and the user attribute set.

[0037] Generate subkeys for each attribute based on the target attribute vector and the target random vector;

[0038] The subkeys of each attribute are aggregated to obtain a subkey set, and the subkey set is sent to the data user so that the data user can decrypt the target encrypted ciphertext according to the subkey set.

[0039] Furthermore, to achieve the above objectives, this application also proposes a cross-chain data transmission device, which includes:

[0040] The generation module is used to generate the corresponding linear key matrix according to the access strategy of each attribute;

[0041] The encryption module is used to encrypt the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext.

[0042] The transmission module is used to send the target encrypted ciphertext to the main chain and store the target encrypted ciphertext in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and the parallel chain.

[0043] In addition, to achieve the above objectives, this application also proposes a cross-chain data transmission device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the cross-chain data transmission method as described above.

[0044] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the cross-chain data transmission method described above.

[0045] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the cross-chain data transmission method described above.

[0046] In addition, to achieve the above objectives, this application also provides a cross-chain data transmission system, which includes a data ownership end, a data user end, and a key generation end. The data ownership end executes the cross-chain data transmission method according to any one of claims 1 to 4, the data user end executes the cross-chain data transmission method according to any one of claims 5 to 7, and the key generation end executes the cross-chain data transmission method according to claims 8 to 9.

[0047] This application generates a corresponding linear key matrix based on the access policies of each attribute; encrypts the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext; sends the target encrypted ciphertext to the main chain, and stores the target encrypted ciphertext in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and parachains. By dividing the blockchain in the data transmission system into a main chain, parachains, and relay chain, and then storing the data on a distributed storage network, and finally using an attribute-based encryption algorithm to resist quantum attacks to ensure data security during transmission, the overall execution efficiency, computational performance, and system security of blockchain network data transmission are improved. Attached Figure Description

[0048] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0049] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 A flowchart illustrating a cross-chain data transmission method applied to the data ownership end in this application;

[0051] Figure 2 This is a schematic diagram of the overall structure of a multi-layer blockchain data transmission system provided in Embodiment 1 of the cross-chain data transmission method applied to the data ownership end of this application;

[0052] Figure 3 A schematic diagram of the cross-chain data participants provided in Embodiment 1 of the cross-chain data transmission method applied to the data ownership end of this application;

[0053] Figure 4 This is a schematic diagram of the encryption and upload process provided in Embodiment 1 of the cross-chain data transmission method applied to the data owner in this application;

[0054] Figure 5 A flowchart illustrating a cross-chain data transmission method applied to a data user in this application;

[0055] Figure 6 This is a flowchart illustrating a first embodiment of the cross-chain data transmission method applied to the key generation end in this application.

[0056] Figure 7 A simplified flowchart illustrating the cross-chain data transmission method provided in Embodiment 1 of this application;

[0057] Figure 8 This is a schematic diagram of the module structure of the cross-chain data transmission device according to an embodiment of this application;

[0058] Figure 9 This is a schematic diagram of the device structure of the hardware operating environment involved in the cross-chain data transmission method in this application embodiment.

[0059] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0060] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0061] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0062] The main solution of this application embodiment is: generating a corresponding linear key matrix according to the access policy of each attribute; encrypting the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext; sending the target encrypted ciphertext to the main chain, and storing the target encrypted ciphertext in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and the parachain.

[0063] With the advancement of science and technology, traditional factories, logistics and transportation, and traditional agriculture are undergoing digital transformation. Crucially vital in this digital revolution is the data from various IoT sensors. This data provides key information such as the environment and operating status of equipment. Proper use and analysis of this data by professionals can improve production technology, optimize resource allocation, significantly enhance the efficiency of factory production and transportation, and improve service quality. Different types of data can yield more information, leading to numerous demands for data transmission. Therefore, data management and cross-platform transmission have become key challenges in fields such as smart factories, enabling better data utilization.

[0064] Blockchain, an innovative technology that emerged alongside the introduction of digital currencies, is becoming a revolutionary force reshaping various industries. Essentially, blockchain is a distributed, decentralized ledger system that securely and publicly records various transactions within a computer network. Each part of the chain contains a timestamp and a cryptographic reference to the previous block, forming an immutable and chronologically ordered sequence. This sophisticated design ensures data integrity. Based on these characteristics, blockchain is well-suited as a distributed storage system for storing various types of IoT data. Furthermore, the rise of cross-chain technology allows for asset transfer and information sharing between different blockchains, further enhancing the interoperability of blockchain networks and providing a relatively secure and reliable platform for data transmission. Currently, cross-chain technology is widely used for data transmission between different smart factories. Therefore, how to improve data transmission efficiency while ensuring the security of cross-chain data transmission has become a pressing issue.

[0065] This application proposes a method to generate corresponding linear key matrices based on access policies for each attribute; encrypt the data to be transmitted using a set of security vectors and the linear key matrix to obtain target encrypted ciphertext; send the target encrypted ciphertext to the main chain, and store the target encrypted ciphertext in a target storage location via the main chain, so that data users can obtain the target encrypted ciphertext through relay chains and parachains. By dividing the blockchain in the data transmission system into a main chain, parachains, and relay chains, and then storing the data on a distributed storage network, and finally using attribute-based encryption algorithms to resist quantum attacks and ensure data security during transmission, the overall execution efficiency, computational performance, and system security of blockchain network data transmission are improved.

[0066] Based on this, this application provides a cross-chain data transmission method, which is applied to the data ownership end, as described above. Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the cross-chain data transmission method of this application.

[0067] In this embodiment, the cross-chain data transmission method includes steps S10 to S40:

[0068] Step S10: Generate the corresponding linear key matrix according to the access strategy of each attribute;

[0069] It should be noted that this embodiment proposes a quantum cross-chain data transmission method based on attribute encryption. First, this proposal designs a layered blockchain architecture, dividing the blockchain in the data transmission system into three layers: the main chain, parallel chains, and the relay chain. Then, this proposal transfers data storage from the blockchain itself to a distributed storage network called Swarm (a decentralized storage and communication system), retaining only the hash value of the data on the blockchain. Finally, this proposal proposes a novel attribute-based encryption algorithm to resist quantum attacks and ensure data security during transmission. This proposal implements a cross-chain data transmission system, improving the overall execution efficiency, computational performance, and system security of blockchain network data transmission.

[0070] It is understood that this embodiment uses the data owner as the execution subject for illustration. The access policy refers to a set of access control schemes set by the data owner according to certain rules and conditions. The linear key matrix refers to the linear secret-sharing scheme matrix (LSSS).

[0071] In practice, the data owner chooses... , , and And formulate including Given the access policy K for each attribute, generate a Linear Key Sharing Scheme (LSSS) matrix. Finally, Release it.

[0072] It should be noted that, such as Figure 2As shown, based on the flow of cross-chain data, this embodiment divides the data into shared public data, shared private data, and basic data. According to different data classifications, the blockchain structure in cross-chain transmission has three layers: main chain, relay chain, and parallel chain. Among them, the main chain node is the core of the entire cross-chain transmission system, and its main responsibilities include: (1) processing and storing shared public data: This data is accessible to all users and nodes, such as transaction records, smart contract code, etc. (2) processing and storing private shared data: Although this part of the data is visible to some users or nodes, it still maintains a certain degree of privacy, such as business contracts between enterprises or personal identity information, etc. (3) maintaining the security and consistency of the network: through the consensus mechanism, it ensures that all nodes maintain consistency in the processing and storage of data, and prevents security issues such as double-spending; Parallel chains are designed to improve system performance and scalability, and their main functions include: (1) processing and storing basic data: This data is usually large and frequently changing, such as user account information, asset transfer records, etc. Parallel chains can distribute the pressure on the main chain. (2) improving system throughput: through parallel processing, the data processing capability of the entire blockchain system can be significantly improved. (3) Achieve vertical scaling capability: Without changing the existing blockchain architecture, performance can be improved by adding nodes or optimizing algorithms, with minimal impact on the existing blockchain network during the scaling process; Finally, the relay chain, as a bridge connecting different blockchains, is mainly responsible for: (1) Managing cross-chain data transmission: The relay chain is responsible for transmitting data between different blockchains, enabling users and nodes on different chains to communicate with each other. (2) Ensuring the security of cross-chain data transmission: Through complex encryption and verification mechanisms, the relay chain ensures that cross-chain data is not tampered with and prevents malicious attacks. In the multi-layer blockchain data transmission system, a storage model combining blockchain and Swarm is also adopted to obtain high-performance storage of system data.

[0073] It is understandable that, such as Figure 3As shown, to facilitate understanding of the data flow process in this embodiment, the system model is divided into multiple participating entities, including a distributed key generation system (key generation end), data owner (data ownership end), data user (data usage end), cross-chain physical model, and distributed storage system. Specifically: (1) The distributed key generation system collaboratively generates public parameters, constructs the main chain, and develops smart contracts for data sharing within the main chain; (2) The data owner uses specific technologies and tools to collect the required data from industrially generated sensors, further sorts and analyzes the data, clearly sets access conditions, formulates access strategies, and specifies which users have the right to access specific data under what circumstances. At the same time, to ensure the security and confidentiality of the data, this proposal provides a new type of encryption algorithm, which the data owner can use to encrypt the data. This process can convert the data into a form that is difficult for unauthorized personnel to understand and obtain, and can resist quantum attacks, greatly reducing the risk of data leakage and misuse. Finally, the encrypted data will be uploaded to the main chain through secure and reliable communication channels and technical means. The main chain typically has higher security and stability, enabling it to better store and manage this important data; (3) In this proposal, the data user is the ultimate beneficiary of the data and the main user of the system, responsible for receiving, processing, and analyzing the data. The data user applies for cross-chain data, obtains the data address, and downloads encrypted data from the high-performance storage system to the target chain based on the data address. Finally, the data user obtains the decryption key and public data from multiple nodes of the distributed key generation system, and uses the encryption algorithm proposed in this proposal to recover the original data and obtain the required information.

[0074] Step S20: Encrypt the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext;

[0075] It is understandable that the security vector set refers to the set of security vectors randomly generated by the distributed key generation system for the attribute elements in the attribute set, the data to be transmitted refers to the data that the data owner wants to transmit to the data user, and the target encrypted ciphertext refers to the ciphertext after the data to be transmitted has been encrypted.

[0076] In practice, data owners will identify themselves. The key is sent to the distributed key generation system for verification. The distributed key generation system randomly generates a security vector for each attribute element in the set U, denoted as [missing information]. And the security vector set The data is sent to the data owner to obtain a set of security vectors. Then, the data to be transmitted is encrypted using a linear key sharing scheme matrix. Finally, the encrypted ciphertext of the data to be transmitted is obtained, which is the target encrypted ciphertext.

[0077] In one feasible implementation, step S20 may include steps A21-A22:

[0078] Step A21: Obtain the confidential value and retrieve the master key generated by the key generation end on the parachain;

[0079] It should be noted that the confidential value refers to the private data used in the encryption or authentication process, the key generation end refers to the distributed key generation system, and the master key refers to the root key used to generate or derive other keys, which is used in this implementation to encrypt the data to be transmitted.

[0080] In practice, after the distributed key generation system completes initialization, a master key is generated and distributed to various parallel chains through the relay chain. The data owner then obtains the master key through the blockchain architecture. The confidential value is a randomly generated value used to generate keys, sign, or perform other security operations.

[0081] Step A22: Encrypt the data to be transmitted according to the security vector set, the confidential value, the master key, and the linear key matrix to obtain the target encrypted ciphertext.

[0082] It is understandable that the distributed key generation system randomly generates a set of security vectors for attribute elements in the attribute set, the private data used in the encryption or authentication process, the root key used to generate or derive other keys, and the linear key sharing scheme matrix to encrypt the data to be transmitted, and finally obtains the ciphertext after encrypting the data to be transmitted, that is, the target encrypted ciphertext.

[0083] In one feasible implementation, step A22 may include steps B221 to B224:

[0084] Step B221: Generate a first computational ciphertext based on the security vector set, the confidential value, and the master key;

[0085] It is understandable that the first computational ciphertext refers to the computational ciphertext corresponding to the confidential value. It is obtained by combining the set of security vectors randomly generated for the attribute elements in the attribute set by the distributed key generation system, the private data used in the encryption or authentication process, and the root key used to generate or derive other keys. Finally, the computational ciphertext corresponding to the confidential value is obtained based on the calculation result, which is the first computational ciphertext.

[0086] Step B222: Generate a second computational ciphertext based on the linear key matrix;

[0087] In specific implementation, the second computed ciphertext refers to the ciphertext corresponding to the linear key sharing scheme matrix. In this embodiment, the ciphertext is calculated based on the calculated linear key sharing scheme matrix, and finally the computed ciphertext of the linear key sharing scheme matrix is ​​obtained based on the calculation result, which is the second computed ciphertext.

[0088] Step B223: Determine the target attribute ciphertext based on the first computed ciphertext, the second computed ciphertext, and the attribute computed ciphertext;

[0089] It is understandable that the attribute computation ciphertext refers to the ciphertext corresponding to whether the attribute appears for the first time in the access policy, and the target attribute ciphertext refers to the ciphertext obtained by combining the first computation ciphertext, the second computation ciphertext, and the attribute computation ciphertext.

[0090] In practice, the ciphertext corresponding to the confidential value, the ciphertext corresponding to the linear key sharing scheme matrix, and the ciphertext corresponding to whether the attribute appears for the first time in the access policy are combined to obtain the target attribute ciphertext.

[0091] Step B224: Encrypt the data to be transmitted according to the target attribute ciphertext to obtain the target encrypted ciphertext.

[0092] In practice, the ciphertext obtained by combining the first calculated ciphertext, the second calculated ciphertext, and the attribute calculated ciphertext is used to encrypt the data to be transmitted, thereby obtaining the ciphertext corresponding to the data to be transmitted, i.e., the target encrypted ciphertext.

[0093] In one possible implementation, steps C21-C22 may be included before step S20:

[0094] Step C21: Send the identity code to the key generator for authentication and obtain the authentication result;

[0095] It is understandable that the identity code refers to the identity code of the data owner, and the authentication result refers to whether the authentication is successful.

[0096] In practice, the data owner identifies itself. The result is sent to the distributed key generation system for verification, thereby determining whether the data owner's authentication has passed, i.e., the authentication result.

[0097] Step C22: When the authentication result is successful, obtain the set of security vectors sent by the key generation end.

[0098] In practice, when the authentication result is successful, it indicates that the distributed key generation system will randomly generate security vectors for the attribute elements in the attribute set, then aggregate them into a security vector set, and send it to the data owner. After the data owner's authentication is successful, the data owner will obtain the security vector set sent by the distributed key generation system.

[0099] Step S30: Send the target encrypted ciphertext to the main chain, and store the target encrypted ciphertext in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and the parallel chain.

[0100] Understandably, the target storage location refers to a distributed storage system. After the data to be transmitted is encrypted, the data owner uploads the encrypted ciphertext to the main chain of the blockchain system. Only the hash value is stored on the blockchain, and the encrypted ciphertext is sent to the parallel chain through the relay chain and stored in the distributed storage system. This allows the data user to obtain the target encrypted ciphertext through the relay chain and parallel chain in the blockchain system when there is a data transmission request.

[0101] It should be noted that the data encryption process in this embodiment is as follows: Figure 4 As shown, the encryption algorithm proposed in this embodiment encrypts the data according to the following steps. Encryption. Step 1: The data owner obtains a security vector through identity verification on the main chain. The data owner then identifies themselves. The key is sent to the distributed key generation system for verification. The distributed key generation system randomly generates a security vector for each attribute element in the set U, denoted as [missing information]. And the security vector set Send to the data owner. Step 2: The data owner generates an LSSS matrix based on the access policy and selects a confidential value for calculation. The data owner selects... , , and And formulate including Given the access policy K for each attribute, generate a Linear Key Sharing Scheme (LSSS) matrix. Finally, Release. The data owner randomly selects a confidential value. To calculate Data owner obtains matrix Each line is denoted as , Then calculate. ,in Step 3: Upload the encrypted ciphertext to the corresponding blockchain storage layer. Represented as a sequence number in the attribute set. When the attribute When it first appears in policy K, the data owner extracts a vector, which, based on the attribute's ciphertext, can be represented as... and When the attribute When it appears again, record the index of the first occurrence as... At this point, the data owner will encrypt the text. Assign to And send it to the blockchain. The data owner will Upload to blockchain ( It is the number of duplicate attributes in the access strategy, and stores them. and .

[0102] This embodiment generates a corresponding linear key matrix based on the access policies of each attribute; encrypts the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext; sends the target encrypted ciphertext to the main chain, and stores the target encrypted ciphertext in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and parachains. By dividing the blockchain in the data transmission system into a main chain, parachains, and a relay chain, and then storing the data on a distributed storage network, and finally using an attribute-based encryption algorithm to resist quantum attacks and ensure data security during transmission, the overall execution efficiency, computational performance, and system security of blockchain network data transmission are improved.

[0103] Based on the first embodiment of this application applied to the data ownership end, in the first embodiment of this application applied to the data usage end, the content that is the same as or similar to the first embodiment applied to the data ownership end described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 5 The cross-chain data transmission method is applied to the data user end, and the method further includes steps S11 to S13:

[0104] Step S11: Send a data transmission request to the relay chain, and perform blockchain authentication on the data transmission request through the relay chain;

[0105] It is understood that in this embodiment, the data owner (data user) is used as the execution subject for illustration. A data transmission request refers to a formal request issued by the data user to the data owner, requesting the owner to transmit specific data.

[0106] In practice, before cross-chain interaction, users and regulatory agencies send registration requests to the blockchain system and undergo blockchain authentication to obtain the authentication results. Meanwhile, nodes on the main chain use data collection devices to collect data and utilize smart contracts. (Contract Chaincode A) and (Contract Chaincode B) facilitates cross-chain data transfer. In blockchain technology, chaincode refers to smart contracts deployed on a blockchain network. Chaincode typically contains business logic and data processing functions to implement specific business requirements. Contract chaincode refers to the part of these chaincodes that specifically implements a particular contract function.

[0107] Step S12: When the blockchain authentication result is successful, obtain the data digest and data address;

[0108] As can be understood, a data digest refers to a fixed-length string obtained by performing a hash function on the original data, while a data address refers to a unique identifier used to locate and access the data.

[0109] In practice, the requester uses To verify identities and process data to obtain a dataset. and data summary . Use time lock and hash lock Lock the data and generate data packets using an attribute-based encryption algorithm. Transmit data packets to the relay chain, where nodes are in time. A consensus is reached internally, and the weights are recombined. When half of the nodes return the results... Call the private key to pre-restore data to obtain and return the address This yields the data summary and data address.

[0110] In one feasible implementation, step S12 may include steps A121-A122:

[0111] Step A121: When the blockchain authentication result is a successful authentication result, data is locked based on a time lock and a preset hash lock, and a locked data packet is generated according to the attribute encryption strategy.

[0112] Understandably, a time lock refers to a locking mechanism that allows a transaction or data to be unlocked after a specific point in time or period of time. A preset hash lock refers to a locking mechanism that allows a transaction or data to be unlocked if the correct hash value is provided. An attribute encryption strategy refers to an attribute-based encryption algorithm. A locked data packet refers to a data packet generated by an attribute-based encryption algorithm.

[0113] In practice, the requester uses To verify identities and process data to obtain a dataset. and data summary . Use time lock and hash lock Lock the data and generate data packets using an attribute-based encryption algorithm.

[0114] Step A122: Upon receiving data confirmation information from a preset proportion of target nodes, the locked data packet is decrypted based on a preset subkey to obtain a data digest and a data address.

[0115] It is understood that the preset ratio refers to the pre-set node ratio. In this embodiment, the ratio is taken as 50% for example. The preset subkey refers to the pre-set private key, and the data confirmation information refers to the information confirming that the data has been received.

[0116] In practice, upon receiving confirmation of data receipt from 50% of the target nodes, a pre-set private key is used to pre-decrypt the data, obtaining a data digest and data address. This occurs when half of the nodes return their results. Call the private key to pre-restore data to obtain and return the address .

[0117] Step S13: Based on the data digest and the data address, obtain the target encrypted ciphertext at the target storage location through the relay chain and parachain.

[0118] In practice, based on the obtained data digest and data address, the target encrypted ciphertext stored in the distributed storage system is obtained through the relay chain and parallel chain in the multi-layer blockchain data transmission system.

[0119] In one feasible implementation, steps A131 to A133 may be included after step S13:

[0120] Step A131: When the data usage conditions are met, the target encrypted ciphertext is decrypted based on the subkey set fed back by the key generation end to obtain the decrypted plaintext data.

[0121] Understandably, data usage conditions refer to a series of rules and restrictions that data users must abide by in order to ensure the security, privacy and compliance of the data; subkey set refers to the set of keys used for decryption of each attribute; and decrypted plaintext data refers to the original data obtained from the decryption process.

[0122] In practice, when the data user meets the data usage conditions, the encrypted ciphertext is decrypted based on the subkey set fed back by the key generator to obtain the original data after decryption, i.e., the decrypted plaintext data.

[0123] Step A132: When the decrypted plaintext data equals the preset plaintext data, the current decryption result is determined to be a successful decryption result;

[0124] It is understandable that the preset plaintext data refers to the unencrypted original data. That is, when the data obtained by decryption is consistent with the unencrypted original data, it indicates that the current decryption result is a successful decryption result.

[0125] Step A133: Obtain the data to be transmitted corresponding to the target encrypted ciphertext based on the successful decryption result.

[0126] In practice, when the decryption process is successful, it indicates that the data user has obtained the data to be transmitted corresponding to the target encrypted ciphertext, that is, the data transmission is complete.

[0127] It should be noted that data users generate corresponding keys through user attribute verification and perform calculations by traversing access policies. Assume the data user meets the following conditions. It can be calculated Make Users can further calculate Assuming the data user meets the usage conditions, the result is... Equivalent to plaintext The data can be accessed.

[0128] It should be noted that this embodiment optimizes and innovates the cross-chain data transmission process based on the concepts of Hash Time Locked Contract (HTLC) and relay chain to achieve cross-chain data transmission and supervision. The specific operation steps are as follows: Step 1: Cross-chain data transmission preparation: (1) Before cross-chain interaction, users and regulatory agencies send registration requests in the blockchain system and obtain blockchain certification. (2) Nodes on the main chain use data collection devices to collect data and utilize smart contracts. and To facilitate cross-chain data transmission. Step 2: Data locking and transmission. In this process, Hash Time Locking Contract (HTLC) is used to lock data on the relay chain to ensure the security of data during cross-chain transmission. At the same time, the relay chain is used to coordinate the data transmission between the main chain and parallel chains to ensure the consistency and integrity of data during transmission. (1) The request initiator uses To verify identities and process data to obtain a dataset. and data summary (2) Use time lock and hash lock Lock the data and generate data packets using an attribute-based encryption algorithm. (3) Transmit data packets to the relay chain, where nodes are in time. A consensus is reached internally, and the weights are recombined. (4) When half of the nodes return the results... Call the private key to pre-restore data to obtain and return the address (5) Address Using the same hash lock locking, and The mutual calls between them enable the unlocking of data within a specified time. And securely store the data. (6) For cross-chain regulatory data, the main chain regulatory node initiates a data viewing request and uses a smart contract. and To record and monitor cross-chain data. (7) Verify the regulatory body, send regulatory requests to the parachain, and standardize the request data. (8) Parachains use a scalable Practical Byzantine Fault Tolerance (SPBFT) consensus mechanism to transmit data to . Set a hash lock for the data and time lock Encrypt the data and upload it to the relay chain. (9) The winning node in the relay chain game sorts the data and sends it to the relay chain. After pre-decryption, Use the same hash lock to lock the regulatory agency's call information. (10) pass and The mutual calls between them are used to unlock the data. Data Send to the regulatory authorities Information accessed by regulatory authorities The data is stored on a parallel blockchain, thus enabling the supervision and storage of data interaction records.

[0129] Understandably, during cross-chain data transmission, a consensus mechanism is implemented through a relay chain to ensure that all participants reach a consensus on the consistency of data transmission. After verification, the data is unlocked on the parachain, allowing users to access the decrypted data. During cross-chain data transmission, regulatory agencies monitor the entire process through the relay chain to ensure compliance. All cross-chain data transmission records and status updates are audited and logged on the main chain.

[0130] This embodiment sends a data transmission request to a relay chain, which then performs blockchain authentication on the request. If the authentication result is successful, a data digest and a data address are obtained. Based on the data digest and the data address, the target encrypted ciphertext is retrieved from the target storage location via the relay chain and parachains. This multi-layered blockchain architecture simplifies the data transmission process, enabling data transfer between different layers and ensuring flexibility and efficiency in data flow. The HTLC mechanism utilizes a relay chain to optimize cross-blockchain data transmission and ensures the security of real-time data transmission within the multi-layered blockchain system. Simultaneously, HTLC imposes time limits on transactions to prevent malicious activity.

[0131] Based on the first embodiment of this application applied to the data ownership end and / or the first embodiment applied to the data usage end, in the first embodiment of this application applied to the key generation end, the content that is the same as or similar to the first embodiment applied to the data ownership end and / or the first embodiment applied to the data usage end can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 The cross-chain data transmission method is applied at the key generation end, and the method further includes steps S21-S23:

[0132] Step S21: Perform initialization processing based on the global attribute base and security parameters, and determine the initialization result;

[0133] It is understood that this embodiment uses the key generation end (distributed key generation system) as the execution subject for illustration. The global attribute base refers to a set of attributes and related parameters defined and managed throughout the entire system. The security parameter refers to the key value used to measure and control the security of the encryption system.

[0134] In practice, the distributed key generation system determines the global attribute base and selects security parameters for initialization, thereby determining the initialization result of the distributed key generation system.

[0135] Step S22: When the initialization result is a successful result, determine the attribute description matrix of each attribute based on the preset matrix function and the attribute set;

[0136] It is understandable that the preset matrix function refers to The function (trap generation function) and the attribute description matrix refer to the matrix used to describe the attributes.

[0137] In practical implementation, upon successful initialization of the distributed key generation system, based on... The function retrieves the matrix description of each attribute in the attribute set to obtain the attribute description matrix.

[0138] Step S23: Generate the corresponding master key according to the attribute description matrix and send it to the relay chain, so as to send the master key to the parachain through the relay chain.

[0139] In practical implementation, the distributed generation system through The function retrieves the matrix description of each attribute in the attribute set, generates a master key, and then distributes the generated master key and attribute matrix to each parachain through a relay chain.

[0140] It should be noted that the distributed key generation system determines the global attribute base. And select safety parameters and ,in Represents the number of attributes in U. , and Distributed key generation systems use The function is used to retrieve the matrix description of each attribute in the attribute set U. and At the same time, a master key is generated. The generated master key and attribute matrix are distributed to each parachain via a relay chain.

[0141] In one feasible implementation, the cross-chain data transmission method is applied at the key generation end, and the method further includes steps S221-S223:

[0142] Step S221: When a target attribute exists in the user attribute set, determine the target attribute vector according to the preset vector function and the user attribute set;

[0143] It is understandable that the target attribute refers to the pre-defined data attribute, the preset vector function refers to the pre-defined sample preprocessing function (SamplePre), and the target attribute vector refers to the vector corresponding to the attribute set.

[0144] In practical implementation, if the user has attributes Distributed key generation system execution function To obtain This yields the target attribute vector.

[0145] Step S222: Generate subkeys for each attribute based on the target attribute vector and the target random vector;

[0146] In practical implementation, the target random vector refers to the vector randomly selected by the distributed key generation system. As a user identifier, and for each attribute generate That is, the subkeys of each attribute.

[0147] Step S223: Summarize the subkeys of each attribute to obtain a subkey set, and send the subkey set to the data user terminal so that the data user terminal can decrypt the target encrypted ciphertext according to the subkey set.

[0148] In practice, a subkey set is obtained by summarizing the subkeys of each attribute, and then the subkey set is provided to the data user so that the data user can decrypt the target encrypted ciphertext according to the subkey set, obtain the data to be transmitted, and finally complete the data transmission.

[0149] It should be noted that if the user has attributes Distributed key generation system execution function To obtain Otherwise, the distributed key generation system will choose... To ensure Distributed key generation systems obtain ,in It is a satisfaction Random Gaussian parameters. Distributed key generation system randomly selects vectors. and obtain Distributed key generation system randomly selects... As a user identifier, and for each attribute generate For each access condition in access policy K, the distributed key generation system traverses the entire attribute set U and performs the following calculations. ,in Distributed key generation system will Provided to data users and published. .

[0150] This embodiment improves the encryption algorithm, reduces the size of the ciphertext set, and enables ciphertext set reuse, thereby increasing encryption and decryption efficiency and making data transmission more efficient. Attribute encryption based on lattice theory ensures post-quantum security of data transmission and effectively resists quantum attacks.

[0151] This embodiment initializes the data based on a global attribute base and security parameters to determine the initialization result. If the initialization result is successful, an attribute description matrix for each attribute is determined based on a preset matrix function and attribute set. A corresponding master key is generated based on the attribute description matrix and sent to the relay chain, which then transmits the master key to the parachain. By combining a distributed storage model with blockchain, data read / write performance is improved, supporting scalability for massive amounts of data. Simultaneously, a special data partitioning mechanism, access control strategy, and attribute encryption are combined to achieve fine-grained data storage and access control, while improving encryption and decryption efficiency, resulting in more efficient data transmission.

[0152] For example, to help understand the implementation flow of the cross-chain data transmission method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 7 , Figure 7 A simplified flowchart of a cross-chain data transmission method is provided. Specifically: In the algorithm initialization phase, the distributed key generation system first determines the global attribute base and selects security parameters, then generates a matrix description and master key for each attribute in the attribute set U. During data encryption, the data owner obtains a security vector through authentication, formulates an access policy to generate an LSSS matrix, randomly selects a confidential value for calculation, and uploads the processed ciphertext to the blockchain. In the key generation phase, the corresponding key is generated through user attribute verification, and calculations are performed iteratively through the access policy. The cross-chain data transmission mechanism draws on the ideas of hash time-locked contracts and relay chains to ensure the security and supervision of data during cross-chain transmission, involving steps such as authentication, data locking, consensus achievement, and data unlocking. Finally, in the data decryption phase, assuming the data user meets the conditions, the plaintext result can be calculated.

[0153] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the cross-chain data transmission method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0154] This application also provides a cross-chain data transmission device; please refer to... Figure 8 The cross-chain data transmission device is applied to the data ownership end, and the device includes:

[0155] The generation module 10 is used to generate the corresponding linear key matrix according to the access strategy of each attribute;

[0156] Encryption module 20 is used to encrypt the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext;

[0157] The transmission module 30 is used to send the target encrypted ciphertext to the main chain and store the target encrypted ciphertext in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and the parallel chain.

[0158] Optionally, the encryption module 20 is further configured to:

[0159] Obtain the confidential value and retrieve the master key generated by the key generation terminal on the parachain;

[0160] The data to be transmitted is encrypted using the security vector set, the confidential value, the master key, and the linear key matrix to obtain the target encrypted ciphertext.

[0161] Optionally, the encryption module 20 is further configured to:

[0162] A first computational ciphertext is generated based on the security vector set, the confidential value, and the master key;

[0163] Generate a second computational ciphertext based on the linear key matrix;

[0164] The target attribute ciphertext is determined based on the first computed ciphertext, the second computed ciphertext, and the attribute computed ciphertext;

[0165] The data to be transmitted is encrypted according to the target attribute ciphertext to obtain the target encrypted ciphertext.

[0166] Optionally, the encryption module 20 is further configured to:

[0167] Send the identity code to the key generator for authentication and obtain the authentication result;

[0168] When the authentication result is successful, the set of security vectors sent by the key generator is obtained.

[0169] This application also provides a cross-chain data transmission device, which is applied to a data user end, and the device includes:

[0170] The authentication module is used to send data transmission requests to the relay chain and perform blockchain authentication on the data transmission requests through the relay chain.

[0171] The acquisition module is used to obtain the data digest and data address when the blockchain authentication result is an authentication pass result;

[0172] The acquisition module is further configured to acquire the target encrypted ciphertext at the target storage location based on the data digest and the data address through the relay chain and parachain.

[0173] Optionally, the acquisition module is further configured to:

[0174] When the blockchain authentication result is successful, data is locked based on time lock and preset hash lock, and a locked data packet is generated according to the attribute encryption strategy;

[0175] Upon receiving data confirmation information from a predetermined proportion of target nodes, the locked data packet is decrypted based on a predetermined subkey to obtain a data digest and a data address.

[0176] Optionally, the acquisition module is further configured to:

[0177] When the data usage conditions are met, the target encrypted ciphertext is decrypted based on the subkey set fed back by the key generation end to obtain the decrypted plaintext data;

[0178] When the decrypted plaintext data equals the preset plaintext data, the current decryption result is determined to be a successful decryption result;

[0179] Based on the successful decryption result, the data to be transmitted corresponding to the target encrypted ciphertext is obtained.

[0180] This application also provides a cross-chain data transmission device, which is applied at a key generation end, and the device includes:

[0181] The initialization module is used to perform initialization processing based on the global attribute base and security parameters, and determine the initialization result;

[0182] The processing module is used to determine the attribute description matrix of each attribute based on a preset matrix function and attribute set when the initialization result is a successful result;

[0183] The sending module is used to generate a corresponding master key based on the attribute description matrix and send it to the relay chain, so as to send the master key to the parachain through the relay chain.

[0184] Optionally, the processing module is further configured to:

[0185] When a target attribute exists in the user attribute set, the target attribute vector is determined according to a preset vector function and the user attribute set.

[0186] Generate subkeys for each attribute based on the target attribute vector and the target random vector;

[0187] The subkeys of each attribute are aggregated to obtain a subkey set, and the subkey set is sent to the data user so that the data user can decrypt the target encrypted ciphertext according to the subkey set.

[0188] The cross-chain data transmission device provided in this application, employing the cross-chain data transmission method in the above embodiments, can solve the technical problem of how to improve data transmission efficiency while ensuring the security of cross-chain data transmission. Compared with the prior art, the beneficial effects of the cross-chain data transmission device provided in this application are the same as those of the cross-chain data transmission method provided in the above embodiments, and other technical features in the cross-chain data transmission device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0189] This application provides a cross-chain data transmission device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the cross-chain data transmission method in Embodiment 1 above.

[0190] The following is for reference. Figure 9 The diagram illustrates a structural schematic of a cross-chain data transmission device suitable for implementing embodiments of this application. The cross-chain data transmission device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 9 The cross-chain data transmission device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0191] like Figure 9As shown, the cross-chain data transfer device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the cross-chain data transfer device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the cross-chain data transmission device to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows cross-chain data transmission devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0192] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0193] The cross-chain data transmission device provided in this application, employing the cross-chain data transmission method described in the above embodiments, can solve the technical problem of how to improve data transmission efficiency while ensuring the security of cross-chain data transmission. Compared with the prior art, the beneficial effects of the cross-chain data transmission device provided in this application are the same as those of the cross-chain data transmission method provided in the above embodiments, and other technical features of this cross-chain data transmission device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0194] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0195] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0196] In addition, to achieve the above objectives, the present invention also proposes a cross-chain data transmission system, which includes the data ownership end, data usage end, and key generation end described above.

[0197] Since this cross-chain data transmission system adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.

[0198] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the cross-chain data transmission method in the above embodiments.

[0199] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, 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), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0200] The aforementioned computer-readable storage medium may be included in the cross-chain data transmission device; or it may exist independently and not assembled into the cross-chain data transmission device.

[0201] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the cross-chain data transmission device, the cross-chain data transmission device: generates a corresponding linear key matrix according to the access policies of each attribute; encrypts the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext; sends the target encrypted ciphertext to the main chain, and stores the target encrypted ciphertext in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and parachain.

[0202] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0203] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0204] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0205] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described cross-chain data transmission method. This solves the technical problem of how to improve data transmission efficiency while ensuring the security of cross-chain data transmission. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the cross-chain data transmission method provided in the above embodiments, and will not be repeated here.

[0206] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the cross-chain data transmission method described above.

[0207] The computer program product provided in this application solves the technical problem of how to improve data transmission efficiency while ensuring the security of cross-chain data transmission. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the cross-chain data transmission method provided in the above embodiments, and will not be repeated here.

[0208] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A cross-chain data transmission method, characterized in that, The cross-chain data transmission method is applied at the key generation end, and the method includes: The initialization process is performed based on the global attribute base and security parameters to determine the initialization result; When the initialization result is a successful result, the attribute description matrix of each attribute is determined based on the preset matrix function and the attribute set; The corresponding master key is generated based on the attribute description matrix and sent to the relay chain, so that the master key can be sent to the parachain through the relay chain; When a target attribute exists in the user attribute set, the target attribute vector is determined according to a preset vector function and the user attribute set. Generate subkeys for each attribute based on the target attribute vector and the target random vector; The subkeys of each attribute are aggregated to obtain a subkey set, and the subkey set is sent to the data user so that the data user can decrypt the target encrypted ciphertext according to the subkey set.

2. A cross-chain data transmission method, characterized in that, The cross-chain data transfer method is applied to the data owner, and the method includes: Generate the corresponding linear key matrix according to the access strategy of each attribute; Obtain the confidential value and retrieve the master key generated by the key generation terminal on the parachain; The data to be transmitted is encrypted using the security vector set, the confidential value, the master key, and the linear key matrix to obtain the target encrypted ciphertext. The target encrypted ciphertext is sent to the main chain, and the target encrypted ciphertext is stored in the target storage location through the main chain, so that the data user can obtain the target encrypted ciphertext through the relay chain and the parachain. The key generation end is used to execute the method of claim 1.

3. The method as described in claim 2, characterized in that, The step of encrypting the data to be transmitted based on the security vector set, the confidential value, the master key, and the linear key matrix to obtain the target encrypted ciphertext includes: A first computational ciphertext is generated based on the security vector set, the confidential value, and the master key; Generate a second computational ciphertext based on the linear key matrix; The target attribute ciphertext is determined based on the first computed ciphertext, the second computed ciphertext, and the attribute computed ciphertext; The data to be transmitted is encrypted according to the target attribute ciphertext to obtain the target encrypted ciphertext.

4. The method as described in claim 2, characterized in that, Before the step of encrypting the data to be transmitted according to the security vector set and the linear key matrix to obtain the target encrypted ciphertext, the method further includes: Send the identity code to the key generator for authentication and obtain the authentication result; When the authentication result is successful, the set of security vectors sent by the key generator is obtained.

5. A cross-chain data transmission method, characterized in that, The cross-chain data transmission method is applied to the data user end, and the method includes: A data transmission request is sent to the relay chain, and the data transmission request is authenticated by the relay chain. When the blockchain authentication result is successful, obtain the data digest and data address; Based on the data digest and the data address, the target encrypted ciphertext is obtained at the target storage location through the relay chain and parachain; When the data usage conditions are met, the target encrypted ciphertext is decrypted based on the subkey set fed back by the key generation end to obtain the decrypted plaintext data; When the decrypted plaintext data equals the preset plaintext data, the current decryption result is determined to be a successful decryption result; The data to be transmitted corresponding to the target encrypted ciphertext is obtained based on the successful decryption result, and the key generation end is used to execute the method described in claim 1.

6. The method as described in claim 5, characterized in that, The step of obtaining the data digest and data address when the blockchain authentication result is a successful authentication result includes: When the blockchain authentication result is successful, data is locked based on time lock and preset hash lock, and a locked data packet is generated according to the attribute encryption strategy; Upon receiving data confirmation information from a predetermined proportion of target nodes, the locked data packet is decrypted based on a predetermined subkey to obtain a data digest and a data address.

7. A cross-chain data transmission system, characterized in that, The cross-chain data transmission system includes a data ownership end, a data usage end, and a key generation end. The key generation end executes the cross-chain data transmission method as described in claim 1. The data ownership end executes the cross-chain data transmission method as described in any one of claims 2 to 4. The data usage end executes the cross-chain data transmission method as described in any one of claims 5 to 6.