Data transmission method and device based on blockchain and trusted execution environment

By using data transmission methods based on blockchain and trusted execution environment in the Internet of Things environment, through encrypted splicing and multiple encryption processing, the problem of low data transmission security is solved, and the security and privacy of the data transmission process are achieved. Protect.

CN118368155BActive Publication Date: 2024-08-30GUANGDONG PLANNING & DESIGNING INST OF TELECOMM +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410797600.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-08-30
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

In the Internet of Things environment, it is difficult for existing technologies to effectively ensure the security of data transmission, resulting in low security of data transmission caused by malicious data sources or gateways, threatening users' privacy security.

Method used

Using a data transmission method based on blockchain and trusted execution environment, the first terminal node negotiates the public key and secret key with the gateway node, and performs encryption splicing processing and multiple encryption processing to ensure the security of the data during the transmission process, and Decrypt and store on-chain in the target gateway node, and perform on-chain storage when preset conditions are met.

Benefits of technology

It improves the accuracy and security of data transmission path determination, enhances the verification accuracy and decryption security of transmission data of gateway nodes, reduces the risk of network attacks, and protects the identity privacy of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118368155B
    Figure CN118368155B
Patent Text Reader

Abstract

The present invention relates to the field of blockchain technology, and discloses a data transmission method and device based on blockchain and a trusted execution environment, the method comprising: a first terminal node determines a transmission path according to the acquired transmission data, the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment and has a corresponding public key and a first key obtained through negotiation with the first terminal node; according to all public keys, all first keys and a preset first encryption splicing algorithm, a preset first encryption splicing process is performed on the transmission data to obtain encrypted transmission data; according to the transmission path, the encrypted transmission data is transmitted to a target gateway node, so that the target gateway node decrypts the encrypted transmission data according to the first key and its own private key in the trusted execution environment, and performs a preset on-chain storage operation on the encrypted transmission data after decryption when the encrypted transmission data meets the preset on-chain storage condition. It can be seen that the implementation of the present invention can improve the security of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a data transmission method and device based on blockchain and a trusted execution environment. Background Art

[0002] With the continuous development of Internet of Things technology, more and more application scenarios have realized the interconnection of all things, bringing great convenience to users' production and life.

[0003] In the IoT environment, whether the data collection, transmission and final storage process of the terminal device is safe and reliable is a key factor affecting whether users can use trusted data. Although the existing technology can ensure the basic security of user data transmission through blockchain, in actual application scenarios, there will still be situations where the data transmission security is not high due to factors such as malicious data sources and malicious gateways, causing users to use unreliable data and even threatening their privacy security.

[0004] It can be seen that it is particularly important to propose a technical solution to improve the security of data transmission. Summary of the invention

[0005] The present invention provides a data transmission method and device based on blockchain and a trusted execution environment, which can improve the security of data transmission.

[0006] In order to solve the above technical problems, the first aspect of the present invention discloses a data transmission method based on blockchain and a trusted execution environment, the method comprising:

[0007] The first terminal node determines a transmission path according to the acquired transmission data, wherein the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment, each of the gateway nodes has a corresponding public key and a first key obtained through negotiation with the first terminal node, and the gateway nodes include a target gateway node;

[0008] The first terminal node performs a preset first encryption splicing processing operation on the transmission data according to all the public keys, all the first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data;

[0009] The first terminal node transmits the encrypted transmission data to the target gateway node according to the transmission path, so that the target gateway node decrypts the encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and performs a preset on-chain storage operation on the decrypted encrypted transmission data when the decrypted encrypted transmission data meets the preset on-chain storage condition.

[0010] As an optional implementation, in the first aspect of the present invention, the preset first encryption splicing algorithm includes a preset first hash algorithm, a preset symmetric encryption algorithm, a preset asymmetric encryption algorithm and a preset second encryption splicing algorithm, and the first terminal node performs a preset first encryption splicing processing operation on the transmission data according to all the public keys, all the first keys and the preset first encryption splicing algorithm to obtain encrypted transmission data, including:

[0011] The first terminal node generates a data summary of the transmission data according to the preset first hash algorithm, and performs a first splicing processing operation on the data summary and the transmission data to obtain first spliced ​​data;

[0012] The first terminal node performs a first multi-signature processing operation on the first spliced ​​data according to all the first keys and the preset symmetric encryption algorithm to obtain second spliced ​​data;

[0013] The first terminal node performs a second splicing processing operation on the pre-generated device identification digest of the terminal device and the second splicing data to obtain third splicing data;

[0014] The first terminal node performs a second multi-signature processing operation on the third spliced ​​data according to all the public keys and the preset asymmetric encryption algorithm to obtain target transmission data;

[0015] The first terminal node performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm to obtain encrypted transmission data.

[0016] As an optional implementation, in the first aspect of the present invention, the transmission path also includes at least one second terminal node in the anonymous perception network, each of the second terminal nodes has corresponding routing information and a second key negotiated with the first terminal node, the second terminal node is a node of the first transmission sub-path between the first terminal node and a certain gateway node or a node of the second transmission sub-path between any two gateway nodes, and the first terminal node performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm to obtain encrypted transmission data, including:

[0017] The first terminal node performs multiple encryption processing operations on the target transmission data and all the routing information according to all the second keys and the preset order of the transmission paths obtained through negotiation with all the second terminal nodes to obtain encrypted transmission data;

[0018] The preset order includes a forward order or a reverse order.

[0019] As an optional implementation manner, in the first aspect of the present invention, the first terminal node transmits the encrypted transmission data to the target gateway node according to the transmission path, including:

[0020] The first terminal node acts as the current transmission node, and transmits the encrypted transmission data to the downstream node of the current transmission node according to the transmission path, so that the downstream node acts as the new current transmission node, and decrypts the encrypted transmission data in this round according to the target key negotiated with the first terminal node corresponding to the new current transmission node, obtains the routing information of the new downstream node, and transmits the encrypted transmission data after this round of decryption to the new downstream node, so as to repeat the process of using the downstream node as the new current transmission node, and decrypting the encrypted transmission data in this round according to the target key negotiated with the first terminal node corresponding to the new current transmission node, obtains the routing information of the new downstream node, and transmits the encrypted transmission data after this round of decryption to the new downstream node, until the target gateway node is the new downstream node;

[0021] The target key includes the first key or the second key.

[0022] As an optional implementation, in the first aspect of the present invention, the target gateway node decrypts the encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage condition, performs a preset on-chain storage operation on the decrypted encrypted transmission data, including:

