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

The method provides continuous trustworthiness assessment of industrial control system components by parsing identification codes and performing zero-knowledge proof verification across the entire life cycle, addressing single-link vulnerabilities and enhancing system security.

CN119128897AActive Publication Date: 2024-12-13WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing trusted detection methods for industrial control system components are inadequate as they only test components in a single link, failing to address potential security vulnerabilities introduced in subsequent links, leading to hidden dangers in the system.

Method used

A method and device for trusted detection that involves parsing the identification code of components across the entire life cycle, including zero-knowledge proof verification for components with source code, using blockchain to update identification codes after successful detection, and employing DBSCAN clustering and Groth16 algorithm for efficient proof operations.

Benefits of technology

Ensures continuous trustworthiness assessment of components throughout their life cycle, effectively preventing security issues by updating identification codes on the blockchain post-detection, thereby enhancing the security of industrial control systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128897A_ABST
    Figure CN119128897A_ABST
Patent Text Reader

Abstract

The invention discloses a credibility detection method, device and equipment for a component of an industrial control system and a storage medium, and belongs to the technical field of blockchains, the method comprises the following steps: after a previous link of a first link is executed, the first link obtains an identification code of a first sub-component of a first component; analyzing the identification code of the first sub-component to obtain a first analysis result; carrying out credible detection on the first sub-component based on the first analysis result; and if the first sub-component passes the credible detection, updating the identification code of the first sub-component after the execution of the first link is completed, and uploading the updated identification code of the first sub-component to the block chain. According to the method, credible detection can be carried out on the component in the whole life cycle of the component of the industrial control system.
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, device, equipment and storage medium for components of an industrial control system. Background Art

[0002] With the development of information technology, industrial control systems have shifted from traditional relatively closed electromechanical systems to interconnected digital systems. During the operation of industrial control systems, each component needs to undergo multiple trusted tests to ensure the security of the industrial control system.

[0003] The trusted detection methods of industrial control system components in related technologies are mostly single-link component detection, while the entire life cycle of industrial control system components from production to use has the characteristics of multiple links, multiple subjects, and multiple variables. If a component passes the trusted detection in a certain link, but is invaded in the subsequent link, there is a hidden danger in the industrial control system. Summary of the invention

[0004] The present disclosure provides a trusted detection method, device, equipment and storage medium for components of an industrial control system, which can perform trusted detection on components throughout the entire life cycle of the components of the industrial control system. The technical solution includes at least the following solutions: In a first aspect, a method for trusted 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 executed, the first link obtains the identification code of the first sub-component of the first component, the first link is any one of the seven links, and the first component is any one of the components 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 trusted detection on the first sub-component; if the first sub-component passes the trusted detection, updates the identification code of the first sub-component after the first link is executed, and uploads the updated identification code of the first sub-component to the blockchain.

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

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

[0007] Optionally, the logic supplier is used to use the Groth16 algorithm to implement a zero-knowledge proof operation on the source code of the first subcomponent after compression and sampling.

[0008] Optionally, in the process of implementing the zero-knowledge proof operation on the source code of the first subcomponent after compression sampling by using the Groth16 algorithm, a trusted initialization step is included, and the trusted initialization step includes a plurality of random parameters. The logic supplier is also used to generate the plurality of random parameters based on the multi-party secure computing MPC protocol and the threshold secret sharing scheme Shamir secret sharing algorithm. 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.

[0009] Optionally, parsing the identification code of the first subcomponent to obtain a first parsing result includes: 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.

[0010] In 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 subcomponent 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 one of the components in the first link; a parsing module, which is used to parse the identification code of the first subcomponent to obtain a first parsing result; a trusted detection module, which is used to perform a trusted detection on the first subcomponent based on the first parsing result; an update module, which is used to update the identification code of the first subcomponent after the first link is completed if the first subcomponent passes the trusted detection, and upload the updated identification code of the first subcomponent to the blockchain.

[0011] Optionally, in the case that 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, the first zero-knowledge proof data being generated by compressing and sampling the source code of the first subcomponent by the logical supplier, 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, the first subcomponent is subjected to zero-knowledge proof verification to perform a trusted detection on the first subcomponent.

