Method and apparatus for establishing control logic for at least one component
Patent Information
- Application Number
- CN202610538709.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-04-23
- Filing Date
- 2026-04-22
- Publication Date
- 2026-10-23
AI Technical Summary
这限制了经验不足的用户的可访问性,并且增加了培训工作量
Smart Images

Figure CN122963060A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to methods and apparatus for establishing control logic for at least one component. The component may include one or more sensors and / or one or more actuators. Background Technology
[0002] IO (Input / Output) Link is a standardized, manufacturer-independent communication interface used in automation technology for sensors and actuators. It enables bidirectional point-to-point communication between the control system and field devices, thereby facilitating simple parameterization, diagnostics, and efficient transmission of process data.
[0003] An IO-Link master is the link between IO-Link devices (such as sensors or actuators) and higher-level automation systems (such as PLCs or IoT platforms). It coordinates communication, acquires data from connected IO-Link devices, and typically further transmits that data via fieldbuses such as Profinet or Ethernet / IP. Furthermore, IO-Link masters play a crucial role in IoT applications because they can forward data to cloud or IoT systems via protocols such as MQTT or OPC UA. Therefore, an IO-Link master acts as a gateway between traditional control levels and modern IoT infrastructure.
[0004] A logic editor is a software application or tool used to graphically create and edit control logic. It enables the definition of logical sequences using symbols and / or graphical modules and / or logical links (such as AND, OR, timers) without requiring text-based programming for this purpose. Thus, even complex control tasks can be created and visualized intuitively, which aids in the development and testing of automation solutions. Logic editors are commonly used in industrial automation to configure controls and devices (in other words, components).
[0005] Typically, when configuring an IO-Link master gateway, it is stipulated that logic links and control tasks be established using a graphical logic editor or by programming directly in a programmable logic controller (PLC). These methods require specialized technical knowledge, especially when using a PLC, where writing and testing program code is necessary. While logic editors used in industrial automation environments do provide a visual interface, the complexity of logic definition remains. The learning curve for logic editors is not particularly steep, but users must possess knowledge of numerical formats and logic links, and must be able to break down the target application into smaller logical operations, which is not always easy. Furthermore, interaction primarily occurs through a user-defined interface that does not support natural language processing, making it unintuitive to use. This results in time-consuming establishment and adjustment of control logic.
[0006] For example, the logic editor can be used with SIG200 or SIG300.
[0007] Using traditional logic editors and PLC programming requires specialized technical knowledge, which not every user possesses. This limits accessibility for less experienced users and increases training workload. Furthermore, the process of building and tuning control logic is time-consuming, especially if complex links must be manually established. Additionally, the likelihood of errors is high because users must define logic in small steps and there is no support for natural language processing. This often leads to misconfigurations and increased testing and correction needs. Using a PLC also requires additional hardware and software, resulting in additional costs. Finally, the available interfaces for building logic are often unintuitive and require detailed knowledge of the underlying system architecture, limiting the efficiency and flexibility of automation solutions. Summary of the Invention
[0008] The purpose of this invention is to reduce the complexity and workload when establishing logical links and control logic for IO-Link master gateways. Traditional logic editors or programming directly in programmable logic controllers (PLCs) require specialized knowledge and a significant amount of manual configuration, which limits accessibility and increases the likelihood of errors. This poses a particular challenge to users without in-depth programming knowledge.
[0009] The objective is achieved by a method having the features of claim 1, an apparatus having the features of claim 14, and a computer-readable storage medium having the features of claim 15.
[0010] The method for establishing control logic for at least one component according to the present invention includes: sending component description data to a large language model, wherein the component description data describes at least one component; sending logic description information to the large language model, wherein the logic description information has information about the control logic to be established; and instructing the large language model to establish the control logic based on the component description data and the logic description information.
[0011] Specifically, the method provides an interface for sending component description data to a large language model, wherein the component description data describes the at least one component; for sending logical description information to the large language model, wherein the logical description information has information about the control logic to be established; and for instructing the large language model to establish the control logic based on the component description data and the logical description information.
[0012] In other words, provide an LLM (large language model) to replace (or supersede) the logic editor in the IO-Link master gateway.
[0013] Large Language Models (LLMs) are artificial neural networks trained to understand and generate language. They use large amounts of text data to identify patterns and relevances in language and generate answers based on this. These models use a large number of parameters, which enables them to process language at a high level.
[0014] In one embodiment, the component description data is sent to the large language model via prompt words. This sending can occur along with each instruction used to build the graphical interface. Therefore, it is not necessary to specifically train the large language model with component description data. Thus, a standard large language model can be used.
[0015] In one embodiment, input data is sent to the LLM as a prompt word component. The input data may include system prompt words, user prompt words, and contextual data.
[0016] System prompts may include information about the following: available logic modules and / or supported interfaces and data types, and / or basic system parameters.
[0017] User prompts may include information about the following: a natural language description of the required logic, and / or indications of the device, connection, and conditions, and / or specifications of value ranges and conversions.
[0018] Context data may include information about the following: IODD information of the devices involved and / or gateway configuration and available resources and / or connections and interface allocation.
[0019] Component description data can be based on device descriptions. For example, a device description can be an IO (input / output) device description (IODD).
[0020] In one embodiment, the device description can be divided into multiple segments. In this respect, segments can be understood as (short) excerpts or summaries derived from larger text. This allows for the segmentation of a device description, which can be very large, into smaller parts. Further reduction in the size of the data to be sent to the LLM can be achieved by computing the embeddings of multiple segments and using them as component description data.
[0021] Embeddings can be mathematical representations of words, sentences, or other data points in a continuous vector space. Because of embeddings, textual data such as device descriptions or fragments can be brought into a form with a smaller data volume and more easily processed by LLMs. Embeddings can be generated through a training process where the model processes large amounts of text data. During this training process, the model learns to recognize semantic relationships between words and encodes them into vectors. For example, embeddings can be generated using methods such as Word2Vec, GloVe (Global Vectors for Word Representation), or BERT and GPT.
[0022] In one embodiment, information about available logic modules and / or supported interfaces and / or supported data types and / or basic system parameters is sent to the large language model.
[0023] This method may further include requesting logical description information from the user. In this respect, the user can input the desired logic in natural language without having to refer to the details of the component's technical characteristics. Therefore, this method is also unusable for personnel with little or no training.
[0024] The method may further include obtaining the control logic from a large language model. This can be performed by the LLM in response to instructions.
[0025] In one embodiment, the method can further instruct the large language model to adjust the control logic. Therefore, the user can iterate through the establishment of the control logic. In this regard, the user can submit a request to the LLM to change the control logic. In this respect, the method provides an interface for instructing the large language model to adjust the control logic.
[0026] The control logic has a structured logical description and / or a visual representation of the logic and / or executable configuration code.
[0027] In further development, this method could include instructing the Large Language Model (LLM) to establish thought chain cues. In this respect, thought chain cues are techniques that enable the LLM to display comprehensible thought processes. Encouraging the LLM to present its "thoughts" in a logical order, rather than simply providing a direct answer, can lead to more accurate and informed results.
[0028] In one embodiment, the large language model may include, be, or be based on at least one of the following models: ChatGPT or Deepseek.
[0029] The object of the present invention is further satisfied by an apparatus for establishing control logic for at least one component, the apparatus having the following devices: a device for sending component description data to a large language model, wherein the component description data describes the at least one component; a device for sending logic description information to the large language model, wherein the logic description information has information about the control logic to be established; and a device for instructing the large language model to establish the control logic based on the component description data and the logic description information.
[0030] The object of the present invention is further satisfied by a computer-readable storage medium including commands that, when executed by a computer, cause the computer to perform the methods described herein.
[0031] Other advantageous embodiments of the method according to the invention are derived from the dependent claims, drawings and description. Attached Figure Description
[0032] The present invention will now be described with reference to exemplary embodiments and accompanying drawings. The following is illustrated in schematic form:
[0033] Figure 1 This is a system diagram of a system for establishing logic according to an embodiment; and
[0034] Figure 2 This is a flowchart illustrating a method for establishing control logic for at least one component according to an embodiment. Detailed Implementation
[0035] In the following, the methods and apparatus according to the present invention will be explained by way of example with reference to embodiments.
[0036] This invention relates to using a trained Large Language Model (LLM) to take over the task of a logic editor in the context of an IO-Link master gateway. Traditionally, logic editors are used to configure IO-Link master gateways or directly execute logic links within a programmable logic controller (PLC) to establish complex logic links and configuration rules required to control industrial automation processes. Typical logic modules included in these processes include Boolean operations (AND, OR, NOT, XOR, etc.), timers, counters, comparison operators, mathematical operations, and if-then conditions for the conditional execution of actions. The purpose of this invention is to replace the logic editor with an LLM, allowing users to formulate and execute complex logic operations through natural language input (prompts). An LLM can be specifically trained for this purpose.
[0037] Figure 1The diagram shows a system diagram 100 for establishing logic according to one embodiment. IODD 102 of the first component 104, system description 106 of the second component 108, and IODD 110 of the third component 112 are sent to an LLM 116 along with a prompt word 114. The LLM 116 generates a sequence of logical operations 118 (e.g., logical operations 122, 124, 126, 128) and makes them usable by the user. IODD 102, system description 106, and IODD 110 are examples of component descriptions. The user can provide feedback (user feedback 120), thereby establishing a feedback loop with the LLM 116, allowing the LLM 116 to iteratively adjust the logical operations based on the user feedback 120.
[0038] The training process of LLM is based on the contents of IO Device Descriptions (IODDs), which describe what the components (such as sensors and actuators) can do, and the system description based on the LLM operation, to know which connections exist and which interfaces are available (e.g., IoT, fieldbus, IO-Link, Ethernet, digital inputs and outputs, etc.). Furthermore, existing logic modules and desired output behaviors are considered. The model can be trained using a variety of sample tasks reflecting different logic configurations, decision-making processes, and control sequences. This data can include not only the structure of the logic itself but also the specific contexts in which these logics are used, such as sensor data processing, device communication, and automation scenarios.
[0039] LLM training can be divided into several stages: basic training, followed by domain-specific fine-tuning, and confirmation and validation.
[0040] Basic training can include basic training with a general language model to ensure natural language processing.
[0041] Domain-specific fine-tuning can include additional training based on specific IO-Link use cases and logic editor documentation.
[0042] During verification and validation, the correctness and reliability of the model can be ensured by simulating the verification results and comparing them with typical tasks of a regular logic editor.
[0043] In one embodiment, a large language model can be used, where only fine-tuning is performed by the model itself. Alternatively, a separate LLM can be trained based on the basic training.
[0044] The correct implementation of an LLM can be verified through various methods. For example, this can occur through a visual representation with user feedback, where, based on the established logic, the user can track whether the implementation corresponds to their idea and can confirm it via a button or correct it via drag and drop. This provides a feedback loop for continuous improvement of the LLM. Alternatively or additionally, a simulated implementation can be performed for testing purposes, where the implemented logic can be tested and verified based on sample data by reproducing the logic steps in a simple simulation.
[0045] The methods and apparatus according to different embodiments enable rapid implementation of application and test logic, fast response time to change requests, and reduced workload for establishing and adjusting control logic. Furthermore, natural language input increases user-friendliness, allowing users without in-depth technical knowledge to establish complex logic. The possibility of errors can be reduced through automatic logic generation. In this respect, no additional hardware or software is required, as is the case with PLC-based solutions. Rapid adaptation and high flexibility in automation are possible through the use of trained LLMs.
[0046] Different implementations can be used for all types of sensors and actuators, such as SIMs (Sensor Integration Machines) and / or SIGs (Sensor Integration Gateways) that already have a logic editor.
[0047] IODD can be defined by the IO-Link Alliance specification, such as the one available at https: / / io-link.com / share / Downloads / Package-2024-released / IO-Device-Desc-Spec_10012_V114_Jun24.zip.
[0048] For example, IODD includes the following elements:
[0049] - Document information: including version information, release date, and copyright information;
[0050] - Configuration file header: indicates constant information, such as configuration file identifier, configuration file revision, and configuration file category ID;
[0051] - Configuration file body: Describes the device's identity and functions;
[0052] - Communication network configuration file: describes the communication characteristics of the device;
[0053] - External text collection: including language-dependent descriptive text;
[0054] - Seal: Includes a checksum used for verification purposes to ensure that the document has not been modified;
[0055] - Device Identification: Includes information about the device's identity, such as the manufacturer ID and device ID;
[0056] - Device variant collection: Lists different variants of the device, such as those that differ in design or connection type;
[0057] - Features: Defines specific functions of the device, such as whether it supports block parameter transfer;
[0058] - Data type set: Includes the data types used in IODD, such as those used for parameters or process data;
[0059] - Variables: Define the variables used in the device and their data types;
[0060] - Process Data Set: Describes the process data sent or received by the device;
[0061] - Error type set: Lists the error types supported by the device;
[0062] - Event collection: Defines the different events that the device can trigger;
[0063] - User interface: including menus, buttons, and references to user interface variables;
[0064] - Communication characteristics: Define network profiles and connection types, such as connector types;
[0065] - Language file (optional): Supports additional languages for the IODD file so that the device can be described in multiple languages;
[0066] - Image files (optional): including manufacturer identification and equipment symbols for graphical representation;
[0067] - Schema file: Ensures that the XML structure of the IODD file is correct and can be validated according to predefined rules.
[0068] The LLM-based system according to the present invention is used to replace traditional logic editors, realizing a structured data flow from natural language requirements to precise, executable logic configuration.
[0069] Input data to the LLM (which is transmitted to the LLM as a prompt word component) may include system prompt words, user prompt words, and contextual data.
[0070] System prompts (which can be constant basic context) may include information about the following: available logical modules and / or supported interfaces and data types, and / or basic system parameters.
[0071] User prompts (which may be optional) may include information about the following: a natural language description of the required logic, and / or indications of the device, connection and conditions, and / or descriptions of value ranges and conversions.
[0072] Context data (which can be dynamic) may include information about the following: IODD information of the device involved and / or gateway configuration and available resources and / or connection allocation and interface allocation.
[0073] The output data of LLM may include structured logical descriptions (e.g., in JSON / XML format) and / or visual representations for feedback / verification and / or executable configuration code for the IO-Link master site.
[0074] Depending on the implementation, the input processing pipeline (i.e., converting natural language descriptions into precise logical specifications) can occur in four main stages, as shown in Tables 1, 2, 3 and 4.
[0075]
[0076]
[0077]
[0078]
[0079] Appendix 1 shows examples of system prompts.
[0080] The context for using LLM can be set in the system prompt ("You are the logic assistant of the IO-Link master gateway. Your task is to translate natural language descriptions into precise logical elements."). Additionally, available logical modules ("Available logical modules:...") and available data types ("Available data types:...") can be defined. Furthermore, tasks for LLM can be defined ("Generate for each request:...").
[0081] Appendix 2 shows an example of user prompts. User prompts can be entered by the user in natural language and define what the user wants to receive. In this regard, the user can describe the desired logic by specifying the components to be used ("I want to connect the distance sensor (DT50) to port 1 and the signal light (SLT) to port 2."), and can define the desired logic or the desired display range ("The signal light should display the distance measured by the sensor. The sensor's measurement range is 0 mm - 5000 mm, but the signal light should only display values between 50 mm and 500 mm. If the distance is less than 50 mm, the signal light should flash red.").
[0082] Appendix 3 shows an example of the logic processing algorithm. Appendix 4 shows an example of the generation logic (or logic structure) built for an example with a distance sensor and traffic lights.
[0083] The following additional data can be used to generate logic using LLM: IODD metadata, gateway specifications, and / or logic element libraries.
[0084] IODD metadata can include information about device identity and functional description, process data structure and data type, supported parameters and configuration options, and / or events and error messages.
[0085] Gateway specifications may include information about available hardware resources (CPU, memory), supported communication protocols, timing constraints and real-time capabilities, and / or security features and access restrictions.
[0086] The logic element library may include a complete description of all available logic modules, functional specifications with input / output parameters, performance characteristics, and / or a compatibility matrix for cascading.
[0087] Preprocessing may include extracting relevant IODD data, generating system context, and / or expanding prompt words.
[0088] Extraction of relevant IODD data may include automatic evaluation of IODD files, identification of relevant parameters and process data, and / or structuring of device attributes.
[0089] System context generation may include analysis of available interfaces and connections, creation of system contexts with connection options, and / or integration of main site gateway functionality.
[0090] Prompt word expansion may include supplementing user prompt words with structured IODD information, adding available variables and data types, and / or providing relevant constraints.
[0091] Post-processing may include logic verification, visualization generation, and / or configuration code generation.
[0092] Logical validation can include checking for syntax correctness, checking for data type compatibility, and / or identifying potential value range out-of-range values.
[0093] Visualization generation can include converting JSON / XML logic descriptions into flowcharts, color coding of different logic modules, and / or interactive displays with input / output values.
[0094] Configuration code generation can include converting logical descriptions into executable code, taking into account device-specific constraints, and / or optimizing resource efficiency.
[0095] Figure 2 A flowchart 200 illustrating a method for establishing control logic for at least one component according to an embodiment is shown. In 202, component description data is sent to a large language model. The component description data describes at least one component. In 204, logic description information is sent to the large language model, wherein the logic description information has information about the control logic to be established. In 206, the large language model is instructed to establish the control logic based on the component description data and the logic description information.
[0096] In one embodiment, component description data is sent to a large language model via prompt words.
[0097] In one embodiment, the component description data is based on the device description.
[0098] In one embodiment, the input data to the LLM (which is sent to the LLM as a prompt word component) includes system prompt words, user prompt words, and contextual data.
[0099] In one embodiment, the system prompt includes information about the available logic modules and / or supported interfaces and data types, and / or basic system parameters.
[0100] In one embodiment, the user prompt includes information about: a natural language description of the required logic, and / or indications of the device, connection, and conditions, and / or descriptions of value ranges and conversions.
[0101] In one embodiment, the context data includes information about the following: IODD information of the device involved and / or gateway configuration and available resources and / or connection allocation and interface allocation.
[0102] In one embodiment, the device description is divided into multiple segments.
[0103] In one embodiment, the embeddings of multiple fragments are calculated, and the embeddings are used as component description data.
[0104] In one embodiment, information about available logic modules and / or supported interfaces and / or supported data types and / or basic system parameters is sent to the large language model.
[0105] In one embodiment, the logical description information is requested from the user.
[0106] In one embodiment, the logic description information describes the control logic to be established in natural language.
[0107] In one embodiment, the control logic is derived from a large language model.
[0108] In one embodiment, the large language model is instructed to adjust the control logic.
[0109] In one embodiment, the control logic includes either a structured logic description and / or a visual representation of the logic and / or executable configuration code.
[0110] In one embodiment, the large language model is instructed to establish thought chain prompts.
[0111] In one embodiment, the large language model includes or is based on at least one of the following models: ChatGPT or Deepseek.
[0112] List of reference numerals
[0113] 100 System diagram of a system for generating logic according to an embodiment
[0114] 102 IODD
[0115] 104 First Component
[0116] 106 System Description
[0117] 108 Second Component
[0118] 110 IODD
[0119] 112 Third Component
[0120] 114 Prompt words
[0121] 116 LLM
[0122] 118 Logical Operations
[0123] 120 User Feedback
[0124] 122 Logical Operations
[0125] 124 Logical Operations
[0126] 126 Logical Operations
[0127] 128 Logical Operations
[0128] 200 shows a flowchart of a method for establishing control logic for at least one component according to an embodiment.
[0129] 202 Steps for sending component description data to a large language model
[0130] 204 Steps for sending logical description information to a large language model
[0131] 206 is used to instruct large language models to build control logic based on component description data and logic description information.
[0132] Appendix 1: Examples of System Prompt Terms
[0133] You are the logic assistant for the IO-Link master gateway. Your task is to translate natural language descriptions into precise logical elements.
[0134] Available logic modules:
[0135] - Boolean operations: AND, OR, NOT, XOR
[0136] - Mathematical operations: addition, subtraction, multiplication, division, normalization - Comparison operators: >, <, =, >=, <=, !=
[0137] - Time operations: Timers, delays, counters
[0138] - Conversion: Floating-point to integer, integer to floating-point, bitwise operations
[0139] Available interfaces in the system:
[0140] - IO-Link ports: P1, P2, P3, P4, P5, P6, P7, P8
[0141] - Digital inputs / outputs: DI1, DI2, DO1, DO2
[0142] - Communication interfaces: MQTT, OPC UA, Ethernet / IP, PROFINET
[0143] Available data types:
[0144] - Integers (8-bit, 16-bit, 32-bit)
[0145] - Floating-point number (32 bits)
[0146] - Boolean value
[0147] - Arrays and structures conforming to the IODD specification
[0148] Generate for each request:
[0149] 1. Description of structured logical elements in JSON format
[0150] 2. A textual explanation of the implementation logic.
[0151] 3. Visualization of logical steps
[0152] Appendix 2: Examples of User Prompts
[0153] I want to connect a distance sensor (DT50) to port 1 and a signal light (SLT) to port 2. The signal light should indicate the distance measured by the sensor. The sensor's measurement range is 0mm-5000mm, but the signal light should only display values between 50mm and 500mm. If the distance is less than 50mm, the signal light should flash red.
[0154] Appendix 3: Examples of Logical Processing Algorithms
[0155] Input: Natural language prompts + contextual data (IODDs, gateway configuration)
[0156] Output: Formal logic description
[0157] Algorithm input processing:
[0158] 1. Text segmentation (prompt words) segment
[0159] 2. Entity extraction (segment, iodd) entities
[0160] - Equipment entity
[0161] - Measurement Variable Entity
[0162] - Action Entity
[0163] - Conditional Entity
[0164] 3. Relation Extraction (Entity) Relation
[0165] - causation
[0166] - Conversion Relationship
[0167] - Conditional Relationship
[0168] 4. Requirement mapping (relational, IODD) logical_requirements
[0169] - Matching natural language with the IO-Link concept
[0170] - Identify implicit needs
[0171] - Resolve ambiguity
[0172] 5. Logical graph creation (logical_requirements) initial_graph
[0173] - Nodes are used to represent data sources, transformations, conditions, and actions.
[0174] - Edges are used to represent data flow
[0175] 6. Logical optimization applications (initial_graph) and optimized_graph
[0176] - Eliminate redundant calculations
[0177] - Parallelize independent operations
[0178] - Merging continuous transformations
[0179] 7. Availability checks performance (optimized_graph, gateway_capabilities) and validated_graph
[0180] - Check supported operations
[0181] - Resource utilization rate estimation
[0182] - Identify restrictions
[0183] 8. Logical serialization (validated_graph, target_format) formalized_logic
[0184] - Convert to a machine-readable representation
[0185] - Add metadata (version, dependencies)
[0186] - Generate document
[0187] Appendix 4: Examples of Generation Logic
[0188]
[0189]
[0190]
Claims
1. A method for establishing control logic for at least one component, the method comprising: - Send component description data to the large language model, wherein the component description data describes the at least one component (202). - Send logical description information to the large language model, wherein the logical description information has information about the control logic to be established (204); and - Instruct the large language model to establish the control logic based on the component description data and the logic description information (206).
2. The method according to claim 1, wherein, The component description data is sent to the large language model in the form of prompt words.
3. The method according to claim 1, wherein, The component description data is based on the device description.
4. The method of claim 3, further comprising: The device description is split into multiple segments.
5. The method of claim 4, further comprising: Calculate the embeddings of the plurality of segments; And the embedding is used as component description data.
6. The method of claim 1, further comprising: Information about available logic modules and / or supported interfaces and / or supported data types and / or basic system parameters is sent to the large language model.
7. The method of claim 1, further comprising: Request the logical description information from the user.
8. The method according to claim 7, wherein, The logical description information describes the control logic to be established in natural language.
9. The method of claim 1, further comprising: The control logic is obtained from the large language model.
10. The method of claim 9, further comprising: The large language model is instructed to adjust the control logic.
11. The method according to claim 1, wherein, The control logic has a structured logic description and / or a visual representation of the logic and / or executable configuration code.
12. The method of claim 1, further comprising: The large language model is instructed to establish thought chain prompts.
13. The method according to claim 1, wherein, The large language model has or is based on at least one of the following models: ChatGPT or Deepseek.
14. An apparatus for establishing control logic for at least one component, the apparatus comprising: - A device for sending component description data to a large language model, wherein the component description data describes the at least one component; - A device for sending logical description information to the large language model, wherein the logical description information has information about the control logic to be established; and - A device for instructing the large language model to establish the control logic based on the component description data and the logic description information.
15. A computer-readable storage medium comprising, when executed by a computer, causing the computer to execute a command according to claim 1.