[0023] The target gateway node, in the trusted execution environment, performs a new round of decryption on the received decrypted encrypted transmission data according to the first key negotiated with the first terminal node and its own private key, to obtain a first device identification digest and decrypted transmission data, wherein the decrypted transmission data includes a first transmission data digest in the received decrypted encrypted transmission data, wherein the first transmission data digest is obtained based on the first device identification digest;

[0024] The target gateway node generates a second transmission data digest of the decrypted transmission data according to a preset second hash algorithm;

[0025] The target gateway node determines whether the first transmission data digest matches the second transmission data digest. When it is determined that the first transmission data digest matches the second transmission data digest, it is determined that the received decrypted encrypted transmission data meets the preset on-chain storage condition, and a preset on-chain storage operation is performed on the decrypted encrypted transmission data.

[0026] As an optional implementation manner, in the first aspect of the present invention, before the target gateway node determines whether the first transmission data digest matches the second transmission data digest, the method further includes:

[0027] The target gateway node queries the device information table maintained by the target gateway node according to the first device identification digest to determine the negotiation key corresponding to the first device identification digest;

[0028] The target gateway node decrypts the decrypted transmission data according to the negotiated key to obtain the first transmission data summary of the decrypted transmission data.

[0029] As an optional implementation, in the first aspect of the present invention, the preset uplink storage operation includes:

[0030] The target gateway node organizes the first device identification summary and the decrypted transmission data according to a preset uplink specification;

[0031] The target gateway node determines the uplink parameter information according to the sorted first device identification digest and the decrypted transmission data, and performs an uplink evidence storage operation matching the uplink parameter information;

[0032] The target gateway node encrypts the sorted first device identification summary and the decrypted transmission data according to the first key negotiated with the first terminal node, and sets a corresponding data initial access permission list, which includes at least the first terminal node and the target gateway node.

[0033] The second aspect of the present invention discloses a data transmission device based on blockchain and a trusted execution environment, the device comprising:

[0034] A determination module, configured to determine a transmission path according to the acquired transmission data, wherein the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment, each of the gateway nodes has a corresponding public key and a first key obtained through negotiation with the first terminal node, and the gateway nodes include a target gateway node;

[0035] A processing module, configured to perform a preset first encryption splicing processing operation on the transmission data according to all the public keys, all the first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data;

[0036] A transmission module is used to transmit the encrypted transmission data to the target gateway node according to the transmission path, so that the target gateway node decrypts the encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage condition, performs a preset on-chain storage operation on the decrypted encrypted transmission data.

[0037] As an optional implementation, in the second aspect of the present invention, the preset first encryption splicing algorithm includes a preset first hash algorithm, a preset symmetric encryption algorithm, a preset asymmetric encryption algorithm and a preset second encryption splicing algorithm, and the processing module performs a preset first encryption splicing processing operation on the transmission data according to all the public keys, all the first keys and the preset first encryption splicing algorithm, and the specific method of obtaining the encrypted transmission data includes:

[0038] Generate a data summary of the transmission data according to the preset first hash algorithm, and perform a first splicing processing operation on the data summary and the transmission data to obtain first spliced ​​data;

[0039] According to all the first keys and the preset symmetric encryption algorithm, perform a first multi-signature processing operation on the first spliced ​​data to obtain second spliced ​​data;

[0040] Performing a second splicing operation on the pre-generated device identification digest of the terminal device and the second splicing data to obtain third splicing data;

[0041] According to all the public keys and the preset asymmetric encryption algorithm, a second multi-signature processing operation is performed on the third spliced ​​data to obtain target transmission data;

[0042] According to the target transmission data and the preset second encryption splicing algorithm, a preset second encryption splicing processing operation is performed on the transmission data to obtain encrypted transmission data.

[0043] As an optional implementation, in the second aspect of the present invention, the transmission path also includes at least one second terminal node in the anonymous perception network, each of the second terminal nodes has corresponding routing information and a second key negotiated with the first terminal node, the second terminal node is a node of the first transmission sub-path between the first terminal node and a certain gateway node or a node of the second transmission sub-path between any two gateway nodes, and the processing module performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm, and the specific method of obtaining the encrypted transmission data includes:

[0044] According to the preset order of all the second keys and the transmission paths obtained through negotiation with all the second terminal nodes, performing multiple encryption processing operations on the target transmission data and all the routing information to obtain encrypted transmission data;

[0045] The preset order includes a forward order or a reverse order.

[0046] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the transmission module transmits the encrypted transmission data to the target gateway node according to the transmission path includes:

[0047] The first terminal node acts as the current transmission node, and transmits the encrypted transmission data to the downstream node of the current transmission node according to the transmission path, so that the downstream node acts as the new current transmission node, and decrypts the encrypted transmission data in this round according to the target key negotiated with the first terminal node corresponding to the new current transmission node, obtains the routing information of the new downstream node, and transmits the encrypted transmission data after this round of decryption to the new downstream node, so as to repeat the process of using the downstream node as the new current transmission node, and decrypting the encrypted transmission data in this round according to the target key negotiated with the first terminal node corresponding to the new current transmission node, obtains the routing information of the new downstream node, and transmits the encrypted transmission data after this round of decryption to the new downstream node, until the target gateway node is the new downstream node;

[0048] The target key includes the first key or the second key.

[0049] As an optional implementation, in the second aspect of the present invention, the transmission module enables the target gateway node in the trusted execution environment to decrypt the encrypted transmission data according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage condition, the specific manner in which the preset on-chain storage operation is performed on the decrypted encrypted transmission data includes:

[0050] The target gateway node, in the trusted execution environment, performs a new round of decryption on the received decrypted encrypted transmission data according to the first key negotiated with the first terminal node and its own private key, to obtain a first device identification digest and decrypted transmission data, wherein the decrypted transmission data includes a first transmission data digest in the received decrypted encrypted transmission data, wherein the first transmission data digest is obtained based on the first device identification digest;

[0051] The target gateway node generates a second transmission data digest of the decrypted transmission data according to a preset second hash algorithm;

[0052] The target gateway node determines whether the first transmission data digest matches the second transmission data digest. When it is determined that the first transmission data digest matches the second transmission data digest, it is determined that the received decrypted encrypted transmission data meets the preset on-chain storage condition, and a preset on-chain storage operation is performed on the decrypted encrypted transmission data.

[0053] As an optional implementation, in the second aspect of the present invention, the transmission module enables the target gateway node to query the device information table maintained by the target gateway node based on the first device identification digest before determining whether the first transmission data digest matches the second transmission data digest, so as to determine the negotiation key corresponding to the first device identification digest; the target gateway node decrypts the decrypted transmission data based on the negotiation key to obtain the first transmission data digest of the decrypted transmission data.

