Industrial data acquisition method and system based on block chain technology

By introducing blockchain technology into the industrial data acquisition system, synchronizing storage device information and combining local databases for information verification, the security and availability of the industrial data acquisition system are solved, and efficient and secure data acquisition and storage are achieved.

CN119938775AActive Publication Date: 2025-05-06ZHEJIANG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311453293.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2025-05-06
Estimated Expiration
2043-11-02

AI Technical Summary

Technical Problem

The security of industrial data collection in the prior art is not guaranteed, it is susceptible to illegal intrusion, and the data storage is highly centralized, and it is susceptible to server interruption.

Method used

The industrial data collection method based on blockchain technology is adopted, and the device information of the subordinate computer is synchronized by storing the device information in the blockchain network and the local database, and the event function of the smart contract is used to capture the device information update, and the device information verification is carried out through the local database and the blockchain network, improving the efficiency and security of data query.

Benefits of technology

It improves the security and availability of the data acquisition system, reduces attack costs, enhances the decentralized characteristics of data storage, and improves the efficiency and security of data queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938775A_ABST
    Figure CN119938775A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial data acquisition method and system based on a block chain technology. The method comprises the following steps: setting a data query processing mode of a block chain network in the industrial data acquisition system to synchronously store equipment information of a lower computer in the block chain network and a local database; setting an event function of the smart contract in the block chain network as a device information updating trigger event; the local database is combined with the block chain network to perform information verification on equipment online of the lower computer, so that the efficiency and the security of block chain data query are improved; and collecting industrial data by using the equipment of the lower computer passing the information verification. In order to ensure the security of data acquisition, the block chain technology is introduced, the attack cost is improved, the security coefficient of the system is improved, and the availability of the data acquisition system can be ensured due to the decentration characteristic of the block chain technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data collection technology, and in particular to an industrial data collection method and system based on blockchain technology. Background Art

[0002] With the deep integration of informatization and industrialization, information technology has penetrated into every link of the industrial chain of industrial enterprises. Industrial data collection can realize the real-time collection and collation of various industrial data on the production site, provide a large amount of industrial data for the enterprise's MES, ERP and other information systems, and realize production process optimization and intelligent decision-making through in-depth mining of the accumulated industrial big data. For traditional data acquisition systems, when communicating with IoT devices, general industrial communication protocols such as Modbus protocol are used. This method has the characteristics of fast transmission, high efficiency and easy implementation, but it also lacks security protection mechanisms such as authentication and encryption. Some external illegal devices send abnormal operations and illegal data through message analysis and detection, making the system unable to operate normally and affecting enterprise production. In terms of data storage, general industrial data acquisition systems will adopt a centralized storage solution, designate a server as a data server, and add a redundant backup server for safety reasons. This solution can ensure fast access and efficient operation of data, but when the server fails or the network is interrupted, the availability of the entire system will be affected.

[0003] Therefore, the security of industrial data collection in the prior art cannot be guaranteed and is easily affected by illegal intrusions, and the data storage is highly centralized and easily affected by server interruptions. Summary of the invention

[0004] The purpose of the present invention is to provide an industrial data collection method based on blockchain technology to solve the technical problems in the prior art that the security of industrial data collection is not guaranteed and is easily affected by illegal intrusion, and that data storage is highly centralized and easily affected by server interruptions.

[0005] In order to solve the above technical problems, the present invention specifically provides the following technical solutions:

[0006] An industrial data collection method based on blockchain technology includes the following steps:

[0007] In the industrial data acquisition system, the data query processing mode of the blockchain network is set to synchronously store the device information of the lower computer in the blockchain network and the local database, and the industrial data acquisition system includes: a lower computer, a network communication device, a host computer, a blockchain network and a local database, wherein the blockchain network is located at the host computer;

[0008] The event function of the smart contract in the blockchain network is set as a device information update trigger event, and the device information update trigger event is used to capture the updated device information in the blockchain network and store it in the local database;

[0009] Use the local database combined with the blockchain network to verify the information of the lower-level equipment online, and improve the efficiency and security of blockchain data query;

[0010] Industrial data is collected using lower-level computer equipment that has passed information verification.

