Equipment information maintenance method and device and electronic equipment

By traversing the hardware identifiers and device serial numbers of the industrial control system to check for duplicates, virtual and physical devices can be identified, solving the problem of incomplete information collection in the industrial control system and realizing efficient management and accurate maintenance of device information.

CN120996776APending Publication Date: 2025-11-21SIEMENS FACTORY AUTOMATION ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511037232.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing equipment information maintenance solutions for industrial control systems cannot effectively distinguish the control system to which the equipment belongs, resulting in incomplete information collection, low maintenance efficiency, and an inability to distinguish between virtual and physical equipment, which easily leads to duplicate and erroneous information entry.

Method used

By traversing the hardware identifiers of the industrial control system and combining them with the device serial numbers in the device database for deduplication, virtual and physical devices are identified, and the information is uniquely stored in the device database. Pre-defined numbering principles and error code handling are adopted to ensure the accuracy and completeness of the information.

Benefits of technology

It enables comprehensive maintenance of hardware equipment information in industrial control systems, avoids duplicate entry, ensures the uniqueness and integrity of the equipment database, improves the accuracy and efficiency of maintenance, and supports detailed parameter management of PLC systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996776A_ABST
    Figure CN120996776A_ABST
Patent Text Reader

Abstract

The invention provides an equipment information maintenance method and device and electronic equipment, and the method comprises the steps: traversing all hardware identifiers of an industrial control system, querying the information of hardware equipment associated with each hardware identifier, obtaining the serial number of each equipment associated with each hardware identifier, and storing the serial number of each equipment in the industrial control system; and through traversing all equipment serial numbers in an equipment database of the industrial control system, performing duplicate checking processing on each piece of hardware equipment information of the industrial control system so as to perform maintenance operation on the hardware equipment information stored in the equipment database. Therefore, automatic identification and de-duplication processing of the hardware equipment information in the industrial control system can be realized, and the equipment information management efficiency of the industrial control system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial control, and in particular to a device information maintenance method and device and electronic equipment. BACKGROUND

[0002] In the field of industrial automation, an industrial control system (such as a PLC system) usually contains a large number of hardware devices, which are the core basis for stable operation of the industrial control system. Therefore, device information maintenance for these hardware devices is an important part of device lifecycle management, which can ensure that the enterprise has a comprehensive grasp of the operation status of the industrial control system, thereby improving production efficiency and device operation reliability. However, as the complexity of the industrial control system increases, the number and types of hardware devices continue to increase, and there may also be virtual hardware devices (used for logical simulation or testing) in the industrial control system, which makes the hardware device information maintenance work for the industrial control system face many challenges.

[0003] Currently, the device information maintenance scheme for the industrial control system is mainly realized by manual recording or by using tool software (such as PRONETA) to scan the entire fieldbus system to retrieve information of all devices or modules in the bus. Among them, the device information collected by the manual recording method is less and has a high error rate; the tool software can only collect information of Ethernet devices (i.e., devices that access the Ethernet to perform data transmission) in the industrial control system, resulting in that a large number of non-Ethernet device information in the industrial control system cannot be collected. In addition, the above two schemes cannot effectively distinguish the control system to which the device belongs, which is not convenient for later maintenance and management.

[0004] Therefore, there is a need for a device information maintenance scheme suitable for the industrial control system to overcome the above technical problems. SUMMARY

[0005] Therefore, the present application aims to provide a device information maintenance scheme to solve the problems of repeated information input, confusion between virtual and real devices, and low maintenance efficiency in the device information maintenance of the existing industrial control system.

[0006] According to a first aspect of an embodiment of the present application, a device information maintenance method is provided, applied to an industrial control system, and the method comprises:

[0007] From the hardware identifiers of the industrial control system, a hardware identifier is sequentially obtained as a current hardware identifier, hardware device information associated with the current hardware identifier is queried, and the hardware device information includes a device serial number associated with the current hardware identifier; all device serial numbers in a device database of the industrial control system are traversed, if the device database does not exist a device serial number associated with the current hardware identifier, the hardware device information of the current hardware identifier is written into the device database, if the device database already exists a device serial number associated with the current hardware identifier, the current hardware identifier is discarded; the step of sequentially obtaining a hardware identifier from the hardware identifiers of the industrial control system as a current hardware identifier is returned until all hardware identifiers are traversed.

[0008] In some embodiments, the hardware identifiers of the industrial control system are automatically assigned by the industrial control system, and a same device serial number is associated with at least one hardware identifier, for identifying an entity hardware device or a virtual hardware device in the industrial control system.

[0009] In some embodiments, the hardware device information associated with the current hardware identifier includes a physical installation position and device identification and maintenance data; according to the current hardware identifier, a physical installation position lookup operation and a device identification and maintenance data reading operation can be performed to obtain a reading success return result or a reading error return result; in response to the reading success return result, the hardware device information associated with the current hardware identifier is obtained; or in response to the reading error return result, a reading error code of the reading error return result is identified, and if the reading error code falls into a data invalid code category, the step of sequentially obtaining a hardware identifier from the hardware identifiers of the industrial control system as a current hardware identifier is returned; wherein if the reading error code falls into the data invalid code category, it indicates that the current hardware identifier points to a virtual hardware device or an invalid hardware device in the industrial control system.

