Trusted detection method, device, equipment and storage medium for components of industrial control systems

By parsing and updating component identification codes in each link of the industrial control system and uploading them to the blockchain, the problem of trusted detection of components throughout their life cycle is solved, ensuring the security of the system.

CN119128897BActive Publication Date: 2025-09-19WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411096351.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2025-09-19
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

In the existing technology, the components of industrial control systems have multi-link, multi-subject, and multi-variable characteristics throughout their entire life cycle. As a result, when trusted detection is only performed in a single link, the components may be invaded in subsequent links, posing a security risk.

Method used

Using blockchain technology, the component identification code is obtained in the previous link of each link, parsed and trusted detection is performed. If the detection is passed, the identification code is updated and uploaded to the blockchain to ensure the credibility of the component throughout its life cycle.

Benefits of technology

It realizes the trusted detection of industrial control system components throughout their entire life cycle, effectively avoiding security issues caused by single-link detection and improving the overall security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128897B_ABST
    Figure CN119128897B_ABST
Patent Text Reader

Abstract

Disclosed are a method, apparatus, device, and storage medium for detecting the trustworthiness of components in an industrial control system, belonging to the field of blockchain technology. The method comprises: after the previous step of a first step is completed, the first step obtains the identification code of a first subcomponent of a first component; parsing the identification code of the first subcomponent to obtain a first parsing result; performing a trustworthiness check on the first subcomponent based on the first parsing result; and if the first subcomponent passes the trustworthiness check, updating the identification code of the first subcomponent after the first step is completed, and uploading the updated identification code of the first subcomponent to a blockchain. This method enables trustworthiness testing of components in an industrial control system throughout their entire lifecycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of blockchain technology, and in particular to a trusted detection method, apparatus, device, and storage medium for components of an industrial control system. Background Art

[0002] With the development of information technology, industrial control systems have evolved from traditional, relatively closed electromechanical systems to interconnected digital systems. During the operation of industrial control systems, each component must undergo multiple trustworthy checks to ensure their security.

[0003] Conventional methods for verifying the trustworthiness of industrial control system components often focus on testing components at a single stage. However, the entire lifecycle of industrial control system components, from production to use, involves multiple stages, multiple agents, and multiple variables. If a component passes trustworthiness testing at one stage but is compromised at a subsequent stage, the industrial control system presents a vulnerability. Summary of the Invention

[0004] The present disclosure provides a method, apparatus, device, and storage medium for detecting the trustworthiness of components in an industrial control system, which can detect the trustworthiness of components in the entire life cycle of the components in the industrial control system. The technical solution includes at least the following solutions:

[0005] In a first aspect, a method for trustworthy detection of components of an industrial control system is provided, wherein the industrial control system includes seven links: production, procurement, development, assembly, deployment, operation and maintenance, and recycling, each of the links includes multiple components, each component includes multiple sub-components, and each sub-component has a unique identification code. The method includes: after the previous link of the first link is completed, the first link obtains the identification code of the first sub-component of the first component, the first link is any link of the seven links, and the first component is any component in the first link; parses the identification code of the first sub-component to obtain a first parsing result; based on the first parsing result, performs trustworthy detection on the first sub-component; if the first sub-component passes the trustworthy detection, updates the identification code of the first sub-component after the first link is completed, and uploads the updated identification code of the first sub-component to the blockchain.

[0006] Optionally, in the case where the first subcomponent includes source code, the first parsing result includes the logical supplier of the first subcomponent, and the trustworthy detection of the first subcomponent based on the first parsing result includes: based on the logical supplier of the first subcomponent, obtaining first zero-knowledge proof data from the blockchain, the first zero-knowledge proof data being generated by the logical supplier compressing and sampling the source code of the first subcomponent and then performing zero-knowledge proof operation on the compressed and sampled source code of the first subcomponent; based on the first zero-knowledge proof data, performing zero-knowledge proof verification on the first subcomponent to perform trustworthy detection on the first subcomponent.

[0007] Optionally, the source code of the first sub-component consists of n function blocks, and the logic supplier is used to implement compressed sampling of the source code of the first sub-component in the following manner: determining the cyclomatic complexity, calling frequency, and number of lines of code of each of the n function blocks, thereby constructing a first three-dimensional vector group; clustering the first three-dimensional vector group using the DBSCAN algorithm to obtain multiple clusters; and determining the source code of the first sub-component after compressed sampling based on the multiple clusters.

[0008] Optionally, the logic provider is configured to implement a zero-knowledge proof operation on the source code of the first subcomponent after compression sampling using a Groth16 algorithm.

[0009] Optionally, in the process of implementing a zero-knowledge proof operation on the source code of the first subcomponent after compression sampling using the Groth16 algorithm, a trusted initialization step is included, and the trusted initialization step includes multiple random parameters. The logic provider is further used to generate the multiple random parameters based on the multi-party secure computing MPC protocol and the threshold secret sharing scheme Shamir secret sharing algorithm.

[0010] Optionally, the identification code includes a prefix part and a suffix part, the prefix part is used to indicate three levels, which are national node, secondary node code and enterprise node respectively, and the suffix part is used to indicate thirteen levels, which are previous operation, previous index, current operation, current index, product unique identification, component unique identification, link, component type, component supplier certificate, data cache time, timestamp, detection log code and reference.

[0011] Optionally, parsing the identification code of the first subcomponent to obtain a first parsing result includes:

[0012] Based on the identification code of the first subcomponent, a request is made to the global Handle registry GHR to divide the identification code of the first subcomponent, wherein the division of the identification code of the first subcomponent is used to divide the suffix part of the identification code of the first subcomponent into the thirteen levels; the identification code of the divided first subcomponent sent by the GHR is received; based on the identification code of the divided first subcomponent, a first resolution request is sent to the local Handle service LHS, wherein the first resolution request is used to request the LHS to resolve the identification code of the divided first subcomponent; and the first resolution result is received from the LHS.

[0013] On the second aspect, a trusted detection device for components of an industrial control system is also provided. The industrial control system includes seven links: production, procurement, development, assembly, deployment, operation and maintenance, and recycling. Each link includes multiple components, each component includes multiple sub-components, and each sub-component has a unique identification code. The device includes: an acquisition module, which is used to obtain the identification code of the first sub-component of the first component in the first link after the previous link of the first link is completed. The first link is any one of the seven links, and the first component is any component in the first link; a parsing module, which is used to parse the identification code of the first sub-component and obtain a first parsing result; a trusted detection module, which is used to perform trusted detection on the first sub-component based on the first parsing result; an update module, which is used to update the identification code of the first sub-component after the first link is completed if the first sub-component passes the trusted detection, and upload the updated identification code of the first sub-component to the blockchain.

[0014] Optionally, when the first subcomponent includes source code, the first parsing result includes the logical supplier of the first subcomponent, and the trusted detection module is further used to obtain first zero-knowledge proof data from the blockchain based on the logical supplier of the first subcomponent, where the first zero-knowledge proof data is generated by the logical supplier compressing and sampling the source code of the first subcomponent and then performing a zero-knowledge proof operation on the compressed and sampled source code of the first subcomponent; based on the first zero-knowledge proof data, the first subcomponent is subjected to zero-knowledge proof verification to perform a trusted detection on the first subcomponent.

