System
A generative AI-based system automates software maintenance by analyzing and updating source code, addressing high maintenance costs and manpower issues, and enhancing software performance and scalability.
Patent Information
- Application Number
- JP2024122866
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2026-02-10
AI Technical Summary
Increasing maintenance costs and manpower requirements for software development and operation, particularly in improving performance, fixing vulnerabilities, and ensuring scalability, are becoming unsustainable due to the shortage of IT personnel.
A system utilizing a generative AI model to automate software maintenance by acquiring, analyzing, and updating source code, generating improvement proposals, and conducting automated tests, thereby reducing maintenance costs and improving quality.
The system efficiently automates software maintenance, reducing manual labor, improving performance, fixing vulnerabilities, and enhancing scalability while minimizing the risk of introducing new errors.
Smart Images

Figure 2026021184000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]
[0004] Increasing maintenance costs have become a major issue in software development and operation. Maintenance work aimed at improving performance, fixing vulnerabilities, and ensuring scalability, in particular, requires significant costs and manpower. Furthermore, with the growing shortage of IT personnel, it is becoming increasingly difficult to continue providing software efficiently. Given this background, there is a demand for technology that automates software maintenance, reducing costs and improving quality at the same time. [Means for solving the problem]
[0005] The present invention provides a system that includes a means for acquiring a software repository, a means for analyzing source code in the acquired software repository, a means for generating improvement proposals for the source code using a generative AI model, a means for updating the source code based on the generated improvement proposals, a means for testing the updated source code, and a means for sharing the improvement results and update contents with users. This system automates maintenance work for improving software performance, fixing vulnerabilities, and improving scalability, thereby reducing maintenance costs and improving quality.
[0006] A "software repository" is a database for storing and managing source code and related assets (documentation, configuration files, test scripts, etc.).
[0007] A "means for obtaining" is a method or system for accessing a particular software repository and copying its contents to a local environment or another location.
[0008] "Means for analysis" refers to a method or system that reads source code and evaluates its structure, quality, performance, vulnerabilities, etc.
[0009] A "generative AI model" is a model that uses artificial intelligence to analyze source code and automatically generate improvement suggestions.
[0010] "Means for generating improvement proposals" means a method or system that utilizes a generative AI model to create specific proposed changes to improve performance, fix vulnerabilities, or increase scalability without changing the behavior of the source code.
[0011] A "means for updating source code" refers to a method or system for changing or modifying the actual source code based on the generated improvement suggestions.
[0012] "Testing means" refers to a method or system for verifying that the updated source code works as intended and does not affect existing functionality.
[0013] "Means of sharing" refers to a method or system for notifying users of improvement results and updates, and for allowing them to operate or check them. [Brief explanation of the drawings]
[0014] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13]FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION
[0015] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.
[0016] First, the terms used in the following description will be explained.
[0017] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).
[0018] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.
[0019] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.
[0020] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.
[0021] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."
[0022] [First embodiment]
[0023] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0024] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.
[0025] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0026] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.
[0027] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.
[0028] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.
[0029] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.
[0030] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0031] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0032] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0033] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0034] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0035] The outline of the present invention is a system that uses generative AI to automate software maintenance, improving performance, fixing vulnerabilities, and improving scalability. Specific embodiments of the system are described below.
[0036] This system operates in the following steps: First, the server receives the URL of the software repository specified by the user. Based on this, the server clones the contents of the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository.
[0037] The server then reads the acquired source code and inputs it into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals. These proposals include specific changes to improve performance, fix vulnerabilities, and increase scalability.
[0038] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and corrects the source code. This update process is performed automatically, significantly reducing the user's workload.
[0039] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. If the automated tests are successful, the server notifies the user of the results and the changes.
[0040] Users receive a notification and review the proposed improvements. If necessary, they can approve the proposal or make further adjustments. This process effectively improves software performance, fixes vulnerabilities, and enhances scalability.
[0041] As a concrete example, consider a given repository for a web application. The server clones the repository and feeds the application's source code into a generative AI model. The model optimizes unnecessary loops, updates vulnerable libraries, and suggests interface abstractions. Based on these suggestions, the server updates the source code and runs automated tests. Successful tests are reported to the user, who can review and approve the suggestions. This process improves the performance, security, and scalability of the web application.
[0042] The processing flow will be explained below.
[0043] Step 1:
[0044] The server receives as input the URL of a software repository specified by the user, which includes the access privileges to the repository.
[0045] Step 2:
[0046] The server clones the software repository to a local directory using the specified repository URL. This operation downloads all source code and related files in the repository to your local environment.
[0047] Step 3:
[0048] The server reads the main source code file in the cloned repository, for example, opening the main executable file, main.py, and fetching its contents.
[0049] Step 4:
[0050] The server inputs the read source code into a generative AI model, which can handle a large number of tokens and is capable of analyzing large amounts of code.
[0051] Step 5:
[0052] The generative AI model analyzes input source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability, such as eliminating unnecessary loops, updating outdated libraries, and refactoring code.
[0053] Step 6:
[0054] The server automatically updates the source code based on the generated improvement suggestions, applying the proposed changes to the source code and replacing the original files with the new content.
[0055] Step 7:
[0056] The server runs automated tests on the updated source code, using test scripts to verify that all functions are working properly and that there are no side effects from performance improvements or vulnerability fixes.
[0057] Step 8:
[0058] The server will notify the user of the test results and specific improvements, including details of the improvements, changes, and test results, in a format that the user can review.
[0059] Step 9:
[0060] The user receives a notification and reviews the proposed improvements, and can accept the suggestions or make further adjustments as needed.
[0061] This series of processes automatically and efficiently improves software performance, fixes vulnerabilities, and improves scalability.
[0062] Example 1
[0063] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0064] Traditional software maintenance work is often performed manually by developers, which is time-consuming and labor-intensive. Furthermore, the complexity of the work increases, especially in large-scale software projects, as bug fixes, performance improvements, vulnerability fixes, and scalability improvements are required. Furthermore, manual changes carry a high risk of introducing new errors and vulnerabilities, potentially reducing overall reliability. There is a need for a system that can solve these issues and perform software maintenance work efficiently and reliably.
[0065] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0066] In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement proposals for the source code using a generative AI model, means for updating the source code based on the generated improvement proposals, means for testing the updated source code, means for sharing the improvement results and update contents with a user, means for acquiring a URL of the software repository based on information input by a user, means for outputting a prompt statement to the generative AI model and receiving the result, and means for proposing performance improvements, vulnerability fixes, and scalability improvements for the source code. This enables software maintenance work to be performed efficiently and automatically, reducing the burden on developers and improving software quality.
[0067] A "software repository" is a database for managing and storing software source code and related resources.
[0068] A "means of acquisition" is a means of downloading the contents of a specific repository based on its URL and saving it in a local environment.
[0069] "Means of analysis" refers to means of inspecting the software source code and analyzing its structure, quality, and potential problems.
[0070] A "generative AI model" is a model that uses artificial intelligence technology to generate improvement suggestions from the analysis results of input source code.
[0071] "Means for generating improvement proposals" refers to the process of utilizing a generative AI model to generate specific proposals for improving source code performance, fixing vulnerabilities, and increasing scalability.
[0072] A "means for updating the source code" is a means for automatically applying modifications to the source code based on improvement suggestions provided by the generative AI model.
[0073] "Testing means" is the process of running automated tests to verify the accuracy and safety of the updated source code.
[0074] "Means for sharing improvement results and updated content with users" refers to means for notifying users of the updated state of the source code and test results and obtaining their confirmation.
[0075] A "prompt" is input text used to give instructions or ask questions to a generative AI model.
[0076] The present invention provides a system that uses a generative AI model to automate software maintenance, improving performance, fixing vulnerabilities, and enhancing scalability. This system includes a series of processes: acquiring and analyzing a software repository, generating improvement proposals using a generative AI model, updating source code based on the proposals, and conducting testing. A specific embodiment of the system is described below.
[0077] First, the server receives the URL of the software repository specified by the user. Based on this, the server clones the contents of the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository. For hardware, a general server (e.g., an EC2 instance on AWS) is used. For software, Git is used to clone the repository.
[0078] Next, the server reads the acquired source code and inputs it into the generative AI model. At this time, the acquired source code is converted into text format and formatted to fit the input format of the generative AI model. The generative AI model used is, for example, OpenAI's GPT-4. The following prompt sentence is input to this model:
[0079] "Generate improvement suggestions to improve the performance of this source code."
[0080] "Please suggest specific changes to fix the vulnerability."
[0081] The generative AI model analyzes the structure, quality, performance, and vulnerabilities of the source code and generates necessary improvement suggestions. These improvement suggestions include specific changes to improve performance, fix vulnerabilities, and improve scalability, such as optimizing unnecessary loops, updating vulnerable libraries, and abstracting interfaces.
[0082] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and fixes the source code. This update process is automated and is executed using Python scripts, etc.
[0083] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. Testing tools such as Jenkins or pytest are used to run the automated tests.
[0084] If the test is successful, the server notifies the user of the results and changes. Notifications are sent via Slack API, email servers, or other methods. The user receives the notification and checks the proposed improvements. If necessary, the user can approve the suggestions or make further adjustments. This series of processes effectively improves software performance, fixes vulnerabilities, and enhances scalability.
[0085] As a concrete example, consider a given repository for a web application. The server clones the repository and feeds the application's source code into a generative AI model. The model optimizes unnecessary loops, updates vulnerable libraries, and suggests interface abstractions. Based on these suggestions, the server updates the source code and runs automated tests. Successful tests are reported to the user, who can review and approve the suggestions. This process improves the performance, security, and scalability of the web application.
[0086] This invention realizes automation of software maintenance work, and can improve the quality of software while reducing the burden on developers.
[0087] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0088] Step 1:
[0089] The server receives the software repository URL from the user. As input, it receives the repository URL entered by the user in a web form. The specific operation is that the server retrieves the URL data submitted through the user interface. As output, it passes the retrieved repository URL to the next step.
[0090] Step 2:
[0091] The server clones the software repository to a local directory using the repository URL. As input, it uses the repository URL obtained in step 1. Specifically, the server runs a Git command (e.g., git clone <url>) to create a copy of the repository in your local directory. The output is the source code and related files stored in your local directory.
[0092] Step 3:
[0093] The server reads the cloned source code and formats it into the input format for the generative AI model. The cloned source code file is used as input. Specifically, it converts the file into text format and formats it into a format suitable for the generative AI model (e.g., JSON format). The output is a data format for input into the generative AI model.
[0094] Step 4:
[0095] The server inputs the prompt sentence into the generative AI model and performs the analysis. As input, it uses the source code formatted in step 3 and the prompt sentence. Specifically, it inputs the following prompt sentence into the generative AI model:
[0096] "Generate improvement suggestions to improve the performance of this source code."
[0097] "Please suggest specific changes to fix the vulnerability."
[0098] As an output, the generative AI model provides improvement suggestions.
[0099] Step 5:
[0100] The server updates the source code based on the suggestions of the generative AI model. The input is the original source code and the improvement suggestions obtained from the generative AI model. The specific operation is to automatically change and correct the source code according to the suggestions. This operation is performed using a Python script, etc. The output is the updated source code.
[0101] Step 6:
[0102] The server runs automated tests against the updated source code. The updated source code is used as input. Specifically, it runs various tests (unit tests, integration tests, etc.) using testing tools such as Jenkins or pytest. The output is the test results (success / failure status and detailed logs).
[0103] Step 7:
[0104] The server notifies the user of the test results and changes. As input, it uses the test results and changes data. The specific operation is to use the Slack API or a mail server to send a message notifying the user of the results. As output, the user receives a notification and checks the results.
[0105] Step 8:
[0106] The user receives a notification and reviews the proposal. The input is the notification sent by the server. The specific behavior is that the user receives the notification, clicks the link, reviews the changes in a web browser, and approves or adjusts them as needed. The output is feedback of the user's review and approval.
[0107] In this way, through a series of operations between the server, the generative AI model, and the user, software maintenance tasks are efficiently automated and software quality is improved.
[0108] (Application example 1)
[0109] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0110] In modern factories, software maintenance for machine control systems is a major issue. Traditional manual maintenance work requires time and effort, and also carries the risk of human error. Furthermore, updating and improving machine control software requires knowledge of the latest technologies and security, and is often dependent on specific engineers. To solve these problems, there is a need for a system that automates software maintenance and efficiently improves performance, fixes vulnerabilities, and increases scalability.
[0111] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0112] In this invention, the server includes a means for acquiring a software repository, a means for analyzing source code in the acquired software repository, a means for generating improvement proposals for the source code using a generative AI model, a means for updating the source code based on the generated improvement proposals, a means for testing the updated source code, and a means for notifying the improvement results and update contents to a shared display device. This automates software maintenance for machine control systems in factories, enabling efficient performance improvements, vulnerability repairs, and scalability improvements. Furthermore, by using smart devices, workers can easily grasp the status of maintenance work and respond quickly.
[0113] "Software Repository" means a location and system for storing and managing software source code, associated documentation, and other files related to software development.
[0114] "Source code" is a human-readable text file that describes how software or a program works.
[0115] "Generative AI models" are artificial intelligence (AI) algorithms and systems that learn from large amounts of data and generate solutions to specific tasks or problems.
[0116] "Improvement suggestions" are specific proposed changes for improving performance, fixing vulnerabilities, and increasing scalability that the generative AI model provides based on an analysis of the source code.
[0117] A "shared display device" is a device that visually displays improvement results and updates, allowing users to review and approve them. Examples include smart glasses.
[0118] A "smart device" is a portable electronic device with Internet connectivity and the ability to run various applications, allowing users to obtain and operate information. Examples include smart glasses and smartphones.
[0119] A "machine control system" is hardware and software used to manage and control the operation of various machines and equipment in factories and industrial sites.
[0120] "Automated testing" is the process of automatically verifying whether a program or software function works correctly based on predefined test cases.
[0121] This invention relates to a system that automates software maintenance for machine control systems in factories, improving performance, fixing vulnerabilities, and improving scalability. The system for realizing this application example is described in detail below.
[0122] System Program
[0123] To automate software maintenance for machine control systems in factories, servers, smart devices (e.g., smart glasses and smartphones), generative AI models, and automated testing frameworks are used. The system works as follows:
[0124] Hardware and Software Configuration
[0125] Server: Clone software repositories, analyze source code, generate improvement suggestions, update source code, run automated tests, and notify results.
[0126] Smart devices: Act as display devices that allow users on the factory floor to easily check results and take any necessary approvals or actions. Examples include Microsoft HoloLens and smartphones.
[0127] Generative AI models: Learn from large amounts of data and generate specific improvement suggestions for improving source code performance, fixing vulnerabilities, and increasing scalability. AI models such as OpenAI GPT-3 are used.
[0128] Automated testing framework: Automatically runs functional tests against updated source code, using Pytest or similar.
[0129] Natural language explanation of the process
[0130] 1. Clone the repository
[0131] The server receives the URL of the software repository specified by the user, clones the repository contents to a local directory, and uses Git to retrieve the source code and related files from the remote repository.
[0132] 2. Source code analysis
[0133] The server reads the acquired source code and inputs its contents into a generative AI model. The generative AI model analyzes the structure, quality, performance, and vulnerabilities of the source code and generates necessary improvement proposals. Specifically, models such as OpenAI GPT-3 are used. An example of a prompt is, "Analyze the source code of the following robot arm control software and generate specific improvement proposals for improving performance, fixing vulnerabilities, and increasing scalability. Please include specific code changes in your proposals."
[0134] 3. Application of improvement proposals
[0135] The server updates the source code based on the generated improvement suggestions, and automatically applies the specific changes suggested to fix the source code.
[0136] 4. Running automated tests
[0137] Automated tests are run against the updated source code, and functionality is verified using a test framework such as Pytest to generate test results.
[0138] 5. Notification of Results
[0139] The server notifies the smart device of the automated test results and updates, and the user can check the results through smart glasses or a smartphone and take any necessary approvals or actions.
[0140] Specific examples
[0141] When a factory needs to update the control software for a robot arm, the following steps are taken:
[0142] 1. A factory technician puts on smart glasses and provides the software repository URL to the server.
[0143] 2. The server clones the repository and runs the generative AI model to analyze the source code.
[0144] 3. The generative AI model generates improvement suggestions using the prompt, "Analyze the source code of the following robot arm control software and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability. Please also include specific code changes in your suggestions."
[0145] 4. The server applies the proposed changes to the source code and runs the automated tests.
[0146] 5. A technician reviews the test results through smart glasses and approves or takes additional action as needed.
[0147] The above process efficiently automates software maintenance for machine control systems within a factory.
[0148] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0149] Step 1:
[0150] The server receives a software repository URL from the user. The input is the repository URL, and based on this URL, the server uses Git to clone the repository into a local directory. The output is the source code and associated files stored in the local directory.
[0151] Step 2:
[0152] The server reads the cloned source code and inputs the contents into the generative AI model. The input is the source code stored in a local directory, and the output is a data format containing a prompt for the generative AI model to analyze. In a specific example, the server sends the prompt to the generative AI model: "Analyze the source code of the following robot arm control software and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability. Please include specific code changes in your suggestions."
[0153] Step 3:
[0154] The generative AI model analyzes the source code based on the prompt and source code and generates improvement suggestions. The input is the prompt and source code, and the output is data containing specific improvement suggestions. The generative AI model performs a detailed analysis of the performance and security of the source code and indicates the necessary changes.
[0155] Step 4:
[0156] The server updates the source code based on the improvement suggestions obtained from the generative AI model. The input is the improvement suggestions and the original source code, and the output is the updated source code. The server automatically applies the specific suggested changes and updates each part of the code.
[0157] Step 5:
[0158] The server runs automated tests against the updated source code. The input is the updated source code and the output is the test results. The server uses a test framework such as Pytest to run test cases to verify that the code works correctly.
[0159] Step 6:
[0160] The server notifies the user of the automated test results and updates. The input is the test results and update data, and the output is a notification sent to the smart device. The user can check the results through smart glasses or a smartphone and take any necessary approvals or actions.
[0161] Step 7:
[0162] Users receive notifications on their smart devices and check the improvement results and update details. The input is the notification sent from the server, and the output is the user's confirmation or approval action. The user evaluates the software status based on the notified information and decides on additional actions if necessary.
[0163] The above steps efficiently automate software maintenance for machine control systems within factories, improving performance, fixing vulnerabilities, and improving scalability.
[0164] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.
[0165] The outline of the present invention is a system that uses generative AI and an emotion engine to automate software maintenance, improve performance, fix vulnerabilities, and improve scalability, while also recognizing user emotions and taking appropriate action. Specific embodiments of this system are described below.
[0166] In this system, the server first receives the URL of a software repository specified by the user and clones the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository.
[0167] The server then inputs the acquired source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals. These improvement proposals include specific changes to improve performance, fix vulnerabilities, and increase scalability.
[0168] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and fixes the source code. The update process is performed automatically, significantly reducing the user's workload.
[0169] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. If the automated tests are successful, the server notifies the user of the results and the changes.
[0170] Furthermore, this system incorporates an emotion engine that recognizes the user's emotions. The server uses the emotion engine to recognize the content of improvement suggestions and the user's emotional state when notifying them, and adjusts the response accordingly. For example, if the user is feeling stressed, the system will gently explain the notification content or provide additional support information.
[0171] The user receives a notification and reviews the proposed improvements. If necessary, the user can approve the proposal or make further adjustments. The emotion engine takes the user's emotions into consideration, resulting in smoother communication and a more effective improvement process.
[0172] As a concrete example, consider a given web application repository. The server clones the repository and inputs the application's source code into a generative AI model. The model then suggests eliminating unnecessary loops, updating vulnerable libraries, and abstracting interfaces. Based on these suggestions, the server updates the source code and runs automated tests. If the tests are successful, the server notifies the user along with the results of the emotion engine's analysis. For example, if the user is concerned, a detailed explanation and links to additional support are provided.
[0173] This process improves software performance, security, and scalability, and enables it to respond with consideration for user emotions.
[0174] The processing flow will be explained below.
[0175] Step 1:
[0176] The server receives as input the URL of a software repository specified by the user, which includes the access permissions to the repository, for example, a GitHub or GitLab repository URL.
[0177] Step 2:
[0178] The server clones the software repository to a local directory using the specified repository URL. This operation downloads all source code and related files in the repository to your local environment.
[0179] Step 3:
[0180] The server reads the main source code file (e.g., main.py) in the cloned repository, which involves opening the file and reading the source code.
[0181] Step 4:
[0182] The server inputs the acquired source code into a generative AI model, which analyzes the source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability.
[0183] Step 5:
[0184] The generative AI model analyzes the input source code and automatically generates improvement suggestions, including specific code changes (e.g., optimizing unnecessary loops, updating outdated libraries, refactoring interfaces, etc.).
[0185] Step 6:
[0186] The server automatically updates the source code based on the generated improvement suggestions, applies the proposed changes to the source code, and replaces the original files with the new content.
[0187] Step 7:
[0188] The server runs automated tests on the updated source code, using automated test scripts to ensure all functionality is working properly and to check for side effects from performance improvements and vulnerability fixes.
[0189] Step 8:
[0190] The server analyzes the user's current emotional state using an emotion engine that recognizes the user's emotions and infers the emotional state based on the user's inputs and behavioral patterns.
[0191] Step 9:
[0192] The server adjusts the content and presentation of the improvement suggestions based on the user's emotions recognized by the emotion engine. For example, if the emotion engine determines that the user is feeling stressed, it will gently explain the notification content or provide additional support information.
[0193] Step 10:
[0194] The server notifies the user of the test results and specific improvements, including details of the improvements, changes, test results, and additional supporting information based on the emotion engine's analysis.
[0195] Step 11:
[0196] Users are notified and can review the proposed improvements. They can approve or make further adjustments as needed. Additionally, users can use the additional supporting information provided to better understand and accept the changes.
[0197] This series of processes improves the performance, security, and scalability of the software, and also realizes a response that takes into consideration the feelings of users. Providing appropriate and friendly support to users increases the acceptance of improvement suggestions.
[0198] Example 2
[0199] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0200] Conventional software maintenance systems make it difficult to efficiently improve performance, fix vulnerabilities, and improve scalability, placing a heavy burden on users. Furthermore, test results and improvement notifications for software changes are not properly communicated to users, which can cause anxiety and stress. This has led to challenges in improving the efficiency of software maintenance and the user experience.
[0201] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement suggestions for the source code using a generative AI model, means for updating the source code based on the generated improvement suggestions, means for testing the updated source code, means for sharing the improvement results and update details with the user, and means for recognizing the user's emotions and adjusting notification content based on the emotions. This effectively realizes automation of software maintenance, performance improvement, vulnerability correction, and improved scalability, and enables an improved user experience through notifications that take the user's emotions into consideration.
[0202] The "means for obtaining a software repository" is a function by which a server downloads a software repository from a specific URL on the Internet to a local directory.
[0203] "Means for analyzing source code" refers to a function for analyzing acquired source code and evaluating its internal structure, quality, performance, and vulnerabilities.
[0204] "Means for generating source code improvement proposals using a generative AI model" refers to a function that uses a generative AI model to automatically create specific proposed changes to improve the quality and performance of source code.
[0205] "Means for updating source code based on generated improvement suggestions" refers to a function that automatically applies the improvements suggested by the generative AI model to the source code, correcting and updating the code.
[0206] "Means for testing the updated source code" refers to the ability to run automated tests to confirm that the updated source code functions correctly.
[0207] "Means for sharing improvement results and updated content with users" refers to a function for notifying and reporting the improvement results and updated content of source code to users.
[0208] "Means for recognizing the user's emotions and adjusting the notification content based on those emotions" is a function that analyzes the user's emotional state and adjusts the notification content to be more appropriate and easy to understand if the user is feeling stressed or anxious.
[0209] The present invention is a system that automates the process from acquiring software repositories to improving source code, testing, and notifying users, and further adjusts the notification content according to the user's emotional state. This system is implemented as follows.
[0210] First, the server receives the URL of the software repository specified by the user. The user enters the URL into the terminal interface and sends the information to the server. An example of a prompt at this time is "Please enter the URL of this software repository. The system will automatically improve performance, fix vulnerabilities, and improve scalability."
[0211] Next, the server uses the Git command git clone <repository URL> to clone the specified repository to a local directory, obtaining the source code and related files in the repository.
[0212] The server then inputs the acquired source code into a generative AI model. The generative AI model is built using machine learning libraries such as Python and TensorFlow to analyze the source code's structure, quality, performance, vulnerabilities, etc. Based on this analysis, specific improvement proposals are generated for improving performance, fixing vulnerabilities, and increasing scalability.
[0213] The server then automatically updates the source code based on the generated improvement suggestions, such as eliminating unnecessary loops, updating vulnerable libraries, abstracting interfaces, etc. These changes are implemented automatically by scripts, significantly reducing the user's effort.
[0214] After the source code is updated, the server runs automated tests using pre-configured unit and integration tests to ensure the updated source code functions correctly, for example, using a testing framework such as pytest.
[0215] If the test is successful, the server notifies the user of the results and changes. Notifications are sent via email or messages through the device interface. The emotion engine then analyzes the user's emotional state when the notification is sent. For example, if the user is feeling stressed, the server will gently explain the notification and provide additional support information.
[0216] As a concrete example, let's consider a web application repository. The server first clones the repository and inputs the source code into a generative AI model. The generative AI model suggests ways to eliminate unnecessary loops, update vulnerable libraries, and abstract interfaces. The server updates the source code based on these suggestions and runs automated tests. If the tests are successful, a notification containing a detailed explanation and links to additional support is sent to the user based on the analysis results of the emotion engine.
[0217] In this way, this system automates source code updates and testing, and provides notifications that take user emotions into consideration, thereby improving the efficiency of software maintenance and the user experience.
[0218] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0219] Step 1:
[0220] The user inputs the URL of a software repository into the terminal interface. Specifically, for example, an input form is presented with a prompt such as, "Please enter the URL of this software repository. The system will automatically improve performance, fix vulnerabilities, and improve scalability." The repository URL specified by the user is obtained as input. This input URL is then sent to the server.
[0221] Step 2:
[0222] Based on the URL received from the user, the server uses the Git command to clone the specified software repository to a local directory. Specifically, it executes the git clone <repository URL> command to obtain the source code and related files in the repository. The repository URL is used as input, and the source code and related files cloned into the local directory are obtained as output. This source code and files will be used in subsequent processing.
[0223] Step 3:
[0224] The server inputs the cloned source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc. The source code is used as input for this analysis process, and improvement suggestions are obtained from the generative AI model as output. For example, suggestions may include eliminating unnecessary loops or updating vulnerable libraries.
[0225] Step 4:
[0226] The server automatically updates the source code based on the generated improvement suggestions. Specifically, it identifies the proposed updates and modifies the source code appropriately. This process uses the improvement suggestions from the generative AI model as input and obtains updated source code as output. For example, it runs a command or script to replace a specific library with the latest version.
[0227] Step 5:
[0228] The server runs automated tests on the updated source code. Test scripts run pre-configured unit and integration tests to ensure the new code works correctly. The updated source code is used as input and the test results are given as output. Tests are run using tools such as pytest, for example.
[0229] Step 6:
[0230] The server notifies the user of the test results and changes. The user is notified via email or message through the device interface. The server also uses an emotion engine to analyze the user's emotional state. The test results and changes are used as input, and the output is an adjusted notification based on the analysis results. For example, if the user is feeling anxious, a notification with a more detailed explanation or additional support information is provided.
[0231] Step 7:
[0232] The user receives a notification from the server and checks the proposed improvements. The notification from the server is used as input, and the output is the user's approval or a request for further adjustments. The user can check the notification and take appropriate action, such as clicking the approval button. This approval operation ensures that each step in the system proceeds smoothly.
[0233] (Application example 2)
[0234] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0235] With conventional software maintenance methods, tasks such as performance improvement, vulnerability fixes, and scalability improvements are complicated and time-consuming, placing a heavy burden on users. Furthermore, the approach often ignores users' feelings, increasing stress and anxiety associated with maintenance work. In particular, factory robot control software requires real-time updates and maintenance, and rapid and accurate responses are required, but current methods are inadequate.
[0236] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0237] In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement proposals for the source code using a generative AI model, means for updating the source code based on the generated improvement proposals, means for testing the updated source code, means for sharing the improvement results and update details with a user, means for recognizing user emotions using an emotion analysis engine, and means for adjusting notification content based on the user's emotional state. This not only automates software maintenance work, improves performance, fixes vulnerabilities, and improves scalability quickly and efficiently, but also enables responses that take user emotions into consideration.
[0238] A "software repository" is a digital storage for storing and managing software source code and related files.
[0239] "Source code" is the human-readable form of program code that describes how the program works.
[0240] A "generative AI model" is an algorithm that uses deep learning or machine learning to generate new data and suggestions for a specific task.
[0241] "Improvement proposals" means analyzing the quality, performance, vulnerabilities, etc. of the source code and proposing specific changes and correction methods.
[0242] An "emotion analysis engine" is a software component that analyzes a user's emotions and recognizes their state.
[0243] The "means for adjusting notification content based on the emotional state of the user" refers to a means having the function of adjusting the format and content of notifications and information provided to the user based on the user's emotions recognized by the emotion analysis engine.
[0244] "Means for testing updated source code" means the ability to run automated tests to verify that changes to the source code function correctly.
[0245] The system for implementing the present invention utilizes the following hardware and software to perform maintenance on the control software of a factory robot.
[0246] System Configuration
[0247] Hardware
[0248] 1. Server:
[0249] A server in a data center with a powerful processor and sufficient memory.
[0250] SSD storage is used, allowing for high-speed data access.
[0251] 2. Smartphones / Head-mounted displays / Robotic devices:
[0252] Devices used by factory operators.
[0253] It has a display to show necessary notifications and instructions.
[0254] software
[0255] 1. Flask (Web framework):
[0256] It runs on the server side and processes requests from client terminals.
[0257] 2. GitPython:
[0258] A library for cloning repositories.
[0259] 3. TensorFlow / Keras (implementation of generative AI models):
[0260] Analyzes source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability.
[0261] 4. Emotion-Analyzer (Emotion Analysis Engine):
[0262] Analyze the user's emotional state and generate optimal notification content.
[0263] 5. PyTest (Automated Testing):
[0264] An automated testing tool that checks the operation of updated source code.
[0265] Processing Details
[0266] 1. Clone the software repository
[0267] The server receives the URL of a software repository specified by the user and clones the repository into a local directory, thereby obtaining the source code and related files contained in the specified repository.
[0268] 2. Analysis using generative AI models
[0269] The server inputs the acquired source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals, including specific changes.
[0270] 3. Automatic source code updates
[0271] The server automatically updates the source code based on the generated improvement suggestions by applying the proposed changes to the source code.
[0272] 4. Automated Testing
[0273] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality.
[0274] 5. Sentiment Analysis and Notifications
[0275] The server uses an Emotion-Analyzer to recognize the user's emotional state and adjusts the notification content based on the user's emotional state. For example, if the user is feeling stressed, the notification content will be explained in a gentle manner and additional support information will be provided.
[0276] Specific examples
[0277] When a factory operator enters the repository URL of a factory robot's control software into the system, the server clones the repository and inputs the obtained source code into a generative AI model. The generative AI model then suggests eliminating unnecessary loops, updating vulnerable libraries, and abstracting interfaces. Based on these suggestions, the server updates the source code and runs automated tests. If the test is successful, the user is notified of the results. If the user expresses concerns, detailed explanations and links to additional support are also provided.
[0278] Prompt Sentence Examples
[0279] "The RoboGuard application automatically clones the factory robot's software repository and uses generative AI to improve code performance and fix vulnerabilities. The framework for detecting user sentiment and providing appropriate responses is as follows..."
[0280] This system will make software maintenance work more efficient, improve performance and security, and reduce user stress.
[0281] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0282] Step 1:
[0283] The server receives the URL of a software repository specified by the user. The user enters the repository URL of the factory robot control software into the system, and that information is sent to the server. The input is the repository URL, and the output is the process of retrieving that URL.
[0284] Step 2:
[0285] The server uses the GitPython library to clone the repository to a local directory based on the URL obtained, and then downloads the source code and related files in the repository. The input is the repository URL, and the output is the source code cloned to the local directory.
[0286] Step 3:
[0287] The server inputs the entire cloned source code into a generative AI model. The generative AI model uses TensorFlow / Keras to analyze the source code and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability. The input is the source code, and the output is the improvement suggestions.
[0288] Step 4:
[0289] The server automatically updates the source code based on the improvement suggestions generated by the generative AI model. It applies specific changes to the source code and creates a new version. The input is the improvement suggestions, and the output is the updated source code.
[0290] Step 5:
[0291] The server runs automated tests on the updated source code using PyTest to verify that the proposed improvements work correctly and do not adversely affect existing functionality. The input is the updated source code, and the output is the success or failure of the tests.
[0292] Step 6:
[0293] Before notifying the user of the automated test results, the server analyzes the user's emotions using Emotion-Analyzer. It recognizes the user's emotional state and adjusts the notification content based on the emotion. The input is the user's emotional data, and the output is the adjusted notification content.
[0294] Step 7:
[0295] The server then sends the notification content, adjusted through emotion analysis, to the user's device, such as a smartphone or head-mounted display. The notification includes the improvements and their explanations, as well as additional support information if necessary. The input is the adjusted notification content, and the output is the notification displayed on the device.
[0296] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0297] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0298] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.
[0299] [Second embodiment]
[0300] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0301] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.
[0302] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0303] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.
[0304] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0305] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0306] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0307] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0308] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0309] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0310] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0311] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."
[0312] The outline of the present invention is a system that uses generative AI to automate software maintenance, improving performance, fixing vulnerabilities, and improving scalability. Specific embodiments of the system are described below.
[0313] This system operates in the following steps: First, the server receives the URL of the software repository specified by the user. Based on this, the server clones the contents of the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository.
[0314] The server then reads the acquired source code and inputs it into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals. These proposals include specific changes to improve performance, fix vulnerabilities, and increase scalability.
[0315] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and corrects the source code. This update process is performed automatically, significantly reducing the user's workload.
[0316] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. If the automated tests are successful, the server notifies the user of the results and the changes.
[0317] Users receive a notification and review the proposed improvements. If necessary, they can approve the proposal or make further adjustments. This process effectively improves software performance, fixes vulnerabilities, and enhances scalability.
[0318] As a concrete example, consider a given repository for a web application. The server clones the repository and feeds the application's source code into a generative AI model. The model optimizes unnecessary loops, updates vulnerable libraries, and suggests interface abstractions. Based on these suggestions, the server updates the source code and runs automated tests. Successful tests are reported to the user, who can review and approve the suggestions. This process improves the performance, security, and scalability of the web application.
[0319] The processing flow will be explained below.
[0320] Step 1:
[0321] The server receives as input the URL of a software repository specified by the user, which includes the access privileges to the repository.
[0322] Step 2:
[0323] The server clones the software repository to a local directory using the specified repository URL. This operation downloads all source code and related files in the repository to your local environment.
[0324] Step 3:
[0325] The server reads the main source code file in the cloned repository, for example, opening the main executable file, main.py, and fetching its contents.
[0326] Step 4:
[0327] The server inputs the read source code into a generative AI model, which can handle a large number of tokens and is capable of analyzing large amounts of code.
[0328] Step 5:
[0329] The generative AI model analyzes input source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability, such as eliminating unnecessary loops, updating outdated libraries, and refactoring code.
[0330] Step 6:
[0331] The server automatically updates the source code based on the generated improvement suggestions, applying the proposed changes to the source code and replacing the original files with the new content.
[0332] Step 7:
[0333] The server runs automated tests on the updated source code, using test scripts to verify that all functions are working properly and that there are no side effects from performance improvements or vulnerability fixes.
[0334] Step 8:
[0335] The server will notify the user of the test results and specific improvements, including details of the improvements, changes, and test results, in a format that the user can review.
[0336] Step 9:
[0337] The user receives a notification and reviews the proposed improvements, and can accept the suggestions or make further adjustments as needed.
[0338] This series of processes automatically and efficiently improves software performance, fixes vulnerabilities, and improves scalability.
[0339] Example 1
[0340] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0341] Traditional software maintenance work is often performed manually by developers, which is time-consuming and labor-intensive. Furthermore, the complexity of the work increases, especially in large-scale software projects, as bug fixes, performance improvements, vulnerability fixes, and scalability improvements are required. Furthermore, manual changes carry a high risk of introducing new errors and vulnerabilities, potentially reducing overall reliability. There is a need for a system that can solve these issues and perform software maintenance work efficiently and reliably.
[0342] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0343] In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement proposals for the source code using a generative AI model, means for updating the source code based on the generated improvement proposals, means for testing the updated source code, means for sharing the improvement results and update contents with a user, means for acquiring a URL of the software repository based on information input by a user, means for outputting a prompt statement to the generative AI model and receiving the result, and means for proposing performance improvements, vulnerability fixes, and scalability improvements for the source code. This enables software maintenance work to be performed efficiently and automatically, reducing the burden on developers and improving software quality.
[0344] A "software repository" is a database for managing and storing software source code and related resources.
[0345] A "means of acquisition" is a means of downloading the contents of a specific repository based on its URL and saving it in a local environment.
[0346] "Means of analysis" refers to means of inspecting the software source code and analyzing its structure, quality, and potential problems.
[0347] A "generative AI model" is a model that uses artificial intelligence technology to generate improvement suggestions from the analysis results of input source code.
[0348] "Means for generating improvement proposals" refers to the process of utilizing a generative AI model to generate specific proposals for improving source code performance, fixing vulnerabilities, and increasing scalability.
[0349] A "means for updating the source code" is a means for automatically applying modifications to the source code based on improvement suggestions provided by the generative AI model.
[0350] "Testing means" is the process of running automated tests to verify the accuracy and safety of the updated source code.
[0351] "Means for sharing improvement results and updated content with users" refers to means for notifying users of the updated state of the source code and test results and obtaining their confirmation.
[0352] A "prompt" is input text used to give instructions or ask questions to a generative AI model.
[0353] The present invention provides a system that uses a generative AI model to automate software maintenance, improving performance, fixing vulnerabilities, and enhancing scalability. This system includes a series of processes: acquiring and analyzing a software repository, generating improvement proposals using a generative AI model, updating source code based on the proposals, and conducting testing. A specific embodiment of the system is described below.
[0354] First, the server receives the URL of the software repository specified by the user. Based on this, the server clones the contents of the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository. For hardware, a general server (e.g., an EC2 instance on AWS) is used. For software, Git is used to clone the repository.
[0355] Next, the server reads the acquired source code and inputs it into the generative AI model. At this time, the acquired source code is converted into text format and formatted to fit the input format of the generative AI model. The generative AI model used is, for example, OpenAI's GPT-4. The following prompt sentence is input to this model:
[0356] "Generate improvement suggestions to improve the performance of this source code."
[0357] "Please suggest specific changes to fix the vulnerability."
[0358] The generative AI model analyzes the structure, quality, performance, and vulnerabilities of the source code and generates necessary improvement suggestions. These improvement suggestions include specific changes to improve performance, fix vulnerabilities, and improve scalability, such as optimizing unnecessary loops, updating vulnerable libraries, and abstracting interfaces.
[0359] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and fixes the source code. This update process is automated and is executed using Python scripts, etc.
[0360] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. Testing tools such as Jenkins or pytest are used to run the automated tests.
[0361] If the test is successful, the server notifies the user of the results and changes. Notifications are sent via Slack API, email servers, or other methods. The user receives the notification and checks the proposed improvements. If necessary, the user can approve the suggestions or make further adjustments. This series of processes effectively improves software performance, fixes vulnerabilities, and enhances scalability.
[0362] As a concrete example, consider a given repository for a web application. The server clones the repository and feeds the application's source code into a generative AI model. The model optimizes unnecessary loops, updates vulnerable libraries, and suggests interface abstractions. Based on these suggestions, the server updates the source code and runs automated tests. Successful tests are reported to the user, who can review and approve the suggestions. This process improves the performance, security, and scalability of the web application.
[0363] This invention realizes automation of software maintenance work, and can improve the quality of software while reducing the burden on developers.
[0364] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0365] Step 1:
[0366] The server receives the software repository URL from the user. As input, it receives the repository URL entered by the user in a web form. The specific operation is that the server retrieves the URL data submitted through the user interface. As output, it passes the retrieved repository URL to the next step.
[0367] Step 2:
[0368] The server clones the software repository to a local directory using the repository URL. As input, it uses the repository URL obtained in step 1. Specifically, the server runs a Git command (e.g., git clone <url>) to create a copy of the repository in your local directory. The output is the source code and related files stored in your local directory.
[0369] Step 3:
[0370] The server reads the cloned source code and formats it into the input format for the generative AI model. The cloned source code file is used as input. Specifically, it converts the file into text format and formats it into a format suitable for the generative AI model (e.g., JSON format). The output is a data format for input into the generative AI model.
[0371] Step 4:
[0372] The server inputs the prompt sentence into the generative AI model and performs the analysis. As input, it uses the source code formatted in step 3 and the prompt sentence. Specifically, it inputs the following prompt sentence into the generative AI model:
[0373] "Generate improvement suggestions to improve the performance of this source code."
[0374] "Please suggest specific changes to fix the vulnerability."
[0375] As an output, the generative AI model provides improvement suggestions.
[0376] Step 5:
[0377] The server updates the source code based on the suggestions of the generative AI model. The input is the original source code and the improvement suggestions obtained from the generative AI model. The specific operation is to automatically change and correct the source code according to the suggestions. This operation is performed using a Python script, etc. The output is the updated source code.
[0378] Step 6:
[0379] The server runs automated tests against the updated source code. The updated source code is used as input. Specifically, it runs various tests (unit tests, integration tests, etc.) using testing tools such as Jenkins or pytest. The output is the test results (success / failure status and detailed logs).
[0380] Step 7:
[0381] The server notifies the user of the test results and changes. As input, it uses the test results and changes data. The specific operation is to use the Slack API or a mail server to send a message notifying the user of the results. As output, the user receives a notification and checks the results.
[0382] Step 8:
[0383] The user receives a notification and reviews the proposal. The input is the notification sent by the server. The specific behavior is that the user receives the notification, clicks the link, reviews the changes in a web browser, and approves or adjusts them as needed. The output is feedback of the user's review and approval.
[0384] In this way, through a series of operations between the server, the generative AI model, and the user, software maintenance tasks are efficiently automated and software quality is improved.
[0385] (Application example 1)
[0386] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0387] In modern factories, software maintenance for machine control systems is a major issue. Traditional manual maintenance work requires time and effort, and also carries the risk of human error. Furthermore, updating and improving machine control software requires knowledge of the latest technologies and security, and is often dependent on specific engineers. To solve these problems, there is a need for a system that automates software maintenance and efficiently improves performance, fixes vulnerabilities, and increases scalability.
[0388] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0389] In this invention, the server includes a means for acquiring a software repository, a means for analyzing source code in the acquired software repository, a means for generating improvement proposals for the source code using a generative AI model, a means for updating the source code based on the generated improvement proposals, a means for testing the updated source code, and a means for notifying the improvement results and update contents to a shared display device. This automates software maintenance for machine control systems in factories, enabling efficient performance improvements, vulnerability repairs, and scalability improvements. Furthermore, by using smart devices, workers can easily grasp the status of maintenance work and respond quickly.
[0390] "Software Repository" means a location and system for storing and managing software source code, associated documentation, and other files related to software development.
[0391] "Source code" is a human-readable text file that describes how software or a program works.
[0392] "Generative AI models" are artificial intelligence (AI) algorithms and systems that learn from large amounts of data and generate solutions to specific tasks or problems.
[0393] "Improvement suggestions" are specific proposed changes for improving performance, fixing vulnerabilities, and increasing scalability that the generative AI model provides based on an analysis of the source code.
[0394] A "shared display device" is a device that visually displays improvement results and updates, allowing users to review and approve them. Examples include smart glasses.
[0395] A "smart device" is a portable electronic device with Internet connectivity and the ability to run various applications, allowing users to obtain and operate information. Examples include smart glasses and smartphones.
[0396] A "machine control system" is hardware and software used to manage and control the operation of various machines and equipment in factories and industrial sites.
[0397] "Automated testing" is the process of automatically verifying whether a program or software function works correctly based on predefined test cases.
[0398] This invention relates to a system that automates software maintenance for machine control systems in factories, improving performance, fixing vulnerabilities, and improving scalability. The system for realizing this application example is described in detail below.
[0399] System Program
[0400] To automate software maintenance for machine control systems in factories, servers, smart devices (e.g., smart glasses and smartphones), generative AI models, and automated testing frameworks are used. The system works as follows:
[0401] Hardware and Software Configuration
[0402] Server: Clone software repositories, analyze source code, generate improvement suggestions, update source code, run automated tests, and notify results.
[0403] Smart devices: Act as display devices that allow users on the factory floor to easily check results and take any necessary approvals or actions. Examples include Microsoft HoloLens and smartphones.
[0404] Generative AI models: Learn from large amounts of data and generate specific improvement suggestions for improving source code performance, fixing vulnerabilities, and increasing scalability. AI models such as OpenAI GPT-3 are used.
[0405] Automated testing framework: Automatically runs functional tests against updated source code, using Pytest or similar.
[0406] Natural language explanation of the process
[0407] 1. Clone the repository
[0408] The server receives the URL of the software repository specified by the user, clones the repository contents to a local directory, and uses Git to retrieve the source code and related files from the remote repository.
[0409] 2. Source code analysis
[0410] The server reads the acquired source code and inputs its contents into a generative AI model. The generative AI model analyzes the structure, quality, performance, and vulnerabilities of the source code and generates necessary improvement proposals. Specifically, models such as OpenAI GPT-3 are used. An example of a prompt is, "Analyze the source code of the following robot arm control software and generate specific improvement proposals for improving performance, fixing vulnerabilities, and increasing scalability. Please include specific code changes in your proposals."
[0411] 3. Application of improvement proposals
[0412] The server updates the source code based on the generated improvement suggestions, and automatically applies the specific changes suggested to fix the source code.
[0413] 4. Running automated tests
[0414] Automated tests are run against the updated source code, and functionality is verified using a test framework such as Pytest to generate test results.
[0415] 5. Notification of Results
[0416] The server notifies the smart device of the automated test results and updates, and the user can check the results through smart glasses or a smartphone and take any necessary approvals or actions.
[0417] Specific examples
[0418] When a factory needs to update the control software for a robot arm, the following steps are taken:
[0419] 1. A factory technician puts on smart glasses and provides the software repository URL to the server.
[0420] 2. The server clones the repository and runs the generative AI model to analyze the source code.
[0421] 3. The generative AI model generates improvement suggestions using the prompt, "Analyze the source code of the following robot arm control software and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability. Please also include specific code changes in your suggestions."
[0422] 4. The server applies the proposed changes to the source code and runs the automated tests.
[0423] 5. A technician reviews the test results through smart glasses and approves or takes additional action as needed.
[0424] The above process efficiently automates software maintenance for machine control systems within a factory.
[0425] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0426] Step 1:
[0427] The server receives a software repository URL from the user. The input is the repository URL, and based on this URL, the server uses Git to clone the repository into a local directory. The output is the source code and associated files stored in the local directory.
[0428] Step 2:
[0429] The server reads the cloned source code and inputs the contents into the generative AI model. The input is the source code stored in a local directory, and the output is a data format containing a prompt for the generative AI model to analyze. In a specific example, the server sends the prompt to the generative AI model: "Analyze the source code of the following robot arm control software and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability. Please include specific code changes in your suggestions."
[0430] Step 3:
[0431] The generative AI model analyzes the source code based on the prompt and source code and generates improvement suggestions. The input is the prompt and source code, and the output is data containing specific improvement suggestions. The generative AI model performs a detailed analysis of the performance and security of the source code and indicates the necessary changes.
[0432] Step 4:
[0433] The server updates the source code based on the improvement suggestions obtained from the generative AI model. The input is the improvement suggestions and the original source code, and the output is the updated source code. The server automatically applies the specific suggested changes and updates each part of the code.
[0434] Step 5:
[0435] The server runs automated tests against the updated source code. The input is the updated source code and the output is the test results. The server uses a test framework such as Pytest to run test cases to verify that the code works correctly.
[0436] Step 6:
[0437] The server notifies the user of the automated test results and updates. The input is the test results and update data, and the output is a notification sent to the smart device. The user can check the results through smart glasses or a smartphone and take any necessary approvals or actions.
[0438] Step 7:
[0439] Users receive notifications on their smart devices and check the improvement results and update details. The input is the notification sent from the server, and the output is the user's confirmation or approval action. The user evaluates the software status based on the notified information and decides on additional actions if necessary.
[0440] The above steps efficiently automate software maintenance for machine control systems within factories, improving performance, fixing vulnerabilities, and improving scalability.
[0441] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0442] The outline of the present invention is a system that uses generative AI and an emotion engine to automate software maintenance, improve performance, fix vulnerabilities, and improve scalability, while also recognizing user emotions and taking appropriate action. Specific embodiments of this system are described below.
[0443] In this system, the server first receives the URL of a software repository specified by the user and clones the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository.
[0444] The server then inputs the acquired source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals. These improvement proposals include specific changes to improve performance, fix vulnerabilities, and increase scalability.
[0445] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and fixes the source code. The update process is performed automatically, significantly reducing the user's workload.
[0446] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. If the automated tests are successful, the server notifies the user of the results and the changes.
[0447] Furthermore, this system incorporates an emotion engine that recognizes the user's emotions. The server uses the emotion engine to recognize the content of improvement suggestions and the user's emotional state when notifying them, and adjusts the response accordingly. For example, if the user is feeling stressed, the system will gently explain the notification content or provide additional support information.
[0448] The user receives a notification and reviews the proposed improvements. If necessary, the user can approve the proposal or make further adjustments. The emotion engine takes the user's emotions into consideration, resulting in smoother communication and a more effective improvement process.
[0449] As a concrete example, consider a given web application repository. The server clones the repository and inputs the application's source code into a generative AI model. The model then suggests eliminating unnecessary loops, updating vulnerable libraries, and abstracting interfaces. Based on these suggestions, the server updates the source code and runs automated tests. If the tests are successful, the server notifies the user along with the results of the emotion engine's analysis. For example, if the user is concerned, a detailed explanation and links to additional support are provided.
[0450] This process improves software performance, security, and scalability, and enables it to respond with consideration for user emotions.
[0451] The processing flow will be explained below.
[0452] Step 1:
[0453] The server receives as input the URL of a software repository specified by the user, which includes the access permissions to the repository, for example, a GitHub or GitLab repository URL.
[0454] Step 2:
[0455] The server clones the software repository to a local directory using the specified repository URL. This operation downloads all source code and related files in the repository to your local environment.
[0456] Step 3:
[0457] The server reads the main source code file (e.g., main.py) in the cloned repository, which involves opening the file and reading the source code.
[0458] Step 4:
[0459] The server inputs the acquired source code into a generative AI model, which analyzes the source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability.
[0460] Step 5:
[0461] The generative AI model analyzes the input source code and automatically generates improvement suggestions, including specific code changes (e.g., optimizing unnecessary loops, updating outdated libraries, refactoring interfaces, etc.).
[0462] Step 6:
[0463] The server automatically updates the source code based on the generated improvement suggestions, applies the proposed changes to the source code, and replaces the original files with the new content.
[0464] Step 7:
[0465] The server runs automated tests on the updated source code, using automated test scripts to ensure all functionality is working properly and to check for side effects from performance improvements and vulnerability fixes.
[0466] Step 8:
[0467] The server analyzes the user's current emotional state using an emotion engine that recognizes the user's emotions and infers the emotional state based on the user's inputs and behavioral patterns.
[0468] Step 9:
[0469] The server adjusts the content and presentation of the improvement suggestions based on the user's emotions recognized by the emotion engine. For example, if the emotion engine determines that the user is feeling stressed, it will gently explain the notification content or provide additional support information.
[0470] Step 10:
[0471] The server notifies the user of the test results and specific improvements, including details of the improvements, changes, test results, and additional supporting information based on the emotion engine's analysis.
[0472] Step 11:
[0473] Users are notified and can review the proposed improvements. They can approve or make further adjustments as needed. Additionally, users can use the additional supporting information provided to better understand and accept the changes.
[0474] This series of processes improves the performance, security, and scalability of the software, and also realizes a response that takes into consideration the feelings of users. Providing appropriate and friendly support to users increases the acceptance of improvement suggestions.
[0475] Example 2
[0476] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0477] Conventional software maintenance systems make it difficult to efficiently improve performance, fix vulnerabilities, and improve scalability, placing a heavy burden on users. Furthermore, test results and improvement notifications for software changes are not properly communicated to users, which can cause anxiety and stress. This has led to challenges in improving the efficiency of software maintenance and the user experience.
[0478] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement suggestions for the source code using a generative AI model, means for updating the source code based on the generated improvement suggestions, means for testing the updated source code, means for sharing the improvement results and update details with the user, and means for recognizing the user's emotions and adjusting notification content based on the emotions. This effectively realizes automation of software maintenance, performance improvement, vulnerability correction, and improved scalability, and enables an improved user experience through notifications that take the user's emotions into consideration.
[0479] The "means for obtaining a software repository" is a function by which a server downloads a software repository from a specific URL on the Internet to a local directory.
[0480] "Means for analyzing source code" refers to a function for analyzing acquired source code and evaluating its internal structure, quality, performance, and vulnerabilities.
[0481] "Means for generating source code improvement proposals using a generative AI model" refers to a function that uses a generative AI model to automatically create specific proposed changes to improve the quality and performance of source code.
[0482] "Means for updating source code based on generated improvement suggestions" refers to a function that automatically applies the improvements suggested by the generative AI model to the source code, correcting and updating the code.
[0483] "Means for testing the updated source code" refers to the ability to run automated tests to confirm that the updated source code functions correctly.
[0484] "Means for sharing improvement results and updated content with users" refers to a function for notifying and reporting the improvement results and updated content of source code to users.
[0485] "Means for recognizing the user's emotions and adjusting the notification content based on those emotions" is a function that analyzes the user's emotional state and adjusts the notification content to be more appropriate and easy to understand if the user is feeling stressed or anxious.
[0486] The present invention is a system that automates the process from acquiring software repositories to improving source code, testing, and notifying users, and further adjusts the notification content according to the user's emotional state. This system is implemented as follows.
[0487] First, the server receives the URL of the software repository specified by the user. The user enters the URL into the terminal interface and sends the information to the server. An example of a prompt at this time is "Please enter the URL of this software repository. The system will automatically improve performance, fix vulnerabilities, and improve scalability."
[0488] Next, the server uses the Git command git clone <repository URL> to clone the specified repository to a local directory, obtaining the source code and related files in the repository.
[0489] The server then inputs the acquired source code into a generative AI model. The generative AI model is built using machine learning libraries such as Python and TensorFlow to analyze the source code's structure, quality, performance, vulnerabilities, etc. Based on this analysis, specific improvement proposals are generated for improving performance, fixing vulnerabilities, and increasing scalability.
[0490] The server then automatically updates the source code based on the generated improvement suggestions, such as eliminating unnecessary loops, updating vulnerable libraries, abstracting interfaces, etc. These changes are implemented automatically by scripts, significantly reducing the user's effort.
[0491] After the source code is updated, the server runs automated tests using pre-configured unit and integration tests to ensure the updated source code functions correctly, for example, using a testing framework such as pytest.
[0492] If the test is successful, the server notifies the user of the results and changes. Notifications are sent via email or messages through the device interface. The emotion engine then analyzes the user's emotional state when the notification is sent. For example, if the user is feeling stressed, the server will gently explain the notification and provide additional support information.
[0493] As a concrete example, let's consider a web application repository. The server first clones the repository and inputs the source code into a generative AI model. The generative AI model suggests ways to eliminate unnecessary loops, update vulnerable libraries, and abstract interfaces. The server updates the source code based on these suggestions and runs automated tests. If the tests are successful, a notification containing a detailed explanation and links to additional support is sent to the user based on the analysis results of the emotion engine.
[0494] In this way, this system automates source code updates and testing, and provides notifications that take user emotions into consideration, thereby improving the efficiency of software maintenance and the user experience.
[0495] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0496] Step 1:
[0497] The user inputs the URL of a software repository into the terminal interface. Specifically, for example, an input form is presented with a prompt such as, "Please enter the URL of this software repository. The system will automatically improve performance, fix vulnerabilities, and improve scalability." The repository URL specified by the user is obtained as input. This input URL is then sent to the server.
[0498] Step 2:
[0499] Based on the URL received from the user, the server uses the Git command to clone the specified software repository to a local directory. Specifically, it executes the git clone <repository URL> command to obtain the source code and related files in the repository. The repository URL is used as input, and the source code and related files cloned into the local directory are obtained as output. This source code and files will be used in subsequent processing.
[0500] Step 3:
[0501] The server inputs the cloned source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc. The source code is used as input for this analysis process, and improvement suggestions are obtained from the generative AI model as output. For example, suggestions may include eliminating unnecessary loops or updating vulnerable libraries.
[0502] Step 4:
[0503] The server automatically updates the source code based on the generated improvement suggestions. Specifically, it identifies the proposed updates and modifies the source code appropriately. This process uses the improvement suggestions from the generative AI model as input and obtains updated source code as output. For example, it runs a command or script to replace a specific library with the latest version.
[0504] Step 5:
[0505] The server runs automated tests on the updated source code. Test scripts run pre-configured unit and integration tests to ensure the new code works correctly. The updated source code is used as input and the test results are given as output. Tests are run using tools such as pytest, for example.
[0506] Step 6:
[0507] The server notifies the user of the test results and changes. The user is notified via email or message through the device interface. The server also uses an emotion engine to analyze the user's emotional state. The test results and changes are used as input, and the output is an adjusted notification based on the analysis results. For example, if the user is feeling anxious, a notification with a more detailed explanation or additional support information is provided.
[0508] Step 7:
[0509] The user receives a notification from the server and checks the proposed improvements. The notification from the server is used as input, and the output is the user's approval or a request for further adjustments. The user can check the notification and take appropriate action, such as clicking the approval button. This approval operation ensures that each step in the system proceeds smoothly.
[0510] (Application example 2)
[0511] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0512] With conventional software maintenance methods, tasks such as performance improvement, vulnerability fixes, and scalability improvements are complicated and time-consuming, placing a heavy burden on users. Furthermore, the approach often ignores users' feelings, increasing stress and anxiety associated with maintenance work. In particular, factory robot control software requires real-time updates and maintenance, and rapid and accurate responses are required, but current methods are inadequate.
[0513] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0514] In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement proposals for the source code using a generative AI model, means for updating the source code based on the generated improvement proposals, means for testing the updated source code, means for sharing the improvement results and update details with a user, means for recognizing user emotions using an emotion analysis engine, and means for adjusting notification content based on the user's emotional state. This not only automates software maintenance work, improves performance, fixes vulnerabilities, and improves scalability quickly and efficiently, but also enables responses that take user emotions into consideration.
[0515] A "software repository" is a digital storage for storing and managing software source code and related files.
[0516] "Source code" is the human-readable form of program code that describes how the program works.
[0517] A "generative AI model" is an algorithm that uses deep learning or machine learning to generate new data and suggestions for a specific task.
[0518] "Improvement proposals" means analyzing the quality, performance, vulnerabilities, etc. of the source code and proposing specific changes and correction methods.
[0519] An "emotion analysis engine" is a software component that analyzes a user's emotions and recognizes their state.
[0520] The "means for adjusting notification content based on the emotional state of the user" refers to a means having the function of adjusting the format and content of notifications and information provided to the user based on the user's emotions recognized by the emotion analysis engine.
[0521] "Means for testing updated source code" means the ability to run automated tests to verify that changes to the source code function correctly.
[0522] The system for implementing the present invention utilizes the following hardware and software to perform maintenance on the control software of a factory robot.
[0523] System Configuration
[0524] Hardware
[0525] 1. Server:
[0526] A server in a data center with a powerful processor and sufficient memory.
[0527] SSD storage is used, allowing for high-speed data access.
[0528] 2. Smartphones / Head-mounted displays / Robotic devices:
[0529] Devices used by factory operators.
[0530] It has a display to show necessary notifications and instructions.
[0531] software
[0532] 1. Flask (Web framework):
[0533] It runs on the server side and processes requests from client terminals.
[0534] 2. GitPython:
[0535] A library for cloning repositories.
[0536] 3. TensorFlow / Keras (implementation of generative AI models):
[0537] Analyzes source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability.
[0538] 4. Emotion-Analyzer (Emotion Analysis Engine):
[0539] Analyze the user's emotional state and generate optimal notification content.
[0540] 5. PyTest (Automated Testing):
[0541] An automated testing tool that checks the operation of updated source code.
[0542] Processing Details
[0543] 1. Clone the software repository
[0544] The server receives the URL of a software repository specified by the user and clones the repository into a local directory, thereby obtaining the source code and related files contained in the specified repository.
[0545] 2. Analysis using generative AI models
[0546] The server inputs the acquired source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals, including specific changes.
[0547] 3. Automatic source code updates
[0548] The server automatically updates the source code based on the generated improvement suggestions by applying the proposed changes to the source code.
[0549] 4. Automated Testing
[0550] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality.
[0551] 5. Sentiment Analysis and Notifications
[0552] The server uses an Emotion-Analyzer to recognize the user's emotional state and adjusts the notification content based on the user's emotional state. For example, if the user is feeling stressed, the notification content will be explained in a gentle manner and additional support information will be provided.
[0553] Specific examples
[0554] When a factory operator enters the repository URL of a factory robot's control software into the system, the server clones the repository and inputs the obtained source code into a generative AI model. The generative AI model then suggests eliminating unnecessary loops, updating vulnerable libraries, and abstracting interfaces. Based on these suggestions, the server updates the source code and runs automated tests. If the test is successful, the user is notified of the results. If the user expresses concerns, detailed explanations and links to additional support are also provided.
[0555] Prompt Sentence Examples
[0556] "The RoboGuard application automatically clones the factory robot's software repository and uses generative AI to improve code performance and fix vulnerabilities. The framework for detecting user sentiment and providing appropriate responses is as follows..."
[0557] This system will make software maintenance work more efficient, improve performance and security, and reduce user stress.
[0558] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0559] Step 1:
[0560] The server receives the URL of a software repository specified by the user. The user enters the repository URL of the factory robot control software into the system, and that information is sent to the server. The input is the repository URL, and the output is the process of retrieving that URL.
[0561] Step 2:
[0562] The server uses the GitPython library to clone the repository to a local directory based on the URL obtained, and then downloads the source code and related files in the repository. The input is the repository URL, and the output is the source code cloned to the local directory.
[0563] Step 3:
[0564] The server inputs the entire cloned source code into a generative AI model. The generative AI model uses TensorFlow / Keras to analyze the source code and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability. The input is the source code, and the output is the improvement suggestions.
[0565] Step 4:
[0566] The server automatically updates the source code based on the improvement suggestions generated by the generative AI model. It applies specific changes to the source code and creates a new version. The input is the improvement suggestions, and the output is the updated source code.
[0567] Step 5:
[0568] The server runs automated tests on the updated source code using PyTest to verify that the proposed improvements work correctly and do not adversely affect existing functionality. The input is the updated source code, and the output is the success or failure of the tests.
[0569] Step 6:
[0570] Before notifying the user of the automated test results, the server analyzes the user's emotions using Emotion-Analyzer. It recognizes the user's emotional state and adjusts the notification content based on the emotion. The input is the user's emotional data, and the output is the adjusted notification content.
[0571] Step 7:
[0572] The server then sends the notification content, adjusted through emotion analysis, to the user's device, such as a smartphone or head-mounted display. The notification includes the improvements and their explanations, as well as additional support information if necessary. The input is the adjusted notification content, and the output is the notification displayed on the device.
[0573] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0574] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0575] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.
[0576] [Third embodiment]
[0577] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[0578] 5, the data processing system 310 includes the data processing device 12 and a headset type terminal 314. An example of the data processing device 12 is a server.
[0579] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0580] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.
[0581] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0582] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0583] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0584] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0585] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0586] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0587] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0588] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."
[0589] The outline of the present invention is a system that uses generative AI to automate software maintenance, improving performance, fixing vulnerabilities, and improving scalability. Specific embodiments of the system are described below.
[0590] This system operates in the following steps: First, the server receives the URL of the software repository specified by the user. Based on this, the server clones the contents of the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository.
[0591] The server then reads the acquired source code and inputs it into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals. These proposals include specific changes to improve performance, fix vulnerabilities, and increase scalability.
[0592] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and corrects the source code. This update process is performed automatically, significantly reducing the user's workload.
[0593] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. If the automated tests are successful, the server notifies the user of the results and the changes.
[0594] Users receive a notification and review the proposed improvements. If necessary, they can approve the proposal or make further adjustments. This process effectively improves software performance, fixes vulnerabilities, and enhances scalability.
[0595] As a concrete example, consider a given repository for a web application. The server clones the repository and feeds the application's source code into a generative AI model. The model optimizes unnecessary loops, updates vulnerable libraries, and suggests interface abstractions. Based on these suggestions, the server updates the source code and runs automated tests. Successful tests are reported to the user, who can review and approve the suggestions. This process improves the performance, security, and scalability of the web application.
[0596] The processing flow will be explained below.
[0597] Step 1:
[0598] The server receives as input the URL of a software repository specified by the user, which includes the access privileges to the repository.
[0599] Step 2:
[0600] The server clones the software repository to a local directory using the specified repository URL. This operation downloads all source code and related files in the repository to your local environment.
[0601] Step 3:
[0602] The server reads the main source code file in the cloned repository, for example, opening the main executable file, main.py, and fetching its contents.
[0603] Step 4:
[0604] The server inputs the read source code into a generative AI model, which can handle a large number of tokens and is capable of analyzing large amounts of code.
[0605] Step 5:
[0606] The generative AI model analyzes input source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability, such as eliminating unnecessary loops, updating outdated libraries, and refactoring code.
[0607] Step 6:
[0608] The server automatically updates the source code based on the generated improvement suggestions, applying the proposed changes to the source code and replacing the original files with the new content.
[0609] Step 7:
[0610] The server runs automated tests on the updated source code, using test scripts to verify that all functions are working properly and that there are no side effects from performance improvements or vulnerability fixes.
[0611] Step 8:
[0612] The server will notify the user of the test results and specific improvements, including details of the improvements, changes, and test results, in a format that the user can review.
[0613] Step 9:
[0614] The user receives a notification and reviews the proposed improvements, and can accept the suggestions or make further adjustments as needed.
[0615] This series of processes automatically and efficiently improves software performance, fixes vulnerabilities, and improves scalability.
[0616] Example 1
[0617] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0618] Traditional software maintenance work is often performed manually by developers, which is time-consuming and labor-intensive. Furthermore, the complexity of the work increases, especially in large-scale software projects, as bug fixes, performance improvements, vulnerability fixes, and scalability improvements are required. Furthermore, manual changes carry a high risk of introducing new errors and vulnerabilities, potentially reducing overall reliability. There is a need for a system that can solve these issues and perform software maintenance work efficiently and reliably.
[0619] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0620] In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement proposals for the source code using a generative AI model, means for updating the source code based on the generated improvement proposals, means for testing the updated source code, means for sharing the improvement results and update contents with a user, means for acquiring a URL of the software repository based on information input by a user, means for outputting a prompt statement to the generative AI model and receiving the result, and means for proposing performance improvements, vulnerability fixes, and scalability improvements for the source code. This enables software maintenance work to be performed efficiently and automatically, reducing the burden on developers and improving software quality.
[0621] A "software repository" is a database for managing and storing software source code and related resources.
[0622] A "means of acquisition" is a means of downloading the contents of a specific repository based on its URL and saving it in a local environment.
[0623] "Means of analysis" refers to means of inspecting the software source code and analyzing its structure, quality, and potential problems.
[0624] A "generative AI model" is a model that uses artificial intelligence technology to generate improvement suggestions from the analysis results of input source code.
[0625] "Means for generating improvement proposals" refers to the process of utilizing a generative AI model to generate specific proposals for improving source code performance, fixing vulnerabilities, and increasing scalability.
[0626] A "means for updating the source code" is a means for automatically applying modifications to the source code based on improvement suggestions provided by the generative AI model.
[0627] "Testing means" is the process of running automated tests to verify the accuracy and safety of the updated source code.
[0628] "Means for sharing improvement results and updated content with users" refers to means for notifying users of the updated state of the source code and test results and obtaining their confirmation.
[0629] A "prompt" is input text used to give instructions or ask questions to a generative AI model.
[0630] The present invention provides a system that uses a generative AI model to automate software maintenance, improving performance, fixing vulnerabilities, and enhancing scalability. This system includes a series of processes: acquiring and analyzing a software repository, generating improvement proposals using a generative AI model, updating source code based on the proposals, and conducting testing. A specific embodiment of the system is described below.
[0631] First, the server receives the URL of the software repository specified by the user. Based on this, the server clones the contents of the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository. For hardware, a general server (e.g., an EC2 instance on AWS) is used. For software, Git is used to clone the repository.
[0632] Next, the server reads the acquired source code and inputs it into the generative AI model. At this time, the acquired source code is converted into text format and formatted to fit the input format of the generative AI model. The generative AI model used is, for example, OpenAI's GPT-4. The following prompt sentence is input to this model:
[0633] "Generate improvement suggestions to improve the performance of this source code."
[0634] "Please suggest specific changes to fix the vulnerability."
[0635] The generative AI model analyzes the structure, quality, performance, and vulnerabilities of the source code and generates necessary improvement suggestions. These improvement suggestions include specific changes to improve performance, fix vulnerabilities, and improve scalability, such as optimizing unnecessary loops, updating vulnerable libraries, and abstracting interfaces.
[0636] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and fixes the source code. This update process is automated and is executed using Python scripts, etc.
[0637] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. Testing tools such as Jenkins or pytest are used to run the automated tests.
[0638] If the test is successful, the server notifies the user of the results and changes. Notifications are sent via Slack API, email servers, or other methods. The user receives the notification and checks the proposed improvements. If necessary, the user can approve the suggestions or make further adjustments. This series of processes effectively improves software performance, fixes vulnerabilities, and enhances scalability.
[0639] As a concrete example, consider a given repository for a web application. The server clones the repository and feeds the application's source code into a generative AI model. The model optimizes unnecessary loops, updates vulnerable libraries, and suggests interface abstractions. Based on these suggestions, the server updates the source code and runs automated tests. Successful tests are reported to the user, who can review and approve the suggestions. This process improves the performance, security, and scalability of the web application.
[0640] This invention realizes automation of software maintenance work, and can improve the quality of software while reducing the burden on developers.
[0641] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0642] Step 1:
[0643] The server receives the software repository URL from the user. As input, it receives the repository URL entered by the user in a web form. The specific operation is that the server retrieves the URL data submitted through the user interface. As output, it passes the retrieved repository URL to the next step.
[0644] Step 2:
[0645] The server clones the software repository to a local directory using the repository URL. As input, it uses the repository URL obtained in step 1. Specifically, the server runs a Git command (e.g., git clone <url>) to create a copy of the repository in your local directory. The output is the source code and related files stored in your local directory.
[0646] Step 3:
[0647] The server reads the cloned source code and formats it into the input format for the generative AI model. The cloned source code file is used as input. Specifically, it converts the file into text format and formats it into a format suitable for the generative AI model (e.g., JSON format). The output is a data format for input into the generative AI model.
[0648] Step 4:
[0649] The server inputs the prompt sentence into the generative AI model and performs the analysis. As input, it uses the source code formatted in step 3 and the prompt sentence. Specifically, it inputs the following prompt sentence into the generative AI model:
[0650] "Generate improvement suggestions to improve the performance of this source code."
[0651] "Please suggest specific changes to fix the vulnerability."
[0652] As an output, the generative AI model provides improvement suggestions.
[0653] Step 5:
[0654] The server updates the source code based on the suggestions of the generative AI model. The input is the original source code and the improvement suggestions obtained from the generative AI model. The specific operation is to automatically change and correct the source code according to the suggestions. This operation is performed using a Python script, etc. The output is the updated source code.
[0655] Step 6:
[0656] The server runs automated tests against the updated source code. The updated source code is used as input. Specifically, it runs various tests (unit tests, integration tests, etc.) using testing tools such as Jenkins or pytest. The output is the test results (success / failure status and detailed logs).
[0657] Step 7:
[0658] The server notifies the user of the test results and changes. As input, it uses the test results and changes data. The specific operation is to use the Slack API or a mail server to send a message notifying the user of the results. As output, the user receives a notification and checks the results.
[0659] Step 8:
[0660] The user receives a notification and reviews the proposal. The input is the notification sent by the server. The specific behavior is that the user receives the notification, clicks the link, reviews the changes in a web browser, and approves or adjusts them as needed. The output is feedback of the user's review and approval.
[0661] In this way, through a series of operations between the server, the generative AI model, and the user, software maintenance tasks are efficiently automated and software quality is improved.
[0662] (Application example 1)
[0663] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0664] In modern factories, software maintenance for machine control systems is a major issue. Traditional manual maintenance work requires time and effort, and also carries the risk of human error. Furthermore, updating and improving machine control software requires knowledge of the latest technologies and security, and is often dependent on specific engineers. To solve these problems, there is a need for a system that automates software maintenance and efficiently improves performance, fixes vulnerabilities, and increases scalability.
[0665] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0666] In this invention, the server includes a means for acquiring a software repository, a means for analyzing source code in the acquired software repository, a means for generating improvement proposals for the source code using a generative AI model, a means for updating the source code based on the generated improvement proposals, a means for testing the updated source code, and a means for notifying the improvement results and update contents to a shared display device. This automates software maintenance for machine control systems in factories, enabling efficient performance improvements, vulnerability repairs, and scalability improvements. Furthermore, by using smart devices, workers can easily grasp the status of maintenance work and respond quickly.
[0667] "Software Repository" means a location and system for storing and managing software source code, associated documentation, and other files related to software development.
[0668] "Source code" is a human-readable text file that describes how software or a program works.
[0669] "Generative AI models" are artificial intelligence (AI) algorithms and systems that learn from large amounts of data and generate solutions to specific tasks or problems.
[0670] "Improvement suggestions" are specific proposed changes for improving performance, fixing vulnerabilities, and increasing scalability that the generative AI model provides based on an analysis of the source code.
[0671] A "shared display device" is a device that visually displays improvement results and updates, allowing users to review and approve them. Examples include smart glasses.
[0672] A "smart device" is a portable electronic device with Internet connectivity and the ability to run various applications, allowing users to obtain and operate information. Examples include smart glasses and smartphones.
[0673] A "machine control system" is hardware and software used to manage and control the operation of various machines and equipment in factories and industrial sites.
[0674] "Automated testing" is the process of automatically verifying whether a program or software function works correctly based on predefined test cases.
[0675] This invention relates to a system that automates software maintenance for machine control systems in factories, improving performance, fixing vulnerabilities, and improving scalability. The system for realizing this application example is described in detail below.
[0676] System Program
[0677] To automate software maintenance for machine control systems in factories, servers, smart devices (e.g., smart glasses and smartphones), generative AI models, and automated testing frameworks are used. The system works as follows:
[0678] Hardware and Software Configuration
[0679] Server: Clone software repositories, analyze source code, generate improvement suggestions, update source code, run automated tests, and notify results.
[0680] Smart devices: Act as display devices that allow users on the factory floor to easily check results and take any necessary approvals or actions. Examples include Microsoft HoloLens and smartphones.
[0681] Generative AI models: Learn from large amounts of data and generate specific improvement suggestions for improving source code performance, fixing vulnerabilities, and increasing scalability. AI models such as OpenAI GPT-3 are used.
[0682] Automated testing framework: Automatically runs functional tests against updated source code, using Pytest or similar.
[0683] Natural language explanation of the process
[0684] 1. Clone the repository
[0685] The server receives the URL of the software repository specified by the user, clones the repository contents to a local directory, and uses Git to retrieve the source code and related files from the remote repository.
[0686] 2. Source code analysis
[0687] The server reads the acquired source code and inputs its contents into a generative AI model. The generative AI model analyzes the structure, quality, performance, and vulnerabilities of the source code and generates necessary improvement proposals. Specifically, models such as OpenAI GPT-3 are used. An example of a prompt is, "Analyze the source code of the following robot arm control software and generate specific improvement proposals for improving performance, fixing vulnerabilities, and increasing scalability. Please include specific code changes in your proposals."
[0688] 3. Application of improvement proposals
[0689] The server updates the source code based on the generated improvement suggestions, and automatically applies the specific changes suggested to fix the source code.
[0690] 4. Running automated tests
[0691] Automated tests are run against the updated source code, and functionality is verified using a test framework such as Pytest to generate test results.
[0692] 5. Notification of Results
[0693] The server notifies the smart device of the automated test results and updates, and the user can check the results through smart glasses or a smartphone and take any necessary approvals or actions.
[0694] Specific examples
[0695] When a factory needs to update the control software for a robot arm, the following steps are taken:
[0696] 1. A factory technician puts on smart glasses and provides the software repository URL to the server.
[0697] 2. The server clones the repository and runs the generative AI model to analyze the source code.
[0698] 3. The generative AI model generates improvement suggestions using the prompt, "Analyze the source code of the following robot arm control software and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability. Please also include specific code changes in your suggestions."
[0699] 4. The server applies the proposed changes to the source code and runs the automated tests.
[0700] 5. A technician reviews the test results through smart glasses and approves or takes additional action as needed.
[0701] The above process efficiently automates software maintenance for machine control systems within a factory.
[0702] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0703] Step 1:
[0704] The server receives a software repository URL from the user. The input is the repository URL, and based on this URL, the server uses Git to clone the repository into a local directory. The output is the source code and associated files stored in the local directory.
[0705] Step 2:
[0706] The server reads the cloned source code and inputs the contents into the generative AI model. The input is the source code stored in a local directory, and the output is a data format containing a prompt for the generative AI model to analyze. In a specific example, the server sends the prompt to the generative AI model: "Analyze the source code of the following robot arm control software and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability. Please include specific code changes in your suggestions."
[0707] Step 3:
[0708] The generative AI model analyzes the source code based on the prompt and source code and generates improvement suggestions. The input is the prompt and source code, and the output is data containing specific improvement suggestions. The generative AI model performs a detailed analysis of the performance and security of the source code and indicates the necessary changes.
[0709] Step 4:
[0710] The server updates the source code based on the improvement suggestions obtained from the generative AI model. The input is the improvement suggestions and the original source code, and the output is the updated source code. The server automatically applies the specific suggested changes and updates each part of the code.
[0711] Step 5:
[0712] The server runs automated tests against the updated source code. The input is the updated source code and the output is the test results. The server uses a test framework such as Pytest to run test cases to verify that the code works correctly.
[0713] Step 6:
[0714] The server notifies the user of the automated test results and updates. The input is the test results and update data, and the output is a notification sent to the smart device. The user can check the results through smart glasses or a smartphone and take any necessary approvals or actions.
[0715] Step 7:
[0716] Users receive notifications on their smart devices and check the improvement results and update details. The input is the notification sent from the server, and the output is the user's confirmation or approval action. The user evaluates the software status based on the notified information and decides on additional actions if necessary.
[0717] The above steps efficiently automate software maintenance for machine control systems within factories, improving performance, fixing vulnerabilities, and improving scalability.
[0718] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0719] The outline of the present invention is a system that uses generative AI and an emotion engine to automate software maintenance, improve performance, fix vulnerabilities, and improve scalability, while also recognizing user emotions and taking appropriate action. Specific embodiments of this system are described below.
[0720] In this system, the server first receives the URL of a software repository specified by the user and clones the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository.
[0721] The server then inputs the acquired source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals. These improvement proposals include specific changes to improve performance, fix vulnerabilities, and increase scalability.
[0722] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and fixes the source code. The update process is performed automatically, significantly reducing the user's workload.
[0723] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. If the automated tests are successful, the server notifies the user of the results and the changes.
[0724] Furthermore, this system incorporates an emotion engine that recognizes the user's emotions. The server uses the emotion engine to recognize the content of improvement suggestions and the user's emotional state when notifying them, and adjusts the response accordingly. For example, if the user is feeling stressed, the system will gently explain the notification content or provide additional support information.
[0725] The user receives a notification and reviews the proposed improvements. If necessary, the user can approve the proposal or make further adjustments. The emotion engine takes the user's emotions into consideration, resulting in smoother communication and a more effective improvement process.
[0726] As a concrete example, consider a given web application repository. The server clones the repository and inputs the application's source code into a generative AI model. The model then suggests eliminating unnecessary loops, updating vulnerable libraries, and abstracting interfaces. Based on these suggestions, the server updates the source code and runs automated tests. If the tests are successful, the server notifies the user along with the results of the emotion engine's analysis. For example, if the user is concerned, a detailed explanation and links to additional support are provided.
[0727] This process improves software performance, security, and scalability, and enables it to respond with consideration for user emotions.
[0728] The processing flow will be explained below.
[0729] Step 1:
[0730] The server receives as input the URL of a software repository specified by the user, which includes the access permissions to the repository, for example, a GitHub or GitLab repository URL.
[0731] Step 2:
[0732] The server clones the software repository to a local directory using the specified repository URL. This operation downloads all source code and related files in the repository to your local environment.
[0733] Step 3:
[0734] The server reads the main source code file (e.g., main.py) in the cloned repository, which involves opening the file and reading the source code.
[0735] Step 4:
[0736] The server inputs the acquired source code into a generative AI model, which analyzes the source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability.
[0737] Step 5:
[0738] The generative AI model analyzes the input source code and automatically generates improvement suggestions, including specific code changes (e.g., optimizing unnecessary loops, updating outdated libraries, refactoring interfaces, etc.).
[0739] Step 6:
[0740] The server automatically updates the source code based on the generated improvement suggestions, applies the proposed changes to the source code, and replaces the original files with the new content.
[0741] Step 7:
[0742] The server runs automated tests on the updated source code, using automated test scripts to ensure all functionality is working properly and to check for side effects from performance improvements and vulnerability fixes.
[0743] Step 8:
[0744] The server analyzes the user's current emotional state using an emotion engine that recognizes the user's emotions and infers the emotional state based on the user's inputs and behavioral patterns.
[0745] Step 9:
[0746] The server adjusts the content and presentation of the improvement suggestions based on the user's emotions recognized by the emotion engine. For example, if the emotion engine determines that the user is feeling stressed, it will gently explain the notification content or provide additional support information.
[0747] Step 10:
[0748] The server notifies the user of the test results and specific improvements, including details of the improvements, changes, test results, and additional supporting information based on the emotion engine's analysis.
[0749] Step 11:
[0750] Users are notified and can review the proposed improvements. They can approve or make further adjustments as needed. Additionally, users can use the additional supporting information provided to better understand and accept the changes.
[0751] This series of processes improves the performance, security, and scalability of the software, and also realizes a response that takes into consideration the feelings of users. Providing appropriate and friendly support to users increases the acceptance of improvement suggestions.
[0752] Example 2
[0753] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0754] Conventional software maintenance systems make it difficult to efficiently improve performance, fix vulnerabilities, and improve scalability, placing a heavy burden on users. Furthermore, test results and improvement notifications for software changes are not properly communicated to users, which can cause anxiety and stress. This has led to challenges in improving the efficiency of software maintenance and the user experience.
[0755] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement suggestions for the source code using a generative AI model, means for updating the source code based on the generated improvement suggestions, means for testing the updated source code, means for sharing the improvement results and update details with the user, and means for recognizing the user's emotions and adjusting notification content based on the emotions. This effectively realizes automation of software maintenance, performance improvement, vulnerability correction, and improved scalability, and enables an improved user experience through notifications that take the user's emotions into consideration.
[0756] The "means for obtaining a software repository" is a function by which a server downloads a software repository from a specific URL on the Internet to a local directory.
[0757] "Means for analyzing source code" refers to a function for analyzing acquired source code and evaluating its internal structure, quality, performance, and vulnerabilities.
[0758] "Means for generating source code improvement proposals using a generative AI model" refers to a function that uses a generative AI model to automatically create specific proposed changes to improve the quality and performance of source code.
[0759] "Means for updating source code based on generated improvement suggestions" refers to a function that automatically applies the improvements suggested by the generative AI model to the source code, correcting and updating the code.
[0760] "Means for testing the updated source code" refers to the ability to run automated tests to confirm that the updated source code functions correctly.
[0761] "Means for sharing improvement results and updated content with users" refers to a function for notifying and reporting the improvement results and updated content of source code to users.
[0762] "Means for recognizing the user's emotions and adjusting the notification content based on those emotions" is a function that analyzes the user's emotional state and adjusts the notification content to be more appropriate and easy to understand if the user is feeling stressed or anxious.
[0763] The present invention is a system that automates the process from acquiring software repositories to improving source code, testing, and notifying users, and further adjusts the notification content according to the user's emotional state. This system is implemented as follows.
[0764] First, the server receives the URL of the software repository specified by the user. The user enters the URL into the terminal interface and sends the information to the server. An example of a prompt at this time is "Please enter the URL of this software repository. The system will automatically improve performance, fix vulnerabilities, and improve scalability."
[0765] Next, the server uses the Git command git clone <repository URL> to clone the specified repository to a local directory, obtaining the source code and related files in the repository.
[0766] The server then inputs the acquired source code into a generative AI model. The generative AI model is built using machine learning libraries such as Python and TensorFlow to analyze the source code's structure, quality, performance, vulnerabilities, etc. Based on this analysis, specific improvement proposals are generated for improving performance, fixing vulnerabilities, and increasing scalability.
[0767] The server then automatically updates the source code based on the generated improvement suggestions, such as eliminating unnecessary loops, updating vulnerable libraries, abstracting interfaces, etc. These changes are implemented automatically by scripts, significantly reducing the user's effort.
[0768] After the source code is updated, the server runs automated tests using pre-configured unit and integration tests to ensure the updated source code functions correctly, for example, using a testing framework such as pytest.
[0769] If the test is successful, the server notifies the user of the results and changes. Notifications are sent via email or messages through the device interface. The emotion engine then analyzes the user's emotional state when the notification is sent. For example, if the user is feeling stressed, the server will gently explain the notification and provide additional support information.
[0770] As a concrete example, let's consider a web application repository. The server first clones the repository and inputs the source code into a generative AI model. The generative AI model suggests ways to eliminate unnecessary loops, update vulnerable libraries, and abstract interfaces. The server updates the source code based on these suggestions and runs automated tests. If the tests are successful, a notification containing a detailed explanation and links to additional support is sent to the user based on the analysis results of the emotion engine.
[0771] In this way, this system automates source code updates and testing, and provides notifications that take user emotions into consideration, thereby improving the efficiency of software maintenance and the user experience.
[0772] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0773] Step 1:
[0774] The user inputs the URL of a software repository into the terminal interface. Specifically, for example, an input form is presented with a prompt such as, "Please enter the URL of this software repository. The system will automatically improve performance, fix vulnerabilities, and improve scalability." The repository URL specified by the user is obtained as input. This input URL is then sent to the server.
[0775] Step 2:
[0776] Based on the URL received from the user, the server uses the Git command to clone the specified software repository to a local directory. Specifically, it executes the git clone <repository URL> command to obtain the source code and related files in the repository. The repository URL is used as input, and the source code and related files cloned into the local directory are obtained as output. This source code and files will be used in subsequent processing.
[0777] Step 3:
[0778] The server inputs the cloned source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc. The source code is used as input for this analysis process, and improvement suggestions are obtained from the generative AI model as output. For example, suggestions may include eliminating unnecessary loops or updating vulnerable libraries.
[0779] Step 4:
[0780] The server automatically updates the source code based on the generated improvement suggestions. Specifically, it identifies the proposed updates and modifies the source code appropriately. This process uses the improvement suggestions from the generative AI model as input and obtains updated source code as output. For example, it runs a command or script to replace a specific library with the latest version.
[0781] Step 5:
[0782] The server runs automated tests on the updated source code. Test scripts run pre-configured unit and integration tests to ensure the new code works correctly. The updated source code is used as input and the test results are given as output. Tests are run using tools such as pytest, for example.
[0783] Step 6:
[0784] The server notifies the user of the test results and changes. The user is notified via email or message through the device interface. The server also uses an emotion engine to analyze the user's emotional state. The test results and changes are used as input, and the output is an adjusted notification based on the analysis results. For example, if the user is feeling anxious, a notification with a more detailed explanation or additional support information is provided.
[0785] Step 7:
[0786] The user receives a notification from the server and checks the proposed improvements. The notification from the server is used as input, and the output is the user's approval or a request for further adjustments. The user can check the notification and take appropriate action, such as clicking the approval button. This approval operation ensures that each step in the system proceeds smoothly.
[0787] (Application example 2)
[0788] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0789] With conventional software maintenance methods, tasks such as performance improvement, vulnerability fixes, and scalability improvements are complicated and time-consuming, placing a heavy burden on users. Furthermore, the approach often ignores users' feelings, increasing stress and anxiety associated with maintenance work. In particular, factory robot control software requires real-time updates and maintenance, and rapid and accurate responses are required, but current methods are inadequate.
[0790] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0791] In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement proposals for the source code using a generative AI model, means for updating the source code based on the generated improvement proposals, means for testing the updated source code, means for sharing the improvement results and update details with a user, means for recognizing user emotions using an emotion analysis engine, and means for adjusting notification content based on the user's emotional state. This not only automates software maintenance work, improves performance, fixes vulnerabilities, and improves scalability quickly and efficiently, but also enables responses that take user emotions into consideration.
[0792] A "software repository" is a digital storage for storing and managing software source code and related files.
[0793] "Source code" is the human-readable form of program code that describes how the program works.
[0794] A "generative AI model" is an algorithm that uses deep learning or machine learning to generate new data and suggestions for a specific task.
[0795] "Improvement proposals" means analyzing the quality, performance, vulnerabilities, etc. of the source code and proposing specific changes and correction methods.
[0796] An "emotion analysis engine" is a software component that analyzes a user's emotions and recognizes their state.
[0797] The "means for adjusting notification content based on the emotional state of the user" refers to a means having the function of adjusting the format and content of notifications and information provided to the user based on the user's emotions recognized by the emotion analysis engine.
[0798] "Means for testing updated source code" means the ability to run automated tests to verify that changes to the source code function correctly.
[0799] The system for implementing the present invention utilizes the following hardware and software to perform maintenance on the control software of a factory robot.
[0800] System Configuration
[0801] Hardware
[0802] 1. Server:
[0803] A server in a data center with a powerful processor and sufficient memory.
[0804] SSD storage is used, allowing for high-speed data access.
[0805] 2. Smartphones / Head-mounted displays / Robotic devices:
[0806] Devices used by factory operators.
[0807] It has a display to show necessary notifications and instructions.
[0808] software
[0809] 1. Flask (Web framework):
[0810] It runs on the server side and processes requests from client terminals.
[0811] 2. GitPython:
[0812] A library for cloning repositories.
[0813] 3. TensorFlow / Keras (implementation of generative AI models):
[0814] Analyzes source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability.
[0815] 4. Emotion-Analyzer (Emotion Analysis Engine):
[0816] Analyze the user's emotional state and generate optimal notification content.
[0817] 5. PyTest (Automated Testing):
[0818] An automated testing tool that checks the operation of updated source code.
[0819] Processing Details
[0820] 1. Clone the software repository
[0821] The server receives the URL of a software repository specified by the user and clones the repository into a local directory, thereby obtaining the source code and related files contained in the specified repository.
[0822] 2. Analysis using generative AI models
[0823] The server inputs the acquired source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals, including specific changes.
[0824] 3. Automatic source code updates
[0825] The server automatically updates the source code based on the generated improvement suggestions by applying the proposed changes to the source code.
[0826] 4. Automated Testing
[0827] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality.
[0828] 5. Sentiment Analysis and Notifications
[0829] The server uses an Emotion-Analyzer to recognize the user's emotional state and adjusts the notification content based on the user's emotional state. For example, if the user is feeling stressed, the notification content will be explained in a gentle manner and additional support information will be provided.
[0830] Specific examples
[0831] When a factory operator enters the repository URL of a factory robot's control software into the system, the server clones the repository and inputs the obtained source code into a generative AI model. The generative AI model then suggests eliminating unnecessary loops, updating vulnerable libraries, and abstracting interfaces. Based on these suggestions, the server updates the source code and runs automated tests. If the test is successful, the user is notified of the results. If the user expresses concerns, detailed explanations and links to additional support are also provided.
[0832] Prompt Sentence Examples
[0833] "The RoboGuard application automatically clones the factory robot's software repository and uses generative AI to improve code performance and fix vulnerabilities. The framework for detecting user sentiment and providing appropriate responses is as follows..."
[0834] This system will make software maintenance work more efficient, improve performance and security, and reduce user stress.
[0835] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0836] Step 1:
[0837] The server receives the URL of a software repository specified by the user. The user enters the repository URL of the factory robot control software into the system, and that information is sent to the server. The input is the repository URL, and the output is the process of retrieving that URL.
[0838] Step 2:
[0839] The server uses the GitPython library to clone the repository to a local directory based on the URL obtained, and then downloads the source code and related files in the repository. The input is the repository URL, and the output is the source code cloned to the local directory.
[0840] Step 3:
[0841] The server inputs the entire cloned source code into a generative AI model. The generative AI model uses TensorFlow / Keras to analyze the source code and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability. The input is the source code, and the output is the improvement suggestions.
[0842] Step 4:
[0843] The server automatically updates the source code based on the improvement suggestions generated by the generative AI model. It applies specific changes to the source code and creates a new version. The input is the improvement suggestions, and the output is the updated source code.
[0844] Step 5:
[0845] The server runs automated tests on the updated source code using PyTest to verify that the proposed improvements work correctly and do not adversely affect existing functionality. The input is the updated source code, and the output is the success or failure of the tests.
[0846] Step 6:
[0847] Before notifying the user of the automated test results, the server analyzes the user's emotions using Emotion-Analyzer. It recognizes the user's emotional state and adjusts the notification content based on the emotion. The input is the user's emotional data, and the output is the adjusted notification content.
[0848] Step 7:
[0849] The server then sends the notification content, adjusted through emotion analysis, to the user's device, such as a smartphone or head-mounted display. The notification includes the improvements and their explanations, as well as additional support information if necessary. The input is the adjusted notification content, and the output is the notification displayed on the device.
[0850] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0851] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0852] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.
[0853] [Fourth embodiment]
[0854] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[0855] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.
[0856] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0857] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.
[0858] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0859] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0860] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0861] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.
[0862] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0863] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0864] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0865] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0866] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[0867] The outline of the present invention is a system that uses generative AI to automate software maintenance, improving performance, fixing vulnerabilities, and improving scalability. Specific embodiments of the system are described below.
[0868] This system operates in the following steps: First, the server receives the URL of the software repository specified by the user. Based on this, the server clones the contents of the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository.
[0869] The server then reads the acquired source code and inputs it into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals. These proposals include specific changes to improve performance, fix vulnerabilities, and increase scalability.
[0870] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and corrects the source code. This update process is performed automatically, significantly reducing the user's workload.
[0871] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. If the automated tests are successful, the server notifies the user of the results and the changes.
[0872] Users receive a notification and review the proposed improvements. If necessary, they can approve the proposal or make further adjustments. This process effectively improves software performance, fixes vulnerabilities, and enhances scalability.
[0873] As a concrete example, consider a given repository for a web application. The server clones the repository and feeds the application's source code into a generative AI model. The model optimizes unnecessary loops, updates vulnerable libraries, and suggests interface abstractions. Based on these suggestions, the server updates the source code and runs automated tests. Successful tests are reported to the user, who can review and approve the suggestions. This process improves the performance, security, and scalability of the web application.
[0874] The processing flow will be explained below.
[0875] Step 1:
[0876] The server receives as input the URL of a software repository specified by the user, which includes the access privileges to the repository.
[0877] Step 2:
[0878] The server clones the software repository to a local directory using the specified repository URL. This operation downloads all source code and related files in the repository to your local environment.
[0879] Step 3:
[0880] The server reads the main source code file in the cloned repository, for example, opening the main executable file, main.py, and fetching its contents.
[0881] Step 4:
[0882] The server inputs the read source code into a generative AI model, which can handle a large number of tokens and is capable of analyzing large amounts of code.
[0883] Step 5:
[0884] The generative AI model analyzes input source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability, such as eliminating unnecessary loops, updating outdated libraries, and refactoring code.
[0885] Step 6:
[0886] The server automatically updates the source code based on the generated improvement suggestions, applying the proposed changes to the source code and replacing the original files with the new content.
[0887] Step 7:
[0888] The server runs automated tests on the updated source code, using test scripts to verify that all functions are working properly and that there are no side effects from performance improvements or vulnerability fixes.
[0889] Step 8:
[0890] The server will notify the user of the test results and specific improvements, including details of the improvements, changes, and test results, in a format that the user can review.
[0891] Step 9:
[0892] The user receives a notification and reviews the proposed improvements, and can accept the suggestions or make further adjustments as needed.
[0893] This series of processes automatically and efficiently improves software performance, fixes vulnerabilities, and improves scalability.
[0894] Example 1
[0895] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[0896] Traditional software maintenance work is often performed manually by developers, which is time-consuming and labor-intensive. Furthermore, the complexity of the work increases, especially in large-scale software projects, as bug fixes, performance improvements, vulnerability fixes, and scalability improvements are required. Furthermore, manual changes carry a high risk of introducing new errors and vulnerabilities, potentially reducing overall reliability. There is a need for a system that can solve these issues and perform software maintenance work efficiently and reliably.
[0897] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0898] In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement proposals for the source code using a generative AI model, means for updating the source code based on the generated improvement proposals, means for testing the updated source code, means for sharing the improvement results and update contents with a user, means for acquiring a URL of the software repository based on information input by a user, means for outputting a prompt statement to the generative AI model and receiving the result, and means for proposing performance improvements, vulnerability fixes, and scalability improvements for the source code. This enables software maintenance work to be performed efficiently and automatically, reducing the burden on developers and improving software quality.
[0899] A "software repository" is a database for managing and storing software source code and related resources.
[0900] A "means of acquisition" is a means of downloading the contents of a specific repository based on its URL and saving it in a local environment.
[0901] "Means of analysis" refers to means of inspecting the software source code and analyzing its structure, quality, and potential problems.
[0902] A "generative AI model" is a model that uses artificial intelligence technology to generate improvement suggestions from the analysis results of input source code.
[0903] "Means for generating improvement proposals" refers to the process of utilizing a generative AI model to generate specific proposals for improving source code performance, fixing vulnerabilities, and increasing scalability.
[0904] A "means for updating the source code" is a means for automatically applying modifications to the source code based on improvement suggestions provided by the generative AI model.
[0905] "Testing means" is the process of running automated tests to verify the accuracy and safety of the updated source code.
[0906] "Means for sharing improvement results and updated content with users" refers to means for notifying users of the updated state of the source code and test results and obtaining their confirmation.
[0907] A "prompt" is input text used to give instructions or ask questions to a generative AI model.
[0908] The present invention provides a system that uses a generative AI model to automate software maintenance, improving performance, fixing vulnerabilities, and enhancing scalability. This system includes a series of processes: acquiring and analyzing a software repository, generating improvement proposals using a generative AI model, updating source code based on the proposals, and conducting testing. A specific embodiment of the system is described below.
[0909] First, the server receives the URL of the software repository specified by the user. Based on this, the server clones the contents of the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository. For hardware, a general server (e.g., an EC2 instance on AWS) is used. For software, Git is used to clone the repository.
[0910] Next, the server reads the acquired source code and inputs it into the generative AI model. At this time, the acquired source code is converted into text format and formatted to fit the input format of the generative AI model. The generative AI model used is, for example, OpenAI's GPT-4. The following prompt sentence is input to this model:
[0911] "Generate improvement suggestions to improve the performance of this source code."
[0912] "Please suggest specific changes to fix the vulnerability."
[0913] The generative AI model analyzes the structure, quality, performance, and vulnerabilities of the source code and generates necessary improvement suggestions. These improvement suggestions include specific changes to improve performance, fix vulnerabilities, and improve scalability, such as optimizing unnecessary loops, updating vulnerable libraries, and abstracting interfaces.
[0914] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and fixes the source code. This update process is automated and is executed using Python scripts, etc.
[0915] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. Testing tools such as Jenkins or pytest are used to run the automated tests.
[0916] If the test is successful, the server notifies the user of the results and changes. Notifications are sent via Slack API, email servers, or other methods. The user receives the notification and checks the proposed improvements. If necessary, the user can approve the suggestions or make further adjustments. This series of processes effectively improves software performance, fixes vulnerabilities, and enhances scalability.
[0917] As a concrete example, consider a given repository for a web application. The server clones the repository and feeds the application's source code into a generative AI model. The model optimizes unnecessary loops, updates vulnerable libraries, and suggests interface abstractions. Based on these suggestions, the server updates the source code and runs automated tests. Successful tests are reported to the user, who can review and approve the suggestions. This process improves the performance, security, and scalability of the web application.
[0918] This invention realizes automation of software maintenance work, and can improve the quality of software while reducing the burden on developers.
[0919] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0920] Step 1:
[0921] The server receives the software repository URL from the user. As input, it receives the repository URL entered by the user in a web form. The specific operation is that the server retrieves the URL data submitted through the user interface. As output, it passes the retrieved repository URL to the next step.
[0922] Step 2:
[0923] The server clones the software repository to a local directory using the repository URL. As input, it uses the repository URL obtained in step 1. Specifically, the server runs a Git command (e.g., git clone <url>) to create a copy of the repository in your local directory. The output is the source code and related files stored in your local directory.
[0924] Step 3:
[0925] The server reads the cloned source code and formats it into the input format for the generative AI model. The cloned source code file is used as input. Specifically, it converts the file into text format and formats it into a format suitable for the generative AI model (e.g., JSON format). The output is a data format for input into the generative AI model.
[0926] Step 4:
[0927] The server inputs the prompt sentence into the generative AI model and performs the analysis. As input, it uses the source code formatted in step 3 and the prompt sentence. Specifically, it inputs the following prompt sentence into the generative AI model:
[0928] "Generate improvement suggestions to improve the performance of this source code."
[0929] "Please suggest specific changes to fix the vulnerability."
[0930] As an output, the generative AI model provides improvement suggestions.
[0931] Step 5:
[0932] The server updates the source code based on the suggestions of the generative AI model. The input is the original source code and the improvement suggestions obtained from the generative AI model. The specific operation is to automatically change and correct the source code according to the suggestions. This operation is performed using a Python script, etc. The output is the updated source code.
[0933] Step 6:
[0934] The server runs automated tests against the updated source code. The updated source code is used as input. Specifically, it runs various tests (unit tests, integration tests, etc.) using testing tools such as Jenkins or pytest. The output is the test results (success / failure status and detailed logs).
[0935] Step 7:
[0936] The server notifies the user of the test results and changes. As input, it uses the test results and changes data. The specific operation is to use the Slack API or a mail server to send a message notifying the user of the results. As output, the user receives a notification and checks the results.
[0937] Step 8:
[0938] The user receives a notification and reviews the proposal. The input is the notification sent by the server. The specific behavior is that the user receives the notification, clicks the link, reviews the changes in a web browser, and approves or adjusts them as needed. The output is feedback of the user's review and approval.
[0939] In this way, through a series of operations between the server, the generative AI model, and the user, software maintenance tasks are efficiently automated and software quality is improved.
[0940] (Application example 1)
[0941] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[0942] In modern factories, software maintenance for machine control systems is a major issue. Traditional manual maintenance work requires time and effort, and also carries the risk of human error. Furthermore, updating and improving machine control software requires knowledge of the latest technologies and security, and is often dependent on specific engineers. To solve these problems, there is a need for a system that automates software maintenance and efficiently improves performance, fixes vulnerabilities, and increases scalability.
[0943] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0944] In this invention, the server includes a means for acquiring a software repository, a means for analyzing source code in the acquired software repository, a means for generating improvement proposals for the source code using a generative AI model, a means for updating the source code based on the generated improvement proposals, a means for testing the updated source code, and a means for notifying the improvement results and update contents to a shared display device. This automates software maintenance for machine control systems in factories, enabling efficient performance improvements, vulnerability repairs, and scalability improvements. Furthermore, by using smart devices, workers can easily grasp the status of maintenance work and respond quickly.
[0945] "Software Repository" means a location and system for storing and managing software source code, associated documentation, and other files related to software development.
[0946] "Source code" is a human-readable text file that describes how software or a program works.
[0947] "Generative AI models" are artificial intelligence (AI) algorithms and systems that learn from large amounts of data and generate solutions to specific tasks or problems.
[0948] "Improvement suggestions" are specific proposed changes for improving performance, fixing vulnerabilities, and increasing scalability that the generative AI model provides based on an analysis of the source code.
[0949] A "shared display device" is a device that visually displays improvement results and updates, allowing users to review and approve them. Examples include smart glasses.
[0950] A "smart device" is a portable electronic device with Internet connectivity and the ability to run various applications, allowing users to obtain and operate information. Examples include smart glasses and smartphones.
[0951] A "machine control system" is hardware and software used to manage and control the operation of various machines and equipment in factories and industrial sites.
[0952] "Automated testing" is the process of automatically verifying whether a program or software function works correctly based on predefined test cases.
[0953] This invention relates to a system that automates software maintenance for machine control systems in factories, improving performance, fixing vulnerabilities, and improving scalability. The system for realizing this application example is described in detail below.
[0954] System Program
[0955] To automate software maintenance for machine control systems in factories, servers, smart devices (e.g., smart glasses and smartphones), generative AI models, and automated testing frameworks are used. The system works as follows:
[0956] Hardware and Software Configuration
[0957] Server: Clone software repositories, analyze source code, generate improvement suggestions, update source code, run automated tests, and notify results.
[0958] Smart devices: Act as display devices that allow users on the factory floor to easily check results and take any necessary approvals or actions. Examples include Microsoft HoloLens and smartphones.
[0959] Generative AI models: Learn from large amounts of data and generate specific improvement suggestions for improving source code performance, fixing vulnerabilities, and increasing scalability. AI models such as OpenAI GPT-3 are used.
[0960] Automated testing framework: Automatically runs functional tests against updated source code, using Pytest or similar.
[0961] Natural language explanation of the process
[0962] 1. Clone the repository
[0963] The server receives the URL of the software repository specified by the user, clones the repository contents to a local directory, and uses Git to retrieve the source code and related files from the remote repository.
[0964] 2. Source code analysis
[0965] The server reads the acquired source code and inputs its contents into a generative AI model. The generative AI model analyzes the structure, quality, performance, and vulnerabilities of the source code and generates necessary improvement proposals. Specifically, models such as OpenAI GPT-3 are used. An example of a prompt is, "Analyze the source code of the following robot arm control software and generate specific improvement proposals for improving performance, fixing vulnerabilities, and increasing scalability. Please include specific code changes in your proposals."
[0966] 3. Application of improvement proposals
[0967] The server updates the source code based on the generated improvement suggestions, and automatically applies the specific changes suggested to fix the source code.
[0968] 4. Running automated tests
[0969] Automated tests are run against the updated source code, and functionality is verified using a test framework such as Pytest to generate test results.
[0970] 5. Notification of Results
[0971] The server notifies the smart device of the automated test results and updates, and the user can check the results through smart glasses or a smartphone and take any necessary approvals or actions.
[0972] Specific examples
[0973] When a factory needs to update the control software for a robot arm, the following steps are taken:
[0974] 1. A factory technician puts on smart glasses and provides the software repository URL to the server.
[0975] 2. The server clones the repository and runs the generative AI model to analyze the source code.
[0976] 3. The generative AI model generates improvement suggestions using the prompt, "Analyze the source code of the following robot arm control software and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability. Please also include specific code changes in your suggestions."
[0977] 4. The server applies the proposed changes to the source code and runs the automated tests.
[0978] 5. A technician reviews the test results through smart glasses and approves or takes additional action as needed.
[0979] The above process efficiently automates software maintenance for machine control systems within a factory.
[0980] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0981] Step 1:
[0982] The server receives a software repository URL from the user. The input is the repository URL, and based on this URL, the server uses Git to clone the repository into a local directory. The output is the source code and associated files stored in the local directory.
[0983] Step 2:
[0984] The server reads the cloned source code and inputs the contents into the generative AI model. The input is the source code stored in a local directory, and the output is a data format containing a prompt for the generative AI model to analyze. In a specific example, the server sends the prompt to the generative AI model: "Analyze the source code of the following robot arm control software and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability. Please include specific code changes in your suggestions."
[0985] Step 3:
[0986] The generative AI model analyzes the source code based on the prompt and source code and generates improvement suggestions. The input is the prompt and source code, and the output is data containing specific improvement suggestions. The generative AI model performs a detailed analysis of the performance and security of the source code and indicates the necessary changes.
[0987] Step 4:
[0988] The server updates the source code based on the improvement suggestions obtained from the generative AI model. The input is the improvement suggestions and the original source code, and the output is the updated source code. The server automatically applies the specific suggested changes and updates each part of the code.
[0989] Step 5:
[0990] The server runs automated tests against the updated source code. The input is the updated source code and the output is the test results. The server uses a test framework such as Pytest to run test cases to verify that the code works correctly.
[0991] Step 6:
[0992] The server notifies the user of the automated test results and updates. The input is the test results and update data, and the output is a notification sent to the smart device. The user can check the results through smart glasses or a smartphone and take any necessary approvals or actions.
[0993] Step 7:
[0994] Users receive notifications on their smart devices and check the improvement results and update details. The input is the notification sent from the server, and the output is the user's confirmation or approval action. The user evaluates the software status based on the notified information and decides on additional actions if necessary.
[0995] The above steps efficiently automate software maintenance for machine control systems within factories, improving performance, fixing vulnerabilities, and improving scalability.
[0996] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0997] The outline of the present invention is a system that uses generative AI and an emotion engine to automate software maintenance, improve performance, fix vulnerabilities, and improve scalability, while also recognizing user emotions and taking appropriate action. Specific embodiments of this system are described below.
[0998] In this system, the server first receives the URL of a software repository specified by the user and clones the repository to a local directory. This procedure obtains the source code and related files contained in the specified repository.
[0999] The server then inputs the acquired source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals. These improvement proposals include specific changes to improve performance, fix vulnerabilities, and increase scalability.
[1000] The server updates the source code based on the generated improvement suggestions. Specifically, it applies the proposed changes and fixes the source code. The update process is performed automatically, significantly reducing the user's workload.
[1001] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality. If the automated tests are successful, the server notifies the user of the results and the changes.
[1002] Furthermore, this system incorporates an emotion engine that recognizes the user's emotions. The server uses the emotion engine to recognize the content of improvement suggestions and the user's emotional state when notifying them, and adjusts the response accordingly. For example, if the user is feeling stressed, the system will gently explain the notification content or provide additional support information.
[1003] The user receives a notification and reviews the proposed improvements. If necessary, the user can approve the proposal or make further adjustments. The emotion engine takes the user's emotions into consideration, resulting in smoother communication and a more effective improvement process.
[1004] As a concrete example, consider a given web application repository. The server clones the repository and inputs the application's source code into a generative AI model. The model then suggests eliminating unnecessary loops, updating vulnerable libraries, and abstracting interfaces. Based on these suggestions, the server updates the source code and runs automated tests. If the tests are successful, the server notifies the user along with the results of the emotion engine's analysis. For example, if the user is concerned, a detailed explanation and links to additional support are provided.
[1005] This process improves software performance, security, and scalability, and enables it to respond with consideration for user emotions.
[1006] The processing flow will be explained below.
[1007] Step 1:
[1008] The server receives as input the URL of a software repository specified by the user, which includes the access permissions to the repository, for example, a GitHub or GitLab repository URL.
[1009] Step 2:
[1010] The server clones the software repository to a local directory using the specified repository URL. This operation downloads all source code and related files in the repository to your local environment.
[1011] Step 3:
[1012] The server reads the main source code file (e.g., main.py) in the cloned repository, which involves opening the file and reading the source code.
[1013] Step 4:
[1014] The server inputs the acquired source code into a generative AI model, which analyzes the source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability.
[1015] Step 5:
[1016] The generative AI model analyzes the input source code and automatically generates improvement suggestions, including specific code changes (e.g., optimizing unnecessary loops, updating outdated libraries, refactoring interfaces, etc.).
[1017] Step 6:
[1018] The server automatically updates the source code based on the generated improvement suggestions, applies the proposed changes to the source code, and replaces the original files with the new content.
[1019] Step 7:
[1020] The server runs automated tests on the updated source code, using automated test scripts to ensure all functionality is working properly and to check for side effects from performance improvements and vulnerability fixes.
[1021] Step 8:
[1022] The server analyzes the user's current emotional state using an emotion engine that recognizes the user's emotions and infers the emotional state based on the user's inputs and behavioral patterns.
[1023] Step 9:
[1024] The server adjusts the content and presentation of the improvement suggestions based on the user's emotions recognized by the emotion engine. For example, if the emotion engine determines that the user is feeling stressed, it will gently explain the notification content or provide additional support information.
[1025] Step 10:
[1026] The server notifies the user of the test results and specific improvements, including details of the improvements, changes, test results, and additional supporting information based on the emotion engine's analysis.
[1027] Step 11:
[1028] Users are notified and can review the proposed improvements. They can approve or make further adjustments as needed. Additionally, users can use the additional supporting information provided to better understand and accept the changes.
[1029] This series of processes improves the performance, security, and scalability of the software, and also realizes a response that takes into consideration the feelings of users. Providing appropriate and friendly support to users increases the acceptance of improvement suggestions.
[1030] Example 2
[1031] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1032] Conventional software maintenance systems make it difficult to efficiently improve performance, fix vulnerabilities, and improve scalability, placing a heavy burden on users. Furthermore, test results and improvement notifications for software changes are not properly communicated to users, which can cause anxiety and stress. This has led to challenges in improving the efficiency of software maintenance and the user experience.
[1033] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement suggestions for the source code using a generative AI model, means for updating the source code based on the generated improvement suggestions, means for testing the updated source code, means for sharing the improvement results and update details with the user, and means for recognizing the user's emotions and adjusting notification content based on the emotions. This effectively realizes automation of software maintenance, performance improvement, vulnerability correction, and improved scalability, and enables an improved user experience through notifications that take the user's emotions into consideration.
[1034] The "means for obtaining a software repository" is a function by which a server downloads a software repository from a specific URL on the Internet to a local directory.
[1035] "Means for analyzing source code" refers to a function for analyzing acquired source code and evaluating its internal structure, quality, performance, and vulnerabilities.
[1036] "Means for generating source code improvement proposals using a generative AI model" refers to a function that uses a generative AI model to automatically create specific proposed changes to improve the quality and performance of source code.
[1037] "Means for updating source code based on generated improvement suggestions" refers to a function that automatically applies the improvements suggested by the generative AI model to the source code, correcting and updating the code.
[1038] "Means for testing the updated source code" refers to the ability to run automated tests to confirm that the updated source code functions correctly.
[1039] "Means for sharing improvement results and updated content with users" refers to a function for notifying and reporting the improvement results and updated content of source code to users.
[1040] "Means for recognizing the user's emotions and adjusting the notification content based on those emotions" is a function that analyzes the user's emotional state and adjusts the notification content to be more appropriate and easy to understand if the user is feeling stressed or anxious.
[1041] The present invention is a system that automates the process from acquiring software repositories to improving source code, testing, and notifying users, and further adjusts the notification content according to the user's emotional state. This system is implemented as follows.
[1042] First, the server receives the URL of the software repository specified by the user. The user enters the URL into the terminal interface and sends the information to the server. An example of a prompt at this time is "Please enter the URL of this software repository. The system will automatically improve performance, fix vulnerabilities, and improve scalability."
[1043] Next, the server uses the Git command git clone <repository URL> to clone the specified repository to a local directory, obtaining the source code and related files in the repository.
[1044] The server then inputs the acquired source code into a generative AI model. The generative AI model is built using machine learning libraries such as Python and TensorFlow to analyze the source code's structure, quality, performance, vulnerabilities, etc. Based on this analysis, specific improvement proposals are generated for improving performance, fixing vulnerabilities, and increasing scalability.
[1045] The server then automatically updates the source code based on the generated improvement suggestions, such as eliminating unnecessary loops, updating vulnerable libraries, abstracting interfaces, etc. These changes are implemented automatically by scripts, significantly reducing the user's effort.
[1046] After the source code is updated, the server runs automated tests using pre-configured unit and integration tests to ensure the updated source code functions correctly, for example, using a testing framework such as pytest.
[1047] If the test is successful, the server notifies the user of the results and changes. Notifications are sent via email or messages through the device interface. The emotion engine then analyzes the user's emotional state when the notification is sent. For example, if the user is feeling stressed, the server will gently explain the notification and provide additional support information.
[1048] As a concrete example, let's consider a web application repository. The server first clones the repository and inputs the source code into a generative AI model. The generative AI model suggests ways to eliminate unnecessary loops, update vulnerable libraries, and abstract interfaces. The server updates the source code based on these suggestions and runs automated tests. If the tests are successful, a notification containing a detailed explanation and links to additional support is sent to the user based on the analysis results of the emotion engine.
[1049] In this way, this system automates source code updates and testing, and provides notifications that take user emotions into consideration, thereby improving the efficiency of software maintenance and the user experience.
[1050] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1051] Step 1:
[1052] The user inputs the URL of a software repository into the terminal interface. Specifically, for example, an input form is presented with a prompt such as, "Please enter the URL of this software repository. The system will automatically improve performance, fix vulnerabilities, and improve scalability." The repository URL specified by the user is obtained as input. This input URL is then sent to the server.
[1053] Step 2:
[1054] Based on the URL received from the user, the server uses the Git command to clone the specified software repository to a local directory. Specifically, it executes the git clone <repository URL> command to obtain the source code and related files in the repository. The repository URL is used as input, and the source code and related files cloned into the local directory are obtained as output. This source code and files will be used in subsequent processing.
[1055] Step 3:
[1056] The server inputs the cloned source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc. The source code is used as input for this analysis process, and improvement suggestions are obtained from the generative AI model as output. For example, suggestions may include eliminating unnecessary loops or updating vulnerable libraries.
[1057] Step 4:
[1058] The server automatically updates the source code based on the generated improvement suggestions. Specifically, it identifies the proposed updates and modifies the source code appropriately. This process uses the improvement suggestions from the generative AI model as input and obtains updated source code as output. For example, it runs a command or script to replace a specific library with the latest version.
[1059] Step 5:
[1060] The server runs automated tests on the updated source code. Test scripts run pre-configured unit and integration tests to ensure the new code works correctly. The updated source code is used as input and the test results are given as output. Tests are run using tools such as pytest, for example.
[1061] Step 6:
[1062] The server notifies the user of the test results and changes. The user is notified via email or message through the device interface. The server also uses an emotion engine to analyze the user's emotional state. The test results and changes are used as input, and the output is an adjusted notification based on the analysis results. For example, if the user is feeling anxious, a notification with a more detailed explanation or additional support information is provided.
[1063] Step 7:
[1064] The user receives a notification from the server and checks the proposed improvements. The notification from the server is used as input, and the output is the user's approval or a request for further adjustments. The user can check the notification and take appropriate action, such as clicking the approval button. This approval operation ensures that each step in the system proceeds smoothly.
[1065] (Application example 2)
[1066] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1067] With conventional software maintenance methods, tasks such as performance improvement, vulnerability fixes, and scalability improvements are complicated and time-consuming, placing a heavy burden on users. Furthermore, the approach often ignores users' feelings, increasing stress and anxiety associated with maintenance work. In particular, factory robot control software requires real-time updates and maintenance, and rapid and accurate responses are required, but current methods are inadequate.
[1068] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1069] In this invention, the server includes means for acquiring a software repository, means for analyzing source code in the acquired software repository, means for generating improvement proposals for the source code using a generative AI model, means for updating the source code based on the generated improvement proposals, means for testing the updated source code, means for sharing the improvement results and update details with a user, means for recognizing user emotions using an emotion analysis engine, and means for adjusting notification content based on the user's emotional state. This not only automates software maintenance work, improves performance, fixes vulnerabilities, and improves scalability quickly and efficiently, but also enables responses that take user emotions into consideration.
[1070] A "software repository" is a digital storage for storing and managing software source code and related files.
[1071] "Source code" is the human-readable form of program code that describes how the program works.
[1072] A "generative AI model" is an algorithm that uses deep learning or machine learning to generate new data and suggestions for a specific task.
[1073] "Improvement proposals" means analyzing the quality, performance, vulnerabilities, etc. of the source code and proposing specific changes and correction methods.
[1074] An "emotion analysis engine" is a software component that analyzes a user's emotions and recognizes their state.
[1075] The "means for adjusting notification content based on the emotional state of the user" refers to a means having the function of adjusting the format and content of notifications and information provided to the user based on the user's emotions recognized by the emotion analysis engine.
[1076] "Means for testing updated source code" means the ability to run automated tests to verify that changes to the source code function correctly.
[1077] The system for implementing the present invention utilizes the following hardware and software to perform maintenance on the control software of a factory robot.
[1078] System Configuration
[1079] Hardware
[1080] 1. Server:
[1081] A server in a data center with a powerful processor and sufficient memory.
[1082] SSD storage is used, allowing for high-speed data access.
[1083] 2. Smartphones / Head-mounted displays / Robotic devices:
[1084] Devices used by factory operators.
[1085] It has a display to show necessary notifications and instructions.
[1086] software
[1087] 1. Flask (Web framework):
[1088] It runs on the server side and processes requests from client terminals.
[1089] 2. GitPython:
[1090] A library for cloning repositories.
[1091] 3. TensorFlow / Keras (implementation of generative AI models):
[1092] Analyzes source code and generates improvement suggestions for improving performance, fixing vulnerabilities, and increasing scalability.
[1093] 4. Emotion-Analyzer (Emotion Analysis Engine):
[1094] Analyze the user's emotional state and generate optimal notification content.
[1095] 5. PyTest (Automated Testing):
[1096] An automated testing tool that checks the operation of updated source code.
[1097] Processing Details
[1098] 1. Clone the software repository
[1099] The server receives the URL of a software repository specified by the user and clones the repository into a local directory, thereby obtaining the source code and related files contained in the specified repository.
[1100] 2. Analysis using generative AI models
[1101] The server inputs the acquired source code into a generative AI model, which analyzes the source code's structure, quality, performance, vulnerabilities, etc., and generates necessary improvement proposals, including specific changes.
[1102] 3. Automatic source code updates
[1103] The server automatically updates the source code based on the generated improvement suggestions by applying the proposed changes to the source code.
[1104] 4. Automated Testing
[1105] After the update is complete, the server runs automated tests on the updated source code to ensure that the proposed improvements work properly and do not adversely affect existing functionality.
[1106] 5. Sentiment Analysis and Notifications
[1107] The server uses an Emotion-Analyzer to recognize the user's emotional state and adjusts the notification content based on the user's emotional state. For example, if the user is feeling stressed, the notification content will be explained in a gentle manner and additional support information will be provided.
[1108] Specific examples
[1109] When a factory operator enters the repository URL of a factory robot's control software into the system, the server clones the repository and inputs the obtained source code into a generative AI model. The generative AI model then suggests eliminating unnecessary loops, updating vulnerable libraries, and abstracting interfaces. Based on these suggestions, the server updates the source code and runs automated tests. If the test is successful, the user is notified of the results. If the user expresses concerns, detailed explanations and links to additional support are also provided.
[1110] Prompt Sentence Examples
[1111] "The RoboGuard application automatically clones the factory robot's software repository and uses generative AI to improve code performance and fix vulnerabilities. The framework for detecting user sentiment and providing appropriate responses is as follows..."
[1112] This system will make software maintenance work more efficient, improve performance and security, and reduce user stress.
[1113] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1114] Step 1:
[1115] The server receives the URL of a software repository specified by the user. The user enters the repository URL of the factory robot control software into the system, and that information is sent to the server. The input is the repository URL, and the output is the process of retrieving that URL.
[1116] Step 2:
[1117] The server uses the GitPython library to clone the repository to a local directory based on the URL obtained, and then downloads the source code and related files in the repository. The input is the repository URL, and the output is the source code cloned to the local directory.
[1118] Step 3:
[1119] The server inputs the entire cloned source code into a generative AI model. The generative AI model uses TensorFlow / Keras to analyze the source code and generate specific improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability. The input is the source code, and the output is the improvement suggestions.
[1120] Step 4:
[1121] The server automatically updates the source code based on the improvement suggestions generated by the generative AI model. It applies specific changes to the source code and creates a new version. The input is the improvement suggestions, and the output is the updated source code.
[1122] Step 5:
[1123] The server runs automated tests on the updated source code using PyTest to verify that the proposed improvements work correctly and do not adversely affect existing functionality. The input is the updated source code, and the output is the success or failure of the tests.
[1124] Step 6:
[1125] Before notifying the user of the automated test results, the server analyzes the user's emotions using Emotion-Analyzer. It recognizes the user's emotional state and adjusts the notification content based on the emotion. The input is the user's emotional data, and the output is the adjusted notification content.
[1126] Step 7:
[1127] The server then sends the notification content, adjusted through emotion analysis, to the user's device, such as a smartphone or head-mounted display. The notification includes the improvements and their explanations, as well as additional support information if necessary. The input is the adjusted notification content, and the output is the notification displayed on the device.
[1128] The specific processing unit 290 transmits the result of the specific processing to the robot 414. In the robot 414, the control unit 46A causes the speaker 240 and the control target 443 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input regarding the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.
[1129] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1130] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the robot 414.
[1131] The emotion identification model 59 as an emotion engine may determine the user's emotion according to a specific mapping. Specifically, the emotion identification model 59 may determine the user's emotion according to an emotion map (see FIG. 9), which is a specific mapping. Similarly, the emotion identification model 59 may determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.
[1132] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.
[1133] These emotions are distributed in the 3 o'clock direction on emotion map 400, and typically fluctuate between relief and anxiety. In the right half of emotion map 400, situational awareness dominates over internal sensations, resulting in a sense of calm.
[1134] The inside of emotion map 400 represents what is going on in the mind, and the outside of emotion map 400 represents behavior, so the further you go outside emotion map 400, the more visible the emotions become (the more they are expressed in behavior).
[1135] Human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. Emotions can also be created for robots, automobiles, and motorcycles, based on various balances, such as posture and remaining battery life. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. An emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on Voice Emotion Recognition and Emotional Brain Physiological Signal Analysis Systems, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map lists emotions belonging to the "reaction" domain, where sensation is dominant. The right half of the emotion map lists emotions belonging to the "situation" domain, where situational awareness is dominant.
[1136] The emotion map defines two emotions that promote learning. One is a negative emotion on the situation side, around the middle of "repentance" or "reflection." In other words, this occurs when the robot experiences negative emotions such as "I never want to feel this way again" or "I don't want to be scolded again." The other is a positive emotion on the response side, around "desire." In other words, this occurs when the robot experiences positive feelings such as "I want more" or "I want to know more."
[1137] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values indicating each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple pieces of training data that are combinations of user input and emotion values indicating each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions that are located close to each other have similar values, as in the emotion map 900 shown in FIG. 10. FIG. 10 shows an example in which multiple emotions, "relieved," "calm," and "reassuring," have similar emotion values.
[1138] The system according to the present disclosure has been described above mainly with respect to the functions of the data processing device 12, but the system according to the present disclosure is not necessarily implemented on a server. The system according to the present disclosure may be implemented as a general information processing system. The present disclosure may be implemented, for example, as a software program running on a personal computer or an application running on a smartphone, etc. The method according to the present disclosure may be provided to users in the form of SaaS (Software as a Service).
[1139] In the above embodiment, an example was given in which the specific processing is performed by one computer 22, but the technology of the present disclosure is not limited to this, and the specific processing may be distributed and performed by a plurality of computers including the computer 22. For example, the data generation model 58 may be provided in an external device of the data processing device 12, and data may be generated in the external device in accordance with input data.
[1140] In the above embodiment, an example in which the specific processing program 56 is stored in the storage 32 has been described, but the technology of the present disclosure is not limited to this. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-transitory storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-transitory storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes the specific processing in accordance with the specific processing program 56.
[1141] Alternatively, the specific processing program 56 may be stored in a storage device such as a server connected to the data processing device 12 via the network 54, and the specific processing program 56 may be downloaded and installed on the computer 22 in response to a request from the data processing device 12.
[1142] It is not necessary to store all of the specific processing program 56 in a storage device such as a server connected to the data processing device 12 via the network 54, or to store all of the specific processing program 56 in the storage 32; only a portion of the specific processing program 56 may be stored.
[1143] The hardware resource for executing a specific process can be any of the following processors: An example of a processor is a CPU, which is a general-purpose processor that functions as a hardware resource for executing a specific process by executing software, i.e., a program. Another example of a processor is a dedicated electrical circuit, such as an FPGA (Field-Programmable Gate Array), a PLD (Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit), which is a processor with a circuit configuration designed specifically for executing a specific process. Each processor has built-in or connected memory, and each processor uses the memory to execute the specific process.
[1144] The hardware resource that executes the specific processing may be configured with one of these various processors, or may be configured with a combination of two or more processors of the same or different types (for example, a combination of multiple FPGAs, or a combination of a CPU and an FPGA). Also, the hardware resource that executes the specific processing may be a single processor.
[1145] As an example of a system configured with a single processor, first, one processor is configured by combining one or more CPUs and software, and this processor functions as a hardware resource that executes a specific process. Second, there is a system that uses a processor that realizes the functions of an entire system including multiple hardware resources that execute a specific process on a single IC chip, as typified by SoC (System-on-a-chip). In this way, a specific process is realized using one or more of the above-mentioned various processors as hardware resources.
[1146] Furthermore, the hardware structure of these various processors can be, more specifically, an electric circuit that combines circuit elements such as semiconductor devices. The specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps may be deleted, new steps may be added, or the processing order may be rearranged, without departing from the spirit of the invention.
[1147] The above-described description and illustrations are a detailed explanation of the parts related to the technology of the present disclosure and are merely an example of the technology of the present disclosure. For example, the above description of the configuration, functions, actions, and effects is an explanation of an example of the configuration, functions, actions, and effects of the parts related to the technology of the present disclosure. Therefore, it goes without saying that unnecessary parts may be deleted, new elements may be added, or replacements may be made to the above-described description and illustrations within the scope of the gist of the technology of the present disclosure. Furthermore, to avoid confusion and facilitate understanding of the parts related to the technology of the present disclosure, the above-described description and illustrations omit explanations of common technical knowledge that do not require particular explanation to enable the implementation of the technology of the present disclosure.
[1148] All publications, patent applications, and technical standards mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent application, or technical standard was specifically and individually indicated to be incorporated by reference.
[1149] The following is further disclosed regarding the above embodiment.
[1150] (Claim 1)
[1151] a means for obtaining a software repository;
[1152] A means for analyzing source code in the acquired software repository;
[1153] A means for generating source code improvement suggestions using a generative AI model;
[1154] means for updating the source code based on the generated improvement suggestions;
[1155] A means of testing the updated source code;
[1156] A means to share improvements and updates with users; and
[1157] A system including:
[1158] (Claim 2)
[1159] 10. The system of claim 1, further comprising means for using the generative AI model to generate improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability without changing the behavior of the source code.
[1160] (Claim 3)
[1161] 10. The system of claim 1, further comprising means for automatically updating the software repository and for performing automated testing on the updates.
[1162] "Example 1"
[1163] (Claim 1)
[1164] a means for obtaining a software repository;
[1165] A means for analyzing source code in the acquired software repository;
[1166] A means for generating source code improvement suggestions using a generative AI model;
[1167] means for updating the source code based on the generated improvement suggestions;
[1168] A means of testing the updated source code;
[1169] A means to share improvements and updates with users; and
[1170] A means for obtaining a URL of a software repository based on input information from a user;
[1171] A means for outputting prompts to the generative AI model and receiving the results;
[1172] A means to propose performance improvements, vulnerability fixes, and scalability improvements to source code;
[1173] A system including:
[1174] (Claim 2)
[1175] 10. The system of claim 1, further comprising means for using the generative AI model to generate improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability without changing the behavior of the source code.
[1176] (Claim 3)
[1177] 10. The system of claim 1, further comprising means for automatically updating the software repository and for performing automated testing on the updates.
[1178] "Application Example 1"
[1179] (Claim 1)
[1180] a means for obtaining a software repository;
[1181] A means for analyzing source code in the acquired software repository;
[1182] A means for generating source code improvement suggestions using a generative AI model;
[1183] means for updating the source code based on the generated improvement suggestions;
[1184] A means of testing the updated source code;
[1185] means for notifying the shared display device of the improvement results and updates;
[1186] A system including:
[1187] (Claim 2)
[1188] 10. The system of claim 1, further comprising means for automatically maintaining and displaying updates to software for machine control systems in a factory using a smart device.
[1189] (Claim 3)
[1190] 10. The system of claim 1, further comprising means for using the generative AI model to generate improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability without changing the behavior of the source code.
[1191] "Example 2: Combining Emotion Engines"
[1192] (Claim 1)
[1193] a means for obtaining a software repository;
[1194] A means for analyzing source code in the acquired software repository;
[1195] A means for generating source code improvement suggestions using a generative AI model;
[1196] means for updating the source code based on the generated improvement suggestions;
[1197] A means of testing the updated source code;
[1198] A means to share improvements and updates with users; and
[1199] means for recognizing a user's emotion and adjusting notification content based on the emotion;
[1200] A system including:
[1201] (Claim 2)
[1202] 10. The system of claim 1, further comprising means for using the generative AI model to generate improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability without changing the behavior of the source code.
[1203] (Claim 3)
[1204] 10. The system of claim 1, further comprising means for automatically updating the software repository and for performing automated testing on the updates.
[1205] "Application example 2 when combining emotion engines"
[1206] (Claim 1)
[1207] a means for obtaining a software repository;
[1208] A means for analyzing source code in the acquired software repository;
[1209] A means for generating source code improvement suggestions using a generative AI model;
[1210] means for updating the source code based on the generated improvement suggestions;
[1211] A means of testing the updated source code;
[1212] A means to share improvements and updates with users; and
[1213] means for recognizing a user's emotion using an emotion analysis engine;
[1214] means for tailoring notification content based on the user's emotional state;
[1215] A system including:
[1216] (Claim 2)
[1217] 10. The system of claim 1, further comprising means for using the generative AI model to generate improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability without changing the behavior of the source code.
[1218] (Claim 3)
[1219] 10. The system of claim 1, further comprising means for automatically updating the software repository and for performing automated testing on the updates. [Explanation of symbols]
[1220] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url> < / url:> < / url> < / url:> < / url> < / url:> < / url>
Claims
1. a means for obtaining a software repository; A means for analyzing source code in the acquired software repository; A means for generating source code improvement suggestions using a generative AI model; means for updating the source code based on the generated improvement suggestions; A means of testing the updated source code; A means to share improvements and updates with users; and A system including:
2. The system of claim 1 , further comprising means for using the generative AI model to generate improvement suggestions for improving performance, fixing vulnerabilities, and improving scalability without changing the behavior of the source code.
3. 2. The system of claim 1, further comprising means for automatically updating the software repository and for performing automated testing on the updates.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A