[0010] In some embodiments, the method further comprises if the reading error code does not fall into the data invalid code category, ending the device information maintenance processing flow.

[0011] In some embodiments, after obtaining the hardware device information associated with the current hardware identifier, it is determined whether the device serial number associated with the current hardware identifier satisfies a preset numbering principle. If yes, the step of traversing all device serial numbers in the device database of the industrial control system is performed. If no, the step of sequentially obtaining a hardware identifier from the hardware identifiers of the industrial control system as the current hardware identifier is performed. The preset numbering principle is used to identify whether the device serial number points to an entity hardware device in the industrial control system.

[0012] In some embodiments, the industrial control system comprises a PLC system, and the hardware device information further comprises a manufacturer identification number, an order number, a hardware firmware version, and a physical installation location.

[0013] In some embodiments, after all hardware identifiers are traversed, each hardware identifier in the device database and the hardware device information associated with each hardware identifier are written into the device maintenance table in a specified format of the device maintenance table of the industrial control system.

[0014] In some embodiments, the determination that all hardware identifiers are traversed is obtained by the following way:

[0015] A maximum traversal value of the industrial control system is determined. The value of the current hardware identifier is compared with the maximum traversal value. If the value of the current hardware identifier is not less than the maximum traversal value, the determination that all hardware identifiers are traversed is obtained. The maximum traversal value is determined based on the total number of all entity hardware devices in the industrial control system.

[0016] According to a second aspect of the embodiments of the present application, a device information maintenance apparatus applied to an industrial control system is provided, which comprises: a data acquisition module configured to sequentially obtain a hardware identifier from the hardware identifiers of the industrial control system as a current hardware identifier, query hardware device information associated with the current hardware identifier, and the hardware device information comprises a device serial number associated with the current hardware identifier; a data maintenance module configured to traverse all device serial numbers in a device database of the industrial control system, write the hardware device information of the current hardware identifier into the device database if the device database does not exist a device serial number associated with the current hardware identifier, and discard the current hardware identifier if the device database already exists a device serial number associated with the current hardware identifier; and a loop analysis module configured to send a data maintenance instruction to the data acquisition module to make the data acquisition module perform a device information maintenance operation of a next hardware identifier until all hardware identifiers are traversed, under the condition that all hardware identifiers of the industrial control system have not been traversed.

[0017] According to a third aspect of embodiments of the present application, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, the processor, the communication interface and the memory are capable of communicating with each other through the communication bus; the memory is configured to store at least one executable instruction, the executable instruction causes the processor to perform operations corresponding to the device information maintenance method of the first aspect.

[0018] According to a fourth aspect of embodiments of the present application, a computer readable storage medium is provided, the computer readable storage medium stores computer instructions, the computer instructions cause the processor to execute the device information maintenance method of the first aspect when executed by the processor.

[0019] According to a fifth aspect of embodiments of the present application, a computer program product is provided, comprising computer instructions, the computer instructions instruct the computing device to perform operations corresponding to the device information maintenance method of the first aspect.

[0020] The device information maintenance scheme provided by the aspects of the present application realizes comprehensive maintenance of the hardware device information in the industrial control system by sequentially traversing all hardware identifiers of the industrial control system and combining the duplicate checking mechanism of the device serial numbers in the device database, avoids duplicate entry of the device information, ensures the uniqueness and integrity of the hardware device information in the device database, and can realize efficient management and accurate control of the device information without increasing additional hardware costs.

[0021] The device information maintenance scheme provided by the aspects of the present application can provide basic association logic for subsequent data duplicate checking and device information maintenance processing by explicitly associating the device serial number, the hardware identifier and each hardware device in the industrial control system.

[0022] The device information maintenance scheme provided by the aspects of the present application can refine the query return result of the hardware device information, and when the read error return result is obtained, further identify the read error code to realize automatic filtering of the virtual hardware device or the invalid hardware device in the industrial control system, avoid including the virtual hardware device information or the invalid hardware device information in the maintenance process, and improve the accuracy of the device information maintenance.

[0023] The device information maintenance scheme provided by the aspects of the present application ends the device information maintenance processing flow in the case that the read error code belongs to the non-data invalid code category, so as to avoid affecting the stability of the maintenance processing flow due to insufficient hardware resources.

[0024] The device information maintenance scheme provided by various aspects of the present application checks the device serial number according to a preset numbering principle, so as to exclude the hardware device information pointing to the virtual hardware device in the industrial control system from being written into the device database, and improve the effectiveness of the database information.

[0025] The device information maintenance scheme provided by various aspects of the present application can meet the management and maintenance requirements of the PLC system for the detailed parameters of the hardware device, and has comprehensive device retrieval capability, which can ensure the integrity of the device information in the industrial control system whether the PLC is the PLC body or a distributed site.

[0026] The device information maintenance scheme provided by various aspects of the present application can export the maintenance data in the device database according to a specified format after completing the data maintenance operation of the device database, so as to facilitate the subsequent management, query, statistics, repair and other operations of the device, and improve the flexibility of data processing.

[0027] The device information maintenance scheme provided by various aspects of the present application configures the maximum traversal value of the industrial control system, and ends the maintenance operation of the device information when it is judged that the value of the current hardware identifier is not less than the maximum traversal value, so as to avoid occupying too much CPU resource when traversing the hardware identifier, causing the control program to have a jitter phenomenon, and further interfering with the normal production activities of the industrial control system. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 The processing flowchart of the device information maintenance method of the exemplary embodiment of the present application.