[0054] As an optional implementation, in the second aspect of the present invention, the preset chain storage operation includes:

[0055] The target gateway node organizes the first device identification summary and the decrypted transmission data according to a preset uplink specification;

[0056] The target gateway node determines the uplink parameter information according to the sorted first device identification digest and the decrypted transmission data, and performs an uplink evidence storage operation matching the uplink parameter information;

[0057] The target gateway node encrypts the sorted first device identification summary and the decrypted transmission data according to the first key negotiated with the first terminal node, and sets a corresponding data initial access permission list, which includes at least the first terminal node and the target gateway node.

[0058] The third aspect of the present invention discloses another data transmission device based on blockchain and trusted execution environment, the device comprising:

[0059] A memory storing executable program code;

[0060] a processor coupled to the memory;

[0061] The processor calls the executable program code stored in the memory to execute the data transmission method based on blockchain and trusted execution environment disclosed in the first aspect of the present invention.

[0062] The fourth aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the data transmission method based on blockchain and trusted execution environment disclosed in the first aspect of the present invention.

[0063] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0064] In an embodiment of the present invention, the first terminal node determines a transmission path based on the acquired transmission data, the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment, each gateway node has a corresponding public key and a first secret key obtained by negotiation with the first terminal node, and the gateway node includes a target gateway node; the first terminal node performs a preset first encryption splicing processing operation on the transmission data according to all public keys, all first secret keys and a preset first encryption splicing algorithm to obtain encrypted transmission data; the first terminal node transmits the encrypted transmission data to the target gateway node according to the transmission path, so that the target gateway node decrypts the encrypted transmission data in the trusted execution environment according to the first secret key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage condition, the preset on-chain storage operation is performed on the decrypted encrypted transmission data. It can be seen that the implementation of the present invention can determine, through the first terminal node, based on the acquired transmission data, a transmission path including at least one gateway node and each gateway node having a corresponding public key and a first key negotiated with the first terminal node, thereby improving the accuracy and security of determining the transmission path from the gateway node level. The first terminal node performs a preset first encryption splicing processing operation on the transmission data based on all public keys, all first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data, which can further improve the transmission security of the transmission data. The first terminal node transmits the encrypted transmission data to the target gateway node based on the transmission path, so that the target gateway node is in a trusted execution environment. , decrypt the encrypted transmission data according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage conditions, perform the preset on-chain storage operation on the decrypted encrypted transmission data, thereby improving the transmission data verification accuracy of the gateway node, improving the transmission data decryption security and decryption environment credibility of the gateway node, and improving the security and accuracy of on-chain storage of the transmission data, which is conducive to further protecting the identity privacy of the first terminal device while ensuring the security and credibility of the data transmission process, and is conducive to avoiding malicious acts by the gateway device and other terminal devices connected to the first terminal device, and reducing the risk of network attacks on data transmission and terminal devices. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0066] Figure 1 It is a flowchart of a data transmission method based on blockchain and a trusted execution environment disclosed in an embodiment of the present invention;

[0067] Figure 2 It is a general architecture diagram disclosed in an embodiment of the present invention;

[0068] Figure 3 It is a network structure diagram disclosed in an embodiment of the present invention;

[0069] Figure 4 It is a flowchart of another data transmission method based on blockchain and trusted execution environment disclosed in an embodiment of the present invention;

[0070] Figure 5 It is a structural schematic diagram of a data transmission device based on blockchain and a trusted execution environment disclosed in an embodiment of the present invention;

[0071] Figure 6 It is a structural schematic diagram of another data transmission device based on blockchain and trusted execution environment disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0072] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0073] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.

[0074] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0075] The present invention discloses a data transmission method and device based on blockchain and trusted execution environment, which can determine, through a first terminal node, based on the acquired transmission data, a transmission path including at least one gateway node, each of which has a corresponding public key and a first key obtained through negotiation with the first terminal node, thereby improving the accuracy and security of determining the transmission path from the gateway node level. The first terminal node performs a preset first encryption splicing processing operation on the transmission data based on all public keys, all first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data, thereby further improving the transmission security of the transmission data. The first terminal node transmits the encrypted transmission data to a target gateway node based on the transmission path, so that the target network In the trusted execution environment, the node decrypts the encrypted transmission data according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage conditions, performs the preset on-chain storage operation on the decrypted encrypted transmission data, thereby improving the transmission data verification accuracy of the gateway node, improving the transmission data decryption security of the gateway node and the credibility of the decryption environment, and improving the security and accuracy of the on-chain storage of the transmission data, which is conducive to further protecting the identity privacy of the first terminal device while ensuring the security and credibility of the data transmission process, and is conducive to avoiding the gateway device and other terminal devices connected to the first terminal device from doing evil, and reducing the risk of network attacks on data transmission and terminal devices. The following are detailed explanations.

[0076] Embodiment 1

[0077] See also Figure 1 , Figure 1 This is a flow chart of a data transmission method based on blockchain and trusted execution environment disclosed in an embodiment of the present invention. Figure 1 The data transmission method based on blockchain and trusted execution environment described can be applied to terminal devices, such as smart devices with perception functions, and can also be applied to blockchain devices, Internet of Things devices, and smart devices related to the above devices, including but not limited to smart home devices, cloud devices, edge computing devices, relay devices, base station devices, city management devices, and one or more of smart network devices, which are not limited in the embodiments of the present invention. Figure 1 As shown, the data transmission method based on blockchain and trusted execution environment may include the following operations:

[0078] 101. The first terminal node determines a transmission path according to the acquired transmission data, where the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment, each gateway node has a corresponding public key and a first key obtained through negotiation with the first terminal node, and the gateway node includes a target gateway node;

[0079] In the embodiment of the present invention, optionally, Figure 2 As shown, Figure 2 : is the overall architecture diagram of an embodiment of the present invention. The architecture involved in the above method can be divided into a perception layer, a gateway layer, a storage layer and an application layer, wherein the gateway layer includes a blockchain network, the perception layer includes an anonymous perception network, and the terminal devices constitute the anonymous perception network as terminal nodes, which are mainly responsible for data collection, integration, splicing, encryption and uploading of original data, etc. Further, the transmission path and the destination gateway are selected, and the key negotiation is carried out with other terminal nodes on the path to establish a secure transmission channel, and the data is transmitted to one or more gateway nodes through the anonymous network; the gateway device constitutes the blockchain network as a gateway (consensus) node, which is responsible for data verification, chaining and storage. Further, it has a trusted execution environment and a smart contract engine, which can maintain the device information table and control the node access of the perception network and the blockchain network; receive the data transmitted by the terminal node, perform integrity verification, chain storage and encrypted storage and other operations; communicate with other connected gateway nodes as a consensus node, generate and verify transactions, and maintain a distributed ledger.