[0015] Optionally, the parsing module is also used to request the global Handle registry GHR to divide the identification code of the first subcomponent based on the identification code of the first subcomponent, and the division of the identification code of the first subcomponent is used to divide the suffix part of the identification code of the first subcomponent into the thirteen levels; receive the identification code of the divided first subcomponent sent by the GHR; based on the identification code of the divided first subcomponent, send a first parsing request to the local Handle service LHS, and the first parsing request is used to request the LHS to parse the identification code of the divided first subcomponent; receive the first parsing result sent by the LHS.

[0016] In a third aspect, a computer device is also provided, comprising: a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor, thereby executing the trusted detection method of components of the industrial control system described in the above embodiment.

[0017] In a fourth aspect, a computer-readable storage medium is also provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor, thereby executing the trusted detection method of components of the industrial control system described in the above embodiment.

[0018] In a fifth aspect, a computer program product is provided, comprising a computer program / instruction, which implements the method described in the first aspect when executed by a processor.

[0019] The beneficial effects of the technical solutions provided by the embodiments of the present disclosure include at least:

[0020] In the embodiment of the present disclosure, after the previous link of the first link is completed, the first link obtains the identification code of the first subcomponent of the first component, the first link is any link in the seven links, and the first component is any component in the first link; the identification code of the first subcomponent is parsed to obtain a first parsing result; based on the first parsing result, the first subcomponent is tested for trustworthiness; if the first subcomponent passes the trustworthiness test, the identification code of the first subcomponent is updated after the first link is completed, and the updated identification code of the first subcomponent is uploaded to the blockchain. In this way, the components of the industrial control system can be tested for trustworthiness throughout their entire life cycle, effectively avoiding the security issues of the industrial control system caused by the intrusion of the components during the circulation of the industrial control system when the components are tested for trustworthiness only in a single link. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 It is a schematic diagram of an application scenario of a trusted detection method for components of an industrial control system;

[0023] Figure 2 A flowchart of a method for detecting a component of an industrial control system provided by an exemplary embodiment of the present disclosure is shown;

[0024] Figure 3 A flowchart of a method for detecting a component of an industrial control system provided by another exemplary embodiment of the present disclosure is shown;

[0025] Figure 4 is a schematic diagram of the structure of the identification code;

[0026] Figure 5 A flowchart of the entire life cycle of an identification code;

[0027] Figure 6 A schematic diagram of the identification code operation;

[0028] Figure 7 A flowchart of the identification code parsing process;

[0029] Figure 8 A flowchart for performing zero-knowledge proof verification on the first subcomponent;

[0030] Figure 9 This is a logical flow diagram of the BC-ICS model;

[0031] Figure 10 Schematic diagram of the parsing speed of the identification code;

[0032] Figure 11 Schematic diagram of the time consumption for generating random parameters for multiple parties;

[0033] Figure 12 A schematic diagram of the time it takes to generate and verify zero-knowledge proof data for an industrial control system when the block height is the same;

[0034] Figure 13 Schematic diagram of the size of zero-knowledge proof data;

[0035] Figure 14A schematic diagram of the time it takes to generate and verify zero-knowledge proof data for an industrial control system when the number of transactions stored in a block is the same;

[0036] Figure 15 This is a schematic diagram of DBSCAN clustering;

[0037] Figure 16 This is a time comparison diagram of the zero-knowledge proof data generated before and after source code compression;

[0038] Figure 17 A diagram comparing the time it takes to verify zero-knowledge proofs before and after source code compression.

[0039] Figure 18 A schematic structural diagram of a trusted detection device for components of an industrial control system provided by an exemplary embodiment of the present disclosure is shown;

[0040] Figure 19 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0041] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning understood by persons of ordinary skill in the field to which the present disclosure belongs. The words "first", "second", "third" and similar terms used in the patent application specification and claims of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "include" or "comprising" mean that the elements or objects appearing before "include" or "comprising" cover the elements or objects listed after "include" or "comprising" and their equivalents, and do not exclude other elements or objects. Words such as "connected" or "connected" and similar terms are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0042] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0043] Figure 1 This is a schematic diagram of the application scenario of the trusted detection method for components of industrial control systems. Figure 1 As shown in the figure, there are six types of components in industrial control systems: hardware components, software components, system components, firmware components, communication components, and network components. Different components are involved in different links of the industrial control system.

[0044] Industrial control systems include seven stages: production, procurement, development, assembly, deployment, operation and maintenance, and recycling. The development stage can be divided into the design, coding, and testing stages, which are executed in sequence. The assembly stage can be divided into the configuration and deployment stages, which are executed in sequence. The deployment stage can be divided into the installation and debugging stages, which are executed in sequence. The operation and maintenance stage can be divided into the audit, update, and replacement stages, which are executed in sequence.

[0045] Among them, the production link mainly involves hardware components; the procurement link mainly involves firmware components, communication components and network components; the development link mainly involves hardware components, software components, system components, firmware components and communication components; the assembly link mainly involves hardware components, software components, firmware components, communication components and network components; the deployment link mainly involves software components, system components, firmware components, communication components and network components; the operation and maintenance link mainly involves hardware components, software components, system components, firmware components, communication components and network components; the recycling link mainly involves software components.

[0046] Table 1 is a table of detection elements of components of industrial control systems.

[0047]

[0048] As shown in Table 1, the detection targets for each component type are subcomponents. Hardware components include controllers, sensors, actuators, and HMI (Human Machine Interface) devices. Software components include programming software, human-machine interaction software, data acquisition and communication software, and fault diagnosis and alarm software. System components include distributed control systems (DCS), supervisory control and data acquisition systems (SCADA), manufacturing execution systems (MES), machine vision systems, security control systems (SCS), industrial manufacturing configuration systems, and CNC machine tool systems. Network components include routers, industrial switches, and industrial firewalls. Communication components include wireless communication-related subcomponents such as industrial communication protocols, serial communication ports, Wi-Fi, Bluetooth, and Zigbee. Firmware components include PLC (Programmable Logic Controller) firmware, SCADA firmware, HMI firmware, and IoT (Internet of Things) firmware.

[0049] During the operation of multiple links in an industrial control system, before any link starts to execute, it is necessary to perform trustworthy testing on the components involved in that link to ensure the security of the operation of multiple links in the industrial control system.

[0050] Figure 2 A flowchart of a trustworthy detection method for components of an industrial control system provided by an exemplary embodiment of the present disclosure is shown. The method can be executed by a computer device. Figure 2 , the method comprising:

[0051] In step 201, after the previous step of the first step is completed, the first step obtains the identification code of the first subcomponent of the first component.

[0052] The first link is any one of the seven links, and the first component is any one of the components in the first link.

[0053] In step 202, the identification code of the first subcomponent is parsed to obtain a first parsing result.

[0054] In step 203, based on the first parsing result, a credibility check is performed on the first subcomponent.

[0055] In step 204, if the first subcomponent passes the trustworthy test, the identification code of the first subcomponent is updated after the first step is completed, and the updated identification code of the first subcomponent is uploaded to the blockchain.

[0056] In the embodiment of the present disclosure, after the previous link of the first link is completed, the first link obtains the identification code of the first subcomponent of the first component, the first link is any link in the seven links, and the first component is any component in the first link; the identification code of the first subcomponent is parsed to obtain a first parsing result; based on the first parsing result, the first subcomponent is tested for trustworthiness; if the first subcomponent passes the trustworthiness test, the identification code of the first subcomponent is updated after the first link is completed, and the updated identification code of the first subcomponent is uploaded to the blockchain. In this way, the components of the industrial control system can be tested for trustworthiness throughout their entire life cycle, effectively avoiding the security issues of the industrial control system caused by the intrusion of the components during the circulation of the industrial control system when the components are tested for trustworthiness only in a single link.