[0029] Figure 2 The processing flowchart of the device information maintenance method of another exemplary embodiment of the present application.

[0030] Figure 3 The processing flowchart of the device information maintenance device of the exemplary embodiment of the present application.

[0031] Figure 4 The schematic diagram of the electronic device of the exemplary embodiment of the present application.

[0032] LIST OF REFERENCE NUMERALS

[0033] 100, device information maintenance method

[0034] 102, sequentially obtaining a hardware identifier from the hardware identifiers of the industrial control system as a current hardware identifier, and querying the hardware device information associated with the current hardware identifier.

[0035] 104. traversing all device serial numbers in the device database of the industrial control system, if there is no device serial number associated with the current hardware identifier in the device database, writing the hardware device information of the current hardware identifier into the device database, if there is already a device serial number associated with the current hardware identifier in the device database, discarding the current hardware identifier.

[0036] 106. judging whether all hardware identifiers are traversed, if not, returning to step 102, otherwise, executing step 108.

[0037] 108. obtaining the device maintenance data of the industrial control system.

[0038] 200. device information maintenance method

[0039] 202. obtaining all hardware identifiers of the industrial control system by querying the logical addresses of all devices of the industrial control system.

[0040] 204. sequentially obtaining a hardware identifier from all hardware identifiers of the industrial control system as a current hardware identifier, and querying the hardware device information associated with the current hardware identifier.

[0041] 206. judging whether the hardware device information associated with the current hardware identifier is successfully obtained, if yes, proceeding to step 208, if not, proceeding to step 216.

[0042] 208. judging whether the device serial number associated with the current hardware identifier meets the preset numbering principle, if yes, proceeding to step 210, if not, proceeding to step 212.

[0043] 210. traversing all device serial numbers in the device database of the industrial control system, if there is no device serial number associated with the current hardware identifier in the device database, writing the hardware device information of the current hardware identifier into the device database, if there is already a device serial number associated with the current hardware identifier in the device database, discarding the current hardware identifier.

[0044] 212. judging whether all hardware identifiers are traversed, if yes, proceeding to step 214, if not, returning to step 204.

[0045] 214. obtaining the device maintenance data of the industrial control system.

[0046] 216. judging whether the read error code of the read error return result falls into the data invalid code category, if yes, proceeding to step 212, if not, executing step 218.

[0047] 218. ending the device information maintenance process.

[0048] 300. device information maintenance apparatus 402. processor

[0049] 302, data acquisition module 404, communication interface

[0050] 304, data maintenance module 406, memory

[0051] 306, cycle analysis module 408, communication bus

[0052] 400, electronic device 410, program DETAILED DESCRIPTION

[0053] In order for those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those skilled in the art should belong to the scope of protection of the embodiments of the present application.

[0054] Some embodiments of the present application will be described in detail below in conjunction with the drawings. In the case of no conflict between the embodiments and the features in the embodiments, each of the embodiments and the features in the embodiments can be combined with each other. The steps in each of the method embodiments are only used for example description, and are not used for limiting the present application.

[0055] With the increasing complexity of the industrial control system, the number and types of hardware devices are increasing, and there may also be virtual hardware devices (for logical simulation or testing) in the industrial control system, which makes the hardware device information maintenance work for the industrial control system face many challenges.

[0056] The existing device information maintenance scheme is mainly realized by manual recording or by tool software scanning field bus system.

[0057] Manual recording mainly records hardware device information through paper forms or electronic spreadsheets, and regularly conducts manual inventory and checking. This method does not require complex software or device support, and does not require additional software or hardware investment, and is only suitable for small factories or cases with fewer hardware devices. When the number of hardware devices is large, manual recording and inventory operation is time-consuming and laborious, and therefore cannot be applied to complex application scenarios of industrial control systems. In addition, manual operation is prone to recording errors or omissions, resulting in inaccurate hardware device information, and also cannot real-time grasp the dynamic changes of assets, making it difficult to make management decisions in time.

[0058] The tool software (e.g. PRONETA) scans the information of all devices or modules in the bus, without the need of special hardware support, and only needs additional programming through its API interface to realize automatic scanning of the bus nodes and exporting of formatted hardware device information. However, this way requires resetting the storage card when obtaining the device information of the PLC node itself, which will cause loss of the program, which is not allowed. In addition, PRONETA is mainly designed for PROFINET network and cannot be applied to other types of bus systems (e.g. PROFIBUS).

[0059] In addition, the above two schemes cannot effectively distinguish the control system to which the device belongs, which is not convenient for later maintenance and management.

[0060] Therefore, the present application proposes a device information maintenance scheme to solve various problems in the prior art.

[0061] The specific implementation of the embodiments of the present application will be described in detail below in combination with the drawings.

[0062] Device information maintenance method

[0063] Figure 1 The processing flowchart of the device information maintenance method of the exemplary embodiments of the present application is applicable to various types of industrial control systems (e.g. PLC systems), including but not limited to: host rack-based industrial control systems, PROFIBUS bus-based industrial control systems, and PROFINET bus-based industrial control systems.

[0064] As shown in the figure, the device information maintenance method 100 in the present embodiment mainly includes the following steps:

[0065] Step 102, sequentially obtains a hardware identifier from the hardware identifiers of the industrial control system as a current hardware identifier, and queries the hardware device information associated with the current hardware identifier.

[0066] In the present embodiment, the hardware device information includes a device serial number associated with the current hardware identifier.

[0067] In some embodiments, each hardware identifier is automatically assigned by the industrial control system.

[0068] In the present embodiment, one or more hardware identifiers can be associated with the same device serial number, which is used to identify an entity hardware device or a virtual hardware device in the industrial control system.

[0069] In the present embodiment, the hardware device information associated with the current hardware identifier includes a physical installation location and device identification and maintenance data.

[0070] In some embodiments, the physical installation location lookup operation and the reading operation of the device identification and maintenance data can be performed according to the current hardware identifier to obtain the hardware device information of the current hardware identifier.

[0071] Exemplarily, the associated physical installation location can be looked up according to the current hardware identifier through a LOG2GEO instruction of the PLC system, and after the physical installation location associated with the current hardware identifier is found, the reading operation of the identification and maintenance data (or I&M0 data) of the current hardware identifier can be performed through a Get_IM_Data instruction. The I&M0 data is device-specific basic information of the hardware device, which can include a manufacturer identification number, an order number, a device serial number, a hardware firmware version, and the like.

[0072] In step 104, all device serial numbers in the device database of the industrial control system are traversed, if the device database does not exist the device serial number associated with the current hardware identifier, the hardware device information of the current hardware identifier is written into the device database, if the device database already exists the device serial number associated with the current hardware identifier, the current hardware identifier is discarded.

[0073] Specifically, since there is a sub-slot (SUBSLOT) in the industrial control system, this can cause the same hardware device in the industrial control system to correspond to multiple hardware identifiers, and cause the device information to be repeatedly entered. Therefore, before the hardware device information is saved to the device database, the data duplication checking process needs to be performed.

[0074] In this embodiment, if the device database does not exist the device serial number associated with the current hardware identifier, it represents that the hardware device information of the hardware device corresponding to the current hardware identifier in the industrial control system has not been entered into the device database, then the hardware device information of the current hardware identifier is written into the device database. On the contrary, if the device database already exists the device serial number associated with the current hardware identifier, it represents that the hardware device corresponding to the current hardware identifier in the industrial control system exists in association with multiple hardware identifiers, and the hardware device information of this hardware device has been entered into the device database, then the current hardware identifier and the hardware device information of the current hardware identifier are discarded. Through this device serial number duplication checking mechanism, the comprehensive maintenance of the hardware device information in the industrial control system can be realized, the device information is avoided to be repeatedly entered, and the uniqueness and integrity of the hardware device information in the device database are ensured.

[0075] In step 106, it is judged whether all hardware identifiers are traversed, if not, it returns to step 102, otherwise, step 108 is performed.

[0076] In the embodiment, if it is judged that all the hardware identifiers of the industrial control system have not been traversed, step 102 can be returned to perform the device information maintenance processing of the next hardware identifier. If it is judged that all the hardware identifiers of the industrial control system have been traversed, it means that the device information maintenance operation of the industrial control system has been completely performed, and then step 108 is performed.

[0077] Step 108, obtaining the device maintenance data of the industrial control system.

[0078] Specifically, after traversing all the hardware identifiers, the data maintenance operation of the device database can be ended. The saved data in the device database is the final device maintenance data of the industrial control system.

[0079] In some embodiments, after traversing all the hardware identifiers, each hardware identifier in the device database and the hardware device information associated with each hardware identifier can be written into the device maintenance table according to the specified format of the device maintenance table of the industrial control system.

[0080] Exemplarily, the device maintenance table can include a CSV format file, so that an external application can easily access the device maintenance table through a Web API, further improving the availability and convenience of the device maintenance information.

[0081] Among them, the device maintenance table can be represented as the following Table 1:

[0082]

[0083]

[0084] In the above Table 1, MLFB represents the order number, SN represents the device serial number, Firmware represents the firmware version, Status represents the device running state, HW ID represents the hardware identifier, and Manufacturer represents the manufacturer identification number.

[0085] AREA (area), IOSYSTEM (I / O system), STATION (station), SLOT (slot), and SUBSLOT (subslot) are physical installation location parameters of the hardware device in the industrial control system. Through the hierarchical positioning of the five parameters, the hardware device can be accurately identified to ensure accurate transmission of data communication and control instructions. The hierarchical positioning relationship of these parameters is as follows:

[0086] AREA (signal type) → IOSYSTEM (I / O network) → STATION (hardware node) → SLOT (module slot) → SUBSLOT (module internal subchannel).

[0087] In addition, each hardware device information saved in the device database (DB) can be provided for external application to access, so as to improve the data management efficiency.

[0088] To sum up, the device information maintenance method of the embodiment can realize comprehensive maintenance of the hardware device information of the industrial control system without increasing additional hardware cost, ensure the uniqueness and integrity of the hardware device information in the device database, and realize efficient management and accurate control of the device information.

[0089] The device information maintenance method of the embodiment can provide basic association logic for subsequent data duplication checking and device information maintenance processing by explicitly associating the device serial number, the hardware identifier and each hardware device in the industrial control system.

[0090] The device information maintenance method of the embodiment can export the maintenance data in the device database according to a specified format after completing the data maintenance operation of the device database, so as to meet different device management requirements (for example, device repair and maintenance), and improve the flexibility of data processing.