[0080] Further optional, such as Figure 3 As shown, Figure 3 : is a network structure diagram of an embodiment of the present invention. Each gateway node in the above-mentioned blockchain network has the above-mentioned trusted execution environment, wherein the trusted execution environment is implemented based on hardware or software and is used to provide a secure and trusted computing environment to protect sensitive data and perform critical tasks. It aims to provide security mechanisms such as isolation, encryption and verification to prevent malicious attacks and isolate unauthorized access. The above-mentioned gateway node can communicate with other connected gateway nodes when acting as a consensus node, generate and verify transactions, and maintain a distributed ledger.

[0081] It should be noted that all decryption and data transmission processes and chain storage processes of the above-mentioned gateway nodes are executed in the above-mentioned trusted execution environment.

[0082] Further optionally, the above-mentioned transmission data is generated by sorting, integrating and packaging based on the original data collected by the first terminal node, and the standard for sorting and integration is the preset transmission requirement. Specifically, the preset transmission requirement can be one or more of format, style, size, etc.

[0083] 102. The first terminal node performs a preset first encryption splicing processing operation on the transmission data according to all public keys, all first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data;

[0084] In an embodiment of the present invention, as an optional implementation, the above-mentioned preset first encryption splicing algorithm includes a preset first hash algorithm, a preset symmetric encryption algorithm, a preset asymmetric encryption algorithm and a preset second encryption splicing algorithm. The above-mentioned first terminal node performs a preset first encryption splicing processing operation on the transmission data according to all public keys, all first keys and the preset first encryption splicing algorithm to obtain encrypted transmission data, which may include the following operations:

[0085] The first terminal node generates a data summary of the transmission data according to a preset first hash algorithm, and performs a first splicing processing operation on the data summary and the transmission data to obtain first spliced ​​data;

[0086] The first terminal node performs a first multi-signature processing operation on the first spliced ​​data according to all first keys and a preset symmetric encryption algorithm to obtain second spliced ​​data;

[0087] The first terminal node performs a second splicing processing operation on the pre-generated device identification digest of the terminal device and the second splicing data to obtain third splicing data;

[0088] The first terminal node performs a second multi-signature processing operation on the third spliced ​​data according to all public keys and a preset asymmetric encryption algorithm to obtain target transmission data;

[0089] The first terminal node performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm to obtain encrypted transmission data.

[0090] It can be seen that the implementation of this optional embodiment can generate a data summary of the transmission data through the first terminal node according to the preset first hash algorithm, and perform a first splicing processing operation on the data summary and the transmission data to obtain the first splicing data; further, through all the first keys and the preset symmetric encryption algorithm, a first multi-signature processing operation is performed on the first splicing data to obtain the second splicing data; and then the second splicing processing operation is performed on the pre-generated device identification summary of the terminal device and the second splicing data to obtain the third splicing data, and the first terminal node performs a second multi-signature processing operation on the third splicing data according to all public keys and the preset asymmetric encryption algorithm to obtain the target transmission data. Finally, the first terminal node performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm to obtain encrypted transmission data, so that the preset first encryption splicing algorithm including the preset first hash algorithm, the preset symmetric encryption algorithm, the preset asymmetric encryption algorithm and the preset second encryption splicing algorithm can perform the preset first encryption splicing processing operation on the transmission data to obtain encrypted transmission data, thereby improving the transmission security of the transmission data from the perspective of data encryption transmission.

[0091] In this optional embodiment, as an optional implementation, the above-mentioned transmission path also includes at least one second terminal node in the anonymous perception network, each second terminal node has corresponding routing information and a second key negotiated with the first terminal node, the second terminal node is a node of the first transmission sub-path between the first terminal node and a certain gateway node or a node of the second transmission sub-path between any two gateway nodes, and the above-mentioned first terminal node performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm to obtain encrypted transmission data, which may include the following operations:

[0092] The first terminal node performs multiple encryption processing operations on the target transmission data and all routing information according to the preset order of all second keys and transmission paths obtained through negotiation with all second terminal nodes to obtain encrypted transmission data;

[0093] The preset order includes a forward order or a reverse order.

[0094] In this optional embodiment, optionally, the multiple times of the multiple encryption processing operations may correspond to the second terminal nodes, and specifically, may correspond to the number of the second terminal nodes.

[0095] Further optionally, the first terminal node may be in the anonymity-aware network.

[0096] It can be seen that the implementation of this optional embodiment can perform multiple encryption processing operations on the target transmission data and all routing information through the first terminal node according to the forward order or reverse order of all second keys and transmission paths negotiated with all second terminal nodes, so as to obtain encrypted transmission data, thereby further improving the generation accuracy of the encrypted transmission data and further improving the transmission security of the transmission data through a variety of multiple encryption methods.

[0097] 103. The first terminal node transmits the encrypted transmission data to the target gateway node according to the transmission path, so that the target gateway node decrypts the encrypted transmission data in a trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and performs a preset on-chain storage operation on the decrypted encrypted transmission data when the decrypted encrypted transmission data meets the preset on-chain storage condition.

[0098] It can be seen that the implementation of the embodiment of the present invention can determine, through the first terminal node, based on the acquired transmission data, a transmission path including at least one gateway node and each gateway node having a corresponding public key and a first key negotiated with the first terminal node, thereby improving the accuracy and security of determining the transmission path from the gateway node level. The first terminal node performs a preset first encryption splicing processing operation on the transmission data based on all public keys, all first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data, which can further improve the transmission security of the transmission data. The first terminal node transmits the encrypted transmission data to the target gateway node based on the transmission path, so that the target gateway node can execute the encrypted transmission data in a trusted execution environment. In the embodiment, the encrypted transmission data is decrypted according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage conditions, the preset on-chain storage operation is performed on the decrypted encrypted transmission data, thereby improving the transmission data verification accuracy of the gateway node, improving the transmission data decryption security and the decryption environment credibility of the gateway node, and improving the security and accuracy of the on-chain storage of the transmission data, which is conducive to further protecting the identity privacy of the first terminal device while ensuring the security and credibility of the data transmission process, and is conducive to avoiding malicious acts by the gateway device and other terminal devices connected to the first terminal device, and reducing the risk of network attacks on data transmission and terminal devices.

[0099] Embodiment 2