[0011] As a preferred solution of the present invention, the device information in the local database is consistent with the device information in the blockchain network.

[0012] As a preferred solution of the present invention, the construction of the device information update triggering event includes:

[0013] Setting the addition of a new device to a lower computer in the industrial data acquisition system or the status update of an existing device in a lower computer in the industrial data acquisition system as an information update trigger condition;

[0014] When the information update triggering condition is met, the device information of the new device of the lower computer in the blockchain network and the device information of the existing device of the lower computer with updated status are added to the local database;

[0015] When the information update trigger condition is not met, the device information in the current local database remains unchanged.

[0016] As a preferred solution of the present invention, the existing device status of the lower computer in the industrial data acquisition system is updated, including:

[0017] Establish a state update recognition model;

[0018] Input the real-time working condition data corresponding to the real-time status of the existing equipment of the lower computer in the industrial data acquisition system into the state update recognition model, wherein if the output value of the state update recognition model is infinite, the existing equipment of the lower computer in the industrial data acquisition system is marked as a non-updated state;

[0019] If the output value of the state update identification model is not infinite, the existing equipment of the lower computer in the industrial data acquisition system is marked as state update, and the state update identification model output value plus the real-time sequence of the existing equipment of the lower computer in the industrial data acquisition system is added to obtain the state update time point of the existing equipment of the lower computer;

[0020] Wherein, the establishment of the state update recognition model includes:

[0021] Obtain the historical status of the existing equipment of the lower computer in the industrial data acquisition system on a set of historical time series, and manually mark the historical status on each historical time series with an update label, wherein if the historical status is different from the setting status of the existing equipment of the lower computer in the industrial data acquisition system, the historical status is marked as updated; if the historical status is different from the setting status of the existing equipment of the lower computer in the industrial data acquisition system, the historical status is marked as not updated;

[0022] Select existing devices of the lower computer in the industrial data acquisition system that have both unupdated historical states and updated historical states as positive sample devices, obtain historical working condition data of the positive sample devices in a set of historical time series, and select existing devices of the lower computer in the industrial data acquisition system that only have unupdated historical states as negative sample devices;

[0023] The historical working condition data of the positive sample equipment corresponding to the unupdated historical state in a set of historical working condition data of historical time series and the historical working condition data of the negative sample equipment corresponding to the unupdated historical state in a set of historical working condition data of historical time series are used as input items of the neural network, the minimum time difference between the historical working condition data of the positive sample equipment corresponding to the updated historical state in a set of historical working condition data of historical time series and the historical working condition data of the positive sample equipment corresponding to the unupdated historical state in a set of historical working condition data of historical time series is used as the state update time difference of the positive sample equipment, and the state update time difference of the negative sample equipment is set to infinity;

[0024] The state update time difference of the positive sample device and the state update time difference of the negative sample device are used as the output item of the neural network;

[0025] The neural network is used to learn and train the input items and output items of the neural network to obtain the state update recognition network. The model expression of the state update recognition network is:

[0026] T = BP (data_old);

[0027] Where T is the most recent time difference between the unupdated historical state and the updated historical state, data_old is the historical operating data of the unupdated historical state, and BP is the neural network.

[0028] As a preferred solution of the present invention, when the status of the existing equipment of the lower computer in the industrial data acquisition system is updated in the information update trigger condition, the device information of the existing equipment of the lower computer with updated status is added to the local database at the status update time point of the existing equipment of the lower computer.

[0029] As a preferred solution of the present invention, the method of using a local database in combination with a blockchain network to verify the online information of the device of the lower computer includes:

[0030] Connect the lower computer's equipment to the industrial data acquisition system and initiate an information verification request to the local database.

[0031] If the local database is in normal state, the device information of the lower computer connected to the industrial data acquisition system is queried in the local database;

[0032] If the local database status fails, an information verification request is initiated to the blockchain network to query the device information of the lower computer connected to the industrial data acquisition system in the blockchain network.

[0033] As a preferred solution of the present invention, the method of using a local database in combination with a blockchain network to verify the online information of the device of the lower computer includes:

[0034] Connect the lower computer's equipment to the industrial data acquisition system and initiate an information verification request to the local database.

[0035] If the local database is in normal state, the device information of the lower computer connected to the industrial data acquisition system is queried in the local database;

[0036] If the local database status fails, a data rewrite request is initiated to the blockchain network to rewrite the device information stored in the blockchain network to the local database, and then the device information of the lower computer connected to the industrial data acquisition system is queried in the rewritten local database.

[0037] As a preferred solution of the present invention, the device of the lower computer that determines the information verification includes:

[0038] When the device information of the lower computer connected to the industrial data acquisition system can be queried in the local database or blockchain network, the device information of the lower computer connected to the industrial data acquisition system is marked as the device of the lower computer that has passed the information verification;

[0039] When the device information of the lower computer connected to the industrial data acquisition system cannot be queried in the local database and the blockchain network, the device information of the lower computer connected to the industrial data acquisition system will be marked as the device of the lower computer that has not passed the information verification.

[0040] As a preferred solution of the present invention, the present invention provides an industrial data acquisition system using an industrial data acquisition method based on blockchain technology, including: a lower computer, a network communication device, a host computer, a blockchain network, and a local database, wherein:

[0041] The lower computer includes at least one of a remote terminal unit, a programmable logic control unit, and an intelligent instrument, and is used for the collection of industrial data and the control function of the collection process, as well as the collection of the equipment status of the lower computer and the collection of the working condition data of the lower computer, and converts the industrial data from the status signal to a digital signal;

[0042] The host computer includes at least one of a human-machine interface, a computer, configuration software, application software, and a database;

[0043] The network communication device is used to communicate with the lower computer and the upper computer, so that the industrial data of the lower computer, the equipment status of the lower computer and the working condition data of the lower computer are transmitted to the upper computer;

[0044] The blockchain network is located between the upper computers and is used to store the device information of the lower computers, monitor the device information update trigger event in the industrial data acquisition system, and verify the information of the lower computer's device online in combination with the local database;

[0045] The local database is used to store the device information of the lower computer.

[0046] As a preferred solution of the present invention, the data query processing method of the blockchain network is to synchronously store the device information of the lower computer in the blockchain network and the local database;

[0047] The event function of the smart contract in the blockchain network is the device information update trigger event.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] In order to ensure the security of data collection, the present invention introduces blockchain technology into the current data collection system, so that the host computer joins the blockchain network. In this way, due to the large number of data storage nodes, the attack cost is increased, and the system safety factor is improved. In addition, the decentralized characteristics of blockchain technology can ensure the availability of the data collection system. In order to make up for the efficiency disadvantage of querying device information of blockchain technology, the local database is used for data query processing to solve the problem of low data query efficiency caused by the blockchain structure. It is also equivalent to adding a layer of redundant protection mechanism in front of the blockchain, thereby improving the security of the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0051] Figure 1 A flowchart of an industrial data collection method based on blockchain technology provided by an embodiment of the present invention;

[0052] Figure 2 An information verification flow chart of the device online of the lower computer provided by the embodiment of the present invention;

[0053] Figure 3 A structural diagram of an existing data acquisition system provided by an embodiment of the present invention;

[0054] Figure 4 This is a structural diagram of an industrial data acquisition system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] For traditional data acquisition systems, when communicating with IoT devices, a general industrial communication protocol such as Modbus protocol is used. This method has the characteristics of fast transmission, high efficiency, and easy implementation, but it also lacks security protection mechanisms such as authentication and encryption. Some external illegal devices send abnormal operations and illegal data through message analysis and detection, which makes the system unable to operate normally and affects enterprise production. In terms of data storage, general industrial data acquisition systems will adopt a centralized storage solution, specify a certain server as a data server, and add a redundant backup server for safety reasons. This solution can ensure fast access and efficient operation of data, but when the server fails or the network is interrupted, the availability of the entire system will be affected. Therefore, the present invention provides an industrial data acquisition method based on blockchain technology, introduces blockchain technology, and enables a host computer to join the blockchain network. In this way, due to the large number of data storage nodes, the attack cost is increased, the system safety factor is improved, and the decentralized characteristics of blockchain technology can ensure the availability of the data acquisition system.

