A blockchain-based Internet of Things data transmission method and system
By introducing the blockchain mechanism and link fingerprint encryption into IoT data transmission, combined with the consensus mechanism and Merkel tree storage, the problem of insufficient security of the traditional IoT management model in massive data transmission is solved, and data transmission is realized High security and accuracy.
Patent Information
- Application Number
- CN202410940190.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-15
AI Technical Summary
The traditional IoT management model lacks a strong security mechanism when faced with massive data transmission, making it easy to become a target of hacker attacks, resulting in data being stolen, tampered with, or destroyed, making it difficult to ensure the accuracy of transmitted data.
Adopt a blockchain-based IoT data transmission method, build a blockchain IoT data transmission architecture, use edge nodes to verify device credit, establish communication links, encrypt data transmission through link fingerprints, and select accounting through a consensus mechanism People record device behavior data, generate Merkle trees and store them on the blockchain.
It significantly improves the security and accuracy of data transmission, prevents data from being stolen, tampered with or destroyed, ensures the integrity and transparency of data transmission, and enhances the system's anti-attack capabilities and decentralized features.
Smart Images

Figure CN118487875B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data transmission, and specifically relates to a blockchain-based Internet of Things data transmission method and system. Background Art
[0002] The Internet of Things (IoT) refers to a network system that connects various devices and sensors through the Internet to achieve information exchange and communication between devices, thereby realizing intelligent management and control. The core concept of the IoT is to connect various objects in the physical world through the Internet, enabling them to sense, communicate and collaborate, thereby improving efficiency, reducing costs, and creating new applications and services.
[0003] As more and more devices are connected to the Internet of Things, data transmission between IoT devices is becoming more frequent. When faced with massive data transmission, the traditional IoT management model is prone to becoming a target of hacker attacks due to the lack of a strong security mechanism, resulting in data being stolen, tampered with or destroyed, and it is difficult to ensure the accuracy of the transmitted data. Summary of the invention
[0004] In order to solve the technical problem that the traditional Internet of Things management model is prone to become the target of hacker attacks due to the lack of a strong security mechanism when facing massive data transmission, resulting in data theft, tampering or destruction, and it is difficult to ensure the accuracy of transmitted data, the present invention provides an Internet of Things data transmission method and system based on blockchain.
[0005] First aspect
[0006] The present invention provides an Internet of Things data transmission method based on blockchain, comprising:
[0007] S1: Constructing a blockchain-based IoT data transmission architecture, wherein the blockchain-based IoT data transmission architecture includes an IoT layer and a blockchain layer, wherein the IoT layer includes multiple IoT devices, and the blockchain layer includes edge nodes that manage IoT devices;
[0008] S2: Determine the sending end and receiving end of this data transmission from the IoT device;
[0009] S3: The sender and the receiver establish a communication link through their corresponding edge nodes;
[0010] S4: The sender uploads the data to be transmitted to the sender edge node, and the sender edge node verifies the credit of the sender and the receiver;
[0011] S5: When the credit of the sender and the receiver meets the requirements, the sender edge node collects the verification message from the verifier;
[0012] S6: Other IoT devices except the sender and receiver vote as validators;
[0013] S7: When the number of supporting votes from the verifier is greater than a preset number, the sending edge node encrypts the data to be transmitted through the link fingerprint and transmits it to the receiving edge node;
[0014] S8: The receiving edge node forwards the encrypted data to the receiving end.
[0015] Optionally, the credit of the IoT device is specifically:
[0016]
[0017] in, Cre i Indicates i The credit of each IoT device, T i Indicates i Trust of IoT devices Q i Represents the edge node pair i Task quality assessment of IoT devices, α Represents the weight coefficient of trust, 1- α Represents the weight coefficient of task quality assessment.
[0018] Optionally, the trustworthiness of the IoT device is specifically:
[0019]
[0020] in, T i Indicates i Trust of IoT devices l i Indicates i The number of legitimate messages sent by IoT devices, h i Indicates i The number of illegal messages sent by IoT devices, number i Indicates i The total number of messages sent by IoT devices, β represents the adjustment parameters of legal messages, c Indicates the tuning parameter for illegal messages.
[0021] Optionally, the encrypting the data to be transmitted by using the link fingerprint in S7 specifically includes:
[0022] S701: Convert the real-time signal-to-noise ratio into a binary value to form a signal-to-noise ratio indication value;
[0023] S702: Construct a link fingerprint of the communication link using the public key of the sender, the public key of the receiver, a pseudo-random number, and the signal-to-noise ratio indicator value:
[0024]
[0025] in, F represents the link fingerprint, SNR represents the signal-to-noise ratio, Q sender Represents the public key of the sender. Q recipient Represents the public key of the receiving end, N represents a pseudo-random number, Represents the exclusive OR operation;
[0026] S703: Encrypt the data to be transmitted using the link fingerprint:
[0027]
[0028] in, M Indicates encrypted data. C Indicates the data content to be transmitted. F represents the link fingerprint, S sender Indicates the sender's digital signature. S supporter Indicates the digital signature of the supporter, who is the verifier who casts the support vote. Represents the exclusive OR operation.
[0029] Optionally, the blockchain-based IoT data transmission method further includes:
[0030] S9: Select accountants from edge nodes based on the consensus mechanism, record all behavioral data of IoT devices through accountants, arrange them in chronological order, generate a Merkle tree of all transactions based on the hash value, store the Merkle tree in the block body of the block, and connect the block to the longest legal chain.
[0031] Optionally, the step of selecting a bookkeeper from the edge node according to the consensus mechanism in S9 specifically includes:
[0032] S901: Each edge node elects a full node through voting. The voting weight of each edge node depends on the credit of the edge node. The edge node with the highest number of votes is selected as a full node, and the remaining nodes are selected as light nodes.
[0033] S902: Each full node elects a bookkeeper through proof of work, and the full node that first solves the election problem will be the bookkeeper.
[0034] Optionally, the credit of the edge node is specifically:
[0035]
[0036] in, Cre j Indicates j The credit of edge nodes, W j Indicates j The importance evaluation of edge nodes, P j Indicates j Performance evaluation of edge nodes, C j Indicates j The node activity of edge nodes, D j Indicates j The historical influence of edge nodes, l 1 represents the weight coefficient of importance evaluation, l 2 represents the weight coefficient of performance evaluation, l 3 represents the weight coefficient of node activity, l 4 represents the weight coefficient of historical influence.
[0037] Optionally, the importance evaluation is specifically:
[0038]
[0039] in, B j Indicates j The stake held by edge nodes in the blockchain, J Represents a set of edge nodes;
[0040] The performance evaluation is specifically as follows:
[0041]
[0042] in, t j Indicates j The online time of an edge node, exp represents an exponential function with a natural constant as the base;
[0043] The node activity is specifically:
[0044]
[0045] in,v gj Indicates the historical consensus j The number of times an edge node casts a support vote, v bj Indicates the historical consensus j The number of times edge nodes vote against the v aj Indicates the historical consensus j The number of times an edge node does not vote, ln represents the logarithmic function with a natural constant as the base;
[0046] The historical impact is specifically:
[0047]
[0048] in, h j Indicates the historical consensus j The number of honest behaviors of edge nodes, f j Indicates the historical consensus j The number of malicious behaviors of edge nodes.
[0049] Optionally, the campaign question is specifically:
[0050] Find a random number r So that:
[0051]
[0052] in, Hash Represents a hash operation, r Represents a random number, blockhead Represents the block header, D Indicates the difficulty coefficient, target Indicates target preset value;
[0053] The difficulty coefficient is specifically:
[0054]
[0055] in, It represents the moving average of the time required to generate a block within the window. t e Indicates the expected time to generate a block.
[0056] Second aspect
[0057] The present invention provides a blockchain-based Internet of Things data transmission system, comprising a processor and a memory for storing processor executable instructions; the processor is configured to call the instructions stored in the memory to execute the blockchain-based Internet of Things data transmission method in the first aspect.
[0058] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0059] In the present invention, a blockchain-based Internet of Things data transmission architecture is constructed, a blockchain mechanism is introduced in the process of Internet of Things data transmission, and the transmitted data is encrypted through link fingerprints to prevent the data from being stolen, tampered with or destroyed, thereby ensuring the accuracy of data transmission and improving the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The preferred implementation modes will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and implementation methods of the present invention.
[0061] Figure 1 It is a flowchart of a blockchain-based Internet of Things data transmission method provided by the present invention.
[0062] Figure 2 It is a structural schematic diagram of a blockchain-based Internet of Things data transmission system provided by the present invention. DETAILED DESCRIPTION
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.
[0064] In order to simplify the drawings, only the parts related to the invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".
[0065] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0066] In this document, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection. It can be a mechanical connection or an electrical connection. It can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0067] In addition, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0068] Example 1
[0069] In one embodiment, the reference specification Figure 1 , showing a flow chart of a blockchain-based Internet of Things data transmission method provided by the present invention.
[0070] The present invention provides a blockchain-based Internet of Things data transmission method, comprising:
[0071] S1: Build a blockchain-based IoT data transmission architecture.
[0072] Among them, the blockchain-based IoT data transmission architecture includes an IoT layer and a blockchain layer. The IoT layer includes multiple IoT devices, and the blockchain layer includes edge nodes that manage IoT devices.
[0073] Furthermore, edge nodes can run to become full nodes, and full nodes can run to become bookkeepers.
[0074] S2: Determine the sender and receiver of this data transmission from the IoT device.
[0075] S3: The sender and the receiver establish a communication link through their respective edge nodes.
[0076] S4: The sender uploads the data to be transmitted to the sender edge node, and the sender edge node verifies the credit of the sender and the receiver.
[0077] S5: When the credit of the sender and the receiver meets the requirements, the sender edge node collects the verification message from the verifier.
[0078] Specifically, when the credit of the sender and the receiver is greater than the credit threshold, the sender edge node collects the verification message of the verifier. Those skilled in the art can set the credit threshold according to actual conditions, and the present invention does not limit it.
[0079] In the present invention, by verifying the credit of the sending end and the receiving end, it can be ensured that the devices participating in the data transmission are all credible, which reduces the risk of malicious devices participating in the data transmission and prevents the data from being tampered with or stolen.
[0080] In a possible implementation, the credit of the IoT device is specifically:
[0081]
[0082] in, Cre i Indicates i The credit of each IoT device, T i Indicates i Trust of IoT devices Q i Represents the edge node pair i Task quality assessment of IoT devices, α Represents the weight coefficient of trust, 1- α Represents the weight coefficient of task quality assessment.
[0083] Among them, those skilled in the art can set the weight coefficient of the trustworthiness of the legitimate message according to the actual situation. α The present invention does not limit the size.
[0084] Optionally, the trust level of the IoT device is specifically:
[0085]
[0086] in, T i Indicates i Trust of IoT devices l i Indicates i The number of legitimate messages sent by IoT devices, h i Indicates i The number of illegal messages sent by IoT devices, number i Indicates i The total number of messages sent by IoT devices, β represents the adjustment parameters of legal messages, c Indicates the tuning parameter for illegal messages.
[0087] Among them, those skilled in the art can set the adjustment parameters of the legitimate message according to the actual situation. β And the adjustment parameters for illegal messages c The present invention does not limit the size.
[0088] Optionally, the edge node's task quality assessment of the IoT device can be performed through task completion rate, task completion time, task correctness, etc.
[0089] In the present invention, trustworthiness measures the legitimacy of messages sent by devices, while task quality evaluation measures the performance of devices in completing tasks. The combination of the two can fully reflect the credit of devices and ensure that devices participating in data transmission can transmit data accurately.
[0090] S6: Other IoT devices except the sender and receiver vote as validators.
[0091] S7: When the number of supporting votes from the validators is greater than the preset number, the sending edge node encrypts the data to be transmitted through the link fingerprint and transmits it to the receiving edge node.
[0092] In the present invention, by allowing other IoT devices other than the sender and the receiver to vote as verifiers, trust can be dispersed and the security of the system can be improved. An attacker needs to break through multiple verifiers at the same time, which significantly increases the difficulty and makes the system more secure as a whole. At the same time, by having multiple verifiers verify the sender and the receiver, the accuracy and integrity of data transmission can be improved. Data transmission will only proceed when the majority of verifiers believe that the data transmission is safe and reliable.
[0093] In a possible implementation manner, encrypting the data to be transmitted by using the link fingerprint in S7 specifically includes:
[0094] S701: Convert the real-time signal-to-noise ratio into a binary value to form a signal-to-noise ratio indication value.
[0095] S702: Construct a link fingerprint of the communication link using the public key of the sender, the public key of the receiver, a pseudo-random number, and a signal-to-noise ratio indicator value:
[0096]
[0097] in, F represents the link fingerprint, SNR represents the signal-to-noise ratio, Q sender Represents the public key of the sender. Q recipient Represents the public key of the receiving end, N represents a pseudo-random number, Represents the exclusive OR operation.
[0098] In the present invention, the link fingerprint combines multiple security factors (signal-to-noise ratio, public key, pseudo-random number and digital signature) to improve the strength of encryption. Even if the attacker obtains part of the information, it is still difficult to crack the encrypted data. At the same time, the introduction of signal-to-noise ratio and pseudo-random number makes the link fingerprint different each time it is encrypted, which enhances the security of data transmission and prevents replay attacks.
[0099] S703: Encrypt the data to be transmitted using the link fingerprint:
[0100]
[0101] in, M Indicates encrypted data. C Indicates the data content to be transmitted. F represents the link fingerprint, S sender Indicates the sender's digital signature. S supporter Indicates the digital signature of the supporter, who is the verifier who casts the support vote. Represents the exclusive OR operation.
[0102] In the present invention, the data to be transmitted is encrypted by link fingerprint, which can significantly improve the security, integrity and confidentiality of the IoT data transmission architecture based on blockchain. The dynamic encryption mechanism and multi-signature verification not only improve the reliability and anti-attack capability of data transmission, but also ensure the authenticity and accuracy of the data.
[0103] S8: The receiving edge node forwards the encrypted data to the receiving end.
[0104] In the present invention, a blockchain-based Internet of Things data transmission architecture is constructed, a blockchain mechanism is introduced in the process of Internet of Things data transmission, and the transmitted data is encrypted through link fingerprints to prevent the data from being stolen, tampered with or destroyed, thereby ensuring the accuracy of data transmission and improving the security of data transmission.
[0105] In a possible implementation, the blockchain-based IoT data transmission method further includes:
[0106] S9: Select accountants from edge nodes based on the consensus mechanism, record all behavioral data of IoT devices through accountants, arrange them in chronological order, generate a Merkle tree of all transactions based on the hash value, store the Merkle tree in the block body of the block, and connect the block to the longest legal chain.
[0107] Among them, the Merkle Tree is a data structure that organizes and stores data in the form of a tree and is used to quickly and securely verify the integrity and consistency of data.
[0108] In the present invention, by selecting account keepers and recording the behavior data of IoT devices, the security, integrity, transparency and traceability of the data transmission architecture can be significantly improved. The Merkle tree structure and blockchain storage method not only optimize the data processing and storage efficiency, but also enhance the scalability and anti-attack capabilities of the system.
[0109] In a possible implementation, selecting a bookkeeper from edge nodes according to a consensus mechanism in S9 specifically includes sub-steps S901 and S902:
[0110] S901: Each edge node elects a full node by voting. The voting weight of each edge node depends on the credit of the edge node. The edge node with the highest number of votes is selected as a full node, and the remaining nodes are selected as light nodes.
[0111] Among them, a full node refers to a node in the blockchain network that stores the complete blockchain data. A light node (also called a lightweight node) refers to a node in the blockchain network that only stores part of the blockchain data. A light node does not store the complete blockchain data, but relies on a full node to obtain and verify transaction data.
[0112] In the present invention, each edge node elects a full node by voting, thereby avoiding the risk of single-point decision-making, improving the decentralization of the system, and enhancing the anti-attack capability and security of the system.
[0113] Optionally, the credit of the edge node is specifically:
[0114]
[0115] in, Cre j Indicates j The credit of edge nodes, W j Indicates j The importance evaluation of edge nodes, P j Indicates j Performance evaluation of edge nodes, C j Indicates j The node activity of edge nodes, D j Indicates j The historical influence of edge nodes, l 1 represents the weight coefficient of importance evaluation, l 2 represents the weight coefficient of performance evaluation, l 3 represents the weight coefficient of node activity, l 4 represents the weight coefficient of historical influence.
[0116] Among them, those skilled in the art can set the weight coefficient of importance evaluation according to actual conditions. l 1. Weight coefficient of performance evaluation l 2. Weight coefficient of node activity l 3 and the weight coefficient of historical influence l The size of 4 is not limited in the present invention.
[0117] In this invention, by combining importance evaluation, performance evaluation, node activity and historical influence, the performance and contribution of an edge node in the system can be comprehensively measured to ensure that the selected full node performs well in many aspects. This method not only improves the security, reliability and efficiency of the system, but also promotes nodes to maintain good behavior through incentive mechanisms, enhancing the fairness and transparency of the system.
[0118] Optionally, the importance evaluation is specifically:
[0119]
[0120] in, B j Indicates j The stake held by edge nodes in the blockchain, J Represents a set of edge nodes.
[0121] Optionally, the performance evaluation is specifically:
[0122]
[0123] in, t j Indicates j The online time of an edge node, exp represents an exponential function with a natural constant as the base.
[0124] Optionally, the node activity is specifically:
[0125]
[0126] in, v gj Indicates the historical consensus j The number of times an edge node casts a support vote, v bj Indicates the historical consensus j The number of times edge nodes vote against the v aj Indicates the historical consensus j The number of times an edge node does not vote, ln represents the logarithmic function with a natural constant as the base.
[0127] Optionally, the historical impact is specifically:
[0128]
[0129] in, h j Indicates the historical consensus j The number of honest behaviors of edge nodes, f j Indicates the historical consensus j The number of malicious behaviors of edge nodes.
[0130] S902: Each full node elects a bookkeeper through proof of work, and the full node that first solves the election problem will be the bookkeeper.
[0131] In the present invention, the bookkeeper is elected through proof of work (PoW), ensuring that only verified full nodes can become bookkeepers, further improving the security and reliability of the system.
[0132] In a possible implementation, the campaign question is specifically:
[0133] Find a random number r So that:
[0134]
[0135] in, Hash Represents a hash operation, r Represents a random number, blockhead Represents the block header, D Indicates the difficulty coefficient, target Indicates the target preset value.
[0136] In the present invention, by finding a random number r The hash value meets specific conditions, realizing the specific application of the proof-of-work mechanism. This method not only ensures the security and integrity of the data, but also realizes fair competition, decentralized management and high reliability of the network through dynamic difficulty adjustment and distributed computing. At the same time, the proof-of-work mechanism encourages nodes to actively participate in network activities, improves the security, stability and performance of the entire system, and provides an efficient and reliable solution for the blockchain-based IoT data transmission architecture.
[0137] The specific difficulty coefficients are:
[0138]
[0139] in, It represents the moving average of the time required to generate a block within the window. t eIndicates the expected time to generate a block.
[0140] In the present invention, by dynamically adjusting the difficulty coefficient, it is possible to ensure that the block generation time is close to the expected time. If the actual block generation time is shorter than the expected time, the difficulty will increase; otherwise, the difficulty will decrease. The stability of the block generation time of the blockchain system can be ensured, and the security, anti-attack capability and resource utilization efficiency of the system can be improved. The automated adjustment mechanism not only simplifies system management, but also enhances the flexibility and adaptability of the network, providing an important guarantee for the stable and efficient operation of the blockchain network.
[0141] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0142] In the present invention, a blockchain-based Internet of Things data transmission architecture is constructed, a blockchain mechanism is introduced in the process of Internet of Things data transmission, and the transmitted data is encrypted through link fingerprints to prevent the data from being stolen, tampered with or destroyed, thereby ensuring the accuracy of data transmission and improving the security of data transmission.
[0143] Example 2
[0144] In one embodiment, the reference specification Figure 2 , showing a structural schematic diagram of a blockchain-based Internet of Things data transmission system provided by the present invention.
[0145] The present invention provides a blockchain-based Internet of Things data transmission system 20, comprising a processor 201 and a memory 202 for storing executable instructions of the processor 201. The processor 201 is configured to call the instructions stored in the memory 202 to execute the blockchain-based Internet of Things data transmission method in Example 1.
[0146] The blockchain-based Internet of Things data transmission system provided by the present invention can realize the steps and effects of the blockchain-based Internet of Things data transmission method in the above-mentioned embodiment 1. To avoid repetition, the present invention will not go into details.
[0147] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0148] In the present invention, a blockchain-based Internet of Things data transmission architecture is constructed, a blockchain mechanism is introduced in the process of Internet of Things data transmission, and the transmitted data is encrypted through link fingerprints to prevent the data from being stolen, tampered with or destroyed, thereby ensuring the accuracy of data transmission and improving the security of data transmission.
[0149] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0150] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A blockchain-based Internet of Things data transmission method, characterized in that: include: S1: Constructing a blockchain-based IoT data transmission architecture, wherein the blockchain-based IoT data transmission architecture includes an IoT layer and a blockchain layer, wherein the IoT layer includes multiple IoT devices, and the blockchain layer includes edge nodes that manage IoT devices; S2: Determine the sending end and receiving end of this data transmission from the IoT device; S3: The sender and the receiver establish a communication link through their corresponding edge nodes; S4: The sender uploads the data to be transmitted to the sender edge node, and the sender edge node verifies the credit of the sender and the receiver; S5: When the credit of the sender and the receiver meets the requirements, the sender edge node collects the verification message from the verifier; S6: Other IoT devices except the sender and receiver vote as validators; S7: When the number of supporting votes from the verifier is greater than a preset number, the sending edge node encrypts the data to be transmitted through the link fingerprint and transmits it to the receiving edge node; S8: The receiving edge node forwards the encrypted data to the receiving end; The step of encrypting the data to be transmitted by using the link fingerprint in S7 specifically includes: S701: Convert the real-time signal-to-noise ratio into a binary value to form a signal-to-noise ratio indication value; S702: constructing a link fingerprint of the communication link using the public key of the sending end, the public key of the receiving end, a pseudo-random number, and the signal-to-noise ratio indicator value: in, F represents the link fingerprint, SNR represents the signal-to-noise ratio, Q sender Represents the public key of the sender. Q recipient Represents the public key of the receiving end, N represents a pseudo-random number, Represents the exclusive OR operation; S703: Encrypt the data to be transmitted using the link fingerprint: in, M Indicates encrypted data. C Indicates the data content to be transmitted. F represents the link fingerprint, S sender Indicates the sender's digital signature. S supporter Indicates the digital signature of the supporter, who is the verifier who casts the support vote. Represents the exclusive OR operation; Among them, the credit of IoT devices is specifically: in, Cre i Indicates i The credit of IoT devices, T i Indicates i Trust of IoT devices Q i Represents the edge node pair i Task quality assessment of IoT devices, α Represents the weight coefficient of trust, 1- α Represents the weight coefficient of task quality assessment; The credit of edge nodes is as follows: in, Cre j Indicates j The credit of edge nodes, W j Indicates j The importance evaluation of edge nodes, P j Indicates j Performance evaluation of edge nodes, C j Indicates j The node activity of edge nodes, D j Indicates j The historical influence of edge nodes, λ 1 represents the weight coefficient of importance evaluation, λ 2 represents the weight coefficient of performance evaluation, λ 3 represents the weight coefficient of node activity, λ 4 represents the weight coefficient of historical influence.
2. The method for transmitting data in the Internet of Things based on blockchain according to claim 1, characterized in that: The trustworthiness of the IoT device is specifically: in, T i Indicates i Trust of IoT devices l i Indicates i The number of legitimate messages sent by IoT devices, h i Indicates i The number of illegal messages sent by IoT devices, num i Indicates i The total number of messages sent by IoT devices, β represents the adjustment parameters of legal messages, γ Indicates the tuning parameter for illegal messages.
3. The method for transmitting data in the Internet of Things based on blockchain according to claim 1, characterized in that: Also includes: S9: Select accountants from edge nodes based on the consensus mechanism, record all behavioral data of IoT devices through accountants, arrange them in chronological order, generate a Merkle tree of all transactions based on the hash value, store the Merkle tree in the block body of the block, and connect the block to the longest legal chain.
4. The method for transmitting data in the Internet of Things based on blockchain according to claim 3 is characterized in that: The step S9 of selecting a bookkeeper from edge nodes according to the consensus mechanism specifically includes: S901: Each edge node elects a full node through voting. The voting weight of each edge node depends on the credit of the edge node. The edge node with the highest number of votes is selected as a full node, and the remaining nodes are selected as light nodes. S902: Each full node elects a bookkeeper through proof of work, and the full node that first solves the election problem will be the bookkeeper.
5. The method for transmitting data in the Internet of Things based on blockchain according to claim 1, characterized in that: The importance evaluation is specifically as follows: in, B j Indicates j The stake held by edge nodes in the blockchain, J Represents a set of edge nodes; The performance evaluation is specifically as follows: in, t j Indicates j The online time of an edge node, exp represents an exponential function with a natural constant as the base; The node activity is specifically: in, v gj Indicates the historical consensus j The number of times an edge node casts a support vote, v bj Indicates the historical consensus j The number of times edge nodes vote against the v aj Indicates the historical consensus j The number of times an edge node does not vote, ln represents the logarithmic function with a natural constant as the base; The historical impact is specifically: in, h j Indicates the historical consensus j The number of honest behaviors of edge nodes, f j Indicates the historical consensus j The number of malicious behaviors of edge nodes.
6. The method for transmitting data in the Internet of Things based on blockchain according to claim 4 is characterized in that: The election issues are: Find a random number r So that: in, Hash Represents a hash operation, r Represents a random number, blockhead Represents the block header, D Indicates the difficulty coefficient, target Indicates target preset value; The difficulty coefficient is specifically: in, It represents the moving average of the time required to generate a block within the window. t e Indicates the expected time to generate a block.
7. A blockchain-based Internet of Things data transmission system, characterized in that: It includes a processor and a memory for storing processor executable instructions; the processor is configured to call the instructions stored in the memory to execute the blockchain-based Internet of Things data transmission method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Credit-based blockchain consensus method for large-scale e-commerce
CN107395403A
Consensus method and system for block chain and Internet of Things fusion scene
CN112163856A