[0100] See also Figure 4 , Figure 4 It is a flowchart of another data transmission method based on blockchain and trusted execution environment disclosed in an embodiment of the present invention. Figure 2 The data transmission method based on blockchain and trusted execution environment described can be applied to terminal devices, such as smart devices with perception functions, and can also be applied to blockchain devices, Internet of Things devices, and smart devices related to the above devices, including but not limited to smart home devices, cloud devices, edge computing devices, relay devices, base station devices, city management devices, and one or more of smart network devices, which are not limited in the embodiments of the present invention. Figure 4 As shown, the data transmission method based on blockchain and trusted execution environment may include the following operations:

[0101] 201. The first terminal node determines a transmission path according to the acquired transmission data, where the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment, each gateway node has a corresponding public key and a first key obtained through negotiation with the first terminal node, and the gateway node includes a target gateway node;

[0102] 202. The first terminal node performs a preset first encryption splicing processing operation on the transmission data according to all public keys, all first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data;

[0103] In the embodiment of the present invention, for the supplementary explanations on step 201 and step 202, please refer to the supplementary explanations on step 101 and step 102 in the first embodiment, and the embodiment of the present invention will not elaborate on them.

[0104] 203. The first terminal node serves as the current transmission node, and according to the transmission path, transmits the encrypted transmission data to the downstream node of the current transmission node, so that the downstream node serves as the new current transmission node, and according to the target key corresponding to the new current transmission node and negotiated with the first terminal node, performs this round of decryption on the encrypted transmission data, obtains the routing information of the new downstream node, and transmits the encrypted transmission data after this round of decryption to the new downstream node, and the downstream node that repeats the execution serves as the new current transmission node, and according to the target key corresponding to the new current transmission node and negotiated with the first terminal node, performs this round of decryption on the encrypted transmission data, obtains the routing information of the new downstream node, and transmits the encrypted transmission data after this round of decryption to the new downstream node, until the target gateway node is the new downstream node;

[0105] Wherein, the target key includes the first key or the second key;

[0106] It should be noted that when the above-mentioned downstream node is any of the above-mentioned gateway nodes, the operations of the above-mentioned gateway node in performing the corresponding current round of decryption and transmitting the encrypted transmission data after this round of decryption to the new downstream node are all performed in the trusted execution environment corresponding to the above-mentioned gateway node.

[0107] 204. The target gateway node decrypts the encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and performs a preset on-chain storage operation on the decrypted encrypted transmission data when the decrypted encrypted transmission data meets the preset on-chain storage condition.

[0108] It should be noted that step 204 is performed in the trusted execution environment of the target gateway node, and all the following limiting steps are similar, which will not be described in detail in the embodiment of the present invention.

[0109] It can be seen that the implementation of the embodiment of the present invention can further decrypt the encrypted transmission data through the downstream nodes layer by layer after obtaining the encrypted transmission data, and only allow the downstream nodes to know the upstream and downstream routing information. While ensuring the security and reliability of the data transmission process, the identity privacy of the first terminal device is further protected, which is beneficial to avoiding malicious acts by the gateway device and other terminal devices connected to the first terminal device, and reducing the risk of network attacks on data transmission and terminal devices.

[0110] In an embodiment of the present invention, as an optional implementation mode, the above-mentioned target gateway node decrypts the encrypted transmission data in a trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage condition, performs a preset on-chain storage operation on the decrypted encrypted transmission data, including:

[0111] The target gateway node performs a new round of decryption on the received decrypted encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and obtains the first device identification digest and the decrypted transmission data, wherein the decrypted transmission data includes the first transmission data digest in the received decrypted encrypted transmission data, and the first transmission data digest is obtained based on the first device identification digest;

[0112] The target gateway node generates a second transmission data digest for decrypting the transmission data according to a preset second hash algorithm;

[0113] The target gateway node determines whether the first transmission data digest matches the second transmission data digest. When it is determined that the first transmission data digest matches the second transmission data digest, it determines that the received decrypted encrypted transmission data meets the preset on-chain storage condition, and performs the preset on-chain storage operation on the decrypted encrypted transmission data.

[0114] It can be seen that the implementation of this optional embodiment can enable the target gateway node to perform a new round of decryption on the received decrypted encrypted transmission data according to the first key negotiated with the first terminal node and its own private key after receiving the above-mentioned decrypted encrypted transmission data, so as to obtain the first device identification digest and the decrypted transmission data, so as to further enable the target gateway node to generate a second transmission data digest of the decrypted transmission data according to the preset second hash algorithm, and to determine whether the first transmission data digest matches the second transmission data digest. When it is determined that the first transmission data digest matches the second transmission data digest, it is determined that the received decrypted encrypted transmission data meets the preset on-chain storage condition, and the preset on-chain storage operation is performed on the decrypted encrypted transmission data, which can further improve the transmission data verification accuracy of the gateway node, as well as improve the security and accuracy of the on-chain storage of the transmission data.

[0115] In this optional embodiment, as an optional implementation manner, before the target gateway node determines whether the first transmission data digest matches the second transmission data digest, the method may further include the following operations:

[0116] The target gateway node queries the device information table maintained by the target gateway node according to the first device identification digest to determine the negotiation key corresponding to the first device identification digest;

[0117] The target gateway node decrypts the decrypted transmission data according to the negotiated key to obtain a first transmission data summary of the decrypted transmission data.

[0118] It can be seen that the implementation of this optional embodiment can query the device information table maintained by the target gateway node according to the first device identification summary through the target gateway node to determine the negotiated key corresponding to the first device identification summary, and then decrypt the decrypted transmission data according to the negotiated key to obtain the first transmission data summary of the decrypted transmission data, thereby improving the accuracy of determining whether the first transmission data summary matches the second transmission data summary, that is, determining that the received decrypted encrypted transmission data meets the preset on-chain storage conditions, and performing the preset on-chain storage operation on the decrypted encrypted transmission data, which is conducive to improving the security and credibility of data on-chain storage.

[0119] In an optional embodiment, the above-mentioned preset chain storage operation may include:

[0120] The target gateway node organizes the first device identification summary and decrypts the transmission data according to the preset uplink specification;

[0121] The target gateway node determines the uplink parameter information according to the sorted first device identification digest and the decrypted transmission data, and performs the uplink evidence storage operation matching the uplink parameter information;

[0122] The target gateway node encrypts the sorted first device identification digest and decrypted transmission data according to the first key negotiated with the first terminal node, and sets a corresponding data initial access permission list, which includes at least the first terminal node and the target gateway node.