[0057] Industrial control system components are delivered by component suppliers or logic designers at different stages of the industrial control system's operation. In chronological order, hardware components are delivered during the production phase and are updated after the production phase is complete. Firmware, communication, and network components are delivered during the procurement phase and are updated after the procurement phase is complete. System and software components are delivered during the development phase, which also involves hardware components updated during the production phase and communication and firmware components updated during the procurement phase. After the development phase is complete, the hardware, communication, software, system, and firmware components are updated. At this point, all six component types have been delivered, and subsequent use will be based on updated components. The assembly phase utilizes hardware, communication, software, and firmware components updated during the development phase, as well as network components updated during the procurement phase. After the assembly phase is complete, the hardware, communication, software, network, and firmware components are updated. The deployment phase utilizes the communication, software, network, and firmware components updated during the assembly phase, as well as the system components updated during the development phase. After the deployment phase is complete, the system, communication, software, network, and firmware components are also updated. The operation and maintenance phase utilizes the system, communication, software, network, and firmware components updated during the deployment phase, as well as the hardware components updated during the assembly phase. After the operation and maintenance phase is complete, the hardware, system, communication, software, network, and firmware components are also updated. The recycling phase utilizes the software components updated during the operation and maintenance phase.

[0058] In the above process, components will be uploaded to the chain after delivery and update, that is, components will be updated to the blockchain after delivery and update.

[0059] When components are used in any link, such as delivered components or components updated by a certain link, these components must first be tested for trustworthiness.

[0060] Figure 3 A flowchart of a method for detecting a component of an industrial control system according to another exemplary embodiment of the present disclosure is shown. The method can be executed by a computer device. Figure 3 , the method includes

[0061] In step 301, component suppliers, logic designers, users, and regulatory agencies register on the chain.

[0062] Here, registering on-chain means registering different participants on the blockchain. Component suppliers and logic designers deliver multiple components. Users, or consumers, perform trustworthy checks on industrial control system components after they are finally delivered, and periodically request optional tests to ensure the safety of the components received. Regulatory agencies oversee the entire blockchain system.

[0063] In step 302, the component supplier delivers the component, and the logic designer delivers the source code and encrypts the source code and stores it in the blockchain.

[0064] Among them, the component supplier is responsible for delivering components that do not have source code, as well as the non-source code part of components that have source code, that is, the hardware part; the logic designer is responsible for delivering the source code part of components that have source code, and after the source code is delivered, the source code is encrypted and stored in the blockchain.

[0065] In step 303, after the previous step of the first step is completed, the first step obtains the identification code of the first subcomponent of the first component.

[0066] The identification code in the embodiment of the present disclosure is implemented based on the Handle system, which includes the Client, GHR (Global Handle Registry) and LHS (Local Handle Service). Figure 4 Table 2 illustrates the structure of the identification code.

[0067] Figure 4 is a schematic diagram of the structure of the identification code, such as Figure 4 As shown, the identification code includes a prefix part and a suffix part, wherein the prefix part is a GHR structure and the suffix part is a LHS structure.

[0068] The prefix consists of three levels: the root node identifier, the first-level domain node, and the second-level domain node. The suffix consists of a custom encoding in UTF-8 character format. The prefix and suffix are separated by the prefix and suffix separator " / ", and the different levels in the prefix and suffix are separated by the level separator ".".

[0069] In the three levels of the prefix part of the identification code, the root node identifier represents the country node, the first-level domain node is the second-level node code, and the second-level domain node is the enterprise node.

[0070] There are many related technologies regarding the implementation methods of national nodes, secondary node codes and enterprise nodes, so detailed description is omitted here.

[0071] The suffix part includes the previous operation TX pre , Previous Index pre 、Current operation TX cur , Current Index cur , Product unique identification ID i , component unique identifier , Link i Component Type unit , component supplier certificate CA unit , data cache time TTL, timestamp T, detection log code Log and reference Ct, a total of thirteen levels.

[0072] Table 2 shows examples of different levels of the suffix part of the identification code and their functions.

[0073]

[0074] For the identification code of a component, the entire life cycle of the identification code mainly includes five stages: creation, identification code chain-up, identification code parsing, identification code operation and chain synchronization. Figure 5 This is a flowchart of the entire life cycle of the identification code. Figure 5 Describe the entire life cycle of the identification code.

[0075] Figure 5 Part (a) is a flowchart of the creation phase, such as Figure 5 As shown, in the creation phase of the identification code, taking the prefix "86.1564.1545" as an example, the creation phase includes the following 6 steps:

[0076] In the first step, the client sends a prefix registration request for the component to the GHR.

[0077] In the second step, after receiving the prefix registration application from the component, GHR registers a prefix "86.1564.1545" and stores it in GHR, and then sends the prefix to the Client. At this time, the Client will receive the prefix "86.1564.1545" sent by GHR.

[0078] In the third step, the client deploys the suffix part in the LHS, that is, defines the meaning of each character in the suffix part in the LHS.

[0079] The fourth step is that the Client updates the LHS site to the GHR. This step is similar to the third step, which is to define the meaning of each character in the suffix part in the GHR.

[0080] Step 5: The Client sends a suffix registration request for the component to the LHS.

[0081] In the sixth step, after receiving the suffix registration application of the component, LHS registers a suffix and stores it in LHS, and then sends the suffix to the Client. At this time, the Client will receive the suffix sent by LHS.

[0082] The client in the creation phase can be any enterprise involved in receiving delivered components. For example, in the production phase, when the production phase receives delivered hardware components and needs to register the hardware component's identification code, the production phase (including the enterprise) can be the client.

[0083] In other stages, such as identification code chain-up, identification code resolution, identification code operation and chain synchronization, the Client can be any link in the industrial control system (the enterprise involved) or the user.

[0084] Optionally, after the suffix is ​​created, a QR code corresponding to the identification code may be generated in order to be more compatible with identification recognition means in existing industrial control systems.

[0085] The identification on-chain stage is to store the identification code in the blockchain.

[0086] Identification code parsing is to parse out the information contained in the identification code. When the component needs to be trusted in a certain link of the subsequent industrial control system, the trustworthiness test of the component can be achieved through the information parsed from the identification code of the component.

[0087] Identification code operations include creation, verification, addition, modification and deletion, which is the entire life cycle of the identification code, among which addition and modification are both updates to the identification code.

[0088] After performing any identification code operation, the identification code needs to be synchronized on the chain, that is, the identification code after the identification code operation is stored in the blockchain.

[0089] Figure 6 Schematic diagram of identification code operation. Figure 6 Part (a) represents the creation phase of the suffix part of a certain identification code, where the preceding operation TX pre , Previous Index pre If it is NULL, the reference is set to empty and the current index is cur A value of 1 indicates a create operation.

[0090] Figure 6 Part (b) indicates that Figure 6 (a), the identification code is added with a new value. pre for Figure 6The current operation in part (a), the previous index Index pre for Figure 6 The current index in part (a) is the current index cur 2 means adding an operation, that is, in the current operation TX cur Add a new value to the address.

[0091] Figure 6 Part (c) of Figure 6 Based on part (b), the identification code is modified. pre for Figure 6 The current operation in part (b), the previous index Index pre for Figure 6 The current index in part (b) is the current index cur 3 indicates a modification operation, that is, modifying the current operation TX cur Here, the modification does not delete the previous identification information, but connects it in the form of a record. When the user queries the latest identification code, the previous behavior can be traced back.