[0012] 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 first subcomponent after division sent by the GHR; based on the identification code of the first subcomponent after division, send a first parsing request to the local Handle service LHS, the first parsing request is used to request the LHS to parse the identification code of the first subcomponent after division; receive the first parsing result sent by the LHS.

[0013] In a third aspect, a computer device is also provided, including: 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, thereby executing the trusted detection method of components of the industrial control system described in the above embodiment.

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

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

[0016] The beneficial effects brought by the technical solution provided by the embodiments of the present disclosure include at least: In the disclosed embodiment, 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 the first parsing result; based on the first parsing result, the first subcomponent is tested for trustworthiness; if the first subcomponent passes the trusted 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 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

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 paying any creative work.

[0018] Figure 1 It is a schematic diagram of an application scenario of a trusted detection method for components of an industrial control system; Figure 2 A flowchart of a trusted detection method for a component of an industrial control system provided by an exemplary embodiment of the present disclosure is shown; Figure 3 A flowchart of a trusted detection method for a component of an industrial control system provided by another exemplary embodiment of the present disclosure is shown; Figure 4 is a schematic diagram of the structure of the identification code; Figure 5 A flowchart of the entire life cycle of an identification code; Figure 6 A schematic diagram of the identification code operation; Figure 7 is a flowchart of the identification code parsing process; Figure 8 A flowchart for performing zero-knowledge proof verification on the first subcomponent; Fig. 9 It is a logical flow chart of the BC-ICS model; Fig.10 Schematic diagram of the parsing speed of the identification code; Fig.11 Schematic diagram of the time consumption for generating random parameters for multiple parties; Fig.12 A schematic diagram of the time for generating zero-knowledge proof data of an industrial control system and the time for verifying zero-knowledge proof data when the block height is the same; Fig.13 This is a schematic diagram of the size of zero-knowledge proof data; Fig.14 A schematic diagram of the time for generating zero-knowledge proof data of an industrial control system and the time for verifying zero-knowledge proof data when the number of transactions stored in a block is the same; Fig.15 This is a schematic diagram of DBSCAN clustering; Fig.16 This is a schematic diagram of the time comparison of zero-knowledge proof data generated before and after source code compression; Fig.17 This is a diagram showing the time comparison of verifying zero-knowledge proofs before and after source code compression; Fig.18A schematic diagram of the structure of a trusted detection device for a component of an industrial control system provided by an exemplary embodiment of the present disclosure is shown; Fig.19 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] Unless otherwise defined, the technical or scientific terms used herein shall have the usual meanings understood by persons of ordinary skill in the field to which the present disclosure belongs. The words "first", "second", "third" and similar words 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 "one" do not indicate a quantitative limitation, but rather indicate the presence of at least one. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before "include" or "comprise" cover the elements or objects listed after "include" or "comprise" and their equivalents, and do not exclude other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0020] 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.

[0021] Figure 1 It is a schematic diagram of the application scenario of the trusted detection method of components of industrial control systems. Figure 1 As shown in the figure, there are six types of components in the industrial control system: 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.

[0022] Industrial control systems include seven links: production, procurement, development, assembly, deployment, operation and maintenance, and recycling. Among them, the development link can be divided into the design sub-link, coding sub-link, and testing sub-link that are executed in sequence; the assembly link can be divided into the configuration sub-link and deployment sub-link that are executed in sequence; the deployment link can be divided into the installation sub-link and debugging sub-link that are executed in sequence; the operation and maintenance link can be divided into the audit sub-link, update sub-link, and replacement sub-link that are executed in sequence.

[0023] 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.

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

[0025]