[0057] like Figure 1 As shown, the present invention provides an industrial data collection method based on blockchain technology, comprising the following steps:

[0058] In the industrial data acquisition system, the data query processing mode of the blockchain network is set to synchronously store the device information of the lower computer in the blockchain network and the local database. The industrial data acquisition system includes: a lower computer, a network communication device, a host computer, a blockchain network and a local database, wherein the blockchain network is located at the host computer;

[0059] The event function of the smart contract in the blockchain network is set as a device information update trigger event. The device information update trigger event is used to capture the updated device information in the blockchain network and store it in the local database;

[0060] Use the local database combined with the blockchain network to verify the information of the lower-level equipment online, and improve the efficiency and security of blockchain data query;

[0061] Industrial data is collected using lower-level computer equipment that has passed information verification.

[0062] like Figure 3 As shown in the figure, the network structure of the existing data acquisition system consists of a host computer, network equipment, and a slave computer. The slave computer includes RTU, PLC, intelligent instruments and other equipment, focusing on the collection and control of field instrument data. The node has the function of data acquisition, equipment or process control, and converts the status signal into a digital signal, which is transmitted to the host computer system through various communication methods. The host computer includes HMI, computer, configuration software, application software, database, etc., and usually has a friendly human-computer interface. It collects data from each slave computer through the network to realize remote monitoring and control functions.

[0063] In order to ensure the security of data collection, the present invention introduces blockchain technology into the existing data collection system, so that the host computer joins the blockchain network. In this way, since the number of host computer nodes is large, if hackers want to obtain or tamper with data, they need to invest higher resources to succeed. The cost of attack is much higher than the value of the data, thus losing the meaning of the attack and improving the safety factor of the system.

[0064] At the same time, the blockchain technology is introduced. Since the blockchain adopts a chain structure storage method, this structure will not only take a long time to traverse the data in the block, but also be very inefficient. Therefore, when using the blockchain to store a large amount of device information, in order to improve the efficiency of querying device information, the present invention does not choose to directly use smart contracts to do data query processing. In order to query device information in the simplest way, the device-related information is selected to be stored in the blockchain network and the local database (Mysql) at the same time. Compared with the blockchain network, Mysql has the characteristics of faster and more flexible query. A data synchronization backup is made in the local database, so that the data in mysql is always consistent with the data on the blockchain. This can not only solve the problem of low data query efficiency caused by the blockchain structure, but also add another layer of redundant protection mechanism in front of the blockchain to improve the security of the blockchain.

[0065] Furthermore, in order to ensure that the data on the local database can be synchronized with the data on the blockchain in a timely manner, the event function of the smart contract can be used to set a trigger condition for an event. When a new device is added or the device status changes, the condition will be triggered, and the system will store the newly added blockchain data in the MySQL database. When the device is online and ready to access the system, it must first initiate a verification operation, that is, to search in MySQL. The query speed is much faster than querying on the blockchain. Even if the MySQL database fails, it can immediately rewrite the database through the device information on the blockchain to restore the data, or directly use the blockchain network to query and verify the device information, as follows:

[0066] The construction of the device information update trigger event includes:

[0067] Setting the addition of a new device to a lower computer in the industrial data acquisition system or the status update of an existing device in a lower computer in the industrial data acquisition system as an information update trigger condition;

[0068] When the information update triggering condition is met, the device information of the new device of the lower computer in the blockchain network and the device information of the existing device of the lower computer with updated status are added to the local database;

[0069] When the information update trigger condition is not met, the device information in the current local database remains unchanged.

[0070] Update the existing device status of the lower computer in the industrial data acquisition system, including:

[0071] Establish a state update recognition model;

[0072] Input the real-time working condition data corresponding to the real-time status of the existing equipment of the lower computer in the industrial data acquisition system into the state update recognition model, wherein if the output value of the state update recognition model is infinite, the existing equipment of the lower computer in the industrial data acquisition system is marked as a non-updated state;