[0092] The essence of the add operation is to add a new data at another address. This new data did not exist originally. For example, if there was no data at address A, the add operation is used to add data at address A. The essence of the modify operation is to change the data at an address where there is already data. For example, if there was data 1 at address A, the modify operation is used to change the 1 at address A to 2 or other data, etc.

[0093] Figure 6 Part (d) indicates that Figure 6 Based on the (c) part of the code, the identification code is deleted. The current index Indexcur is 4, which means the deletion operation, that is, the data in the identification code is stored in the blockchain in an encrypted and hidden way. pre , Previous Index pre The information of the previous identification code can be gradually encrypted, and then all the data designed by the identification code can be hidden, thus achieving the deletion effect in the blockchain.

[0094] The data in the blockchain cannot be modified. In the embodiment of the present disclosure, the deletion operation can be implemented on the blockchain by encrypting and hiding it.

[0095] It can be seen from the entire life cycle of the identification code that whether it is a newly created identification code or an updated identification code, it will be uploaded to the blockchain, so the identification code of the first subcomponent in step 303 can also be obtained from the blockchain.

[0096] When obtaining the identification code of the first subcomponent, the prefix of the identification code of the first subcomponent needs to be applied for from the first subcomponent's parent level. The parent level here is the previous link that used the first subcomponent. For example, if the first subcomponent is a subcomponent of a hardware component in the development link, since the previous link that used the hardware component was the production link, the parent level of the first subcomponent is the production link.

[0097] In step 304, the identification code of the first subcomponent is parsed to obtain a first parsing result.

[0098] When implementing step 304, the joint participation of the Client, GHR, LHS, smart contract and blockchain is required.

[0099] The Client is the first link (the enterprise that needs to parse the identification code of the first subcomponent). For the relevant content of GHR and LHS, please refer to the aforementioned step 303. As for the implementation method of smart contracts, there are many related technologies and detailed description is omitted here.

[0100] Figure 7 This is a flowchart of the identification code parsing process, such as Figure 7 As shown, step 304 includes the following steps ad:

[0101] Step a: Based on the identification code of the first subcomponent, request the GHR to divide the identification code of the first subcomponent.

[0102] Dividing the identification code of the first subcomponent is used to divide the suffix portion of the identification code of the first subcomponent into thirteen levels. Here, the suffix of the identification code of the first subcomponent obtained in step 303 is a string of continuous characters without any level separator in the middle. If the continuous characters are directly sent to the LHS, the LHS will not be able to parse them. Therefore, it is necessary to divide the continuous characters into thirteen levels through step a so that the divided identification code of the first subcomponent can be sent to the LHS.

[0103] In addition, GHR belongs to a public system, which corresponds to multiple LHSs, such as LHS A, LHS B, etc. Therefore, after receiving the identification code of the first subcomponent, GHR will match it to the LHS site deployed in the fourth step of the creation phase in the embodiment of the present disclosure based on the identification code of the first subcomponent, and then divide the suffix part of the identification code of the first subcomponent based on the LHS site.

[0104] After the GHR divides the suffix portion of the identification code of the first subcomponent, it may send the divided identification code of the first subcomponent to the Client.

[0105] Step b: receiving the identification code of the divided first subcomponent sent by the GHR.

[0106] Step c: Based on the identification code of the first subcomponent after division, a first parsing request is sent to the LHS, where the first parsing request is used to request the LHS to parse the identification code of the first subcomponent after division.

[0107] Optionally, after receiving the first parsing request, the LHS is configured to obtain the first parsing result by adopting the following six steps.

[0108] In the first step, LHS sends a second parsing request to the smart contract.

[0109] The second resolution request is used to request the smart contract to access the blockchain.

[0110] In the second step, the smart contract searches the world state database to obtain the current index of the identification code. cur .

[0111] If the current index of the identifier cur If it is not a new flag or a deleted flag, that is, it is not 1 or 4, it means that the data corresponding to the identification code in the blockchain can be queried; if it is a new flag or a deleted flag, it means that the data corresponding to the identification code in the blockchain cannot be queried, and the first parsing result can be returned as invalid.

[0112] The third step is to return the data in the world state to the smart contract.

[0113] In the fourth step, the smart contract retrieves all historical data from the blockchain based on the previous operations and previous indexes of the identification code, and then combines the complete identification code data.

[0114] When the fourth step is implemented, data of the identification code that matches the predecessor index may be retrieved from the address indicated by the predecessor operation.

[0115] Here, the complete identification code data refers to all the relevant data of the identification code involved in the process from the creation of the identification code to the current latest state.

[0116] Step 5: Return the complete identification code data to the smart contract.

[0117] In the sixth step, the smart contract filters out data that meets the client's permissions from the complete identification code based on the client's permissions, and sends the data that meets the client's permissions to LHS, which then sends the data that meets the client's permissions to the client.

[0118] The data that complies with the Client's permissions is the first parsed data.

[0119] Step d: Receive the first parsing result sent by LHS.

[0120] Optionally, when the first subcomponent does not include source code, the first parsing result includes: the name of the component supplier of the first subcomponent, the product unique identifier of the first subcomponent, the component unique identifier of the first subcomponent, the link of the industrial control system in which the first subcomponent is located, the type of component of the first subcomponent, the timestamp of the first subcomponent, etc.

[0121] In the case where the first subcomponent includes source code, the first parsing result may further include the name of the logic supplier of the first subcomponent.

[0122] In step 305, based on the first parsing result, the first subcomponent performs a trustworthy check.

[0123] Optionally, when the first subcomponent does not include source code, step 305 includes: verifying whether the product unique identifier of the first subcomponent, the component unique identifier of the first subcomponent, the link of the industrial control system in which the first subcomponent is located, the type of component of the first subcomponent, the timestamp of the first subcomponent and other information are accurate. When the above information of the first subcomponent is accurate, it means that the first subcomponent has passed the trusted test; when there is at least one inaccurate information of the above information of the first subcomponent, it means that the first subcomponent has failed the trusted test.

[0124] Optionally, when the first subcomponent includes source code, the first parsing result includes the logical supplier of the first subcomponent. In step 305, in addition to verifying whether the above information is accurate, it is also necessary to verify whether the source code of the first subcomponent is accurate through the following steps e to f. Figure 8 This is a flowchart for zero-knowledge proof verification of the first subcomponent. Figure 8 Steps e to f are explained.

[0125] In step e, based on the logical supplier of the first subcomponent, first zero-knowledge proof data is obtained from the blockchain.

[0126] The first zero-knowledge proof data is generated by the logic provider compressing and sampling the source code of the first subcomponent and then performing a zero-knowledge proof operation on the compressed and sampled source code of the first subcomponent. The zero-knowledge proof data for different subcomponents is different.

[0127] In the embodiment of the present disclosure, the source code of the first subcomponent consists of n function blocks, and the source code of the first subcomponent can be expressed as formula (1).

[0128] (1)

[0129] In formula (1), The source code for the first subcomponent, Represents the i-th function block, where i is an integer ranging from 1 to n.

[0130] In this case, the logic provider is used to implement the compressed sampling of the source code of the first subcomponent in three steps:

[0131] The first step is to determine the cyclomatic complexity, call frequency, and number of lines of code of each function block in the n function blocks, thereby constructing the first three-dimensional vector group.

[0132] Here, among the n function blocks, the cyclomatic complexity, calling frequency, and number of code lines of each function block can form a three-dimensional vector, and the n three-dimensional vectors corresponding to the n function blocks are the first three-dimensional vector group.

[0133] The first three-dimensional vector group can be expressed by formula (2).

[0134] (2)

