Internet of Things communication method, device, equipment and storage medium based on blockchain
Through blockchain technology scoring and reputation management, we can solve the problem of selfish or malicious behavior of IoT nodes, achieve security verification and encrypted information transmission, and ensure the security and privacy of IoT communications.
Patent Information
- Application Number
- CN202410255593.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-06
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-03-06
AI Technical Summary
IoT nodes may behave selfishly or maliciously due to resource constraints or intentional behavior, leading to trust issues and security threats.
By linking the forwarding records of IoT nodes to the blockchain, scoring and saving reputation values, conducting trust verification, and using asymmetric encryption to transmit messages, it prevents attacks from malicious nodes.
Effectively block attacks from malicious nodes, ensure security and privacy, reduce network resource usage, and achieve trust management and encrypted information transmission.
Smart Images

Figure CN118054953B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a blockchain-based Internet of Things communication method, device, equipment and storage medium. Background Art
[0002] The development of the Internet has connected billions of devices, making life smarter and improving the livability of the earth. The Internet of Things (IoT) has revolutionized urban planning, transportation, logistics, home automation, agriculture, and healthcare. The Social Internet of Things (SIoT) is a new concept that combines IoT with social networks, making devices not only smarter but also socially aware. The Social Internet of Things (SIoT) is usually a network of smart, portable, wearable devices or entities that can collaborate autonomously to achieve common goals. As SIoT nodes become smarter, the frequent emergence and widespread dissemination of malicious information poses a serious threat to the credibility of services and applications. IoT nodes may behave selfishly or maliciously due to factors such as limited resources or intentional message discarding.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present invention is to provide a blockchain-based Internet of Things communication method, device, equipment and storage medium, aiming to solve the technical problem that existing Internet of Things nodes may engage in selfish or malicious behavior due to factors such as limited resources or deliberate message discarding.
[0005] To achieve the above object, the present invention provides an Internet of Things communication method based on blockchain, the method comprising the following steps:
[0006] Link the forwarding records of IoT nodes to the genesis block to build a node blockchain;
[0007] Scoring the IoT node, and saving the reputation value obtained by scoring to the node blockchain;
[0008] When the IoT nodes interact, the interacting IoT nodes are trusted and verified according to the reputation value, and the IoT nodes that pass the trust verification are used to transmit messages in an asymmetric encryption manner.
[0009] Optionally, scoring the IoT node and saving the reputation value obtained by scoring to the node blockchain includes:
[0010] Determining an initial reputation value of the IoT node;
[0011] Performing a reputation score on the IoT node based on the reputation score index and the initial reputation value to obtain a reputation value of the IoT node;
[0012] The reputation value is uploaded to the node blockchain for storage.
[0013] Optionally, the reputation scoring index includes a positive feedback interaction index, a negative feedback interaction index, and a network stability index, and the step of performing reputation scoring on the IoT node based on the reputation scoring index and the initial reputation value to obtain the reputation value of the IoT node includes:
[0014] Recording positive interaction behaviors between the current node and other nodes, and assigning positive scores to the positive interaction behaviors based on the positive feedback interaction index and the initial reputation value;
[0015] Recording negative interaction behaviors between the current node and other nodes, and assigning negative scores to the negative interaction behaviors based on the negative feedback interaction indicator and the initial reputation value;
[0016] Determining a stability value of the current node based on the network stability index;
[0017] The positive score, the negative score, and the stability value are weighted to obtain a reputation value of the Internet of Things node.
[0018] Optionally, when the IoT nodes interact, trust verification is performed on the interacting IoT nodes according to the reputation value, and messages are transmitted to the IoT nodes that have passed the trust verification in an asymmetric encryption manner, including:
[0019] When the IoT nodes interact, historical data of the interacting IoT nodes is obtained according to the reputation value;
[0020] Based on the historical data, trust verification is performed on the interacting IoT nodes through a Bayesian trust model to obtain an updated reputation score;
[0021] When the updated reputation score reaches a preset reputation score threshold, it is determined that the interacting IoT node has passed the trust verification, and the node that has passed the trust verification is used for message transmission in an asymmetric encryption manner.
[0022] Optionally, based on the historical data, trust verification is performed on the interacting IoT nodes through a Bayesian trust model to obtain an updated reputation score, including:
[0023] Determine the current reputation value of the interacting IoT node based on the node blockchain, and perform a priori verification on the probability of the interacting IoT node successfully transmitting a message once to obtain a priori probability;
[0024] Determine the overall probability of the current event being successfully completed at any node in the IoT;
[0025] The current reputation value, prior probability and overall probability are trusted and verified by a Bayesian trust model to obtain an updated reputation score of the interacting Internet of Things node.
[0026] Optionally, linking the forwarding record of the IoT node to the genesis block to construct a node blockchain includes:
[0027] Create the genesis block;
[0028] When two IoT nodes interact, the forwarding records are recorded as block bills until all forwarding records in the IoT are recorded;
[0029] The block ledger is linked to the genesis block to construct a node blockchain.
[0030] Optionally, when the IoT nodes interact, after trust verification is performed on the interacting IoT nodes according to the reputation value, and the IoT nodes that have passed the trust verification transmit messages in an asymmetric encryption manner, the method further includes:
[0031] Collecting interaction data between nodes of the Internet of Things, wherein the interaction data includes interaction nodes and timestamps;
[0032] Constructing a social network graph according to the interaction nodes and the timestamps;
[0033] Based on the social network graph, determining the Jaccard similarity between the interaction nodes;
[0034] Each node of the Internet of Things is updated according to the Jaccard similarity through a smart contract.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also proposes an Internet of Things communication device based on blockchain, the device comprising:
[0036] A blockchain building module, which is used to link the forwarding records of IoT nodes to the genesis block to build a node blockchain;
[0037] A reputation scoring module, used to score the IoT node and save the reputation value obtained by scoring to the node blockchain;
[0038] The trust verification module is used to perform trust verification on the interacting IoT nodes according to the reputation value when the IoT nodes interact, and transmit messages to the IoT nodes that have passed the trust verification in an asymmetric encryption manner.
[0039] In addition, to achieve the above-mentioned purpose, the present invention also proposes a blockchain-based Internet of Things communication device, which includes: a memory, a processor, and a blockchain-based Internet of Things communication program stored in the memory and executable on the processor, and the blockchain-based Internet of Things communication program is configured to implement the steps of the blockchain-based Internet of Things communication method described above.
[0040] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a blockchain-based Internet of Things communication program is stored. When the blockchain-based Internet of Things communication program is executed by a processor, the steps of the blockchain-based Internet of Things communication method described above are implemented.
[0041] The present invention first links the forwarding record of the IoT node to the Genesis block to construct a node blockchain; then scores the IoT node, and saves the reputation value obtained by the scoring to the node blockchain; when the IoT nodes interact, the interactive IoT nodes are trusted and verified according to the reputation value, and finally the IoT nodes that pass the trust verification are used to transmit messages in an asymmetric encryption manner. Since the present invention uses the secure communication function of the blockchain, it can use an asymmetric encryption method to encrypt the information to be transmitted, and implement trust management and security verification when the IoT nodes interact, which can block attacks from malicious nodes or selfish nodes to ensure security and privacy. While not occupying too much network resources, it can effectively block attacks from malicious nodes, implement trust verification and transmit encrypted information. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a structural diagram of a blockchain-based Internet of Things communication device in a hardware operating environment involved in an embodiment of the present invention;
[0043] Figure 2 This is a flow chart of the first embodiment of the blockchain-based Internet of Things communication method of the present invention;
[0044] Figure 3 This is a schematic diagram of a scenario of a message encryption and decryption process in the first embodiment of the blockchain-based Internet of Things communication method of the present invention;
[0045] Figure 4 This is a flow chart of a second embodiment of the blockchain-based Internet of Things communication method of the present invention;
[0046] Figure 5 This is a structural block diagram of the first embodiment of the blockchain-based Internet of Things communication device of the present invention.
[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a blockchain-based Internet of Things communication device in the hardware operating environment involved in an embodiment of the present invention.
[0050] like Figure 1 As shown, the blockchain-based IoT communication device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0051] Those skilled in the art will understand that Figure 1 The structure shown in does not constitute a limitation on the blockchain-based IoT communication device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0052] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a blockchain-based Internet of Things communication program.
[0053] exist Figure 1In the blockchain-based Internet of Things communication device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the blockchain-based Internet of Things communication device of the present invention can be set in the blockchain-based Internet of Things communication device, and the blockchain-based Internet of Things communication device calls the blockchain-based Internet of Things communication program stored in the memory 1005 through the processor 1001, and executes the blockchain-based Internet of Things communication method provided by the embodiment of the present invention.
[0054] The embodiment of the present invention provides a blockchain-based Internet of Things communication method, referring to Figure 2 , Figure 2 This is a flow chart of the first embodiment of the blockchain-based Internet of Things communication method of the present invention.
[0055] It should be noted that in the social Internet of Things (SIoT), trust SIoT plays a key role in the smart market and is essential to ensure smooth transaction connections, security and service reliability. Current trust assessments mainly rely on direct and indirect trust assessment technologies, but there are highly sensitive fraudulent behaviors that may lead to overall threats to system trust. For example, the trust management problem of relationships between driverless cars, due to the dynamic and complex nature of the digital environment, trust management often needs to rely on indirect trust, which establishes reputation by considering the feedback of emotional and non-emotional objects. Trust is essential for establishing reliable relationships between devices and helps reduce decision-making risks. However, building a trust model for SIoT faces challenges because trust is a multi-dimensional concept. Similarly, trust management is considered to be a key component of SIoT to build a social network of trusted smart objects, and is essential to enhancing the security and reliability of cyber-physical systems. It is a major challenge to study how the Internet and IoT can optimize urban planning, transportation, logistics, smart homes, agriculture and medical services by enhancing the intelligence and socialization of devices, especially within the framework of the social Internet of Things (SIoT). The embodiments of the present invention will analyze the difficulties faced in the integrity and confidentiality of data transmission and evaluate the potential risks of malicious information spreading in intelligent SIoT nodes. The embodiment of the present invention is aimed at the SIoT environment, draws on the high reliability, availability and elasticity of the blockchain, and proposes an Internet of Things communication method based on the blockchain, the purpose of which is to encrypt the information to be transmitted, implement trust management when the nodes contact, perform security verification, and block attacks from malicious nodes or selfish nodes to ensure security and privacy.
[0056] In this embodiment, the blockchain-based IoT communication method includes the following steps:
[0057] Step S10: Link the forwarding record of the IoT node to the genesis block to build the node blockchain.
[0058] It should be noted that the execution subject of the method of this embodiment can be a computing service device with block construction, reputation scoring, trust verification and encrypted transmission functions, such as a personal computer, server, etc., or other electronic devices that can achieve the same or similar functions, such as the above-mentioned blockchain-based Internet of Things communication device, which is not limited in this embodiment. Here, the above-mentioned blockchain-based Internet of Things communication device (referred to as communication device) is used to specifically describe this embodiment and the following embodiments.
[0059] It is understandable that an IoT node refers to a device or sensor connected to the IoT (Internet of Things, IoT) network, which usually has functions such as data collection, transmission, processing and communication. IoT nodes can be various physical devices, such as sensors, actuators, smart home devices, smart wearable devices, etc., which are connected to the IoT network wirelessly or wired to achieve communication and data exchange between devices.
[0060] It should be understood that the Genesis Block is the first block in the blockchain network and the starting point of the entire blockchain network. In the process of SIoT environment borrowing blockchain to transmit information, the Genesis Block must be generated first. The generation of the Genesis Block marks the birth of the entire blockchain network. Subsequent blocks will be generated and connected according to certain rules with the Genesis Block as the starting point, forming an uninterrupted blockchain, ensuring the security and continuity of the entire blockchain network.
[0061] Among them, blockchain technology, as a distributed ledger technology, has the ability to record and verify transactions and store data in a decentralized and secure way. Its characteristics include high security, credibility, smart contracts and anti-attack.
[0062] The core features of blockchain are decentralization and immutability. It is a network composed of multiple participants, each of whom can share and verify transaction records. In the blockchain, transactions are packaged into blocks and linked to the previous block through cryptographic hash functions to form an immutable chain structure. This decentralized design makes the blockchain highly secure and trustworthy. Since each participant has a complete copy of the blockchain and needs to verify the validity of the transaction through a consensus mechanism, it means that once the data is written to the blockchain, it is almost impossible to change or delete it. Therefore, the blockchain can effectively prevent malicious nodes from tampering with the data and fraudulent behavior against other nodes, providing higher reliability for transactions, thereby providing a high degree of security and credibility.
[0063] Moreover, another important feature of blockchain is smart contracts. Smart contracts are computer programs that automatically execute and enforce the terms of a contract. They exist on the blockchain and have the ability to automatically execute the terms of a contract. It uses pre-set conditions and logic. When the conditions set in the contract are met, the smart contract will automatically execute the relevant operations without human intervention or trust in a third party. Therefore, smart contracts can exclude human intervention and potential misconduct, thereby improving the traceability, transparency and reliability of transactions. And it can reduce the time and cost of transactions. In addition, due to the distributed storage of data and the verification of multiple participants, blockchain can effectively reduce the risk of single point failures and provide higher data security, so blockchain technology also has a high degree of anti-attack and fault recovery capabilities. In addition, due to the openness and transparency of blockchain, any participant can verify transactions and ledger status, so trust and traceability are enhanced.
[0064] In the specific implementation, a genesis block can be created first, and then the forwarding record of the IoT node can be linked to the genesis block. Subsequent blocks will be generated and connected according to certain rules with the genesis block as the starting point to form an uninterrupted blockchain.
[0065] Step S20: Score the IoT node and save the reputation value obtained by scoring to the node blockchain.
[0066] It should be noted that reputation is a measure of the node's credit in the network in blockchain technology, which is used to evaluate the reliability and value of the node in the network. The reputation of a node can be calculated based on the node's behavior and performance, such as whether the node operates in accordance with the network rules, whether it produces blocks on time, whether it participates in the network's verification and consensus process, etc. Nodes with good behavior and performance will receive higher reputation values, thereby having greater influence and rights in the network. On the contrary, nodes with misconduct or illegal operations will be punished, their reputation values may decline, or even be excluded from the network.
[0067] In a specific implementation, as the IoT network runs, transaction records can be used to calculate reputation scores, the IoT nodes can be scored, and the reputation values obtained from the scores can be saved to the node blockchain to measure the reputation of each node in the network.
[0068] Step S30: When the IoT nodes interact, trust verification is performed on the interacting IoT nodes according to the reputation value, and messages are transmitted to the IoT nodes that have passed the trust verification in an asymmetric encryption manner.
[0069] It should be noted that asymmetric encryption is the way blockchain uses public key encryption technology (digital signature) to encrypt data stored in the chain. It has two purposes: to encrypt data to ensure privacy, and to ensure that the data is not tampered with and is sent by the assumed sender. Digital signature is a technology used to verify the integrity and source of digital information, which uses the principle of public key encryption in cryptography. The working mechanism of digital signature generally includes the following steps: First, the sender applies a public key encryption algorithm (such as RSA algorithm) to generate a pair of keys, and the sender retains and does not disclose the private key, and broadcasts the public key to the network. Then the signing process is carried out using the sign function, and the sender uses its private key to encrypt the hash of the message. This hash is usually generated by a hash function (such as SHA-256), which generates a short, fixed-length, unique byte sequence for any given data. The encrypted hash value is the digital signature. The digital signature is sent to the recipient along with the data. The recipient then uses the verify function for the verification process. After receiving the data and the digital signature, the recipient uses the same hash function to independently calculate the hash value of the data. The receiver also uses the sender's public key to decrypt the digital signature, thereby obtaining the hash value encrypted by the sender. If the hash value calculated by the receiver matches the hash value encrypted by the sender, it can be confirmed that the data has not been tampered with during transmission and was indeed sent by the sender who holds the private key. This verification process is based on a very important cryptographic principle: information encrypted with a private key can only be decrypted with the corresponding public key, and vice versa. This means that if the public key can decrypt the signature, then the signature must have been generated by the corresponding private key, thereby verifying the identity of the sender.
[0070] For easier understanding, refer to Figure 3 , Figure 3 The following is a schematic diagram of the message encryption and decryption process in the first embodiment of the blockchain-based IoT communication method of the present invention. Figure 3 As shown in the figure, suppose Alice wants to send an encrypted message to Bob to ensure that the message cannot be tampered with and verify his identity. The process is as follows:
[0071] 1. Signing a message: Alice creates a message "M". Alice uses a hash function to create a hash value "H(M)1" of the message "M". Alice encrypts "H(M)1" with her private key to generate a digital signature "S" and a password "P".
[0072] 2. Send message: Alice sends the original message "M" and digital signature "S" to Bob.
[0073] 3. Verify the signature: Bob receives the message "M" and the signature "S". Bob uses the same hash function to calculate the hash value "H(M)2" for "M". Bob decrypts "S" using Alice's public key and password to obtain "H(M)3". Bob compares the two hash values H(M)2 and H(M)3. If they are the same, then the message is complete and was indeed sent by Alice. Digital signatures not only ensure the integrity of the data and the identity of the sender, but also provide non-repudiation, that is, the sender cannot deny that he sent the message because only the sender's private key can generate a valid signature.
[0074] In a specific implementation, when IoT nodes interact, the communication device may first perform trust verification on the interacting IoT nodes based on the reputation value. After the verification is passed, the IoT nodes that have passed the trust verification may transmit messages in an asymmetric encryption manner.
[0075] In this embodiment, a genesis block can be created first, and then all successfully forwarded messages are recorded as a transaction and added to the block. Subsequent blocks will be generated and connected according to certain rules with the genesis block as the starting point to form an uninterrupted blockchain. With the operation of the IoT network, transaction records can be used for reputation scoring calculation, the IoT nodes can be scored, and the reputation values obtained by scoring are saved to the node blockchain to measure the reputation of each node in the network. When two nodes meet, the reputation is used for trust verification, and the reputation obtained based on historical behavior determines whether the node is trustworthy; the nodes that pass the trust verification will use asymmetric encryption for message transmission. Since this embodiment uses the secure communication function of the blockchain, it can use asymmetric encryption to encrypt the information to be transmitted, and implement trust management and security verification when the IoT nodes interact, which can block attacks from malicious nodes or selfish nodes to ensure security and privacy. While not occupying too much network resources, it can effectively block attacks from malicious nodes, implement trust verification and transmit encrypted information.
[0076] Based on the above first embodiment, the present invention proposes a second embodiment. In this embodiment, the step S10 includes: creating a genesis block; when two IoT nodes interact, recording the forwarding record as a block bill until all forwarding records in the IoT are recorded; linking the block bill to the genesis block to construct a node blockchain.
[0077] In a specific implementation, in the network simulation presented in the embodiment of the present invention, a genesis block can be created at the beginning of the network simulation. When two IoT nodes interact, the transmitted message will be recorded as a bill, forming a block link to the genesis block, and so on, all forwarded records form a block link to the last block to form a blockchain. All nodes in the network jointly maintain and enjoy an open and transparent blockchain.
[0078] Specifically, for ease of understanding and description, the process of building a node blockchain may be described by defining some mathematical symbols or formulas in this embodiment:
[0079] (1) The relationship between nodes in the network can be represented as an undirected graph G(V,E), where V is the set of nodes, E is the set of edges, and the number of nodes in the network is represented by N. When nodes meet each other and exchange information, an edge is formed between the nodes, that is, a connection is established. During the time period of network operation, all relevant information will be recorded. When a connection is established, the nodes have direct neighbors and indirect neighbors. E(i,j) is represented by the number of connections between nodes, i is not equal to j, but i and j can be interchanged. When two nodes are directly connected, we call the two nodes direct neighbors of each other, and n(i) is used to represent the set of direct neighbors of node i.
[0080] (2) All nodes in the network have the following important properties: Each node has one and only one ID. Nodes with the same ID belong to the same group, and nodes in the same group communicate more frequently. Each node has a certain life cycle, and nodes that exceed the life cycle cannot participate in message forwarding. Each node has an energy state, and nodes that have exhausted (or are about to exhaust) their energy will be unwilling to participate in message forwarding.
[0081] (3) The transaction forms a block link to the blockchain containing the following information: block number index, message m, current block hash value, previous block hash value, current timestamp t, reputation score r, and the IDs of the current node i, relay node j, and destination node k.
[0082] (4) The forwarding behavior of nodes is always affected by the energy status and cache space. Nodes are always in a mobile and non-static state in the network. Malicious nodes do not transmit or are unwilling to receive messages. Nodes with sufficient energy and cache space are usually regarded as normal nodes and are willing to participate in forwarding messages.
[0083] (5) In order to reduce system resources, in multi-copy routing, only one block can be formed at the same time, and no other node is allowed to form a block again, that is, to maintain the longest chain principle of the blockchain.
[0084] (6) All nodes know the public keys of other nodes and keep their clocks synchronized.
[0085] refer to Figure 4 , Figure 4 This is a flow chart of the second embodiment of the blockchain-based IoT communication method of the present invention. In this embodiment, step S20 includes:
[0086] Step S21: Determine the initial reputation value of the IoT node.
[0087] It should be noted that the initial reputation value of a node refers to the reputation value assigned to the node when it initially joins the blockchain network.
[0088] Step S22: performing a reputation score on the IoT node based on the reputation score index and the initial reputation value to obtain the reputation value of the IoT node.
[0089] It should be noted that the process of reputation scoring can be determined by the social history records of the Internet of Things. In the social Internet of Things, social history records play a key role in reflecting trust relationships. Similar to human social networks, historical interaction records can be used as a measure of the level of trust between individuals. By recording the frequency and continuity of interactions between nodes, a signal of a stable relationship is shown, indicating a high level of trust. The quality of the interaction, such as the success rate of data exchange and the reliability of communication, is also recorded to further strengthen the evaluation of trust. Social history also reveals the common social connections between nodes, indicating that they may belong to similar social networks, enhancing mutual trust. In addition, the consistency and predictability of social history are key factors in building trust. The exchange of encounter tickets provides proof of authenticity and reliability for social history, while the social dynamics of a node, such as changes in its social circle, reflects the changes in its trust relationship. Social history also shows the depth and breadth of a node's interactions with different nodes. A deep and broad social network generally means a higher level of trust. Finally, if a node has shown selfish or malicious behavior in the past, this information will also be recorded in the social history, affecting other nodes' trust evaluation of it. In general, social history records provide important information for nodes, helping them make smarter decisions in an environment without a centralized trusted authority, identify trustworthy communication partners, and thus improve the efficiency and security of the entire network. For example, suppose there are three nodes in the SIoT environment: Node A, Node B, and Node C. These nodes do not have a centralized trusted authority, so they need to establish trust based on each other's social history. The specific process is as follows:
[0090] (1) Node A and Node B: Node A and Node B often encounter each other and successfully exchange data. Their social history records show that they have frequent and high-quality interactions, which builds mutual trust. In addition, they have some common social connections, such as frequent interactions with Node D, which further enhances the trust between them.
[0091] (2) Node B and Node C: Node B occasionally interacts with Node C, but Node C has repeatedly discarded Node B’s data packets for no reason in the past. Therefore, Node B’s social history shows a low level of trust in Node C.
[0092] (3) Node A encounters node C: When node A encounters node C, it needs to decide whether to forward the data packet to node C. Node A will check its social history and find that it has few direct interactions with node C. However, it will also consider the experience of node B because node A trusts node B. Since node B's history shows that it has low trust in node C, node A may decide not to forward the data packet through node C, or to interact cautiously. In the absence of a centralized trust agency, nodes are able to evaluate and establish trust relationships with each other. This mechanism helps to improve the overall security and efficiency of the network, especially in a dynamically changing network environment. Therefore, we use the following method to measure the trust level.
[0093] Definition 1: Positive interaction frequency and persistence (PP(i)): First, define a time window (from the start of network operation to the current time), and calculate the normal interaction frequency and persistence of node i with each node in this time window. PP(i) is measured as follows:
[0094]
[0095] Among them, j' represents the normal node that has been determined in the network at this moment, E(i,j') represents the number of all positive interactions between node i and normal nodes from the beginning of network operation to this moment, and T represents the length of the time period. It represents the average value of the total duration of all interactions between node i and other normal nodes divided by the total time. Frequency and persistence indicate a stable social relationship with normal nodes, reflecting a high level of trust. The higher the positive interaction frequency and persistence score, the more it reflects its credibility.
[0096] Definition 2: Negative interaction frequency and persistence (NP(i)): As in Definition 1, a specific time window is defined to calculate the number and duration of malicious behaviors of each node within that time, such as packet drops or error information transmission. Through long-term observation, the frequency and persistence of malicious behaviors in each time window can be counted. The NP(i) metric is as follows:
[0097]
[0098] Among them, j” represents the malicious node that has been identified in the network at this moment.
[0099] Definition 3: Social Consistency (SC(i)): In order to reduce the error of network simulation, we use the autoregressive moving average model (ARMA) in time series analysis to simulate the PP of each node. predict and NP predict . The autoregressive moving average model (ARMA) is a statistical model used to analyze and predict changing trends in time series data. It combines the characteristics of the autoregressive model (AR) and the moving average model (MA), in which the AR part uses a linear combination of past values to predict future values, while the MA part uses a linear combination of past error terms to make predictions. The model consists of two main parameters: the order p of AR and the order q of MA, which represent the number of previous time points and the number of error terms included in the model, respectively. In practical applications, the order of the model must first be determined, which is usually achieved by examining the autocorrelation function (ACF) and partial autocorrelation function (PACF) graphs, and then the model parameters are estimated by methods such as maximum likelihood or least squares. The ARMA model is widely used in fields such as economics, finance, and natural sciences to predict the probability distribution or trend of future events, but it is only applicable to stationary time series data. For non-stationary data, it is usually necessary to perform differential processing on the data to convert it into a form that can be processed by the ARMA model. With this model, the PP within a certain time window in the future can be predicted. predict and NP predict By comparing the predicted PP predict and NP predic t and PP obtained in Definitions 1 and 2 actual and NP actual , calculate the consistency score SC(i) of positive and negative interactions good and SC(i) bad :
[0100]
[0101]
[0102] Among them, PP predict and NP predict is the predicted value of the ARMA model, PP actual and NP actual is the actual value, avg|(PP predict -PP actual )| and avg|(NP predict -NP actual)| is the mean absolute deviation between the predicted value and the actual value. The closer the score is to 1, the stronger the interaction consistency of the node is.
[0103] Definition 4: Jaccard similarity: quantification of social network stability. For each node, a graph representation of its social network is constructed, where nodes represent interacting individuals and edges represent the existence of interactions. The topological structure changes of the graph are calculated, and the graph similarity metric (Jaccard similarity) is used to compare the social network changes in continuous time windows: social network stability score = Jaccard similarity (social network in the previous time window, social network in the current time window), that is:
[0104] Jaccard(i)=Jaccard(G previous , G current )
[0105]
[0106] Among them, E previou S and E current G previous and G current The set of edges in the intersection. previous ∩E current || represents the number of common edges between two graphs, and the union |E previous ∪E current | represents the total number of edges that appear at least once in both graphs.
[0107] Definition 5: Degree Centrality (DC(i)). Degree centrality is an important concept in network analysis, which is used to measure the importance of a node in the entire network. The basic idea of degree centrality is that the importance of a node can be measured by the number of other nodes it is connected to. In other words, the more connections a node has, the greater its influence in the network. We use the current number of direct connections of the node in the network to represent degree centrality. The higher the degree centrality, the more important the node is in the network, and it also means that its social attributes are stronger and everyone is willing to be "friends" with it. The reputation function will be affected by the degree centrality value of the node. If the degree centrality of node i is higher, its recommendation degree will be higher, and vice versa. We define the degree centrality formula as follows:
[0108]
[0109] Among them, DC(i) represents the degree centrality of node i, d(i) represents the degree of node i, that is, the number of nodes directly connected to node i at the current moment, N represents the number of all nodes in the network, and a node can be connected to at most N-1 nodes except itself.
[0110] Definition 6: Social Stability (SS(i)): Jaccard similarity and degree centrality represent social stability. The social stability score mathematically represents the degree of dynamic change of nodes and the importance of nodes. The stability score of a social network not only reflects the temporal coherence of the social network structure, but also takes into account the stability of important nodes in the network. If a social network maintains a stable structure over time and key nodes (nodes with high degree centrality) maintain their social status unchanged, the social behavior of the node can be considered to be stable as a whole. This comprehensive consideration helps to more accurately assess the dynamic changes and potential risks of social networks, such as the probability of a node changing from a normal state to a malicious state. The SS(i) metric is as follows:
[0111] SS(i)=Jaccard(G previous , G current )+DC(i),
[0112] The social stability score ranges from 0 to 1. The higher the score, the more similar the social network structure of the nodes in the two time windows is, and the higher the importance of the node is. That is, the more stable the node is, the smaller the probability of the node mutation (from a normal node to a malicious node), and the higher its reputation score is.
[0113] Step S23: Upload the reputation value to the node blockchain for storage.
[0114] In a specific implementation, at the beginning of the network operation, since there is only a genesis block, it is difficult to obtain historical records to generate a reputation value. The initial reputation value of all nodes in the network can be defined as R. As the network runs, transaction records can be used to calculate the reputation score, and a reputation scoring system can be created to measure the reputation of each node in the network. The score is based on the node's past behavior, such as the number of successfully delivered messages, the quality of interaction, and the degree of compliance with network protocols. The IoT node is scored based on the reputation score indicator and the initial reputation value to obtain the reputation value of the IoT node; the reputation value is uploaded to the node blockchain for storage.
[0115] Furthermore, the credibility scoring index in this embodiment includes a positive feedback interaction index, a negative feedback interaction index and a network stability index, and the step S22 includes: recording the positive interaction behavior between the current node and other nodes, and assigning a positive score to the positive interaction behavior based on the positive feedback interaction index and the initial credibility value; recording the negative interaction behavior between the current node and other nodes, and assigning a negative score to the negative interaction behavior based on the negative feedback interaction index and the initial credibility value; determining the stability value of the current node based on the network stability index; and weighting the positive score, the negative score and the stability value to obtain the credibility value of the Internet of Things node.
[0116] It should be noted that the positive feedback interaction index is the frequency of positive interactions between the computing node and other nodes, that is, the number of successful message transmissions. A score is assigned to each successful interaction.
[0117] It can be understood that the negative feedback interaction indicator records the negative behavior of the node, that is, data packet loss, sending wrong information, etc. A negative score is assigned to each negative behavior.
[0118] It should be understood that the network stability index is to evaluate the stability of a node in its social network, for example, by the number of connections maintained over a long period of time. Stable social connections can increase the reputation score.
[0119] In the specific implementation, the interaction feedback between a node and other nodes can be defined as a social reputation score, which is determined based on the positive feedback interaction index, the negative feedback interaction index, and the network stability index. Therefore, positive and negative social consistency are defined as positive and negative feedback indicators, and Jaccard similarity and degree centrality DC(i) are defined as indicators of social stability. The reputation score is defined as follows:
[0120] R(i)=δ 1 Positive+δ 2 Negative+δ 3 Stability
[0121] =δ 1 SC(i) good +δ 2 SC(i) bad +δ 3 SS(i)
[0122] =δ 1 SC(i) good +δ 2 SC(i) bad +δ 3 Jaccard (G previous , G curent)+δ 3 DC(i);
[0123] δ 1 ,δ 2 and δ 3 3 is the weight factor, δ 1 +δ 2 +δ 3 = 1, and give higher weights to recent behaviors according to actual simulation needs. As the network runs, more and more nodes will update their reputation values, and the reputation score will become more and more accurate.
[0124] Furthermore, in this embodiment, step S30 includes: when the IoT nodes interact, obtaining historical data of the interacting IoT nodes according to the reputation value; based on the historical data, trust verification is performed on the interacting IoT nodes through a Bayesian trust model to obtain an updated reputation score; when the updated reputation score reaches a preset reputation score threshold, it is determined that the interacting IoT nodes have passed the trust verification, and the nodes that have passed the trust verification are transmitted messages in an asymmetric encryption manner.
[0125] It should be noted that the Bayesian trust model is a trust assessment model based on Bayesian theory. This method is often used in the fields of computer science and network security, especially in situations where trust between different entities or nodes needs to be evaluated and managed. Its core idea is to use Bayesian statistical methods to infer and update trust. In the Bayesian trust model, trust is usually regarded as a probabilistic problem, and future behavior can be predicted based on historical data and behavior patterns. This method allows the system to dynamically evaluate and update the degree of trust in other systems or users while taking into account uncertainty and change. For example, in a network environment, a node may dynamically adjust its trust in other nodes based on their past behavior (such as the reliability and security of data transmission). The advantage of the Bayesian trust model lies in its flexibility and sensitivity to historical behavior, which enables the model to effectively cope with complex and dynamically changing environments.
[0126] Furthermore, in this embodiment, based on the historical data, the interacting IoT node is trusted and verified through a Bayesian trust model to obtain an updated reputation score, including: determining the current reputation value of the interacting IoT node based on the node blockchain, and performing a priori verification on the probability of the interacting IoT node successfully transmitting a message once to obtain a priori probability; determining the overall probability of the current event being successfully completed at any node in the IoT; and trust verifying the current reputation value, a priori probability and overall probability through a Bayesian trust model to obtain an updated reputation score for the interacting IoT node.
[0127] Specifically, when a new transaction is recorded on the blockchain, the reputation score of the relevant node is updated according to the result of the transaction, that is, a successful transaction will increase the reputation score, while malicious or failed behavior will reduce the reputation score. Define a reputation score threshold, and nodes below the reputation threshold cannot pass the trust verification. In the Bayesian trust model, a common method is to use Bayes' theorem to update trust. Bayes' theorem is a core concept in probability theory that describes how to revise existing beliefs or estimates based on new evidence. In the context of trust models, this can be expressed as updating the trust in an entity based on new interaction experiences. Two events can be defined in which nodes (such as users or devices) need to evaluate each other's trust. This scenario can be represented by two events:
[0128] Event A: Based on the history score, we consider node j to be trustworthy.
[0129] Event B: Node j completes a task without errors or malicious behavior.
[0130] Bayes' theorem can help us update our judgment on whether node j is trustworthy based on new information (such as node j's recent behavior). Bayes' theorem can be expressed as:
[0131]
[0132] Among them, P(A|B) represents the probability of event A (node j is trustworthy) occurring after event B is observed. That is, after node j successfully completes the task, we consider it to be trustworthy. P(B|A) represents the probability that node j completes the task correctly if it is trustworthy. Based on historical data, if node j usually completes the task when it is trustworthy, this probability will be high. P(A) represents the prior probability that node j is trustworthy, that is, the probability that we consider node j to be trustworthy before seeing the latest behavior. P(B) represents the overall probability that node j successfully completes the task, regardless of whether it is trustworthy.
[0133] For example, suppose the reputation score of node j is 0.6, that is, P(A) = 0.6. Assuming that node j is trustworthy, the probability that it successfully transmits a message is 0.7, that is, P(B|A) = 0.7. The probability that any node in the entire network successfully completes the task is 0.5, that is, P(B) = 0.5. According to Bayes' theorem, the reputation score of the node can be updated:
[0134]
[0135] Furthermore, in this embodiment, after step S30, it also includes: collecting interaction data between each node of the Internet of Things, the interaction data including interaction nodes and timestamps; constructing a social network graph based on the interaction nodes and the timestamps; based on the social network graph, determining the Jaccard similarity between the interaction nodes; and updating each node of the Internet of Things according to the Jaccard similarity through a smart contract.
[0136] It should be noted that a social network graph refers to a graphical model consisting of nodes (representing individuals or entities) and the relationships between them (representing the connections or interactions between nodes).
[0137] It is understandable that Jaccard similarity is an indicator used to measure the similarity between two sets. It determines the similarity by calculating the ratio of the number of elements in the intersection of two sets to the number of elements in their union.
[0138] In a specific implementation, smart contracts can be used to automatically execute the above logic of the embodiment of the present invention, and automatically calculate and update the credit score based on the transaction history. Smart contracts can also be used to verify transactions, ensure that all nodes comply with network protocols and rules, and ensure that contracts comply with privacy protection and data security regulations when processing social data between nodes. The execution steps of smart contracts are:
[0139] (1) Collect and store social data: Collect data about interactions between nodes, for example, which other nodes each node interacts with and the timestamps of these interactions.
[0140] (2) Computing social network graph: Construct a social network graph regularly (based on a time window) and store relevant information to facilitate the calculation of Jaccard similarity.
[0141] (3) Calculate Jaccard similarity: Calculate the Jaccard similarity between social network graphs in continuous time windows.
[0142] (4) Update reputation score: Update the node’s reputation score based on the calculated social stability score.
[0143] (5) Automatic execution: A new social stability score is automatically calculated every time a time window ends.
[0144] This embodiment proposes a blockchain-based IoT communication method. As the network runs, the behavior of nodes in the network will be recorded in real time, such as normal message transmission, or negative behaviors such as malicious packet loss, message tampering, and non-transmission of received messages. Secondly, when two nodes come into contact, the reputation score is calculated based on their historical behavior, and the node is judged to be trustworthy based on the reputation score. This can effectively isolate malicious nodes, and then asymmetric encryption is performed on the messages to be transmitted, and the messages are transmitted to the destination node safely and reliably while effectively reducing network resource overhead and transmission delay. All nodes in the network form a consensus mechanism based on the reputation score statistical system, and all nodes in the network jointly abide by the rules of this system to implement trust management. At the same time, the embodiment of the present invention draws on the concept of smart contracts in blockchain to verify whether the source and destination of the message match the actual situation of the system. Trust is measured based on the past behavior of the object. Trust is updated regularly to make the proposed trust management scheme effective and reliable. The proposed scheme was tested in the designed "random attack" and "service attack" systems, and achieved the expected goals.
[0145] In addition, an embodiment of the present invention further proposes a storage medium, on which a blockchain-based Internet of Things communication program is stored. When the blockchain-based Internet of Things communication program is executed by a processor, the steps of the blockchain-based Internet of Things communication method described above are implemented.
[0146] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the blockchain-based Internet of Things communication device of the present invention.
[0147] like Figure 5 As shown, the blockchain-based IoT communication device proposed in the embodiment of the present invention includes:
[0148] The blockchain construction module 501 is used to link the forwarding record of the IoT node to the genesis block to construct the node blockchain;
[0149] A reputation scoring module 502, used to score the IoT node and save the reputation value obtained by scoring to the node blockchain;
[0150] The trust verification module 503 is used to perform trust verification on the interacting IoT nodes according to the reputation value when the IoT nodes interact, and transmit messages to the IoT nodes that have passed the trust verification in an asymmetric encryption manner.
[0151] In this embodiment, a genesis block can be created first, and then all successfully forwarded messages are recorded as a transaction and added to the block. Subsequent blocks will be generated and connected according to certain rules with the genesis block as the starting point to form an uninterrupted blockchain. With the operation of the IoT network, transaction records can be used for reputation scoring calculation, the IoT nodes can be scored, and the reputation values obtained by scoring are saved to the node blockchain to measure the reputation of each node in the network. When two nodes meet, the reputation is used for trust verification, and the reputation obtained based on historical behavior determines whether the node is trustworthy; the nodes that pass the trust verification will use asymmetric encryption for message transmission. Since this embodiment uses the secure communication function of the blockchain, it can use asymmetric encryption to encrypt the information to be transmitted, and implement trust management and security verification when the IoT nodes interact, which can block attacks from malicious nodes or selfish nodes to ensure security and privacy. While not occupying too much network resources, it can effectively block attacks from malicious nodes, implement trust verification and transmit encrypted information.
[0152] Based on the above-mentioned first embodiment of the Internet of Things communication device based on blockchain of the present invention, a second embodiment of the Internet of Things communication device based on blockchain of the present invention is proposed.
[0153] In this embodiment, the reputation scoring module 502 is also used to determine the initial reputation value of the IoT node; perform a reputation score on the IoT node based on the reputation scoring index and the initial reputation value to obtain the reputation value of the IoT node; and upload the reputation value to the node blockchain for storage.
[0154] Furthermore, the reputation scoring index includes a positive feedback interaction index, a negative feedback interaction index and a network stability index. The reputation scoring module 502 is also used to record the positive interaction behavior between the current node and other nodes, and assign a positive score to the positive interaction behavior based on the positive feedback interaction index and the initial reputation value; record the negative interaction behavior between the current node and other nodes, and assign a negative score to the negative interaction behavior based on the negative feedback interaction index and the initial reputation value; determine the stability value of the current node based on the network stability index; and perform weight processing on the positive score, the negative score and the stability value to obtain the reputation value of the Internet of Things node.
[0155] Furthermore, the trust verification module 503 is also used to obtain historical data of the interacting IoT nodes according to the reputation value when the IoT nodes interact; based on the historical data, the trust of the interacting IoT nodes is verified through the Bayesian trust model to obtain an updated reputation score; when the updated reputation score reaches a preset reputation score threshold, it is determined that the interacting IoT nodes have passed the trust verification, and the nodes that have passed the trust verification are transmitted messages in an asymmetric encryption manner.
[0156] Furthermore, the trust verification module 503 is also used to determine the current reputation value of the interacting IoT node based on the node blockchain, and to perform a priori verification on the probability of the interacting IoT node successfully transmitting a message once to obtain a priori probability; determine the overall probability of the current event being successfully completed at any node in the IoT; and perform trust verification on the current reputation value, a priori probability and overall probability through a Bayesian trust model to obtain an updated reputation score of the interacting IoT node.
[0157] Furthermore, the blockchain construction module 501 is also used to create a genesis block; when two IoT nodes interact, the forwarding record is recorded as a block bill until all forwarding records in the IoT are recorded; the block bill is linked to the genesis block to construct a node blockchain.
[0158] Furthermore, the blockchain-based Internet of Things communication device also includes: a smart contract module 504, which is used to collect interaction data between each node of the Internet of Things, wherein the interaction data includes interaction nodes and timestamps; construct a social network graph based on the interaction nodes and the timestamps; based on the social network graph, determine the Jaccard similarity between the interaction nodes; and update each node of the Internet of Things according to the Jaccard similarity through a smart contract.
[0159] Other embodiments or specific implementation methods of the blockchain-based Internet of Things communication device of the present invention can refer to the above-mentioned method embodiments and will not be repeated here.
[0160] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0161] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0163] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A blockchain-based IoT communication method, It is characterized in that The blockchain-based Internet of Things communication method includes: Link the forwarding records of IoT nodes to the genesis block to build a node blockchain; Scoring the IoT node, and saving the reputation value obtained by scoring to the node blockchain; When the IoT nodes interact, the interacting IoT nodes are trusted and verified according to the reputation value, and the IoT nodes that pass the trust verification are used to transmit messages in an asymmetric encryption manner; The step of scoring the IoT node and saving the reputation value obtained by scoring to the node blockchain includes: determining the initial reputation value of the IoT node; scoring the IoT node based on the reputation scoring index and the initial reputation value to obtain the reputation value of the IoT node; uploading the reputation value to the node blockchain for saving; The reputation scoring process is determined by the social history of the IoT node. A reputation scoring system can be created to measure the reputation of each node in the network. The trust level can be measured using: Definition 1: Positive interaction frequency and persistence PP ( ), define a time window, calculate the node in this time window The normal frequency and duration of interaction with each node; Definition 2: Negative interaction frequency and persistent NP ( ), define a time window to calculate the number and duration of malicious behaviors of each node, and count the frequency and persistence of malicious behaviors in each time window; Definition 3: Social consistency SC ), using the autoregressive moving average model (ARMA) in the time series analysis method to simulate the PP of each node predict and NP predict ; By comparing the predicted PP predict and NPp redict And PP obtained in Definitions 1 and 2 actual and NP actual , calculate the positive interaction consistency score SC( ) good and negative interaction consistency score SC( ) bad : ; Among them, PP predict and NP predict is the predicted value of the ARMA model, PP actual and NP actual is the actual value, and It is the average absolute deviation between the predicted value and the actual value of the ARMA model. The closer the score is to 1, the stronger the interaction consistency of the node is. Definition 4: Jaccard similarity is the quantification of social network stability. For each node, a graph representation of the social network is constructed, where nodes represent interacting individuals and edges represent the existence of interactions. The topological structure changes of the graph are calculated, and the graph similarity metric is used to compare the social network changes within continuous time windows. Definition 5: Degree Centrality DC( ), the degree centrality is expressed by the number of direct connections of the node in the network. The higher the degree centrality, the more important the node is in the network. Definition 6: Social stability SS ( ), Jaccard similarity and degree centrality represent social stability, and the social stability score uses mathematical methods to represent the dynamic change degree of the node and the importance of the node; Among them, the reputation scoring index includes a positive feedback interaction index, a negative feedback interaction index and a network stability index. The reputation scoring of the Internet of Things node based on the reputation scoring index and the initial reputation value to obtain the reputation value of the Internet of Things node includes: recording the positive interaction behavior between the current node and other nodes, and assigning a positive score to the positive interaction behavior based on the positive feedback interaction index and the initial reputation value; recording the negative interaction behavior between the current node and other nodes, and assigning a negative score to the negative interaction behavior based on the negative feedback interaction index and the initial reputation value; determining the stability value of the current node based on the network stability index; and weighting the positive score, the negative score and the stability value to obtain the reputation value of the Internet of Things node.
2. The blockchain-based IoT communication method according to claim 1, It is characterized in that When the IoT nodes interact, trust verification is performed on the interacting IoT nodes according to the reputation value, and messages are transmitted to the IoT nodes that have passed the trust verification in an asymmetric encryption manner, including: When the IoT nodes interact, historical data of the interacting IoT nodes is obtained according to the reputation value; Based on the historical data, trust verification is performed on the interacting IoT nodes through a Bayesian trust model to obtain an updated reputation score; When the updated reputation score reaches a preset reputation score threshold, it is determined that the interacting Internet of Things node has passed the trust verification, and the node that has passed the trust verification is used for message transmission in an asymmetric encryption manner.
3. The blockchain-based Internet of Things communication method as claimed in claim 2, It is characterized in that The step of performing trust verification on the interacting IoT nodes based on the historical data through a Bayesian trust model to obtain an updated reputation score includes: Determine the current reputation value of the interacting IoT node based on the node blockchain, and perform a priori verification on the probability of the interacting IoT node successfully transmitting a message once to obtain a priori probability; Determine the overall probability of the current event being successfully completed at any node in the IoT; The current reputation value, prior probability and overall probability are trusted and verified by a Bayesian trust model to obtain an updated reputation score of the interacting Internet of Things node.
4. The blockchain-based Internet of Things communication method as claimed in claim 3, It is characterized in that The forwarding record of the IoT node is linked to the genesis block to build a node blockchain, including: Create the genesis block; When two IoT nodes interact, the forwarding records are recorded as block bills until all forwarding records in the IoT are recorded; The block ledger is linked to the genesis block to construct a node blockchain.
5. The blockchain-based Internet of Things communication method as claimed in claim 4, It is characterized in that When the IoT nodes interact, trust verification is performed on the interacting IoT nodes according to the reputation value, and the IoT nodes that pass the trust verification are transmitted in an asymmetric encryption manner, and the following is also included: Collecting interaction data between nodes of the Internet of Things, wherein the interaction data includes interaction nodes and timestamps; Constructing a social network graph according to the interaction nodes and the timestamps; Based on the social network graph, determining the Jaccard similarity between the interaction nodes; Each node of the Internet of Things is updated according to the Jaccard similarity through a smart contract.
6. An IoT communication device based on blockchain, It is characterized in that The device applies the blockchain-based Internet of Things communication method as described in any one of claims 1 to 5, and the device includes: A blockchain building module, which is used to link the forwarding records of IoT nodes to the genesis block to build a node blockchain; A reputation scoring module, used to score the IoT node and save the reputation value obtained by scoring to the node blockchain; The trust verification module is used to perform trust verification on the interacting IoT nodes according to the reputation value when the IoT nodes interact, and transmit messages to the IoT nodes that have passed the trust verification in an asymmetric encryption manner.
7. An IoT communication device based on blockchain, It is characterized in that The device includes: a memory, a processor, and a blockchain-based Internet of Things communication program stored in the memory and executable on the processor, wherein the blockchain-based Internet of Things communication program is configured to implement the steps of the blockchain-based Internet of Things communication method as described in any one of claims 1 to 5.
8. A storage medium, It is characterized in that The storage medium stores a blockchain-based Internet of Things communication program, which, when executed by a processor, implements the steps of the blockchain-based Internet of Things communication method as described in any one of claims 1 to 5.
