Trust Management Method and System for Smart Water Conservancy Integrated Machine Based on Two-Layer Blockchain
By combining a two-layer blockchain and deep learning algorithms, the problem of inaccurate identification of internal attacks in the trust management of the smart water conservancy integrated machine is solved, and efficient trust value calculation and secure data storage are achieved.
Patent Information
- Application Number
- CN202510330062.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-03-20
AI Technical Summary
Existing smart water conservancy integrated machines cannot effectively identify internal attacks in trust management, and the trust value calculation results are not accurate enough, lacking efficient calculation and environmental perception capabilities.
A trust management method based on a two-layer blockchain is adopted, which utilizes trusted institutions and edge computing units to calculate and manage trust values, evaluates local trust values through deep learning algorithms, and stores and agrees on trust values on the global and local blockchains. Blocks are created and published in combination with a lightweight consensus mechanism.
It improves the accuracy of trust value calculation and the precision of malicious node identification, while taking into account both secure data storage and efficient querying, and achieves effective defense against internal attacks.
Smart Images

Figure CN120301627B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and in particular to a trust management method and system for a smart water conservancy integrated machine based on a two-layer blockchain. Background Technology
[0002] In traditional smart water conservancy construction, water conservancy industrial control systems largely rely on imported PLCs (Programmable Logic Controllers) from foreign companies such as Siemens, Schneider Electric, and Omron. Furthermore, these systems often lack robust security features, requiring additional security products. A complete and reliable water conservancy industrial control system typically integrates industrial control PLC equipment, configuration monitoring systems, RTU data acquisition systems, and security products. To improve the intelligence, domestic production capabilities, and security of traditional water conservancy industrial control systems, the integrated smart water conservancy system has emerged. Based on a soft PLC architecture, it integrates industrial control, data acquisition, data monitoring, and security protection, and utilizes a domestically developed operating system to achieve domestic substitution of core components and software.
[0003] Smart water conservancy integrated machines typically employ traditional key-based authentication schemes, integrating PKI (Public Key Infrastructure) and encryption / decryption algorithms. However, traditional key-based authentication schemes can only defend against external attacks (attacks launched by unauthenticated malicious external nodes without valid certificates and credentials) and cannot effectively identify internal attacks (attacks launched by authenticated malicious internal nodes with valid certificates and credentials), including: maliciously publishing incorrect water conservancy monitoring data, intentionally refusing to participate in message sharing, etc.
[0004] Trust management is a solution to defend against internal attacks. It calculates the trust value of each node in the network and the messages it publishes, identifies nodes with trust values below a threshold as malicious nodes, and then revokes the certificates of malicious nodes. However, due to the limited computing and storage resources of smart water conservancy integrated machines, existing trust management solutions, when directly applied to smart water conservancy integrated machines, often lack efficient computing and environmental awareness capabilities, resulting in inaccurate trust value calculation results. Furthermore, when storing trust values, it is impossible to effectively balance security performance and storage efficiency. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a trust management method and system for a smart water conservancy integrated machine based on a two-layer blockchain, which aims to solve the problem that the trust value calculation results are not accurate enough when using trust management to resist internal attacks in the prior art.
[0006] The embodiments of the present invention are implemented as follows:
[0007] A trust management method for a smart water conservancy integrated machine based on a two-layer blockchain is disclosed. This method utilizes a trusted institution to manage the trust of the smart water conservancy integrated machine. The trusted institution is communicatively connected to multiple edge computing units, and each edge computing unit is communicatively connected to multiple smart water conservancy integrated machines. The method includes:
[0008] When the smart water conservancy integrated machine and edge computing unit are detected to be started, an identity registration request is initiated to a trusted institution and the corresponding device identity identifier is passed in, so that the corresponding security certificate can be issued after the trusted institution verifies its identity information.
[0009] The system acquires real-time water monitoring data and environmental climate data collected by the smart water conservancy integrated machine and broadcasts them to other smart water conservancy integrated machines. Upon receiving the water monitoring data and environmental climate data, the system calculates the corresponding message local trust value.
[0010] The local trust value of the message is reported to the corresponding edge computing unit, the global trust value of the message of the smart water conservancy integrated machine is calculated, the calculation results are synchronized to other edge computing units, and finally the final trust value of the message of the smart water conservancy integrated machine is integrated and broadcast.
[0011] The final trust value of water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine messages is encapsulated into the transaction of the block, and then a lightweight consensus mechanism is used to competitively create and publish the block to the global blockchain and local blockchain;
[0012] When a trusted organization detects that the node trust value of the smart water conservancy integrated machine is lower than a preset threshold, it will mark the corresponding node of the smart water conservancy integrated machine as a malicious node and revoke the corresponding security certificate.
[0013] Furthermore, in the aforementioned trust management method for a smart water conservancy integrated machine based on a two-layer blockchain, the step of calculating the corresponding local trust value of the message after receiving water conservancy monitoring data and environmental climate data includes:
[0014] Using water conservancy monitoring data, environmental climate, and historical trust values as input parameters, the corresponding message local trust value is obtained by using the message local trust value evaluation algorithm deployed in the smart water conservancy integrated machine.
[0015] The message local trust value evaluation algorithm is obtained through deep learning using a feedforward neural network, which includes an input layer, two hidden layers, and an output layer.
[0016] Furthermore, the aforementioned trust management method for the smart water conservancy integrated machine based on a two-layer blockchain, wherein,
[0017] The formula for calculating the output of the output layer is:
[0018]
[0019] in, and They represent the first L Layer and first L-1 The output of the layer, and They represent the first L Layer weights and biases This is the activation function corresponding to this layer;
[0020] The loss function of a feedforward neural network is:
[0021] ;
[0022] in, N This represents the total amount of data in the training set. Indicates the first i The true label of each training sample The algorithm model calculates the first... i Trust value.
[0023] Furthermore, in the aforementioned trust management method for the smart water conservancy integrated machine based on a two-layer blockchain, the steps of reporting the local trust value of the message to the corresponding edge computing unit and calculating the global trust value of the message of the smart water conservancy integrated machine include:
[0024] Using the node trust values of each smart water conservancy integrated machine that has uploaded a message local trust value as weights, the calculated message local trust values of the smart water conservancy integrated machine are weighted and summed to obtain the message global trust value of the smart water conservancy integrated machine.
[0025] The formula for calculating the global trust value of the message is:
[0026] ;
[0027] in, Represents edge computing unit m Calculated sending node s Global trust value for messages. Indicating a smart water conservancy integrated machine j The node trust value, Indicating a smart water conservancy integrated machine j The local trust value of the message evaluated for node S corresponding to the smart water conservancy integrated machine.
[0028] Furthermore, in the aforementioned trust management method for the smart water conservancy integrated machine based on a two-layer blockchain, the formula for calculating the final trust value of a message is as follows:
[0029] ;
[0030] in, The final trust value of the message for node S corresponding to the integrated smart water conservancy machine. N This represents the total number of edge computing units used to calculate the global trust value of a message. For edge computing units m The calculated global trust value of the message for node S corresponding to the integrated smart water conservancy machine.
[0031] Furthermore, the aforementioned trust management method for the smart water conservancy integrated machine based on a two-layer blockchain, wherein the steps of encapsulating water conservancy monitoring data, environmental climate data, and the final trust value of the smart water conservancy integrated machine's messages into a block transaction, and then competitively creating and publishing the block to the global and local blockchains through a lightweight consensus mechanism, include:
[0032] When the edge computing unit receives water monitoring data, environmental climate data and the calculated final trust value of the message uploaded by the smart water conservancy integrated machine, it encapsulates them into the transaction of the block, creates a block containing multiple transaction data, and sends the newly created block to the block review committee for verification.
[0033] If a block is approved by a pre-defined percentage of the block review committee, then the edge computing unit is authorized to publish the block to the global blockchain, and a trust value is added to the edge computing unit as a reward.
[0034] If no block passes the review by the pre-defined proportion of review committee members, the block is discarded.
[0035] The formula for calculating the increase in trust value is as follows:
[0036] ;
[0037] in, m Indicates the number of committee members, n This represents the total number of edge computing unit nodes. This represents the node trust value of the edge computing unit.
[0038] Furthermore, the aforementioned trust management method for the smart water conservancy integrated machine based on a two-layer blockchain, wherein the steps of encapsulating water conservancy monitoring data, environmental climate data, and the final trust value of the smart water conservancy integrated machine's messages into a block transaction, and then competitively creating and publishing the block to the global and local blockchains through a lightweight consensus mechanism, further include:
[0039] The data in the local blockchain is cleared daily, and the latest node trust value is resynchronized.
[0040] When edge computing units or smart water conservancy integrated machine nodes communicate, they can directly obtain the latest trust value of the node from the local blockchain.
[0041] Another objective of this invention is to provide a trust management system for a smart water conservancy integrated machine based on a two-layer blockchain. This system utilizes a trusted institution to manage the trust of the smart water conservancy integrated machine. The trusted institution is communicatively connected to multiple edge computing units, and each edge computing unit is communicatively connected to multiple smart water conservancy integrated machines. The system includes:
[0042] The detection module is used to initiate an identity registration request to a trusted institution and pass in the corresponding device identity identifier when the smart water conservancy integrated machine or edge computing unit is detected to be started, so as to issue the corresponding security certificate after the trusted institution verifies its identity information.
[0043] The acquisition module is used to acquire water conservancy monitoring data and environmental climate data collected in real time by the smart water conservancy integrated machine and broadcast them to other smart water conservancy integrated machines, so as to calculate the corresponding message local trust value after receiving the water conservancy monitoring data and environmental climate data.
[0044] The calculation module is used to report the local trust value of the message to the corresponding edge computing unit, calculate the global trust value of the message of the smart water conservancy integrated machine, synchronize the calculation results to other edge computing units, and finally integrate the final trust value of the message of the smart water conservancy integrated machine and broadcast the final trust value.
[0045] The storage module is used to encapsulate the final trust value of water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine messages into the transaction of the block, and then through a lightweight consensus mechanism, compete to create and publish the block to the global blockchain and local blockchain;
[0046] The revocation module is used to mark the node of the smart water conservancy integrated machine as a malicious node and revoke the corresponding security certificate when a trusted institution detects that the node trust value of the smart water conservancy integrated machine is lower than a preset threshold.
[0047] Another object of the present invention is to provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0048] Another object of the present invention is to provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method described above.
[0049] This invention acquires real-time water monitoring data and environmental climate data from a smart water conservancy integrated machine and broadcasts it to other smart water conservancy integrated machines. Upon receiving the water monitoring data and environmental climate data, it calculates the corresponding local trust value of the message. The local trust value is then reported to the corresponding edge computing unit to calculate the global trust value of the message from the smart water conservancy integrated machine. The calculation results are then synchronized to other edge computing units, and finally, the final trust value of the message from the smart water conservancy integrated machine is integrated and broadcast. The water monitoring data, environmental climate data, and the final trust value of the message from the smart water conservancy integrated machine are encapsulated in a block transaction. Then, through a lightweight consensus mechanism, blocks are competitively created and published to the global blockchain and local blockchains. When a trusted institution detects that the node trust value of a smart water conservancy integrated machine is lower than a preset threshold, the corresponding node of the smart water conservancy integrated machine is marked as a malicious node and its corresponding security certificate is revoked. The final trust value is calculated using edge computing units and smart water conservancy integrated machines, avoiding the problem that a single smart water conservancy integrated machine lacks efficient computing and environmental perception capabilities, resulting in inaccurate trust value calculation results. This solves the problem of inaccurate trust value calculation results when using trust management to defend against internal attacks in existing technologies.
[0050] In addition, the present invention has at least the following beneficial effects:
[0051] Deep learning algorithms are used to calculate the local trust value of messages of smart water conservancy nodes. The input parameters include water conservancy monitoring data, environmental and climate information and historical trust values, which improves the accuracy of trust value assessment and adaptability to environmental changes, thereby improving the accuracy of malicious node identification.
[0052] A two-layer blockchain architecture is used to balance secure data storage and efficient data retrieval.
[0053] The global blockchain is maintained by edge computing units and trusted institutions, storing water conservancy monitoring data, environmental and climate data, and the final trust value of messages. It defines a lightweight consensus mechanism, establishes a block review committee, and realizes the efficient creation, verification, and publication of blocks.
[0054] The local blockchain is maintained by edge computing units and smart water conservancy integration. It stores the final trust value of messages, clears the blockchain daily, and resynchronizes the latest node trust value. It only maintains the final trust value of the latest message on the same day, so that nodes can directly obtain the latest trust value of other nodes from their local machines. Attached Figure Description
[0055] Figure 1 This is a logical connection diagram of the core nodes in the trust management method of a smart water conservancy integrated machine based on a two-layer blockchain provided in an embodiment of the present invention.
[0056] Figure 2This is a data architecture diagram of the trust management method for a smart water conservancy integrated machine based on a two-layer blockchain in the first embodiment of the present invention;
[0057] Figure 3 This is a flowchart of the trust management method for a smart water conservancy integrated machine based on a two-layer blockchain in the first embodiment of the present invention;
[0058] Figure 4 This is a schematic diagram of the data flow in the trust management method of a smart water conservancy integrated machine based on a two-layer blockchain in one embodiment of the present invention;
[0059] Figure 5 This is a schematic diagram of the feedforward neural network in the trust management method of a smart water conservancy integrated machine based on a two-layer blockchain in one embodiment of the present invention.
[0060] Figure 6 This is a schematic diagram of the block structure of the global blockchain in the trust management method of the smart water conservancy integrated machine based on a two-layer blockchain in one embodiment of the present invention;
[0061] Figure 7 This is a schematic diagram of the block structure of a local blockchain in a trust management method for a smart water conservancy integrated machine based on a two-layer blockchain according to an embodiment of the present invention.
[0062] Figure 8 This is a structural block diagram of the trust management system of the smart water conservancy integrated machine based on a two-layer blockchain in the third embodiment of the present invention.
[0063] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0064] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0065] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0067] Please see Figure 1 The diagram shows the logical connection relationship of the core node in the trust management method for a smart water conservancy integrated machine based on a two-layer blockchain proposed in an embodiment of the present invention. The core node includes a smart water conservancy integrated machine, an edge computing unit, and a trusted institution that can communicate with each other, wherein:
[0068] All-In-One (AIO) devices are integrated systems used in the field of smart water management, combining data acquisition, equipment control, data monitoring, and security protection. Physically, an AIO typically connects downwards to one or more water sensors, gates, pumps, etc., and upwards to a MEC (Multi-access Edge Computing) system. When the AIO collects the latest water monitoring data and environmental climate information, it shares this information in real time with other AIOs and MECs. This allows the background intelligent algorithms to calculate optimal gate opening and closing degrees, pump speeds, etc., achieving smart water management monitoring. Simultaneously, it calculates trust values for messages and nodes to identify malicious nodes.
[0069] Mobile Edge Computing Unit (MEC): As an edge aggregation node, it connects to multiple AIO devices in the same physical space, aggregates water conservancy monitoring data and environmental climate data uploaded by AIO in real time, and integrates and stores messages and node trust values.
[0070] Trusted Authority (TA): Responsible for maintaining the mapping relationship between valid identity credentials and public key certificates of all AIO and MEC devices. When the trust value of a device is lower than the preset trust threshold, the node certificate is revoked.
[0071] In addition, such as Figure 2 As shown, when using the aforementioned core nodes to implement trust management, at the data application layer, the trust management scheme architecture proposed in this embodiment of the invention includes a trust value storage layer, a trust value calculation layer, a trust value sharing layer, and a trust value application layer; wherein:
[0072] The trust value storage layer adopts a two-layer blockchain architecture to store water conservancy monitoring data, environmental climate, and the final trust value of messages.
[0073] The trust value calculation layer uses a deep learning algorithm, taking water conservancy monitoring data, environmental climate, and historical trust values as input parameters, to calculate the trust value of nodes and messages.
[0074] The trust value sharing layer contains interfaces for broadcasting and querying trust values.
[0075] The trust value application layer mainly revolves around the identification and handling of malicious nodes, including trust thresholds, label definitions, and certificate revocation management mechanisms.
[0076] It should be pointed out that, Figure 1 , Figure 2 The structure shown does not constitute a limitation on the core node. In other embodiments, the middleware may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0077] Example 1
[0078] Please see Figures 3 to 4 The figure shows a trust management method for a smart water conservancy integrated machine based on a two-layer blockchain in the first embodiment of the present invention. The method utilizes a trusted institution to perform trust management on the smart water conservancy integrated machine. The trusted institution is connected to multiple edge computing units, and each edge computing unit is connected to multiple smart water conservancy integrated machines. The method includes steps S10 to S14.
[0079] Step S10: When the smart water conservancy integrated machine and edge computing unit are detected to be started, an identity registration request is initiated to a trusted institution and the corresponding device identity identifier is passed in, so that the corresponding security certificate can be issued after the trusted institution verifies its identity information.
[0080] First, an initialization operation is performed. When the smart water conservancy integrated machine and the edge computing unit start up, an identity registration request is initiated to a trusted institution, and the corresponding device identity identifier is passed in. After the trusted institution verifies the identity information of these nodes such as the smart water conservancy integrated machine and the edge computing unit, it issues the corresponding security certificate to them.
[0081] Step S11: Obtain the water monitoring data and environmental climate data collected in real time by the smart water conservancy integrated machine and broadcast them to other smart water conservancy integrated machines, so as to calculate the corresponding message local trust value after receiving the water monitoring data and environmental climate data.
[0082] Among them, the message local trust value is calculated by a smart water conservancy integrated machine that receives the message. Specifically, the smart water conservancy integrated machine collects and broadcasts water conservancy monitoring data and environmental climate data to other smart water conservancy integrated machines in real time, and the receiving node that receives the broadcast calculates the message local trust value of the smart water conservancy integrated machine that sent the data.
[0083] In a specific implementation of this invention, a deep learning algorithm is used to determine the local trust value of a message. Specifically, water conservancy monitoring data, environmental climate, and historical trust values are used as input parameters. The corresponding local trust value is obtained using a message local trust value evaluation algorithm deployed in a smart water conservancy integrated machine. This algorithm is obtained through deep learning via a feedforward neural network. For example,... Figure 5 As shown, the feedforward neural network includes an input layer, two hidden layers, and an output layer. The input layer contains 16 feature values: longitude, latitude, weather, temperature, humidity, wind direction, wind level, precipitation, water height, rate, flow, open degree, rotate speed, timestamp, sender trust, and receiver trust. The two hidden layers each contain 10 neurons. The output layer contains only one element, representing the local trust value of the message (also known as the node trust offset). To avoid inconsistent value ranges for different types of feature values, which could affect the accuracy of the deep learning algorithm, the feature values are preprocessed before being input to the input layer. Specifically, the input data is normalized to adjust the value range to the [0,1] interval, as shown in the following formula:
[0084] ;
[0085] in, Represents the normalized eigenvalues. Represents the original data. 、 These represent the maximum and minimum values of the feature, respectively.
[0086] In addition, the formula for calculating the output of the output layer is:
[0087]
[0088] in, and They represent the first L Layer and first L-1 The output of the layer, and They represent the first L Layer weights and biases The activation functions corresponding to this layer are ReLU, ReLU, and Sigmoid, respectively, in this embodiment of the invention.
[0089] The loss function of a feedforward neural network is:
[0090] ;
[0091] in, N This represents the total amount of data in the training set. Indicates the first i The true label of each training sample The algorithm model calculates the first... i Trust value.
[0092] Step S12: The local trust value of the message is reported to the corresponding edge computing unit, the global trust value of the message of the smart water conservancy integrated machine is calculated, the calculation results are synchronized to other edge computing units, and finally the final trust value of the message of the smart water conservancy integrated machine is integrated and broadcast.
[0093] The global trust value is calculated by an edge computing unit by aggregating the global trust values of other smart water conservancy integrated machines within its connection range. The final trust value is calculated by aggregating the global trust values calculated by multiple edge computing units based on the global trust value. Specifically, after obtaining the local trust value of a message, the smart water conservancy integrated machine reports the calculation result to the edge computing unit. The edge computing unit integrates all the received local trust values of the sending node of a certain smart water conservancy integrated machine, calculates the global trust value (GT) of that node, synchronizes the calculation results with other edge computing units, and finally integrates them to obtain the final trust value (FT) of the sending node, which is then broadcast to all nodes.
[0094] In specific implementation, the node trust value of each smart water conservancy integrated machine that has uploaded a message local trust value is used as the weight. The node trust value is accumulated by the corresponding final trust value stored in the blockchain, plus the node's initial trust value and the reward for publishing the blockchain. The calculated message local trust value of the smart water conservancy integrated machine is then weighted and summed to obtain the message global trust value of the smart water conservancy integrated machine.
[0095] The formula for calculating the global trust value of the message is:
[0096] ;
[0097] in, Represents edge computing unit m Calculated sending nodes Global trust value for messages. Indicating a smart water conservancy integrated machine j The node trust value, Indicating a smart water conservancy integrated machine j The local trust value of the message evaluated for node S corresponding to the smart water conservancy integrated machine;
[0098] The formula for calculating the final trust value of a message is:
[0099] ;
[0100] in, The final trust value of the message for node S corresponding to the integrated smart water conservancy machine. N This represents the total number of edge computing units used to calculate the global trust value of a message. For edge computing units m The calculated global trust value of the message for node S corresponding to the integrated smart water conservancy machine.
[0101] It should be noted that in all data sharing processes, the sender needs to first sign the data to be sent using their private key, and then send the signature along with the data; after receiving the data, the receiver needs to first verify the signature of the received data using the sender's public key, and verify the timestamp of the data. If the verification passes, then proceed with the subsequent operations.
[0102] Step S13: The final trust value of the water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine message is encapsulated into the transaction of the block. Then, through a lightweight consensus mechanism, the block is competitively created and published to the global blockchain and the local blockchain.
[0103] Specifically, a two-layer blockchain architecture is adopted for storing trust values, including a global blockchain and a local blockchain, which balances secure data storage and efficient data retrieval.
[0104] Step S14: When a trusted institution detects that the node trust value of the smart water conservancy integrated machine is lower than a preset threshold, it marks the node corresponding to the smart water conservancy integrated machine as a malicious node and revokes the corresponding security certificate.
[0105] In this invention, when a trusted institution detects that the node trust value of a smart water conservancy integrated machine is lower than a preset threshold, it automatically triggers a certificate revocation process, marks the node as a malicious node, and revokes the previously issued certificate. Specifically, the preset threshold can be set according to the actual situation. In this embodiment, the trust value is divided into node trust value and message trust value. The message trust value is also called the node trust value offset (the aforementioned local trust value, global trust value, and final trust value all refer to the message trust value). After successful node authentication, a default node trust value is obtained, such as 0.5. The node trust value is then accumulated from the message trust value and the trust value obtained from the block publication reward. That is, the node trust value is obtained by summing the final trust value and adding the node's initial trust value and the reward for publishing the blockchain (assuming it exists). Whether it is the local trust value, the global trust value, or the final trust value, it all refers to the trust value of a certain message currently broadcast by a smart water conservancy integrated machine, which is the node's trust value offset.
[0106] The trust management method for a smart water conservancy integrated machine based on a two-layer blockchain proposed in the above embodiments of the present invention obtains real-time water conservancy monitoring data and environmental climate data collected by the smart water conservancy integrated machine and broadcasts them to other smart water conservancy integrated machines. Upon receiving the water conservancy monitoring data and environmental climate data, the method calculates the corresponding local trust value of the message; reports the local trust value to the corresponding edge computing unit to calculate the global trust value of the message of the smart water conservancy integrated machine; synchronizes the calculation results with other edge computing units; and finally integrates the results to obtain the final trust value of the message of the smart water conservancy integrated machine, which is then broadcast. The final trust value of data, environmental and climate data, and messages from the smart water conservancy integrated machine is encapsulated in the transaction of the block. Then, through a lightweight consensus mechanism, blocks are competitively created and published to the global and local blockchains. When a trusted institution detects that the node trust value of the smart water conservancy integrated machine is lower than a preset threshold, the corresponding node is marked as a malicious node and its corresponding security certificate is revoked. The final trust value is calculated using edge computing units and the smart water conservancy integrated machine, avoiding the problem of inaccurate trust value calculation results caused by the lack of efficient computing and environmental awareness capabilities of a single smart water conservancy integrated machine. This solves the problem of inaccurate trust value calculation results when using trust management to defend against internal attacks in existing technologies.
[0107] Example 2
[0108] The invention also proposes a trust management method for a smart water conservancy integrated machine based on a two-layer blockchain. The difference between the trust management method for a smart water conservancy integrated machine based on a two-layer blockchain proposed in this invention and the trust management method for a smart water conservancy integrated machine based on a two-layer blockchain proposed in Embodiment 1 of this invention is as follows:
[0109] The steps of encapsulating the final trust value of water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine messages into the transaction of the block, and then competitively creating and publishing the block to the global blockchain and local blockchain through a lightweight consensus mechanism, include:
[0110] When the edge computing unit receives water monitoring data, environmental climate data and the calculated final trust value of the message uploaded by the smart water conservancy integrated machine, it encapsulates them into the transaction of the block, creates a block containing multiple transaction data, and sends the newly created block to the block review committee for verification.
[0111] If a block is approved by a pre-defined percentage of the block review committee, then the edge computing unit is authorized to publish the block to the global blockchain, and a trust value is added to the edge computing unit as a reward.
[0112] If no block passes the review by the pre-defined proportion of review committee members, the block is discarded.
[0113] The formula for calculating the increase in trust value is as follows:
[0114] ;
[0115] in, m Indicates the number of committee members, n This represents the total number of edge computing unit nodes. This represents the node trust value of the edge computing unit.
[0116] Specifically, the global blockchain is maintained by edge computing units and trusted institutions. It stores water monitoring data, environmental and climate data, and final message trust values shared among smart water conservancy integrated machines. Edge computing units are responsible for creating and publishing blocks, while trusted institutions only synchronize block data and monitor malicious nodes. The block structure is as follows: Figure 6 As shown.
[0117] When the edge computing unit receives water monitoring data, environmental and climate data, and the calculated final trust value from the smart water conservancy integrated machine, it encapsulates them into a block transaction, creates a block containing multiple transaction data, and sends the new block to the block review committee for verification. If more than 2 / 3 of the committee members approve the verification, they agree to allow the edge computing unit to publish the block to the global blockchain and add a trust value to the MEC. As a reward, among them m Indicates the number of committee members, n This represents the total number of edge computing unit nodes. This indicates the node trust value of the edge computing unit; otherwise, discard this block.
[0118] Furthermore, in some optional embodiments of the present invention, the node with the highest trust value is periodically elected. m Each edge computing unit acts as a block review committee. During their tenure as block review committee members, these edge computing units do not participate in the creation and publication of blocks, but are only responsible for verifying new blocks submitted by other edge computing units. When multiple edge computing units create new blocks at the same time, the new block with the larger sum of the absolute values of the final trust values of the messages is published first.
[0119] Meanwhile, smart contracts are stored in trusted institutions and edge computing units. For example, when a new block is added to the global blockchain, the smart contract stored in the trusted institution will be triggered to verify whether the trust value of all nodes is lower than the preset trust threshold. If it is lower, these nodes will be marked as malicious nodes and their certificates will be revoked. When the edge computing unit successfully publishes a global block, the smart contract stored therein will also be triggered to add a new block in the local blockchain, which only records the final trust value of the message.
[0120] In addition, in some optional embodiments of the present invention, the step of encapsulating the final trust value of the water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine messages into the transaction of the block, and then competitively creating and publishing the block to the global blockchain and the local blockchain through a lightweight consensus mechanism, further includes:
[0121] The data in the local blockchain is cleared daily, and the latest node trust value is resynchronized.
[0122] When edge computing units or smart water conservancy integrated machine nodes communicate, they can directly obtain the latest trust value of the node from the local blockchain.
[0123] The local blockchain is maintained by edge computing units and the smart water conservancy integrated machine, and is only used to store the final trust value of messages. The edge computing units are responsible for creating and publishing blocks, while the smart water conservancy integrated machine only synchronizes block data. The block structure is as follows: Figure 7 As shown, the data in the local blockchain is cleared daily and resynchronized with the latest node trust value. This means the local blockchain only maintains the final trust value of the latest message for that day. Therefore, when edge computing units or smart water conservancy integrated machine nodes communicate, they can directly obtain the latest node trust value from the local blockchain, ensuring secure storage of trust values while improving the efficiency of trust value retrieval.
[0124] The trust management method for a smart water conservancy integrated machine based on a two-layer blockchain proposed in the above embodiments of the present invention obtains real-time water conservancy monitoring data and environmental climate data collected by the smart water conservancy integrated machine and broadcasts them to other smart water conservancy integrated machines. Upon receiving the water conservancy monitoring data and environmental climate data, the method calculates the corresponding local trust value of the message; reports the local trust value to the corresponding edge computing unit to calculate the global trust value of the message of the smart water conservancy integrated machine; synchronizes the calculation results with other edge computing units; and finally integrates the results to obtain the final trust value of the message of the smart water conservancy integrated machine, which is then broadcast. The final trust value of data, environmental and climate data, and messages from the smart water conservancy integrated machine is encapsulated in the transaction of the block. Then, through a lightweight consensus mechanism, blocks are competitively created and published to the global and local blockchains. When a trusted institution detects that the node trust value of the smart water conservancy integrated machine is lower than a preset threshold, the corresponding node is marked as a malicious node and its corresponding security certificate is revoked. The final trust value is calculated using edge computing units and the smart water conservancy integrated machine, avoiding the problem of inaccurate trust value calculation results caused by the lack of efficient computing and environmental awareness capabilities of a single smart water conservancy integrated machine. This solves the problem of inaccurate trust value calculation results when using trust management to defend against internal attacks in existing technologies.
[0125] Example 3
[0126] Please see Figure 8 The figure shows a trust management system for a smart water conservancy integrated machine based on a two-layer blockchain proposed in the fourth embodiment of the present invention. The system utilizes a trusted institution to manage the trust of the smart water conservancy integrated machine. The trusted institution is communicatively connected to multiple edge computing units, and each edge computing unit is communicatively connected to multiple smart water conservancy integrated machines. The system includes:
[0127] The detection module 100 is used to initiate an identity registration request to a trusted institution and pass in the corresponding device identity identifier when the smart water conservancy integrated machine or edge computing unit is detected to start, so as to issue the corresponding security certificate after the trusted institution verifies its identity information.
[0128] The acquisition module 200 is used to acquire water conservancy monitoring data and environmental climate data collected in real time by the smart water conservancy integrated machine and broadcast them to other smart water conservancy integrated machines, so as to calculate the corresponding message local trust value after receiving the water conservancy monitoring data and environmental climate data.
[0129] The calculation module 300 is used to report the local trust value of the message to the corresponding edge computing unit, calculate the global trust value of the message of the smart water conservancy integrated machine, synchronize the calculation results to other edge computing units, and finally integrate the final trust value of the message of the smart water conservancy integrated machine and broadcast the final trust value.
[0130] The storage module 400 is used to encapsulate the final trust value of water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine messages into the transaction of the block, and then through a lightweight consensus mechanism, compete to create and publish the block to the global blockchain and the local blockchain.
[0131] The revocation module 500 is used to mark the node corresponding to the smart water conservancy integrated machine as a malicious node and revoke the corresponding security certificate when a trusted institution detects that the node trust value of the smart water conservancy integrated machine is lower than a preset threshold.
[0132] Furthermore, in the aforementioned trust management system for the smart water conservancy integrated machine based on a two-layer blockchain, the step of calculating the corresponding local trust value of the message after receiving water conservancy monitoring data and environmental climate data includes:
[0133] Using water conservancy monitoring data, environmental climate, and historical trust values as input parameters, the corresponding message local trust value is obtained by using the message local trust value evaluation algorithm deployed in the smart water conservancy integrated machine.
[0134] The message local trust value evaluation algorithm is obtained through deep learning using a feedforward neural network, which includes an input layer, two hidden layers, and an output layer.
[0135] Furthermore, the aforementioned trust management system for the smart water conservancy integrated machine based on a two-layer blockchain, wherein,
[0136] The formula for calculating the output of the output layer is:
[0137]
[0138] in, and They represent the first L Layer and first L-1 The output of the layer, and They represent the first L Layer weights and biases This is the activation function corresponding to this layer;
[0139] The loss function of a feedforward neural network is:
[0140] ;
[0141] in, N This represents the total amount of data in the training set. Indicates the first i The true label of each training sample The algorithm model calculates the first... i Trust value.
[0142] Furthermore, in the aforementioned trust management system for the smart water conservancy integrated machine based on a two-layer blockchain, the steps of reporting the local trust value of a message to the corresponding edge computing unit and calculating the global trust value of the message of the smart water conservancy integrated machine include:
[0143] Using the node trust values of each smart water conservancy integrated machine that has uploaded a message local trust value as weights, the calculated message local trust values of the smart water conservancy integrated machine are weighted and summed to obtain the message global trust value of the smart water conservancy integrated machine.
[0144] The formula for calculating the global trust value of the message is:
[0145] ;
[0146] in, Represents edge computing unit m Calculated sending node S Global trust value for messages. Indicating a smart water conservancy integrated machine j The node trust value, Indicating a smart water conservancy integrated machine j The local trust value of the message evaluated for node S corresponding to the smart water conservancy integrated machine.
[0147] Furthermore, in the aforementioned trust management system for the smart water conservancy integrated machine based on a two-layer blockchain, the formula for calculating the final trust value of a message is as follows:
[0148] ;
[0149] in, The final trust value of the message for node S corresponding to the integrated smart water conservancy machine. N This represents the total number of edge computing units used to calculate the global trust value of a message. For edge computing units m The calculated global trust value of the message for node S corresponding to the integrated smart water conservancy machine.
[0150] Furthermore, in the aforementioned trust management system for the smart water conservancy integrated machine based on a two-layer blockchain, the steps of encapsulating water conservancy monitoring data, environmental climate data, and the final trust value of the smart water conservancy integrated machine's messages into a block transaction, and then competitively creating and publishing the block to the global and local blockchains through a lightweight consensus mechanism, include:
[0151] When the edge computing unit receives water monitoring data, environmental climate data and the calculated message final node trust value uploaded by the smart water conservancy integrated machine, it encapsulates them into the transaction of the block, creates a block containing multiple transaction data, and sends the newly created block to the block review committee for verification.
[0152] If a block is approved by a pre-defined percentage of the block review committee, then the edge computing unit is authorized to publish the block to the global blockchain, and a trust value is added to the edge computing unit as a reward.
[0153] If no block passes the review by the pre-defined proportion of review committee members, the block is discarded.
[0154] The formula for calculating the increase in trust value is as follows:
[0155] ;
[0156] in, m Indicates the number of committee members, n This represents the total number of edge computing unit nodes. This represents the node trust value of the edge computing unit.
[0157] Furthermore, in the aforementioned trust management system for the smart water conservancy integrated machine based on a two-layer blockchain, the steps of encapsulating water conservancy monitoring data, environmental climate data, and the final trust value of the smart water conservancy integrated machine's messages into a block transaction, and then competitively creating and publishing the block to the global and local blockchains through a lightweight consensus mechanism, further include:
[0158] The data in the local blockchain is cleared daily, and the latest node trust value is resynchronized.
[0159] When edge computing units or smart water conservancy integrated machine nodes communicate, they can directly obtain the latest trust value of the node from the local blockchain.
[0160] The functions or operation steps implemented by the above modules are largely the same as those in the above method embodiments, and will not be repeated here.
[0161] Example 4
[0162] In another aspect, the present invention provides a readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of any of the methods described in embodiments one to two above.
[0163] Example 5
[0164] In another aspect, the present invention provides an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described in embodiments one to two above.
[0165] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0166] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequential list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable storage medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0167] More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable storage media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0168] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0169] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0170] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A trust management method for a smart water conservancy integrated machine based on a two-layer blockchain, characterized in that, The method involves using a trusted institution to manage the trust in a smart water conservancy integrated machine. The trusted institution has communication connections to multiple edge computing units, and each edge computing unit has communication connections to multiple smart water conservancy integrated machines. When the smart water conservancy integrated machine and edge computing unit are detected to be started, an identity registration request is initiated to a trusted institution and the corresponding device identity identifier is passed in, so that the corresponding security certificate can be issued after the trusted institution verifies its identity information. The system acquires real-time water monitoring data and environmental climate data collected by the smart water conservancy integrated machine and broadcasts them to other smart water conservancy integrated machines. After receiving the water monitoring data and environmental climate data, the system calculates the corresponding message local trust value. Specifically, the smart water conservancy integrated machine that receives the water monitoring data and environmental climate data calculates the message local trust value of the smart water conservancy integrated machine that sent the water monitoring data and environmental climate data. The message local trust value is reported to the corresponding edge computing unit, the global trust value of the smart water conservancy integrated machine is calculated, the calculation results are synchronized to other edge computing units, and finally the final trust value of the smart water conservancy integrated machine is integrated and broadcast. The message global trust value is calculated by the edge computing unit by aggregating the message local trust values of other smart water conservancy integrated machines within the connection range, and the final trust value is calculated by aggregating the message global trust values calculated by multiple edge computing units. The final trust value of messages from water conservancy monitoring data, environmental and climate data, and smart water conservancy integrated machines is encapsulated into the transaction of the block. Then, through a lightweight consensus mechanism, blocks are competitively created and published to the global blockchain and local blockchains. The global blockchain is maintained by edge computing units and trusted institutions and is used to store water conservancy monitoring data, environmental and climate data, and final trust values of messages shared among smart water conservancy integrated machines. Edge computing units are responsible for creating and publishing blocks, and trusted institutions are used to synchronize block data and monitor malicious nodes. The local blockchain is maintained by edge computing units and smart water conservancy integrated machines and is used to store the final trust values of messages. Edge computing units are responsible for creating and publishing blocks, and smart water conservancy integrated machines are used to synchronize block data. When a trusted organization detects that the node trust value of the smart water conservancy integrated machine is lower than a preset threshold, it will mark the corresponding node of the smart water conservancy integrated machine as a malicious node and revoke the corresponding security certificate.
2. The trust management method for a smart water conservancy integrated machine based on a two-layer blockchain as described in claim 1, characterized in that, The step of calculating the corresponding message local trust value after receiving water conservancy monitoring data and environmental climate data includes: Using water conservancy monitoring data, environmental climate, and historical trust values as input parameters, the corresponding message local trust value is obtained by using the message local trust value evaluation algorithm deployed in the smart water conservancy integrated machine. The message local trust value evaluation algorithm is obtained through deep learning using a feedforward neural network, which includes an input layer, two hidden layers, and an output layer.
3. The trust management method for a smart water conservancy integrated machine based on a two-layer blockchain as described in claim 2, characterized in that, The formula for calculating the output of the output layer is: in, and They represent the first L Layer and first L-1 The output of the layer, and They represent the first L Layer weights and biases This is the activation function corresponding to this layer; The loss function of a feedforward neural network is: ; in, N This represents the total amount of data in the training set. Indicates the first i The true label of each training sample The algorithm model calculates the first... i Trust value.
4. The trust management method for a smart water conservancy integrated machine based on a two-layer blockchain as described in claim 1, characterized in that, The steps of reporting the local trust value of the message to the corresponding edge computing unit and calculating the global trust value of the message of the smart water conservancy integrated machine include: Using the node trust values of each smart water conservancy integrated machine that has uploaded a message local trust value as weights, the calculated message local trust values of the smart water conservancy integrated machine are weighted and summed to obtain the message global trust value of the smart water conservancy integrated machine. The formula for calculating the global trust value of the message is: ; in, Represents edge computing unit m Calculated sending node S Global trust value for messages. Indicating a smart water conservancy integrated machine j The node trust value, Indicating a smart water conservancy integrated machine j The local trust value of the message evaluated for node S corresponding to the smart water conservancy integrated machine.
5. The trust management method for a smart water conservancy integrated machine based on a two-layer blockchain as described in claim 1, characterized in that, The formula for calculating the final trust value of a message is: ; in, The final trust value of the message for node S corresponding to the integrated smart water conservancy machine. N This represents the total number of edge computing units used to calculate the global trust value of a message. For edge computing units m The calculated global trust value of the message for node S corresponding to the integrated smart water conservancy machine.
6. The trust management method for a smart water conservancy integrated machine based on a two-layer blockchain as described in claim 1, characterized in that, The steps of encapsulating the final trust value of water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine messages into the transaction of the block, and then competitively creating and publishing the block to the global blockchain and local blockchain through a lightweight consensus mechanism, include: When the edge computing unit receives water monitoring data, environmental climate data and the calculated final trust value of the message uploaded by the smart water conservancy integrated machine, it encapsulates them into the transaction of the block, creates a block containing multiple transaction data, and sends the newly created block to the block review committee for verification. If a block is approved by a pre-defined percentage of the block review committee, then the edge computing unit is authorized to publish the block to the global blockchain, and a trust value is added to the edge computing unit as a reward. If no block passes the review by the pre-defined proportion of review committee members, the block is discarded. The formula for calculating the increase in trust value is as follows: ; in, m Indicates the number of committee members, n This represents the total number of edge computing unit nodes. This represents the node trust value of the edge computing unit.
7. The trust management method for a smart water conservancy integrated machine based on a two-layer blockchain as described in claim 6, characterized in that, The steps of encapsulating the final trust value of water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine messages into the transaction of the block, and then competitively creating and publishing the block to the global blockchain and local blockchain through a lightweight consensus mechanism, also include: The data in the local blockchain is cleared daily, and the latest node trust value is resynchronized. When edge computing units or smart water conservancy integrated machine nodes communicate, they can directly obtain the latest trust value of the node from the local blockchain.
8. A trust management system for a smart water conservancy integrated machine based on a two-layer blockchain, characterized in that, A trusted institution is used to manage the trust of a smart water conservancy integrated machine. The trusted institution is communicatively connected to multiple edge computing units, and each edge computing unit is communicatively connected to multiple smart water conservancy integrated machines. This system is used to implement the trust management method for a smart water conservancy integrated machine based on a two-layer blockchain as described in any one of claims 1 to 7. The system includes: The detection module is used to initiate an identity registration request to a trusted institution and pass in the corresponding device identity identifier when the smart water conservancy integrated machine or edge computing unit is detected to be started, so as to issue the corresponding security certificate after the trusted institution verifies its identity information. The acquisition module is used to acquire water conservancy monitoring data and environmental climate data collected in real time by the smart water conservancy integrated machine and broadcast them to other smart water conservancy integrated machines, so as to calculate the corresponding message local trust value after receiving the water conservancy monitoring data and environmental climate data. The calculation module is used to report the local trust value of the message to the corresponding edge computing unit, calculate the global trust value of the message of the smart water conservancy integrated machine, synchronize the calculation results to other edge computing units, and finally integrate the final trust value of the message of the smart water conservancy integrated machine and broadcast the final trust value. The storage module is used to encapsulate the final trust value of water conservancy monitoring data, environmental climate data, and smart water conservancy integrated machine messages into the transaction of the block, and then through a lightweight consensus mechanism, compete to create and publish the block to the global blockchain and local blockchain; The revocation module is used to mark the node of the smart water conservancy integrated machine as a malicious node and revoke the corresponding security certificate when a trusted institution detects that the node trust value of the smart water conservancy integrated machine is lower than a preset threshold.
9. A readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Block chain network node trust evaluation method, system and device and medium
CN118803797A
Internet of vehicles trust management method and system based on block chain
CN119421160A