Automatic generation method and device of solution template, medium and program product
Patent Information
- Application Number
- CN202380099654.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2026-01-30
AI Technical Summary
Existing industrial automation software still requires a lot of engineering expertise when building solutions, resulting in high learning costs and low efficiency for users.
By receiving user input solution template creation instructions, extracting the basic unit name of industrial automation software, and using a large-scale language model to generate solution templates, automatically calling the basic units and establishing connection relationships between them.
It greatly reduces the cost of users learning software, improves the efficiency of obtaining solutions, reduces the amount of engineering operations, and can be adapted to various industrial automation software.
Smart Images

Figure CN121444064A_ABST
Abstract
Description
Method, device, medium and program product for automatically generating solution templates Technical Field
[0001] The embodiments of the present application mainly relate to the field of computers, and in particular to a method, device, medium and program product for automatically generating a solution template. Background Art
[0002] With the acceleration of digital transformation, a wide range of industrial automation software is now available on the market. Some industrial automation software often requires engineers to spend considerable time understanding each component of the software and to utilize their expertise to program the solution. Other industrial automation software, to reduce the learning curve for engineers, features visual platforms, allowing engineers to build solutions with minimal code and a graphical drag-and-drop approach. However, the efficiency gains offered by this type of industrial automation software are limited, and building solutions still requires engineers with extensive expertise; otherwise, feasibility issues arise.
[0003] Summary of the Invention
[0004] The embodiments of the present application provide a method, device, medium and program product for automatically generating a solution template. Through the embodiments of the present application, users can simply input the requirements for relevant solutions to obtain corresponding solution templates in industrial automation software, which greatly reduces the cost of users learning software and improves the efficiency of users obtaining solutions.
[0005] In a first aspect, a method for automatically generating a solution template is provided, comprising: receiving an instruction input by a user to create a solution template; extracting the name of a basic unit in first industrial automation software; generating prompt words according to the instruction so that a large-scale language model (LLM) lists all tasks that execute the instruction in sequence by referencing the name of the basic unit in the first industrial automation software; and calling corresponding basic units in the first industrial automation software and generating connection relationships between the basic units according to all tasks output by the LLM to obtain a solution template corresponding to the instruction.
[0006] In a second aspect, a device for automatically generating a solution template is provided, comprising: a receiving module configured to receive an instruction input by a user to create a solution template; an extraction module configured to extract the basic unit name in the first industrial automation software; a generation module configured to generate a prompt word according to the instruction so that the LLM lists all tasks that execute the instruction in sequence by referencing the basic unit name in the first industrial automation software; and a calling module configured to call the corresponding basic unit in the first industrial automation software according to all tasks output by the LLM and generate a connection relationship between the basic units to obtain a solution template corresponding to the instruction.
[0007] In a third aspect, an electronic device is provided, comprising: at least one memory configured to store computer-readable code; and at least one processor configured to call the computer-readable code and execute each step of the method provided in the first aspect.
[0008] In a fourth aspect, a computer-readable medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the processor executes each step in the method provided in the first aspect.
[0009] In a fifth aspect, a computer program product is provided, which is tangibly stored on a computer-readable medium and includes computer-executable instructions, which, when executed, cause at least one processor to perform the steps in the method provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The following figures are intended only to illustrate and explain the embodiments of the present application and are not intended to limit the scope of the embodiments of the present application.
[0011] FIG1 is a flowchart of a method for automatically generating a solution template according to an embodiment of the present application;
[0012] FIG2 is a schematic diagram of an automatic generation device for a solution template according to an embodiment of the present application;
[0013] FIG3 is a schematic diagram of an electronic device according to an embodiment of the present application.
[0014] Explanation of Reference Numerals 100: Automatic Generation Method of Solution Template 101-104: Method Steps 20: Automatic Generation Apparatus of Solution Template 21: Receiving Module 22: Extracting Module 23: Generating Module 24: Calling Module 200: Electronic Device 301: Processor 302: Communication Interface 303: Memory 304: Communication Bus 305: Program DETAILED DESCRIPTION
[0015] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that discussing these embodiments is merely to enable those skilled in the art to better understand and implement the subject matter described herein, and is not intended to limit the scope of protection, applicability, or examples set forth in the claims. The functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the embodiments of the present application. Various examples may omit, replace, or add various processes or components as needed. For example, the described method may be performed in an order different from the described order, and various steps may be added, omitted, or combined. In addition, the features described relative to some examples may also be combined in other examples.
[0016] As used herein, the term "including" and its variations are open terms meaning "including but not limited to". The term "based on" means "based at least in part on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other definitions may be included below, whether explicit or implicit. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout the specification.
[0017] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0018] FIG1 is a flow chart of a method for automatically generating a solution template according to an embodiment of the present application. As shown in FIG1 , the method 100 for automatically generating a solution template includes:
[0019] Step 101: Receive a user-input instruction to create a solution template.
[0020] In one embodiment, the user may input a command of “robot performing bin picking and placing” in the graphical user interface of the first industrial automation software.
[0021] Step 102: extract the basic unit name in the first industrial automation software.
[0022] Optionally, the basic unit includes a basic functional block or a basic shape. Optionally, the name may contain descriptive information.
[0023] For example, in one embodiment, the extracted basic unit names include "point-to-point mobile robot", "object recognition", "posture recognition", "machine gripper open", and "machine gripper closed", etc.
[0024] Step 103 : Generate prompt words according to the instruction, so that the LLM lists all tasks for executing the instruction in sequence by referencing the basic unit names in the first industrial automation software.
[0025] Specifically, the prompt word needs to include two parts. The first part is to prompt the LLM to list all the task steps for executing the user instructions in order. The specific prompt word can be, for example, "Please list all the tasks that need to be performed in {the instruction entered by the user} in order." In one embodiment, it can be "Please list all the tasks that need to be performed in the robot for cabinet picking and placing in order." The second part is to prompt the LLM to quote the basic unit name in the first industrial automation software in the description of the specific task steps. The specific prompt word can be, for example, "The task requires the use of {basic unit name 1, basic unit name 2,... basic unit name n}." In one embodiment, it can be "The task requires the use of a point-to-point mobile robot, object recognition, posture recognition, machine gripper opening, machine gripper closing..." It is worth noting that the prompt words in the first part and the prompt words in the second part need to be entered into the LLM together.
[0026] Optionally, before step 103, the language of the instruction is determined. Based on the language of the instruction, an appropriate LLM is determined. Then, communication is established with the appropriate LLM.
[0027] Step 104 : Based on all the tasks output by the LLM, the first industrial automation software calls the corresponding basic units and generates connection relationships between the basic units to obtain a solution template corresponding to the instructions.
[0028] The embodiment of the present application receives the user's demand instructions for a solution template, and uses the relevant demand instructions and all the basic unit names of the first industrial automation software as part of the LLM prompt words. According to the task steps that meet the requirements output by the LLM, the corresponding basic units can be automatically called in the first industrial automation software without the user having to perform graphical drag and configuration on the graphical user interface, and the establishment of relationships between different basic units can be achieved. It can be seen that the embodiment of the present application greatly reduces the demand for the user's engineering expertise, while also improving the efficiency of the use of industrial automation software and reducing the corresponding engineering workload. In addition, the embodiment of the present application can easily adapt to various different industrial automation software to generate corresponding solution templates for users, and its scalability is very strong.
[0029] In one embodiment, the names of the basic units in the first industrial automation software are respectively input into the LLM to determine the names of the basic units required for the first task among all tasks. The order of the basic unit names required to execute the first task is determined by the LLM. The order of the names of the basic units in each task among all tasks is obtained. Based on the order of the names of the basic units in each task among all tasks and the order of the tasks in all tasks output by the LLM, a sorted set is obtained. According to the sorted set, the corresponding basic units are called in the first industrial automation software and the connection relationship between the basic units is generated. Specifically, the basic unit corresponding to each position can be determined by the sorted set. The corresponding basic units are called in the first industrial automation software in order of position. An input / output relationship is established between two adjacent basic units.
[0030] In one embodiment, assume that all tasks output by the LLM include two tasks. It is determined that the basic unit names required for Task 1 include A, B, and C, while the basic unit names required for Task 2 include D and E. Subsequently, the LLM further determines that the corresponding order for Task 1 is B, A, and C, while the corresponding order for Task 2 is E and D. The order set then includes {B, A, C, E, D}. Based on the basic unit corresponding to each order, the corresponding basic unit can be called in the first industrial automation software and displayed on the graphical user interface. This automatically establishes the input / output relationship between adjacent basic units.
[0031] FIG2 is a schematic diagram of an automatic generation device for a solution template according to an embodiment of the present application. As shown in FIG2 , the automatic generation device 20 for a solution template includes:
[0032] The receiving module 21 is configured to receive an instruction input by a user to create a solution template.
[0033] The extraction module 22 is configured to extract the basic unit name in the first industrial automation software.
[0034] The generating module 23 is configured to generate prompt words according to the instruction, so that the LLM lists all tasks for executing the instruction in sequence by referencing the basic unit names in the first industrial automation software.
[0035] The calling module 24 is configured to: call 104 corresponding basic units in the first industrial automation software according to all tasks output by the LLM and generate connection relationships between the basic units to obtain a solution template corresponding to the instruction.
[0036] Through the embodiments of the present application, users can simply input the requirements for relevant solutions to obtain corresponding solution templates in the industrial automation software, which greatly reduces the cost of users learning the software and improves the efficiency of users obtaining solutions.
[0037] FIG3 is a schematic diagram of an electronic device according to an embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the electronic device. As shown in FIG3 , the electronic device 300 may include: a processor 301, a communications interface 302, a memory 303, and a communication bus 304.
[0038] The processor 301 , the communication interface 302 , and the memory 303 communicate with each other via the communication bus 304 .
[0039] The communication interface 302 is used to communicate with other electronic devices or servers.
[0040] The processor 301 is configured to execute a program 305 , and specifically may execute the relevant steps in any one of the aforementioned method embodiments.
[0041] Specifically, the program 305 may include program codes, which include computer operation instructions.
[0042] Processor 301 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.
[0043] The memory 303 is used to store the program 305. The memory 303 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0044] The program 305 can be specifically used to enable the processor 301 to execute any one of the multiple method embodiments in the aforementioned embodiments.
[0045] The specific implementation of each step in program 305 can be found in the corresponding descriptions of the corresponding steps and units in the aforementioned embodiment of the method for automatically generating a solution template, and will not be repeated here. Those skilled in the art will clearly understand that for the sake of convenience and brevity, the specific working processes of the devices and modules described above can refer to the corresponding process descriptions in the aforementioned method embodiment, and will not be repeated here.
[0046] The present application also provides a computer-readable storage medium storing instructions for causing a machine to perform any of the multiple method embodiments described herein. Specifically, a system or device equipped with a storage medium can be provided, wherein the storage medium stores software program code that implements the functions of any of the above-described embodiments, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.
[0047] In this case, the program code read from the storage medium itself can realize the function of any one of the above embodiments, so the program code and the storage medium storing the program code constitute part of this application.
[0048] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0049] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to perform any corresponding operation in the above-mentioned multiple method embodiments.
[0050] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0051] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as software or computer code that can be stored in a recording medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or can be implemented as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded via a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here.
[0052] It should be noted that not all steps and modules in the above processes and system structure diagrams are required, and certain steps or modules can be omitted according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented by certain components in multiple independent devices.
[0053] In the above embodiments, the hardware module can be implemented mechanically or electrically. For example, a hardware module can include a permanent dedicated circuit or logic (such as a dedicated processor, FPGA or ASIC) to complete the corresponding operation. The hardware module can also include programmable logic or circuits (such as a general-purpose processor or other programmable processors), which can be temporarily set by software to complete the corresponding operation. The specific implementation method (mechanical method, or dedicated permanent circuit, or temporarily set circuit) can be determined based on cost and time considerations.
[0054] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the scope of protection of the present invention.
[0055] Nouns and pronouns referring to persons in this patent application are not limited to a specific gender.
Claims
1. A method for automatically generating a solution template, comprising: - receiving (101) a user input instruction to create a solution template; - extracting (102) the name of a basic unit in the first industrial automation software; - generating (103) prompt words according to the instruction so that the LLM lists all tasks for executing the instruction in order by referring to the basic unit names in the first industrial automation software; -Based on all the tasks output by the LLM, the first industrial automation software calls (104) the corresponding basic units and generates (104) the connection relationship between the basic units to obtain a solution template corresponding to the instruction.
2. The method according to claim 1, wherein: The calling (104) of corresponding basic units in the first industrial automation software according to all the tasks output by the LLM and generating (104) connection relationships between the basic units includes: - inputting the basic unit names in the first industrial automation software into the LLM respectively to determine the basic unit names required for the first task in all tasks; - determining, by the LLM, the order of the basic unit names required for performing the first task; -Get the order of the names of the basic units in each task among all tasks; - based on the sorting of the names of the basic units in each of all the tasks and the sorting of the tasks in all the tasks output by the LLM, obtaining a sorted set; -According to the sorted set, the corresponding basic units are called in the first industrial automation software and connection relationships between the basic units are generated.
3. The method according to claim 2, wherein: Generating corresponding basic units and connection relationships between the basic units in the first industrial automation software according to the sorted set includes: -determine the basic unit corresponding to each bit in the sorted set; - calling corresponding basic units in the first industrial automation software in order of priority; -Establish the input / output relationship between two adjacent basic units.
4. The method according to claim 1, wherein: Before generating (103) a prompt word according to the instruction so that the LLM lists all tasks for executing the instruction in order by referring to the basic unit name in the first industrial automation software, the method further comprises: - determining the language of the instructions; - Depending on the language of the instruction in question, determine the applicable LLM.
5. The method according to claim 1, wherein: The basic unit includes a basic functional block or a basic shape.
6. An automatic generation device for a solution template, comprising: - A receiving module (21), configured to: receive an instruction input by a user to create a solution template; - an extraction module (22), configured to: extract a basic unit name in the first industrial automation software; - a generation module (23), configured to: generate prompt words according to the instruction, so that the LLM lists all tasks for executing the instruction in order by referring to the basic unit names in the first industrial automation software; - A calling module (24), configured to: according to all the tasks output by the LLM, call the corresponding basic units in the first industrial automation software and generate connection relationships between the basic units to obtain a solution template corresponding to the instruction.
7. An electronic device (300), comprising: A processor (301), a communication interface (302), a memory (303) and a communication bus (304), wherein the processor (301), the memory (303) and the communication interface (302) communicate with each other via the communication bus (304); The memory (303) is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the method for automatically generating a solution template according to any one of claims 1 to 5.
8. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for automatically generating a solution template according to any one of claims 1 to 5 is implemented.
9. A computer program product, the computer program product being tangibly stored on a computer-readable medium and comprising computer-executable instructions, which when executed cause at least one processor to perform the method for automatically generating a solution template according to any one of claims 1-5.