[0073] If the output value of the state update identification model is not infinite, the existing equipment of the lower computer in the industrial data acquisition system is marked as state update, and the state update identification model output value plus the real-time sequence of the existing equipment of the lower computer in the industrial data acquisition system is added to obtain the state update time point of the existing equipment of the lower computer;

[0074] Among them, the establishment of the state update recognition model includes:

[0075] Obtain the historical status of the existing equipment of the lower computer in the industrial data acquisition system on a set of historical time series, and manually mark the historical status on each historical time series with an update label, wherein if the historical status is different from the setting status of the existing equipment of the lower computer in the industrial data acquisition system, the historical status is marked as updated; if the historical status is different from the setting status of the existing equipment of the lower computer in the industrial data acquisition system, the historical status is marked as not updated;

[0076] Select existing devices of the lower computer in the industrial data acquisition system that have both unupdated historical states and updated historical states as positive sample devices, obtain historical working condition data of the positive sample devices in a set of historical time series, and select existing devices of the lower computer in the industrial data acquisition system that only have unupdated historical states as negative sample devices;

[0077] The historical working condition data of the positive sample equipment corresponding to the unupdated historical state in a set of historical working condition data of historical time series and the historical working condition data of the negative sample equipment corresponding to the unupdated historical state in a set of historical working condition data of historical time series are used as input items of the neural network, the minimum time difference between the historical working condition data of the positive sample equipment corresponding to the updated historical state in a set of historical working condition data of historical time series and the historical working condition data of the positive sample equipment corresponding to the unupdated historical state in a set of historical working condition data of historical time series is used as the state update time difference of the positive sample equipment, and the state update time difference of the negative sample equipment is set to infinity;

[0078] The state update time difference of the positive sample device and the state update time difference of the negative sample device are used as the output item of the neural network;

[0079] The neural network is used to learn and train the input items and output items of the neural network to obtain the state update recognition network. The model expression of the state update recognition network is:

[0080] T = BP (data_old);

[0081] Where T is the most recent time difference between the unupdated historical state and the updated historical state, data_old is the historical operating data of the unupdated historical state, and BP is the neural network.

[0082] When the status of the existing device of the lower computer in the industrial data acquisition system is updated in the information update triggering condition, the device information of the existing device of the lower computer with the updated status is added to the local database at the status update time point of the existing device of the lower computer.

[0083] The present invention constructs a status update recognition model, which can realize advance knowledge of whether a status update will occur subsequently when the device status of the lower computer is not updated, and can also measure in advance the time node of the subsequent status update, so that the device information of the existing device of the lower computer with the status updated can be added to the local database at the same time as the status update, without the need to add the device information with a lag after the update status is identified. The timeliness of the device information update in the local database is stronger, thereby ensuring that the accuracy of the device information in the local database is higher, and the timeliness of the equipment of the lower computer that has passed the information verification is determined to be higher, and finally the timeliness and accuracy of data collection in the blockchain are achieved to be higher.

[0084] When the device is online and ready to access the system, it must first initiate a verification operation, that is, to search in MySQL. The query speed is much faster than the query on the blockchain. Even if the MySQL database fails, the device information on the blockchain can be immediately rewritten into the database to restore the data, or the blockchain network can be used directly to query and verify the device information. The details are as follows:

[0085] like Figure 2 As shown, the local database is combined with the blockchain network to verify the information of the lower-level device online, including:

[0086] Connect the lower computer's equipment to the industrial data acquisition system and initiate an information verification request to the local database.

[0087] If the local database is in normal state, the device information of the lower computer connected to the industrial data acquisition system is queried in the local database;

[0088] If the local database status fails, an information verification request is initiated to the blockchain network to query the device information of the lower computer connected to the industrial data acquisition system in the blockchain network.

[0089] Use the local database combined with the blockchain network to verify the information of the lower-level device online, including:

[0090] Connect the lower computer's equipment to the industrial data acquisition system and initiate an information verification request to the local database.

[0091] If the local database is in normal state, the device information of the lower computer connected to the industrial data acquisition system is queried in the local database;

[0092] If the local database status fails, a data rewrite request is initiated to the blockchain network to rewrite the device information stored in the blockchain network to the local database, and then the device information of the lower computer connected to the industrial data acquisition system is queried in the rewritten local database.