[0123] It can be seen that the implementation of this optional embodiment can further disclose specific on-chain storage operations, thereby improving the accuracy of determining on-chain parameter information through preset on-chain specifications, and further improving the execution accuracy of on-chain evidence storage operations. The target gateway node encrypts the sorted first device identification summary and decrypted transmission data according to the first key obtained through negotiation with the first terminal node, and sets the corresponding data initial access permission list, which can further improve the security and privacy of data storage, and help reduce the risk of user data privacy leakage.

[0124] Embodiment 3

[0125] See also Figure 5 , Figure 5It is a schematic diagram of the structure of a data transmission device based on blockchain and trusted execution environment disclosed in an embodiment of the present invention. The data transmission device based on blockchain and trusted execution environment can be applied to smart devices with perception functions, and can also be applied to blockchain devices, Internet of Things devices, and smart devices related to the above devices. The smart devices include but are not limited to one or more of smart home devices, cloud devices, edge computing devices, relay devices, base station devices, city management devices, and smart network devices, which are not limited in the embodiments of the present invention. Figure 5 As shown, the data transmission device based on blockchain and trusted execution environment may include a first terminal node 30, and the first terminal node 30 includes:

[0126] A determination module 301 is used to determine a transmission path according to the acquired transmission data, where the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment, each gateway node has a corresponding public key and a first key obtained through negotiation with the first terminal node, and the gateway node includes a target gateway node;

[0127] The processing module 302 is used to perform a preset first encryption splicing processing operation on the transmission data according to all public keys, all first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data;

[0128] The transmission module 303 is used to transmit the encrypted transmission data to the target gateway node according to the transmission path, so that the target gateway node decrypts the encrypted transmission data in a trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage condition, performs a preset on-chain storage operation on the decrypted encrypted transmission data.

[0129] It can be seen that the implementation of the embodiment of the present invention can determine, through the first terminal node, based on the acquired transmission data, a transmission path including at least one gateway node and each gateway node having a corresponding public key and a first key negotiated with the first terminal node, thereby improving the accuracy and security of determining the transmission path from the gateway node level. The first terminal node performs a preset first encryption splicing processing operation on the transmission data based on all public keys, all first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data, which can further improve the transmission security of the transmission data. The first terminal node transmits the encrypted transmission data to the target gateway node based on the transmission path, so that the target gateway node can execute the encrypted transmission data in a trusted execution environment. In the embodiment, the encrypted transmission data is decrypted according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage conditions, the preset on-chain storage operation is performed on the decrypted encrypted transmission data, thereby improving the transmission data verification accuracy of the gateway node, improving the transmission data decryption security and the decryption environment credibility of the gateway node, and improving the security and accuracy of the on-chain storage of the transmission data, which is conducive to further protecting the identity privacy of the first terminal device while ensuring the security and credibility of the data transmission process, and is conducive to avoiding malicious acts by the gateway device and other terminal devices connected to the first terminal device, and reducing the risk of network attacks on data transmission and terminal devices.

[0130] In the embodiment of the present invention, as an optional implementation, the above-mentioned preset first encryption splicing algorithm includes a preset first hash algorithm, a preset symmetric encryption algorithm, a preset asymmetric encryption algorithm and a preset second encryption splicing algorithm. The processing module 302 performs a preset first encryption splicing processing operation on the transmission data according to all public keys, all first keys and the preset first encryption splicing algorithm. The specific method of obtaining the encrypted transmission data includes:

[0131] Generate a data summary of the transmission data according to a preset first hash algorithm, and perform a first splicing processing operation on the data summary and the transmission data to obtain first spliced ​​data;

[0132] According to all the first keys and the preset symmetric encryption algorithm, a first multi-signature processing operation is performed on the first spliced ​​data to obtain second spliced ​​data;

[0133] Perform a second splicing operation on the pre-generated device identification digest of the terminal device and the second splicing data to obtain third splicing data;

[0134] According to all public keys and the preset asymmetric encryption algorithm, a second multi-signature processing operation is performed on the third spliced ​​data to obtain the target transmission data;

[0135] According to the target transmission data and the preset second encryption splicing algorithm, the preset second encryption splicing processing operation is performed on the transmission data to obtain encrypted transmission data.

[0136] It can be seen that the implementation of this optional embodiment can generate a data summary of the transmission data through the first terminal node according to the preset first hash algorithm, and perform a first splicing processing operation on the data summary and the transmission data to obtain the first splicing data; further, through all the first keys and the preset symmetric encryption algorithm, a first multi-signature processing operation is performed on the first splicing data to obtain the second splicing data; and then the second splicing processing operation is performed on the pre-generated device identification summary of the terminal device and the second splicing data to obtain the third splicing data, and the first terminal node performs a second multi-signature processing operation on the third splicing data according to all public keys and the preset asymmetric encryption algorithm to obtain the target transmission data. Finally, the first terminal node performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm to obtain encrypted transmission data, so that the preset first encryption splicing algorithm including the preset first hash algorithm, the preset symmetric encryption algorithm, the preset asymmetric encryption algorithm and the preset second encryption splicing algorithm can perform the preset first encryption splicing processing operation on the transmission data to obtain encrypted transmission data, thereby improving the transmission security of the transmission data from the perspective of data encryption transmission.

[0137] In this optional embodiment, as an optional implementation, the above-mentioned transmission path also includes at least one second terminal node in the anonymous perception network, each second terminal node has corresponding routing information and a second key negotiated with the first terminal node, the second terminal node is a node of the first transmission sub-path between the first terminal node and a certain gateway node or a node of the second transmission sub-path between any two gateway nodes, and the processing module 302 performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm, and the specific method of obtaining the encrypted transmission data includes:

[0138] Perform multiple encryption processing operations on the target transmission data and all routing information according to the preset order of all second keys and transmission paths obtained through negotiation with all second terminal nodes to obtain encrypted transmission data;

[0139] The preset order includes a forward order or a reverse order.

[0140] It can be seen that the implementation of this optional embodiment can perform multiple encryption processing operations on the target transmission data and all routing information through the first terminal node according to the forward order or reverse order of all second keys and transmission paths negotiated with all second terminal nodes, so as to obtain encrypted transmission data, thereby further improving the generation accuracy of the encrypted transmission data and further improving the transmission security of the transmission data through a variety of multiple encryption methods.

[0141] In the embodiment of the present invention, as another optional implementation, the specific manner in which the transmission module 303 transmits the encrypted transmission data to the target gateway node according to the transmission path includes:

[0142] The first terminal node acts as the current transmission node, and according to the transmission path, transmits the encrypted transmission data to the downstream node of the current transmission node, so that the downstream node acts as the new current transmission node, and according to the target key negotiated with the first terminal node corresponding to the new current transmission node, the encrypted transmission data is decrypted in this round, and the routing information of the new downstream node is obtained, and the encrypted transmission data after the decryption in this round is transmitted to the new downstream node, and the downstream node that is repeatedly executed is used as the new current transmission node, and according to the target key negotiated with the first terminal node corresponding to the new current transmission node, the encrypted transmission data is decrypted in this round, and the routing information of the new downstream node is obtained, and the encrypted transmission data after the decryption in this round is transmitted to the new downstream node, until the target gateway node is the new downstream node;

[0143] The target key includes the first key or the second key.

[0144] It can be seen that the implementation of the embodiment of the present invention can further decrypt the encrypted transmission data through the downstream nodes layer by layer after obtaining the encrypted transmission data, and only allow the downstream nodes to know the upstream and downstream routing information. While ensuring the security and reliability of the data transmission process, the identity privacy of the first terminal device is further protected, which is beneficial to avoiding malicious acts by the gateway device and other terminal devices connected to the first terminal device, and reducing the risk of network attacks on data transmission and terminal devices.

[0145] In this optional embodiment, as an optional implementation, the above-mentioned transmission module 303 enables the target gateway node to decrypt the encrypted transmission data in a trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage condition, the specific manner in which the preset on-chain storage operation is performed on the decrypted encrypted transmission data includes:

[0146] The target gateway node performs a new round of decryption on the received decrypted encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and obtains the first device identification digest and the decrypted transmission data, wherein the decrypted transmission data includes the first transmission data digest in the received decrypted encrypted transmission data, and the first transmission data digest is obtained based on the first device identification digest;

[0147] The target gateway node generates a second transmission data digest for decrypting the transmission data according to a preset second hash algorithm;

[0148] The target gateway node determines whether the first transmission data digest matches the second transmission data digest. When it is determined that the first transmission data digest matches the second transmission data digest, it determines that the received decrypted encrypted transmission data meets the preset on-chain storage condition, and performs the preset on-chain storage operation on the decrypted encrypted transmission data.

[0149] It can be seen that the implementation of this optional embodiment can enable the target gateway node to perform a new round of decryption on the received decrypted encrypted transmission data according to the first key negotiated with the first terminal node and its own private key after receiving the above-mentioned decrypted encrypted transmission data, so as to obtain the first device identification digest and the decrypted transmission data, so as to further enable the target gateway node to generate a second transmission data digest of the decrypted transmission data according to the preset second hash algorithm, and to determine whether the first transmission data digest matches the second transmission data digest. When it is determined that the first transmission data digest matches the second transmission data digest, it is determined that the received decrypted encrypted transmission data meets the preset on-chain storage condition, and the preset on-chain storage operation is performed on the decrypted encrypted transmission data, which can further improve the transmission data verification accuracy of the gateway node, as well as improve the security and accuracy of the on-chain storage of the transmission data.

[0150] In this optional embodiment, as another optional implementation method, the above-mentioned transmission module 303 enables the target gateway node to query the device information table maintained by the target gateway node based on the first device identification summary before determining whether the first transmission data summary matches the second transmission data summary to determine the negotiated key corresponding to the first device identification summary; the target gateway node decrypts the decrypted transmission data based on the negotiated key to obtain the first transmission data summary of the decrypted transmission data.

[0151] It can be seen that the implementation of this optional embodiment can query the device information table maintained by the target gateway node according to the first device identification summary through the target gateway node to determine the negotiated key corresponding to the first device identification summary, and then decrypt the decrypted transmission data according to the negotiated key to obtain the first transmission data summary of the decrypted transmission data, thereby improving the accuracy of determining whether the first transmission data summary matches the second transmission data summary, that is, determining that the received decrypted encrypted transmission data meets the preset on-chain storage conditions, and performing the preset on-chain storage operation on the decrypted encrypted transmission data, which is conducive to improving the security and credibility of data on-chain storage.

[0152] In this optional embodiment, as another optional implementation, the above-mentioned preset chain storage operation may include:

[0153] The target gateway node organizes the first device identification summary and decrypts the transmission data according to the preset uplink specification;

[0154] The target gateway node determines the uplink parameter information according to the sorted first device identification digest and the decrypted transmission data, and performs the uplink evidence storage operation matching the uplink parameter information;

[0155] The target gateway node encrypts the sorted first device identification digest and decrypted transmission data according to the first key negotiated with the first terminal node, and sets a corresponding data initial access permission list, which includes at least the first terminal node and the target gateway node.

[0156] It can be seen that the implementation of this optional embodiment can further disclose specific on-chain storage operations, thereby improving the accuracy of determining on-chain parameter information through preset on-chain specifications, and further improving the execution accuracy of on-chain evidence storage operations. The target gateway node encrypts the sorted first device identification summary and decrypted transmission data according to the first key obtained through negotiation with the first terminal node, and sets the corresponding data initial access permission list, which can further improve the security and privacy of data storage, and help reduce the risk of user data privacy leakage.

[0157] Embodiment 4

[0158] See also Figure 6 , Figure 6 It is a structural diagram of another data transmission device based on blockchain and trusted execution environment disclosed in an embodiment of the present invention. Among them, the data transmission device based on blockchain and trusted execution environment can be applied to smart devices with perception functions, and can also be applied to blockchain devices, Internet of Things devices, and smart devices related to the above devices. The smart devices include but are not limited to one or more of smart home devices, cloud devices, edge computing devices, relay devices, base station devices, city management devices, and smart network devices, which are not limited in the embodiments of the present invention. Figure 6 As shown, the data transmission device based on blockchain and trusted execution environment may include:

[0159] The memory 401 stores executable program codes.

[0160] A processor 402 is coupled to the memory 401 .

[0161] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the data transmission method based on blockchain and a trusted execution environment described in Embodiment 1 of the present invention or Embodiment 2 of the present invention.

[0162] Embodiment 5

[0163] An embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps of the data transmission method based on blockchain and a trusted execution environment described in Embodiment 1 or Embodiment 2 of the present invention.

[0164] Embodiment 6

[0165] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps of the data transmission method based on blockchain and a trusted execution environment described in Embodiment 1 or Embodiment 2.

