Data interaction method, device and system of ai inference device and automation controller

By analyzing the topology of the AI ​​model and generating source code, a data interaction program is automatically generated, solving the problem of running the AI ​​model on the PLC, simplifying the data interaction process between the PLC and the AI ​​inference device, and reducing the communication and programming complexity for engineers.

CN117136348BActive Publication Date: 2026-11-06SIEMENS AG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180096724.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-25
Publication Date
2026-11-06
Estimated Expiration
2041-05-25

AI Technical Summary

Technical Problem

In existing technologies, AI models are difficult to run directly on PLCs or edge devices, which makes it impossible for PLCs to directly receive and parse inference results. There is a lack of effective data interaction standards, requiring frequent engineer collaboration and complex programming work.

Method used

By analyzing the topology of the AI ​​model, determining the output nodes and format, generating source code and mapping it to the PLC, and using a unified communication protocol and programming language, the data interaction program is automatically generated, reducing the need for familiarity with programming languages ​​and communication protocols.

Benefits of technology

It enables engineers without extensive programming experience to achieve data interaction between AI models and PLCs, reducing development and debugging workload and simplifying data format conversion and system integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117136348B_ABST
    Figure CN117136348B_ABST
Patent Text Reader

Abstract

This invention provides a data interaction method, apparatus, and system for an AI inference device and an automated controller, comprising the following steps: S1, analyzing the topology of the AI ​​model and obtaining multiple nodes of the AI ​​model and the interconnections between the multiple nodes; S2, matching the output nodes of the AI ​​model based on user input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the automated controller; S3, matching the communication protocol for data interaction between the AI ​​inference device and the automated controller based on user input. This invention provides a simpler automatic data interaction method that does not rely on the experience of engineers, reducing workload.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automation, and more particularly to data interaction methods, apparatus and systems for AI inference devices and automation controllers. Background Technology

[0002] The growth of artificial intelligence (AI) in manufacturing is a natural branch of the industrial revolution. For example, AI has enabled greater flexibility, higher quality, higher efficiency, and lower costs for industry. However, traditional automated controllers (such as programmable logic controllers) are not suitable for AI inference, as they require numerous floating-point calculations. Therefore, dedicated AI inference devices have entered the automation domain to support automated controllers in performing AI inference. These dedicated AI inference devices are typically based on hardware accelerators such as GPUs, FPGAs, and ASICs. The integration of shop floor connectivity, with its large installed base of PLCs, and AI inference devices has become a crucial technical topic.

[0003] To automate the application of artificial intelligence, AI engineers need to collaborate with automation engineers. Specifically, their work includes defining application-layer communication protocols for inference and control devices. This also involves investigating potential industrial communication protocols for control device applications, upon which AI engineers learn how to develop using industrial communication protocol interfaces. For example, if the control device needs to receive inference results via PROFINET RT, the AI ​​engineer needs to install a soft-PROFINET protocol stack and the necessary programs to invoke the corresponding application programming interface (API). Furthermore, AI and automation engineers will develop programs for the inference and control devices using different programming languages; for instance, AI engineers might use Python or C++, while automation engineers might use IEC 61131-3's SCL.

[0004] This workflow led to frequent interactions between different development teams and more work on introducing artificial intelligence technology into automated systems.

[0005] In typical AI training, engineers responsible for training use open-source AI frameworks (such as TensorFlow), which require Python programming. This process yields a trained model, which is then validated offline on the engineer's computer using data and considered ready. However, the trained model cannot be directly run on industrial equipment, PLCs, or edge devices. This is because edge devices and PLCs use different equipment types and environments, requiring the model to be converted from one format to another. Furthermore, automation engineers are unaware of the model's output data; only the AI ​​engineer knows the data type and format. For example, PLCs, which run automation programs, cannot directly run AI models because the inference environment for the AI ​​model cannot be installed on the PLC. This results in the PLC wanting to add AI functionality but lacking the capability to do so. Existing technology offers a solution to these problems: selecting an edge device to run the AI ​​model on the PLC. The edge device performs inference, and the inference results are then sent to the PLC for use. This essentially adds an external inference extension to the PLC.