[0093] Determine the devices on the lower computer that have passed information verification, including:

[0094] When the device information of the lower computer connected to the industrial data acquisition system can be queried in the local database or blockchain network, the device information of the lower computer connected to the industrial data acquisition system is marked as the device of the lower computer that has passed the information verification;

[0095] When the device information of the lower computer connected to the industrial data acquisition system cannot be queried in the local database and the blockchain network, the device information of the lower computer connected to the industrial data acquisition system will be marked as the device of the lower computer that has not passed the information verification.

[0096] like Figure 4 As shown, based on the above-mentioned industrial data collection method based on blockchain technology, the present invention provides an industrial data collection system, including: a lower computer, a network communication device, a host computer, a blockchain network, and a local database, wherein:

[0097] The lower computer includes at least one of a remote terminal unit, a programmable logic control unit, and an intelligent instrument, and is used for the collection of industrial data and the control function of the collection process, as well as the collection of the equipment status of the lower computer and the collection of the working condition data of the lower computer, and converts the industrial data from the status signal to a digital signal;

[0098] The host computer includes at least one of a human-machine interface, a computer, configuration software, application software, and a database;

[0099] The network communication equipment is used to communicate and connect the lower computer and the upper computer, so that the industrial data, equipment status and working condition data of the lower computer are transmitted to the upper computer;

[0100] The blockchain network is located between the upper computers and is used to store the device information of the lower computers. It monitors the device information update trigger events in the industrial data acquisition system and verifies the information of the lower computer's online devices in combination with the local database.

[0101] The local database is used to store the device information of the lower computer.

[0102] The data query processing method of the blockchain network is to store the device information of the lower computer synchronously in the blockchain network and the local database;

[0103] The event function of the smart contract in the blockchain network is the device information update trigger event.

[0104] The industrial data acquisition system has a six-layer structure, as follows:

[0105] (1) Application layer: The application layer is the user's operation layer. After the user runs the program, he can perform equipment configuration, query, and management operations at this layer. He can also query historical data.

[0106] (2) Smart contract layer: This layer mainly records all the contracts designed in this article. In the application layer, it also creates contract instances related to web3.js. After the new contract is created and deployed, it will be automatically executed.

[0107] (3) Incentive layer: The incentive mechanism is a necessary part of the blockchain. The setting of the incentive mechanism can encourage users to actively keep accounts to a certain extent, which provides a certain guarantee for the normal operation of data nodes.

[0108] (4) Consensus layer: This system adopts a hybrid consensus mechanism of PoW and PoS to make up for the shortcomings of a single consensus mechanism and improve the work efficiency and security of the blockchain-based data collection system.

[0109] (5) Network layer: The network layer uses P2P network protocol to improve the security and stability of the system.

[0110] (6) Data layer: The data layer is used to store device information, operation records, historical data, etc.

[0111] A smart contract is a collection of information that needs to be stored in a contract, various functions, and various states generated when the contract is executed. The smart contract designed by the present invention consists of a structure struct for storing data, a function function, and an event trigger event. Since the smart contract is deployed in Ethereum in the form of a transaction, the smart contract cannot be modified or updated in Ethereum. The smart contract of the present invention mainly involves device management. Specifically, the various types of information stored in the device management smart contract are shown in Table 1.

[0112] Table 1 Field information of device management smart contract

[0113]

[0114] The main functions of the smart contract are designed as follows:

[0115] (1) struct DevContent(): This structure is responsible for storing device information.

[0116] (2) functionAddDevdata(): This function is used by administrators to add devices to the blockchain network.

[0117] (3) function CheckDevdata(): This function can detect whether the device is secure and whether the collected data is credible by verifying the device’s ID, password and other information.

[0118] (4) function ModifyDevStatus(): This function is used to modify the device status. By querying the device status information, it can be determined whether the device is available.

[0119] (5) function RestoreDevdataToDB(): This function is used to manually synchronize the device information set maintained on the blockchain to the database table off-chain and restore the data information in the table.

[0120] (6) event SaveDevdataToDB(): monitors the device adding function of the AddDevdata() function. After the addition is successful, the device information is sent to the background service program and added to the off-chain database.