[0091] The device information maintenance method of the embodiment can meet the management and maintenance requirements of the PLC system for detailed parameters of the hardware devices, and has comprehensive device searching capability. Whether it is a PLC body or a distributed site, the integrity of the device information in the industrial control system can be ensured, and especially the search of the PROFIBUS distributed site can be supported to meet the device management requirements in the complex network environment of industrial automation.

[0092] Figure 2 The processing flowchart of the device information maintenance method of another exemplary embodiment of the present application is shown in the figure. The embodiment is a further specific implementation of the embodiment shown in the figure. Figure 1 As shown in the figure, the embodiment mainly includes the following steps:

[0093] Step 202, obtaining each hardware identifier of the industrial control system.

[0094] In the embodiment, each hardware identifier is automatically assigned by the industrial control system.

[0095] In the embodiment, the same device serial number can be associated with one or more hardware identifiers, which are used to identify an entity hardware device or a virtual hardware device in the industrial control system.

[0096] Step 204, sequentially obtaining a hardware identifier from each hardware identifier of the industrial control system as a current hardware identifier, and querying the hardware device information associated with the current hardware identifier.

[0097] Exemplarily, the hardware identifiers can be acquired in sequence from small to large according to the numerical size of each hardware identifier, and one hardware identifier is acquired as the current hardware identifier.

[0098] In the embodiment, the hardware device information includes the physical installation location and the device identification and maintenance data associated with the current hardware identifier.

[0099] Exemplarily, the associated physical installation location can be found according to the current hardware identifier by using the LOG2GEO instruction of the PLC system, and after the physical installation location associated with the current hardware identifier is found, the device identification and maintenance data can be read from the device by using the Get_IM_Data instruction, and the hardware device information (also referred to as I&M0 data) of the current hardware identifier is obtained.

[0100] Referring to Table 1, the hardware device information includes the device serial number (SN), the manufacturer identification number (Manufacturer), the order number (MLFB), the hardware firmware version (Firmware), the physical installation location (including AREA, IOSYSTEM, STATION, SLOT, SUBSLOT), and the like.

[0101] Step 206, it is judged whether the device hardware information associated with the current hardware identifier is acquired successfully, if yes, step 208 is performed, and if no, step 216 is performed.

[0102] In the embodiment, the reading operation of the device identification and maintenance data can be performed according to the current hardware identifier, and a reading success return result or a reading error return result is obtained.

[0103] For example, in the case of performing data reading by using the Get_IM_Data instruction of the PLC system, if the return instruction of “GETDONE” is obtained, it represents that the data reading is successful, the hardware device information associated with the current hardware identifier can be acquired, and step 208 is performed; if the return instruction of “GET ERROR” is obtained, it represents that the data reading is incorrect, and step 216 is performed.

[0104] Step 208, it is judged whether the device serial number associated with the current hardware identifier satisfies the preset numbering principle, if yes, step 210 is performed, and if no, step 212 is performed.

[0105] In the embodiment, the preset numbering principle is used to identify whether the device serial number points to the entity hardware device in the industrial control system.

[0106] After obtaining the hardware device information associated with the current hardware identifier, it can be first identified whether the device serial number in the hardware device information meets the preset numbering principle. If the device serial number associated with the current hardware identifier meets the preset numbering principle, it represents that the device serial number associated with the current hardware identifier points to an entity hardware device in the industrial control system. If the device serial number associated with the current hardware identifier meets the preset numbering principle, it represents that the device serial number associated with the current hardware identifier points to a virtual hardware device in the industrial control system, and the data maintenance operation of the current hardware identifier is directly skipped to perform step 212.

[0107] In step 210, all device serial numbers in the device database of the industrial control system are traversed. If the device database does not exist the device serial number associated with the current hardware identifier, the hardware device information of the current hardware identifier is written into the device database. If the device database already exists the device serial number associated with the current hardware identifier, the current hardware identifier is discarded.

[0108] In the embodiment, if the device database does not exist the device serial number associated with the current hardware identifier, it represents that the hardware device information of the hardware device corresponding to the current hardware identifier in the control system has not been recorded in the device database, and then the hardware device information of the current hardware identifier is written into the device database. On the contrary, if the device database already exists the device serial number associated with the current hardware identifier, it represents that the hardware device corresponding to the current hardware identifier in the control system exists the situation associated with multiple previous hardware identifiers, and the hardware device information of the hardware device has been recorded in the device database, and then the current hardware identifier and the hardware device information of the current hardware identifier are discarded.

[0109] In step 212, it is judged whether all hardware identifiers are traversed. If yes, step 214 is performed, otherwise, step 204 is returned.

[0110] Specifically, if it is judged that all hardware identifiers of the industrial control system have not been traversed, step 204 can be returned to perform the data maintenance processing of the next hardware identifier. If it is judged that all hardware identifiers of the industrial control system are traversed, it represents that the device information maintenance operation of the industrial control system has been completely performed, and then step 214 is performed.

[0111] In some embodiments, the maximum traversal value of the industrial control system can be determined, and the value of the current hardware identifier is compared with the maximum traversal value. If the value of the current hardware identifier is not less than the maximum traversal value, the judgment result that all hardware identifiers are traversed can be obtained. The maximum traversal value is determined based on the total number of all entity hardware devices in the industrial control system.