[0006] Today, IT companies increasingly choose to utilize GPUs for direct interaction with PCs, while automation companies rely on AI applications for data interaction, often employing hard-coded methods. Currently, there is no well-designed standard solution for data interaction between inference devices and PLCs. Summary of the Invention

[0007] The first aspect of the present invention provides a data interaction method between an AI inference device and an automation controller, comprising the following steps: S1, analyzing the topology of an AI model and obtaining multiple nodes of the AI ​​model and the interconnections between the multiple nodes; S2, matching the output nodes of the AI ​​model based on user input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the automation controller; S3, matching the communication protocol for data interaction between the AI ​​inference device and the automation controller based on user input.

[0008] Furthermore, the AI ​​inference device is an edge device, and the automation controller is a PLC.

[0009] Furthermore, step S2 also includes the following steps: matching the output node of the AI ​​model based on the user's input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the input image of the PLC.

[0010] Furthermore, the data interaction method also includes the following steps performed on the AI ​​inference device: S4, generating a first source code for the edge device based on the format of the inference result, the format of the communication protocol, and the operating environment of the inference device; S5, downloading the first source code to the AI ​​inference device; S6, packaging the inference result using the first source code based on the format of the inference result and sending it to the automation controller through a matching communication protocol.

[0011] Furthermore, the data interaction method also includes the following steps executed on the automation controller: S7, generating a second source code for the automation controller based on the format of the inference result, the format of the communication protocol, and the operating environment of the automation controller; S8, downloading the second source code to the automation controller; S9, controlling the automation controller to receive and parse the inference result to send the feedback result to the AI ​​inference device.

[0012] Furthermore, the data interaction method also includes the following steps: the AI ​​inference device performs inference on the AI ​​model based on the input data, and the inference result includes multiple output data and their corresponding multiple parameters; the automation controller reads the inference result and selects a portion of the output data and their corresponding parameters from the inference result, and performs association and mapping based on the selected output data and their corresponding parameters.

[0013] Furthermore, the data interaction method also includes the following steps: performing translation on the AI ​​inference device and the automation controller based on different programming languages ​​corresponding to different communication protocols, so as to unify the types of different programming languages.

[0014] Furthermore, the data interaction method further includes the following step: executing a program on the first source code and the second source code to convert the first source code and the second source code into binary code.

[0015] A second aspect of the present invention provides a data interaction system for an AI inference device and an automation controller, comprising: a processor; and a memory coupled to the processor, the memory having instructions stored therein, the instructions causing the electronic device to perform actions when executed by the processor, the actions including: S1, analyzing the topology of an AI model and obtaining multiple nodes of the AI ​​model and the interconnections between the multiple nodes; S2, matching the output nodes of the AI ​​model based on user input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the automation controller; S3, matching the communication protocol for data interaction between the AI ​​inference device and the automation controller based on user input.

[0016] Furthermore, the AI ​​inference device is an edge device, and the automation controller is a PLC.

[0017] Furthermore, action S2 also includes: matching the output node of the AI ​​model based on the user's input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the input image of the PLC.

[0018] Furthermore, the action also includes: S4, generating a first source code for the edge device based on the format of the inference result, the format of the communication protocol, and the operating environment of the inference device; S5, downloading the first source code to the AI ​​inference device; S6, packaging the inference result using the first source code based on the format of the inference result and sending it to the automation controller through a matching communication protocol.

[0019] Furthermore, the actions also include: generating a second source code for the automation controller based on the format of the inference result, the format of the communication protocol, and the operating environment of the automation controller; downloading the second source code to the automation controller; and controlling the automation controller to receive and parse the inference result to send the feedback result to the AI ​​inference device.

[0020] Furthermore, the action also includes: the AI ​​inference device performing inference on the AI ​​model based on the input data, the inference result including multiple output data and their corresponding multiple parameters; the automation controller reading the inference result and selecting a portion of the output data and their corresponding parameters from the inference result, and performing association and mapping based on the selected output data and their corresponding parameters.

[0021] Furthermore, the action also includes: performing translation on the AI ​​inference device and the automation controller based on different programming languages ​​corresponding to different communication protocols, so as to unify the types of different programming languages.