[0135] In formula (2), is the first three-dimensional vector group, They respectively represent the three-dimensional vector corresponding to the first function block, the three-dimensional vector corresponding to the second function block, and so on, the three-dimensional vector corresponding to the nth function block.

[0136] Cyclomatic complexity, also known as conditional complexity, is a measure of code complexity. Cyclomatic complexity covers all possible scenarios with the minimum number of test cases. Cyclomatic complexity is expressed as the number of independent linear paths in a function block's control flow graph. Higher cyclomatic complexity indicates a more complex function block. Implementations of function block control flow graphs are well-known in the art, so detailed explanations are omitted here.

[0137] Optionally, the cyclomatic complexity of each function block is determined using formula (3) or formula (4).

[0138] (3)

[0139] In formula (3), is the cyclomatic complexity, is the number of edges in the function control flow graph, Controls the number of nodes in the flow graph for the function.

[0140] (4)

[0141] In formula (4), is the cyclomatic complexity, To determine the number of nodes, in a function control flow graph, when a node branches out two or more edges pointing to other nodes, this node is a decision node.

[0142] Formula (3) calculates cyclomatic complexity using the point-edge calculation method, and formula (4) calculates cyclomatic complexity using the node determination method. During implementation, the node determination method is used for modular function control flow graphs, and the point-edge calculation method is used for function control flow graphs other than modular function control flow graphs.

[0143] There are many methods for obtaining the number of edges in a function control flow graph, the number of nodes in a function control flow graph, and the method for determining the number of nodes in the related art, and detailed description is omitted here.

[0144] The cyclomatic complexity of each function block can be calculated using formulas (1) and (2). The call frequency and number of lines of code for each function block can be directly obtained by querying the function block's run log, so the details are omitted here.

[0145] In the second step, the DBSCAN algorithm is used to cluster the first three-dimensional vector group to obtain multiple clusters.

[0146] The DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm is an unsupervised density-based clustering algorithm that automatically discovers clusters of varying sizes and shapes and effectively identifies and handles noise and outliers. Furthermore, DBSCAN does not require a predefined number of clusters. Instead, it automatically determines the shape and number of clusters based on the density of the data points. It also does not restrict the shape of clusters and can discover clusters of any shape. It also labels noise and outliers as either noise or boundary points.

[0147] The DBSCAN algorithm needs to set an appropriate field radius And the minimum number of points within the area radius When DBSCAN is used for clustering, multiple core objects need to be found, and then each core object is used as a seed to determine the cluster corresponding to each core object. When all three-dimensional vectors in the first three-dimensional vector group are traversed, multiple clusters can be obtained.

[0148] No. The core objects can be calculated using formula (5).

[0149] (5)

[0150] In formula (5), For the core objects, Represents the first three-dimensional vector group A three-dimensional vector, The value range of same, is the area radius, The minimum number of points within the area radius.

[0151] When determining the cluster corresponding to each core object, for the mth core object , from the core object Start expanding outward, that is, storing the density of the point directly into the collection In, collection The point in the middle is the core point Cluster of core objects ,gather The points in can be expressed by formula (6).

[0152] (6)

[0153] In formula (6), That is, the collection , 、 … Represents core objects respectively The first density direct point, the second density direct point...the mth density direct point have different meanings from those in formula (2).

[0154] The density direct point can be determined using formula (7).

[0155] (7)

[0156] In formula (7), As the core object, Indicates a point To the core object distance, is the radius of the field. If a point To the core object The distance is less than the field radius ,So that is The density reaches the point.

[0157] There are many implementation methods of the DBSCAN clustering algorithm in related technologies, so detailed description is omitted here.

[0158] After DBSCAN clustering, random sampling of function blocks of different complexity is ensured, and the coverage is more comprehensive.

[0159] In the third step, based on the multiple clusters, the source code of the first subcomponent after compression sampling is determined.

[0160] A function is randomly selected from each cluster, and these multiple functions can form a secret , the secret This is the source code of the first subcomponent after compression and sampling.

[0161] The source code of the first subcomponent after compression and sampling can be encrypted using an encryption algorithm and uploaded to the blockchain, for example, using an AES-128 (Advanced Encryption Standard-128, Advanced Encryption Standard - key length is 128 bytes) encryption algorithm for encryption.

[0162] The function blocks contained in the source code of a component are complex and numerous, and the complexity of industrial control system components with different functions and designs varies. Therefore, by compressing and sampling the source code, the scale of subsequent zero-knowledge proof operations can be reduced and the operation efficiency can be improved.

[0163] Optionally, the logic supplier is configured to use the Groth16 algorithm to implement a zero-knowledge proof operation on the source code of the compressed and sampled first subcomponent, thereby generating first zero-knowledge proof data.

[0164] This process is mainly divided into two steps: the first step is trusted initialization and the second step is generating the first zero-knowledge proof data.

[0165] Trusted initialization includes generating source code proof arithmetic circuits and generating multiple random parameters through the MPC (Secure Multi-Party Computation) protocol.

[0166] Optionally, source code proof arithmetic circuit The structure of is shown in the following algorithm:

[0167] Input: / / Enter secret ;

[0168] / / Generate a new arithmetic circuit;

[0169] / / The secret Hashes are processed with SHA-256;

[0170] / / Hash the secret Convert to binary encoding to create public parameters

[0171] / / The secret With public parameters Perform bitwise equality comparison to generate , To keep secret With public parameters The result of bitwise equality comparison;

[0172] Output:

[0173] End

[0174] In the above algorithm, the system common input is first introduced: domain , source code proves arithmetic circuit : .in, , , , , remember the set ,have .

[0175] In the above source code proof arithmetic circuit, on the one hand, since the hash process is irreversible, the public parameter Unable to reverse the secret , keeping secrets On the other hand, the circuit is public and the verification process is transparent.

[0176] Furthermore, the verifier is able to verify the zero-knowledge proof provided by the prover without knowing the secret The specific value of has zero knowledge.

[0177] The Groth16 algorithm was proposed by Jens Groth in 2016. When applying the source code proof arithmetic circuit to Groth16, it is necessary to first convert the source code proof arithmetic circuit into an R1CS (Rank-1 Constraint System) problem, and then convert the R1CS problem into a QAP problem.

[0178] There are many related technologies for converting the source code proof arithmetic circuit into the R1CS problem and then converting the R1CS problem into the QAP problem, so detailed description is omitted here.

[0179] Optionally, multiple random parameters are generated through the MPC protocol, including:

[0180] First, generate the group 、 , and the corresponding generator 、 , and based on group 、 Generate the group of bilinear maps Among them, the mapping Defined as .

[0181] Second, generate the corresponding random parameters . Traditional random parameters are generated by a trusted third party, but once the above random parameters are leaked, the stability of the Groth16 system will be destroyed. Therefore, in the disclosed embodiment, by combining blockchain nodes, the MPC protocol is adopted to jointly generate relevant random numbers. The disclosed embodiment adopts the Shamir secret sharing algorithm based on the threshold secret sharing scheme to ensure the security of random parameters, and it can achieve that as long as one node is honest, the security of random parameters can be guaranteed.

[0182] With random parameters For example, in the Shamir secret sharing algorithm, For a secret maintained by multiple parties, the maintenance node 1 first selects a A prime number p, and randomly select n-1 numbers in the finite field , these random numbers and the secret random parameters A n-1 order polynomial is formed, and the n-1 order polynomial is shown in formula (8).

[0183] (8)