[0026] As shown in Table 1, the detection object of each type of component is the subcomponent. It can be seen that the hardware components include subcomponents such as controllers, sensors, actuators, and HMI (Human Machine Interface) devices; software components include programming software, human-computer interaction software, data acquisition and communication software, fault diagnosis and alarm software, and other subcomponents; 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, CNC machine tool systems, and other subcomponents; network components include routers, industrial switches, industrial firewalls, and other subcomponents; communication components include industrial communication protocols, serial communication ports, Wi-Fi, Bluetooth, Zigbee (Purple Bee Protocol), and other wireless communication related subcomponents; firmware components include PLC (Programmable Logic Controller) firmware, SCADA firmware, HMI firmware, IOT (the Internet of Things) firmware, and other subcomponents.

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

[0028] Figure 2A flowchart of a trusted detection method for a component 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: In step 201, after the previous stage of the first stage is completed, the first stage obtains the identification code of the first subcomponent of the first component.

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

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

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

[0032] In step 204, if the first subcomponent passes the trustworthy detection, the identification code of the first subcomponent is updated after the first stage is executed, and the updated identification code of the first subcomponent is uploaded to the blockchain.

[0033] In the disclosed embodiment, 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 the first parsing result; based on the first parsing result, the first subcomponent is tested for trustworthiness; if the first subcomponent passes the trusted 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 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.

[0034] The components of the industrial control system will be delivered by the component supplier or the logic designer at different stages of the operation of the industrial control system. In chronological order, the hardware components are delivered in the production stage, and the hardware components will be updated after the production stage is completed; the firmware components, communication components and network components will be delivered in the procurement stage, and the firmware components, communication components and network components will be updated after the procurement stage is completed; the system components and software components will be delivered in the development stage, and the development stage also involves the hardware components updated in the production stage and the communication components and firmware components updated in the procurement stage, and the hardware components, communication components, software components, system components and firmware components will be updated after the development stage is completed; at this time, the six types of components have been delivered, and the updated components will be used later. The assembly stage will use the hardware components, communication components, software components, firmware components updated in the development stage, and the network components updated in the procurement stage, and the hardware components, communication components, software components, network components and firmware components will be updated after the assembly stage is completed. The deployment phase will use the communication components, software components, network components, firmware components updated in the assembly phase, and the system components updated in the development phase. After the deployment phase is completed, the system components, communication components, software components, network components, and firmware components will also be updated. The operation and maintenance phase will use the system components, communication components, software components, network components, firmware components updated in the deployment phase, and the hardware components updated in the assembly phase. After the operation and maintenance phase is completed, the hardware components, system components, communication components, software components, network components, and firmware components will also be updated. The recycling phase will use the software components updated in the operation and maintenance phase.

[0035] 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.

[0036] 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.

[0037] Figure 3 A flowchart of a trusted detection method for a component of an industrial control system provided by another exemplary embodiment of the present disclosure is shown. The method can be executed by a computer device. Figure 3 , the method includes In step 301, component suppliers, logic designers, users and regulators register on the chain.

[0038] Here, registering on the chain means that different participants register on the blockchain. Component suppliers and logic designers are used to deliver multiple components; users, that is, consumers, are used to perform trustworthy detection on the components received after the components of the industrial control system are finally delivered to the user, and to periodically make optional detection requests to ensure the security of the components obtained by the user. Regulatory agencies are used to supervise the entire blockchain system.

[0039] 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.

[0040] Among them, the component supplier is used to deliver components without source code and the non-source code part of components with source code, that is, the hardware part; the logic designer is used to deliver the source code part of components with source code, and after the source code is delivered, the source code is encrypted and stored in the blockchain.

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

[0042] 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.

[0043] 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.

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

[0045] 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.

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

[0047] The suffix part includes the preceding 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 There are thirteen levels in total, including data cache time TTL, timestamp T, detection log code Log and reference Ct.

[0048] Table 2 is an example of different levels of the suffix part of the identification code and a table of functions.

[0049]

[0050] For the identification code of a certain 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 The entire life cycle of the identification code is explained.

[0051] Figure 5 Part (a) of the diagram is a flowchart of the creation phase, as shown in 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: In the first step, the Client sends a prefix registration request for the component to the GHR.

[0052] 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.

[0053] 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.

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

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

[0056] Step 6. 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.