[0112] In practical applications, since the total number of the physical hardware devices included in the industrial control system is known, in principle, when the value of the current hardware identifier exceeds the total number of the physical hardware devices, the device information maintenance operation performed for the current hardware identifier is generally meaningless. Based on this, the maximum traversal value of the industrial control system can be set according to the total number of the physical hardware devices included in the industrial control system, so as to limit the upper limit number of the hardware identifiers that need to be traversed in each device information maintenance period of the industrial control system, thereby avoiding the phenomenon of jitter of the control program caused by occupying too much CPU resources when traversing the hardware identifiers.

[0113] In the embodiment, the maximum traversal value of each device information maintenance period of the industrial control system is generally slightly larger than the total number of the physical hardware devices included in the industrial control system, so as to reduce the system resources occupied by the execution of each device information maintenance period as much as possible on the premise of ensuring that all hardware device information in the industrial control system is effectively maintained.

[0114] Step 214, obtaining the device maintenance data of the industrial control system.

[0115] Specifically, after traversing all the hardware identifiers, the data maintenance operation of the device database can be ended. The saved data in the device database is the final device maintenance data of the industrial control system.

[0116] In some embodiments, after traversing all the hardware identifiers, each hardware identifier in the device database and the hardware device information associated with each hardware identifier can be written into the device maintenance table according to the specified format of the device maintenance table of the industrial control system. Exemplarily, the device maintenance table can include but is not limited to a CSV format file.

[0117] Step 216, judging whether the read error code returned by the read error result falls into the data invalid code category, if yes, proceeding to step 212, otherwise, executing step 218.

[0118] In some embodiments, if the read error code falls into the data invalid code category, indicating that the current hardware identifier points to a virtual hardware device or an invalid hardware device in the industrial control system, the data maintenance operation of the current hardware identifier is directly skipped, and step 212 is executed.

[0119] In other embodiments, if the read error code does not fall into the data invalid code category, it indicates that there may be a hardware failure problem (for example, a hardware resource shortage, a device communication error, etc.), and step 218 is executed.

[0120] Step 218, ending the device information maintenance processing flow.

[0121] To sum up, the device information maintenance method of the embodiment can refine the query return result of the hardware device information (see step 206), and when the read error return result is obtained, the read error code is further identified (see step 216), so as to automatically filter the virtual hardware device or invalid hardware device in the industrial control system, improve the accuracy of device information maintenance, and exclude the interference of virtual device information or invalid device information on the management of the physical device. In addition, when it is judged that the read error code belongs to the non-data invalid code category, the device information maintenance processing flow is directly ended (see steps 216 to 218), so as to avoid the influence of insufficient hardware resources on the stability of data maintenance processing.

[0122] The device information maintenance method of the embodiment can check the device serial number according to the preset numbering principle, so as to exclude the hardware device information pointing to the virtual hardware device in the industrial control system from being written into the device database, and improve the effectiveness of the database information.

[0123] Device information maintenance apparatus

[0124] Figure 3 The device information maintenance apparatus 300 of the exemplary embodiment of the present application is shown in a structural schematic diagram.

[0125] The device information maintenance apparatus 300 of the embodiment is applied to various types of industrial control systems (such as PLC systems), including but not limited to: host rack-based industrial control systems, PROFIBUS bus-based industrial control systems, and PROFINET bus-based industrial control systems.

[0126] As shown in Figure 3 , the device information maintenance apparatus 300 mainly includes:

[0127] The data acquisition module 302 is configured to sequentially acquire a hardware identifier from each hardware identifier of the industrial control system as a current hardware identifier, query the hardware device information associated with the current hardware identifier, and the hardware device information includes the device serial number associated with the current hardware identifier.

[0128] The data maintenance module 304 is configured to traverse all device serial numbers in the device database of the industrial control system, write the hardware device information of the current hardware identifier into the device database if the device database does not exist the device serial number associated with the current hardware identifier, and discard the current hardware identifier if the device database already exists the device serial number associated with the current hardware identifier.

[0129] The cycle analysis module 306 is configured to send a data maintenance instruction to the data acquisition module in a case where it is determined that all hardware identifiers of the industrial control system have not been traversed, so that the data acquisition module performs a device information maintenance operation of a next hardware identifier until all hardware identifiers are traversed.

[0130] In some embodiments, each hardware identifier of the industrial control system is obtained by querying each device logical address of the industrial control system; one or more hardware identifiers are associated with one device serial number, and the device serial number is used to identify one physical hardware device or one virtual hardware device in the industrial control system.

[0131] In some embodiments, the hardware device information associated with the current hardware identifier includes a physical installation location and device identification and maintenance data; the data acquisition module 302 is configured to: perform a physical installation location searching operation and a device identification and maintenance data reading operation according to the current hardware identifier, and obtain a reading success return result or a reading error return result; in response to the reading success return result, obtain the hardware device information associated with the current hardware identifier; or in response to the reading error return result, identify a reading error code of the reading error return result, and if the reading error code falls into a data invalid code category, perform a step of sequentially obtaining a hardware identifier from the hardware identifiers of the industrial control system as the current hardware identifier; wherein if the reading error code falls into the data invalid code category, it indicates that the current hardware identifier points to a virtual hardware device or an invalid hardware device in the industrial control system.

