An industrial control automatic hardware configuration method and system based on artificial intelligence
By receiving project design forms, generating declarative description files, and executing API call instructions, the cumbersome nature and reliance on experience in industrial control automatic hardware configuration are solved, achieving efficient, convenient, and accurate automated configuration and improving configuration efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING RES INST OF AUTOMATION FOR MACHINERY IND
- Filing Date
- 2025-12-25
- Publication Date
- 2026-05-29
AI Technical Summary
Existing industrial control automatic hardware configuration methods are cumbersome, rely on engineers' experience, and are difficult to meet the diverse and efficient configuration needs of the industrial field, and cannot adapt to non-standardized and customized needs.
By receiving structured project design forms, declarative description files are generated using large language models and domain knowledge bases. The files are parsed to generate API call instructions, which are then executed in a preset order to complete the hardware configuration of the industrial control system, forming a closed loop from engineer pre-design to automated configuration.
It enables efficient, convenient, and precise automated hardware configuration for industrial control, lowers the technical threshold, improves configuration efficiency and accuracy, and avoids errors and tedious processes in manual operation.
Smart Images

Figure CN121523931B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automated hardware configuration technology, and in particular to an industrial control automated hardware configuration method and system based on artificial intelligence. Background Technology
[0002] In the field of industrial automation, industrial control hardware configuration is a core foundational step to ensure the smooth implementation of industrial projects. Industrial control systems rely on the collaborative work of various hardware devices (such as controllers, servo drivers, input / output modules, etc.), and hardware configuration is the process of constructing a system framework that meets production control requirements by rationally selecting these devices, configuring their parameters, and planning network connections. The rationality and efficiency of this configuration directly determine the stability, accuracy, and efficiency of subsequent industrial production.
[0003] Currently, industrial control hardware configuration is mainly achieved through three methods: First, the traditional manual configuration method, which relies on the dedicated integrated development environment (IDE) provided by the hardware vendor. Engineers need to manually complete a series of operations on the graphical user interface (GUI), such as dragging and dropping devices, configuring parameters (e.g., setting IP addresses and station numbers), and establishing network topology connections between devices. Second, the script-based configuration method, where some high-end IDEs provide script interfaces or programming interfaces (APIs), allowing engineers to automate repetitive configuration tasks by writing script files such as VBScript and Python. Third, the template-based configuration method, where engineers pre-create project templates for standardized and highly repetitive projects, and new projects are created based on these templates before making local adjustments. However, these methods all have shortcomings and are difficult to meet the diverse and efficient configuration needs of the industrial field: traditional manual configuration processes are cumbersome, and the configuration process is prone to omissions and misconfigurations due to engineer negligence. Moreover, the correctness of the configuration is highly dependent on the engineer's personal experience and familiarity with hardware and protocols. It is difficult to form a standardized process between different personnel and projects, and knowledge accumulation is difficult; scripted configuration requires engineers to have professional programming skills, script writing and debugging are time-consuming, and it cannot adapt to non-standardized and customized configuration needs; templated configuration has poor flexibility and is only suitable for highly repetitive projects. It is difficult to apply when facing new hardware or personalized control needs.
[0004] Therefore, there is an urgent need for a method to achieve efficient, convenient, and accurate automatic hardware configuration for industrial control, thereby reducing the technical threshold and improving configuration efficiency and accuracy. Summary of the Invention
[0005] In view of this, this application provides an artificial intelligence-based industrial control automatic hardware configuration method and system to achieve efficient, convenient and accurate industrial control automatic hardware configuration, reduce technical threshold and improve configuration efficiency and accuracy.
[0006] Specifically, this application is implemented through the following technical solution:
[0007] The first aspect of this application provides an artificial intelligence-based method for automatic hardware configuration in industrial control systems, the method comprising:
[0008] Receive multiple structured project design forms; the project design forms include an equipment list, a network configuration table, and an I / O point table;
[0009] Semantic parsing of the project design table is performed based on a large language model and domain knowledge base to generate a declarative description file;
[0010] The declarative description file is parsed to generate the corresponding API call instructions for the industrial control system integration development environment;
[0011] The API call instructions are executed in a preset order to complete the hardware configuration of the industrial control system.
[0012] The second aspect of this application provides an artificial intelligence-based industrial control automatic hardware configuration system, which includes an input and interaction module 210, a cognition and generation module 220, and an execution and adaptation module 230.
[0013] The input and interaction module 210 is used to receive multiple structured project design forms; the project design forms include a device list, a network configuration table, and an I / O point table.
[0014] The cognition and generation module 220 is used to perform semantic parsing on the project design table based on a large language model and a domain knowledge base, and generate a declarative description file.
[0015] The execution and adaptation module 230 is used to parse the declarative description file, generate corresponding industrial control system integrated development environment API call instructions, and execute the API call instructions in a preset order to complete the industrial control system hardware configuration.
[0016] The AI-based industrial control automatic hardware configuration method and system provided in this application form a complete closed loop from the engineer's pre-designed, clearly defined project design form to automated configuration by setting up the steps of "receiving a pre-designed project design form → generating a declarative description file based on a large language model and domain knowledge base → parsing the file to generate API instructions → executing the instructions in sequence to complete the configuration". The project design forms (including equipment lists, network configuration tables, and I / O point tables) serve as the core input, directly providing the basic hardware information, network connection logic, and I / O signal relationships required for configuration. This ensures the accuracy and completeness of the data used for configuration from the source. Processing the project design forms based on a large language model and domain knowledge base transforms the structured equipment, network, and I / O information in the forms into declarative description files containing project metadata, equipment object information, and network connection relationship information. This process utilizes the semantic parsing and entity extraction capabilities of the large language model to accurately locate key information in the forms and establish logical connections. It also verifies hardware specifications, compatibility, and resource constraints through a domain knowledge base (industrial control-specific knowledge graph), ensuring the professionalism and compliance of the configuration information and solving the problem of converting structured data from tables into standardized configuration descriptions. Parsing the declarative description files generates API call instructions, realizing the transformation from abstract configuration information to specific operation instructions, enabling the industrial control system integration development environment (IDE) to directly recognize and execute them. Executing instructions in a preset order ensures the standardization and coherence of the configuration process, avoiding potential confusion or omissions in manual operations. Through the coordinated efforts of these steps, the entire hardware configuration process eliminates the need for engineers to manually perform tedious device drag-and-drop, parameter configuration, and topology connection in the IDE, significantly reducing the technical threshold and labor costs while improving configuration efficiency and accuracy, thus achieving full automation from pre-designed project design forms to hardware configuration. Attached Figure Description
[0017] Figure 1 A flowchart of an AI-based industrial control automatic hardware configuration method provided in Embodiment 1 of this application;
[0018] Figure 2 This is a schematic diagram of the structure of an artificial intelligence-based industrial control automatic hardware configuration system provided in Embodiment 2 of this application. Detailed Implementation
[0019] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0020] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0021] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0022] The following specific embodiments are given to illustrate the technical solution of this application in detail.
[0023] Figure 1 This is a flowchart illustrating the AI-based automated hardware configuration method for industrial control provided in Embodiment 1 of this application. Please refer to... Figure 1 The method provided in this embodiment may include:
[0024] S101. Receive multiple structured project design forms.
[0025] The project design forms include an equipment list, a network configuration table, and an I / O point table.
[0026] Specifically, the project design tables are the structured core data source supporting the project's hardware configuration and network setup, mainly comprising three categories: equipment list, network configuration table, and I / O point table. The equipment list defines all core hardware used in the project, including equipment name (a unique identifier in the project), equipment type (controller / driver / I / O station, etc.), order number, and associated parameters (such as motor power, current, etc.). The network configuration table defines the network communication architecture between devices, including equipment name, IP address, Profinet / EtherCAT device name, and master controller (used to define master-slave relationships). The I / O point table defines the layout and signal connections of I / O modules, including I / O station location (associated with devices in the network configuration table), slot number, module order number, base order number, and signal / variable name.
[0027] Optionally, after receiving multiple structured project design forms, the method further includes: performing a necessity check on the project design forms to determine whether the project design forms contain a device list, a network configuration table, and an I / O point table; generating a prompt message when it is detected that any sub-table is missing from the project design forms, guiding the user to supplement the missing content; repeating the detection and prompting steps until the received project design forms simultaneously contain a device list, a network configuration table, and an I / O point table.
[0028] In practice, after receiving multiple structured project design forms, the program automatically initiates a necessity check process. The core detection objective is whether the form simultaneously contains a device list, network configuration table, and I / O point table. Using preset table identification rules (such as identifying the presence of a device list containing "device name, order number," a network configuration table containing "IP address, Profinet device name," and an I / O point table containing "signal name, I / O station location" based on table filename keywords and header feature fields), the program checks each received set of forms. If any type of sub-table is detected as missing, the program immediately generates a prompt message clearly indicating the missing sub-table type (e.g., "I / O point table missing, please supplement"), pushes it to the user via a pop-up window, and provides an entry point for supplementing the form. After the user supplements the sub-table, the program re-receives the supplemented form and performs the above existence check again. This cycle of detection-check-prompt-receive supplementation-re-detection continues until a check confirms that the form set simultaneously contains all three types of sub-tables, at which point the detection process terminates.
[0029] S102. Based on the large language model and domain knowledge base, perform semantic parsing on the project design table to generate a declarative description file.
[0030] Specifically, the domain knowledge base is a pre-built knowledge graph library specifically for the industrial control field. It stores information in the form of nodes and edges carrying attributes. Nodes represent entities such as devices and protocols, while edges represent relationships such as compatibility and connection rules. At the same time, the domain knowledge base has dynamic update characteristics. When new hardware devices or new configuration methods appear, corresponding content will be added to the domain knowledge graph library to adapt to the ever-changing needs of the industrial control field.
[0031] It should be noted that the domain knowledge base is not a general knowledge base, but rather a highly structured and strongly constrained professional knowledge system meticulously constructed for the specific domain of industrial control hardware configuration. The domain knowledge base is specifically designed to support the configuration of control logic, and the information it stores focuses on the logical attributes and rules that affect controller programming, network communication, and signal mapping. In the parsing and construction process, this embodiment utilizes this dedicated knowledge base for logical-level reasoning and verification, rather than simple data queries.
[0032] Furthermore, the domain knowledge base specifically stores the following content: equipment logic specification diagrams, topology and connection logic rule bases, and control logic and signal flow rule bases. The equipment logic specification diagrams use the equipment order number as the primary key, linking it to its logical functional attributes (such as whether it is a PLC, IO module, driver, or HMI; supported communication protocols Profinet and EtherCAT; IO signal types DI / DO / AI / AO, number of channels, addressing mode, and data format) and logical compatibility rules (such as the maximum number of B-type IO stations that an A-type PLC can connect to; C-series drivers must be used with D-series controllers). The topology and connection logic rule base defines the logical topology constraints (master-slave relationship, maximum number of devices) for different industrial networks (Profinet, EtherCAT), equipment naming and addressing logic, and port function matching rules (e.g., the controller's X1 port is used for motion control networks, and the X2 port is used for standard IO networks). The control logic and signal flow rule base includes signal type matching rules (such as temperature sensor signals should be connected to analog input modules) and basic control loop logic verification rules (such as a motor's start / stop command, feedback, and fault signal should be associated with the same device or network segment).
[0033] Optionally, the declarative description file includes project metadata, device object information, and network connection relationship information; wherein, the project metadata is used to record basic information such as project name and version number; the device object information is a collection of multiple device objects; the network connection relationship information is used to define the logical connection and communication protocol between devices, and the network connection relationship information includes a subnet information set and a connection relationship set.
[0034] Specifically, a declarative description file is a text file that uses a structured format to completely and accurately describe the final hardware configuration state of a target industrial control system. It serves as the core intermediary connecting "user requirements and device information" with "subsequent automated configuration execution." Its content strictly corresponds to the project design forms and domain knowledge, ensuring that subsequent execution modules can directly complete compliant configuration based on this file. The declarative description file contains three core types of information: The first type is project metadata, used to record the basic identification information of the industrial control configuration project, specifically covering the project name, version number, etc., which can quickly clarify the core positioning and version iteration of the configuration project; the second type is device object information, presented in the form of a collection of multiple device objects, with each device object's information associated with the device list in the project design forms; the third type is network connection relationship information, specifically used to define the logical connection methods and communication protocols between devices, including a subnet information set and a connection relationship set.
[0035] For example, in one embodiment, the declarative description file includes the following main fields:
[0036] `projectInfo`: Project metadata, such as project name and version number;
[0037] `devices`: An array of device objects. Each object represents a hardware device and contains an `id` (unique identifier), a `name` (custom name), an `articleNumber` (order number), and a `parameters` object, which contains all the parameters that need to be configured for the device in key-value pairs (such as IP address, station number, channel range, etc.).
[0038] `topology`: An object that defines networks and connections. Internally, it contains an array of `networks`, where each network object defines a subnet (such as an internal bus or Ethernet), and an array of `connections`, which describes the connections between devices, explicitly specifying master-slave relationships, communication protocols, and data exchange areas.
[0039] In specific implementation, the semantic parsing of the project design table based on a large language model and domain knowledge base generates a declarative description file, including:
[0040] (1) Use a large language model to perform semantic parsing on the cell content of the project design table, and locate and extract key information entities in the project design table through named entity recognition.
[0041] Specifically, key information entities refer to the core information with specific industrial control technical meaning extracted from the cell content of project design tables (equipment list, network configuration table, and I / O point table). This information is the basis for subsequently constructing project instance diagrams and establishing entity relationships. Specifically, it corresponds to the core data of three types of tables: entities related to basic hardware attributes such as equipment name, order number, power, current, and voltage extracted from the equipment list; entities related to equipment network communication such as IP address, Profinet device name, and main controller extracted from the network configuration table; and entities related to I / O signal association and hardware installation location such as signal name, I / O station location, module name, slot number, module order number, and base order number extracted from the I / O point table.
[0042] In practice, the cell content of the project design table is first preprocessed, converting the table data into a text format that the large language model can process, while retaining the association information between the cell content and its table type. Next, a trained large language model (fine-tuned using labeled data from the industrial control field, including preset entity types such as equipment names, order numbers, and IP addresses) is invoked to scan the preprocessed text cell by cell. The large language model identifies features in the text that match preset entity types (such as specific encoding formats for order numbers, four-segment numerical structures for IP addresses, and industry-standard naming rules for equipment names), locating and marking content that matches these features. Subsequently, a secondary entity type verification is performed based on the table type to which the content belongs (e.g., entities marked as "IP addresses" in a network configuration table must conform to network address format specifications), filtering out misidentified content. Finally, the verified marked content is categorized by entity type, forming key information entity sets belonging to different tables. For a detailed description of the entity recognition process using the large language model, please refer to relevant technical descriptions.
[0043] (2) By extracting relationships, the logical connections between the key information entities are parsed and determined to form a structured information set.
[0044] Specifically, a structured information set is a systematic data set containing entities and their relationships, formed by extracting and parsing relationships and determining the logical connections between key information entities. Specifically, it manifests as a structured form that organizes key information entities extracted from equipment lists, network configuration tables, and I / O point tables according to their inherent logical connections. This includes the membership (BELONGS_TO) relationship between signal name entities and module name entities in the I / O point table, the location (LOCATED_IN) relationship between module name entities and I / O station location entities, the controlled (IS_CONTROLLED_BY) relationship between equipment name entities and main controller entities in the network configuration table, and the containment (CONTAINS) relationship between loop name entities and circuit breaker order number entities and contactor order number entities in the equipment list. These entities, along with their explicit logical connections, constitute the structured information set.
[0045] In practice, the extracted key information entities are first categorized according to their table types, and a corresponding relationship extraction rule base (containing preset relationship types and entity association features) is loaded for each table type. For the IO point table, the relationship between signal names and module names is identified by matching the row and column positions of entities in the table (such as signal names and module names in the same row) and subordinate terms in the text description (such as "belongs to" and "located in"), as well as the relationship between module names and IO station locations. For the network configuration table, the relationship between device names and the controlled relationship between the main controller is identified based on the corresponding records of the "main controller" field and device names, and control terms in the network topology description (such as "control" and "subordinate"). For the device list, the relationship between circuit names and circuit breaker / contactor order numbers is identified based on the binding relationship between circuit names and the order numbers of circuit breakers and contactors in the same circuit record. The identified relationships are validated by association rules in the domain knowledge base (such as "IO modules must belong to a certain IO station") to filter out illogical associations. Finally, the entities and validated relationships are combined in the form of triples (entity 1, relationship type, entity 2) to form a structured information set.
[0046] (3) Based on the key information entities and the structured information set, construct a project instance diagram; during the construction of the project instance diagram, use the order number in the entity extracted from the IO point table as the primary key to query the domain knowledge base, obtain the hardware technical specifications, and perform verification and adjustment on the project instance diagram based on the hardware technical specifications.
[0047] Specifically, the project instance diagram is a visual or data-driven map constructed based on key information entities and structured information extracted from project design tables. It clearly presents all entities (such as PLCs, I / O modules, and signal points), entity attributes (such as order numbers and IP addresses), and logical relationships between entities (such as "signals belong to modules" and "equipment is controlled by controllers") in a graphical or structured format. It serves as a centralized and interconnected representation of the project's core information.
[0048] Furthermore, hardware specifications are a set of standardized technical parameters stored in the domain knowledge base and bound to the hardware device's part number. Hardware specifications contain core technical information about the hardware device, such as the signal type (digital / analog), number of channels (e.g., 16 channels, 32 channels), power supply voltage (e.g., 24VDC), communication protocol (e.g., Profinet, Modbus), and installation dimensions of the I / O module. They are crucial for determining whether the hardware device meets project requirements and is compatible with other devices.
[0049] In specific implementation, the construction of the project instance graph based on the key information entities and structured information set includes: creating an empty directed graph in memory; creating a device node in the directed graph for each unique device based on the key information entities extracted from the device list and network configuration table, and attaching entity attributes to the corresponding node; when parsing an IO module, finding the parent node of the IO station to which the IO module belongs in the directed graph, querying the domain knowledge base with the order number of the IO module to obtain the hardware technical specifications, performing resource accumulation calculation on the parent node and comparing it with the upper limit of IO station resources in the hardware technical specifications, and storing the information of the IO module as a structured attribute inside the parent node after verification; creating a bus node as an independent node in the directed graph according to the entity relationship of the network configuration table, connecting the device node to the bus node through an edge carrying port attributes, and comparing the device name set in the project design table through set operations during the connection process.
[0050] Specifically, the program calls a graph processing library (such as networkx) to create an empty directed graph in memory without nodes or edges. It also defines the basic attribute fields (such as node type, attribute key-value pairs, and edge port information fields) for nodes (devices, buses) and edges (connections) in the graph. Key information entities such as "PLC name, order number, maximum number of connected devices," "IO station name, order number, backplane power limit," and "base name, adapter slot range" are extracted from the device list. Entities such as "device IP address, Profinet device name" are extracted from the network configuration table. For each unique device (such as PLC-01, IO station-A, base-01), an independent device node is created in the empty directed graph. All entity attributes corresponding to this device (such as the order number "12345" and IP address "192.168.1.10" for PLC-01) are appended to the attribute dictionary of the corresponding node in key-value pairs. Furthermore, when parsing entities such as "IO module name, order number, power consumption, and width" in the IO point table, the parent node of the IO station to which the IO module belongs (IO station-A) is first matched in the created device nodes through the association relationship of "IO module-IO station location" in the IO point table (e.g., IO module-M1 corresponds to IO station-A). Then, the domain knowledge base is queried using the order number of the IO module to obtain the hardware technical specifications of the module (e.g., power consumption 5W, width 2U). Subsequently, resource accumulation calculation is performed on the parent node of the IO station (e.g., the current IO station has 3 modules connected, with a total power consumption of 12W. After connecting M1, the total power consumption is updated to 12+5=17W; the total width is updated from 6U to 6+2=8U). The accumulated resource data is compared with the resource limit of the parent node of the IO station in the domain knowledge base (e.g., the backplane power limit of IO station-A is 20W, and the maximum width is 10U). If the accumulated value is ≤ the limit, the verification passes; if it exceeds, an exception prompt is triggered. After the resource verification is passed, a "Submodule List" field is added to the attribute dictionary of the IO station parent node. The name, order number, power consumption, width and other information of the IO module are stored in this field in the form of structured data, and the association between the IO module and the "container" of the IO station parent node is established.Extract entities such as "bus type (e.g., Profinet bus)" and "bus identifier (e.g., PN-BUS-01)" from the network configuration table, create independent bus nodes in the directed graph, and attach attributes such as "bus_type" and "bus_id". Then extract the "device-port-bus" relationship from the network configuration table (e.g., ProfinetPort1 of PLC-01 connects to PN-BUS-01, and ProfinetPort2 of IO station-A connects to PN-BUS-01). For each relationship, create a directed edge from the device node to the bus node in the directed graph, and record the port type (e.g., "port_type":"ProfinetPort") and port number (e.g., "port_num":"1") in the edge attributes to form a connection structure of "device node-edge with port attribute-bus node". Extract all device names from the device list to generate "Basic Device Set S1", and extract all device names that need to be connected to the bus from the network configuration table to generate "Device Set to be Connected S2". Compare the sets using set operations (such as calculating the intersection S2∩S1 and the difference S2-S1). If S2-S1 is an empty set, it means that all devices to be connected are defined in the basic device set, and the connection is valid. If S2-S1 is not an empty set (e.g., device D3 exists in S2 but not in S1), an error message indicating that the device is not defined is triggered, and the connection process is paused until the problem is resolved.
[0051] Further, hardware entity data containing order numbers is extracted from the IO point table, and a unique order number corresponding to each hardware entity is selected. A query mapping relationship between the order number and the domain knowledge base is established, using the extracted order number as the primary key query parameter. The query interface of the domain knowledge base is called, passing in the order number parameter to obtain the hardware technical specification data corresponding to the order number. The project instance graph to be processed is loaded, and the nodes and node attribute information corresponding to the hardware entities in the project instance graph are located. The hardware technical specifications obtained from the domain knowledge base are compared and verified item by item with the attribute information of the corresponding nodes in the project instance graph. If the comparison results are consistent, the node attributes of the corresponding node in the project instance graph are determined to meet the requirements; if the comparison results are inconsistent, the attributes of the corresponding nodes in the project instance graph are adjusted according to the hardware technical specifications, and the erroneous attribute information of the nodes is updated. The above steps are repeated until the verification and adjustment of the project instance graph nodes corresponding to all hardware entities in the IO point table are completed.
[0052] (4) Based on the device logic hierarchy and connection relationship in the project instance diagram, calculate the visual layout information through the layout algorithm, output all entities, attributes and relationships in the project instance diagram and the visual layout information in a standardized form, and generate a declarative description file.
[0053] Specifically, the input to the placement algorithm is a project instance diagram that represents the logical hierarchy of devices (controller-network-slave devices) and their connection relationships. The goal of the placement algorithm is to automatically generate a configuration diagram in a two-dimensional plane that is clear in layout, orderly in connection, and easy to understand in terms of system logical architecture.
[0054] In practical implementation, an optimized tree-structured layout algorithm is employed to visually group and hierarchically arrange devices with parent-child relationships (such as a PLC and all its subordinate Profinet devices), intuitively representing the control system architecture. A connection routing algorithm based on logical relationships is applied, focusing on optimizing the routing of connections between devices at different levels, minimizing line crossings, avoiding visual clutter, and ensuring clear signal flow. Based on the hierarchical layout, the positions of devices are fine-tuned according to their functional relationships in the control logic (such as multiple drives in coordinated execution) to enhance the visual clustering effect. The calculated layout coordinates and connection path information are embedded as visual metadata into the final generated declarative description file. When configuring in the IDE, a standardized logical configuration diagram can be automatically generated based on this metadata, or it can be directly exported as a standard engineering view file. Finally, all entities, attributes, and relationships in the project instance diagram, as well as the generated visual layout information, are output in a standardized form to generate a declarative description file.
[0055] Optionally, before generating the declarative description file, the method further includes: performing a logical consistency audit on the structured information set based on the domain knowledge base, and generating an audit report; and having the user trigger an instruction based on the audit report to modify the structured information set or project instance diagram.
[0056] Specifically, before generating the project instance diagram, a dedicated domain knowledge base is automatically invoked to perform consistency checks on the logical relationships between devices, network topology, and signal allocation, thereby generating a logic audit report. The audit report includes logical conflicts (e.g., assigning a ProfinetIO device to a controller that only supports EtherCAT), rule violations (e.g., the total number of defined IO signals exceeding the addressing capability of the PLC), and logic optimization suggestions (e.g., assigning all DI signal points located in the same physical area to the same IO module to simplify wiring logic). After generating the logic report, the report is presented to the user, and an "application suggestion" option is provided for issues that can be automatically corrected. Users can preview changes and confirm implementation or manually adjust them. This process ensures that the final configuration scheme is logically complete, consistent, and optimized.
[0057] The method provided in this embodiment creates an empty directed graph in memory and gradually fills it with device nodes, adds attributes, establishes hierarchical associations and network connections. At the same time, it combines a domain knowledge base to perform resource verification and set operation comparison. This method of constructing project instance graphs provides accurate, compliant and executable underlying data support for industrial control automatic hardware configuration. Specifically, a device node is created for each unique device and attributes are attached, ensuring the unique identification and complete attribute record of the hardware entity in the diagram, providing basic data for subsequent configuration instruction generation. By finding the parent node of the IO station to which the IO module belongs, querying the hardware technical specifications, and performing resource accumulation verification, the strong hierarchical and container relationships in the industrial control field are strictly followed (e.g., the IO module must belong to the IO station), and hardware configuration conflicts are avoided in advance through resource constraint verification (e.g., backplane power, rack width), ensuring that the configuration result conforms to the operating limitations of the physical device. The bus is treated as an independent node, and the device and bus are connected through edges with port attributes, accurately restoring the characteristics of typed ports and buses in the industrial control system, clarifying the connection logic of devices in multi-network environments, and avoiding the ambiguity caused by simple node connections in general network diagrams. During the connection process, the legality of the network connection is further verified by comparing the device name set through set operations (e.g., ensuring that all devices to be connected are defined in the device list), preventing virtual connections without hardware support. This allows project instance diagrams to fully map the physical structure, logical relationships, and technical constraints of the industrial control system. Ultimately, it provides a structured and validated data source for automatically generating IDE-executable declarative description files, significantly reducing the error rate of manual configuration, improving the automation and accuracy of industrial control hardware configuration, and ensuring that the configuration results can directly meet the hardware deployment requirements of the actual production environment.
[0058] Optionally, after generating the declarative description file, the method further includes: recording the name, version, and data source of each table in the project design table as the basic information of the verification report; traversing the project instance diagram, extracting and organizing all successfully created hardware node information and network connection relationships in the project instance diagram to form a hardware and network connection list as the result information of the verification report; retrieving log data during the construction and synchronization verification process of the project instance diagram, filtering and classifying logical inconsistency errors and operation records of default rule applications during the construction process as the verification report's pending review items information; integrating the basic information, result information, and pending review items information according to a preset format to generate the verification report; providing support for the use of the verification report, using the basic information in the verification report to assist technicians in verifying the accuracy of data sources, using the result information to assist technicians in confirming the completeness of configuration results, and using the pending review items information to prompt technicians to correct logical errors in the IDE and manually verify the default rule application items.
[0059] In practice, the metadata of the project design tables is retrieved, recording the table names (e.g., "202405_Equipment List_v1.xlsx"), version numbers (e.g., "v1.0"), and data source paths (e.g., "D: / Industrial Control Project / Design Data / "), and this information is organized into the basic information for the verification report. Then, a graph traversal algorithm (e.g., depth-first traversal) is called to traverse the project instance graph, extracting the names, order numbers, attribute information (e.g., PLC IP addresses, IO module power consumption), and connection relationships between device nodes and bus nodes (including port type, port number, and bus identifier) of all hardware nodes in the graph. This information is then organized into two formats: "Hardware Node List" and "Network Connection List," forming the results information for the verification report. Subsequently, log data from the project instance graph construction and synchronous verification phase is retrieved from the system log database and analyzed using keyword matching (…). For example, errors such as "Error: Resource Exceeded" and "Application Default Rule: Topology Order" are filtered to identify logically inconsistent errors (e.g., "IO Station A Backplane Power Exceeded" and "Device D3 Undefined") and default rule application records (e.g., "Device D1, D2 Chain Topology Generated Based on Default Rule, Low Confidence"). These are then categorized and organized by fields such as "Error Type," "Involved Entities," "Error Description," "Rule Application Content," and "Confidence Level" as information to be reviewed in the verification report. The basic information, result information, and information to be reviewed are integrated using a preset HTML or PDF template to generate a human-readable verification report. Finally, usage instructions are added to the end of the verification report, clearly indicating that the basic information is used to verify data sources, the result information is used to confirm configuration integrity, and the information to be reviewed is used to correct errors and verify rules in the IDE. The report also provides export and printing functions to assist technical personnel in subsequent operations. For the specific implementation process of the graph traversal algorithm, please refer to the description in related technologies.
[0060] Optionally, after manual verification based on the verification report, the method further includes: traversing all controller nodes in the project instance diagram to check if multiple devices are assigned to the same controller physical port. If so, it is determined that there is an undefined chain topology ambiguity in the project instance diagram. When the chain topology ambiguity is identified, a predefined default rule set is invoked, and a chain connection relationship is established for multiple devices assigned to the same controller physical port based on the order of appearance of the devices in the network configuration table. After establishing the chain connection relationship, the topology construction decision is marked as the target state, and the marking information is synchronously added to the information of the items to be reviewed in the verification report. The topology construction decision is based on the default rules to determine the chain connection relationship, and the confidence level of the target state is lower than a preset value.
[0061] In practice, the controller node traversal process is initiated, scanning all controller nodes (such as PLC nodes) in the project instance diagram one by one. The physical port allocation record of each controller node (such as the device list corresponding to Port1 and Port2) is read, and it is checked whether there are multiple devices associated with the same physical port. If such a situation exists, the system automatically determines that there is an undefined chain topology ambiguity in the project instance diagram. Once the chain topology ambiguity is identified, the program calls the predefined default rule set, extracts the rule "determines the chain connection relationship based on the order in which devices appear in the network configuration table" from the rule set, and then calls... The original network configuration table is used to establish a chain connection relationship of "controller port → D1 → D2" for these devices in the project instance diagram according to the order in which the multiple devices appear in the table (e.g., device D1 appears before D2). After the chain connection relationship is established, the program marks the topology construction decision of "determining the chain connection relationship based on default rules" as a low confidence state (e.g., 0.3), which is lower than the preset confidence threshold (e.g., 0.6). Finally, the confidence mark, the corresponding topology construction decision content and the device information involved are synchronously added to the information section of the verification report to be reviewed, the report content is updated and saved.
[0062] S103. Parse the declarative description file and generate the corresponding API call instructions for the industrial control system integration development environment.
[0063] Specifically, the API call instructions of the industrial control system integration development environment refer to standardized program instructions that can be recognized and executed by the industrial control system integration development environment.
[0064] In specific implementation, the declarative description file is structured and parsed to extract project information, device object information, and topology relationship information. Based on the project information, the project creation parameters of the target industrial control system integration development environment are determined, and project initialization instructions are generated. Based on the device model and parameter configuration in the device object information, hardware device addition instructions and corresponding parameter setting instructions are generated. Based on the subnet type, device connection relationship, and communication protocol requirements in the topology relationship information, network creation instructions and device connection instructions are generated. According to the logical order of project initialization, hardware addition, parameter setting, network creation, and device connection, the generated instructions are sorted to form an executable API call instruction sequence.
[0065] Specifically, the declarative description file is parsed to extract project information (including project name, version number, etc.), device object information (including model and parameter configuration of each device), and topology information (including subnet type, device connection relationship, communication protocol requirements, etc.). Based on the extracted project information, the project creation parameters required by the target industrial control system integration development environment (such as project storage path, compatible development environment version, etc.) are determined, and project initialization instructions for creating a blank project in the development environment are generated based on the project creation parameters. According to the device model in the device object information, hardware device addition instructions are generated to add the corresponding hardware device to the project; simultaneously, according to the parameter configuration content in the device object information, parameter setting instructions are generated to configure the operating parameters for each added hardware device. Based on the subnet type in the topology information, network creation instructions are generated to build the corresponding communication subnet in the project; combining the device connection relationship and communication protocol requirements in the topology information, device connection instructions are generated to connect each hardware device to the corresponding subnet according to specified logic. Following the logical sequence of "project initialization → hardware addition → parameter setting → network creation → device connection", the generated project initialization instructions, hardware device addition instructions, parameter setting instructions, network creation instructions, and device connection instructions are sorted and combined to form an API call instruction sequence that can be directly executed by the industrial control system integration development environment.
[0066] For example, for each device object in the `devices` array, a `IDE.Hardware.AddDeviceByArticleNumber()` instruction is generated; for each key-value pair in `parameters`, a `Device.SetParameter()` instruction is generated.
[0067] S104. Execute API call instructions in a preset order to complete the hardware configuration of the industrial control system.
[0068] In practice, the following steps are executed: First, the project initialization command is executed to create a blank project in the industrial control system integration development environment and configure basic project information. After project initialization, the hardware device addition command is executed to add all types of hardware devices included in the device manifest file to the project. After the hardware devices are added, the parameter setting command is executed to configure operating parameters for each hardware device according to the device parameter configuration content in the declarative description file. After parameter configuration, the network creation command is executed to build the corresponding communication network based on the topology information. After the communication network is created, the device connection command is executed to connect each hardware device to the corresponding communication network according to the topology. After all commands are executed, the configuration results are verified for completeness to confirm that the hardware device addition, parameter configuration, and network connection all meet the requirements of the declarative description file, thus completing the industrial control system hardware configuration.
[0069] Specifically, the process involves calling the industrial control system integration development environment (ICS) API to create a blank project and configuring basic information such as project name and version number according to instructions. Within the created blank project, various hardware devices from the device manifest file are added one by one according to the instructions. For each added hardware device, the required parameters for operation are configured according to the device parameter configuration content in the declarative description file. Based on the topology information, a communication network consistent with the description is constructed in the project using instructions. Device connection instructions are executed to connect each hardware device to the corresponding communication network according to the topology. After all instructions are executed, the hardware device addition, parameter configuration, and network connection status are checked to ensure they match the requirements of the declarative description file. Upon successful verification, the industrial control system hardware configuration is confirmed to be complete.
[0070] The method provided in this embodiment, in its first aspect, offers a standardized and automated implementation path for industrial control automatic hardware configuration through a full-process design of "receiving multiple structured project design forms → generating declarative description files based on a large language model and domain knowledge base → parsing the files to generate API call instructions → executing the instructions in sequence": When receiving project design forms, it ensures that the three core data types—equipment list, network configuration table, and IO point table—are complete, guaranteeing the integrity and accuracy of configuration data from the source; when processing forms based on a large language model and domain knowledge base, it accurately captures key information by leveraging the semantic parsing and entity extraction capabilities of the large language model, and verifies hardware specifications and compatibility by combining the industrial control-specific knowledge of the domain knowledge base, transforming the form data into a standardized declarative description file, thus solving the problem of converting form data into configuration information; parsing the description file achieves seamless connection from abstract configuration requirements to specific operations, avoiding confusion and omissions in manual operations, significantly reducing the technical threshold, and improving configuration efficiency and accuracy.
[0071] Secondly, the project instance diagram built during the generation of declarative description files can accurately adapt to the special technical needs of the industrial control field and overcome the limitations of general network diagrams. The project instance diagram restores the physical and logical subordination of hardware by defining the mandatory hierarchy and container relationship of "IO module-base-IO station rack-PLC", avoiding isolated devices. The bus is treated as an independent node, and the devices are connected to the bus through edges with port attributes, clarifying the port type and connection legality, and clearly distinguishing the roles of heterogeneous networks and devices such as Profinet and TCP / IP. At the same time, the domain knowledge base is combined to verify resource constraints (such as IO station backplane power and PLC device access limit), avoiding the risk of resource overruns in advance, ensuring that the configuration information carried by the declarative description file meets the compliance requirements of the industrial control field, and providing a reliable data foundation for subsequent instruction generation.
[0072] Thirdly, the project instance diagram is constructed using a step-by-step approach: "creating an empty directed graph → creating device nodes and attaching attributes → finding and verifying parent nodes and resources for IO modules → creating bus nodes and establishing port connections → performing set operations to compare device name sets." This approach ensures the accuracy and logic of configuration information in detail: creating device nodes and attaching attributes for each unique device ensures the unique identification and complete information recording of the hardware entity; when processing IO modules, the parent node is matched first, then the technical specifications are checked, and finally resource accumulation verification is performed, which both follows hierarchical constraints and ensures resource compliance; the setting of bus nodes and edges with port attributes accurately restores the industrial control network connection logic; the set operation compares the device name set to verify whether the device to be connected is defined in the device list, preventing virtual connections. Ultimately, the project instance diagram can completely map the physical structure, logical relationships, and technical constraints of the industrial control system, providing a structured and verified data source for the generation of declarative description files, ensuring that subsequent API command execution can achieve hardware configuration that meets actual needs.
[0073] Corresponding to the aforementioned embodiment of an AI-based industrial control automatic hardware configuration method, this application also provides an embodiment of an AI-based industrial control automatic hardware configuration system.
[0074] Figure 2 This is a schematic diagram of the structure of the artificial intelligence-based industrial control automatic hardware configuration system provided in Embodiment 2 of this application. Please refer to... Figure 2 The device provided in this embodiment includes an input and interaction module 210, a cognition and generation module 220, and an execution and adaptation module 230.
[0075] The input and interaction module 210 is used to receive multiple structured project design forms; the project design forms include a device list, a network configuration table, and an I / O point table.
[0076] The cognition and generation module 220 is used to perform semantic parsing on the project design table based on a large language model and a domain knowledge base, and generate a declarative description file.
[0077] The execution and adaptation module 230 is used to parse the declarative description file, generate corresponding industrial control system integrated development environment API call instructions, and execute the API call instructions in a preset order to complete the industrial control system hardware configuration.
[0078] The apparatus of this embodiment can be used to perform... Figure 1 The steps of the method embodiment shown are similar in principle and process, and will not be repeated here.
[0079] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0080] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0081] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An artificial intelligence-based method for automatic hardware configuration in industrial control systems, characterized in that, The method includes: Receive multiple structured project design forms; the project design forms include an equipment list, a network configuration table, and an I / O point table; Semantic parsing of the project design table is performed based on a large language model and domain knowledge base to generate a declarative description file; The declarative description file is parsed to generate the corresponding API call instructions for the industrial control system integration development environment; Execute API call instructions in a preset order to complete the hardware configuration of the industrial control system; The semantic parsing of the project design table based on a large language model and domain knowledge base generates a declarative description file, including: A large language model is used to perform semantic parsing on the cell content of the project design table. Key information entities in the project design table are located and extracted through named entity recognition. By extracting relationships, the logical connections between the key information entities are parsed and determined, forming a structured information set; Based on the key information entities and structured information set, a project instance diagram is constructed. During the construction of the project instance diagram, the order number in the entity extracted from the IO point table is used as the primary key to query the domain knowledge base to obtain hardware technical specifications. Based on the hardware technical specifications, the project instance diagram is verified and adjusted. Based on the device logical hierarchy and connection relationship in the project instance diagram, the visual layout information is calculated through a layout algorithm. All entities, attributes and relationships in the project instance diagram, as well as the visual layout information, are output in a standardized form to generate a declarative description file. The method integrates basic information, results information, and information on items to be reviewed according to a preset format to generate a verification report; after manual verification based on the verification report, the method further includes: Traverse all controller nodes in the project instance graph and check if there are multiple devices assigned to the same controller physical port. If so, it is determined that there is an undefined chain topology ambiguity in the project instance graph. When the chain topology ambiguity is identified, a predefined default rule set is invoked, and a chain connection relationship is established for multiple devices assigned to the same controller physical port based on the order in which the devices appear in the network configuration table. After establishing the chain connection relationship, the topology construction decision is marked as the target state, and the marking information is synchronously added to the information of the items to be reviewed in the verification report; the topology construction decision is to determine the chain connection relationship based on default rules, and the confidence level of the target state is lower than a preset value.
2. The method according to claim 1, characterized in that, The construction of the project instance diagram based on the key information entities and structured information set includes: Create an empty directed graph in memory; Based on the key information entities extracted from the device list and network configuration table, a device node is created in the directed graph for each unique device, and entity attributes are attached to the corresponding node; When an IO module is parsed, the parent node of the IO station to which the IO module belongs is found in the directed graph. The hardware technical specifications are obtained by querying the domain knowledge base with the order number of the IO module. Resource accumulation calculation is performed on the parent node and compared with the upper limit of IO station resources in the hardware technical specifications. After the verification is passed, the information of the IO module is stored as a structured attribute in the parent node. Based on the entity relationships in the network configuration table, a bus node is created as an independent node in the directed graph. Device nodes are connected to the bus node through edges carrying port attributes. During the connection process, the device name set in the project design table is compared using set operations.
3. The method according to claim 1, characterized in that, After generating the declarative description file, the method further includes: Record the name, version, and data source of each table in the project design forms as the basic information for the verification report; Traverse the project instance diagram, extract and organize all successfully created hardware node information and network connection relationships in the project instance diagram to form a hardware and network connection list, which serves as the result information of the verification report; Retrieve log data from the construction and synchronization verification process of the project instance graph, filter and classify logical inconsistency errors in the construction process and operation records of applying default rules in the construction process, as information to be reviewed in the verification report; The basic information, results information, and items to be reviewed are integrated according to a preset format to generate a verification report; The system provides support for using the verification report. The basic information in the verification report helps technicians verify the accuracy of the data source, the result information helps technicians confirm the completeness of the configuration results, and the information on items to be reviewed prompts technicians to correct logical errors in the IDE and manually verify the default rule application items.
4. The method according to claim 1, characterized in that, Before generating the declarative description file, the method further includes: Based on the domain knowledge base, a logical consistency audit is performed on the structured information set, and an audit report is generated; Based on the audit report, the user triggers an instruction to modify the structured information set or project instance diagram.
5. The method according to claim 1, characterized in that, The process of parsing the declarative description file and generating corresponding API call instructions for the industrial control system integration development environment includes: The declarative description file is structured and parsed to extract project information, device object information, and topology relationship information; Based on the project information, determine the project creation parameters for the target industrial control system integration development environment and generate project initialization instructions; Based on the device model and parameter configuration in the device object information, generate hardware device addition instructions and corresponding parameter setting instructions; Based on the subnet type, device connection relationship, and communication protocol requirements in the topology information, generate network creation instructions and device connection instructions; Following the logical sequence of project initialization, hardware addition, parameter setting, network creation, and device connection, the generated instructions are sorted to form an executable API call instruction sequence.
6. The method according to claim 1, characterized in that, The API call instructions are executed in a preset order to complete the hardware configuration of the industrial control system, including: Execute the project initialization command to create a blank project in the industrial control system integration development environment and configure the basic project information; After the project initialization is complete, execute the hardware device addition command to add various hardware devices contained in the device manifest file to the project; After the hardware devices are added, the parameter setting command is executed to configure the operating parameters for each hardware device according to the device parameter configuration content in the declarative description file; After the parameters are configured, execute the network creation command to build the corresponding communication network based on the topology information; After the communication network is created, execute the device connection command to connect each hardware device to the corresponding communication network according to the topology; After all instructions are executed, the configuration results are checked for completeness to confirm that the addition of hardware devices, parameter configuration, and network connection all meet the requirements of the declarative description file, thus completing the hardware configuration of the industrial control system.
7. The method according to claim 1, characterized in that, After receiving multiple structured project design forms, the method further includes: Perform a necessity check on the project design table to determine whether the project design table includes an equipment list, a network configuration table, and an I / O point table. When it is detected that any sub-table in the project design table is missing, a prompt message is generated to guide the user to fill in the missing content. Repeat the detection and prompting steps until the received project design form contains a device list, network configuration table, and I / O point table.
8. An industrial control automatic hardware configuration system based on artificial intelligence, characterized in that, The AI-based industrial control automatic hardware configuration system includes an input and interaction module, a cognition and generation module, and an execution and adaptation module. The input and interaction module is used to receive multiple structured project design forms; the project design forms include a device list, a network configuration table, and an I / O point table. The cognition and generation module is used to perform semantic parsing on the project design table based on a large language model and a domain knowledge base, and generate a declarative description file. The execution and adaptation module is used to parse the declarative description file, generate corresponding API call instructions for the industrial control system integration development environment, and execute the API call instructions in a preset order to complete the hardware configuration of the industrial control system. The semantic parsing of the project design table based on a large language model and domain knowledge base generates a declarative description file, including: A large language model is used to perform semantic parsing on the cell content of the project design table. Key information entities in the project design table are located and extracted through named entity recognition. By extracting relationships, the logical connections between the key information entities are parsed and determined, forming a structured information set; Based on the key information entities and structured information set, a project instance diagram is constructed. During the construction of the project instance diagram, the order number in the entity extracted from the IO point table is used as the primary key to query the domain knowledge base to obtain hardware technical specifications. Based on the hardware technical specifications, the project instance diagram is verified and adjusted. Based on the device logical hierarchy and connection relationship in the project instance diagram, the visual layout information is calculated through a layout algorithm. All entities, attributes and relationships in the project instance diagram, as well as the visual layout information, are output in a standardized form to generate a declarative description file. The basic information, results information, and information on items to be reviewed are integrated according to a preset format to generate a verification report; after manual verification based on the verification report, the following is also included: Traverse all controller nodes in the project instance graph and check if there are multiple devices assigned to the same controller physical port. If so, it is determined that there is an undefined chain topology ambiguity in the project instance graph. When the chain topology ambiguity is identified, a predefined default rule set is invoked, and a chain connection relationship is established for multiple devices assigned to the same controller physical port based on the order in which the devices appear in the network configuration table. After establishing the chain connection relationship, the topology construction decision is marked as the target state, and the marking information is synchronously added to the information of the items to be reviewed in the verification report; the topology construction decision is to determine the chain connection relationship based on default rules, and the confidence level of the target state is lower than a preset value.