[0022] Furthermore, the action also includes: executing a program on the first source code and the second source code to convert the first source code and the second source code into binary code.

[0023] A third aspect of the present invention also provides a data interaction device for an AI inference device and an automation controller, comprising: an analysis device that analyzes the topology of an AI model and obtains multiple nodes of the AI ​​model and the interconnections between the multiple nodes; a matching and mapping device that matches the output nodes of the AI ​​model based on user input, determines the format of the inference result based on the AI ​​model, and maps the format of the inference result to the automation controller; and a matching device that matches the communication protocol for data interaction between the AI ​​inference device and the automation controller based on user input.

[0024] The fourth aspect of the invention also provides a computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed, cause at least one processor to perform the method described in the first aspect of the invention.

[0025] The fifth aspect of the invention also provides a computer-readable medium having stored thereon computer-executable instructions, which, when executed, cause at least one processor to perform the method according to the first aspect of the invention.

[0026] Therefore, this invention can analyze both the input nodes and output nodes of the AI ​​model. Once the output node is determined, its data format can be analyzed. For example, this invention can determine the number of integer variables in a node. Based on this, this invention can directly analyze the output format of the model file itself, and can package the inference results according to the output format and send them to the PLC via the corresponding communication protocol. This invention also helps the PLC generate a program to receive the packaged data and parse the analyzed format.

[0027] The data interaction mechanism between the AI ​​inference device and the automated controller provided by this invention does not require engineers to have extensive programming experience and skills, nor does it require them to be particularly proficient in a particular programming language or AI knowledge. This invention is executed automatically, reducing the work of program development, system integration, and debugging.

[0028] This invention provides AI model analysis and visualization, enabling engineers to better understand the topology of AI models and user needs, and to determine the analysis and data structure for establishing data interaction. This invention also provides a unified operating environment and data format to eliminate differences between AI models, PLC devices, and communication protocols, and enables data interaction through drag-and-drop operations that do not require programming. Attached Figure Description

[0029] Figure 1 This is a flowchart of the data interaction method between existing AI inference devices and automated controllers;

[0030] Figure 2 This is a flowchart of a data interaction method between an AI inference device and an automation controller according to a specific embodiment of the present invention;

[0031] Figure 3 This is a schematic diagram of the topology of an AI model according to a specific embodiment of the present invention. Detailed Implementation

[0032] The specific embodiments of the present invention will be described below with reference to the accompanying drawings.

[0033] This invention provides a data interaction mechanism between AI inference devices and automation controllers, which enables all programs to be automatically generated according to the required protocol / language without additional development, and AI engineers and automation engineers do not need to be familiar with each other's languages.

[0034] Specifically, this invention also provides functional modules and supporting components for communication between AI inference devices and automation controllers. The structure of the inference results is analyzed and visualized, making it easily understandable to AI engineers, automation engineers, or other engineers with AI knowledge. Then, using graphical tools, the expected inference results are mapped to the PLC via simple drag-and-drop operations. In particular, the communication protocol and source code for the functional modules of the inference device and the PLC are generated and established. Therefore, AI engineers or automation engineers with sufficient technical background can also perform the above process.

[0035] Figure 1 This is a flowchart of the data interaction method between existing AI inference devices and automated controllers. Figure 1 On the left is the AI ​​inference terminal. Figure 1 To the right is the automation controller. Specifically, the AI ​​inference device is an edge device, and the automation controller is a PLC.

[0036] First, AI engineers need to confirm the AI ​​model's output, communication protocol, and data type so that AI and automation engineers can negotiate and define the communication protocol S11 / S21 for the business logic. Then, AI and automation engineers program in the language corresponding to the protocol S12 / S22; for example, Python / CPP is used for edge devices, and SCL / LAD is used on the PLC. Next, AI and automation engineers execute the build and download program S13 / S23. Then, AI and automation engineers communicate with each other to perform system integration and debugging S14 / S24 to debug a stable program. Finally, the edge device and PLC perform data exchange and operational interaction; that is, the edge device sends the inference results to the automation controller S15, the automation controller feeds back the results to the edge device S25, and the above steps are iteratively executed.

