Programming assistance device, programming assistance method and computer-readable storage medium
Through the difference extraction function of the programming auxiliary device, the machine learning model is used to infer and supplement the program source code, the problem of long time to create source code and omissions in the existing technology is solved, and fast and accurate source code creation and correction are achieved.
Patent Information
- Application Number
- CN202180100076.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-06
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2041-07-06
AI Technical Summary
The prior art requires input of all specifications of algorithms and sequences when creating the source code of a program, making it difficult to create the desired source code in a short time and is prone to correction omissions.
Using programming auxiliary devices, the source code input unit, the setting input unit, the inference device and the difference extraction device are used to use the trained model created by machine learning to infer the template source code based on the input source code and device information to extract the difference Source code to supplement the full source code.
It realizes the rapid creation of the desired source code in a short period of time, shortens development time, and prevents omissions of source code corrections when program changes.
Smart Images

Figure CN117581196B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a programming assistance device, a programming assistance method and a computer-readable storage medium for assisting the creation of a program. Background Art
[0002] When designing or developing a manufacturing device, etc., it is necessary to create source code for a program to be installed in the manufacturing device. The time required to create and modify the source code accounts for a large portion of the overall development workload of the manufacturing device. Therefore, by reducing the time required to create and modify the source code, the development workload can be reduced, and the development cost of the manufacturing device can also be reduced.
[0003] For example, the programming device of Patent Document 1 automatically outputs a program or document by inputting a program algorithm, sequence, etc. when creating a program in order to improve the efficiency of program creation and maintenance work and eliminate human errors.
[0004] Patent Document 1: Japanese Patent Application Laid-Open No. 9-73306 Summary of the invention
[0005] However, in the technology of Patent Document 1, all standardized algorithms, sequences, etc. must be input without omission when creating the source code of the program, and thus it is difficult to create the desired source code in a short time.
[0006] The present invention has been made in view of the above-mentioned circumstances, and an object of the present invention is to obtain a programming support device that can easily create a desired source code in a short time.
[0007] In order to solve the above problems and achieve the purpose, the programming assistance device of the present invention has: a source code input unit to which a first source code is input, the first source code being a source code input in the middle of creating programming software; and a setting input unit to which information about a device that uses a program corresponding to the first source code, i.e., a first device setting, and information about a function used by the device, i.e., a first function setting, is input. In addition, the programming assistance device of the present invention has an inference device that uses a trained model that infers a template of the first source code, i.e., a template source code, based on a combination of the first source code, the first device setting, and the first function setting, i.e., combination information, to infer a template source code corresponding to the combination information. In addition, the programming assistance device of the present invention has a difference extraction device that extracts a difference between the first source code input to the source code input unit and the template source code inferred by the inference device as a difference source code; and a source code output unit that outputs the difference source code.
[0008] Effects of the Invention
[0009] The programming support device according to the present invention achieves the effect of being able to easily create desired source code in a short time. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a diagram showing the structure of the programming support device involved in the first embodiment.
[0011] Figure 2 This is a diagram showing the configuration of a learning device according to Embodiment 1.
[0012] Figure 3 This is a flowchart showing the flow of a learning process performed by the learning device according to the first embodiment.
[0013] Figure 4 This is a diagram showing the structure of the estimation device involved in the first embodiment.
[0014] Figure 5 This is a flowchart showing the flow of an estimation process performed by the estimation device according to the first embodiment.
[0015] Figure 6 This is a flowchart showing the processing flow of programming support processing performed by the programming support device according to the first embodiment.
[0016] Figure 7 This is a diagram showing a hardware configuration example for realizing the programming support device according to the first embodiment. DETAILED DESCRIPTION
[0017] Hereinafter, a programming support device, a programming support method, and a programming support program according to embodiments of the present invention will be described in detail based on the accompanying drawings.
[0018] Implementation Method 1
[0019] Figure 1 1 is a diagram showing a configuration of a programming support device according to Embodiment 1. The programming support device 1 is a computer that supports programming when a user performs programming using an engineering design tool as programming software.
[0020] The programming support device 1 applies AI (Artificial Intelligence) to provide information for completing the source code input into the programming software based on the source code, the usage device setting and the usage function setting.
[0021] The device setting is information about the device that uses the program. The function setting is information about the function used by the device that uses the program. For example, a device that uses a program corresponding to the source code is a PLC (Programmable Logic Controller). In this case, the programming software used by the user is programming software for creating a program for the PLC.
[0022] When the device using the program is a PLC, examples of device settings are unit names used by the PLC, such as CPU (Central Processing Unit), power supply unit, input / output unit, analog unit, and communication unit. When the device using the program is a PLC, examples of function settings are function names such as RS485 communication and pulse output.
[0023] The programming support device 1 of the first embodiment uses a trained model created by machine learning such as unsupervised learning, for example, to extract source code (hereinafter referred to as differential source code) that completes the source code input into the creation of programming software and present it to the user. The source code input into the creation of programming software is the first source code.
[0024] The source code in progress received by the programming support device 1 may be a source code in progress of new creation or a source code in progress of change. In the first embodiment, the case where the source code in progress received by the programming support device 1 is a source code in progress of new creation is described.
[0025] The programming support device 1 includes a source code input unit 60, a setting input unit 50, an inference device 30, a difference extraction device 40, and a source code output unit 70. The programming support device 1 is also connected to a display device 2.
[0026] The source code input unit 60 receives the source code (first source code) inputted in the middle of the creation of the programming software and outputs it to the inference device 30, the difference extraction device 40 and the source code output unit 70. The programming software is software that creates the source code according to the operation performed by the user. The programming software can be programmed in the programming support device 1 or in another device (source code creation device) different from the programming support device 1. The source code creation device is a computer that creates the source code according to the operation performed by the user. The source code inputted in the middle of the creation of the programming software is inputted to the setting input unit 50.
[0027] The setting input unit 50 receives the use function setting and the use device setting input by the user and outputs them to the inference device 30. The use function setting and the use device setting received by the setting input unit 50 are the use function setting and the use device setting corresponding to the source code received by the source code input unit 60.
[0028] In addition, the use function setting and the use device setting may be input from an external device to the setting input unit 50. The use function setting in the first embodiment is the first use function setting, and the use device setting in the first embodiment is the first use device setting. That is, the use function setting corresponding to the source code input to the programming software during the creation is the first use function setting, and the use device setting corresponding to the existing source code is the first use device setting.
[0029] The inference device 30 infers the template source code of the source code sent from the source code input unit 60 based on the combination information between the use function setting and the use device setting sent from the setting input unit 50 and the source code sent from the source code input unit 60. Specifically, the inference device 30 infers the program group number based on the combination information and extracts the template source code corresponding to the program group number. The program group number is the number of the group to which the program corresponding to the source code belongs.
[0030] For example, among the programs created by the user, there are programs for socket communication, programs for RS485 communication, and programs for pulse output. In addition, among the programs for socket communication, there are sending programs, receiving programs, and resending programs. Furthermore, among the programs for socket communication, there are bit data sending, word data sending, and multiple data sending. The inference device 30 infers the program group number with respect to the source code of the lowest level programs such as the bit data sending, word data sending, and multiple data sending.
[0031] The template source code is a template of the source code. The template source code is a source code requested when the use function setting and the use device setting are used. The template source code is, for example, the source code of the center Vj of the cluster described later.
[0032] The inference device 30 uses a trained model for inferring a program group number based on the combination information to infer the program group number corresponding to the combination information, and reads out a template source code corresponding to the program group number. Thus, the inference device 30 uses the trained model to infer the template source code corresponding to the combination information.
[0033] The difference extracting device 40 compares the template source code sent from the inference device 30 with the source code sent from the source code input unit 60, and outputs the difference as the difference source code to the source code output unit 70. The difference source code is a source code that completes the source code of the program that the user is creating. In other words, the difference source code is a source code that is not received by the source code input unit 60 among the source codes requested when the use function setting and the use device setting are used.
[0034] The source code output unit 70 outputs the source code sent from the source code input unit 60 and the difference source code sent from the difference extracting device 40 to the display device 2 such as a liquid crystal monitor. The source code output unit 70 causes the display device 2 to display the source code and the difference source code on the same screen.
[0035] In this way, the programming assistance device 1 uses a trained model created by machine learning to infer the template source code based on the source code, usage function settings, and usage device settings of the program being created. In addition, the programming assistance device 1 extracts the differential source code based on the inferred template source code and displays it on the display device 2. As a result, the programming assistance device 1 prompts the user to use the differential source code to complete the source code of the program being created. By prompting the user with the differential source code, the programming assistance device 1 can shorten the user's source code creation time and prevent the source code from being corrected or omitted when the program is changed.
[0036] The trained model used by the programming support device 1 is created by a learning process performed by a learning device described later. In addition, the programming support device 1 has an inference device 30 that infers the program group number using the trained model. Here, the learning process of the program group number performed by the learning device and the inference process of the program group number performed by the inference device 30 are described.
[0037] <Learning Stage>
[0038] Figure 2 1 is a diagram showing the structure of a learning device according to Embodiment 1. The learning device 10 includes a data acquisition unit 11, a model generation unit 12, and a template source code generation unit 13. The model generation unit 12 is connected to a trained model storage unit 21, and the template source code generation unit 13 is connected to a template source code storage unit 22.
[0039] The data acquisition unit 11 acquires source code, usage function settings, and usage device settings as learning data, and outputs the data to the model generation unit 12 .
[0040] The model generation unit 12 learns the program group number based on the learning data, which is created based on the combination (combination information) of the source code, the usage function setting, and the usage device setting output from the data acquisition unit 11. In other words, the model generation unit 12 learns the program group number corresponding to the source code by classifying the source code into the program group to which the program corresponding to the source code belongs based on the learning data. That is, the model generation unit 12 generates a trained model that infers the program group number based on the source code, the usage function setting, and the usage device setting. The learning data is data in which the source code, the usage function setting, and the usage device setting are associated with each other.
[0041] The model generation unit 12 can use a known algorithm such as supervised learning, unsupervised learning, and reinforcement learning as a learning algorithm. As an example, the case where the model generation unit 12 applies the K-means method (clustering) as unsupervised learning is described. Unsupervised learning refers to a method of learning the characteristics of learning data by providing learning data that does not include results (labels) to a learning device such as the learning device 10.
[0042] The model generation unit 12 learns the program group numbers by so-called unsupervised learning according to a grouping method implemented by, for example, the K-means method. The K-means method is a non-hierarchical clustering algorithm that classifies the number of clusters provided into k using the average value of the clusters.
[0043] Specifically, the K-means method is processed through the following process. First, the model generation unit 12 randomly assigns clusters for each data xi (source code). Next, the model generation unit 12 calculates the center Vj of each cluster based on the assigned data. Next, the model generation unit 12 calculates the distance between each xi and each Vj, and reallocates xi to the cluster with the nearest center Vj. In addition, when the assignment of clusters of all xi does not change during the above processing, or the amount of change is less than a certain threshold set in advance, the model generation unit 12 determines that convergence has occurred and ends the clustering process.
[0044] The model generation unit 12 of the first embodiment learns the program group number by so-called unsupervised learning according to the learning data created based on the combination of the source code, the use function setting, and the use device setting acquired by the data acquisition unit 11 .
[0045] The model generation unit 12 generates a trained model by performing the above-described learning, and outputs the generated trained model to the trained model storage unit 21. Each time the model generation unit 12 generates a trained model, it updates the trained model stored in the trained model storage unit 21 with the latest trained model.
[0046] The template source code generation unit 13 generates a template source code based on a combination of all program group numbers output from the model generation unit 12 and a source code at the center of a cluster classified into each program group number. The template source code generation unit 13 sets, for example, a source code at the center of a cluster classified into a program group number as a template source code. The template source code generation unit 13 generates a template source code for each program group number.
[0047] The template source code generation unit 13 outputs the template source code associated with the program group number to the template source code storage unit 22. Each time the template source code is generated, the template source code generation unit 13 updates the template source code stored in the template source code storage unit 22 with the latest template source code. That is, the template source code generation unit 13 stores the latest template source code in the template source code storage unit 22 for each program group number.
[0048] The trained model storage unit 21 stores the trained model output from the model generation unit 12. The template source code storage unit 22 stores the correspondence between the template source code output from the template source code generation unit 13 and the program group number.
[0049] Then, use Figure 3 The learning process performed by the learning device 10 will be described. Figure 3 This is a flowchart showing the flow of a learning process performed by the learning device according to the first embodiment.
[0050] The data acquisition unit 11 acquires data for learning (step S10). Specifically, the data acquisition unit 11 acquires source code, usage function settings, and usage device settings. For example, the source code, usage function settings, and usage device settings are input to the data acquisition unit 11 from programming software that creates the source code. The source code acquired by the data acquisition unit 11 is, for example, the source code created as a finished product so far.
[0051] In addition, here, the data acquisition unit 11 acquires the source code, the use function setting, and the use device setting at the same time, but it can also be acquired at different timings. That is, as long as the source code, the use function setting, and the use device setting are input to the data acquisition unit 11 in association, the data acquisition unit 11 can also acquire the source code, the use function setting, and the use device setting data at different timings.
[0052] The model generation unit 12 performs a learning process (step S20). Specifically, the model generation unit 12 learns the program group number by so-called unsupervised learning according to the learning data created based on the combination of the source code, the usage function setting, and the usage device setting acquired by the data acquisition unit 11, and generates a trained model. The trained model storage unit 21 stores the trained model generated by the model generation unit 12 (step S30).
[0053] The template source code generation unit 13 generates a template source code based on a combination of all program group numbers output from the model generation unit 12 and the source code at the center of the cluster classified into each program group number. The template source code storage unit 22 stores the template source code output from the template source code generation unit 13. This is the learning stage.
[0054] <Application stage>
[0055] Figure 4 1 is a diagram showing a configuration of an inference device according to Embodiment 1. The inference device 30 includes a data acquisition unit 31 , an inference unit 32 , and a template source code acquisition unit 33 .
[0056] The data acquisition unit 31 acquires source code, use function settings, and use device settings. The source code is input to the data acquisition unit 31 from the source code input unit 60 , and the use function settings and use device settings are input to the data acquisition unit 31 from the settings input unit 50 .
[0057] The inference unit 32 infers the program group number using the trained model stored in the trained model storage unit 21. That is, the inference unit 32 inputs the data (inference data) obtained by the data acquisition unit 31 into the trained model to infer the program group number. Specifically, the inference unit 32 infers which cluster the source code, the use function setting, and the use device setting belong to by inputting the source code, the use function setting, and the use device setting obtained by the data acquisition unit 31 into the trained model. The inference unit 32 outputs the inference result data as the program group number to the template source code acquisition unit 33.
[0058] The template source code acquisition unit 33 acquires the template source code from the template source code storage unit 22 using the program group number estimated by the estimation unit 32, and outputs the template source code to the difference extraction device 40. That is, the template source code acquisition unit 33 reads the template source code associated with the program group number from the template source code storage unit 22.
[0059] In addition, in Implementation 1, the inference unit 32 uses the trained model learned by the model generation unit 12 of the learning device 10 to infer the program group number, but the inference unit 32 can also obtain a trained model created by other learning devices and infer the program group number based on the trained model.
[0060] In this way, the inference device 30 outputs the template source code obtained using the program group number obtained based on the source code, the use function setting, and the use device setting to the difference extraction device 40.
[0061] Then, use Figure 5 The template source code estimation process performed by the estimation device 30 will be described. Figure 5 This is a flowchart showing the flow of an estimation process performed by the estimation device according to the first embodiment.
[0062] The data acquisition unit 31 acquires data for inferring the template source code (step S110). Specifically, the data acquisition unit 31 acquires the source code, the use function setting, and the use device setting. The source code acquired by the data acquisition unit 31 is the source code corresponding to the program being created by the user.
[0063] The inference unit 32 infers the program group number using the trained model stored in the trained model storage unit 21. That is, the inference unit 32 inputs the data acquired by the data acquisition unit 31 into the trained model (step S120), and infers the program group number using the trained model. The inference unit 32 outputs the data of the inference result as the program group number (step S130).
[0064] The template source code acquisition unit 33 acquires the template source code from the template source code storage unit 22 using the program group number estimated by the estimation unit 32, and outputs the template source code to the difference extraction device 40 (step S140). This is the estimation stage.
[0065] Then, use Figure 6 The operation of the programming support device 1 according to the first embodiment will be described. Figure 6 This is a flowchart showing the processing flow of programming support processing performed by the programming support device according to the first embodiment.
[0066] The programming support device 1 obtains data for inferring the template source code (step S210). Specifically, the setting input unit 50 obtains the use function setting and the use device setting, and the source code input unit 60 obtains the source code. The source code obtained by the source code input unit 60 is the source code corresponding to the program being created by the user.
[0067] The setting input unit 50 inputs the acquired use function setting and use device setting to the inference device 30, and the source code input unit 60 inputs the acquired source code to the inference device 30 (step S220). In addition, the source code input unit 60 inputs the acquired source code to the difference extraction unit 40 and the source code output unit 70.
[0068] The inference device 30 infers the program group number by inputting the source code, the use function setting, and the use device setting into the trained model, and obtains the template source code using the program group number. The inference device 30 obtains the template source code by extracting the template source code corresponding to the program group number from the template source code storage unit 22. The inference device 30 outputs the obtained template source code (step S230). Thus, the inference device 30 inputs the template source code into the difference extraction device 40 (step S240).
[0069] The difference extracting device 40 calculates the difference source code by comparing the source code sent from the source code input unit 60 with the template source code sent from the inference device 30. The difference extracting device 40 outputs the calculated difference source code to the source code output unit 70 (step S250).
[0070] The source code output unit 70 outputs the source code sent from the source code input unit 60 and the differential source code sent from the differential extraction unit 40 to the display device 2. The display device 2 displays the differential source code that completes the source code of the program being created by the user (step S260).
[0071] The difference source code displayed on the display device 2 is the source code not input by the user when creating the program. That is, the difference source code displayed on the display device 2 is the algorithm, sequence, etc. not input by the user among all the algorithms and sequences of the specifications required for creating the program.
[0072] In this way, the programming support device 1 can extract the difference between the acquired source code and the template source code, and display a suggestion of the difference source code, which is the source code to complete the source code of the program being created, on the screen of the display device 2 .
[0073] As long as the user inputs the source code halfway when creating or modifying the source code of the program, the display device 2 displays the differential source code used to complete the next source code or the missing part of the modification. Thus, the programming assistance device 1 can shorten the creation time of the source code and prevent the modification of the source code from being omitted when the program is changed.
[0074] In the first embodiment, the learning algorithm used by the model generation unit 12 and the inference unit 32 is described as applying unsupervised learning, but the learning algorithm is not limited to unsupervised learning. Regarding the learning algorithm, in addition to unsupervised learning, reinforcement learning, supervised learning, or semi-supervised learning can also be applied.
[0075] Furthermore, as a learning algorithm used by the learning device 10 , deep learning (Deep Learning) for learning the extraction of feature quantities themselves can be used, and other well-known methods can also be used.
[0076] When the model generation unit 12 implements unsupervised learning in the first embodiment, it is not limited to the non-hierarchical clustering implemented by the above-mentioned K-means method, and other known clustering methods may be applied. For example, the model generation unit 12 may apply hierarchical clustering such as the shortest distance method.
[0077] In the first embodiment, the learning device 10, the inference device 30, the trained model storage unit 21, and the template source code storage unit 22 may be, for example, devices that are independent of the programming support device 1 and are connected to the programming support device 1 via a network. In addition, the learning device 10, the inference device 30, the trained model storage unit 21, and the template source code storage unit 22 may be built into the programming support device 1. Furthermore, the learning device 10, the inference device 30, the trained model storage unit 21, and the template source code storage unit 22 may also exist on a cloud server.
[0078] In addition, the model generation unit 12 may also learn the program group number according to the learning data created for multiple programming software. In addition, the model generation unit 12 may obtain the learning data from multiple programming software used in the same area, and may also learn the program group number using the learning data collected from multiple programming software operating independently in different areas. In addition, it is also possible to add the programming software that collects the learning data as an object midway, or to remove it from the object. Furthermore, the learning device 10 that has learned the program group number for a certain programming software may be applied to programming software different from it, and the program group number may be relearned and updated for the different programming software. In addition, the model generation unit 12 may also obtain learning data from a device other than the programming software, such as a source code storage device that stores source code.
[0079] Here, the hardware configuration of the programming support device 1 will be described. Figure 7 This is a diagram showing a hardware configuration example for realizing the programming support device according to the first embodiment.
[0080] The programming support device 1 can be implemented by a processor 100, a memory 200, an input device 300, and an output device 400. An example of the processor 100 is a CPU (also called a central processing unit, a processing unit, a computing unit, a microprocessor, a microcomputer, a DSP (Digital Signal Processor)) or a system LSI (Large Scale Integration). An example of the memory 200 is a RAM (Random Access Memory) or a ROM (Read Only Memory).
[0081] The programming assistance device 1 is implemented by the processor 100 reading and executing a computer-executable programming assistance program stored in the memory 200 for executing the operations of the programming assistance device 1. The programming assistance program, which is a program for executing the operations of the programming assistance device 1, can also be said to be a process or method for causing a computer to execute the programming assistance device 1.
[0082] The programming assistance program executed in the programming assistance device 1 has a module structure including an inference device 30 and a difference extraction device 40, which are loaded onto a main storage device and are generated on the main storage device.
[0083] The input device 300 receives source code, usage function settings, and usage device settings from a user or an external device and transmits the received code to the memory 200. That is, the input device 300 executes the processing of the setting input unit 50 and the source code input unit 60.
[0084] The memory 200 stores source code, usage function settings, usage device settings, etc. The source code, usage function settings, and usage device settings are sent to the processor 100. In addition, the memory 200 is used as a temporary memory when the processor 100 executes various processes. The output device 400 outputs the difference source code to the display device 2. That is, the output device 400 executes the processing of the source code output unit 70.
[0085] The programming assistance program may be stored in a computer-readable storage medium in the form of an installable or executable file and provided as a computer program product. In addition, the programming assistance program may be provided to the programming assistance device 1 via a network such as the Internet. In addition, the functions of the programming assistance device 1 may be partially implemented by dedicated hardware such as a dedicated circuit and partially implemented by software or firmware.
[0086] In addition, the inference device 30 and the difference extraction device 40 may be implemented by different hardware structures. In this case, the inference device 30 uses an inference program that infers the template source code to infer the template source code. In addition, the difference extraction device 40 uses a difference extraction program that extracts the difference between the source code and the template source code to generate the difference source code. In addition, the learning device 10 also has the same hardware structure as the programming support device 1.
[0087] Thus, in Embodiment 1, the learning device 10 creates a trained model by learning the template source code corresponding to the source code, the usage function setting, and the usage device setting. In addition, the inference device 30 infers the template source code by inputting the source code, the usage function setting, and the usage device setting into the trained model.
[0088] Furthermore, the programming support device 1 displays the difference between the source code input by the user and the template source code as the difference source code on the display device 2. Thus, the user can easily input the source code without omission in a short time. Therefore, the programming support device 1 can enable the user to easily create the desired source code in a short time.
[0089] Implementation Method 2
[0090] Next, use Figure 1 Embodiment 2 is described. In embodiment 2, the source code of the program being changed is input to the source code input unit 60 of the programming support device 1. Then, the difference extraction device 40 of the programming support device 1 extracts the difference between the source code obtained by the source code input unit 60 and the template source code inferred by the inference device 30. Thus, the programming support device 1 can display a suggestion of the difference source code for completing the source code of the program being changed on the screen of the display device 2.
[0091] When changing the source code of a program, it is usually necessary to correct multiple parts, but in this case, the programming assistance device 1 extracts multiple differences between the template source code and the template source code as differential source code. In this case, the programming assistance device 1 can also prevent the correction of the source code from being missed by displaying the differential source code that completes the source code of the program.
[0092] In addition, an existing source code may be input to the source code input unit 60 of the programming support device 1. In this case, the difference extraction device 40 also extracts the difference between the source code obtained by the source code input unit 60 and the template source code inferred by the inference device 30. Then, the source code output unit 70 causes the screen of the display device 2 to display a suggestion of a difference source code that completes the existing source code. The existing source code is the second source code. In addition, the use function setting corresponding to the existing source code is the second use function setting, and the use device setting corresponding to the existing source code is the second use device setting.
[0093] Thus, according to Embodiment 2, programming support device 1 displays the difference between the modified or existing source code and the template source code as differential source code on display device 2. Therefore, programming support device 1 can suggest differential source code to complete the modified or existing source code to the user.
[0094] The structures shown in the above-mentioned embodiments are merely examples, and may be combined with other known technologies, the embodiments may be combined with each other, and part of the structures may be omitted or modified without departing from the gist.
[0095] Description of the label
[0096] 1 programming assistance device, 2 display device, 10 learning device, 11, 31 data acquisition unit, 12 model generation unit, 13 template source code generation unit, 21 trained model storage unit, 22 template source code storage unit, 30 inference device, 32 inference unit, 33 template source code acquisition unit, 40 difference extraction device, 50 setting input unit, 60 source code input unit, 70 source code output unit, 100 processor, 200 memory, 300 input device, 400 output device.
Claims
1. A programming auxiliary device, characterized in that: have: a source code input unit to which a first source code is input, the first source code being a source code input in the middle of creating the programming software; a setting input unit to which is input a first device usage setting, which is information about a device that uses the program corresponding to the first source code, and a first function usage setting, which is information about a function used by the device; an inference device for inferring the template source code corresponding to the combination information using a trained model for inferring a template of the first source code, i.e., a template source code, based on a combination of the first source code, the first usage device setting, and the first usage function setting; a difference extracting means for extracting, as a difference source code, a difference between the first source code input to the source code input unit and the template source code inferred by the inference means; as well as A source code output unit outputs the differential source code.
2. The programming aid according to claim 1, characterized in that The inference device comprises: a data acquisition unit that acquires the combination information; and An inference unit is configured to use the trained model to infer the template source code corresponding to the combination information.
3. The programming aid according to claim 1 or 2, characterized in that: The source code output unit outputs the first source code together with the difference source code.
4. The programming aid according to claim 1 or 2, characterized in that: The inference device uses the trained model to infer the program group number, which is the number of the group to which the program corresponding to the first source code belongs, based on the combination information, and extracts the differential source code corresponding to the program group number, thereby inferring the differential source code.
5. The programming aid according to claim 1 or 2, characterized in that: If the created existing source code, i.e., the second source code, is input into the source code input unit, and the second usage device setting corresponding to the second source code and the second usage function setting corresponding to the second source code are input into the setting input unit, Then, the inference device uses the trained model to infer the template source code corresponding to the combination of the second source code, the second usage device setting, and the second usage function setting.
6. The programming aid according to claim 1 or 2, characterized in that: The first source code is a source code that is in the process of being newly created or modified.
7. A programming assistance method, characterized in that: The following steps are involved: A source code input step in which a programming assistance device that assists programming receives a first source code that is input into the middle of creating the programming software; a setting input step, wherein the programming support device receives information about a device that uses the program corresponding to the first source code, i.e., a first use device setting, and information about a function used by the device, i.e., a first use function setting; an inference step, wherein the programming assistance device uses a trained model for inferring a template of the first source code, i.e., a template source code, based on a combination of the first source code, the first usage device setting, and the first usage function setting, i.e., combination information, to infer the template source code corresponding to the combination information; a difference extraction step, wherein the programming assistance device extracts a difference between the received first source code and the inferred template source code as a difference source code; as well as In a source code outputting step, the programming assistance device outputs the differential source code.
8. A computer-readable storage medium storing a programming auxiliary program, characterized in that: The programming aid causes the computer to perform the following steps: A source code input step of receiving a first source code, the first source code being a source code input in the middle of creating the programming software; a setting input step of receiving a first device usage setting, which is information about a device that uses the program corresponding to the first source code, and a first function usage setting, which is information about a function used by the device; an inference step of inferring the template source code corresponding to the combination information using a trained model for inferring a template of the first source code, i.e., a template source code, based on a combination of the first source code, the first usage device setting, and the first usage function setting; A difference extraction step of extracting a difference between the received first source code and the inferred template source code as a difference source code; as well as The source code output step outputs the differential source code.