[0166] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0167] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0168] Finally, it should be noted that the data transmission method and device based on blockchain and trusted execution environment disclosed in the embodiment of the present invention only discloses the preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A data transmission method based on blockchain and trusted execution environment, characterized in that: The method comprises: The first terminal node determines a transmission path according to the acquired transmission data, wherein the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment, each of the gateway nodes has a corresponding public key and a first key obtained through negotiation with the first terminal node, and the gateway nodes include a target gateway node; The first terminal node performs a preset first encryption splicing processing operation on the transmission data according to all the public keys, all the first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data; The first terminal node transmits the encrypted transmission data to the target gateway node according to the transmission path, so that the target gateway node decrypts the encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and performs a preset on-chain storage operation on the decrypted encrypted transmission data when the decrypted encrypted transmission data meets a preset on-chain storage condition; And, the preset first encryption splicing algorithm includes a preset first hash algorithm, a preset symmetric encryption algorithm, a preset asymmetric encryption algorithm and a preset second encryption splicing algorithm, and the first terminal node performs a preset first encryption splicing processing operation on the transmission data according to all the public keys, all the first keys and the preset first encryption splicing algorithm to obtain encrypted transmission data, including: The first terminal node generates a data summary of the transmission data according to the preset first hash algorithm, and performs a first splicing processing operation on the data summary and the transmission data to obtain first spliced ​​data; The first terminal node performs a first multi-signature processing operation on the first spliced ​​data according to all the first keys and the preset symmetric encryption algorithm to obtain second spliced ​​data; The first terminal node performs a second splicing processing operation on the pre-generated device identification digest of the first terminal node and the second splicing data to obtain third splicing data; The first terminal node performs a second multi-signature processing operation on the third spliced ​​data according to all the public keys and the preset asymmetric encryption algorithm to obtain target transmission data; The first terminal node performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm to obtain encrypted transmission data.

2. The data transmission method based on blockchain and trusted execution environment according to claim 1 is characterized in that: The transmission path also includes at least one second terminal node in the anonymous perception network, each of the second terminal nodes has corresponding routing information and a second key negotiated with the first terminal node, the second terminal node is a node of the first transmission sub-path between the first terminal node and a certain gateway node or a node of the second transmission sub-path between any two gateway nodes, and the first terminal node performs a preset second encryption splicing processing operation on the transmission data according to the target transmission data and the preset second encryption splicing algorithm to obtain encrypted transmission data, including: The first terminal node performs multiple encryption processing operations on the target transmission data and all the routing information according to all the second keys and the preset order of the transmission paths obtained through negotiation with all the second terminal nodes to obtain encrypted transmission data; The preset order includes a forward order or a reverse order.

3. The data transmission method based on blockchain and trusted execution environment according to claim 1 or 2, characterized in that: The first terminal node transmits the encrypted transmission data to the target gateway node according to the transmission path, including: The first terminal node acts as the current transmission node, and transmits the encrypted transmission data to the downstream node of the current transmission node according to the transmission path, so that the downstream node acts as the new current transmission node, and decrypts the encrypted transmission data in this round according to the target key negotiated with the first terminal node corresponding to the new current transmission node, obtains the routing information of the new downstream node, and transmits the encrypted transmission data after this round of decryption to the new downstream node, so as to repeat the process of using the downstream node as the new current transmission node, and decrypting the encrypted transmission data in this round according to the target key negotiated with the first terminal node corresponding to the new current transmission node, obtains the routing information of the new downstream node, and transmits the encrypted transmission data after this round of decryption to the new downstream node, until the target gateway node is the new downstream node; The target key includes the first key or the second key.

4. The data transmission method based on blockchain and trusted execution environment according to claim 3 is characterized in that: The target gateway node decrypts the encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and performs a preset on-chain storage operation on the decrypted encrypted transmission data when the decrypted encrypted transmission data meets a preset on-chain storage condition, including: The target gateway node, in the trusted execution environment, performs a new round of decryption on the received decrypted encrypted transmission data according to the first key negotiated with the first terminal node and its own private key, to obtain a first device identification digest and decrypted transmission data, wherein the decrypted transmission data includes a first transmission data digest in the received decrypted encrypted transmission data, wherein the first transmission data digest is obtained based on the first device identification digest; The target gateway node generates a second transmission data digest of the decrypted transmission data according to a preset second hash algorithm; The target gateway node determines whether the first transmission data digest matches the second transmission data digest. When it is determined that the first transmission data digest matches the second transmission data digest, it is determined that the received decrypted encrypted transmission data meets the preset on-chain storage condition, and a preset on-chain storage operation is performed on the decrypted encrypted transmission data.

5. The data transmission method based on blockchain and trusted execution environment according to claim 4 is characterized in that: Before the target gateway node determines whether the first transmission data digest matches the second transmission data digest, the method further includes: The target gateway node queries the device information table maintained by the target gateway node according to the first device identification digest to determine the negotiation key corresponding to the first device identification digest; The target gateway node decrypts the decrypted transmission data according to the negotiated key to obtain the first transmission data summary of the decrypted transmission data.

6. The data transmission method based on blockchain and trusted execution environment according to claim 4 or 5, characterized in that: The preset chain storage operation includes: The target gateway node organizes the first device identification summary and the decrypted transmission data according to a preset uplink specification; The target gateway node determines the uplink parameter information according to the sorted first device identification digest and the decrypted transmission data, and performs an uplink evidence storage operation matching the uplink parameter information; The target gateway node encrypts the sorted first device identification summary and the decrypted transmission data according to the first key negotiated with the first terminal node, and sets a corresponding data initial access permission list, which includes at least the first terminal node and the target gateway node.

7. A data transmission device based on blockchain and trusted execution environment, characterized in that: The device is used to execute the data transmission method based on blockchain and trusted execution environment according to any one of claims 1 to 6, and the device includes a first terminal node, and the first terminal node includes: A determination module, configured to determine a transmission path according to the acquired transmission data, wherein the transmission path includes at least one gateway node, the gateway node includes a trusted execution environment, each of the gateway nodes has a corresponding public key and a first key obtained through negotiation with the first terminal node, and the gateway nodes include a target gateway node; A processing module, configured to perform a preset first encryption splicing processing operation on the transmission data according to all the public keys, all the first keys and a preset first encryption splicing algorithm to obtain encrypted transmission data; A transmission module is used to transmit the encrypted transmission data to the target gateway node according to the transmission path, so that the target gateway node decrypts the encrypted transmission data in the trusted execution environment according to the first key negotiated with the first terminal node and its own private key, and when the decrypted encrypted transmission data meets the preset on-chain storage condition, performs a preset on-chain storage operation on the decrypted encrypted transmission data.

8. A data transmission device based on blockchain and trusted execution environment, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the data transmission method based on blockchain and trusted execution environment as described in any one of claims 1 to 6.

9. A computer storage medium, characterized in that The computer storage medium stores computer instructions, which, when called, are used to execute the data transmission method based on blockchain and trusted execution environment as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Block data transmission method and device based on block chain, and medium

    CN114520810A

  • Data transmission method and related equipment

    CN115706977A