[0037] However, the programming required to load models and perform inference on edge devices differs from that of PLCs. If an automation engineer is responsible for developing the code to load models and perform inference on the edge device, they will need to learn a new programming language. Secondly, the format of the inference results executed on the edge device varies depending on the model, and data cannot be sent from the edge device to the PLC in a standard manner. Finally, since different models result in different inference result formats, the PLC can only use the received inference results correctly if it parses them correctly. AI engineers and automation engineers also need to agree on a format. Therefore, AI engineers and automation engineers each perform their own tasks, requiring frequent interaction. Each has their own area of ​​expertise, resulting in a huge workload and a high risk of errors.

[0038] Furthermore, several additional factors complicate the issues. For instance, edge devices use different programming languages—not Python, but C, C++, and Java—and this cannot be restricted. Therefore, AI engineers working with edge devices must be familiar with these different languages. There's also no guarantee that communication between the edge device and the PLC will be standard (e.g., Ethernet, PROFINET). The communication protocols between the edge device and the PLC vary depending on the application scenario. This means that sending inference results requires using different protocols and calling different protocol interfaces for data packaging. This implies that AI engineers must send data according to different protocols. For example, if an edge device works with two different PLCs, one using PROFIBUS and the other PROFINET, the AI ​​engineer must call different protocol interfaces, further increasing the complexity and workload.

[0039] Figure 2 This is a flowchart of a data interaction method between an AI inference device and an automation controller according to a specific embodiment of the present invention, such as... Figure 2 As shown, the first aspect of the present invention provides a data interaction method between an AI inference device and an automation controller, wherein steps S1, S2, and S3 can be executed on the AI ​​inference device and / or the automation controller, steps S4, S5, and S6 are executed on the AI ​​inference device, and steps S7, S8, and S9 are executed on the automation controller. Preferably, the AI ​​inference device is an edge device, and the automation controller is a PLC.

[0040] This invention provides a data interaction method between an AI inference device and an automation controller, comprising the following steps.

[0041] First, step S1 is executed to analyze the topology of the AI ​​model and obtain the multiple nodes of the AI ​​model and the interconnections between the multiple nodes.

[0042] Specifically, such as Figure 3 As shown, AI model M has a topology consisting of multiple nodes. The nodes of AI model M include a first layer L1, a second layer L2, a third layer L3, and a fourth layer L4. Specifically, the first layer L1 includes a first node N. 11 Second node N 12 Third node N 13 ...the nth node N 1n The second layer L2 includes the first node N. 21 Second node N 22 Third node N 23 ...the nth node N 2n The third layer L3 includes the first node N. 31 Second node N 32 Third node N 33 ...the nth node N 3n The fourth layer, L4, includes the first node N. 41 Second node N 42 Third node N 43 Therefore, after step S 31 Analysis reveals the interconnections between the nodes, with the first node N in the first layer L1 being... 11 Second node N 12 Third node N 13 It is the input node, the first node N of the fourth layer (L4). 41 Second node N 42 Third node N 43 It is an output node.

[0043] The steps described above provide users with analysis and visualization of the AI ​​model topology, including input and output tensors. Based on the visualization results, users can better understand the inference process and more easily specify the expected inference results exchanged with the PLC, thereby enhancing the intelligence of the automation controller.

[0044] Then, step S2 is executed, matching the output node of the AI ​​model based on the user's input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the automation controller. Step S2 further includes the following steps: matching the output node of the AI ​​model based on the user's input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the PLC's input image. These steps provide the user with the option to define the format of the PLC input image and to connect the inference result to the inference result of the input image.

[0045] like Figure 3 As shown, for example, the output node of the matched AI model is the first node N of the first layer L1. 11The format of the inference result can be determined based on the format of the AI ​​model, so the format of the inference result can be mapped to the input image of the PLC as the input data storage space.

[0046] Finally, step S3 is executed, which matches the communication protocol for data interaction between the AI ​​inference device and the automation controller based on the user's input.