[0057] The Client in the creation phase can be any enterprise included in the link that receives the delivered components. For example, in the production link, the production link receives the delivered hardware components. At this time, the production link needs to register the identification code of the hardware components, so at this time, the production link (the included enterprise) can be the Client.

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

[0059] Optionally, after the postfix 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.

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

[0061] Identification code resolution is to resolve the information contained in the identification code. When the component needs to be tested for trustworthiness in a certain link of the subsequent industrial control system, the component can be tested for trustworthiness through the information resolved from the identification code of the component.

[0062] 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.

[0063] 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.

[0064] Figure 6 A schematic diagram of the 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.

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

[0066] Figure 6 Part (c) of Figure 6 Based on part (b) of the preceding operation, 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) of 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.

[0067] The essence of the add operation is to add a new data at another address. This new data did not exist originally. For example, there was no data at address A originally, and 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, there was data 1 at address A originally, and the modify operation is used to change the 1 at address A to 2 or other data, and so on.

[0068] Figure 6 Part (d) indicates that Figure 6 Based on part (c) of the above, the identification code is deleted. The current index Indexcur is 4, which indicates a deletion operation, that is, the data in the identification code is stored in the blockchain in an encrypted and hidden manner. 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.

[0069] The data in the blockchain cannot be modified. In the disclosed embodiment, the deletion operation can be implemented on the blockchain by encrypting and hiding.

[0070] 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.

[0071] When obtaining the identification code of the first subcomponent, the prefix of the identification code of the first subcomponent needs to be applied to the parent level of the first subcomponent. The parent level here is the previous link that used the first subcomponent. For example, the first subcomponent is a subcomponent of the 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.

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

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

[0074] 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. There are many related technologies for the implementation of smart contracts, and detailed description is omitted here.

[0075] Figure 7 is a flowchart of the identification code parsing process, such as Figure 7 As shown, step 304 includes the following steps ad: Step a: based on the identification code of the first subcomponent, request the GHR to divide the identification code of the first subcomponent.

[0076] Dividing 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. Here, the suffix of the identification code of the first subcomponent obtained in step 303 is a string of continuous characters, and there is no level separator in the middle. If the continuous characters are sent directly to LHS, LHS cannot be parsed. 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 LHS.

[0077] 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.

[0078] After GHR divides the suffix part of the identification code of the first subcomponent, it can send the divided identification code of the first subcomponent to the Client.

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

[0080] 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.

[0081] Optionally, after receiving the first parsing request, the LHS is used to obtain the first parsing result using the following six steps.

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

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

[0084] In the second step, the smart contract retrieves the world state database and obtains the current index of the identification code. cur .

[0085] If the current index of the identifier is cur If it is not a new creation flag or a deletion 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 creation flag or a deletion 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.

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

[0087] 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.

[0088] When implementing the fourth step, data of the identification code matching the predecessor index may be retrieved from the address indicated by the predecessor operation.

[0089] 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.

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

[0091] 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.

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

[0093] Step d, receiving the first parsing result sent by LHS.

[0094] 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.

[0095] 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.

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

[0097] Optionally, when the first subcomponent does not include source code, step 305 includes: verifying whether information such as 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, and the timestamp of the first subcomponent are accurate; when the above information of the first subcomponent is accurate, it means that the first subcomponent has passed the trusted test; when at least one of the above information of the first subcomponent is inaccurate, it means that the first subcomponent has failed the trusted test.

[0098] 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 verifying the zero-knowledge proof of the first subcomponent. Figure 8 Steps e to f are explained.

[0099] Step e: based on the logical supplier of the first subcomponent, obtain the first zero-knowledge proof data from the blockchain.

[0100] The first zero-knowledge proof data is generated by the logic 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. The zero-knowledge proof data of different subcomponents are different.

[0101] In the embodiment of the present disclosure, the source code of the first subcomponent is composed of n function blocks, and the source code of the first subcomponent can be expressed by formula (1).

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

[0103] In this case, the logic provider is used to compress and sample the source code of the first subcomponent in three steps: The first step is to determine the cyclomatic complexity, calling frequency, and number of lines of code of each function block in the n function blocks, thereby constructing the first three-dimensional vector group.