[0132] In some embodiments, the data acquisition module 302 is configured to: if the reading error code does not fall into the data invalid code category, end the device information maintenance processing flow.

[0133] In some embodiments, the data maintenance module 304 is configured to: after obtaining the hardware device information associated with the current hardware identifier, determine whether a device serial number associated with the current hardware identifier satisfies a preset numbering principle, and if so, perform the step of traversing all device serial numbers in the device database of the industrial control system, and if not, perform the step of sequentially obtaining a hardware identifier from the hardware identifiers of the industrial control system as the current hardware identifier by the data acquisition module 302; wherein the preset numbering principle is used to identify whether the device serial number points to a physical hardware device in the industrial control system.

[0134] In some embodiments, the industrial control system includes a PLC system; and the hardware device information further includes a manufacturer identification number, an order number, a hardware firmware version, and a physical installation location.

[0135] In some embodiments, the data maintenance module 304 is configured to write each hardware identifier in the device database and the hardware device information associated with each hardware identifier into the device maintenance table in a specified format of a device maintenance table of the industrial control system after all the hardware identifiers are traversed.

[0136] In some embodiments, the loop analysis module 306 is configured to determine a maximum traversal value of the industrial control system, compare the value of the current hardware identifier with the maximum traversal value, and obtain a determination result that all the hardware identifiers are traversed if the value of the current hardware identifier is not less than the maximum traversal value, wherein the maximum traversal value is determined based on the total number of all the physical hardware devices in the industrial control system.

[0137] Electronic device

[0138] Figure 4 is a schematic diagram of an electronic device provided by an embodiment of the present application, and embodiments of the present application do not limit the specific implementation of the electronic device. Referring to Figure 4 The electronic device 400 provided by an embodiment of the present application includes a processor 402, a communications interface 404, a memory 406, and a bus 408. Wherein:

[0139] The processor 402, the communications interface 404, and the memory 406 complete mutual communication through the bus 408.

[0140] The communications interface 404 is configured to communicate with other electronic devices or servers.

[0141] The processor 402 is configured to execute the program 410, and specifically can execute related steps in the device information maintenance method embodiments.

[0142] Specifically, the program 410 can include program code data, and the program code data includes computer operation instructions.

[0143] The processor 402 can be a central processing unit CPU, or an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present application. One or more processors included in the smart device can be the same type of processor, such as one or more CPUs; or can be different types of processors, such as one or more CPUs and one or more ASICs.

[0144] A memory 406 stores the program 410. The memory 406 can include a high-speed RAM memory and can also include a non-volatile memory such as at least one disk memory.

[0145] The program 410 can specifically be used to cause the processor 402 to perform the device information maintenance method in any of the preceding embodiments.

[0146] The specific implementation of each step in the program 410 can refer to the corresponding description in the corresponding steps and units of the device information maintenance method embodiments described above, and will not be described here. It can be clearly understood by those skilled in the art that, for the convenience and brevity of description, the specific working process of the device and module described above can refer to the corresponding process description in the preceding method embodiments, and will not be described here.

[0147] Computer-readable storage medium

[0148] The present application also provides a computer-readable storage medium storing instructions for causing a machine to perform the device information maintenance method as described herein. Specifically, a system or device equipped with a storage medium can be provided, and the storage medium stores software program code data for implementing the functions of any of the above embodiments, and causes the computer (or CPU or MPU) of the system or device to read and execute the program code data stored in the storage medium.

[0149] In this case, the program code data read from the storage medium itself can implement the functions of any of the above embodiments, and therefore the program code data and the storage medium storing the program code data constitute a part of the present application.

[0150] The storage medium for providing the program code data includes a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code data can be downloaded from a server computer via a communication network.

[0151] Computer program product

[0152] The embodiments of the present application also provide a computer program product, including computer instructions instructing a computing device to perform any corresponding operation in the above method embodiments.

[0153] It should be noted that, according to the needs of implementation, each component / step described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or parts of the operation of the components / steps can be combined into a new component / step, to achieve the purpose of the embodiments of the present application.