[0047] The key point of this invention is that all programs are automatically generated according to the required protocol / language, eliminating the need for development and requiring AI and automation engineers to be familiar with each other's languages. The PLC's communication protocol is its underlying communication protocol, such as PROFIBUS / PROFINET. Only the choice of which communication protocol to use for data interaction needs to be determined in step S3 to generate the corresponding code. Furthermore, once the communication protocol for data interaction is determined, only the programming language used by the edge device needs to be determined based on user input, such as C / C++ / Java, to generate the program. In addition, this invention can analyze the format of data interaction between the edge device and the PLC, and then generate code programs for both the edge device and the PLC according to the format. This invention directly analyzes the output format of the model file itself, enabling the packaging of inference results according to the output format and sending them to the PLC via the corresponding communication protocol. This invention also assists the PLC in generating programs to receive the packaged data and parse the analyzed format.

[0048] Therefore, this invention can reduce the workload of data interaction between AI inference devices and automation controllers, and reduce communication between AI engineers and automation engineers, who do not need to be familiar with different programming languages ​​or underlying communication protocols.

[0049] Furthermore, according to a preferred embodiment of the present invention, the data interaction method further includes the following steps S4, S5 and S6 performed on the edge device.

[0050] In step S4, first source code is generated for the edge device based on the format of the inference result, the format of the communication protocol, and the operating environment of the inference device. The edge device runs Windows 10, uses an x86_64 processor, employs Python as the programming language, has an IP address of 192.168.1.10, and uses the PROFINET communication protocol.

[0051] Specifically, the inference device configuration items are used to configure parameters regarding the inference device's operating environment to generate the inference device's first source code. Here, the processor is the processor used by the inference device, the programming language is the programming language source code generated by the inference device, and the IP address is the IP address for PLC communication.

[0052] In step S5, the first source code is downloaded to the AI ​​inference device; in step S6, the inference result is packaged using the first source code based on the format of the inference result and sent to the automation controller through a matching communication protocol.

[0053] Furthermore, according to a preferred embodiment of the present invention, the data interaction method further includes steps S7, S8 and S9 performed at the PLC terminal.

[0054] First, step S7 is executed, generating second source code for the automation controller based on the format of the inference result, the format of the communication protocol, and the operating environment of the automation controller. The PLC supplier is Siemens, the PLC device is an S7-1500, the IP address is 192.168.1.20, and the communication protocol is PROFINET.

[0055] Specifically, the PLC device is used to connect to the inference device, and the IP address is the device used by the PLC device to communicate with the inference device.

[0056] The inference output area is used to visualize the details of the data structure. This invention can determine the data processing performed within the aforementioned data structure, such as data interaction with a PLC and storing inference results. The inference output is obtained from the analysis of the AI ​​model, determining when the AI ​​model was built. For example, in classification, the inference output is the target classified by the AI ​​model. For each output item, it can include one or more data items related to the AI ​​model itself. Taking classification as an example, an item includes only one floating data point, which is the probability of a target. Another example is target detection, where typically an item includes seven floating data points, such as target probability, location, etc.

[0057] Regarding the inputs and outputs of the PLC, it can determine how many items can be transmitted to the PLC terminal to execute the automation system. Other aspects need to be established by dragging and dropping unified data types from the relevant unified data type area to create a mapping structure.

[0058] In step S8, the second source code is downloaded to the automation controller; in step S9, the automation controller is controlled to receive and parse the inference result to send the feedback result to the AI ​​inference device.

[0059] Preferably, the data interaction method further includes the following steps: the AI ​​inference device performs inference on the AI ​​model based on the input data, and the inference result includes multiple output data and their corresponding multiple parameters; the automation controller reads the inference result and selects a portion of the output data and their corresponding parameters from the inference result, and performs association and mapping based on the selected output data and their corresponding parameters.