[0104] 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.

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

[0106] (2) 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.

[0107] Cyclomatic complexity, also known as conditional complexity, is a measure of code complexity. Cyclomatic complexity covers all possible situations with the least number of test cases used. The number is expressed as the number of independent linear paths in the function control flow graph of the function block. The higher the cyclomatic complexity, the more complex the function block. There are many related technologies for implementing the function control flow graph of the function block, so we will not elaborate on it here.

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

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

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

[0111] Formula (3) is the calculation method for cyclomatic complexity using the point-edge calculation method, and formula (4) is the calculation method for cyclomatic complexity using the node determination method. In 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.

[0112] 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.

[0113] The cyclomatic complexity of each function block can be calculated by using the above formulas (1) and (2). The calling frequency and number of lines of code of each function block can be directly obtained by querying the running log of the function block, which is omitted here.

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

[0115] The DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm is a density-based unsupervised clustering algorithm that can automatically discover clusters of different sizes and shapes, and can effectively identify and process noise and isolated points. In addition, DBSCAN does not require the number of clusters to be specified in advance, but automatically determines the shape and number of clusters based on the density of data points. It does not restrict the shape of clusters, can discover clusters of any shape, and mark noise points and isolated points as noise or boundary points.

[0116] The DBSCAN algorithm needs to set an appropriate domain 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.

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

[0118] (5) 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.

[0119] When determining the cluster corresponding to each core object, for the mth core object , from the core object Start to expand outward, that is, store the density of the point directly to the set 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).

[0120] (6) In formula (6), That is, the collection , , … Represents core objects The meanings of the first density direct point, the second density direct point, and so on, the mth density direct point are not the same as those in formula (2).

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

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

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

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

[0125] The third step is to determine the source code of the first subcomponent after compression sampling based on the multiple clusters.

[0126] 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.

[0127] 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.

[0128] 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 computing efficiency can be improved.

[0129] Optionally, the logic supplier is used to use the Groth16 algorithm to implement a zero-knowledge proof operation on the source code of the first subcomponent after compression and sampling, thereby generating first zero-knowledge proof data.

[0130] 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.

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

[0132] Optionally, source code to prove arithmetic circuits The structure of is shown in the following algorithm: Input: / / Enter secret ; / / Generate a new arithmetic circuit; / / The secret Hashes processed with SHA-256; / / Hash the secret Convert to binary encoding to create public parameters

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

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

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

[0136] In addition, 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.

[0137] 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.

[0138] There are many related technologies on how to convert the source code proof arithmetic circuit into the R1CS problem and then convert the R1CS problem into the QAP problem, so detailed description is omitted here.

[0139] Optionally, multiple random parameters are generated through the MPC protocol, including: First, generate the group , , and the corresponding generator , , and based on group , Generate the group of bilinear maps Among them, the mapping Defined as .

[0140] 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, the MPC protocol is used to jointly generate relevant random numbers by combining blockchain nodes. The Shamir secret sharing algorithm based on the threshold secret sharing scheme is used in the disclosed embodiment to ensure the security of random parameters, and it can be achieved that as long as one node is honest, the security of random parameters can be guaranteed.

[0141] With random parameters For example, in the Shamir secret sharing algorithm, It is a secret maintained by multiple parties. The maintenance node 1 first selects a greater than 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).

[0142] (8) 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 .

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

[0144] (9) 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).

[0145] (10) 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 are not described in detail here.

[0146] Due to Shamir’s additivity, we add up all the secret shards owned by each maintenance node. for The sub-secret of all maintenance nodes. That is .

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

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

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

[0150] The random parameter The recovery of is shown in formula (12).

[0151] (12) This ensures that only one node is required to be honest and not provide the secret slice it owns or the random number it contributes. , which ensures that the random parameters security.

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

[0153] In the embodiments of the present disclosure, random parameters are generated in the above manner, thereby ensuring the security of the trusted detection process and reducing the possibility of data loss, forgery, and tampering during the trusted detection process.

