A blockchain-based industrial Internet of Things data encryption storage method
By using a blockchain-based data encryption and storage method, the vulnerability of industrial IoT data storage to attacks and tampering is solved, achieving data security and traceability, and optimizing data storage and retrieval.
Patent Information
- Application Number
- CN202411139424.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Traditional industrial IoT data storage methods are vulnerable to hacking and data tampering, and cannot guarantee the authenticity and immutability of the data.
By adopting a blockchain-based data encryption and storage method, and through data sharding, node management algorithms, and data synchronization control algorithms, the decentralized nature of blockchain is utilized to achieve secure data storage and traceability.
It improves data security and traceability, solves the problems of large data volume and high memory consumption in blockchain storage, and achieves data immutability and reliability.
Smart Images

Figure CN118677700B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of radio station communication technology, and in particular to an industrial Internet of Things data encryption storage method based on blockchain. Background Art
[0002] The Industrial Internet of Things connects the physical world with the information world to realize the intelligence and automation of industrial production processes. However, in the application of the Industrial Internet of Things, the security and reliability of data is an important issue. Traditional data storage methods, such as centralized storage, are vulnerable to hacker attacks and data tampering, and cannot guarantee the authenticity and immutability of data.
[0003] Therefore, it is necessary to provide an industrial Internet of Things data encryption storage method based on blockchain to solve the above problems. Summary of the invention
[0004] The purpose of the present invention is to provide an industrial Internet of Things data encryption storage method based on blockchain, which can effectively solve the problems of large data volume and high memory occupancy faced by blockchain storage, and improve the traceability and security of data.
[0005] To achieve the above object, the present invention provides an industrial Internet of Things data encryption storage method based on blockchain, comprising the following steps:
[0006] S1: Slice the data in the industrial Internet of Things to obtain data slicing information, and digitize the data slicing information to obtain digital information;
[0007] S2: Use node management algorithms to dynamically build network routes, achieve peer-to-peer communication between nodes, and improve data traceability and reliability;
[0008] S3: Design data synchronization control algorithm and data partition storage algorithm to optimize data storage and retrieval;
[0009] S4: When users upload data, they verify and store it through the client software or by calling the data upload interface, monitor the local newly added data in real time, and send data synchronization requests to their neighboring nodes.
[0010] Preferably, in step S1, in order to ensure the security of the data storage process, the data sharding information is encrypted, the data sharding information is digitized and converted into decimal form to obtain information Hn, the number of data shards is obtained according to the nodes of the blockchain, and the following conditions are satisfied when constructing the polynomial:
[0011] ;
[0012] ;
[0013] ;
[0014] ;
[0015] in, P k A large prime number representing message fragmentation, Indicates the maximum number of polynomial fragments, Indicates the number of transaction shard information, Indicates i The value of the group polynomial, Indicates the number of blockchain nodes; obtains multiple sets of data sharding information (xp, yp), which are combined into multiple parameters. Within these parameters, P k As the input value of the public parameter, the input value of the public parameter is expressed as:
[0016] ;
[0017] Indicates the input value of the public parameter, which has a certain degree of security; p r and q r is a large prime number that satisfies the public parameter; Indicates the order of the multiplication cycle. Under the collision of shard messages and random numbers, As a traceability certificate for sorting, all encrypted data passes through the master node and is recorded on the blockchain. The electronic encrypted information obtained through random transactions uses the blockchain as a judgment function for the traceability certificate; Represents the determination function of the blockchain traceability certificate;
[0018] ;
[0019] when When it is greater than or equal to 0, it is determined that the traceability on the blockchain is successful; L Indicates re-encrypted ciphertext; f(d i ) Indicates the traceability result under the i-th cycle; d k express k Group fragment information; Indicates the order of the multiplication loop; d i and d j Respectively represent the first group of fragmentation information and the last group of fragmentation information.
[0020] Preferably, in step S2, dynamically establishing network routing includes:
[0021] Nodes are added to the network routing through the KAD algorithm. Nodes are peers to each other. Applications using the BitTorrent protocol run in the nodes. The DHT protocol is part of the BitTorrent protocol. The nodes in the network routing use the DHT protocol to communicate. The dynamically formed network routing is composed of multiple nodes and the address information of neighboring nodes saved by the nodes. A single node has a single global unique identifier and saves a list of neighboring nodes. Through the neighboring nodes in the list, the node communicates with other nodes in the network to obtain more node information;
[0022] The data management model of a single node is divided into three layers: storage layer, service layer, and application layer;
[0023] The storage layer uses a local database to store structured data, and the neighbor node list data resides in memory to achieve communication with neighbor nodes;
[0024] The service layer includes neighbor node management service, storage management service, data upload service and data query service; the neighbor node management service uses the DHT protocol to realize communication with nodes in the network and manage the dynamic list of neighbor nodes; the storage management service provides insertion and query operations of the local database and synchronizes the changes of data in the network regularly; the data upload service realizes the upload and storage of business data. After the node verifies the data, it is stored locally, and the storage management service synchronizes the uploaded data to the neighbor nodes in the network regularly; the data query service performs query operations according to any attribute of the business data and returns the data query results from the neighbor nodes in the network routing;
[0025] The application layer includes application software, which includes executable files, dynamic link library files, local databases and interfaces.
[0026] Preferably, in step S3, by real-time monitoring of newly added local data and sending data synchronization requests to neighboring nodes, the integrity and consistency of the data are ensured, and the data table is divided into multiple partition tables according to the first position of the KEY field to improve the query speed;
[0027] In the data synchronization control algorithm, the data synchronization service synchronizes the data stored in the local database to the neighboring nodes of the network routing, and the neighboring nodes then synchronize the data to the neighboring nodes of their network routing, specifically including the following steps:
[0028] S31: The data synchronization service monitors the newly added business data of this node in real time, and queries the number of nodes storing data in the network routing through the KEY value of the data;
[0029] S32: The number of data backups is within the upper and lower limits of the set number of data backups;
[0030] S33: If the number of data backups does not reach the set lower limit of the number of data backups, a data synchronization request is initiated to a neighboring node that does not store the data and has fewer stored data. After the neighboring node verifies the data, it stores the received data locally.
[0031] S34: The neighboring node that stores the data repeats the above process until the data is transmitted to the entire network. The theoretical value of the number of backups Nstorage stored in the network routing is expressed as:
[0032] ;
[0033] Where: Rstorage is the percentage of all data stored in the node; Npeer is the number of nodes in the network routing. The upper and lower limits of the number of backups of data stored in the network routing, Nupper and Nlower, are respectively:
[0034] ;
[0035] ;
[0036] In the formula and They are the upper and lower limits of the number of data storage backups in percentage.
[0037] Preferably, in step S4, a partition table is further established according to the second bit of the KEY field, and when a node has a query return, the data query result is returned;
[0038] When users upload data, they first verify the data through the client software or call the data upload interface. After verification, the data is stored in the local database. The data synchronization service monitors the local newly added data in real time and sends data synchronization requests to its neighboring nodes. After the neighboring nodes receive the data, they first verify the data. After verification, the data is stored in the local database of the neighboring nodes, and the data is synchronized with its neighboring nodes. Until the data spreads to the entire network. The detailed algorithm steps of data query are as follows:
[0039] S51: input data query conditions and initiate data query;
[0040] S52: perform precise query based on primary key information, first perform local query, and directly return query result if data is found; if data is not found locally, initiate data query to neighboring nodes, and return data query result when one node returns query;
[0041] S53: When a fuzzy query is performed according to the input query condition, a data query is initiated to the local node and each neighboring node, and the data query results returned by each node are merged as the return result of the user query data.
[0042] Therefore, the present invention adopts the above-mentioned industrial Internet of Things data encryption storage method based on blockchain, which has the following beneficial effects:
[0043] (1) The present invention utilizes the decentralized nature of blockchain to ensure the security, authenticity and immutability of data.
[0044] (2) The present invention can effectively solve the problems of large data volume and high memory usage faced by blockchain storage, and improve the traceability and security of data.
[0045] (3) The present invention realizes the storage, transmission and access of industrial Internet of Things data through smart contracts and distributed storage technology.
[0046] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of a blockchain-based industrial Internet of Things data encryption storage method of the present invention;
[0048] Figure 2 It is a data management model of an industrial Internet of Things data encryption storage method based on blockchain in the present invention;
[0049] Figure 3 It is a node network structure diagram of the present invention;
[0050] Figure 4 It is a data synchronization control algorithm diagram of the present invention;
[0051] Figure 5 It is a data partition storage algorithm diagram of the present invention;
[0052] Figure 6 It is the data query control algorithm diagram of the present invention. DETAILED DESCRIPTION
[0053] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0054] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0055] The words "include" or "comprises" and the like used in the present invention mean that the elements before the word include the elements listed after the word, and do not exclude the possibility of also including other elements. The orientation or position relationship indicated by the terms "inside", "outside", "upper", "lower", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation of the present invention. When the absolute position of the described object changes, the relative position relationship may also change accordingly. In the present invention, unless otherwise clearly specified and limited, the terms "attachment" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral body; it can be directly connected, or indirectly connected through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0056] like Figure 1 As shown, the present invention provides an industrial Internet of Things data encryption storage method based on blockchain, comprising the following steps:
[0057] S1: Slice the data in the industrial Internet of Things to obtain data slicing information, and digitize the data slicing information to obtain digital information; in step S1, in order to ensure the security of the data storage process, encrypt the data slicing information, digitize the data slicing information, convert it into decimal form, obtain information Hn, obtain the number of data slicing information according to the nodes of the blockchain, and satisfy the following conditions when constructing the polynomial:
[0058] ;
[0059] ;
[0060] ;
[0061] ;
[0062] in, P k A large prime number representing message fragmentation, Indicates the maximum number of polynomial fragments, Indicates the number of transaction shard information, Indicates i The value of the group polynomial, Indicates the number of blockchain nodes; obtains multiple sets of data sharding information (xp, yp), which are combined into multiple parameters. Within these parameters, P kAs the input value of the public parameter, the input value of the public parameter is expressed as:
[0063] ;
[0064] Indicates the input value of the public parameter, which has a certain degree of security; p r and q r is a large prime number that satisfies the public parameter; Indicates the order of the multiplication cycle. Under the collision of shard messages and random numbers, As a traceability certificate for sorting, all encrypted data passes through the master node and is recorded on the blockchain. The electronic encrypted information obtained through random transactions uses the blockchain as a judgment function for the traceability certificate; Represents the determination function of the blockchain traceability certificate;
[0065] ;
[0066] when When it is greater than or equal to 0, it is determined that the traceability on the blockchain is successful; L Indicates re-encrypted ciphertext; f(d i ) Indicates the traceability result under the i-th cycle; d k express k Group data sharding information; Indicates the order of the multiplication loop; d i and d j They represent the first set of fragment information and the last set of fragment information respectively. Under the given security parameters, the system attributes have generated a set of assumed encrypted attributes.
[0067] S2: Dynamically establish network routing using a node management algorithm to achieve peer-to-peer communication between nodes and improve data traceability and reliability; in step S2, dynamically establishing network routing includes:
[0068] Nodes are added to the network routing through the KAD algorithm. Nodes are peers to each other. Applications using the BitTorrent protocol run in the nodes. The DHT protocol is part of the BitTorrent protocol. The nodes in the network routing use the DHT protocol to communicate. The dynamically formed network routing is composed of multiple nodes and the address information of neighboring nodes saved by the nodes. A single node has a single global unique identifier and saves a list of neighboring nodes. Through the neighboring nodes in the list, the node communicates with other nodes in the network to obtain more node information;
[0069] Nodes store partial data, and all data can be obtained from network routing. The blockchain storage application system requires each node to store a complete copy of data, resulting in a waste of storage resources; at the same time, the traffic resources of network routing are not fully utilized. Therefore, each node stores partial data according to the node storage allocation in the network routing. When other nodes need to obtain data not stored by this node, they can obtain any data from other neighboring nodes in the network routing.
[0070] The data management model of a single node is divided into three layers: storage layer, service layer and application layer; Figure 2 shown.
[0071] The storage layer uses a local database to store structured data, and the neighbor node list data resides in memory to achieve communication with neighbor nodes;
[0072] The service layer includes neighbor node management service, storage management service, data upload service and data query service; the neighbor node management service uses the DHT protocol to realize communication with nodes in the network and manage the dynamic list of neighbor nodes; the storage management service provides insertion and query operations of the local database and synchronizes the changes of data in the network regularly; the data upload service realizes the upload and storage of business data. After the node verifies the data, it is stored locally, and the storage management service synchronizes the uploaded data to the neighbor nodes in the network regularly; the data query service performs query operations according to any attribute of the business data and returns the data query results from the neighbor nodes in the network routing;
[0073] The application layer includes application software, which includes executable files, dynamic link library files, local databases and interfaces. Each version of the application software corresponds to a different version of the file, and these files can only be accessed by other files of a specific version. When the program starts running, it will automatically check the integrity of the file and the correctness of the version. If an abnormality is detected, the file will be deleted and re-downloaded from the download server. For example, if the local database file is found to be opened externally or the data is tampered with, the local database file will be deleted, an empty local database file will be regenerated, and the data will be synchronized from the neighboring node.
[0074] The nodes in the network are equal to each other, and any node can go online at any time to join or exit the network routing. The node network structure diagram is as follows Figure 3 As shown in the figure. Node 1 and nodes 2 to 4 form a temporary network route. Node 1 saves the list of neighbor nodes. When the number of nodes in the network route does not reach the set upper limit, node n can join the network route through the KAD algorithm. The neighbor node management service regularly detects the online status of neighbor nodes. When a node is offline, a node has no heartbeat packet for a long time, and a new node joins the network, these neighbor nodes will be replaced first. Node 2 can also form another network route with node 1 and other nodes.
[0075] S3: Design data synchronization control algorithm and data partition storage algorithm to optimize data storage and retrieval; In step S3, by real-time monitoring of local newly added data and sending data synchronization requests to neighboring nodes, the integrity and consistency of the data are ensured, and the data table is divided into multiple partition tables according to the first position of the KEY field to improve the query speed;
[0076] Node management, each node that implements the DHT protocol opens a port to listen to messages sent by other nodes in the network. When receiving a new message, it first determines whether the message sender is in the network routing table of this node. If not, it adds it to the network routing table. At the same time, the node sends Ping and FindNode messages to all nodes in the network routing table. The online status of the message receiving node can be determined based on the Ping message reply result; when the node receives the FindNode message, the message receiving node returns some neighboring nodes in the network routing. The returned neighboring nodes are nodes that are closer to the message sending node calculated based on the KAD algorithm. The message sending node sends messages to the returned neighboring nodes in turn to obtain more neighboring nodes and join more network routes. The node management service regularly loops through the neighboring node list, sends Ping messages, and finds out the neighboring nodes that are offline or have not responded for a long time based on their return values, and sorts these nodes to the end of the neighboring node list. When other active nodes join, these nodes are replaced first.
[0077] In the data synchronization control algorithm, the data synchronization service synchronizes the data stored in the local database to the neighboring nodes of the network routing, and the neighboring nodes then synchronize the data to the neighboring nodes of their network routing, and the data continues to spread to the entire network. Specifically, it includes the following steps:
[0078] S31: The data synchronization service monitors the newly added business data of this node in real time, and queries the number of nodes storing data in the network routing through the KEY value of the data;
[0079] S32: The number of data backups is within the upper and lower limits of the set number of data backups;
[0080] S33: If the number of data backups does not reach the set lower limit of the number of data backups, a data synchronization request is initiated to a neighboring node that does not store the data and has fewer stored data. After the neighboring node verifies the data, it stores the received data locally.
[0081] S34: The neighboring node that stores the data repeats the above process until the data is transmitted to the entire network. The theoretical value of the number of backups Nstorage stored in the network routing is expressed as:
[0082] ;
[0083] Where: Rstorage is the percentage of all data stored in the node; Npeer is the number of nodes in the network routing. The upper and lower limits of the number of backups of data stored in the network routing, Nupper and Nlower, are respectively:
[0084] ;
[0085] ;
[0086] In the formula and They are the upper and lower limits of the number of data storage backups in percentage.
[0087] Data synchronization control algorithm such as Figure 4 As shown;
[0088] Algorithm: data synchronization control;
[0089] Input:newData: new data received by the node;
[0090] StorageRate: percentage of all data stored in a node;
[0091] peerAmount: the number of nodes in the network routing;
[0092] ccopysLimitRate: upper and lower limits of data backup number;
[0093] Output:dataCopys: the number of data copies in the network routing;
[0094] To facilitate the management of business data, the node data storage uses a relational database for local data storage, and a lightweight database such as SQLit can be selected. The database file and table structure are created through the service, and all data are stored in encrypted form. The node cannot directly open or tamper with the data locally, and no manual maintenance is required for each node. In the design of the business data table, the KEY_ID field is added to represent the unique identifier of the data, which is generated by the hash value of the business data; the CREATE_ADDRESS field represents the address of the data uploader; the PUBLIC_KEY field represents the public key of the data uploader; and the SIGN field represents the signature of the business data using the private key of the data uploader. When storing data, the KEY_ID field value is compared with the data hash value, and the signature field value is verified using the public key field value to ensure the correctness of the data. The default field design of the business data table is shown in Table 1.
[0095] Table 1
[0096] .
[0097] The hash value of each business data is composed of 64 alphanumeric characters, which is the unique identifier of the business data. To improve the retrieval speed of the KEY field, the data table is divided into 36 partition tables (26 letters plus 10 numbers) according to the first digit of the KEY field. When the amount of data continues to grow and reaches the set value, a partition table will be further established according to the second digit of the KEY field. Each level of partition table can reach up to 36, and so on. When accurately querying data based on the KEY field, you can locate the specific partition table, reduce the total amount of data retrieval, and improve the query speed. Data partition storage algorithm Figure 5 shown.
[0098] S4: When users upload data, they verify and store it through the client software or by calling the data upload interface, monitor the local newly added data in real time, and send data synchronization requests to their neighboring nodes.
[0099] In step S4, a partition table is further established according to the second bit of the KEY field, and when a node has a query return, the data query result is returned;
[0100] When users upload data, they first verify the data through the client software or call the data upload interface. After verification, the data is stored in the local database. The data synchronization service monitors the local newly added data in real time and sends data synchronization requests to its neighboring nodes. After the neighboring nodes receive the data, they first verify the data. After verification, the data is stored in the local database of the neighboring nodes, and the data is synchronized with its neighboring nodes. Until the data spreads to the entire network. The detailed algorithm steps of data query are as follows:
[0101] S51: input data query conditions and initiate data query;
[0102] S52: perform precise query based on primary key information, first perform local query, and directly return query result if data is found; if data is not found locally, initiate data query to neighboring nodes, and return data query result when one node returns query;
[0103] S53: When performing fuzzy query based on the input query condition, initiate data query to the local and neighboring nodes, merge the data query results returned by each node, and use them as the return result of the user's query data. Figure 6 shown.
[0104] Therefore, the present invention adopts the above-mentioned blockchain-based industrial Internet of Things data encryption storage method, which can effectively solve the problems of large data volume and high memory occupancy faced by blockchain storage, and improve the traceability and security of data.
[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A blockchain-based industrial Internet of Things data encryption storage method, characterized by: The following steps are involved: S1: Slice the data in the industrial Internet of Things to obtain data slicing information, and digitize the data slicing information to obtain digital information; S2: Use node management algorithms to dynamically build network routes, achieve peer-to-peer communication between nodes, and improve data traceability and reliability; S3: Design data synchronization control algorithm and data partition storage algorithm to optimize data storage and retrieval; In step S3, by real-time monitoring of local newly added data and sending data synchronization requests to neighboring nodes, the integrity and consistency of the data are ensured, and the data table is divided into multiple partition tables according to the first position of the KEY field to improve the query speed; In the data synchronization control algorithm, the data synchronization service synchronizes the data stored in the local database to the neighboring nodes of the network routing, and the neighboring nodes then synchronize the data to the neighboring nodes of their network routing, specifically including the following steps: S31: The data synchronization service monitors the newly added business data of this node in real time, and queries the number of nodes storing data in the network routing through the KEY value of the data; S32: The number of data backups is within the upper and lower limits of the set number of data backups; S33: If the number of data backups does not reach the set lower limit of the number of data backups, a data synchronization request is initiated to a neighboring node that does not store the data and has fewer stored data. After the neighboring node verifies the data, it stores the received data locally. S34: The neighboring node that stores the data repeats the above process until the data is transmitted to the entire network. The theoretical value of the number of backups Nstorage stored in the network routing is expressed as: ; Where: Rstorage is the percentage of the node storing all data; Npeer is the number of nodes in the network routing. The upper and lower limits of the number of backups of data stored in the network routing, Nupper and Nlower, are respectively: ; ; In the formula and They are the upper and lower percentage limits of the number of data storage backups respectively; S4: When users upload data, they verify and store it through the client software or by calling the data upload interface, monitor the local newly added data in real time, and send data synchronization requests to its neighboring nodes.
2. According to the blockchain-based industrial Internet of Things data encryption storage method according to claim 1, it is characterized by: In step S1, in order to ensure the security of data storage, the data shard information is encrypted, digitized, and converted into decimal form to obtain information Hn. The number of data shards is obtained according to the nodes of the blockchain. The following conditions are met when constructing the polynomial: ; ; ; ; in, P k A large prime number representing message fragmentation, represents the maximum number of polynomial fragments, Indicates the number of transaction shard information, Indicates i The value of the group polynomial, Indicates the number of blockchain nodes; obtains multiple sets of data sharding information (xp, yp), which are combined into multiple parameters. Within these parameters, P k As the input value of the public parameter, the input value of the public parameter is expressed as: ; Represents the input value of the public parameter, p r and q r is a large prime number that satisfies the public parameter; Indicates the order of the multiplication cycle. Under the collision of shard messages and random numbers, As a traceability certificate for sorting, all encrypted data passes through the master node and is recorded on the blockchain. The electronic encrypted information obtained through random transactions uses the blockchain as a judgment function for the traceability certificate; Represents the determination function of the blockchain traceability certificate; ; when When it is greater than or equal to 0, it is determined that the traceability on the blockchain is successful; L Indicates re-encrypted ciphertext; f(d i ) Indicates the traceability result under the i-th cycle; d k express k Group fragment information; d i and d j Respectively represent the first group of fragmentation information and the last group of fragmentation information.
3. According to the blockchain-based industrial Internet of Things data encryption storage method according to claim 2, it is characterized by: In step S2, dynamically establishing network routing includes: Nodes are added to the network routing through the KAD algorithm. Nodes are peers to each other. Applications using the BitTorrent protocol run in the nodes. The DHT protocol is part of the BitTorrent protocol. The nodes in the network routing use the DHT protocol to communicate. The dynamically formed network routing is composed of multiple nodes and the address information of neighboring nodes saved by the nodes. A single node has a single global unique identifier and saves a list of neighboring nodes. Through the neighboring nodes in the list, the node communicates with other nodes in the network to obtain more node information; The data management model of a single node is divided into three layers: storage layer, service layer, and application layer; The storage layer uses a local database to store structured data, and the neighbor node list data resides in memory to achieve communication with neighbor nodes; The service layer includes neighbor node management service, storage management service, data upload service and data query service; the neighbor node management service uses the DHT protocol to realize communication with nodes in the network and manage the dynamic list of neighbor nodes; the storage management service provides insertion and query operations of the local database and synchronizes the changes of data in the network regularly; the data upload service realizes the upload and storage of business data. After the node verifies the data, it is stored locally, and the storage management service synchronizes the uploaded data to the neighbor nodes in the network regularly; the data query service performs query operations according to any attribute of the business data and returns the data query results from the neighbor nodes in the network routing; The application layer includes application software, which includes executable files, dynamic link library files, local databases and interfaces.
4. According to the blockchain-based industrial Internet of Things data encryption storage method of claim 3, it is characterized by: In step S4, a partition table is further established according to the second bit of the KEY field, and when a node has a query return, the data query result is returned; When users upload data, they first verify the data through the client software or call the data upload interface. After verification, the data is stored in the local database. The data synchronization service monitors the newly added local data in real time and sends data synchronization requests to its neighboring nodes. After the neighboring nodes receive the data, they first verify the data. After verification, the data is stored in the local database of the neighboring nodes, and the data is synchronized with its neighboring nodes at the same time. Until the data spreads to the entire network. The detailed algorithm steps of data query are as follows: S51: input data query conditions and initiate data query; S52: perform precise query based on primary key information, first perform local query, and directly return query result if data is found; if data is not found locally, initiate data query to neighboring nodes, and return data query result when one node returns query; S53: When a fuzzy query is performed according to the input query condition, a data query is initiated to the local node and each neighboring node, and the data query results returned by each node are merged as the return result of the user query data.