[0184] In formula (8), are n-1 numbers randomly selected in a finite field, ,in is a random parameter. Let the random parameter It is jointly generated and securely maintained by n nodes, which are .

[0185] Each maintenance node has The secret slice can be recorded as , then the secret slice can be expressed by formula (9).

[0186] (9)

[0187] Similarly, other maintenance nodes can generate random parameters in the same way and generate their own corresponding polynomials , and distribute the secret slices to other maintenance nodes. So far, each maintenance node has a secret slice of The secret shards owned by each maintenance node It can be expressed by formula (10).

[0188] (10)

[0189] In formula (10), is the secret shard owned by any maintenance node. The meanings of other parameters in formula (10) are the same as those in formula (9), and their detailed description is omitted here.

[0190] Due to Shamir's additivity, all the secret shards owned by each maintenance node are added together, and each for The sub-secret of . Parameters generated by all maintenance nodes That is .

[0191] The process of adding all the secret shards owned by each maintenance node can be expressed by formula (11).

[0192] (11)

[0193] The meanings of the parameters in formula (11) are the same as those in formulas (8) to (10), and their detailed description is omitted here.

[0194] Set the threshold value k to the maximum number of maintenance nodes, that is, k = n. When the threshold value is reached, all polynomials are destroyed.

[0195] The random parameter The restoration is shown in formula (12).

[0196] (12)

[0197] This ensures that only one node needs to be honest and not provide the secret slice it owns or the random number it contributes. , which ensures that the random parameters security.

[0198] For other random parameters, you can also use the same random parameters Generate in the same way.

[0199] In the embodiment of the present disclosure, by adopting the above-mentioned method to generate random parameters, the security of the trustworthy detection process is guaranteed, and the occurrence of data loss, forgery, and tampering during the trustworthy detection process is reduced.

[0200] Public reference string generated by the MPC protocol and simulated trapdoors ,in For elliptic curves The elements above, For elliptic curves The elements on.

[0201] Optionally, calculate by formula (13) to formula (14) and .

[0202] (13)

[0203] (14)

[0204] In formula (13) and formula (14), d is the degree of the polynomial, m is the number of vectors, and is a random parameter.

[0205] After generating the source code proof arithmetic circuit and generating multiple random parameters through the MPC protocol, the trusted initialization is completed. Then the first zero-knowledge proof data can be generated.

[0206] The first zero-knowledge proof data can be calculated using formula (15).

[0207] (15)

[0208] In formula (15), It is the first zero-knowledge proof data. Calculated by formula (16), Calculated by formula (17), Calculated by formula (18).

[0209] (16)

[0210] (17)

[0211] (18)

[0212] In formulas (16) to (18), and is randomly selected data, The meanings of other parameters in formula (16) to formula (18) are the same as those in formula (12) and formula (13), and their detailed description is omitted here.

[0213] After generating the first zero-knowledge proof data, the logic supplier also needs to store the first zero-knowledge proof data in the blockchain. When the client performs zero-knowledge proof verification on the first sub-component, it can obtain the first zero-knowledge proof data from the blockchain through the name of the logic supplier of the first sub-component to facilitate zero-knowledge proof verification of the first sub-component.

[0214] Step f: Based on the first zero-knowledge proof data, perform zero-knowledge proof verification on the first subcomponent and perform credibility detection on the first subcomponent.

[0215] Optionally, formula (19) is used to implement zero-knowledge proof verification of the first subcomponent based on the first zero-knowledge proof data.

[0216] (19)

[0217] The meanings of the parameters in formula (19) are the same as those in formulas (15) to (18), and their detailed description is omitted here.

[0218] The output of formula (19) is bit t. If and only if the verifier successfully verifies the first zero-knowledge proof data, the output is t=1. Otherwise, the verification fails and the output is t=0.

[0219] When the proof passes verification, the authenticity of the source code is guaranteed on the blockchain, indicating that the source code of the first subcomponent has passed the trustworthiness test. The test results and records must then be uploaded to the blockchain. After the first phase is completed, the identification code of the first subcomponent will be updated. This enables trustworthy testing of industrial control system components, reduces the difficulty of source code testing, and improves the completeness of industrial control system component testing.

[0220] Here, when the result of the zero-knowledge proof verification is passed, it means that the source code of the first subcomponent has passed the verification; when the result of the zero-knowledge proof verification is failed, it means that the source code of the first subcomponent has not passed the verification.

[0221] When the source code of the first subcomponent passes verification and all data except the logic design part in the first parsing result passes verification, it indicates that the first subcomponent passes the trustworthy test.

[0222] If at least one of the source code of the first subcomponent and the data other than the logic design in the first parsing result fails to pass verification, it means that the first subcomponent fails the trustworthy detection.

[0223] If the first subcomponent passes the trustworthy test, step 306 is executed. If the first subcomponent fails the trustworthy test, it means that the first subcomponent is not trustworthy and the industrial control system may be unsafe.

[0224] In step 306, after the first step is completed, the identification code of the first subcomponent is updated, and the updated identification code of the first subcomponent is uploaded to the blockchain.

[0225] If the first subcomponent is trustworthy, the first subcomponent can be used (or updated) during the execution of the first stage. After the first stage is completed, the identification code of the first subcomponent can be updated and uploaded to the blockchain.

[0226] For sub-components other than the first sub-component involved in the entire industrial control system, the above steps 301 to 306 may also be used to perform trustworthy detection.

[0227] Optionally, the above method can be implemented through a BC-ICS (Blockchain-Industrial Control Systems) model, which can be run by a computer device.

[0228] Figure 9 This is a logical flow diagram of the BC-ICS model, as shown in Figure 9 As shown, the logic flow of the BC-ICS model includes the following steps S1 to S6.

[0229] Step S1: Component suppliers, logic designers, users and regulators register on the chain.

[0230] Step S2: Component delivery and source code upload to the chain.

[0231] Step S3: Obtain the identification code (update the identification code).

[0232] Step S4: identification code analysis.

[0233] Step S5: zero-knowledge proof verification.

[0234] Step S6: Generate a test report and upload it to the blockchain.

[0235] Among them, steps S1 and S2 correspond to the contents of the aforementioned steps 301 to 302; step S3 corresponds to the relevant content of the identification code creation stage in step 303; step S4 corresponds to the content in step 304; steps S5 and S6 correspond to the contents in steps 305 to 306, and detailed description is omitted here.

[0236] Among them, for the user side, after the components of the industrial control system are finally delivered to the user side, the user side can perform trustworthy detection on the received components based on the methods in steps 301 to 306, and can periodically make trustworthy detection requests to ensure the security of the components obtained by the user side.

[0237] Figure 10 This is a schematic diagram of the parsing speed of the identification code. Figure 10 As shown in the figure, in order to improve the parsing efficiency and adapt to the high concurrency problem in the process of industrial control system component circulation, 100,000 identification codes were simulated to test the parsing performance of identification codes. Multiple concurrent threads were used to parse the data, and different levels of identification data were tested. The test results are shown in the figure. Figure 10 shown.

[0238] It can be seen that as the number of identification codes to be parsed increases, the parsing speed increases almost linearly. In the case of 100,000 levels, when 8 concurrent threads are used to parse the identification codes, the speed is below 40ms, which meets the parsing performance requirements of industrial control system components.

[0239] Figure 11 Schematic diagram of the time consumption of generating random parameters for multiple parties. When the size of the secret is 30MB and the height of each is 50, as shown in Figure 11 As shown, the multi-party generation of random parameters is polynomial-level, so when the blockchain contains 100 nodes, the time consumption is within 100ms. In practical applications, this time consumption is within an acceptable range.