[0060] Inference involves deriving an inference result from the input data of an AI model. This inference result includes multiple output data points, each containing multiple parameters. For example, the output node of the matched AI model is the first node N of the first layer L1. 11 It includes 100 output data points, each containing the following parameters: INT32, FP16, FP16, FP16, FP16, FP16, FP16, FP16. However, through the first node N... 11 The data and parameters sent to the PLC are not all required by the PLC. The PLC usually only needs a portion or a few of the data and parameters output by the node. In this embodiment, the PLC only needs five parameters: INT32, FP16, FP16, FP16, and FP16. INT32 is associated with and mapped to the PLC's INT32:Index; FP16 is associated with and mapped to the PLC's FP32:Left_Top_X, FP16 is associated with and mapped to the PLC's FP32:Left_Top_Y, FP16 is associated with and mapped to the PLC's FP32:Right_Bottom_X, and FP16 is associated with and mapped to the PLC's FP32:Right_Bottom_Y.

[0061] Therefore, the format of the data exchanged between the edge device and the PLC is specified, and the format of the inference result is determined. The PLC does not need all the inference results of the model; it only needs a portion of them. The process specified above is required. Some data needs to be exchanged with the PLC, and some data processing needs to be performed. This is also the process by which the PLC extracts the desired content.

[0062] Preferably, the data interaction method further includes the following step: translating the AI ​​inference device and the automation controller based on different programming languages ​​corresponding to different communication protocols to unify the types of different programming languages. Specifically, different types of devices correspond to different protocols and different programming languages, resulting in different definitions of data types. For example, some devices define integers as 4 bytes or 2 bytes, while others use names like int, int32, or INT32. This step unifies the data types by translating them according to different languages. To support different inference devices, communication protocols, and PLCs, this step defines a unified data type that can be mapped to the data types defined by the communication protocol and the PLC, thus avoiding the development process for engineers in different automation systems.

[0063] Furthermore, the data interaction method further includes the following step: executing program construction on the first source code and the second source code to convert the first source code and the second source code into binary code. This step of executing program construction converts the source code into binary code, thereby constructing an executable binary code so that the edge device and PLC can read data to perform data interaction.

[0064] This process involves matching the corresponding communication protocol based on user input, with different protocols calling different libraries. These communication protocols include PROFINET, EtherCAT, and Modbus, among others. Therefore, programming on the inference device side requires prior programming on the PLC side, followed by execution using a programming language and interface specific to the communication protocol. In contrast, existing technologies require any engineer to first learn this programming language.

[0065] A second aspect of the present invention provides a data interaction system for an AI inference device and an automation controller, comprising: a processor; and a memory coupled to the processor, the memory having instructions stored therein, the instructions causing the electronic device to perform actions when executed by the processor, the actions including: S1, analyzing the topology of an AI model and obtaining multiple nodes of the AI ​​model and the interconnections between the multiple nodes; S2, matching the output nodes of the AI ​​model based on user input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the automation controller; S3, matching the communication protocol for data interaction between the AI ​​inference device and the automation controller based on user input.

[0066] Furthermore, the AI ​​inference device is an edge device, and the automation controller is a PLC.

[0067] Furthermore, action S2 also includes: matching the output node of the AI ​​model based on the user's input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the input image of the PLC.

[0068] Furthermore, the action also includes: S4, generating a first source code for the edge device based on the format of the inference result, the format of the communication protocol, and the operating environment of the inference device; S5, downloading the first source code to the AI ​​inference device; S6, packaging the inference result using the first source code based on the format of the inference result and sending it to the automation controller through a matching communication protocol.

[0069] Furthermore, the actions also include: generating a second source code for the automation controller based on the format of the inference result, the format of the communication protocol, and the operating environment of the automation controller; downloading the second source code to the automation controller; and controlling the automation controller to receive and parse the inference result to send the feedback result to the AI ​​inference device.

[0070] Furthermore, the action also includes: the AI ​​inference device performing inference on the AI ​​model based on the input data, the inference result including multiple output data and their corresponding multiple parameters; the automation controller reading the inference result and selecting a portion of the output data and their corresponding parameters from the inference result, and performing association and mapping based on the selected output data and their corresponding parameters.

[0071] Furthermore, the action also includes: performing translation on the AI ​​inference device and the automation controller based on different programming languages ​​corresponding to different communication protocols, so as to unify the types of different programming languages.

[0072] Furthermore, the action also includes: executing a program on the first source code and the second source code to convert the first source code and the second source code into binary code.