[0154] Public reference string generated by the MPC protocol and simulated trapdoor ,in For elliptic curve The elements on For elliptic curve The elements on.

[0155] Optionally, the formula (13) to (14) is used to calculate and .

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

[0157] 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.

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

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

[0160] (16) (17) (18) In formula (16) to formula (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.

[0161] 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 subcomponent, it can obtain the first zero-knowledge proof data from the blockchain through the name of the logic supplier of the first subcomponent to facilitate zero-knowledge proof verification of the first subcomponent.

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

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

[0164] (19) 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.

[0165] 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.

[0166] When the proof is verified, because the source code is on the blockchain, the authenticity is guaranteed, which means that the source code of the first subcomponent has passed the trustworthy test. At this time, the test results and test records need to be uploaded to the blockchain. After the first link is completed, the identification code of the first subcomponent will be updated. In this way, the trustworthy detection of industrial control system components is realized, the difficulty of source code detection is reduced, and the completeness of industrial control system component detection is improved.

[0167] 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.

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

[0169] 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 the verification, it means that the first subcomponent fails the trustworthy detection.

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

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

[0172] If the first subcomponent is credible, 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 the updated identification code of the first subcomponent can be uploaded to the blockchain.

[0173] For subcomponents other than the first subcomponent involved in the entire industrial control system, the above steps 301 to 306 may also be used to perform trustworthy detection.

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

[0175] Fig. 9 It is a logical flow chart of the BC-ICS model, as shown in Fig. 9 As shown, the logic flow of the BC-ICS model includes the following steps S1 to S6.

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

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

[0178] Step S3, obtaining an identification code (updating the identification code).

[0179] Step S4, identification code analysis.

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

[0181] Step S6, generate a test report and upload it to the blockchain.

[0182] Among them, step S1 and step S2 correspond to the contents in 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.

[0183] 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.

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

[0185] 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.

[0186] Fig.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, Fig.11As shown in the figure, the multi-party generation of random parameters is at the 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.

[0187] Fig.12 This is a schematic diagram of the time to generate zero-knowledge proof data and the time to verify zero-knowledge proof data for industrial control systems when the block height is the same.

[0188] When the height of each block is 50, the blockchain contains 20 nodes, the source code size is a million-byte industrial control system component, and each time consumption is generated under the average of 50 operations, when the amount of data is different, the time diagram of the generation time of zero-knowledge proof data and the time diagram of the verification of zero-knowledge proof data under different transaction numbers in each block is analyzed. The analysis results are as follows: Fig.12 shown.

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

[0190] It can be seen that as the number of transactions in each block increases, the time to generate zero-knowledge proof data and the time to verify zero-knowledge proof data also gradually increase. This is because each transaction in the Groth16 algorithm needs to generate a zero-knowledge proof separately, which leads to an increase in time consumption. In addition, with a data volume of millions of bytes, the time consumption is in milliseconds, which meets the time requirements for industrial control system component detection while ensuring the private ownership and privacy of the source code of industrial control system components.

[0191] Fig.13 Figure 1 is a schematic diagram of 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 each time consumption is generated under the average of 50 operations. Fig.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.

[0192] 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.

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

[0194] (20) 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.

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

[0196] Fig.14 Schematic diagram of the time to generate zero-knowledge proof data and the time to verify zero-knowledge proof data for industrial control systems when the number of transactions stored in a block is the same.

[0197] In the case of storing 50 transactions in each block, the blockchain contains 20 nodes, the source code size is a million-byte industrial control system component, and each time consumption is generated under the average of 50 operations. When the amount of data is different, the generation time of zero-knowledge proof data and the time diagram of verifying zero-knowledge proof data at different heights of each block are analyzed. The analysis results are as follows: Fig.14 shown.

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

[0199] Since the size of the proof is verified to be related to the number of transactions in each block, no simulation verification is performed. It can be seen that the time to generate zero-knowledge proof data and the time to verify zero-knowledge proof data increase with the increase of block height. Under the data volume of millions of bytes, the time consumption is in milliseconds, which meets the needs of industry.

[0200] Fig.15 This is a schematic diagram of DBSCAN clustering. Fig.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. Fig.15As shown, we finally get four categories: A, B, C and D, as well as one category with excessive data deviation.

[0201] In order to ensure the coverage rate of the source code after compression sampling, all function blocks with excessive deviations and randomly sampled function blocks in categories A, B, C, and D together form the compressed sampling secret of BCN3D Moveo. The total size of the BCN3D Moveo source code is 1.1MB, and the code after compression sampling is 294KB, which is 26% of the source code. Then, the zero-knowledge proof algorithm is used to generate the corresponding zero-knowledge proof data for the compressed source code and upload it to the blockchain. Here, in order to reduce the size, generation time, and verification time of the zero-knowledge proof, the source code can be packaged into a transaction and then stored in the blockchain. Fig.16 This is a time comparison diagram of the zero-knowledge proof data generated before and after source code compression. Fig.16 As shown, 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 source code after compressed sampling is significantly reduced compared to the time it takes to generate zero-knowledge proof data from the source code without compressed sampling.

[0202] Fig.17 This is a schematic diagram of the time comparison of verifying zero-knowledge proof before and after source code compression. Fig.17 As shown, 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 with the source code after compressed sampling is significantly reduced compared with the time for verifying the zero-knowledge proof data with the source code that has not been compressed and sampled.

[0203] 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 while ensuring that one node is trusted. Here, the backdoor is also the problem of possible leakage of random parameters in the zero-knowledge proof algorithm.

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

[0205] 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.

[0206] Fig.18 A schematic diagram of the structure of a trusted detection device for components of an industrial control system provided by an exemplary embodiment of the present disclosure is shown. Fig.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 .

[0207] Among them, 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.

[0208] The acquisition module 1801 is used for acquiring the identification code of the first subcomponent of the first component in the first link after the previous link of the first link is completed, the first link is any link of the seven links, and the first component is any component in the first link; The parsing module 1802 is used to parse the identification code of the first subcomponent to obtain a first parsing result; The trust detection module 1803 is used to perform a trust detection on the first subcomponent based on the first parsing result; 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 trustworthy detection, and upload the updated identification code of the first subcomponent to the blockchain.

[0209] 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 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, 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, the first subcomponent is subjected to zero-knowledge proof verification to perform a trusted detection on the first subcomponent.

[0210] 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.

[0211] It should be noted that: when the trusted detection device for components of the 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 the industrial control system provided in the above embodiment and the trusted detection method embodiment of components of the industrial control system belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0212] The division of modules in the embodiments of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present disclosure may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0213] If the integrated module is implemented in the form of a software function 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 is essentially 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, including several instructions to enable a terminal device (which can be a personal computer, mobile phone, or communication device, etc.) or a processor (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, etc., various media that can store program codes.

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

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

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

[0217] Those skilled in the art will understand that Fig.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 less components than shown in the figure, or combine some components, or adopt a different arrangement of components.

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

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

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

Claims

1. A trusted detection method 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 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 trustworthy detection on the first subcomponent; If the first subcomponent passes the trustworthy detection, the identification code of the first subcomponent is updated after the first link is executed, 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 the case where the first subcomponent includes source code, the first parsing result includes a logic supplier of the first subcomponent, and the performing trustworthy detection on the first subcomponent based on the first parsing result includes: Based on the logic supplier of the first subcomponent, first zero-knowledge proof data is obtained from the blockchain, where the first zero-knowledge proof data is generated by the logic 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, 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 supplier is used to implement compression sampling of the source code of the first subcomponent in the following manner: Determine the cyclomatic complexity, calling frequency, and number of code lines 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 supplier 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 analysis result sent by the LHS.

8. A trusted 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 link of the first link is completed, the first link acquiring an identification code of a first subcomponent of a first component, wherein the first link is any link of the seven links, and the first component is any component of the first link; A parsing module, used for parsing 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 link is executed if the first subcomponent passes the trusted detection, and upload the updated identification code of the first subcomponent to the blockchain.

9. A computer device, characterized in that: The computer device comprises: 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