[0121] After the smart contract is written in solidity language, it is called through the Go language backend code. When deploying the smart contract, the Ethereum Client class API provides an interface for block transaction information such as obtaining device information and uploading data, and generates a contract address. By obtaining this contract address and instantiating it, the relevant methods of the smart contract can be called. The code design is shown in Table 2.

[0122] Table 2 Smart contract call interface code

[0123]

[0124] In order to ensure the security of data collection, the present invention introduces blockchain technology into the current data collection system, so that the host computer joins the blockchain network. In this way, due to the large number of data storage nodes, the attack cost is increased, and the system safety factor is improved. In addition, the decentralized characteristics of blockchain technology can ensure the availability of the data collection system. In order to make up for the efficiency disadvantage of querying device information of blockchain technology, the local database is used for data query processing to solve the problem of low data query efficiency caused by the blockchain structure. It is also equivalent to adding a layer of redundant protection mechanism in front of the blockchain, thereby improving the security of the blockchain.

[0125] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. An industrial data collection method based on blockchain technology, characterized by: The following steps are involved: In an industrial data acquisition system, a data query processing mode of a blockchain network is set to synchronously store device information of a lower computer in the blockchain network and a local database. The industrial data acquisition system includes: a lower computer, a network communication device, a host computer, a blockchain network, and a local database, wherein the blockchain network is located at the host computer; The event function of the smart contract in the blockchain network is set as a device information update trigger event, which is used to capture the updated device information in the blockchain network and store it in the local database; Utilize the local database combined with the blockchain network to verify the information of the lower-level device online, thereby improving the efficiency and security of blockchain data query; Industrial data is collected using lower-level computer equipment that has passed information verification.

2. The industrial data collection method based on blockchain technology according to claim 1 is characterized in that: The device information in the local database is consistent with the device information in the blockchain network.

3. The industrial data collection method based on blockchain technology according to claim 1 is characterized in that: The construction of the device information update triggering event includes: Setting the addition of a new device to a lower computer in the industrial data acquisition system or the status update of an existing device in the lower computer in the industrial data acquisition system as an information update trigger condition; When the information update trigger condition is met, the device information of the new device of the lower computer in the blockchain network and the device information of the existing device of the lower computer with updated status are added to the local database; When the information update trigger condition is not met, the device information in the current local database remains unchanged.

4. The industrial data collection method based on blockchain technology according to claim 3 is characterized by: The existing device status update of the lower computer in the industrial data acquisition system includes: Establish a status update recognition model; Input the real-time working condition data corresponding to the real-time status of the existing equipment of the lower computer in the industrial data acquisition system into the state update recognition model, wherein if the output value of the state update recognition model is infinite, the existing equipment of the lower computer in the industrial data acquisition system is marked as a non-updated state; If the output value of the state update identification model is not infinite, the existing device of the lower computer in the industrial data acquisition system is marked as state updated, and the state update identification model output value is added to the real-time time sequence of the existing device of the lower computer in the industrial data acquisition system to obtain the state update time point of the existing device of the lower computer; The establishment of the state update recognition model includes: Obtaining historical states of existing devices of a lower computer in an industrial data acquisition system over a set of historical time series, and manually marking an update label for each historical state in the historical time series, wherein if the historical state is different from the set state of the existing devices of the lower computer in the industrial data acquisition system, the historical state is marked as updated; if the historical state is different from the set state of the existing devices of the lower computer in the industrial data acquisition system, the historical state is marked as not updated; Select existing devices in the lower computer of the industrial data acquisition system that have both unupdated and updated historical states as positive sample devices, obtain historical working condition data of the positive sample devices in a set of historical time series, and select existing devices in the lower computer of the industrial data acquisition system that only have unupdated historical states as negative sample devices; The historical working condition data of the positive sample device corresponding to the unupdated historical state in a set of historical working condition data of the historical time series and the historical working condition data of the negative sample device corresponding to the unupdated historical state in a set of historical working condition data of the historical time series are used as input items of the neural network. The minimum time difference between the historical working condition data of the positive sample device corresponding to the updated historical state in a set of historical working condition data of the historical time series and the historical working condition data of the positive sample device corresponding to the unupdated historical state in a set of historical working condition data of the historical time series is used as the state update time difference of the positive sample device, and the state update time difference of the negative sample device is set to infinity. The state update time difference of the positive sample device and the state update time difference of the negative sample device are used as the output of the neural network; The neural network is used to train the input items and output items of the neural network to obtain the state update recognition network. The model expression of the state update recognition network is: T = BP (data_old); Where T is the most recent time difference between the unupdated historical state and the updated historical state, data_old is the historical operating data of the unupdated historical state, and BP is the neural network.