[0154] The method according to the embodiments of the present application described above can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk or a magneto-optical disk, or be downloaded through a network originally stored in a remote recording medium or a non-transitory machine readable medium and stored in a local recording medium, so that the method described herein can be processed by such software using a general purpose computer, a special purpose processor, or programmable or dedicated hardware such as an ASIC or an FPGA. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component (for example, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, processor or hardware, the method described herein is implemented. In addition, when a general purpose computer accesses the code for implementing the method shown herein, the execution of the code will convert the general purpose computer into a special purpose computer for executing the method shown herein.

[0155] It should be noted that not all steps and modules in the above-mentioned flowcharts and system structure diagrams are necessary, and some steps or modules can be omitted according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in each of the above embodiments can be a physical structure or a logical structure, that is, some modules can be implemented by the same physical entity, or some modules can be implemented by multiple physical entities, or can be implemented by some components in multiple independent devices.

[0156] The pronouns and nouns about people in this patent application are not limited to a specific gender.

[0157] In each of the above embodiments, a hardware module can be implemented mechanically or with electrical components. For example, a hardware module can include dedicated permanent circuitry or logic (e.g., a special processor, a FPGA, or an ASIC) to complete the corresponding operation. A hardware module can also include programmable logic or circuitry (e.g., a general processor or other programmable processor) that can be temporarily configured by software to complete the corresponding operation. The specific implementation method (mechanical method, or dedicated permanent circuit, or temporarily configured circuit) can be determined based on cost and time considerations.

[0158] The present application is illustrated and described in detail by the above drawings and preferred embodiments, however, the present application is not limited to these disclosed embodiments, based on the above embodiments, those skilled in the art can know that, the code review means in the above different embodiments can be combined to obtain more embodiments of the present application, and these embodiments are also within the protection scope of the present application.

Claims

1. A method for maintaining equipment information (100), applied to an industrial control system, the method comprising: From each hardware identifier of the industrial control system, a hardware identifier is sequentially obtained as the current hardware identifier, and the hardware device information associated with the current hardware identifier is queried. The hardware device information includes the device serial number (102) associated with the current hardware identifier. Traverse all device serial numbers in the device database of the industrial control system. If there is no device serial number associated with the current hardware identifier in the device database, write the hardware device information of the current hardware identifier into the device database. If there is already a device serial number associated with the current hardware identifier in the device database, discard the current hardware identifier (104). Return to the step of sequentially obtaining a hardware identifier from each hardware identifier of the industrial control system as the current hardware identifier, until all hardware identifiers have been traversed (106).

2. The equipment information maintenance method according to claim 1, wherein, Each hardware identifier is automatically assigned by the industrial control system; The same device serial number is associated with at least one hardware identifier to identify a physical hardware device or a virtual hardware device in the industrial control system.

3. The equipment information maintenance method according to claim 1 or 2, wherein, The hardware device information associated with the current hardware identifier includes the physical installation location, device identification, and maintenance data; Furthermore, the querying of hardware device information associated with the current hardware identifier includes: Based on the current hardware identifier, perform a physical installation location lookup operation and a device identifier and maintenance data read operation, and obtain a read success return result or a read error return result; In response to the successful read return result, the hardware device information associated with the current hardware identifier is obtained; or In response to the read error return result, identify the read error code of the read error return result. If the read error code falls into the data failure code category, return to the step of sequentially obtaining a hardware identifier from each hardware identifier of the industrial control system as the current hardware identifier. If the read error code falls into the data failure code category, it indicates that the current hardware identifier points to a virtual hardware device or a failed hardware device in the industrial control system.

4. The equipment information maintenance method according to claim 3, wherein, The method further includes: If the read error code does not fall into the data failure code category, the device information maintenance process ends.

5. The equipment information maintenance method according to claim 1, wherein, After obtaining the hardware device information associated with the current hardware identifier, the method further includes: Determine whether the device serial number associated with the current hardware identifier meets the preset numbering principle. If it does, execute the step of traversing all device serial numbers in the device database of the industrial control system. If it does not meet the principle, execute the step of sequentially obtaining a hardware identifier from each hardware identifier in the industrial control system as the current hardware identifier. The preset numbering principle is used to identify whether the device serial number points to a physical hardware device in the industrial control system.

6. The equipment information maintenance method according to claim 1, wherein, The industrial control system includes a PLC system; The hardware device information also includes the manufacturer identification number, order number, hardware firmware version, and physical installation location.

7. The equipment information maintenance method according to claim 1, wherein, After traversing all hardware identifiers, the method further includes: According to the specified format of the equipment maintenance table of the industrial control system, each hardware identifier in the equipment database and the hardware device information associated with each hardware identifier are written into the equipment maintenance table.

8. The equipment information maintenance method according to claim 1, wherein, The result of determining whether all hardware identifiers have been traversed is obtained in the following way: Determine the maximum traversal value of the industrial control system; The value of the current hardware identifier is compared with the maximum traversal value. If the value of the current hardware identifier is not less than the maximum traversal value, a judgment result is obtained that all hardware identifiers have been traversed. The maximum traversal value is determined based on the total number of all physical hardware devices in the industrial control system.

9. An equipment information maintenance device (300), applied to an industrial control system, comprising: The data acquisition module (302) is configured to sequentially acquire a hardware identifier from each hardware identifier of the industrial control system as the current hardware identifier, and query the hardware device information associated with the current hardware identifier, wherein the hardware device information includes the device serial number associated with the current hardware identifier; The data maintenance module (304) is configured to traverse all device serial numbers in the device database of the industrial control system. If there is no device serial number associated with the current hardware identifier in the device database, the hardware device information of the current hardware identifier is written into the device database. If there is already a device serial number associated with the current hardware identifier in the device database, the current hardware identifier is discarded. The loop analysis module (306) is configured to send a data maintenance instruction to the data acquisition module (302) when it is determined that all hardware identifiers of the industrial control system have not been traversed, so that the data acquisition module performs the device information maintenance operation of the next hardware identifier until all hardware identifiers have been traversed.

10. An electronic device (400), comprising: The processor (402), communication interface (404), memory (406), and communication bus (408) communicate with each other through the communication bus (408). The memory (406) is used to store at least one executable instruction that causes the processor (402) to perform an operation corresponding to the device information maintenance method as described in any one of claims 1 to 8.

11. A computer-readable storage medium storing computer instructions that, when executed by a processor, cause the processor to perform the device information maintenance method as described in any one of claims 1 to 8.

12. A computer program product comprising computer instructions that instruct a computing device to perform an operation corresponding to the device information maintenance method as described in any one of claims 1 to 8.