[0073] A third aspect of the present invention also provides a data interaction device for an AI inference device and an automation controller, comprising: an analysis device that analyzes the topology of an AI model and obtains multiple nodes of the AI ​​model and the interconnections between the multiple nodes; a matching and mapping device that matches the output nodes of the AI ​​model based on user input, determines the format of the inference result based on the AI ​​model, and maps the format of the inference result to the automation controller; and a matching device that matches the communication protocol for data interaction between the AI ​​inference device and the automation controller based on user input.

[0074] The fourth aspect of the invention also provides a computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed, cause at least one processor to perform the method described in the first aspect of the invention.

[0075] The fifth aspect of the invention also provides a computer-readable medium having stored thereon computer-executable instructions, which, when executed, cause at least one processor to perform the method according to the first aspect of the invention.

[0076] Therefore, this invention can analyze both the input nodes and output nodes of the AI ​​model. Once the output node is determined, its data format can be analyzed. For example, this invention can determine the number of integer variables in a node. Based on this, this invention can directly analyze the output format of the model file itself, and can package the inference results according to the output format and send them to the PLC via the corresponding communication protocol. This invention also helps the PLC generate a program to receive the packaged data and parse the analyzed format.

[0077] The data interaction mechanism between the AI ​​inference device and the automated controller provided by this invention does not require engineers to have extensive programming experience and skills, nor does it require them to be particularly proficient in a particular programming language or AI knowledge. This invention is executed automatically, reducing the work required for system integration and debugging.

[0078] This invention provides AI model analysis and visualization, enabling engineers to better understand the topology of AI models and user needs, and to determine the analysis and data structure for establishing data interaction. This invention also provides a unified operating environment and data format to eliminate differences between AI models, PLC devices, and communication protocols, and enables data interaction through drag-and-drop operations that do not require programming.

[0079] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above. Therefore, the scope of protection of the present invention should be defined by the appended claims. Furthermore, no reference numerals in the claims should be construed as limiting the scope of the claims; the word "comprising" does not exclude any means or steps not listed in other claims or the specification; the words "first," "second," etc., are used only to indicate names and do not indicate any specific order.

Claims

1. A data interaction method between AI inference devices and automated controllers, wherein, Includes the following steps: S1, Analyze the topology of the AI ​​model and obtain the multiple nodes of the AI ​​model and the interconnections between the multiple nodes; S2, Match the output node of the AI ​​model based on the user's input, determine the format of the inference result based on the AI ​​model, and map the format of the inference result to the automation controller; S3, based on the user's input, match the communication protocol between the AI ​​inference device and the automation controller to perform data interaction; The data interaction method further includes the following steps performed on the AI ​​inference device: S4, Based on the format of the inference result, the format of the communication protocol, and the operating environment of the inference device, generate the first source code for the AI ​​inference device; S5, download the first source code to the AI ​​inference device; S6, based on the format of the inference result, the inference result is packaged using the first source code and sent to the automation controller via a matching communication protocol; The data interaction method further includes the following steps performed on the automation controller: S7. Based on the format of the inference result, the format of the communication protocol, and the operating environment of the automation controller, a second source code is generated for the automation controller. S8, Download the second source code to the automation controller; S9, control the automation controller to receive and parse the inference results to send the feedback results to the AI ​​inference device.

2. The data interaction method between the AI ​​inference device and the automation controller according to claim 1, characterized in that, The AI ​​inference device is an edge device, and the automation controller is a PLC.

3. The data interaction method between the AI ​​inference device and the automation controller according to claim 2, characterized in that, Step S2 further includes the following steps: matching the output node of the AI ​​model based on the user's input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the input image of the PLC.

4. The data interaction method between the AI ​​inference device and the automation controller according to claim 1, characterized in that, The data interaction method further includes the following steps: AI inference devices perform inference on AI models based on input data, and the inference results include multiple output data and their corresponding multiple parameters. The automation controller reads the inference results and selects a portion of the output data and its corresponding parameters from the inference results, and performs association and mapping based on the selected output data and its corresponding parameters.