[0240] Figure 12 Schematic diagram of the generation time and verification time of zero-knowledge proof data of the industrial control system when the block height is the same.

[0241] When the height of each block is 50, the blockchain contains 20 nodes, the source code size is millions of bytes, and the time consumption is the average of 50 operations, when the data volume is different, the time diagram of the generation time and verification time of zero-knowledge proof data under different transaction numbers in each block is analyzed. The analysis results are as follows: Figure 12 shown.

[0242] Figure 12 Part (a) shows the time required to generate zero-knowledge proof data when the source code size of the industrial control system component changes and the number of transactions per block changes. Figure 12 Part (b) is a diagram showing the time required to verify zero-knowledge proof data as the source code size of the industrial control system component changes and the number of transactions per block varies.

[0243] As can be seen, as the number of transactions in each block increases, the time required to generate and verify zero-knowledge proof data also increases. This is because the Groth16 algorithm requires a separate zero-knowledge proof for each transaction, resulting in increased time consumption. Furthermore, with data volumes in the millions of bytes, the time consumption remains in milliseconds, meeting the time requirements for industrial control system component testing while ensuring the proprietary ownership and privacy of the industrial control system component source code.

[0244] Figure 13The diagram below shows the size of zero-knowledge proof data. The simulation of zero-knowledge proof data is performed when the height of each block is 50, the blockchain contains 20 nodes, and the time consumption is the average of 50 operations. Figure 13 As shown in Figure 2, as the number of transactions in each block increases, the size of the generated zero-knowledge proof data increases linearly.

[0245] It has been verified that under the premise that a zero-knowledge proof needs to be generated separately for each transaction, the size of the zero-knowledge proof data does not change with the size of the industrial control system source code, and the size of a single zero-knowledge proof data is 256 bytes.

[0246] The total size of zero-knowledge proof data can be calculated using formula (20).

[0247] (20)

[0248] In formula (20), is the total size of the zero-knowledge proof data, is the number of transactions, The size of the zero-knowledge proof data generated for a single transaction.

[0249] Optionally, the source code of the industrial control system components can be packaged as a whole into one transaction to reduce the size of the zero-knowledge proof data on the blockchain.

[0250] Figure 14 Schematic diagram of the time it takes to generate and verify zero-knowledge proof data for an industrial control system when the number of transactions stored in a block is the same.

[0251] In the case of industrial control system components with 50 transactions stored in each block, 20 nodes in the blockchain, and a source code size of millions of bytes, the time consumption for each block is the average of 50 operations. When the amount of data is different, the time diagram of the generation time and the time diagram of the verification time of the zero-knowledge proof data at different heights of each block is analyzed. The analysis results are as follows: Figure 14 shown.

[0252] Figure 14 Part (a) shows the time required to generate zero-knowledge proof data when the source code size of the industrial control system component changes and the height of each block is different. Figure 14 Part (b) is a diagram showing the time required to verify zero-knowledge proof data when the height of each block changes as the source code size of the industrial control system component changes.

[0253] Since the proof size has been verified to be related to the number of transactions in each block, no simulation verification was performed. It can be seen that the time to generate and verify zero-knowledge proof data increases with block height. With millions of bytes of data, the time consumed is in milliseconds, which meets industrial needs.

[0254] Figure 15 This is a schematic diagram of DBSCAN clustering. Figure 15 As shown in the figure, when using the open source code of BCN3D Moveo as the source code, the domain radius is set to 1 when performing DBSCAN clustering, and each class is required to have no less than 5 data. Figure 15 As shown, we finally get four categories: A, B, C and D, as well as one category with excessive data deviation.

[0255] To ensure coverage after compressed sampling of the source code, all function blocks with excessive deviations are combined with randomly sampled function blocks from categories A, B, C, and D to form the compressed sampling secret of BCN3D Moveo. The total size of the BCN3D Moveo source code is 1.1MB, and the compressed sampling code is 294KB, accounting for 26% of the source code. A zero-knowledge proof algorithm is then used to generate the corresponding zero-knowledge proof data for the compressed sampled source code, which is then uploaded to the blockchain. To reduce the size, generation, and verification time of the zero-knowledge proof, the source code can be packaged into a single transaction and stored on the blockchain. Figure 16 This is a time comparison diagram of the zero-knowledge proof data generated before and after source code compression, as shown in the figure below. Figure 16 As shown in the figure, in the case of 200 nodes, it can be seen that, while ensuring the coverage of the source code, the time it takes to generate zero-knowledge proof data from the compressed sampled source code is significantly reduced compared to the time it takes to generate zero-knowledge proof data from the uncompressed sampled source code.

[0256] Figure 17 This is a diagram showing the time comparison of verifying zero-knowledge proof before and after source code compression. Figure 17 As shown in the figure, in the case of 200 nodes, it can be seen that, while ensuring the coverage of the source code, the time for verifying the zero-knowledge proof data of the source code after compressed sampling is significantly reduced compared with the time for verifying the zero-knowledge proof data of the source code without compressed sampling.

[0257] In the disclosed embodiment, blockchain technology, zero-knowledge proof algorithm, identity resolution technology, artificial intelligence technology and industrial control system are combined, and the method can also be extended to other Internet of Things systems and even other industries in a similar way. A source code compression mechanism is designed based on the DBSCAN algorithm, which reduces the size of the secret by more than 50%. Combined with the designed source code proof arithmetic circuit, the security of the source code is further increased, and the backdoor in the zero-knowledge proof algorithm is protected based on the threshold secret sharing scheme Shamir secret sharing algorithm, which realizes the trusted defense of the backdoor under the premise of ensuring that one node is trustworthy. Here, the backdoor is the problem that the random parameters in the zero-knowledge proof algorithm may be leaked.

[0258] In addition, a "real-time code" and corresponding parsing system were designed based on blockchain and handle codes, achieving accurate identity and attribute identification of industrial control system components, breaking through the data barriers between the supply chain system and the industrial control system, and providing support for trusted detection from the source code.

[0259] The following are device embodiments of the present application. For details not described in detail in the device embodiments, reference may be made to the above method embodiments.

[0260] Figure 18 A schematic diagram of a structure of a trusted detection device for components of an industrial control system provided by an exemplary embodiment of the present disclosure is shown. Figure 18 As shown, the trusted detection device 1800 of the component of the industrial control system includes: an acquisition module 1801 , a parsing module 1802 , a trusted detection module 1803 and an update module 1804 .

[0261] Among them, the industrial control system includes seven links: production, procurement, development, assembly, deployment, operation and maintenance, and recycling. Each link includes multiple components, each component includes multiple sub-components, and each sub-component has a unique identification code.

[0262] The acquisition module 1801 is configured to acquire, after the previous stage of the first stage is completed, an identification code of a first subcomponent of a first component in the first stage, wherein the first stage is any one of the seven stages, and the first component is any one of the components in the first stage;

[0263] The parsing module 1802 is used to parse the identification code of the first subcomponent to obtain a first parsing result;

[0264] The trust detection module 1803 is used to perform a trust detection on the first subcomponent based on the first parsing result;

[0265] The update module 1804 is used to update the identification code of the first subcomponent after the first link is executed if the first subcomponent passes the trust test, and upload the updated identification code of the first subcomponent to the blockchain.