5. The industrial data collection method based on blockchain technology according to claim 4 is characterized in that: When the status of the existing device of the lower computer in the industrial data acquisition system is updated in the information update trigger condition, the device information of the existing device of the lower computer with the updated status is added to the local database at the status update time point of the existing device of the lower computer.

6. The industrial data collection method based on blockchain technology according to claim 1 is characterized in that: The use of the local database combined with the blockchain network to verify the information of the device online on the lower computer includes: Connect the lower computer's equipment to the industrial data acquisition system and initiate an information verification request to the local database, where: If the local database is in normal state, the device information of the lower computer connected to the industrial data acquisition system is queried in the local database; If the local database status fails, an information verification request is initiated to the blockchain network to query the device information of the lower computer connected to the industrial data acquisition system in the blockchain network.

7. The industrial data collection method based on blockchain technology according to claim 1 is characterized in that: The use of the local database combined with the blockchain network to verify the information of the device online on the lower computer includes: Connect the lower computer's equipment to the industrial data acquisition system and initiate an information verification request to the local database, where: If the local database is in normal state, the device information of the lower computer connected to the industrial data acquisition system is queried in the local database; If the local database status fails, a data rewrite request is initiated to the blockchain network to rewrite the device information stored in the blockchain network to the local database, and then the device information of the lower computer connected to the industrial data acquisition system is queried in the rewritten local database.

8. The industrial data collection method based on blockchain technology according to claim 1, characterized in that: Determine the devices on the lower computer that have passed information verification, including: When the device information of the lower computer connected to the industrial data acquisition system can be queried in the local database or blockchain network, the device information of the lower computer connected to the industrial data acquisition system is marked as the device of the lower computer that has passed the information verification; When the device information of the lower computer connected to the industrial data acquisition system cannot be queried in the local database and the blockchain network, the device information of the lower computer connected to the industrial data acquisition system will be marked as a device of the lower computer that has not passed the information verification.

9. An industrial data collection system using the industrial data collection method based on blockchain technology according to any one of claims 1 to 8, characterized in that: include: Lower computer, network communication equipment, upper computer, blockchain network, local database, among which, The lower computer includes at least one of a remote terminal unit, a programmable logic control unit, and an intelligent instrument, and is used for collecting industrial data and controlling the collection process, as well as collecting the equipment status of the lower computer and the working condition data of the lower computer, and converting the industrial data from the status signal to a digital signal; The host computer includes at least one of a human-machine interface, a computer, configuration software, application software, and a database; The network communication device is used to communicate with the lower computer and the upper computer, so that the industrial data, device status and working condition data of the lower computer are transmitted to the upper computer; The blockchain network is located between the upper computers and is used to store the device information of the lower computers. It monitors the device information update trigger event in the industrial data acquisition system and verifies the device information of the lower computers in combination with the local database. The local database is used to store the device information of the lower computer.

10. The industrial data acquisition system according to claim 9, characterized in that: The data query processing method of the blockchain network is to synchronously store the device information of the lower computer in the blockchain network and the local database; The event function of the smart contract in the blockchain network is to trigger events when device information is updated.

Citation Information

Patent Citations

  • Two-stage consensus block chain system with state buffer capability and deployment method

    CN111125131A

  • Internet of Things data storage method based on block chain and NB-IoT chip

    CN114499876A

  • Blockchain-based auditing, instantiation and maintenance of 5g network slices

    US20200057860A1

  • Blockchain node management method and apparatus, computer device, and storage medium

    WO2022134471A1