Programmable logic controller, reasoning execution system, reasoning execution method, and program
By designing a programmable logic controller with control applications, multiple inference applications and machine learning platforms, the problem of difficulty in executing multiple inference applications in the prior art is solved, and appropriate inference results are obtained in the production site and control efficiency is improved.
Patent Information
- Application Number
- CN202280097745.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-04-25
AI Technical Summary
It is difficult for existing industrial PC equipment to effectively execute multiple inference applications in the production site to control the device, resulting in the inability to obtain appropriate inference results.
A programmable logic controller is designed with control applications, multiple inference applications and machine learning platforms. The control application generates execution instructions. The machine learning platform responds to these instructions, determines the inference application that satisfies pre-set rules from multiple inference applications, and causes it to perform inference processing, and the generated inference results are sent back to the control application.
It is realized that the appropriate inference application is determined from multiple inference applications and generates appropriate inference results, thereby improving the control efficiency of the device in the production site.
Smart Images

Figure CN119895387A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a programmable logic controller, an inference execution system, an inference execution method and a program. Background Art
[0002] It is known that data is collected from FA (Factory Automation) instruments at a manufacturing site, and a technology is used to control the instruments using an inference result obtained by an artificial intelligence algorithm using the collected data. For example, Patent Document 1 discloses an industrial PC device having a control application that outputs control data for controlling an apparatus as a control object, and an inference application that performs inference processing using the control data and apparatus data representing the operation of the apparatus as input.
[0003] Patent Document 1: Japanese Patent Application No. 2021-531574 Summary of the invention
[0004] In the industrial PC device, one inference application program is determined to be executed. However, in the production site, it is sometimes required to control the device by executing multiple inference applications that perform various inference processes according to the purpose. Therefore, there is room for improvement in terms of obtaining appropriate inference results from multiple inference applications according to the purpose of inference.
[0005] The present invention is proposed in view of the above-mentioned problems, and its purpose is to propose a programmable logic controller, an inference execution system, an inference execution method and a program that can obtain appropriate inference results from multiple inference application programs.
[0006] In order to achieve the above-mentioned objectives, the programmable logic controller involved in the present invention has: a control application, which generates execution instruction information to indicate the execution of reasoning processing; multiple reasoning applications, which can execute reasoning processing and generate reasoning results; and a machine learning platform, which responds to the execution instruction information sent by the control application, determines an reasoning application that satisfies pre-set rules from multiple reasoning applications and causes the determined reasoning application to execute reasoning processing, and sends the reasoning results generated by the determined reasoning application to the control application.
[0007] Effects of the Invention
[0008] According to the present invention, an inference application satisfying a preset rule is determined from a plurality of inference applications, and an inference result generated by the determined inference application is sent to a machine learning platform of a control application. Therefore, suitable inference results can be obtained from a plurality of inference applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 This is a diagram showing a logical structure of a programmable logic controller according to Embodiment 1 of the present invention.
[0010] Figure 2 Yes means Figure 1 FIG. 1 is a diagram showing an example of a correspondence table referenced by an event broker.
[0011] Figure 3 Yes means Figure 1 A block diagram of the physical structure of a programmable logic controller is shown.
[0012] Figure 4 This is a flowchart showing an inference execution process performed by a programmable logic controller according to an embodiment.
[0013] Figure 5 This is a diagram showing the structure of a programmable logic controller according to the second embodiment.
[0014] Figure 6 This is a flowchart showing the inference execution processing performed by the programmable logic controller involved in the second embodiment.
[0015] Figure 7 This is a diagram showing the structure of the inference execution system involved in the third embodiment.
[0016] Figure 8 This is a flowchart showing the inference execution processing performed by the inference execution system involved in the third embodiment.
[0017] Fig. 9 This is a diagram showing the structure of an inference execution system according to a fourth embodiment.
[0018] Fig.10 This is a flowchart showing the inference execution processing performed by the inference execution system involved in the fourth embodiment. DETAILED DESCRIPTION
[0019] Hereinafter, a programmable logic controller, an inference execution system, an inference execution method, and a program according to an embodiment of the present invention will be described with reference to the accompanying drawings. In addition, the same reference numerals are given to the same or corresponding parts in the drawings.
[0020] (Implementation Method 1)
[0021] The programmable logic controller involved in this embodiment has a control application that generates control data for controlling an instrument as a control object and a plurality of reasoning applications that perform different reasoning processes. The control application generates execution instruction information that instructs the execution of the reasoning process. The programmable logic controller determines the reasoning application that performs the reasoning process consistent with the purpose of the reasoning included in the execution instruction information, and instructs the determined reasoning application to perform the reasoning process. The reasoning application performs the reasoning process in response to the execution instruction from the programmable logic controller, and outputs the reasoning result to the control application. The control application uses the reasoning result to control the instrument.
[0022] like Figure 1 As shown, the programmable logic controller 100 involved in this embodiment is connected to the instrument 200 as the control object via the communication unit 300 so that it can communicate with each other. The instrument 200 is a sensor, an assembly robot, a drive instrument, etc. The communication unit 300 is an industrial control network implemented by a communication line set up in the factory. However, the communication unit 300 can also be an information network represented by a LAN (Local Area Network). In addition, the communication unit 300 can be a dedicated line or a wide area network represented by the Internet.
[0023] Next, the logical structure of the programmable logic controller 100 is described. The programmable logic controller 100 has: a real-time OS (Operating System) 101, which has the function of executing processing to meet the time limit; a general-purpose OS 102, which is generally used for various purposes; reasoning components 103A, 103B, and 103C, which perform machine learning based on instrument data representing the action of the instrument 200 collected from the instrument 200, generate a learning model, and perform reasoning processing based on the generated learning model; a control application 104, which performs processing related to the control of the instrument 200; and a machine learning platform 105, which exchanges data bidirectionally between the reasoning component 103 and the control application 104. In addition, hereinafter, the reasoning components 103A, 103B, and 103C are also collectively referred to as the reasoning component 103.
[0024] The real-time OS 101 is an OS designed to execute a process with a time limit. The general-purpose OS 102 is a non-real-time OS that does not guarantee real-time performance. A control application 104 is installed on the real-time OS 101. An inference component 103 is installed on the general-purpose OS 102.
[0025] The inference component 103 includes a machine learning engine 106, which is a runtime capable of executing machine learning processing and inference processing, a trained model 107 used for inference processing, and an inference application 108 for executing inference processing. The programmable logic controller 100 has a plurality of inference components 103A, 103B, and 103C. Each inference component 103A, 103B, and 103C executes inference processing with different purposes, such as quality prediction, failure prediction, wear prediction, and control parameter optimization.
[0026] The machine learning engine 106 is a runtime capable of executing the following processes, namely, the process of generating and updating the learning model through machine learning and the inference process based on the trained model 107. Machine learning is implemented using any appropriate machine learning method such as neural network, deep neural network, reinforcement learning, decision tree learning, genetic algorithm, classifier, etc. In addition, the input data used by the machine learning engine 106 in learning is not limited to instrument data, but can also be control data generated by the control application 104, and the above multiple data can also be used as input data.
[0027] The trained model 107 is a learning model used for inference processing. The trained model 107 may be a model trained by the machine learning engine 106 , or a model pre-trained on the cloud may be stored in the programmable logic controller 100 .
[0028] The inference application 108 calls the trained model 107 and the machine learning engine 106 suitable for the execution environment of the inference application 108, and uses the trained model 107 to perform inference processing.
[0029] The control application 104 is, for example, an application described in ladder diagram language that controls the operation of the instrument 200 through the input and output ports associated with the instrument 200. The control application 104 runs on the real-time OS 101. The control application 104 performs the collection, processing, diagnosis, feedback, etc. of data from the instrument 200. The processing of data includes smoothing, sharpening, FFT (Fast Fourier Transform) processing, etc. of data. The diagnosis of data includes threshold determination, pattern matching, etc. The feedback includes the processing of generating control data for controlling the instrument 200, such as stopping, decelerating, and restarting the instrument 200. In addition, the control application 104 communicates with the machine learning platform 105 via the inference API (Application Programming Interface) 109, provides input data, and instructs the execution of the inference processing. In addition, the control application 104 obtains the inference result obtained by the inference component 103 via the inference API 109.
[0030] The machine learning platform 105 includes: an inference API 109 for bidirectionally exchanging data with the control application 104; and an event broker 110 for determining an inference component 103 that matches the purpose of inference and bidirectionally exchanging data with the inference application 108 of the determined inference component 103. The machine learning platform 105 is installed in the real-time OS 101 and the general OS 102, respectively.
[0031] The inference API 109 is an interface for bidirectionally exchanging data with the control application 104. Specifically, the inference API 109 receives execution instruction information instructing execution of an inference process and input data used for the inference process from the control application 104. In addition, the inference API 109 transmits the inference result output from the inference component 103 to the control application 104.
[0032] The event broker 110 determines the reasoning application 108 that matches the purpose of reasoning, and exchanges data bidirectionally with the determined reasoning application 108. Specifically, the event broker 110 is based on Figure 2The correspondence table as shown in the figure associates the purpose of inference, the inference application 108 that executes each inference process, and the storage location of each inference application 108, respectively, and determines the inference application 108 that matches the purpose of inference. As shown in the figure, the correspondence table includes information such as "inference ID" which is an identifier for identifying the purpose of inference, "purpose" which indicates the purpose of inference, "inference application" which is information for identifying the inference application 108, and "storage location" which indicates the address of the storage location of each inference application 108. When the event agent 110 obtains execution instruction information that instructs the execution of the inference process from the control application 104 via the inference API 109, the inference application 108 is determined based on the obtained execution instruction information and the correspondence table. For example, when the execution instruction information instructs the execution of the inference process with quality prediction as the purpose, the execution instruction information includes the identifier "X001" indicating that the purpose of inference is quality prediction. The event agent 110 reads out the correspondence table, and determines that the identification information of the inference application 108 with the inference ID "X001" is "AP1000", and the address of the storage location is "XXX". Next, the event agent 110 sends the input data used for the inference processing to the determined inference application 108 "AP1000" and instructs the execution of the inference processing. The inference application 108 "AP1000" assigns the input data received from the event agent 110 to the trained model 107, and executes the inference processing with quality prediction as the purpose. The inference application 108 "AP1000" sends the inference result obtained by the inference processing to the event agent 110. The inference result is sent to the control application 104 via the inference API 109. In addition, the correspondence table is an example of corresponding information.
[0033] Next, refer to Figure 3 The physical structure of the programmable logic controller 100 is described. The programmable logic controller 100 has two processors 11a and 11b that execute processing in accordance with a program, a RAM (Random Access Memory) 12 as a volatile memory, a ROM (Read Only Memory) 13 as a non-volatile memory, a storage unit 14 that stores data, an input unit 15 that receives input of information, and a communication unit 16 that transmits and receives information, and they are connected via an internal bus 99.
[0034] The processors 11 a and 11 b each include a CPU (Central Processing Unit). The processors 11 a and 11 b read a program stored in the storage unit 14 to the RAM 12 and execute the program, thereby executing various processes. Figure 1The real-time OS 101 shown is executed on the processor 11 a , and the general-purpose OS 102 is executed on the processor 11 b .
[0035] The RAM 12 is used as a work area of the CPU. The ROM 13 stores a control program executed by the CPU for basic operation of the programmable logic controller 100, a BIOS (Basic Input Output System), and the like.
[0036] The storage unit 14 has a hard disk drive, stores the program executed by the CPU, and stores various data used when the program is executed. Figure 1 The real-time OS 101, general OS 102, reasoning component 103, control application 104 and machine learning platform 105 are shown for storage.
[0037] The input unit 15 is a user interface including a keyboard, a mouse, etc. The input unit 15 acquires information input by a user and notifies the processors 11 a and 11 b of the acquired information.
[0038] The communication unit 16 is a network terminal device or a wireless communication device connected to the network, and a serial interface or a LAN interface connecting them. The communication unit 16 receives a signal from the outside and outputs the data represented by the signal to the processors 11a and 11b. In addition, the communication unit 16 sends a signal representing the data output from the processors 11a and 11b to an external device.
[0039] Next, refer to Figure 4 , describing the actions performed by the programmable logic controller 100 having the above-described structure.
[0040] As a preparation before executing the inference execution process, a plurality of inference components 103 are pre-stored in the storage unit 14. The user gives learning data to the machine learning engines 106 included in each inference component 103 respectively to make them perform machine learning, thereby generating a trained model 107 used when performing the inference process, which is pre-stored in the storage unit 14. Specifically, the learning data includes, for example, a pair of data consisting of input data and output data, the input data including instrument data and control data representing the action of the instrument 200, and the output data including information representing the quality of the workpiece, the wear value of the workpiece, the failure rate of the instrument 200, and other data. The machine learning engine 106 performs machine learning to make the inference result close to the result data based on the given learning data, generates a trained model 107, and stores it in the storage unit 14.
[0041] If the reasoning component 103 is stored and the trained model 107 is generated, the user generates a correspondence table that associates the purpose of the reasoning performed by each reasoning application 108, the reasoning applications 108 stored in the storage unit 14, and the storage location of each reasoning application 108, and stores it in the storage unit 14 in advance.
[0042] The programmable logic controller 100 that has been prepared in this way receives information indicating the purpose of reasoning via an engineering design tool connected to the programmable logic controller 100, determines an inference application 108 that matches the purpose of reasoning, and performs inference execution processing on the determined inference application 108 to instruct the execution of the inference processing.
[0043] The engineering design tool displays an input screen for receiving user input according to the purpose of reasoning. Specifically, options such as "quality prediction", "fault prediction", "wear prediction", and "control parameter optimization" are displayed in the input screen. The user operates the input unit 15 to select the desired purpose. If the user selects the purpose of reasoning and requests the start of the reasoning execution process, the engineering design tool notifies the control application 104. If the control application 104 receives the notification, the programmable logic controller 100 starts processing. In addition, the start of the reasoning execution process is not limited to the case where input is received from the user. The user can also pre-set a schedule for each reasoning purpose. When the set date and time is reached, the reasoning execution process starts automatically.
[0044] First, the control application 104 sends execution instruction information indicating the execution of the inference processing for the purpose of inference selected by the user and the input data to be the object of inference to the machine learning platform 105 (step S11). The execution instruction information includes an identifier for identifying the purpose of inference selected by the user. The input data includes, for example, various data required for inference, such as instrument data collected from the instrument 200 and control data output to the instrument 200 by the control application 104. In addition, the control application 104 can use data collected in real time as input data, or can use data collected in advance and stored in the storage unit 14 as input data.
[0045] Next, the machine learning platform 105 receives the execution instruction information and input data sent from the control application 104 via the inference API 109 (step S12 ). The inference API 109 sends the received execution instruction information and input data to the event broker 110 .
[0046] Next, the event agent 110 refers to Figure 2The correspondence table shown in FIG. 1 identifies the inference application 108 to be executed (step S13). Specifically, the event agent 110 obtains an identifier for identifying the purpose of inference from the execution instruction information received in step S12. For example, when the execution instruction information indicates that the inference process with quality prediction as the purpose is to be executed, the execution instruction information includes an identifier "X001" indicating that the purpose of inference is quality prediction. The event agent 110 obtains the identifier "X001" indicating that the purpose of inference is quality prediction from the execution instruction information. Next, the event agent 110 refers to the correspondence table and uses the extracted identifier "X001" as a keyword to identify the inference application 108 to be executed and the address of its storage location. Specifically, the event agent 110 determines whether there is data consistent with "X001" in the "inference ID" of the correspondence table. Next, the event agent 110 determines that "AP1000" associated with "X001" is the inference application 108 to be executed, and "XXX" is the address of the storage location.
[0047] return Figure 4 , the event agent 110 sends an execution start instruction and input data for the inference processing to the inference application 108 determined in step S13 (step S14). If the inference application 108 receives the execution start instruction, it reads out the pre-stored trained model 107. Next, the inference application 108 inputs the received input data into the trained model 107 and obtains the inference result output from the trained model 107 (step S15).
[0048] Next, the inference application 108 sends the inference result obtained in step S15 to the event agent 110 (step S16 ).
[0049] Next, the event agent 110 sends the inference result received in step S16 to the control application 104 via the inference API 109 (step S17). When the control application 104 receives the inference result sent in step S17 (step S18), the inference execution process ends. Then, the control application 104 generates control data based on the acquired inference result and controls the device 200.
[0050] As described above, the programmable logic controller 100 identifies the inference component 103 that matches the desired inference purpose from among the plurality of inference components 103 that perform inference processing for different purposes, and instructs the inference component 103 to execute the inference component 103. Therefore, an appropriate inference application can be executed according to the inference purpose.
[0051] (Implementation Method 2)
[0052] In the above-mentioned embodiment, the inference components 103A-103C perform inference processing with different purposes, and the event agent 110 determines the inference component 103 that matches the purpose of inference from the inference components 103A-103C, and instructs the execution of the inference processing. In contrast, the programmable logic controller 100a involved in the second embodiment has a plurality of inference components 103 that perform inference processing with the same purpose, and selects one optimal inference result that satisfies a predetermined condition from the inference results output by each inference component 103 and outputs it to the control application 104.
[0053] like Figure 5 As shown, the programmable logic controller 100a has a real-time OS 101, a universal OS 102, a control application 104, and a machine learning platform 105, which are provided by the programmable logic controller 100. In addition to the reasoning components 103A-103C, the reasoning components 103D-103F have different reasoning purposes, and the reasoning components 103D-103F have the same reasoning purpose. In addition to the reasoning API 109 and the event agent 110 provided by the programmable logic controller 100, the machine learning platform 105 of the programmable logic controller 100a also has an inference result selection unit 111 that selects the best reasoning result from the reasoning results respectively output by the reasoning components 103D-103F.
[0054] The reasoning components 103D-103F perform reasoning processing for the same purpose. Each reasoning application 108 of the reasoning components 103D-103F is executed on a different CPU having either the real-time OS 101 or the general-purpose OS 102. Therefore, the real-time performance of each reasoning application 108 is different. In addition, the reasoning components 103D-103F have different trained models 107, and each reasoning application 108 performs reasoning processing using its own trained model 107. Therefore, the amount of calculation of the reasoning processing performed by each reasoning application 108 is different. Therefore, the reasoning results output by the reasoning components 103D-103F and the time required to output the reasoning results are different.
[0055] When the control application 104 instructs the execution of the inference processing, it sends the execution instruction information including the selection condition for selecting the inference result to the machine learning platform 105. Specifically, the selection condition is a condition for setting the priority of the inference result, and includes the time for waiting for the inference result, i.e., the allowable time, and the setting rules for setting the priority of the received inference result when multiple inference results are received within the allowable time. The setting rules define that when each trained model 107 of the inference components 103D-103F is a model based on a neural network, the more the number of layers in the intermediate layer of the neural network, the higher the priority is set. These selection conditions are pre-set by the user and stored in the storage unit 14. In addition, the selection condition is an example of a priority setting rule.
[0056] The inference result selection unit 111 selects the inference result to be sent to the control application 104 from the inference results outputted by the inference components 103D-103F. Specifically, the inference result selection unit 111 selects the inference result to be sent to the control application 104 according to the selection condition included in the execution instruction information sent from the control application 104.
[0057] Next, refer to Figure 6 The operation of the programmable logic controller 100a is described. In the following description, it is assumed that the inference components 103D-103F perform inference processing for the same purpose, and the control application 104 instructs the execution of the inference processing corresponding to the purpose of the inference performed by the inference components 103D-103F. In addition, in the following description, it is assumed that the user has pre-stored selection conditions in the storage unit 14, and the selection conditions are: the allowable time for waiting for the inference result is 0.5 seconds, and the more levels of the trained model 107, the higher the priority of the inference result is set. In addition, in Figure 6 Including Figure 4 Since the steps are common to the flowcharts shown, the description will focus on the differences.
[0058] In step S11, the control application 104 sends, in addition to the purpose of inference, execution instruction information including selection conditions for selecting inference results to the machine learning platform 105. The control application 104 reads the selection conditions from the storage unit 14 and sends the execution instruction information including the read selection conditions.
[0059] In step S12, if the event agent 110 of the machine learning platform 105 receives the execution instruction information via the inference API 109, then the event agent 110 performs a process of obtaining a selection condition from the execution instruction information (step S21). Specifically, the event agent 110 obtains a selection condition from the execution instruction information that the allowable time for waiting for the inference result is 0.5 seconds and the higher the number of levels of the trained model 107, the higher the priority is set, and outputs the obtained selection condition to the inference result selection unit 111.
[0060] In step S16, if the inference results of each are sent by the inference application 108 of the inference components 103D-103F, the inference result selection unit 111 selects the best inference result from the inference results sent by the inference components 103D-103F according to the selection condition obtained in step S21 (step S22). Specifically, first, the inference result selection unit 111 extracts the inference results received within the allowable time for waiting for the inference results set by the selection condition. The inference result selection unit 111 calculates the difference between the sending time of the execution start instruction issued by S14 and the receiving time of each inference result of the inference components 103D-103F, and determines whether the calculated difference is less than or equal to the allowable time, that is, 0.5 seconds. Next, when there are multiple inference results less than or equal to 0.5 seconds, the inference result selection unit 111 obtains the number of levels of each trained model 107, and sets a higher priority with a larger number of levels. The inference result selection unit 111 determines the inference result with the highest priority as the best inference result. When the inference result selection unit 111 receives only one inference result within the allowable time, the inference result selection unit 111 may determine the inference result received within the allowable time as the best inference result without setting a priority.
[0061] As described above, the programmable logic controller 100a has a plurality of inference components 103 that perform inference processing for the same purpose and have different computational loads and real-time performances, and selects the best inference result from the inference results output by the plurality of inference components 103 through a pre-set selection condition. The user customizes the selection condition according to the purpose of inference, thereby being able to execute different inference applications 108 such as machine learning methods and learning models to obtain the best inference result.
[0062] (Implementation 3)
[0063] In the above embodiment, the programmable logic controller 100 has the inference component 103. The present invention is not limited to this, and the inference component 103 stored in a server which is an external device different from the programmable logic controller 100 may be downloaded and deployed in the programmable logic controller 100 to execute the inference process.
[0064] Specifically, the inference execution system 1000 according to the third embodiment is as follows: Figure 7 Shown are a server 400 and a programmable logic controller 100b.
[0065] The server 400 has: an inference component-storage 401, which stores a plurality of inference components 103 and expansion position information 410 indicating the configuration position when the inference component 103 is expanded in the programmable logic controller 100b in an associated manner; and an inference component expansion unit 402, which selects the inference component 103 to be expanded in the programmable logic controller 100b and instructs the programmable logic controller 100b to expand the selected inference component.
[0066] The deployment position information 410 stored in the inference component storage 401 is information indicating the deployment position of each inference component 103 in the programmable logic controller 100 b , and includes, for example, a directory name.
[0067] The inference component expansion unit 402 selects an inference component 103 that matches the purpose of the inference sent from the programmable logic controller 100b from the inference component storage 401. Specifically, a correspondence table that associates the purpose of the inference, the inference application and its storage location is pre-stored in the inference component storage 401. The inference component expansion unit 402 refers to the correspondence table to determine the inference component 103 that matches the purpose of the input inference. The inference component expansion unit 402 sends the determined inference component 103 together with the expansion position information 410 to the programmable logic controller 100b, and instructs the programmable logic controller 100b to expand the sent inference component 103. In addition, the inference component expansion unit 402 is an example of an inference application selection unit.
[0068] The programmable logic controller 100b has the real-time OS 101, the universal OS 102, the control application 104, and the machine learning platform 105 of the programmable logic controller 100a. The machine learning platform 105 of the programmable logic controller 100b has the inference API 109, the event agent 110, and the inference result selection unit 111 of the programmable logic controller 100a.
[0069] Next, refer to Figure 8 The operation of the inference execution system 1000 is described. Figure 8 Including Figure 4 , 6 Since the steps are common to the flowcharts shown, the description will focus on the differences.
[0070] In step S31 , the control application 104 transmits execution instruction information including an identifier for identifying the purpose of inference to the server 400 (step S31 ).
[0071] Next, the inference component expansion unit 402 of the server 400 obtains the purpose of inference from the execution instruction information sent by the programmable logic controller 100b, and selects the inference component 103 that matches the obtained purpose of inference from the inference component storage 401 (step S32). Specifically, the inference component expansion unit 402 obtains an identifier that identifies the purpose of inference from the execution instruction information. Next, the inference component expansion unit 402 refers to the correspondence table to determine the inference component 103.
[0072] Next, the inference component expansion unit 402 sends the selected inference component 103 together with the expansion position information to the machine learning platform 105, and instructs the expansion of the inference component 103 (step S33). The machine learning platform 105 expands the received inference component according to the obtained expansion position information (step S34). Then, the machine learning platform 105 instructs the inference application 108 of the expanded inference component 103 to start executing the inference process (step S14).
[0073] As described above, when executing the inference process, the programmable logic controller 100b downloads and executes the inference component 103 that matches the purpose of inference from the inference component 103 stored in the server 400. As a result, the programmable logic controller 100b does not need to store the inference component 103 all the time, thereby suppressing the increase in the storage capacity of the storage unit 14.
[0074] (Implementation 4)
[0075] In the third embodiment, the inference component 103 matching the input inference purpose is downloaded from the server 400, but the present invention is not limited thereto. The server 400 may select the inference component 103 predicted to obtain the best inference result in addition to the inference purpose and download it to the programmable logic controller 100.
[0076] Specifically, the inference execution system 1000a according to the fourth embodiment is as follows: Fig. 9 Shown are a server 400a and a programmable logic controller 100c.
[0077] The server 400 a includes an inference simulator 403 for simulating the time required for inference processing executed by each inference component 103 , in addition to the inference component storage 401 and the inference component development unit 402 included in the server 400 .
[0078] The inference simulator 403 predicts the time required for the inference process executed by the inference component 103 by using a virtual programmable logic controller that simulates the programmable logic controller 100c and is constructed in advance on the server 400a. The inference simulator 403 is an example of a prediction unit.
[0079] The programmable logic controller 100c has the real-time OS 101, the universal OS 102, the control application 104, and the machine learning platform 105 of the programmable logic controller 100b. The machine learning platform 105 of the programmable logic controller 100c has the inference API 109 and the event agent 110 of the programmable logic controller 100b, but does not include the inference result selection unit 111.
[0080] Next, refer to Fig.10 The operation of the inference execution system 1000a is described below. Fig.10 Including Figure 8 Since the steps are common to the flowcharts shown, the description will focus on the differences.
[0081] In step S31, the control application 104 sends an execution instruction message including an identifier for identifying the purpose of inference and a selection condition to the server 400a (step S31). The selection condition, as described in Embodiment 2, includes a time to wait for the inference result after the execution instruction message is sent, i.e., a permissible time, and a setting rule for setting a priority for the inference result.
[0082] Next, the inference component expansion unit 402 of the server 400a obtains the purpose of inference and the selection condition from the execution instruction information sent from the programmable logic controller 100c (step S41). The inference component expansion unit 402 refers to the correspondence table and specifies a plurality of inference components 103 that match the obtained purpose of inference.
[0083] Next, the inference simulator 403 predicts the time required for the multiple inference components 103 determined in step S41 to perform the inference processing (step S42). Specifically, the inference simulator 403 executes the inference components 103 on the virtual programmable logic controller pre-built on the server 400a, respectively, and obtains the predicted time required for the inference processing. The inference simulator 403 sends the obtained predicted time to the inference component expansion unit 402. The inference component expansion unit 402 selects the best inference component 103 that meets the selection condition based on the selection condition obtained in step S41. Specifically, the inference component expansion unit 402 selects the inference component 103 whose predicted time falls within the allowable time set by the selection condition. And, when it is determined that there are multiple inference components 103 whose predicted time falls within the allowable time, the inference component expansion unit 402 assigns a priority to each inference component 103 according to the setting rule for setting the priority included in the selection condition. The inference component expansion unit 402 selects the inference component 103 with the highest priority as the best inference component 103. Then, the inference component expansion unit 402 sends the selected inference component 103 together with the expansion position information to instruct the expansion.
[0084] As described above, the inference execution system 1000a selects the best inference component 103 that meets the purpose of inference and the selection condition through the server 400a that stores the inference components 103, and sends it to the programmable logic controller 100c. Therefore, even if there are multiple inference components 103 that match the purpose of inference, the programmable logic controller 100c does not need to execute these inference components 103, or perform the process of selecting the best inference result to be sent to the control application 104 from the multiple inference results obtained by execution. Therefore, the processing efficiency of the programmable logic controller 100c can be improved.
[0085] As mentioned above, although embodiment of this invention was described, this invention is not limited to the said embodiment.
[0086] In the above embodiment, the reasoning application 108 is described as executing reasoning processing for one purpose, but the invention is not limited thereto and may execute reasoning processing for multiple purposes. Figure 2 In the correspondence table shown, a plurality of inference IDs may be registered in association with one inference application 108 .
[0087] In the above embodiment, the case where there are three inference components 103 is described, but any number of inference components 103 greater than or equal to two may be set. In this case, the number of inference applications 108 in the inference component 103 to be set is set to 1. Figure 2Just define it in the corresponding table shown.
[0088] In the above embodiment, the machine learning engine 106 uses the instrument data collected from the instrument 200 as the control target as input data to perform machine learning and generate a learning model, but the present invention is not limited to this. The input data used by the machine learning engine 106 for learning is not limited to the instrument data, but may also be control data generated by the control application 104, and the above multiple data may also be used as input data.
[0089] In addition, different selection conditions may be set for each purpose of inference. In this case, as long as the table in which the inference ID identifying the purpose of inference and the respective selection conditions are associated is stored in the storage unit 14, the control application 104 only needs to obtain the selection condition associated with the inference ID of the purpose of inference selected by the user, include the obtained selection condition in the execution instruction information, and send it to the machine learning platform 105.
[0090] In addition, although the rule for setting the priority of the inference result is described as the case where the priority of the inference result is set higher when the number of levels of the trained model 107 is greater, it is not limited to this. For example, any rule may be set as follows, that is, a high priority is set for a model with a large number of parameters included in the trained model 107, a different priority is set for each machine learning method, and a higher priority is set for an earlier output time of the inference result.
[0091] In addition, in the above-mentioned embodiments 2 and 4, the selection of one best inference result from a plurality of inference results is described, but it is not limited to this. For example, instead of the process of setting the priority, the calculation result obtained by the calculation processing of the average value, the central value, the most frequent value, etc. of the plurality of inference results can be used as the inference result. In this case, it is sufficient to predefine these calculation methods in the machine learning platform 105 or the inference result selection unit 111. In addition, the process of setting the priority and the calculation processing can be combined to perform as the inference result. For example, the calculation processing can be performed on the plurality of inference results received within the allowable time, and the calculation result can be used as the inference result.
[0092] In addition, in step S16, the inference result selection unit 111 calculates the difference between the time when the execution start instruction issued in step S14 is sent and the time when the inference result of the inference component 103 is received, and determines whether the calculated difference is less than or equal to the allowable time, but the invention is not limited thereto. The inference result selection unit 111 may also calculate the difference between the time when the execution instruction information is received from the control application 104 and the time when the inference result of the inference component 103 is received, and compare it with the allowable time.
[0093] In addition, the functions of the programmable logic controller 100 are not limited to dedicated devices, and can also be implemented using a common computer system. For example, a computer can be configured such that a program for implementing each function in the programmable logic controller 100 is stored in a computer-readable recording medium such as a CD-ROM (Compact Disc Read Only Memory) or a DVD-ROM (Digital Versatile Disc Read Only Memory) and distributed, and the program is installed in the computer, so that the above-mentioned functions can be implemented.
[0094] Furthermore, when each function is realized by sharing the tasks between the OS and the application program or by cooperative operation between the OS and the application program, only the application program may be stored in the recording medium.
[0095] The configurations described in the above embodiments may be selected or eliminated, or may be appropriately changed to other configurations without departing from the spirit of the present invention.
[0096] In addition, the present invention can realize various embodiments and variations without departing from the broad spirit and scope of the present invention. In addition, the above-mentioned embodiments are used to illustrate the present invention and are not intended to limit the scope of the present invention. That is, the scope of the present invention is not shown by the embodiments but by the claims. Moreover, various variations implemented within the scope of the claims and within the scope of the meaning of the invention equivalent thereto are deemed to be included within the scope of the present invention.
[0097] Description of the label
[0098] 100, 100a, 100b, 100c programmable logic controller, 101 real-time OS, 102 general OS, 103, 103A, 103B, 103C, 103D, 103E, 103F reasoning component, 104 control application, 105 machine learning platform, 106 machine learning engine, 107 trained model, 108 reasoning application, 109 reasoning API, 110 event agent, 111 reasoning result selection unit, 200 instrument, 300 communication unit, 400, 400a server, 401 reasoning component-storage, 402 reasoning component expansion unit, 403 reasoning simulator, 410 expansion position information, 11a, 11b processor, 12 RAM, 13 ROM, 14 storage unit, 15 input unit, 16 communication unit, 99 internal bus, 1000, 1000a reasoning execution system.
Claims
1. A programmable logic controller, comprising: a control application that generates execution instruction information that instructs execution of the inference processing; a plurality of reasoning applications capable of performing reasoning processing to generate reasoning results; and A machine learning platform, which responds to execution instruction information sent by the control application, determines an inference application that satisfies pre-set rules from multiple inference applications and causes the determined inference application to perform inference processing, and sends the inference results generated by the determined inference application to the control application.
2. The programmable logic controller according to claim 1, wherein: The machine learning platform receives the determined inference application from an external device that stores multiple inference applications, and sends the inference result generated by the received inference application to the control application.
3. The programmable logic controller according to claim 1 or 2, wherein: The execution instruction information includes information indicating the purpose of the inference processing. The machine learning platform refers to the corresponding information that associates the inference application with the purpose of the inference processing performed by each inference application, determines the inference application that is consistent with the purpose of the inference processing contained in the execution instruction information sent by the control application, instructs the determined inference application to execute the inference processing, and sends the inference result generated by the inference application that has been instructed to execute the inference processing to the control application.
4. The programmable logic controller according to claim 1 or 2, wherein: The machine learning platform instructs multiple inference applications to perform inference processing respectively, and sends the inference results generated based on the multiple inference results generated by the inference applications to the control application.
5. The programmable logic controller according to claim 4, wherein: The execution instruction information includes a priority setting rule for setting priorities for a plurality of inference results generated by a plurality of inference applications. The machine learning platform obtains the priority setting rule from the execution instruction information, instructs multiple inference applications to execute inference processing respectively, sets priorities for multiple inference results generated by the inference applications based on the obtained priority setting rule, and sends the inference result with the highest set priority to the control application.
6. The programmable logic controller according to claim 5, wherein: The priority setting rule includes a time allowed for waiting for the inference result sent from the inference application. Based on the priority setting rule, the machine learning platform extracts the inference results sent within the allowed time from the inference results sent by multiple inference applications, sets priorities for the extracted inference results, and selects the inference result with the highest set priority as the inference result to be sent to the control application.
7. An inference execution system comprising a programmable logic controller for controlling an instrument as a control object and a server for storing a plurality of inference application programs, in, The programmable logic controller has: a control application that generates execution instruction information that instructs execution of the inference processing; and a machine learning platform that sends the execution instruction information generated by the control application to the server, and in response to the execution instruction information, instructs the inference application sent from the server to execute inference processing, The server has an inference application selection unit, which determines an inference application that meets pre-set rules from multiple stored inference applications and sends the determined inference application to the machine learning platform.
8. The inference execution system according to claim 7, wherein: The inference application selection unit refers to the corresponding information that associates multiple inference applications stored in the server with the purpose of the inference processing performed by each inference application, determines the inference application that is consistent with the purpose of the inference processing contained in the execution instruction information generated by the control application, and sends the determined inference application to the machine learning platform.
9. The inference execution system according to claim 7, wherein: The execution instruction information includes a priority setting rule for setting priorities for a plurality of inference results generated by a plurality of inference applications. The priority setting rule includes a time allowed for waiting for the inference result sent from the inference application. The server further includes a prediction unit that predicts a time required until the inference application outputs an inference result. Based on the priority setting rule, the inference application selection unit extracts the inference application whose time predicted by the prediction unit falls within the allowable time from the multiple stored inference applications, sets a priority for the extracted inference results, and sends the inference application with the highest set priority to the machine learning platform.
10. A method for executing reasoning, comprising the following steps: Obtaining execution instruction information from the control application; and In response to the acquired execution instruction information, an inference application satisfying a preset rule is determined from a plurality of inference applications and the determined inference application is executed, and an inference result generated by the determined inference application is sent to the control application.
11. A program that causes a computer to execute the following processing: Obtaining execution instruction information from the control application; and In response to the acquired execution instruction information, an inference application satisfying a preset rule is determined from a plurality of inference applications and the determined inference application is executed, and an inference result generated by the determined inference application is sent to the control application.
Citation Information
Patent Citations
Industrial PC device and method of operating the same
JP2021531574A