5. The data interaction method between the AI ​​inference device and the automation controller according to claim 1, characterized in that, The data interaction method further includes the following steps: The AI ​​inference device and the automation controller are translated based on different programming languages ​​corresponding to different communication protocols in order to unify the types of different programming languages.

6. The data interaction method between the AI ​​inference device and the automation controller according to claim 1, characterized in that, The data interaction method further includes the following steps: executing a program on the first source code and the second source code to convert the first source code and the second source code into binary code.

7. A data interaction system for AI inference devices and automated controllers, wherein, include: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the data interaction system to perform actions, the actions including: S1, Analyze the topology of the AI ​​model and obtain the multiple nodes of the AI ​​model and the interconnections between the multiple nodes; S2, Match the output node of the AI ​​model based on the user's input, determine the format of the inference result based on the AI ​​model, and map the format of the inference result to the automation controller; S3, based on user input, match the communication protocol between the AI ​​inference device and the automation controller to perform data interaction. The action also includes: S4, Based on the format of the inference result, the format of the communication protocol, and the operating environment of the inference device, generate the first source code for the AI ​​inference device; S5, download the first source code to the AI ​​inference device; S6, based on the format of the inference result, the inference result is packaged using the first source code and sent to the automation controller via a matching communication protocol; S7. Based on the format of the inference result, the format of the communication protocol, and the operating environment of the automation controller, a second source code is generated for the automation controller. S8, Download the second source code to the automation controller; S9, control the automation controller to receive and parse the inference results to send the feedback results to the AI ​​inference device.

8. The data interaction system for the AI ​​inference device and the automated controller according to claim 7, characterized in that, The AI ​​inference device is an edge device, and the automation controller is a PLC.

9. The data interaction system for the AI ​​inference device and the automated controller according to claim 8, characterized in that, The action S2 further includes: matching the output node of the AI ​​model based on the user's input, determining the format of the inference result based on the AI ​​model, and mapping the format of the inference result to the input image of the PLC.

10. The data interaction system for the AI ​​inference device and the automated controller according to claim 7, characterized in that, The action also includes: AI inference devices perform inference on AI models based on input data, and the inference results include multiple output data and their corresponding multiple parameters. The automation controller reads the inference results and selects a portion of the output data and its corresponding parameters from the inference results, and performs association and mapping based on the selected output data and its corresponding parameters.

11. The data interaction system for the AI ​​inference device and the automated controller according to claim 7, characterized in that, The action also includes: The AI ​​inference device and the automation controller are translated based on different programming languages ​​corresponding to different communication protocols in order to unify the types of different programming languages.

12. The data interaction system for the AI ​​inference device and the automated controller according to claim 7, characterized in that, The action further includes: executing a program on the first source code and the second source code to convert the first source code and the second source code into binary code.

13. A data interaction device for AI inference devices and automated controllers, wherein, Including the following: An analysis device analyzes the topology of an AI model and obtains multiple nodes of the AI ​​model and the interconnections between the multiple nodes; A matching mapping device matches the output nodes of the AI ​​model based on user input, determines the format of the inference result based on the AI ​​model, and maps the format of the inference result to an automation controller. A matching device that matches the communication protocol between the AI ​​inference device and the automation controller for data interaction based on user input; The data interaction device further includes the following steps performed on the AI ​​inference device: The first source code is generated for the AI ​​inference device based on the format of the inference result, the format of the communication protocol, and the operating environment of the inference device. Download the first source code to the AI ​​inference device; Based on the format of the inference result, the inference result is packaged using the first source code and sent to the automation controller via a matching communication protocol; The data interaction device further includes the following steps performed at the automation controller: Based on the format of the reasoning result, the format of the communication protocol, and the operating environment of the automation controller, a second source code is generated for the automation controller. Download the second source code to the automation controller; The automated controller receives and parses the inference results to send feedback results to the AI ​​inference device.

14. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed, cause at least one processor to perform the method according to any one of claims 1 to 6.

15. A computer-readable medium having stored thereon computer-executable instructions, which, when executed, cause at least one processor to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • System, cloud platform, device and method for configuring edge device

    CN110474790A

  • Artificial intelligence computing device, control method and apparatus, engineer station, and industrial automation system

    CN112424713A