An industrial control system
By building a private blockchain network for controllers and smart gateways in industrial control systems, the security and efficient utilization of resources of edge devices are achieved, solving the information security and communication overhead problems of traditional systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 广东省工业边缘智能创新中心有限公司
- Filing Date
- 2023-07-28
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional industrial control systems lack security measures against replay attacks and denial-of-service attacks, resulting in prominent information security issues. When blockchain is applied to industrial control systems, edge devices cannot withstand the communication overhead of complex calculations and frequent communication due to limited resources.
A private blockchain network with multiple controllers and smart gateways is constructed. Controllers generate new blocks and broadcast them, while smart gateways and some controllers verify them. Verification and consensus are achieved by randomly selecting controllers, thereby reducing communication and computational overhead.
It effectively reduces the communication and computing overhead of edge industrial control systems, solves the problems of resource occupation and communication burden at the edge, and improves information security.
Smart Images

Figure CN117111505B_ABST
Abstract
Description
An industrial control system Technical Field
[0001] This application relates to the field of industrial Internet of Things (IoT) technology, specifically to an industrial control system. Background Technology
[0002] With the wave of networking and intelligence in industrial control systems, the information security problem of industrial control systems is becoming increasingly prominent because traditional industrial control systems lack security measures to deal with malicious attacks such as replay attacks and denial-of-service attacks.
[0003] Currently, applying blockchain to industrial control systems can effectively ensure the information security of industrial control systems. However, in the block consensus process of existing blockchain solutions, blocks need to be broadcast between each blockchain node. Each blockchain node performs a verification process on the block and broadcasts the verification results to each other. Finally, a consensus is reached based on the verification results. This brings a lot of communication overhead. However, the industrial nodes of edge industrial control systems can generally only store simple control instructions and industrial data, and do not have too many additional resources to bear the communication overhead caused by complex calculations and frequent communication. Summary of the Invention
[0004] In view of the above problems, this application provides an industrial control system that reduces the communication and computing overhead of the edge industrial control system.
[0005] According to one aspect of the embodiments of this application, an industrial control system is provided, comprising: a smart gateway and multiple controllers; the multiple controllers are interconnected, each controller is configured to generate a new block based on industrial data uploaded by industrial equipment and broadcast the new block; the new block includes a list of unique identifiers, the identifier list including the unique identifiers of N controllers other than the controller that generated the new block, where N is a positive odd number; each controller is further configured to receive the new block broadcast by the other controllers, and verify the new block after finding its unique identifier in the list of unique identifiers, to obtain a first verification result; the smart gateway is connected to each controller respectively, and is configured to receive the new block broadcast by each controller, and verify the new block to obtain a second verification result; the smart gateway is further configured to upload the new block to a blockchain after determining that the new block is legitimate based on the first verification result and the second verification result.
[0006] In one alternative approach, each controller is further configured to send a first verification result to a smart gateway; the smart gateway is further configured to upload a new block to the blockchain after determining that the new block is legitimate based on the first verification result and the second verification result, including: the smart gateway is further configured to accumulate the number of first verification results that are verified successfully, and upload a new block to the blockchain when the number is greater than N / 2 and the second verification result is verified successfully.
[0007] In one alternative approach, the smart gateway is also used to send a block forwarding request to the controller whose first verification result is successful when the number is greater than N / 2 and the second verification result is a verification failure, so that the controller sends a new block to the smart gateway; the smart gateway is also used to verify the new block after receiving it from the controller, and upload the new block to the blockchain after successful verification.
[0008] In one alternative approach, the controller is further configured to not send the first verification result of the new block to the smart gateway when the first verification result is successful, and to send the first verification result of the new block to the smart gateway when the first verification result is unsuccessful; the smart gateway is further configured to upload the new block to the blockchain after determining that the new block is legitimate based on the first verification result and the second verification result, including: the smart gateway is further configured to upload the new block to the blockchain when it does not receive the first verification result within a preset time and the second verification result is successful.
[0009] In one alternative approach, the smart gateway is further configured to: broadcast a block forwarding request when no first verification result is received within a preset time and the second verification result is a verification failure, so that a controller with a successful first verification result sends a new block to the smart gateway, and verifies the new block upon receiving it, so that the new block is uploaded to the blockchain upon successful verification; and broadcast a verification result forwarding request when no first verification result is received within a preset time and the second verification result is a verification success, so that a controller with a successful first verification result sends the first verification result to the smart gateway, and verifies the new block upon receiving it, so that the new block is uploaded to the blockchain upon successful verification; and broadcast a verification result forwarding request when no first verification result is received within a preset time and the second verification result is a verification success, so that a controller with a successful first verification result sends the first verification result to the smart gateway, and verifies the new block upon receiving it, so that the new block is uploaded to the blockchain upon successful verification. Upon receiving the first verification result, the number of successful first verification results is accumulated. When the number is greater than N / 2, a new block is uploaded to the blockchain. If the first verification result is received within a preset time and the second verification result is a verification failure, the block forwarding request and the verification result forwarding request are broadcast. This allows the controller with a successful first verification result to send the new block and the first verification result to the smart gateway. After receiving the new block and the first verification result, the number of successful first verification results is accumulated, and the new block is verified. When the number is greater than N / 2 and the verification is successful, the new block is uploaded to the blockchain.
[0010] In one alternative approach, each controller is also configured to send a registration request to the smart gateway, the registration request including the controller's unique identifier; the smart gateway is also configured to receive the registration request sent by each controller and generate a digital certificate for the controller based on the controller's unique identifier; the smart gateway is also configured to generate a whitelist based on each controller's unique identifier and digital certificate, the latest block timestamp of the blockchain, and the latest block hash value, and broadcast the whitelist.
[0011] In one alternative approach, the controller is also configured to generate a preparatory block based on the controller's unique identifier, the hash value of the previous block, and the timestamp of the new block, and to generate the hash value of the new block based on the preparatory block and the controller's digital certificate; the controller is also configured to generate a new block based on the hash values of the preparatory block and the new block.
[0012] In one alternative approach, the controller and smart gateway are further configured to verify the new block through the following steps: retrieving the latest block timestamp of the blockchain in the whitelist, and determining whether the difference between the latest block timestamp and the new block timestamp is greater than or equal to a first preset threshold; if the difference between the latest block timestamp and the new block timestamp is greater than or equal to the first preset threshold, then determining whether the difference between the current timestamp and the new block timestamp is less than a second preset threshold; if the difference between the current timestamp and the new block timestamp is less than the second preset threshold, then retrieving the latest block hash value of the blockchain in the whitelist, and determining whether the latest block hash value is consistent with the previous block hash value; if the latest block hash value is consistent with the previous block hash value, then retrieving the controller's digital certificate in the whitelist, and determining whether the hash value between the new block's preparatory block and the controller's digital certificate is consistent with the new block's hash value; if the hash value between the new block's preparatory block and the controller's digital certificate is consistent with the new block's hash value, then determining that the verification result of the new block is successful.
[0013] In an alternative approach, the controller is also used to generate a unique identifier for the controller based on the hash value of its stored control address and the current timestamp.
[0014] In an alternative approach, the controller is also used to generate a unique identifier for the controller based on a hash value between its stored control address and a random number.
[0015] In the industrial control system provided in this application embodiment, each controller generates a new block from the industrial data uploaded by the industrial equipment and broadcasts it. This allows N controllers whose unique identifiers are found in the unique identifier list of the new block to verify the new block, obtaining a first verification result. A smart gateway then verifies the new block to obtain a second verification result. Finally, the smart gateway determines whether to upload the new block to the blockchain based on the first and second verification results. By randomly selecting some controllers from the blockchain network to participate in the verification and consensus process of the new block, it eliminates the need for each controller to perform the verification process for the new block and broadcast the verification results to each other. This reduces the communication and computing overhead of the edge industrial control system and solves the problem of increased resource consumption and communication overhead burden on edge devices after introducing blockchain.
[0016] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0018] Figure 1 is a schematic diagram of the structure of the industrial control system provided in an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of the verification steps for a new block provided in an embodiment of the present invention.
[0020] The reference numerals in the detailed embodiments are as follows:
[0021] 100. Industrial control systems;
[0022] 110. Smart gateway; 120. Controller. Detailed Implementation
[0023] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0024] 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 application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0025] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0026] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0027] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A exists, A and B exist simultaneously, and B exists. In addition, the character " / " in this document generally indicates that the related objects before and after it have an "or" relationship.
[0028] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0029] In the description of the embodiments of this application, the technical terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of this application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0030] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0031] Industrial Control Systems (ICS) are complex industrial systems composed of sensors, intelligent instruments, and process control equipment. They include Supervisory Control and Data Acquisition (SCADA), Distributed Control Systems (DCS), Process Control Systems (PCS), Programmable Logic Controllers (PLC), and Remote Terminal Units (RTU), and are widely used in transportation, energy, and industrial control fields.
[0032] The architecture of industrial control systems is mainly divided into two levels: Network-level Industrial Control Systems (NL-ICS) for network applications and Fieldbus-level Industrial Control Systems (FL-ICS) for field device control. FL-ICS primarily includes a control console, local server, controller, fieldbus, smart instruments, and sensors. Its main functions are to collect industrial data generated by smart instruments and sensors, calculate and issue relevant control commands. Digital communication between the control console and controller is typically achieved through a fieldbus network, while the controller and its corresponding smart instruments and sensors are generally connected via physical links.
[0033] With the increasing networking and intelligence of industrial control systems, information security issues are becoming increasingly prominent due to the lack of security measures in traditional industrial control systems to counter malicious attacks such as replay attacks and denial-of-service attacks. Since industrial control systems are primarily used to control the operation of production equipment, the tampering or theft of control data can affect the control of a particular piece of equipment, or even cause the entire industrial control system to lose control, resulting in significant losses.
[0034] Blockchain technology, characterized by its unforgeability, complete traceability, transparency, and collective maintenance, is currently widely used in fields such as the Internet of Things (IoT), Industrial IoT, and supply chains. In blockchain, ledgers are linked by hash values; any minor alteration will change the hash value, leading to a break in the blockchain. This immutability gives blockchain ledgers the advantage of continuous data protection. Therefore, applying blockchain to industrial control systems can effectively reduce the risk of data tampering and theft, ensuring the information security of industrial control systems.
[0035] In existing blockchain solutions, all blockchain nodes need to participate in the block verification and consensus process. During the consensus process, the block needs to be broadcast between every blockchain node. Each blockchain node performs the verification process for the block and broadcasts the verification results to each other. Finally, a consensus is reached based on the verification results, which brings a lot of communication overhead. However, in edge industrial control systems where various industrial nodes are interconnected via fieldbuses to achieve data communication, edge devices have limited storage resources and cannot perform complex calculations. They can generally only store simple control commands and industrial data, and do not have enough additional resources to withstand the communication overhead caused by complex calculations and frequent communication.
[0036] Based on this, this application provides an industrial control system that constructs a private blockchain network of multiple controllers and connected smart gateways. The controllers generate blocks from data produced by industrial equipment and broadcast them within the blockchain network. The smart gateway then verifies these blocks with controllers randomly selected from the multiple controllers. Finally, the smart gateway updates the blockchain based on the verification results. By randomly selecting some controllers from the blockchain network to participate in the block verification and consensus process, it eliminates the need for each controller to perform the verification process and broadcast the verification results to each other. This reduces the communication and computational overhead of the edge industrial control system and solves the problem of increased resource consumption and communication overhead at the edge after introducing blockchain technology.
[0037] Please refer to Figure 1, which shows a schematic diagram of the structure of an industrial control system provided in an embodiment of the present invention. As shown in the figure, the industrial control system 100 includes: a smart gateway 110 and multiple controllers 120. The multiple controllers 120 are interconnected. Each controller 120 is used to generate a new block based on industrial data uploaded by industrial equipment 130 and broadcast the new block. The new block includes a list of unique identifiers, which includes the unique identifiers of N controllers 120 other than the controller 120 that generated the new block, where N is a positive odd number. Each controller 120 is also used to receive the new blocks broadcast by the other controllers 120, and after finding the unique identifier of its own controller 120 in the list of unique identifiers, verify the new block to obtain a first verification result. The smart gateway 110 is connected to each controller 120 and is used to receive the new blocks broadcast by each controller 120 and verify the new blocks to obtain a second verification result. The smart gateway 110 is also used to upload the new block to the blockchain after determining that the new block is legitimate based on the first verification result and the second verification result.
[0038] Specifically, the intelligent gateway 110 is interconnected with multiple controllers 120 via fieldbus, and the multiple controllers 120 are interconnected with each other via fieldbus. For example, when the industrial control system 100 has P nodes, the industrial control system 100 includes one intelligent gateway 110 and P-1 controllers 120. The multiple controllers 120 are connected to multiple industrial devices 130 via physical links. One controller 120 can be connected to one industrial device 130 or multiple industrial devices 130. The industrial devices 130 can be sensors, smart meters, etc.
[0039] Before joining the industrial control system, each controller 120 needs to register with the smart gateway 110 to obtain a digital certificate. First, the controller 120 needs to generate a unique identifier. Specifically, the controller 120 can calculate the hash value of the current timestamp and its Media Access Control Address (MAC), and use the last 10 digits of this hash value as its unique identifier. Alternatively, the controller 120 can generate a unique identifier by calculating the hash value of the MAC address and a set of random numbers. Then, the controller 120 sends a registration request to the smart gateway 110 to register. The registration request is as follows:
[0040] M i=E{signsk(OID i, T, nonce)};
[0041] Where Mi represents the registration request of the i-th controller 120, OID i represents the unique identifier of the i-th controller 120, E represents that Mi is encrypted using the public key INGpK of the smart gateway 110, signsk represents the private key signature of the i-th controller 120, T represents the current timestamp, and nonce represents a random value used to initiate a response challenge; when the smart gateway 110 responds with the correct random value, the smart gateway 110 can successfully decrypt Mi and obtain the unique identifier in the registration request.
[0042] Next, the smart gateway 110 checks whether the controller 120 has been previously registered using its unique identifier. If it has been registered, the registration request for that controller 120 is ignored; otherwise, a digital certificate for that controller 120 is generated based on its unique identifier. Further, after all controllers 120 have successfully registered, the smart gateway 110 generates its own unique identifier based on its own media access control address and current timestamp (or random number), and generates its own digital certificate based on this unique identifier. Finally, the smart gateway 110 generates a whitelist using its own unique identifier and digital certificate, the unique identifier and digital certificate of each controller 120, and the latest block timestamp and latest block hash value of the blockchain generated by each controller 120. This whitelist is then broadcast throughout the blockchain network, and all controllers 120 receive and store the whitelist locally.
[0043] In this embodiment, after the industrial equipment 130 uploads collected industrial data such as equipment operating status data and equipment configuration information to the controller 120 connected to it, the controller 120 generates a new block from the industrial data received in one sampling period. During the generation of the new block, the controller 120 also selects N controllers 120 from the remaining controllers 120 that generated the new block, and generates an identifier list from the unique identifiers of the selected N controllers 120, where N = 1, 3, 5, ..., and N < P-1. Further, the controller 120 broadcasts the new block including the identifier list so that the smart gateway 110 and the selected N controllers 120 can verify the new block.
[0044] For example, the preparatory block TB for the new block generated by the i-th controller 120 is:
[0045] TB={OID i, index, TS, data, N, L, hash1};
[0046] Where OID i represents the unique identifier of the i-th controller 120, index is the index of the new block, TS is the timestamp of the new block, data is the industrial data, N is the number of controllers 120 that verify the new block, L is the list of identifiers, and hash1 is the hash value of the previous block.
[0047] The hash value (HASH) of the new block generated by the i-th controller 120 is:
[0048] HASH = H(TB, Cert i);
[0049] Where Cert i is the digital certificate of the i-th controller 120;
[0050] Therefore, the structure of the new block TX i generated by the i-th controller 120 can be obtained as follows:
[0051] TXi={OID i, index, TS, data, N, L, hash1, HASH}.
[0052] After controller 120 broadcasts the new block, smart gateway 110 and each of the other controllers 120 (excluding the one that generated the new block) can receive it. Upon receiving the new block broadcast by the other controllers 120, each controller 120 searches the identifier list within the new block. If the identifier list includes its own unique identifier, the controller 120 verifies the new block and obtains a first verification result. If the identifier list does not contain the controller 120's own unique identifier, the controller 120 discards the new block. Simultaneously, smart gateway 110, upon receiving the new block broadcast by controller 120, can verify it and obtain a second verification result. Both the first and second verification results include two possible outcomes: verification success and verification failure.
[0053] After controller 120 verifies the new block and obtains the first verification result, it can send the first verification result to smart gateway 110 regardless of whether the verification is successful or not. Alternatively, it can choose not to send the first verification result to smart gateway 110 if the verification is successful, but send it to smart gateway 110 if the verification fails. After receiving the first verification results from all controllers 120 that have verified the new block, smart gateway 110 can determine whether the new block is valid based on the number of successful first verification results and the second verification result, or it can determine whether the new block is valid based on whether it has received the first verification result and the second verification result. When smart gateway 110 determines the new block is valid, it uploads the new block to the blockchain. When smart gateway 110 determines the new block is invalid, it broadcasts the unique identifier in the new block so that all controllers 120 that verified the new block discard it.
[0054] After that, the smart gateway 110 can also update the stored whitelist based on the hash and timestamp of the new block uploaded to the blockchain, and broadcast the hash and timestamp of the new block (i.e., the latest block timestamp and the latest block hash) so that all controllers 120 can update their stored whitelists.
[0055] In the industrial control system 100 provided in this application embodiment, each controller 120 generates a new block from the industrial data uploaded by the industrial equipment and broadcasts it. This allows N controllers 120 whose unique identifiers are found in the unique identifier list of the new block to verify the new block and obtain a first verification result. The smart gateway 110 then verifies the new block to obtain a second verification result. Finally, the smart gateway 110 determines whether to upload the new block to the blockchain based on the first and second verification results. By randomly selecting some controllers 120 from the blockchain network to participate in the verification and consensus process of the new block, it is not necessary for each controller 120 to perform the verification process for the new block and broadcast the verification results to each other. This reduces the communication and computing overhead of the edge industrial control system and solves the problem of increased resource consumption and communication overhead burden on edge devices after introducing blockchain.
[0056] To achieve consensus on the new block, according to some embodiments of this application, optionally, each controller 120 is further configured to send a first verification result to the smart gateway 110. The smart gateway 110 is further configured to accumulate the number of times the first verification result is successful, and upload the new block to the blockchain when the number is greater than N / 2 and the second verification result is successful.
[0057] In this embodiment, regardless of whether the first verification result is successful or unsuccessful, the controller 120 sends the first verification result to the smart gateway 110. After receiving the first verification results sent by N controllers 120, the smart gateway 110 counts the number M of successful verification results among all the first verification results, and then determines whether the new block is legal based on the number M and the second verification result.
[0058] Specifically, when the number M > N / 2 and the second verification result is successful, the smart gateway 110 determines that the new block is a valid block and uploads the new block to the blockchain.
[0059] When the number of controllers M > N / 2 and the second verification result is a verification failure, the smart gateway 110 randomly selects one controller 120 from the M controllers 120 whose first verification result is a successful verification, and sends a block forwarding request to that controller 120 so that the controller 120 sends a new block to the smart gateway 110. After receiving the new block sent by the controller 120, the smart gateway 110 re-verifies the new block. If the verification is successful, the new block is uploaded to the blockchain. If the verification fails, another controller 120 is selected from the M controllers 120 to send a block forwarding request. When the smart gateway 110 has verified all the new blocks sent by the M controllers 120 and the verification result is a verification failure, the new block is determined to be an illegal block. Then, the smart gateway 110 broadcasts the unique identifier of the new block so that all controllers 120 that verified the new block discard it.
[0060] When the number of blocks is less than or equal to N / 2 and the second verification result is successful, or when the number of blocks is less than or equal to N / 2 and the second verification result is also unsuccessful, the smart gateway 110 determines the new block as an illegal block and broadcasts the unique identifier of the new block so that all controllers 120 that verify the new block discard the new block.
[0061] In the above manner, the smart gateway 110 can execute different consensus strategies on the blockchain based on the first verification result and the second verification result, so as to realize the blockchain update and maintenance of the industrial control system 100.
[0062] Optionally, according to some embodiments of this application, the smart gateway 110 is further configured to send a block forwarding request to the controller 120, whose first verification result is successful, when the number of blocks is greater than N / 2 and the second verification result is a verification failure, so that the controller 120 sends a new block to the smart gateway 110. The smart gateway 110 is also configured to verify the new block after receiving it from the controller 120, and upload the new block to the blockchain after successful verification.
[0063] The specific implementation process and beneficial effects of the embodiments in this application can be referred to the embodiments shown above, and will not be repeated here.
[0064] To reduce the time delay caused by the smart gateway 110 executing the new block consensus process, according to some embodiments of this application, optionally, the controller 120 is further configured to not send the first verification result of the new block to the smart gateway 110 when the first verification result is successful, and to send the first verification result of the new block to the smart gateway 110 when the first verification result is unsuccessful. The smart gateway 110 is further configured to upload the new block to the blockchain when it does not receive the first verification result within a preset time and the second verification result is successful.
[0065] In this embodiment, after the controller 120 verifies the new block and obtains the first verification result, the controller 120 does not report the verification result of the new block to the smart gateway 110 when the first verification result is successful, and reports the verification result of the new block to the smart gateway 110 when the first verification result is unsuccessful.
[0066] Therefore, if the smart gateway 110 does not receive the first verification result sent by the controller 120 within the preset time, and the second verification result is successful, the smart gateway 110 determines that the new block is a valid block and directly uploads the new block to the blockchain.
[0067] If the smart gateway 110 does not receive the first verification result from the controller 120 within a preset time, and the second verification result is a verification failure, it broadcasts a block forwarding request so that any one of the controllers 120 whose first verification result is a successful verification sends a new block to the smart gateway 110. Then, the smart gateway 110 re-verifies the received new block. If the verification is successful, the received new block is determined to be a valid block and uploaded to the blockchain. If the verification fails, it waits for new blocks sent by the remaining controllers 120 whose first verification result is a successful verification. When the smart gateway 110 has verified all the new blocks sent by the controllers 120 and the verification results are all failed, it determines the new block to be an invalid block and broadcasts the unique identifier of the new block so that all controllers 120 that verified the new block discard the new block.
[0068] When the smart gateway 110 receives the first verification result within a preset time and the second verification result is successful, it broadcasts a verification result forwarding request so that all controllers 120 whose first verification result is successful send the first verification result to the smart gateway 110. After that, the smart gateway 110 counts the number of first verification results that are successful. If the number is greater than N / 2, the new block is determined to be a valid block and uploaded to the blockchain. If the number is less than N / 2, the new block is determined to be an invalid block and the unique identifier of the new block is broadcast so that all controllers 120 that verify the new block discard the new block.
[0069] When smart gateway 110 receives the first verification result within a preset time and the second verification result is a verification failure, it broadcasts a verification result forwarding request and a block forwarding request. This causes all controllers 120 whose first verification result was successful to send their first verification result and a new block to smart gateway 110. Afterward, smart gateway 110 counts the number of controllers whose first verification result was successful and re-verifies the received new blocks. If the number is greater than N / 2 and the re-verification result of the new block is successful, the received new block is determined to be a valid block and uploaded to the blockchain. If the number is greater than N / 2 and the re-verification result of the new block is a verification failure, then the first... The new block sent by the controller 120 whose verification result is successful is verified. When the smart gateway 110 has verified all the new blocks sent by the controller 120 whose first verification result is successful and all the verification results are unsuccessful, the new block is determined to be an illegal block and the unique identifier of the new block is broadcast so that all controllers 120 that are verifying the new block will discard the new block. If the number is less than or equal to N / 2 and the verification is successful, or if the number is less than or equal to N / 2 and the verification fails, the received new block is determined to be an illegal block and the unique identifier of the new block is broadcast so that all controllers 120 that are verifying the new block will discard the new block.
[0070] In this way, each controller 120 does not need to send the first verification result to the smart gateway 110, thus avoiding transmission congestion caused by multiple controllers 120 sending verification results to the smart gateway 110 at the same time, and effectively reducing the time delay caused by the new block consensus process.
[0071] Optionally, according to some embodiments of this application, the smart gateway 110 is further configured to: broadcast a block forwarding request when no first verification result is received within a preset time and the second verification result is a verification failure, so that the controller 120 with a first verification result of successful verification sends a new block to the smart gateway 110, and verifies the new block after receiving it, so that the new block is uploaded to the blockchain after successful verification. Alternatively, when a first verification result is received within a preset time and the second verification result is a verification success, the smart gateway 110 broadcasts a verification result forwarding request, so that the controller 120 with a first verification result of successful verification sends the first verification result to the smart gateway 110, and accumulates the number of first verification results of successful verification after receiving the first verification result, so that a new block is uploaded to the blockchain when the number is greater than N / 2. If the first verification result is received within a preset time and the second verification result is a verification failure, the block forwarding request and the verification result forwarding request are broadcast so that the controller 120, whose first verification result is a successful verification, sends a new block and the first verification result to the smart gateway 110. After receiving the new block and the first verification result, the number of first verification results that are successful verifications is accumulated and the new block is verified. After the number is greater than N / 2 and the verification is successful, the new block is uploaded to the blockchain.
[0072] Optionally, according to some embodiments of this application, each controller 120 is further configured to send a registration request to the smart gateway 110, the registration request including a unique identifier of the controller 120. The smart gateway 110 is further configured to receive the registration request sent by each controller 120 and generate a digital certificate for the controller 120 based on the unique identifier of the controller 120. The smart gateway 110 is also configured to generate a whitelist based on the unique identifier and digital certificate of each controller 120, the latest block timestamp of the blockchain, and the latest block hash value, and broadcast the whitelist.
[0073] According to some embodiments of this application, optionally, the controller 120 is further configured to generate a preparatory block based on the controller 120's unique identifier, the hash value of the previous block, and the timestamp of the new block, and to generate the hash value of the new block based on the preparatory block and the controller 120's digital certificate. The controller 120 is also configured to generate a new block based on the hash values of the preparatory block and the new block.
[0074] The specific implementation process and beneficial effects of the above embodiments can be referred to the embodiments shown above, and will not be repeated here.
[0075] To ensure the security of the new block, according to some embodiments of this application, optionally, Figure 2 is a schematic flowchart of the verification steps for the new block of this application. As shown in the figure, the controller 120 and the smart gateway 110 are also used to verify the new block through the following steps:
[0076] Step 210: Retrieve the latest block timestamp of the blockchain in the whitelist, and determine whether the difference between the latest block timestamp and the timestamp of the new block is greater than or equal to the first preset threshold.
[0077] In this embodiment of the application, the number of new blocks generated by the controller 120 is limited. That is, within one sampling period, each controller 120 can only generate one new block. After generating a new block, the controller 120 must wait for a time interval before it can generate the next new block. The time interval is the first preset threshold T1, and T1 is determined by the sampling period.
[0078] Therefore, the first step for controller 120 and smart gateway 110 is to check whether the number of new blocks generated by controller 120 exceeds the limit. First, retrieve the latest block timestamp T2 of the blockchain in the stored whitelist and extract the timestamp TS of the new block. Then, calculate the difference (T2-TS) between the latest block timestamp T2 and the new block timestamp TS. Finally, compare the difference (T2-TS) between the latest block timestamp and the new block timestamp with the first preset threshold T1. If T2-TS ≥ T1, then proceed to step 220. If T2-TS < T1, it indicates that the number of new blocks generated by controller 120 exceeds the limit, and the verification result of the new block is determined to be a verification failure.
[0079] Step 220: Determine whether the difference between the current timestamp and the timestamp of the new block is less than the second preset threshold.
[0080] Specifically, the second preset threshold T3 is the maximum system delay of the industrial control system 100. Therefore, in the second step, the controller 120 and the smart gateway 110 need to check the time between the controller 120 broadcasting the new block and the controller 120 and the smart gateway 110 receiving the new block. That is, calculate the difference (T4-TS) between the current timestamp T4 and the timestamp TS of the new block. Then compare the difference (T4-TS) between the current timestamp T4 and the timestamp TS of the new block with the second preset threshold T3. If T4-TS < T3, then proceed to step 230. If T4-TS ≥ T3, it indicates that the time between the controller 120 broadcasting the new block and the controller 120 and the smart gateway 110 receiving the new block exceeds the maximum system delay of the industrial control system 100. In this case, the verification result of the new block is determined to be a verification failure.
[0081] Step 230: Retrieve the latest block hash value of the blockchain in the whitelist and determine whether the latest block hash value of the blockchain is consistent with the previous block hash value.
[0082] In a blockchain, each block includes the hash value of the previous block. Therefore, the third step of the controller 120 and smart gateway 110 requires checking whether the hash value of the previous block of the new block is consistent with the hash value of the latest block in the blockchain. First, the latest block hash value hash2 of the blockchain in the stored whitelist is retrieved, and the hash value hash1 of the previous block of the new block is extracted. Then, it is determined whether the latest block hash value hash2 of the blockchain is consistent with the hash value hash1 of the previous block of the new block. If they are consistent, step 240 is executed. If not, it indicates that the new block does not include the hash value of the previous block, and the verification result of the new block is determined to be a verification failure.
[0083] Step 240: Retrieve the digital certificate of controller 120 from the whitelist, and determine whether the hash value between the preparatory block of the new block and the digital certificate of controller 120 is consistent with the hash value of the new block.
[0084] In the fourth step, the controller 120 and the smart gateway 110 first retrieve the digital certificate of the controller 120 that generated the new block from the stored whitelist, and extract the preparatory block and hash value HASH of the new block. Then, they calculate the hash value hash3 between the preparatory block and the digital certificate. Finally, they determine whether the hash value hash3 between the preparatory block and the digital certificate is consistent with the hash value HASH of the new block. If yes, they proceed to step 250. If no, they determine that the verification result of the new block is a verification failure.
[0085] Step 250: Determine that the verification result of the new block is successful.
[0086] When the controller 120 and the smart gateway 110 complete the check of the new block in the above manner, the verification result of the new block is determined to be successful, indicating that the new block is a legitimate block. Verifying the new block in the above manner can effectively verify its legitimacy, thereby enabling the timely detection of tampered new blocks and improving the data security of the industrial control system 100.
[0087] According to some embodiments of this application, optionally, the controller 120 is also configured to generate a unique identifier for the controller 120 based on the hash value of its stored control address and the current timestamp.
[0088] According to some embodiments of this application, optionally, the controller 120 is also configured to generate a unique identifier for the controller 120 based on a hash value between its stored control address and a random number.
[0089] The specific implementation process and beneficial effects of each step in the above embodiments can be referred to the embodiment shown in Figure 1 above, and will not be repeated here.
Claims
1. An industrial control system, characterized in that, The system includes: a smart gateway and multiple controllers; the multiple controllers are interconnected, and each controller is used to generate a new block based on industrial data uploaded by industrial equipment and broadcast the new block; the new block includes a list of unique identifiers, which includes the unique identifiers of N controllers other than the controller that generated the new block, where N is a positive odd number; each controller is also used to receive the new block broadcast by the other controllers, and after finding the unique identifier of the controller in the list of unique identifiers, verify the new block to obtain a first verification result; the smart gateway is connected to each controller and is used to receive the new block broadcast by each controller and verify the new block to obtain a second verification result; the smart gateway is also used to upload the new block to the blockchain after determining that the new block is legitimate based on the first verification result and the second verification result.
2. The system according to claim 1, characterized in that, Each of the controllers is further configured to send the first verification result to the smart gateway; the smart gateway is further configured to upload the new block to the blockchain after determining that the new block is legal based on the first verification result and the second verification result, including: the smart gateway is further configured to accumulate the number of times the first verification result is verified successfully, and upload the new block to the blockchain when the number is greater than N / 2 and the second verification result is verified successfully.
3. The system according to claim 2, characterized in that, The smart gateway is also used to send a block forwarding request to the controller whose first verification result is successful when the number is greater than N / 2 and the second verification result is a verification failure, so that the controller sends the new block to the smart gateway; the smart gateway is also used to verify the new block after receiving the new block sent by the controller, and upload the new block to the blockchain after successful verification.
4. The system according to claim 1, characterized in that, The controller is further configured to not send the first verification result of the new block to the smart gateway when the first verification result is successful, and to send the first verification result of the new block to the smart gateway when the first verification result is unsuccessful. The smart gateway is further configured to upload the new block to the blockchain after determining that the new block is legitimate based on the first verification result and the second verification result, including: the smart gateway is further configured to upload the new block to the blockchain if it does not receive the first verification result within a preset time and the second verification result is successful.
5. The system according to claim 4, characterized in that, The smart gateway is further configured to: broadcast a block forwarding request when it does not receive the first verification result within a preset time and the second verification result is a verification failure, so that a controller whose first verification result is a successful verification sends the new block to the smart gateway, and verifies the new block after receiving it, so that the new block is uploaded to the blockchain after successful verification; and broadcast a verification result forwarding request when it receives the first verification result within a preset time and the second verification result is a verification success, so that a controller whose first verification result is a successful verification sends the first verification result to the smart gateway, and verifies the new block after receiving the first verification result. After the results are accumulated, the number of successful first verification results is recorded. When the number is greater than N / 2, the new block is uploaded to the blockchain. If the first verification result is received within a preset time and the second verification result is a verification failure, the block forwarding request and the verification result forwarding request are broadcast. This allows the controller with the successful first verification result to send the new block and the first verification result to the smart gateway. After receiving the new block and the first verification result, the number of successful first verification results is accumulated, and the new block is verified. When the number is greater than N / 2 and the verification is successful, the new block is uploaded to the blockchain.
6. The system according to claim 1, characterized in that, Each controller is further configured to send a registration request to the smart gateway, the registration request including a unique identifier of the controller; the smart gateway is further configured to receive the registration request sent by each controller and generate a digital certificate for the controller based on the unique identifier of the controller; The smart gateway is also used to generate a whitelist based on the unique identifier and digital certificate of each controller, the latest block timestamp and the latest block hash value of the blockchain, and broadcast the whitelist.
7. The system according to claim 6, characterized in that, The controller is also configured to generate a preparatory block based on the controller's unique identifier, the hash value of the previous block, and the timestamp of the new block, and to generate the hash value of the new block based on the preparatory block and the controller's digital certificate; The controller is also configured to generate the new block based on the hash values of the prepared block and the new block.
8. The system according to claim 7, characterized in that, The controller and the smart gateway are also used to verify the new block through the following steps: retrieving the latest block timestamp of the blockchain in the whitelist, and determining whether the difference between the latest block timestamp of the blockchain and the timestamp of the new block is greater than or equal to a first preset threshold. If the difference between the latest block timestamp and the new block timestamp of the blockchain is greater than or equal to a first preset threshold, then it is determined whether the difference between the current timestamp and the new block timestamp is less than a second preset threshold. If the difference between the current timestamp and the timestamp of the new block is less than a second preset threshold, then the latest block hash value of the blockchain in the whitelist is retrieved, and it is determined whether the latest block hash value of the blockchain is consistent with the previous block hash value; if the latest block hash value of the blockchain is consistent with the previous block hash value, then the digital certificate of the controller in the whitelist is retrieved, and it is determined whether the hash value between the preparatory block of the new block and the digital certificate of the controller is consistent with the hash value of the new block; If the hash value between the preparatory block of the new block and the digital certificate of the controller is consistent with the hash value of the new block, then the verification result of the new block is determined to be successful.
9. The system according to claim 6, characterized in that, The controller is also used to generate a unique identifier for the controller based on the hash value of its stored control address and the current timestamp.
10. The system according to claim 6, characterized in that, The controller is also used to generate a unique identifier for the controller based on the hash value between its stored control address and a random number.
Citation Information
Patent Citations
Construction equipment Internet of Things system and method based on blockchain technology
CN108632293A
Blockchain consensus method based on Raft algorithm
CN109525636A