[0266] Optionally, when the first subcomponent includes source code, the first parsing result includes the logical supplier of the first subcomponent, and the trusted detection module 1803 is further used to obtain first zero-knowledge proof data from the blockchain based on the logical supplier of the first subcomponent, where the first zero-knowledge proof data is generated by the logical supplier compressing and sampling the source code of the first subcomponent and then performing a zero-knowledge proof operation on the compressed and sampled source code of the first subcomponent; based on the first zero-knowledge proof data, the first subcomponent is subjected to zero-knowledge proof verification to perform a trusted detection on the first subcomponent.

[0267] Optionally, the parsing module 1802 is also used to request the global Handle registry GHR to divide the identification code of the first subcomponent based on the identification code of the first subcomponent, and the division of the identification code of the first subcomponent is used to divide the suffix part of the identification code of the first subcomponent into thirteen levels; receive the identification code of the divided first subcomponent sent by GHR; based on the identification code of the divided first subcomponent, send a first parsing request to the local Handle service LHS, the first parsing request is used to request LHS to parse the identification code of the divided first subcomponent; receive the first parsing result sent by LHS.

[0268] It should be noted that when the trusted detection device for components of an industrial control system provided in the above embodiment performs trusted detection, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the trusted detection device for components of an industrial control system provided in the above embodiment and the trusted detection method embodiment for components of an industrial control system belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0269] The division of modules in the embodiments of the present disclosure is illustrative and represents only a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional modules in the various embodiments of the present disclosure may be integrated into a single processor, exist physically as separate modules, or be integrated into a single module. The integrated modules may be implemented in either hardware or software functional modules.

[0270] If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a terminal device (which can be a personal computer, mobile phone, or communication device, etc.) or a processor to execute all or part of the steps of the method of each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.

[0271] Figure 19 Schematic diagram of the structure of the computer device provided by the embodiment of the present disclosure. Figure 19 As shown, the computer device 1900 includes: a processor 1901 and a memory 1902 .

[0272] Processor 1901 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 1901 may be implemented in hardware using at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). Processor 1901 may also include a main processor and a coprocessor. The main processor is used to process data while awake, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data while in standby mode. In some embodiments, processor 1901 may be integrated with a Graphics Processing Unit (GPU), which is responsible for rendering and drawing content displayed on the display. In some embodiments, processor 1901 may also include an Artificial Intelligence (AI) processor for handling computational operations related to machine learning.

[0273] Memory 1902 may include one or more computer-readable storage media, which may be non-transitory. Memory 1902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1902 is used to store at least one instruction, which is executed by processor 1901 to implement the trusted detection method for components of an industrial control system provided in embodiments of the present disclosure.

[0274] Those skilled in the art will understand that Figure 19 The structure shown in the figure does not constitute a limitation on the computer device 1900, and the computer device 1900 may include more or fewer components than shown in the figure, or combine some components, or adopt a different component arrangement.

[0275] The embodiments of the present disclosure also provide a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor of a computer device, the computer device can execute the trusted detection method of components of an industrial control system provided in the embodiments of the present disclosure.

[0276] The embodiments of the present disclosure further provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the trusted detection method for components of an industrial control system provided in the embodiments of the present disclosure.

[0277] The above description is merely an optional embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.

Claims

1. A method for detecting the trustworthiness of components of an industrial control system, characterized in that: The industrial control system includes seven links: production, procurement, development, assembly, deployment, operation and maintenance, and recycling. Each link includes multiple components, each component includes multiple subcomponents, and each subcomponent has a unique identification code. The method includes: After the previous link of the first link is completed, the first link obtains the identification code of the first subcomponent of the first component, the first link is any link of the seven links, and the first component is any component of the first link; Parsing the identification code of the first subcomponent to obtain a first parsing result; Based on the first parsing result, performing a credibility check on the first subcomponent; If the first subcomponent passes the trustworthy test, the identification code of the first subcomponent is updated after the first step is completed, and the updated identification code of the first subcomponent is uploaded to the blockchain.

2. The method according to claim 1, characterized in that In a case where the first subcomponent includes source code, the first parsing result includes a logical supplier of the first subcomponent, and the performing trustworthy detection on the first subcomponent based on the first parsing result includes: Obtaining, based on the logic provider of the first subcomponent, first zero-knowledge proof data from the blockchain, where the first zero-knowledge proof data is generated by the logic provider performing a compressed sampling of the source code of the first subcomponent and then performing a zero-knowledge proof operation on the compressed and sampled source code of the first subcomponent; Based on the first zero-knowledge proof data, zero-knowledge proof verification is performed on the first subcomponent to perform a trustworthy detection on the first subcomponent.

3. The method according to claim 2, characterized in that The source code of the first subcomponent is composed of n function blocks, and the logic provider is used to implement compression sampling of the source code of the first subcomponent in the following manner: Determine the cyclomatic complexity, call frequency, and number of lines of code of each of the n function blocks, thereby constructing a first three-dimensional vector group; Clustering the first three-dimensional vector group using a DBSCAN algorithm to obtain a plurality of clusters; Based on the plurality of clusters, source code of the first subcomponent after compression sampling is determined.

4. The method according to claim 3, characterized in that The logic provider is used to use the Groth16 algorithm to implement a zero-knowledge proof operation on the source code of the first subcomponent after compression sampling.

5. The method according to claim 4, characterized in that In the process of using the Groth16 algorithm to implement zero-knowledge proof operation on the source code of the first sub-component after compression sampling, a trusted initialization step is included, and the trusted initialization step includes multiple random parameters. The logic supplier is also used to generate the multiple random parameters based on the multi-party secure computing MPC protocol and the threshold secret sharing scheme Shamir secret sharing algorithm.

6. The method according to any one of claims 1 to 5, characterized in that The identification code includes a prefix part and a suffix part, the prefix part is used to indicate three levels, which are national node, secondary node code and enterprise node respectively, and the suffix part is used to indicate thirteen levels, which are previous operation, previous index, current operation, current index, product unique identification, component unique identification, link, component type, component supplier certificate, data cache time, timestamp, detection log code and reference.

7. The method according to claim 6, characterized in that The parsing the identification code of the first subcomponent to obtain a first parsing result includes: Based on the identification code of the first subcomponent, request the global handle registry GHR to divide the identification code of the first subcomponent, wherein the dividing of the identification code of the first subcomponent is used to divide the suffix part of the identification code of the first subcomponent into the thirteen levels; receiving an identification code of the divided first subcomponent sent by the GHR; Based on the identification code of the first subcomponent after the division, a first parsing request is sent to the local Handle service LHS, where the first parsing request is used to request the LHS to parse the identification code of the first subcomponent after the division; Receive the first parsing result sent by the LHS.

8. A trustworthy detection device for components of an industrial control system, characterized in that: The industrial control system includes seven links: production, procurement, development, assembly, deployment, operation and maintenance, and recycling. Each link includes multiple components, each component includes multiple subcomponents, and each subcomponent has a unique identification code. The device includes: an acquisition module, configured to acquire, after the execution of the previous step of the first step, an identification code of a first subcomponent of a first component in the first step, wherein the first step is any one of the seven steps, and the first component is any one of the components in the first step; a parsing module, configured to parse the identification code of the first subcomponent to obtain a first parsing result; a trustworthy detection module, configured to perform a trustworthy detection on the first subcomponent based on the first parsing result; An update module is used to update the identification code of the first subcomponent after the first step is completed if the first subcomponent passes the trustworthy detection, and upload the updated identification code of the first subcomponent to the blockchain.

9. A computer device, characterized in that: The computer device includes: a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Grain and oil quality safety credible traceability method based on block chain and identifier analysis

    CN114386992A

  • Product tracing method and system based on industrial internet identification analysis technology

    CN114493627A