system
The system automates code review by uploading code for AI analysis and user-friendly feedback, addressing inefficiencies in manual code review processes.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2026-03-16
AI Technical Summary
Code review in software development is time-consuming, labor-intensive, and quality varies based on individual reviewers, leading to potential stress, psychological burden, and decreased development efficiency.
A system that allows users to upload code from their terminal, where a server performs syntactic analysis and AI generates improvement suggestions, formatting the results for user modification, thereby enhancing efficiency and quality of code review.
Reduces the burden of human code review, significantly cutting time and costs while improving programmer productivity through efficient and high-quality code analysis.
Smart Images

Figure 2026047981000001_ABST
Abstract
Description
Technical Field
[0001] The technology of the present disclosure relates to a system.
Background Art
[0002] Patent Document 1 discloses a method for controlling a persona chatbot, which is performed by at least one processor, including steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to an explanation of a chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance as a response to the user utterance.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] Code review is very important in software development quality management, but it consumes a large amount of human resources, so there are problems of time and cost. Also, the quality of reviews varies depending on individual reviewers, and it may be difficult to maintain a certain quality. Furthermore, stress and psychological burden may occur when a person makes a comment, which may have an adverse effect on the development speed and efficiency. There is a need for a system that solves these problems and realizes efficient and high-quality code review.
Means for Solving the Problems
[0005] The present invention solves the above problems by the following means: It provides a means for the user to upload code from their terminal, and a means for the server to receive the uploaded code and perform syntactic analysis. Furthermore, it provides a means for artificial intelligence to analyze the code and generate improvement suggestions, and a means for the server to format the analysis results and send them to the user. By configuring the system so that the user can modify the code based on the suggestions, efficient and high-quality code review becomes possible. In addition, the accuracy of the analysis is improved by means for the server to collect syntax errors and warnings in the code using a syntactic analysis tool, and by means for the server to send the code to an artificial intelligence model and generate performance improvement suggestions.
[0006] A "user" is an individual or organization that uses the system to upload code and receive the results.
[0007] A "terminal" refers to the equipment or device that a user uses to upload code.
[0008] "Code" refers to instructions or scripts written in a programming language that enable software to perform its functions.
[0009] "Uploading" refers to the act of a user sending data or files from their device to a server.
[0010] A "server" is a computer system or network service that receives and analyzes uploaded code.
[0011] "Syntax analysis" is the process of analyzing the grammar and structure of code written in a programming language to detect errors and warnings.
[0012] "Artificial intelligence" refers to systems and models that learn from large amounts of data and perform code optimization and suggest improvements.
[0013] "Analysis results" refer to information and suggestions obtained from syntactic analysis and code analysis using artificial intelligence.
[0014] An "improvement suggestion" is a specific instruction for changes or modifications generated by artificial intelligence with the aim of improving the quality and performance of the code.
[0015] "Formatting" refers to the process of converting analysis results into a format that is easy for users to understand and present to them.
[0016] "Modifying code" refers to the act of a user changing the original code based on analysis results and improvement suggestions to enhance its quality and performance.
[0017] A "parsing tool" is software or a library used to perform parsing.
[0018] An "artificial intelligence model" is a mathematical / statistical model that learns based on a specific dataset and performs inference and prediction. [Brief explanation of the drawing]
[0019] [Figure 1] This is a conceptual diagram showing an example of the configuration of a data processing system according to the first embodiment. [Figure 2] This is a conceptual diagram showing an example of the essential functions of a data processing device and a smart device according to the first embodiment. [Figure 3] This is a conceptual diagram showing an example of the configuration of a data processing system according to the second embodiment. [Figure 4] This is a conceptual diagram showing an example of the main functions of a data processing device and smart glasses according to the second embodiment. [Figure 5] This is a conceptual diagram showing an example of the configuration of a data processing system according to the third embodiment. [Figure 6] This is a conceptual diagram showing an example of the main functions of a data processing device and a headset-type terminal according to the third embodiment. [Figure 7]It is a conceptual diagram showing an example of the configuration of a data processing system according to the fourth embodiment. [Figure 8] It is a conceptual diagram showing an example of the main functions of a data processing device and a robot according to the fourth embodiment. [Figure 9] It shows an emotion map to which a plurality of emotions are mapped. [Figure 10] It shows an emotion map to which a plurality of emotions are mapped. [Figure 11] It is a sequence diagram showing the processing flow of the data processing system in Example 1. [Figure 12] It is a sequence diagram showing the processing flow of the data processing system in Application Example 1. [Figure 13] It is a sequence diagram showing the processing flow of the data processing system in Example 2 when an emotion engine is combined. [Figure 14] It is a sequence diagram showing the processing flow of the data processing system in Application Example 2 when an emotion engine is combined.
Mode for Carrying Out the Invention
[0023] In the following embodiments, signed RAM (Random Access Memory) is a memory that temporarily stores information and is used as work memory by the processor.
[0024] In the following embodiments, the signed storage is one or more non-volatile storage devices that store various programs and various parameters. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), or magnetic tapes.
[0025] In the following embodiments, the signed communication interface (I / F) is an interface that includes a communication processor and an antenna, etc. The communication interface manages communication between multiple computers. Examples of communication standards applicable to the communication interface include wireless communication standards such as 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), or Bluetooth (registered trademark).
[0026] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." That is, "A and / or B" means that it may be A alone, or B alone, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" applies when expressing three or more things linked by "and / or."
[0027] [First Embodiment]
[0028] Figure 1 shows an example of the configuration of the data processing system 10 according to the first embodiment.
[0029] As shown in Figure 1, the 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.
[0030] The data processing device 12 comprises a computer 22, a database 24, and a communication interface 26. The computer 22 is an example of a "computer" related to the technology of this disclosure. The computer 22 comprises a processor 28, RAM 30, and storage 32. The processor 28, RAM 30, and storage 32 are connected to a bus 34. The database 24 and the communication interface 26 are also connected to the bus 34. The communication interface 26 is connected to a network 54. An example of the network 54 is a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0031] The smart device 14 comprises a computer 36, a reception device 38, an output device 40, a camera 42, and a communication interface 44. The computer 36 comprises a processor 46, RAM 48, and storage 50. The processor 46, RAM 48, and storage 50 are connected to a bus 52. The reception device 38, output device 40, and camera 42 are also connected to the bus 52.
[0032] The reception device 38 is equipped with a touch panel 38A and a microphone 38B, etc., and receives user input. The touch panel 38A receives user input by detecting contact with an object (e.g., a pen or finger). The microphone 38B receives user input by detecting the user's voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and 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.
[0033] 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 perceptible to the user 20 (e.g., audio and / or text). The display 40A displays visible information such as text and images according to instructions from the processor 46. The speaker 40B outputs audio according to instructions from the processor 46. The camera 42 is a small digital camera equipped with an optical system such as a lens, aperture, and shutter, and an image sensor such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.
[0034] Communication interface 44 is connected to network 54. Communication interfaces 44 and 26 are responsible for the exchange of various types of information between processor 46 and processor 28 via network 54.
[0035] Figure 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0036] As shown in Figure 2, in the data processing device 12, a specific processing 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" related to the technology of this 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 according to the specific processing program 56 executed on the RAM 30.
[0037] The storage 32 stores the data generation model 58 and the emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0038] In the smart device 14, the processor 46 performs the reception output processing. The storage 50 stores the reception output program 60. The reception output program 60 is used in conjunction with a 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 processing is realized by the processor 46 operating as a control unit 46A according to the reception output program 60 executed on the RAM 48.
[0039] Next, the specific processing performed by the specific processing unit 290 of the data processing device 12 will be described. In the following description, the data processing device 12 will be referred to as the "server" and the smart device 14 as the "terminal".
[0040] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. The following components and procedures are necessary to implement this invention.
[0041] Uploading code from user terminals
[0042] The user launches the "CodeReview Plus" application on their device and logs in. After logging in, the user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This sends the code file to the server.
[0043] Code reception and parsing on the server
[0044] The server receives the uploaded code file. After receiving it, the server checks the file format and verifies that it is a code file. If this verification is successful, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During the analysis process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0045] AI-powered code analysis and improvement suggestions
[0046] Next, the server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0047] Server formatting of results and transmission to the user
[0048] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's terminal.
[0049] User review and correction of results
[0050] The user receives a notification of the analysis results and checks them within the app. Based on the displayed improvement suggestions, the user modifies their code. For example, if it is pointed out that a variable name is meaningless, the user changes the variable name to something more understandable. Also, if optimization of the repetitive structure is suggested, the user refactors the code according to the suggested method.
[0051] ---
[0052] In this way, the present invention reduces the burden of human code review and enables efficient and high-quality code review. As a result, time and costs are significantly reduced, and programmer productivity is improved.
[0053] The following describes the processing flow.
[0054] Step 1:
[0055] The user launches the "CodeReview Plus" application on their device and logs in.
[0056] Step 2:
[0057] The user clicks the "Upload Code" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This action sends the code file to the server.
[0058] Step 3:
[0059] The server receives the uploaded code file. After receiving it, the server verifies whether the file format is correct.
[0060] Step 4:
[0061] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During this analysis, syntax errors and warnings are collected and temporarily stored in a database.
[0062] Step 5:
[0063] The server analyzes the overall structure and dependencies of the code. This prepares the data so that the AI can gain a deep understanding of the code.
[0064] Step 6:
[0065] The server sends the code to the artificial intelligence model. The pre-trained AI model analyzes the code from the perspectives of readability, performance, and security.
[0066] Step 7:
[0067] Artificial intelligence generates analysis results and improvement suggestions. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0068] Step 8:
[0069] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and instructions on how to make corrections.
[0070] Step 9:
[0071] The formatted results are sent to the user's device. The user receives a notification of the analysis results and checks them within the app.
[0072] Step 10:
[0073] The user modifies the code based on the analysis results. For example, this might involve changing variable names or fixing security vulnerabilities.
[0074] Step 11:
[0075] The user uploads the revised code again, and the same process is repeated for re-evaluation. This process can be repeated until the result is satisfactory.
[0076] The above outlines the specific process flow from when a user uses "CodeReview Plus" to analyze their code and receive improvement suggestions.
[0077] (Example 1)
[0078] Next, we will describe Example 1. In the following description, the data processing device 12 will be referred to as the "server," and the smart device 14 will be referred to as the "terminal."
[0079] In software development, code review is a crucial process for maintaining quality. However, manual code review is time-consuming and labor-intensive, and the accuracy of the review depends on the reviewer's skills. Furthermore, when dealing with a large volume of code, it is difficult to comprehensively review all of it. This increases the likelihood of bugs and security vulnerabilities being overlooked, potentially leading to a decline in software quality and development delays.
[0080] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 1 is realized by the following means.
[0081] In this invention, the server includes means for a user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for the server to send the code to a pre-trained generative AI model to generate analysis and improvement suggestions, means for the server to format the analysis results and send them to the user, and means for the user to modify the code based on the suggestions. This reduces the burden of human review and enables efficient and high-quality code review.
[0082] A "user terminal" refers to a computer device used by the user for operations such as uploading code or checking analysis results.
[0083] A "server" refers to a computer device that receives and analyzes uploaded code, and generates and sends improvement suggestions.
[0084] "Syntax analysis" refers to the process of analyzing the grammar of program code and detecting errors and warnings.
[0085] A "generative AI model" is a pre-trained artificial intelligence model used to analyze code and generate improvement suggestions.
[0086] "Improvement suggestions" refer to specific changes or modifications that would improve the readability, performance, and security of the code.
[0087] A "syntactic analysis tool" is software used to detect grammatical errors and warnings in code, and examples include Pylint and ESLint.
[0088] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. The following components and procedures are necessary to implement this invention.
[0089] Uploading code from user terminals
[0090] The user launches a dedicated application on their device and logs in. After logging in, they click the "Code Upload" button to display a file selection dialog. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This action sends the code file to the server.
[0091] Code reception and parsing on the server
[0092] The server receives the uploaded code file. After receiving it, the server checks the file format and verifies that the uploaded file is a code file. If this verification is successful, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During the analysis process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0093] AI-powered code analysis and improvement suggestions
[0094] Next, the server sends the code to a pre-trained generative AI model. The generative AI model analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0095] Server formatting of results and transmission to the user
[0096] The server receives the analysis results from the generated AI model and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's device.
[0097] User review and correction of results
[0098] The user receives a notification of the analysis results and checks them within the app. Based on the displayed improvement suggestions, the user modifies their code. For example, if it is pointed out that a variable name is meaningless, the user changes the variable name to something more understandable. Also, if optimization of the repetitive structure is suggested, the user refactors the code according to the suggested method.
[0099] Examples of specific cases and prompt statements
[0100] For example, suppose a user uploads a Python file named example.py. This file contains the following:
[0101] python
[0102] def example(a, b):
[0103] result = a + 1
[0104] return result
[0105] Let's assume that the generative AI model generates the following improvement suggestions for this code.
[0106] text
[0107] Line 1: It is recommended to change the function name 'example' to a name with a more concrete meaning.
[0108] Line 1: It is recommended that you change the parameters 'a' and 'b' to names that have specific meanings.
[0109] Line 2: Please consider improving the efficiency of the calculation method.
[0110] Based on these suggestions, the user will modify the code as follows:
[0111] python
[0112] def calculate_sum_and_multiply(addend, factor):
[0113] sum_result = addend + 1
[0114] return sum_result factor
[0115] The following is an example of a prompt message to input into the generative AI model.
[0116] text
[0117] Analyze user-uploaded Python code and generate suggestions for improvements to readability, performance, and security. Please analyze the following code:
[0118] The flow of the specific processing in Example 1 will be explained using Figure 11.
[0119] Step 1:
[0120] The user launches a dedicated application on their device and logs in.
[0121] Input: User authentication information (username, password)
[0122] Action: Enter your username and password on the login screen and click the "Login" button.
[0123] Output: Login success or failure notification
[0124] Step 2:
[0125] The user clicks the "Upload Code" button, which displays a file selection dialog.
[0126] Input: User click operation
[0127] Operation: A file system window appears, and the user selects the code file they want to analyze (e.g., example.py).
[0128] Output: Path to the selected code file
[0129] Step 3:
[0130] The user clicks the "Upload" button to send the selected code file to the server.
[0131] Input: User clicks and selected code file
[0132] Operation: The selected file is uploaded to the server using an HTTP POST request.
[0133] Output: Code file sent to the server
[0134] Step 4:
[0135] The server receives the uploaded code file.
[0136] Input: HTTP POST request and code file data
[0137] Operation: The server receives an HTTP request and saves the file data.
[0138] Output: Saved code file
[0139] Step 5:
[0140] The server checks the file format and verifies that it is a code file.
[0141] Input: Saved code file and its metadata
[0142] Operation: Checks the file extension and verifies whether it is in the correct format (e.g., .py, .js).
[0143] Output: Verification result (Pass or Fail)
[0144] Step 6:
[0145] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax.
[0146] Input: Code files that have passed verification
[0147] Operation: The server runs analysis tools and collects errors and warnings in the code.
[0148] Output: Analysis results (list of errors and warnings)
[0149] Step 7:
[0150] The server sends the code to a pre-trained generative AI model.
[0151] Input: Results of parsing and contents of the code file
[0152] Operation: The server sends code to the generated AI model via an API request, and the model parses the code.
[0153] Output: Analysis results and improvement suggestions from the generated AI model.
[0154] Step 8:
[0155] The server formats the analysis results from the generated AI model.
[0156] Input: Analysis results and improvement suggestions from the generated AI model.
[0157] Operation: The server converts the analysis results into JSON format and formats them into an easy-to-understand format, including specific line numbers and correction methods.
[0158] Output: Formatted analysis results
[0159] Step 9:
[0160] The server sends the formatted analysis results to the user's terminal.
[0161] Input: Formatted analysis results
[0162] Operation: The server sends the formatted result as an HTTP response to the user's application.
[0163] Output: Analysis results displayed in the application on the user's terminal.
[0164] Step 10:
[0165] Users receive notifications of analysis results within the app and can then review the results.
[0166] Input: Notification of analysis results
[0167] Operation: Users can view the analysis results through the application's notification function.
[0168] Output: Analysis results displayed to the user
[0169] Step 11:
[0170] The user modifies the code based on the displayed improvement suggestions.
[0171] Input: Improvement suggestions included in the analysis results
[0172] Operation: The user opens the editor and applies the suggested changes to the code. For example, they might rename variables or optimize loop structures.
[0173] Output: Modified code file
[0174] (Application Example 1)
[0175] Next, we will explain Application Example 1. In the following explanation, the data processing device 12 will be referred to as the "server," and the smart device 14 will be referred to as the "terminal."
[0176] In modern factory automation, ensuring the quality and security of control codes is extremely important. However, quickly and efficiently detecting and correcting errors and security vulnerabilities hidden in the control codes of factory automation machinery is not easy. Furthermore, manual code review is time-consuming and laborious, placing a heavy burden on programmers and engineers and potentially leading to decreased productivity. Therefore, efficiently improving the quality and security of control codes for factory automation machinery is a key challenge.
[0177] The specific processing performed by the specific processing unit 290 of the data processing device 12 in Application Example 1 is realized by the following means.
[0178] In this invention, the server includes means for a user to upload code from their information processing device, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, means for the server to format the analysis results and send them to the user, and means for the system to suggest security vulnerabilities and performance optimizations when receiving and analyzing control code for factory automation machines. This makes it possible to quickly and efficiently improve the quality and security of control code for factory automation machines.
[0179] A "user" is a person who uses the system to upload code and check the analysis results, or a person who operates an information processing device.
[0180] An "information processing device" is a device used by users to access a system and upload code, and includes personal computers and smartphones.
[0181] "Code" refers to a text file containing a program that controls the operation of automated factory machinery.
[0182] A "server" is a computing system that receives code uploaded by users, analyzes it, and generates improvement suggestions using artificial intelligence.
[0183] "Syntax analysis" is the process of deciphering the structure of code and detecting syntax errors and warnings.
[0184] "Artificial intelligence" is a technology that uses machine learning algorithms to analyze code and suggest improvements.
[0185] "Improvement suggestions" are recommendations for modifications generated by artificial intelligence to improve the quality and security of the code.
[0186] "Analysis results" refer to information about errors, warnings, and areas for improvement obtained after the server has performed syntactic analysis and artificial intelligence analysis.
[0187] "Factory automation machinery" refers to equipment equipped with control devices for performing tasks automatically within a factory, and includes industrial robots and production line machinery.
[0188] A "security hole" is a security vulnerability within control code that could potentially lead to unauthorized access or malfunctions.
[0189] "Performance optimization" refers to methods of modifying code to improve its operational efficiency, including increasing computation speed and reducing resource usage.
[0190] This invention is a system that improves the quality and security of control codes for factory automation machinery by allowing users to upload control codes from their own information processing devices, and a server to analyze those codes and provide improvement suggestions. Specific embodiments of this system are described below.
[0191] The user launches the "RobotCodeReview Plus" application using their own information processing device (PC or smartphone). After logging in within the application, the user clicks the "Code Upload" button, and a file selection dialog appears. Here, the user selects the control code file they want to analyze and clicks the "Upload" button. This sends the control code file to the server.
[0192] After receiving the uploaded code file, the server checks the file format and verifies that it is a control code file. If this verification is successful, the server uses a parsing tool (e.g., Pylint) to parse the code. During the parsing process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0193] Next, the server sends the code to a pre-trained artificial intelligence model (e.g., a custom PyTorch-based model). The AI model analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0194] The server then receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's information processing device, where the user receives a notification of the analysis results and can view them within the app.
[0195] For example, if a security vulnerability is found in the control code file "robot_code.py", the following improvement suggestions will be displayed:
[0196] "Hardcoded encryption key found. Use environment variables to store encryption keys."
[0197] As a concrete example, we will use the following prompt to analyze an artificial intelligence model:
[0198] "Analyze the following robot control code for any potential security vulnerabilities or optimization opportunities. Provide clear and actionable improvement suggestions.
[0199] Robot Code:
[0200] Code content here
[0201] In this way, by using this system, the burden of human code review can be reduced, and efficient and high-quality code reviews can be achieved. As a result, the quality and security of control code for factory automation machinery are improved, and productivity is increased.
[0202] The flow of a specific process in Application Example 1 will be explained using Figure 12.
[0203] Step 1:
[0204] The user uploads control codes from their own information processing device.
[0205] Input: Control code file (e.g., robot_code.py)
[0206] Output: Code file included in the HTTP request to the server
[0207] Specific operation: The user clicks the "Code Upload" button on the application, and a file selection dialog appears. The user selects the control code file they want to analyze and clicks the "Upload" button. This action sends the control code file to the server.
[0208] Step 2:
[0209] The server receives the uploaded code and performs syntax analysis.
[0210] Input: Control code file sent by the user
[0211] Output: Results of parsing (error list and warning list)
[0212] Specific operation: The server receives an HTTP POST request and retrieves a control code file. It checks the file format and verifies that it contains control codes. After this, the server uses a parsing tool (e.g., Pylint) to parse the code, collects any errors or warnings found, and temporarily stores them in a database.
[0213] Step 3:
[0214] The server sends code to the artificial intelligence model, which then generates improvement suggestions.
[0215] Input: Parsed control codes, and a list of errors and warnings.
[0216] Output: Improvement suggestions generated by artificial intelligence
[0217] Specific operation: The server sends code to a pre-trained artificial intelligence model (e.g., a custom PyTorch-based model). The AI model analyzes the code from the perspectives of readability, performance, and security. Based on the prompt, it performs the analysis and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0218] Step 4:
[0219] The server formats the analysis results and sends them to the user.
[0220] Input: Data for improvement suggestions generated by artificial intelligence.
[0221] Output: Formatted analysis results sent to the user
[0222] Specific operation: The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification methods. The formatted analysis results are then sent back to the user's information processing device.
[0223] Step 5:
[0224] The user modifies the code based on their suggestions.
[0225] Input: Analysis results and improvement suggestions received from the server.
[0226] Output: User-modified control code
[0227] Specific actions: The user receives a notification of the analysis results and checks the results within the application. Based on the displayed improvement suggestions, they modify their control code. For example, if a security vulnerability is identified, the user modifies their code to use environment variables to store the encryption key.
[0228] In this way, by utilizing this system, users can quickly and efficiently improve the quality and security of control codes for factory automation machinery.
[0229] Furthermore, an emotion engine that estimates the user's emotions may be incorporated. That is, the identification processing unit 290 may use the emotion identification model 59 to estimate the user's emotions and perform identification processing using the user's emotions.
[0230] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. Furthermore, by incorporating an emotion engine that recognizes the user's emotions, it is possible to provide optimal feedback that takes the user's emotional state into account. The following components and procedures are necessary to implement this invention.
[0231] Code upload from user devices and emotion recognition
[0232] The user launches the "CodeReview Plus" application on their device and logs in. After logging in, the user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and presses the "Upload" button. This sends the code file to the server. Simultaneously, the emotion engine analyzes the user's facial expressions and voice data to recognize their current emotional state.
[0233] Code reception and parsing on the server
[0234] The server receives the uploaded code file. After receiving it, the server verifies whether the file format is correct. Next, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During this analysis process, syntax errors and warnings are collected and temporarily stored in a database. The overall structure and dependencies of the code are also analyzed.
[0235] AI-powered code analysis and improvement suggestions
[0236] Next, the server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0237] Feedback that takes user sentiment data into account
[0238] In parallel, the server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed or anxious, the server adjusts the analysis results to explain them in a gentle way. Conversely, if the user is relaxed, it can provide detailed, technical feedback.
[0239] Server formatting of results and transmission to the user
[0240] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format, taking sentiment data into consideration. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's device.
[0241] User review and correction of results
[0242] Users receive notifications of analysis results and review them within the app. Based on the displayed improvement suggestions, users modify their code. Specific examples include changing variable names and fixing security vulnerabilities. They can also re-upload their code and repeat the same process as needed.
[0243] ---
[0244] In this way, the present invention reduces the burden of human code review and enables efficient and high-quality code review. Furthermore, by combining it with an emotion engine, it is possible to reduce the psychological burden on users and provide a more stress-free feedback environment. With the above configuration, it is expected that time and costs will be significantly reduced and programmer productivity will be improved.
[0245] The following describes the processing flow.
[0246] Step 1:
[0247] The user launches the "CodeReview Plus" application on their device and logs in. On the login screen, they enter their user ID and password and click the "Login" button.
[0248] Step 2:
[0249] The user clicks the "Upload Code" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button.
[0250] Step 3:
[0251] The device sends a code file to the server. Simultaneously, the device's built-in camera and microphone are used to analyze the user's facial expressions and voice using an emotion engine, generating emotion data.
[0252] Step 4:
[0253] The server receives the uploaded code file. First, it verifies whether the file format is correct. For example, it checks that the content is not empty and that it is written in the specified programming language.
[0254] Step 5:
[0255] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. Syntax errors and warnings found during this analysis are collected and temporarily stored in a database.
[0256] Step 6:
[0257] The server analyzes the overall structure and dependencies of the code. This deepens the understanding of the code and prepares data that makes AI analysis more effective.
[0258] Step 7:
[0259] The server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security.
[0260] Step 8:
[0261] Artificial intelligence generates analysis results and improvement suggestions. These suggestions include methods for refactoring code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0262] Step 9:
[0263] The server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed, it provides feedback in a gentle tone to avoid misunderstandings.
[0264] Step 10:
[0265] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format, taking sentiment data into consideration. This includes specific code line numbers and instructions on how to make corrections.
[0266] Step 11:
[0267] The server sends the formatted results to the user's device. The user receives a notification of the analysis results and checks them within the app.
[0268] Step 12:
[0269] Users modify the code based on the analysis results. For example, they might change variable names to make them easier to understand or fix security vulnerabilities. They also take appropriate action based on the feedback from the sentiment engine.
[0270] Step 13:
[0271] The user uploads the corrected code again for re-evaluation. This process is repeated as needed.
[0272] The above outlines the specific processing flow for code analysis and improvement suggestions using the "CodeReview Plus" system, which incorporates an emotion engine.
[0273] (Example 2)
[0274] Next, we will describe Example 2. In the following description, the data processing device 12 will be referred to as the "server" and the smart device 14 as the "terminal".
[0275] Traditional code analysis systems provide syntax analysis and AI-powered improvement suggestions, but they lack the functionality to provide feedback while considering the user's emotional state. Therefore, the feedback a user receives may not always be optimal, potentially causing stress and difficulty in understanding. Furthermore, ignoring the user's emotional state can prevent effective code correction.
[0276] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 2 is realized by the following means.
[0277] In this invention, the server includes means for the user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, and means for the server to format the analysis results considering the user's emotional data and send them to the user. This makes it possible to provide optimal feedback according to the user's emotional state.
[0278] "User terminal" refers to electronic devices operated by a user, such as personal computers, smartphones, and tablets.
[0279] "Code upload" refers to the act of a user sending program code files from their device to a server via the internet.
[0280] A "server" refers to a computer or system that provides services to user terminals via a network.
[0281] "Syntax analysis" refers to the process of analyzing the structure and grammar of program code to detect syntax errors and warnings.
[0282] "Artificial intelligence" refers to a system that uses technologies such as machine learning and deep learning to learn patterns from large amounts of data and perform analysis and decision-making.
[0283] "Improvement Proposal" refers to an amendment provided from perspectives such as code readability, performance, and security based on the results analyzed by artificial intelligence.
[0284] "Emotion Data" refers to data indicating the current emotional state of the user, such as information extracted from facial expressions and voices.
[0285] "Feedback" refers to the act of returning information such as analysis results and improvement proposals to the user.
[0286] This invention is a system in which a user uploads code from his / her terminal, the server performs analysis, and improvement proposals by artificial intelligence are provided to the user. Also, by combining an emotion engine that recognizes the user's emotions, it is possible to provide optimal feedback considering the user's emotional state. Specific embodiments of this system will be described below.
[0287] Code Upload from User Terminal and Emotion Recognition
[0288] The user launches the "Code Review Application" on his / her terminal and logs in. After logging in, the user clicks the "Code Upload" button. When a file selection dialog appears, the user selects the code file to be analyzed and presses the "Upload" button. By this operation, the code file is sent to the server. At the same time, the emotion engine analyzes the user's facial expression and voice data, and the camera and microphone are used to recognize the current emotional state.
[0289] Code Reception and Syntax Analysis on Server
[0290] The server receives the uploaded code file. After receiving it, the server first verifies whether the file format is correct. Next, the server uses a syntax analysis tool such as Pylint or ESLint to analyze the code's syntax. Syntax errors and warnings detected during this analysis process are temporarily stored in a database. The overall structure and dependencies of the code are also analyzed.
[0291] AI-powered code analysis and improvement suggestions
[0292] Next, the server sends the code to a pre-trained artificial intelligence model. The AI model analyzes the code from the perspectives of readability, performance, and security, and generates specific improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. These analysis results and improvement suggestions are temporarily stored in a database.
[0293] Feedback that takes user sentiment data into account
[0294] In parallel, the server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed or anxious, the server adjusts the analysis results to explain them in a gentle way. Conversely, if the user is relaxed, it can provide detailed, technical feedback.
[0295] Server formatting of results and transmission to the user
[0296] The server receives the analysis results from the artificial intelligence model and, taking into account the user's emotional data, formats them into a user-friendly format. This formatting process includes specific code line numbers, correction methods, and emotionally sensitive feedback. The formatted results are then sent back to the user's device.
[0297] User review and correction of results
[0298] The user receives a notification of the analysis result and checks the result within the app. Based on the displayed improvement suggestions, the user modifies their code. Specific examples include changing variable names, fixing security holes, and refactoring functions. If necessary, the user can upload again and repeat the same process.
[0299] Specific examples
[0300] For example, the user launches the "Code Review Application" on their terminal and uploads a Python file named example.py. The server performs syntax analysis of the code using Pylint and inputs the result into a pre-trained generative AI model. The generative AI model generates improvement suggestions regarding readability, performance, and security and sends the results to the user. At the same time, the emotion engine detects that the user is feeling stressed and adjusts the tone of the feedback.
[0301] Example of prompt text
[0302] By inputting the following prompt text into the generative AI model, it is used to generate improvement suggestions.
[0303] Analyze the Python code uploaded by the user and provide improvement suggestions from the following perspectives: (1) Improvement of readability (2) Optimization of performance (3) Fixing security holes
[0304] Code content:
[0305] As described above, by implementing this invention, it becomes possible to provide optimal feedback according to the user's emotional state.
[0306] The flow of the specific process in Example 2 will be described using FIG. 13.
[0307] Step 1:
[0308] The user launches the "Code Review Application" on their device and logs into their account. They enter their username and password on the login screen. This sends the user's authentication information to the server, and if the login is successful, the main screen is displayed (Input: Username, Password) (Output: Login success / failure notification).
[0309] Step 2:
[0310] The user clicks the "Code Upload" button on the main screen, and a file selection dialog appears. The user selects the code file they want to analyze and clicks the "Upload" button. This sends the code file from the terminal to the server (Input: Code file) (Output: Code file sent to the server).
[0311] Step 3:
[0312] The device collects the user's facial expressions and voice data through its camera and microphone and sends it to the emotion engine. The emotion engine analyzes this data to recognize the user's current emotional state (input: facial expression data, voice data) (output: user's emotion data).
[0313] Step 4:
[0314] The server receives the uploaded code file. The server first verifies the file format, and then uses a syntax analysis tool such as Pylint or ESLint to analyze the code's syntax. Syntax errors and warnings detected during this analysis are stored in a database. Furthermore, the overall structure and dependencies of the code are also analyzed (Input: Code file) (Output: Syntax errors, warnings, code structure, dependencies).
[0315] Step 5:
[0316] The server sends the parsing results to a pre-trained artificial intelligence model. The generating AI model analyzes the code from the perspectives of readability, performance, and security, and generates specific improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The analysis results and improvement suggestions are stored in a database (input: parsing results) (output: improvement suggestions).
[0317] Step 6:
[0318] The server incorporates the emotional data received from the emotion engine into the analysis results and adjusts the feedback content according to the user's emotional state. For example, if the user is feeling stressed, the analysis results will be adjusted to be explained in a gentler tone (Input: Improvement suggestions, emotional data) (Output: Emotionally sensitive feedback).
[0319] Step 7:
[0320] The server formats the final analysis results and sends them to the user, including specific code line numbers and suggested corrections. The tone of the feedback is also adjusted, so that feedback is provided in a format that is easy for the user to understand (Input: Improvement suggestions, emotionally sensitive feedback) (Output: Formatted feedback).
[0321] Step 8:
[0322] Users receive notifications within the application and review the analysis results. Based on the suggested improvements, users modify their code. Examples include renaming variables, fixing security vulnerabilities, and refactoring functions (Input: Formatted feedback) (Output: Modified code). If necessary, users can upload the modified code again and repeat the same process (steps 1-8).
[0323] (Application Example 2)
[0324] Next, we will explain application example 2. In the following explanation, the data processing device 12 will be referred to as a "server" and the smart device 14 as a "terminal".
[0325] Traditional code review systems simply provide suggestions for improving code quality and performance, without considering the psychological burden on the user. This could lead to stress and anxiety, potentially reducing work efficiency. This is especially true for highly technical code, such as control code for factory robots, where psychological support for the user is crucial.
[0326] In Application Example 2, the specific processing performed by the specific processing unit 290 of the data processing device 12 is realized by the following means. In this invention, the server includes means for the user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, means for the server to format the analysis results and send them to the user, means for the user to modify the code based on the suggestions, means for the emotion engine to recognize the user's emotional state, and means for providing optimal feedback based on the emotional state. This improves the effectiveness of code reviews and enables efficient feedback while reducing the psychological burden on the user.
[0327] A "code upload method" is a method for a user to send code from their device to a server.
[0328] A "syntactic analysis method" is a method by which a server receives uploaded code and analyzes the grammar and structure of the code.
[0329] The "improvement suggestion generation method" is a method in which artificial intelligence analyzes code and suggests improvements from the perspectives of readability, performance, and security.
[0330] "Analysis result formatting method" refers to a method by which a server formats the analysis results received from artificial intelligence into a format that is easy for the user to understand.
[0331] A "code modification method" is a method for users to modify their own code based on suggestions.
[0332] "Emotion recognition means" refers to a method by which an emotion engine analyzes the user's facial expressions and voice data to recognize their current emotional state.
[0333] An "optimal feedback delivery method" is a method of providing feedback tailored to the user based on the user's emotional state.
[0334] This invention uses the following system and program to realize a process in which a user uploads code from their terminal, the server analyzes it, and artificial intelligence provides improvement suggestions.
[0335] System Configuration
[0336] 1. User terminal:
[0337] Users launch an application that serves as a "code uploading method" using a device such as a smartphone, and upload code files to the server.
[0338] 2. Server:
[0339] The server receives the uploaded code and uses parsing tools such as Pylint or ESLint as its "parsing mechanism" to analyze the code's grammar and structure. The analysis results are temporarily stored in a database.
[0340] 3. Artificial Intelligence:
[0341] The server sends the analyzed code to a pre-trained generative AI model and, as a "means for generating improvement suggestions," proposes improvements from the perspectives of code readability, performance, and security.
[0342] 4. Emotional Engine:
[0343] The user terminal is equipped with a camera and microphone, and as a "means of emotion recognition," it analyzes the user's facial expressions and voice data to detect their emotional state.
[0344] 5. Server feedback generation:
[0345] The server processes the analysis results received from the artificial intelligence, taking into account the user's emotional state, into the most appropriate feedback format. As an "optimal feedback delivery method," it either provides gentle explanations or detailed technical feedback, depending on the emotional data.
[0346] 6. User code modifications:
[0347] Users who receive the analysis results can modify their code based on the suggestions and re-upload it if necessary.
[0348] Hardware and software to be used
[0349] Hardware:
[0350] Smartphone: Camera, microphone
[0351] server
[0352] software:
[0353] OpenCV: Facial Expression Analysis
[0354] EmotionRecognition Library: Emotion Recognition
[0355] Requests Library: Communication with the Server
[0356] Pylint and ESLint: Syntax Analysis
[0357] Database: Temporary storage of analysis results
[0358] Generative AI Model: Improvement suggestions using artificial intelligence
[0359] Specific processing examples
[0360] The user launches the "RoboReview Plus" application on their smartphone, selects and uploads the robot control code file (control_code.rs). The server receives this code and performs syntax analysis. Simultaneously, it uses the smartphone's camera and microphone to recognize the user's emotional state. If the recognized emotion is "anxiety," the server generates gentle and easy-to-understand feedback and sends it to the user. The user modifies the code based on the suggestions and re-uploads it if necessary.
[0361] Example of a prompt
[0362] Examples of prompt messages include the following:
[0363] Create a system that, after a user uploads code, uses emotion recognition to recognize the user's emotional state and provides feedback accordingly. Provide implementation methods and specific code examples for each step.
[0364] As described above, the present invention is a system that uses the latest technology to improve code quality and reduce the psychological burden on users.
[0365] The flow of a specific process in Application Example 2 will be explained using Figure 14.
[0366] Step 1:
[0367] The user launches the application on their device as a "code upload method." The user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., control_code.rs) and presses the "Upload" button. This operation sends the code file from the device to the server. The input is the code file selected by the user, and the output is the file sent to the server.
[0368] Step 2:
[0369] The server receives the uploaded code file and uses parsing tools such as Pylint and ESLint as its "parsing means" to analyze the code's grammar and structure. As a result of the analysis, syntax errors and warnings are collected and temporarily stored in a database. The input is the uploaded code file, and the output is the data from the parsing results.
[0370] Step 3:
[0371] The server sends the analyzed code to a pre-trained generative AI model and generates improvement suggestions from the perspectives of code readability, performance, and security, acting as a "means for generating improvement suggestions." The generated suggestions are stored in a database. The input is the data from the syntactic analysis results, and the output is the data of the AI's improvement suggestions.
[0372] Step 4:
[0373] The user terminal is equipped with a camera and microphone, and as a "means of emotion recognition," the terminal captures the user's facial expressions and voice, and an emotion engine analyzes this data to recognize the user's emotional state. The input is facial expressions and voice data, and the output is the user's emotional state.
[0374] Step 5:
[0375] The server formats the analysis results received from the artificial intelligence and the emotional state data from the emotion engine into a feedback format optimized for the user. As an "optimal feedback delivery method," it generates gentle explanations to reduce the user's stress and anxiety, and detailed technical feedback as needed. The input is the analysis results and emotional state data, and the output is the optimized feedback.
[0376] Step 6:
[0377] The formatted analysis results and improvement suggestions are sent from the server to the user's device. The user receives a notification and checks the results within the app. The user uses the code modification tool to modify the code based on the suggestions and re-uploads it if necessary. The input is the optimized feedback, and the output is the user's modified code.
[0378] 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 user input for the result of the specific processing. The control unit 46A transmits the audio data indicating 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.
[0379] Data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of data generation model 58 is ChatGPT (registered trademark) (Internet search).<URL: https: / / openai.com / blog / chatgpt> ), Gemini (registered trademark) (Internet search) <url: https: gemini.google.com ?hl="ja">Examples of generative AI include the following. The data generation model 58 is obtained by performing deep learning on a neural network. The data generation model 58 is input with prompts containing instructions, and with inference data such as audio data representing speech, text data representing text, and image data representing images. The data generation model 58 infers from the input inference data according to the instructions indicated by the prompts, and outputs the inference results in data formats such as audio data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0380] In the above embodiment, an example was given in which specific processing is performed by the data processing device 12, but the technology of this disclosure is not limited thereto, and the specific processing may also be performed by the smart device 14.
[0381] [Second Embodiment]
[0382] Figure 3 shows an example of the configuration of the data processing system 210 according to the second embodiment.
[0383] As shown in Figure 3, the data processing system 210 includes a data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.
[0384] The data processing device 12 comprises a computer 22, a database 24, and a communication interface 26. The computer 22 is an example of a "computer" related to the technology of this disclosure. The computer 22 comprises a processor 28, RAM 30, and storage 32. The processor 28, RAM 30, and storage 32 are connected to a bus 34. The database 24 and the communication interface 26 are also connected to the bus 34. The communication interface 26 is connected to a network 54. An example of the network 54 is a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0385] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication interface 44. The computer 36 includes a processor 46, RAM 48, and storage 50. The processor 46, RAM 48, and storage 50 are connected to a bus 52. The microphone 238, speaker 240, and camera 42 are also connected to the bus 52.
[0386] The microphone 238 receives voice signals from the user 20 and receives instructions from the user 20. The microphone 238 captures the voice signals from the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio according to the instructions from the processor 46.
[0387] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an image sensor such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the area around the user 20 (for example, an imaging range defined by a field of view equivalent to the width of a typical healthy person's field of vision).
[0388] Communication interface 44 is connected to network 54. Communication interfaces 44 and 26 are responsible for the exchange of various information between processor 46 and processor 28 via network 54. The exchange of various information between processor 46 and processor 28 using communication interfaces 44 and 26 is performed in a secure manner.
[0389] Figure 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Figure 4, the data processing device 12 performs specific processing using the processor 28. The storage 32 stores the specific processing program 56.
[0390] The specific processing program 56 is an example of a "program" relating to the technology of this 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.
[0391] The storage 32 stores the data generation model 58 and the emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0392] In the smart glasses 214, the processor 46 performs the reception output processing. The storage 50 stores the reception output program 60. 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 processing is realized by the processor 46 operating as a control unit 46A according to the reception output program 60 executed on the RAM 48.
[0393] Next, the identification processing performed by the identification processing unit 290 of the data processing device 12 will be described. 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".
[0394] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. The following components and procedures are necessary to implement this invention.
[0395] Uploading code from user terminals
[0396] The user launches the "CodeReview Plus" application on their device and logs in. After logging in, the user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This sends the code file to the server.
[0397] Code reception and parsing on the server
[0398] The server receives the uploaded code file. After receiving it, the server checks the file format and verifies that it is a code file. If this verification is successful, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During the analysis process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0399] AI-powered code analysis and improvement suggestions
[0400] Next, the server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0401] Server formatting of results and transmission to the user
[0402] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's terminal.
[0403] User review and correction of results
[0404] The user receives a notification of the analysis results and checks them within the app. Based on the displayed improvement suggestions, the user modifies their code. For example, if it is pointed out that a variable name is meaningless, the user changes the variable name to something more understandable. Also, if optimization of the repetitive structure is suggested, the user refactors the code according to the suggested method.
[0405] ---
[0406] In this way, the present invention reduces the burden of human code review and enables efficient and high-quality code review. As a result, time and costs are significantly reduced, and programmer productivity is improved.
[0407] The following describes the processing flow.
[0408] Step 1:
[0409] The user launches the "CodeReview Plus" application on their device and logs in.
[0410] Step 2:
[0411] The user clicks the "Upload Code" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This action sends the code file to the server.
[0412] Step 3:
[0413] The server receives the uploaded code file. After receiving it, the server verifies whether the file format is correct.
[0414] Step 4:
[0415] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During this analysis, syntax errors and warnings are collected and temporarily stored in a database.
[0416] Step 5:
[0417] The server analyzes the overall structure and dependencies of the code. This prepares the data so that the AI can gain a deep understanding of the code.
[0418] Step 6:
[0419] The server sends the code to the artificial intelligence model. The pre-trained AI model analyzes the code from the perspectives of readability, performance, and security.
[0420] Step 7:
[0421] Artificial intelligence generates analysis results and improvement suggestions. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0422] Step 8:
[0423] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and instructions on how to make corrections.
[0424] Step 9:
[0425] The formatted results are sent to the user's device. The user receives a notification of the analysis results and checks them within the app.
[0426] Step 10:
[0427] The user modifies the code based on the analysis results. For example, this might involve changing variable names or fixing security vulnerabilities.
[0428] Step 11:
[0429] The user uploads the revised code again, and the same process is repeated for re-evaluation. This process can be repeated until the result is satisfactory.
[0430] The above outlines the specific process flow from when a user uses "CodeReview Plus" to analyze their code and receive improvement suggestions.
[0431] (Example 1)
[0432] Next, we will describe Example 1. 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."
[0433] In software development, code review is a crucial process for maintaining quality. However, manual code review is time-consuming and labor-intensive, and the accuracy of the review depends on the reviewer's skills. Furthermore, when dealing with a large volume of code, it is difficult to comprehensively review all of it. This increases the likelihood of bugs and security vulnerabilities being overlooked, potentially leading to a decline in software quality and development delays.
[0434] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 1 is realized by the following means.
[0435] In this invention, the server includes means for a user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for the server to send the code to a pre-trained generative AI model to generate analysis and improvement suggestions, means for the server to format the analysis results and send them to the user, and means for the user to modify the code based on the suggestions. This reduces the burden of human review and enables efficient and high-quality code review.
[0436] A "user terminal" refers to a computer device used by the user for operations such as uploading code or checking analysis results.
[0437] A "server" refers to a computer device that receives and analyzes uploaded code, and generates and sends improvement suggestions.
[0438] "Syntax analysis" refers to the process of analyzing the grammar of program code and detecting errors and warnings.
[0439] A "generative AI model" is a pre-trained artificial intelligence model used to analyze code and generate improvement suggestions.
[0440] "Improvement suggestions" refer to specific changes or modifications that would improve the readability, performance, and security of the code.
[0441] A "syntactic analysis tool" is software used to detect grammatical errors and warnings in code, and examples include Pylint and ESLint.
[0442] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. The following components and procedures are necessary to implement this invention.
[0443] Uploading code from user terminals
[0444] The user launches a dedicated application on their device and logs in. After logging in, they click the "Code Upload" button to display a file selection dialog. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This action sends the code file to the server.
[0445] Code reception and parsing on the server
[0446] The server receives the uploaded code file. After receiving it, the server checks the file format and verifies that the uploaded file is a code file. If this verification is successful, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During the analysis process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0447] AI-powered code analysis and improvement suggestions
[0448] Next, the server sends the code to a pre-trained generative AI model. The generative AI model analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0449] Server formatting of results and transmission to the user
[0450] The server receives the analysis results from the generated AI model and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's device.
[0451] User review and correction of results
[0452] The user receives a notification of the analysis results and checks them within the app. Based on the displayed improvement suggestions, the user modifies their code. For example, if it is pointed out that a variable name is meaningless, the user changes the variable name to something more understandable. Also, if optimization of the repetitive structure is suggested, the user refactors the code according to the suggested method.
[0453] Examples of specific cases and prompt statements
[0454] For example, suppose a user uploads a Python file named example.py. This file contains the following:
[0455] python
[0456] def example(a, b):
[0457] result = a + 1
[0458] return result
[0459] Let's assume that the generative AI model generates the following improvement suggestions for this code.
[0460] text
[0461] Line 1: It is recommended to change the function name 'example' to a name with a more concrete meaning.
[0462] Line 1: It is recommended that you change the parameters 'a' and 'b' to names that have specific meanings.
[0463] Line 2: Please consider improving the efficiency of the calculation method.
[0464] Based on these suggestions, the user will modify the code as follows:
[0465] python
[0466] def calculate_sum_and_multiply(addend, factor):
[0467] sum_result = addend + 1
[0468] return sum_result factor
[0469] The following is an example of a prompt message to input into the generative AI model.
[0470] text
[0471] Analyze user-uploaded Python code and generate suggestions for improvements to readability, performance, and security. Please analyze the following code:
[0472] The flow of the specific processing in Example 1 will be explained using Figure 11.
[0473] Step 1:
[0474] The user launches a dedicated application on their device and logs in.
[0475] Input: User authentication information (username, password)
[0476] Action: Enter your username and password on the login screen and click the "Login" button.
[0477] Output: Login success or failure notification
[0478] Step 2:
[0479] The user clicks the "Upload Code" button, which displays a file selection dialog.
[0480] Input: User click operation
[0481] Operation: A file system window appears, and the user selects the code file they want to analyze (e.g., example.py).
[0482] Output: Path to the selected code file
[0483] Step 3:
[0484] The user clicks the "Upload" button to send the selected code file to the server.
[0485] Input: User clicks and selected code file
[0486] Operation: The selected file is uploaded to the server using an HTTP POST request.
[0487] Output: Code file sent to the server
[0488] Step 4:
[0489] The server receives the uploaded code file.
[0490] Input: HTTP POST request and code file data
[0491] Operation: The server receives an HTTP request and saves the file data.
[0492] Output: Saved code file
[0493] Step 5:
[0494] The server checks the file format and verifies that it is a code file.
[0495] Input: Saved code file and its metadata
[0496] Operation: Checks the file extension and verifies whether it is in the correct format (e.g., .py, .js).
[0497] Output: Verification result (Pass or Fail)
[0498] Step 6:
[0499] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax.
[0500] Input: Code files that have passed verification
[0501] Operation: The server runs analysis tools and collects errors and warnings in the code.
[0502] Output: Analysis results (list of errors and warnings)
[0503] Step 7:
[0504] The server sends the code to a pre-trained generative AI model.
[0505] Input: Results of parsing and contents of the code file
[0506] Operation: The server sends code to the generated AI model via an API request, and the model parses the code.
[0507] Output: Analysis results and improvement suggestions from the generated AI model.
[0508] Step 8:
[0509] The server formats the analysis results from the generated AI model.
[0510] Input: Analysis results and improvement suggestions from the generated AI model.
[0511] Operation: The server converts the analysis results into JSON format and formats them into an easy-to-understand format, including specific line numbers and correction methods.
[0512] Output: Formatted analysis results
[0513] Step 9:
[0514] The server sends the formatted analysis results to the user's terminal.
[0515] Input: Formatted analysis results
[0516] Operation: The server sends the formatted result as an HTTP response to the user's application.
[0517] Output: Analysis results displayed in the application on the user's terminal.
[0518] Step 10:
[0519] Users receive notifications of analysis results within the app and can then review the results.
[0520] Input: Notification of analysis results
[0521] Operation: Users can view the analysis results through the application's notification function.
[0522] Output: Analysis results displayed to the user
[0523] Step 11:
[0524] The user modifies the code based on the displayed improvement suggestions.
[0525] Input: Improvement suggestions included in the analysis results
[0526] Operation: The user opens the editor and applies the suggested changes to the code. For example, they might rename variables or optimize loop structures.
[0527] Output: Modified code file
[0528] (Application Example 1)
[0529] Next, we will explain Application Example 1. In the following explanation, the data processing device 12 will be referred to as the "server," and the smart glasses 214 will be referred to as the "terminal."
[0530] In modern factory automation, ensuring the quality and security of control codes is extremely important. However, quickly and efficiently detecting and correcting errors and security vulnerabilities hidden in the control codes of factory automation machinery is not easy. Furthermore, manual code review is time-consuming and laborious, placing a heavy burden on programmers and engineers and potentially leading to decreased productivity. Therefore, efficiently improving the quality and security of control codes for factory automation machinery is a key challenge.
[0531] The specific processing performed by the specific processing unit 290 of the data processing device 12 in Application Example 1 is realized by the following means.
[0532] In this invention, the server includes means for a user to upload code from their information processing device, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, means for the server to format the analysis results and send them to the user, and means for the system to suggest security vulnerabilities and performance optimizations when receiving and analyzing control code for factory automation machines. This makes it possible to quickly and efficiently improve the quality and security of control code for factory automation machines.
[0533] A "user" is a person who uses the system to upload code and check the analysis results, or a person who operates an information processing device.
[0534] An "information processing device" is a device used by users to access a system and upload code, and includes personal computers and smartphones.
[0535] "Code" refers to a text file containing a program that controls the operation of automated factory machinery.
[0536] A "server" is a computing system that receives code uploaded by users, analyzes it, and generates improvement suggestions using artificial intelligence.
[0537] "Syntax analysis" is the process of deciphering the structure of code and detecting syntax errors and warnings.
[0538] "Artificial intelligence" is a technology that uses machine learning algorithms to analyze code and suggest improvements.
[0539] "Improvement suggestions" are recommendations for modifications generated by artificial intelligence to improve the quality and security of the code.
[0540] "Analysis results" refer to information about errors, warnings, and areas for improvement obtained after the server has performed syntactic analysis and artificial intelligence analysis.
[0541] "Factory automation machinery" refers to equipment equipped with control devices for performing tasks automatically within a factory, and includes industrial robots and production line machinery.
[0542] A "security hole" is a security vulnerability within control code that could potentially lead to unauthorized access or malfunctions.
[0543] "Performance optimization" refers to methods of modifying code to improve its operational efficiency, including increasing computation speed and reducing resource usage.
[0544] This invention is a system that improves the quality and security of control codes for factory automation machinery by allowing users to upload control codes from their own information processing devices, and a server to analyze those codes and provide improvement suggestions. Specific embodiments of this system are described below.
[0545] The user launches the "RobotCodeReview Plus" application using their own information processing device (PC or smartphone). After logging in within the application, the user clicks the "Code Upload" button, and a file selection dialog appears. Here, the user selects the control code file they want to analyze and clicks the "Upload" button. This sends the control code file to the server.
[0546] After receiving the uploaded code file, the server checks the file format and verifies that it is a control code file. If this verification is successful, the server uses a parsing tool (e.g., Pylint) to parse the code. During the parsing process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0547] Next, the server sends the code to a pre-trained artificial intelligence model (e.g., a custom PyTorch-based model). The AI model analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0548] The server then receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's information processing device, where the user receives a notification of the analysis results and can view them within the app.
[0549] For example, if a security vulnerability is found in the control code file "robot_code.py", the following improvement suggestions will be displayed:
[0550] "Hardcoded encryption key found. Use environment variables to store encryption keys."
[0551] As a concrete example, we will use the following prompt to analyze an artificial intelligence model:
[0552] "Analyze the following robot control code for any potential security vulnerabilities or optimization opportunities. Provide clear and actionable improvement suggestions.
[0553] Robot Code:
[0554] Code content here
[0555] In this way, by using this system, the burden of human code review can be reduced, and efficient and high-quality code reviews can be achieved. As a result, the quality and security of control code for factory automation machinery are improved, and productivity is increased.
[0556] The flow of a specific process in Application Example 1 will be explained using Figure 12.
[0557] Step 1:
[0558] The user uploads control codes from their own information processing device.
[0559] Input: Control code file (e.g., robot_code.py)
[0560] Output: Code file included in the HTTP request to the server
[0561] Specific operation: The user clicks the "Code Upload" button on the application, and a file selection dialog appears. The user selects the control code file they want to analyze and clicks the "Upload" button. This action sends the control code file to the server.
[0562] Step 2:
[0563] The server receives the uploaded code and performs syntax analysis.
[0564] Input: Control code file sent by the user
[0565] Output: Results of parsing (error list and warning list)
[0566] Specific operation: The server receives an HTTP POST request and retrieves a control code file. It checks the file format and verifies that it contains control codes. After this, the server uses a parsing tool (e.g., Pylint) to parse the code, collects any errors or warnings found, and temporarily stores them in a database.
[0567] Step 3:
[0568] The server sends code to the artificial intelligence model, which then generates improvement suggestions.
[0569] Input: Parsed control codes, and a list of errors and warnings.
[0570] Output: Improvement suggestions generated by artificial intelligence
[0571] Specific operation: The server sends code to a pre-trained artificial intelligence model (e.g., a custom PyTorch-based model). The AI model analyzes the code from the perspectives of readability, performance, and security. Based on the prompt, it performs the analysis and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0572] Step 4:
[0573] The server formats the analysis results and sends them to the user.
[0574] Input: Data for improvement suggestions generated by artificial intelligence.
[0575] Output: Formatted analysis results sent to the user
[0576] Specific operation: The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification methods. The formatted analysis results are then sent back to the user's information processing device.
[0577] Step 5:
[0578] The user modifies the code based on their suggestions.
[0579] Input: Analysis results and improvement suggestions received from the server.
[0580] Output: User-modified control code
[0581] Specific actions: The user receives a notification of the analysis results and checks the results within the application. Based on the displayed improvement suggestions, they modify their control code. For example, if a security vulnerability is identified, the user modifies their code to use environment variables to store the encryption key.
[0582] In this way, by utilizing this system, users can quickly and efficiently improve the quality and security of control codes for factory automation machinery.
[0583] Furthermore, an emotion engine that estimates the user's emotions may be incorporated. That is, the identification processing unit 290 may use the emotion identification model 59 to estimate the user's emotions and perform identification processing using the user's emotions.
[0584] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. Furthermore, by incorporating an emotion engine that recognizes the user's emotions, it is possible to provide optimal feedback that takes the user's emotional state into account. The following components and procedures are necessary to implement this invention.
[0585] Code upload from user devices and emotion recognition
[0586] The user launches the "CodeReview Plus" application on their device and logs in. After logging in, the user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and presses the "Upload" button. This sends the code file to the server. Simultaneously, the emotion engine analyzes the user's facial expressions and voice data to recognize their current emotional state.
[0587] Code reception and parsing on the server
[0588] The server receives the uploaded code file. After receiving it, the server verifies whether the file format is correct. Next, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During this analysis process, syntax errors and warnings are collected and temporarily stored in a database. The overall structure and dependencies of the code are also analyzed.
[0589] AI-powered code analysis and improvement suggestions
[0590] Next, the server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0591] Feedback that takes user sentiment data into account
[0592] In parallel, the server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed or anxious, the server adjusts the analysis results to explain them in a gentle way. Conversely, if the user is relaxed, it can provide detailed, technical feedback.
[0593] Server formatting of results and transmission to the user
[0594] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format, taking sentiment data into consideration. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's device.
[0595] User review and correction of results
[0596] Users receive notifications of analysis results and review them within the app. Based on the displayed improvement suggestions, users modify their code. Specific examples include changing variable names and fixing security vulnerabilities. They can also re-upload their code and repeat the same process as needed.
[0597] ---
[0598] In this way, the present invention reduces the burden of human code review and enables efficient and high-quality code review. Furthermore, by combining it with an emotion engine, it is possible to reduce the psychological burden on users and provide a more stress-free feedback environment. With the above configuration, it is expected that time and costs will be significantly reduced and programmer productivity will be improved.
[0599] The following describes the processing flow.
[0600] Step 1:
[0601] The user launches the "CodeReview Plus" application on their device and logs in. On the login screen, they enter their user ID and password and click the "Login" button.
[0602] Step 2:
[0603] The user clicks the "Upload Code" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button.
[0604] Step 3:
[0605] The device sends a code file to the server. Simultaneously, the device's built-in camera and microphone are used to analyze the user's facial expressions and voice using an emotion engine, generating emotion data.
[0606] Step 4:
[0607] The server receives the uploaded code file. First, it verifies whether the file format is correct. For example, it checks that the content is not empty and that it is written in the specified programming language.
[0608] Step 5:
[0609] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. Syntax errors and warnings found during this analysis are collected and temporarily stored in a database.
[0610] Step 6:
[0611] The server analyzes the overall structure and dependencies of the code. This deepens the understanding of the code and prepares data that makes AI analysis more effective.
[0612] Step 7:
[0613] The server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security.
[0614] Step 8:
[0615] Artificial intelligence generates analysis results and improvement suggestions. These suggestions include methods for refactoring code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0616] Step 9:
[0617] The server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed, it provides feedback in a gentle tone to avoid misunderstandings.
[0618] Step 10:
[0619] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format, taking sentiment data into consideration. This includes specific code line numbers and instructions on how to make corrections.
[0620] Step 11:
[0621] The server sends the formatted results to the user's device. The user receives a notification of the analysis results and checks them within the app.
[0622] Step 12:
[0623] Users modify the code based on the analysis results. For example, they might change variable names to make them easier to understand or fix security vulnerabilities. They also take appropriate action based on the feedback from the sentiment engine.
[0624] Step 13:
[0625] The user uploads the corrected code again for re-evaluation. This process is repeated as needed.
[0626] The above outlines the specific processing flow for code analysis and improvement suggestions using the "CodeReview Plus" system, which incorporates an emotion engine.
[0627] (Example 2)
[0628] Next, we will describe Example 2. 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".
[0629] Traditional code analysis systems provide syntax analysis and AI-powered improvement suggestions, but they lack the functionality to provide feedback while considering the user's emotional state. Therefore, the feedback a user receives may not always be optimal, potentially causing stress and difficulty in understanding. Furthermore, ignoring the user's emotional state can prevent effective code correction.
[0630] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 2 is realized by the following means.
[0631] In this invention, the server includes means for the user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, and means for the server to format the analysis results considering the user's emotional data and send them to the user. This makes it possible to provide optimal feedback according to the user's emotional state.
[0632] "User terminal" refers to electronic devices operated by a user, such as personal computers, smartphones, and tablets.
[0633] "Code upload" refers to the act of a user sending program code files from their device to a server via the internet.
[0634] A "server" refers to a computer or system that provides services to user terminals via a network.
[0635] "Syntax analysis" refers to the process of analyzing the structure and grammar of program code to detect syntax errors and warnings.
[0636] "Artificial intelligence" refers to a system that uses technologies such as machine learning and deep learning to learn patterns from large amounts of data and perform analysis and decision-making.
[0637] "Improvement suggestions" refer to proposed modifications provided based on the results of analysis by artificial intelligence, considering aspects such as code readability, performance, and security.
[0638] "Emotional data" refers to data that indicates a user's current emotional state, such as information extracted from facial expressions or voice.
[0639] "Feedback" refers to the act of returning information such as analysis results and improvement suggestions to the user.
[0640] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. Furthermore, by combining it with an emotion engine that recognizes the user's emotions, it is possible to provide optimal feedback that takes into account the user's emotional state. A specific embodiment of this system is described below.
[0641] Code upload from user devices and emotion recognition
[0642] The user launches the "Code Review Application" on their device and logs in. After logging in, the user clicks the "Code Upload" button, and when the file selection dialog appears, selects the code file to be analyzed and presses the "Upload" button. This action sends the code file to the server. Simultaneously, the emotion engine uses the camera and microphone to analyze the user's facial expressions and voice data to recognize their current emotional state.
[0643] Code reception and parsing on the server
[0644] The server receives the uploaded code file. After receiving it, the server first verifies whether the file format is correct. Next, the server uses a syntax analysis tool such as Pylint or ESLint to analyze the code's syntax. Syntax errors and warnings detected during this analysis process are temporarily stored in a database. The overall structure and dependencies of the code are also analyzed.
[0645] AI-powered code analysis and improvement suggestions
[0646] Next, the server sends the code to a pre-trained artificial intelligence model. The AI model analyzes the code from the perspectives of readability, performance, and security, and generates specific improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. These analysis results and improvement suggestions are temporarily stored in a database.
[0647] Feedback that takes user sentiment data into account
[0648] In parallel, the server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed or anxious, the server adjusts the analysis results to explain them in a gentle way. Conversely, if the user is relaxed, it can provide detailed, technical feedback.
[0649] Server formatting of results and transmission to the user
[0650] The server receives the analysis results from the artificial intelligence model and, taking into account the user's emotional data, formats them into a user-friendly format. This formatting process includes specific code line numbers, correction methods, and emotionally sensitive feedback. The formatted results are then sent back to the user's device.
[0651] User review and correction of results
[0652] Users receive notifications of analysis results and view them within the app. Based on the displayed improvement suggestions, users modify their code. Specific examples include changing variable names, fixing security vulnerabilities, and refactoring functions. If necessary, they can re-upload and repeat the same process.
[0653] Specific example
[0654] For example, a user launches a "code review application" on their device and uploads a Python file named example.py. The server uses Pylint to parse the code and feeds the results into a pre-trained generative AI model. The generative AI model generates suggestions for improvements regarding readability, performance, and security, and sends these results to the user. Simultaneously, an emotion engine detects if the user is experiencing stress and adjusts the tone of the feedback accordingly.
[0655] Example of a prompt
[0656] The following prompt messages are input into the AI model to generate improvement suggestions.
[0657] Please analyze the Python code uploaded by users and provide improvement suggestions from the following perspectives: (1) Improve readability (2) Optimize performance (3) Fix security vulnerabilities
[0658] Code content:
[0659] As described above, by implementing this invention, it becomes possible to provide optimal feedback that corresponds to the user's emotional state.
[0660] The flow of the specific processing in Example 2 will be explained using Figure 13.
[0661] Step 1:
[0662] The user launches the "Code Review Application" on their device and logs into their account. They enter their username and password on the login screen. This sends the user's authentication information to the server, and if the login is successful, the main screen is displayed (Input: Username, Password) (Output: Login success / failure notification).
[0663] Step 2:
[0664] The user clicks the "Code Upload" button on the main screen, and a file selection dialog appears. The user selects the code file they want to analyze and clicks the "Upload" button. This sends the code file from the terminal to the server (Input: Code file) (Output: Code file sent to the server).
[0665] Step 3:
[0666] The device collects the user's facial expressions and voice data through its camera and microphone and sends it to the emotion engine. The emotion engine analyzes this data to recognize the user's current emotional state (input: facial expression data, voice data) (output: user's emotion data).
[0667] Step 4:
[0668] The server receives the uploaded code file. The server first verifies the file format, and then uses a syntax analysis tool such as Pylint or ESLint to analyze the code's syntax. Syntax errors and warnings detected during this analysis are stored in a database. Furthermore, the overall structure and dependencies of the code are also analyzed (Input: Code file) (Output: Syntax errors, warnings, code structure, dependencies).
[0669] Step 5:
[0670] The server sends the parsing results to a pre-trained artificial intelligence model. The generating AI model analyzes the code from the perspectives of readability, performance, and security, and generates specific improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The analysis results and improvement suggestions are stored in a database (input: parsing results) (output: improvement suggestions).
[0671] Step 6:
[0672] The server incorporates the emotional data received from the emotion engine into the analysis results and adjusts the feedback content according to the user's emotional state. For example, if the user is feeling stressed, the analysis results will be adjusted to be explained in a gentler tone (Input: Improvement suggestions, emotional data) (Output: Emotionally sensitive feedback).
[0673] Step 7:
[0674] The server formats the final analysis results and sends them to the user, including specific code line numbers and suggested corrections. The tone of the feedback is also adjusted, so that feedback is provided in a format that is easy for the user to understand (Input: Improvement suggestions, emotionally sensitive feedback) (Output: Formatted feedback).
[0675] Step 8:
[0676] Users receive notifications within the application and review the analysis results. Based on the suggested improvements, users modify their code. Examples include renaming variables, fixing security vulnerabilities, and refactoring functions (Input: Formatted feedback) (Output: Modified code). If necessary, users can upload the modified code again and repeat the same process (steps 1-8).
[0677] (Application Example 2)
[0678] Next, we will explain application example 2. In the following explanation, the data processing device 12 will be referred to as the "server," and the smart glasses 214 will be referred to as the "terminal."
[0679] Traditional code review systems simply provide suggestions for improving code quality and performance, without considering the psychological burden on the user. This could lead to stress and anxiety, potentially reducing work efficiency. This is especially true for highly technical code, such as control code for factory robots, where psychological support for the user is crucial.
[0680] In Application Example 2, the specific processing performed by the specific processing unit 290 of the data processing device 12 is realized by the following means. In this invention, the server includes means for the user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, means for the server to format the analysis results and send them to the user, means for the user to modify the code based on the suggestions, means for the emotion engine to recognize the user's emotional state, and means for providing optimal feedback based on the emotional state. This improves the effectiveness of code reviews and enables efficient feedback while reducing the psychological burden on the user.
[0681] A "code upload method" is a method for a user to send code from their device to a server.
[0682] A "syntactic analysis method" is a method by which a server receives uploaded code and analyzes the grammar and structure of the code.
[0683] The "improvement suggestion generation method" is a method in which artificial intelligence analyzes code and suggests improvements from the perspectives of readability, performance, and security.
[0684] "Analysis result formatting method" refers to a method by which a server formats the analysis results received from artificial intelligence into a format that is easy for the user to understand.
[0685] A "code modification method" is a method for users to modify their own code based on suggestions.
[0686] "Emotion recognition means" refers to a method by which an emotion engine analyzes the user's facial expressions and voice data to recognize their current emotional state.
[0687] An "optimal feedback delivery method" is a method of providing feedback tailored to the user based on the user's emotional state.
[0688] This invention uses the following system and program to realize a process in which a user uploads code from their terminal, the server analyzes it, and artificial intelligence provides improvement suggestions.
[0689] System Configuration
[0690] 1. User terminal:
[0691] Users launch an application that serves as a "code uploading method" using a device such as a smartphone, and upload code files to the server.
[0692] 2. Server:
[0693] The server receives the uploaded code and uses parsing tools such as Pylint or ESLint as its "parsing mechanism" to analyze the code's grammar and structure. The analysis results are temporarily stored in a database.
[0694] 3. Artificial Intelligence:
[0695] The server sends the analyzed code to a pre-trained generative AI model and, as a "means for generating improvement suggestions," proposes improvements from the perspectives of code readability, performance, and security.
[0696] 4. Emotional Engine:
[0697] The user terminal is equipped with a camera and microphone, and as a "means of emotion recognition," it analyzes the user's facial expressions and voice data to detect their emotional state.
[0698] 5. Server feedback generation:
[0699] The server processes the analysis results received from the artificial intelligence, taking into account the user's emotional state, into the most appropriate feedback format. As an "optimal feedback delivery method," it either provides gentle explanations or detailed technical feedback, depending on the emotional data.
[0700] 6. User code modifications:
[0701] Users who receive the analysis results can modify their code based on the suggestions and re-upload it if necessary.
[0702] Hardware and software to be used
[0703] Hardware:
[0704] Smartphone: Camera, microphone
[0705] server
[0706] software:
[0707] OpenCV: Facial Expression Analysis
[0708] EmotionRecognition Library: Emotion Recognition
[0709] Requests Library: Communication with the Server
[0710] Pylint and ESLint: Syntax Analysis
[0711] Database: Temporary storage of analysis results
[0712] Generative AI Model: Improvement suggestions using artificial intelligence
[0713] Specific processing examples
[0714] The user launches the "RoboReview Plus" application on their smartphone, selects and uploads the robot control code file (control_code.rs). The server receives this code and performs syntax analysis. Simultaneously, it uses the smartphone's camera and microphone to recognize the user's emotional state. If the recognized emotion is "anxiety," the server generates gentle and easy-to-understand feedback and sends it to the user. The user modifies the code based on the suggestions and re-uploads it if necessary.
[0715] Example of a prompt
[0716] Examples of prompt messages include the following:
[0717] Create a system that, after a user uploads code, uses emotion recognition to recognize the user's emotional state and provides feedback accordingly. Provide implementation methods and specific code examples for each step.
[0718] As described above, the present invention is a system that uses the latest technology to improve code quality and reduce the psychological burden on users.
[0719] The flow of a specific process in Application Example 2 will be explained using Figure 14.
[0720] Step 1:
[0721] The user launches the application on their device as a "code upload method." The user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., control_code.rs) and presses the "Upload" button. This operation sends the code file from the device to the server. The input is the code file selected by the user, and the output is the file sent to the server.
[0722] Step 2:
[0723] The server receives the uploaded code file and uses parsing tools such as Pylint and ESLint as its "parsing means" to analyze the code's grammar and structure. As a result of the analysis, syntax errors and warnings are collected and temporarily stored in a database. The input is the uploaded code file, and the output is the data from the parsing results.
[0724] Step 3:
[0725] The server sends the analyzed code to a pre-trained generative AI model and generates improvement suggestions from the perspectives of code readability, performance, and security, acting as a "means for generating improvement suggestions." The generated suggestions are stored in a database. The input is the data from the syntactic analysis results, and the output is the data of the AI's improvement suggestions.
[0726] Step 4:
[0727] The user terminal is equipped with a camera and microphone, and as a "means of emotion recognition," the terminal captures the user's facial expressions and voice, and an emotion engine analyzes this data to recognize the user's emotional state. The input is facial expressions and voice data, and the output is the user's emotional state.
[0728] Step 5:
[0729] The server formats the analysis results received from the artificial intelligence and the emotional state data from the emotion engine into a feedback format optimized for the user. As an "optimal feedback delivery method," it generates gentle explanations to reduce the user's stress and anxiety, and detailed technical feedback as needed. The input is the analysis results and emotional state data, and the output is the optimized feedback.
[0730] Step 6:
[0731] The formatted analysis results and improvement suggestions are sent from the server to the user's device. The user receives a notification and checks the results within the app. The user uses the code modification tool to modify the code based on the suggestions and re-uploads it if necessary. The input is the optimized feedback, and the output is the user's modified code.
[0732] 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 user input for the result of the specific processing. The control unit 46A transmits the audio data indicating user input acquired by the microphone 238 to the data processing unit 12. In the data processing unit 12, the specific processing unit 290 acquires the audio data.
[0733] Data generation model 58 is a type of so-called generative AI (Artificial Intelligence). One example of data generation model 58 is ChatGPT (Internet search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search) <url: https: gemini.google.com ?hl="ja">Examples of generative AI include the following. The data generation model 58 is obtained by performing deep learning on a neural network. The data generation model 58 is input with prompts containing instructions, and with inference data such as audio data representing speech, text data representing text, and image data representing images. The data generation model 58 infers from the input inference data according to the instructions indicated by the prompts, and outputs the inference results in data formats such as audio data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0734] In the above embodiment, an example was given in which specific processing is performed by the data processing device 12, but the technology of this disclosure is not limited thereto, and the specific processing may also be performed by the smart glasses 214.
[0735] [Third Embodiment]
[0736] Figure 5 shows an example of the configuration of the data processing system 310 according to the third embodiment.
[0737] As shown in Figure 5, the data processing system 310 includes a data processing device 12 and a headset terminal 314. An example of the data processing device 12 is a server.
[0738] The data processing device 12 comprises a computer 22, a database 24, and a communication interface 26. The computer 22 is an example of a "computer" related to the technology of this disclosure. The computer 22 comprises a processor 28, RAM 30, and storage 32. The processor 28, RAM 30, and storage 32 are connected to a bus 34. The database 24 and the communication interface 26 are also connected to the bus 34. The communication interface 26 is connected to a network 54. An example of the network 54 is a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0739] The headset terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication interface 44, and a display 343. The computer 36 includes a processor 46, RAM 48, and storage 50. The processor 46, RAM 48, and storage 50 are connected to a bus 52. The microphone 238, speaker 240, camera 42, and display 343 are also connected to the bus 52.
[0740] The microphone 238 receives voice signals from the user 20 and receives instructions from the user 20. The microphone 238 captures the voice signals from the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio according to the instructions from the processor 46.
[0741] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an image sensor such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the area around the user 20 (for example, an imaging range defined by a field of view equivalent to the width of a typical healthy person's field of vision).
[0742] Communication interface 44 is connected to network 54. Communication interfaces 44 and 26 are responsible for the exchange of various information between processor 46 and processor 28 via network 54. The exchange of various information between processor 46 and processor 28 using communication interfaces 44 and 26 is performed in a secure manner.
[0743] Figure 6 shows an example of the main functions of the data processing device 12 and the headset terminal 314. As shown in Figure 6, the data processing device 12 performs specific processing using the processor 28. The storage 32 stores the specific processing program 56.
[0744] The specific processing program 56 is an example of a "program" relating to the technology of this 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.
[0745] The storage 32 stores the data generation model 58 and the emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0746] In the headset terminal 314, the processor 46 performs the reception output processing. The storage 50 stores the reception output program 60. 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 processing is realized by the processor 46 operating as a control unit 46A according to the reception output program 60 executed on the RAM 48.
[0747] Next, the specific processing performed by the specific processing unit 290 of the data processing device 12 will be described. In the following description, the data processing device 12 will be referred to as the "server" and the headset terminal 314 will be referred to as the "terminal".
[0748] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. The following components and procedures are necessary to implement this invention.
[0749] Uploading code from user terminals
[0750] The user launches the "CodeReview Plus" application on their device and logs in. After logging in, the user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This sends the code file to the server.
[0751] Code reception and parsing on the server
[0752] The server receives the uploaded code file. After receiving it, the server checks the file format and verifies that it is a code file. If this verification is successful, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During the analysis process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0753] AI-powered code analysis and improvement suggestions
[0754] Next, the server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0755] Server formatting of results and transmission to the user
[0756] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's terminal.
[0757] User review and correction of results
[0758] The user receives a notification of the analysis results and checks them within the app. Based on the displayed improvement suggestions, the user modifies their code. For example, if it is pointed out that a variable name is meaningless, the user changes the variable name to something more understandable. Also, if optimization of the repetitive structure is suggested, the user refactors the code according to the suggested method.
[0759] ---
[0760] In this way, the present invention reduces the burden of human code review and enables efficient and high-quality code review. As a result, time and costs are significantly reduced, and programmer productivity is improved.
[0761] The following describes the processing flow.
[0762] Step 1:
[0763] The user launches the "CodeReview Plus" application on their device and logs in.
[0764] Step 2:
[0765] The user clicks the "Upload Code" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This action sends the code file to the server.
[0766] Step 3:
[0767] The server receives the uploaded code file. After receiving it, the server verifies whether the file format is correct.
[0768] Step 4:
[0769] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During this analysis, syntax errors and warnings are collected and temporarily stored in a database.
[0770] Step 5:
[0771] The server analyzes the overall structure and dependencies of the code. This prepares the data so that the AI can gain a deep understanding of the code.
[0772] Step 6:
[0773] The server sends the code to the artificial intelligence model. The pre-trained AI model analyzes the code from the perspectives of readability, performance, and security.
[0774] Step 7:
[0775] Artificial intelligence generates analysis results and improvement suggestions. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0776] Step 8:
[0777] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and instructions on how to make corrections.
[0778] Step 9:
[0779] The formatted results are sent to the user's device. The user receives a notification of the analysis results and checks them within the app.
[0780] Step 10:
[0781] The user modifies the code based on the analysis results. For example, this might involve changing variable names or fixing security vulnerabilities.
[0782] Step 11:
[0783] The user uploads the revised code again, and the same process is repeated for re-evaluation. This process can be repeated until the result is satisfactory.
[0784] The above outlines the specific process flow from when a user uses "CodeReview Plus" to analyze their code and receive improvement suggestions.
[0785] (Example 1)
[0786] Next, we will describe Example 1. 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."
[0787] In software development, code review is a crucial process for maintaining quality. However, manual code review is time-consuming and labor-intensive, and the accuracy of the review depends on the reviewer's skills. Furthermore, when dealing with a large volume of code, it is difficult to comprehensively review all of it. This increases the likelihood of bugs and security vulnerabilities being overlooked, potentially leading to a decline in software quality and development delays.
[0788] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 1 is realized by the following means.
[0789] In this invention, the server includes means for a user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for the server to send the code to a pre-trained generative AI model to generate analysis and improvement suggestions, means for the server to format the analysis results and send them to the user, and means for the user to modify the code based on the suggestions. This reduces the burden of human review and enables efficient and high-quality code review.
[0790] A "user terminal" refers to a computer device used by the user for operations such as uploading code or checking analysis results.
[0791] A "server" refers to a computer device that receives and analyzes uploaded code, and generates and sends improvement suggestions.
[0792] "Syntax analysis" refers to the process of analyzing the grammar of program code and detecting errors and warnings.
[0793] A "generative AI model" is a pre-trained artificial intelligence model used to analyze code and generate improvement suggestions.
[0794] "Improvement suggestions" refer to specific changes or modifications that would improve the readability, performance, and security of the code.
[0795] A "syntactic analysis tool" is software used to detect grammatical errors and warnings in code, and examples include Pylint and ESLint.
[0796] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. The following components and procedures are necessary to implement this invention.
[0797] Uploading code from user terminals
[0798] The user launches a dedicated application on their device and logs in. After logging in, they click the "Code Upload" button to display a file selection dialog. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This action sends the code file to the server.
[0799] Code reception and parsing on the server
[0800] The server receives the uploaded code file. After receiving it, the server checks the file format and verifies that the uploaded file is a code file. If this verification is successful, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During the analysis process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0801] AI-powered code analysis and improvement suggestions
[0802] Next, the server sends the code to a pre-trained generative AI model. The generative AI model analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0803] Server formatting of results and transmission to the user
[0804] The server receives the analysis results from the generated AI model and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's device.
[0805] User review and correction of results
[0806] The user receives a notification of the analysis results and checks them within the app. Based on the displayed improvement suggestions, the user modifies their code. For example, if it is pointed out that a variable name is meaningless, the user changes the variable name to something more understandable. Also, if optimization of the repetitive structure is suggested, the user refactors the code according to the suggested method.
[0807] Examples of specific cases and prompt statements
[0808] For example, suppose a user uploads a Python file named example.py. This file contains the following:
[0809] python
[0810] def example(a, b):
[0811] result = a + 1
[0812] return result
[0813] Let's assume that the generative AI model generates the following improvement suggestions for this code.
[0814] text
[0815] Line 1: It is recommended to change the function name 'example' to a name with a more concrete meaning.
[0816] Line 1: It is recommended that you change the parameters 'a' and 'b' to names that have specific meanings.
[0817] Line 2: Please consider improving the efficiency of the calculation method.
[0818] Based on these suggestions, the user will modify the code as follows:
[0819] python
[0820] def calculate_sum_and_multiply(addend, factor):
[0821] sum_result = addend + 1
[0822] return sum_result factor
[0823] The following is an example of a prompt message to input into the generative AI model.
[0824] text
[0825] Analyze user-uploaded Python code and generate suggestions for improvements to readability, performance, and security. Please analyze the following code:
[0826] The flow of the specific processing in Example 1 will be explained using Figure 11.
[0827] Step 1:
[0828] The user launches a dedicated application on their device and logs in.
[0829] Input: User authentication information (username, password)
[0830] Action: Enter your username and password on the login screen and click the "Login" button.
[0831] Output: Login success or failure notification
[0832] Step 2:
[0833] The user clicks the "Upload Code" button, which displays a file selection dialog.
[0834] Input: User click operation
[0835] Operation: A file system window appears, and the user selects the code file they want to analyze (e.g., example.py).
[0836] Output: Path to the selected code file
[0837] Step 3:
[0838] The user clicks the "Upload" button to send the selected code file to the server.
[0839] Input: User clicks and selected code file
[0840] Operation: The selected file is uploaded to the server using an HTTP POST request.
[0841] Output: Code file sent to the server
[0842] Step 4:
[0843] The server receives the uploaded code file.
[0844] Input: HTTP POST request and code file data
[0845] Operation: The server receives an HTTP request and saves the file data.
[0846] Output: Saved code file
[0847] Step 5:
[0848] The server checks the file format and verifies that it is a code file.
[0849] Input: Saved code file and its metadata
[0850] Operation: Checks the file extension and verifies whether it is in the correct format (e.g., .py, .js).
[0851] Output: Verification result (Pass or Fail)
[0852] Step 6:
[0853] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax.
[0854] Input: Code files that have passed verification
[0855] Operation: The server runs analysis tools and collects errors and warnings in the code.
[0856] Output: Analysis results (list of errors and warnings)
[0857] Step 7:
[0858] The server sends the code to a pre-trained generative AI model.
[0859] Input: Results of parsing and contents of the code file
[0860] Operation: The server sends code to the generated AI model via an API request, and the model parses the code.
[0861] Output: Analysis results and improvement suggestions from the generated AI model.
[0862] Step 8:
[0863] The server formats the analysis results from the generated AI model.
[0864] Input: Analysis results and improvement suggestions from the generated AI model.
[0865] Operation: The server converts the analysis results into JSON format and formats them into an easy-to-understand format, including specific line numbers and correction methods.
[0866] Output: Formatted analysis results
[0867] Step 9:
[0868] The server sends the formatted analysis results to the user's terminal.
[0869] Input: Formatted analysis results
[0870] Operation: The server sends the formatted result as an HTTP response to the user's application.
[0871] Output: Analysis results displayed in the application on the user's terminal.
[0872] Step 10:
[0873] Users receive notifications of analysis results within the app and can then review the results.
[0874] Input: Notification of analysis results
[0875] Operation: Users can view the analysis results through the application's notification function.
[0876] Output: Analysis results displayed to the user
[0877] Step 11:
[0878] The user modifies the code based on the displayed improvement suggestions.
[0879] Input: Improvement suggestions included in the analysis results
[0880] Operation: The user opens the editor and applies the suggested changes to the code. For example, they might rename variables or optimize loop structures.
[0881] Output: Modified code file
[0882] (Application Example 1)
[0883] Next, we will explain Application Example 1. In the following explanation, 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."
[0884] In modern factory automation, ensuring the quality and security of control codes is extremely important. However, quickly and efficiently detecting and correcting errors and security vulnerabilities hidden in the control codes of factory automation machinery is not easy. Furthermore, manual code review is time-consuming and laborious, placing a heavy burden on programmers and engineers and potentially leading to decreased productivity. Therefore, efficiently improving the quality and security of control codes for factory automation machinery is a key challenge.
[0885] The specific processing performed by the specific processing unit 290 of the data processing device 12 in Application Example 1 is realized by the following means.
[0886] In this invention, the server includes means for a user to upload code from their information processing device, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, means for the server to format the analysis results and send them to the user, and means for the system to suggest security vulnerabilities and performance optimizations when receiving and analyzing control code for factory automation machines. This makes it possible to quickly and efficiently improve the quality and security of control code for factory automation machines.
[0887] A "user" is a person who uses the system to upload code and check the analysis results, or a person who operates an information processing device.
[0888] An "information processing device" is a device used by users to access a system and upload code, and includes personal computers and smartphones.
[0889] "Code" refers to a text file containing a program that controls the operation of automated factory machinery.
[0890] A "server" is a computing system that receives code uploaded by users, analyzes it, and generates improvement suggestions using artificial intelligence.
[0891] "Syntax analysis" is the process of deciphering the structure of code and detecting syntax errors and warnings.
[0892] "Artificial intelligence" is a technology that uses machine learning algorithms to analyze code and suggest improvements.
[0893] "Improvement suggestions" are recommendations for modifications generated by artificial intelligence to improve the quality and security of the code.
[0894] "Analysis results" refer to information about errors, warnings, and areas for improvement obtained after the server has performed syntactic analysis and artificial intelligence analysis.
[0895] "Factory automation machinery" refers to equipment equipped with control devices for performing tasks automatically within a factory, and includes industrial robots and production line machinery.
[0896] A "security hole" is a security vulnerability within control code that could potentially lead to unauthorized access or malfunctions.
[0897] "Performance optimization" refers to methods of modifying code to improve its operational efficiency, including increasing computation speed and reducing resource usage.
[0898] This invention is a system that improves the quality and security of control codes for factory automation machinery by allowing users to upload control codes from their own information processing devices, and a server to analyze those codes and provide improvement suggestions. Specific embodiments of this system are described below.
[0899] The user launches the "RobotCodeReview Plus" application using their own information processing device (PC or smartphone). After logging in within the application, the user clicks the "Code Upload" button, and a file selection dialog appears. Here, the user selects the control code file they want to analyze and clicks the "Upload" button. This sends the control code file to the server.
[0900] After receiving the uploaded code file, the server checks the file format and verifies that it is a control code file. If this verification is successful, the server uses a parsing tool (e.g., Pylint) to parse the code. During the parsing process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[0901] Next, the server sends the code to a pre-trained artificial intelligence model (e.g., a custom PyTorch-based model). The AI model analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0902] The server then receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's information processing device, where the user receives a notification of the analysis results and can view them within the app.
[0903] For example, if a security vulnerability is found in the control code file "robot_code.py", the following improvement suggestions will be displayed:
[0904] "Hardcoded encryption key found. Use environment variables to store encryption keys."
[0905] As a concrete example, we will use the following prompt to analyze an artificial intelligence model:
[0906] "Analyze the following robot control code for any potential security vulnerabilities or optimization opportunities. Provide clear and actionable improvement suggestions.
[0907] Robot Code:
[0908] Code content here
[0909] In this way, by using this system, the burden of human code review can be reduced, and efficient and high-quality code reviews can be achieved. As a result, the quality and security of control code for factory automation machinery are improved, and productivity is increased.
[0910] The flow of a specific process in Application Example 1 will be explained using Figure 12.
[0911] Step 1:
[0912] The user uploads control codes from their own information processing device.
[0913] Input: Control code file (e.g., robot_code.py)
[0914] Output: Code file included in the HTTP request to the server
[0915] Specific operation: The user clicks the "Code Upload" button on the application, and a file selection dialog appears. The user selects the control code file they want to analyze and clicks the "Upload" button. This action sends the control code file to the server.
[0916] Step 2:
[0917] The server receives the uploaded code and performs syntax analysis.
[0918] Input: Control code file sent by the user
[0919] Output: Results of parsing (error list and warning list)
[0920] Specific operation: The server receives an HTTP POST request and retrieves a control code file. It checks the file format and verifies that it contains control codes. After this, the server uses a parsing tool (e.g., Pylint) to parse the code, collects any errors or warnings found, and temporarily stores them in a database.
[0921] Step 3:
[0922] The server sends code to the artificial intelligence model, which then generates improvement suggestions.
[0923] Input: Parsed control codes, and a list of errors and warnings.
[0924] Output: Improvement suggestions generated by artificial intelligence
[0925] Specific operation: The server sends code to a pre-trained artificial intelligence model (e.g., a custom PyTorch-based model). The AI model analyzes the code from the perspectives of readability, performance, and security. Based on the prompt, it performs the analysis and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0926] Step 4:
[0927] The server formats the analysis results and sends them to the user.
[0928] Input: Data for improvement suggestions generated by artificial intelligence.
[0929] Output: Formatted analysis results sent to the user
[0930] Specific operation: The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification methods. The formatted analysis results are then sent back to the user's information processing device.
[0931] Step 5:
[0932] The user modifies the code based on their suggestions.
[0933] Input: Analysis results and improvement suggestions received from the server.
[0934] Output: User-modified control code
[0935] Specific actions: The user receives a notification of the analysis results and checks the results within the application. Based on the displayed improvement suggestions, they modify their control code. For example, if a security vulnerability is identified, the user modifies their code to use environment variables to store the encryption key.
[0936] In this way, by utilizing this system, users can quickly and efficiently improve the quality and security of control codes for factory automation machinery.
[0937] Furthermore, an emotion engine that estimates the user's emotions may be incorporated. That is, the identification processing unit 290 may use the emotion identification model 59 to estimate the user's emotions and perform identification processing using the user's emotions.
[0938] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. Furthermore, by incorporating an emotion engine that recognizes the user's emotions, it is possible to provide optimal feedback that takes the user's emotional state into account. The following components and procedures are necessary to implement this invention.
[0939] Code upload from user devices and emotion recognition
[0940] The user launches the "CodeReview Plus" application on their device and logs in. After logging in, the user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and presses the "Upload" button. This sends the code file to the server. Simultaneously, the emotion engine analyzes the user's facial expressions and voice data to recognize their current emotional state.
[0941] Code reception and parsing on the server
[0942] The server receives the uploaded code file. After receiving it, the server verifies whether the file format is correct. Next, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During this analysis process, syntax errors and warnings are collected and temporarily stored in a database. The overall structure and dependencies of the code are also analyzed.
[0943] AI-powered code analysis and improvement suggestions
[0944] Next, the server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0945] Feedback that takes user sentiment data into account
[0946] In parallel, the server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed or anxious, the server adjusts the analysis results to explain them in a gentle way. Conversely, if the user is relaxed, it can provide detailed, technical feedback.
[0947] Server formatting of results and transmission to the user
[0948] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format, taking sentiment data into consideration. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's device.
[0949] User review and correction of results
[0950] Users receive notifications of analysis results and review them within the app. Based on the displayed improvement suggestions, users modify their code. Specific examples include changing variable names and fixing security vulnerabilities. They can also re-upload their code and repeat the same process as needed.
[0951] ---
[0952] In this way, the present invention reduces the burden of human code review and enables efficient and high-quality code review. Furthermore, by combining it with an emotion engine, it is possible to reduce the psychological burden on users and provide a more stress-free feedback environment. With the above configuration, it is expected that time and costs will be significantly reduced and programmer productivity will be improved.
[0953] The following describes the processing flow.
[0954] Step 1:
[0955] The user launches the "CodeReview Plus" application on their device and logs in. On the login screen, they enter their user ID and password and click the "Login" button.
[0956] Step 2:
[0957] The user clicks the "Upload Code" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button.
[0958] Step 3:
[0959] The device sends a code file to the server. Simultaneously, the device's built-in camera and microphone are used to analyze the user's facial expressions and voice using an emotion engine, generating emotion data.
[0960] Step 4:
[0961] The server receives the uploaded code file. First, it verifies whether the file format is correct. For example, it checks that the content is not empty and that it is written in the specified programming language.
[0962] Step 5:
[0963] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. Syntax errors and warnings found during this analysis are collected and temporarily stored in a database.
[0964] Step 6:
[0965] The server analyzes the overall structure and dependencies of the code. This deepens the understanding of the code and prepares data that makes AI analysis more effective.
[0966] Step 7:
[0967] The server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security.
[0968] Step 8:
[0969] Artificial intelligence generates analysis results and improvement suggestions. These suggestions include methods for refactoring code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[0970] Step 9:
[0971] The server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed, it provides feedback in a gentle tone to avoid misunderstandings.
[0972] Step 10:
[0973] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format, taking sentiment data into consideration. This includes specific code line numbers and instructions on how to make corrections.
[0974] Step 11:
[0975] The server sends the formatted results to the user's device. The user receives a notification of the analysis results and checks them within the app.
[0976] Step 12:
[0977] Users modify the code based on the analysis results. For example, they might change variable names to make them easier to understand or fix security vulnerabilities. They also take appropriate action based on the feedback from the sentiment engine.
[0978] Step 13:
[0979] The user uploads the corrected code again for re-evaluation. This process is repeated as needed.
[0980] The above outlines the specific processing flow for code analysis and improvement suggestions using the "CodeReview Plus" system, which incorporates an emotion engine.
[0981] (Example 2)
[0982] Next, we will describe Example 2. 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."
[0983] Traditional code analysis systems provide syntax analysis and AI-powered improvement suggestions, but they lack the functionality to provide feedback while considering the user's emotional state. Therefore, the feedback a user receives may not always be optimal, potentially causing stress and difficulty in understanding. Furthermore, ignoring the user's emotional state can prevent effective code correction.
[0984] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 2 is realized by the following means.
[0985] In this invention, the server includes means for the user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, and means for the server to format the analysis results considering the user's emotional data and send them to the user. This makes it possible to provide optimal feedback according to the user's emotional state.
[0986] "User terminal" refers to electronic devices operated by a user, such as personal computers, smartphones, and tablets.
[0987] "Code upload" refers to the act of a user sending program code files from their device to a server via the internet.
[0988] A "server" refers to a computer or system that provides services to user terminals via a network.
[0989] "Syntax analysis" refers to the process of analyzing the structure and grammar of program code to detect syntax errors and warnings.
[0990] "Artificial intelligence" refers to a system that uses technologies such as machine learning and deep learning to learn patterns from large amounts of data and perform analysis and decision-making.
[0991] "Improvement suggestions" refer to proposed modifications provided based on the results of analysis by artificial intelligence, considering aspects such as code readability, performance, and security.
[0992] "Emotional data" refers to data that indicates a user's current emotional state, such as information extracted from facial expressions or voice.
[0993] "Feedback" refers to the act of returning information such as analysis results and improvement suggestions to the user.
[0994] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. Furthermore, by combining it with an emotion engine that recognizes the user's emotions, it is possible to provide optimal feedback that takes into account the user's emotional state. A specific embodiment of this system is described below.
[0995] Code upload from user devices and emotion recognition
[0996] The user launches the "Code Review Application" on their device and logs in. After logging in, the user clicks the "Code Upload" button, and when the file selection dialog appears, selects the code file to be analyzed and presses the "Upload" button. This action sends the code file to the server. Simultaneously, the emotion engine uses the camera and microphone to analyze the user's facial expressions and voice data to recognize their current emotional state.
[0997] Code reception and parsing on the server
[0998] The server receives the uploaded code file. After receiving it, the server first verifies whether the file format is correct. Next, the server uses a syntax analysis tool such as Pylint or ESLint to analyze the code's syntax. Syntax errors and warnings detected during this analysis process are temporarily stored in a database. The overall structure and dependencies of the code are also analyzed.
[0999] AI-powered code analysis and improvement suggestions
[1000] Next, the server sends the code to a pre-trained artificial intelligence model. The AI model analyzes the code from the perspectives of readability, performance, and security, and generates specific improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. These analysis results and improvement suggestions are temporarily stored in a database.
[1001] Feedback that takes user sentiment data into account
[1002] In parallel, the server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed or anxious, the server adjusts the analysis results to explain them in a gentle way. Conversely, if the user is relaxed, it can provide detailed, technical feedback.
[1003] Server formatting of results and transmission to the user
[1004] The server receives the analysis results from the artificial intelligence model and, taking into account the user's emotional data, formats them into a user-friendly format. This formatting process includes specific code line numbers, correction methods, and emotionally sensitive feedback. The formatted results are then sent back to the user's device.
[1005] User review and correction of results
[1006] Users receive notifications of analysis results and view them within the app. Based on the displayed improvement suggestions, users modify their code. Specific examples include changing variable names, fixing security vulnerabilities, and refactoring functions. If necessary, they can re-upload and repeat the same process.
[1007] Specific example
[1008] For example, a user launches a "code review application" on their device and uploads a Python file named example.py. The server uses Pylint to parse the code and feeds the results into a pre-trained generative AI model. The generative AI model generates suggestions for improvements regarding readability, performance, and security, and sends these results to the user. Simultaneously, an emotion engine detects if the user is experiencing stress and adjusts the tone of the feedback accordingly.
[1009] Example of a prompt
[1010] The following prompt messages are input into the AI model to generate improvement suggestions.
[1011] Please analyze the Python code uploaded by users and provide improvement suggestions from the following perspectives: (1) Improve readability (2) Optimize performance (3) Fix security vulnerabilities
[1012] Code content:
[1013] As described above, by implementing this invention, it becomes possible to provide optimal feedback that corresponds to the user's emotional state.
[1014] The flow of the specific processing in Example 2 will be explained using Figure 13.
[1015] Step 1:
[1016] The user launches the "Code Review Application" on their device and logs into their account. They enter their username and password on the login screen. This sends the user's authentication information to the server, and if the login is successful, the main screen is displayed (Input: Username, Password) (Output: Login success / failure notification).
[1017] Step 2:
[1018] The user clicks the "Code Upload" button on the main screen, and a file selection dialog appears. The user selects the code file they want to analyze and clicks the "Upload" button. This sends the code file from the terminal to the server (Input: Code file) (Output: Code file sent to the server).
[1019] Step 3:
[1020] The device collects the user's facial expressions and voice data through its camera and microphone and sends it to the emotion engine. The emotion engine analyzes this data to recognize the user's current emotional state (input: facial expression data, voice data) (output: user's emotion data).
[1021] Step 4:
[1022] The server receives the uploaded code file. The server first verifies the file format, and then uses a syntax analysis tool such as Pylint or ESLint to analyze the code's syntax. Syntax errors and warnings detected during this analysis are stored in a database. Furthermore, the overall structure and dependencies of the code are also analyzed (Input: Code file) (Output: Syntax errors, warnings, code structure, dependencies).
[1023] Step 5:
[1024] The server sends the parsing results to a pre-trained artificial intelligence model. The generating AI model analyzes the code from the perspectives of readability, performance, and security, and generates specific improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The analysis results and improvement suggestions are stored in a database (input: parsing results) (output: improvement suggestions).
[1025] Step 6:
[1026] The server incorporates the emotional data received from the emotion engine into the analysis results and adjusts the feedback content according to the user's emotional state. For example, if the user is feeling stressed, the analysis results will be adjusted to be explained in a gentler tone (Input: Improvement suggestions, emotional data) (Output: Emotionally sensitive feedback).
[1027] Step 7:
[1028] The server formats the final analysis results and sends them to the user, including specific code line numbers and suggested corrections. The tone of the feedback is also adjusted, so that feedback is provided in a format that is easy for the user to understand (Input: Improvement suggestions, emotionally sensitive feedback) (Output: Formatted feedback).
[1029] Step 8:
[1030] Users receive notifications within the application and review the analysis results. Based on the suggested improvements, users modify their code. Examples include renaming variables, fixing security vulnerabilities, and refactoring functions (Input: Formatted feedback) (Output: Modified code). If necessary, users can upload the modified code again and repeat the same process (steps 1-8).
[1031] (Application Example 2)
[1032] Next, we will explain application example 2. In the following explanation, 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."
[1033] Traditional code review systems simply provide suggestions for improving code quality and performance, without considering the psychological burden on the user. This could lead to stress and anxiety, potentially reducing work efficiency. This is especially true for highly technical code, such as control code for factory robots, where psychological support for the user is crucial.
[1034] In Application Example 2, the specific processing performed by the specific processing unit 290 of the data processing device 12 is realized by the following means. In this invention, the server includes means for the user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, means for the server to format the analysis results and send them to the user, means for the user to modify the code based on the suggestions, means for the emotion engine to recognize the user's emotional state, and means for providing optimal feedback based on the emotional state. This improves the effectiveness of code reviews and enables efficient feedback while reducing the psychological burden on the user.
[1035] A "code upload method" is a method for a user to send code from their device to a server.
[1036] A "syntactic analysis method" is a method by which a server receives uploaded code and analyzes the grammar and structure of the code.
[1037] The "improvement suggestion generation method" is a method in which artificial intelligence analyzes code and suggests improvements from the perspectives of readability, performance, and security.
[1038] "Analysis result formatting method" refers to a method by which a server formats the analysis results received from artificial intelligence into a format that is easy for the user to understand.
[1039] A "code modification method" is a method for users to modify their own code based on suggestions.
[1040] "Emotion recognition means" refers to a method by which an emotion engine analyzes the user's facial expressions and voice data to recognize their current emotional state.
[1041] An "optimal feedback delivery method" is a method of providing feedback tailored to the user based on the user's emotional state.
[1042] This invention uses the following system and program to realize a process in which a user uploads code from their terminal, the server analyzes it, and artificial intelligence provides improvement suggestions.
[1043] System Configuration
[1044] 1. User terminal:
[1045] Users launch an application that serves as a "code uploading method" using a device such as a smartphone, and upload code files to the server.
[1046] 2. Server:
[1047] The server receives the uploaded code and uses parsing tools such as Pylint or ESLint as its "parsing mechanism" to analyze the code's grammar and structure. The analysis results are temporarily stored in a database.
[1048] 3. Artificial Intelligence:
[1049] The server sends the analyzed code to a pre-trained generative AI model and, as a "means for generating improvement suggestions," proposes improvements from the perspectives of code readability, performance, and security.
[1050] 4. Emotional Engine:
[1051] The user terminal is equipped with a camera and microphone, and as a "means of emotion recognition," it analyzes the user's facial expressions and voice data to detect their emotional state.
[1052] 5. Server feedback generation:
[1053] The server processes the analysis results received from the artificial intelligence, taking into account the user's emotional state, into the most appropriate feedback format. As an "optimal feedback delivery method," it either provides gentle explanations or detailed technical feedback, depending on the emotional data.
[1054] 6. User code modifications:
[1055] Users who receive the analysis results can modify their code based on the suggestions and re-upload it if necessary.
[1056] Hardware and software to be used
[1057] Hardware:
[1058] Smartphone: Camera, microphone
[1059] server
[1060] software:
[1061] OpenCV: Facial Expression Analysis
[1062] EmotionRecognition Library: Emotion Recognition
[1063] Requests Library: Communication with the Server
[1064] Pylint and ESLint: Syntax Analysis
[1065] Database: Temporary storage of analysis results
[1066] Generative AI Model: Improvement suggestions using artificial intelligence
[1067] Specific processing examples
[1068] The user launches the "RoboReview Plus" application on their smartphone, selects and uploads the robot control code file (control_code.rs). The server receives this code and performs syntax analysis. Simultaneously, it uses the smartphone's camera and microphone to recognize the user's emotional state. If the recognized emotion is "anxiety," the server generates gentle and easy-to-understand feedback and sends it to the user. The user modifies the code based on the suggestions and re-uploads it if necessary.
[1069] Example of a prompt
[1070] Examples of prompt messages include the following:
[1071] Create a system that, after a user uploads code, uses emotion recognition to recognize the user's emotional state and provides feedback accordingly. Provide implementation methods and specific code examples for each step.
[1072] As described above, the present invention is a system that uses the latest technology to improve code quality and reduce the psychological burden on users.
[1073] The flow of a specific process in Application Example 2 will be explained using Figure 14.
[1074] Step 1:
[1075] The user launches the application on their device as a "code upload method." The user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., control_code.rs) and presses the "Upload" button. This operation sends the code file from the device to the server. The input is the code file selected by the user, and the output is the file sent to the server.
[1076] Step 2:
[1077] The server receives the uploaded code file and uses parsing tools such as Pylint and ESLint as its "parsing means" to analyze the code's grammar and structure. As a result of the analysis, syntax errors and warnings are collected and temporarily stored in a database. The input is the uploaded code file, and the output is the data from the parsing results.
[1078] Step 3:
[1079] The server sends the analyzed code to a pre-trained generative AI model and generates improvement suggestions from the perspectives of code readability, performance, and security, acting as a "means for generating improvement suggestions." The generated suggestions are stored in a database. The input is the data from the syntactic analysis results, and the output is the data of the AI's improvement suggestions.
[1080] Step 4:
[1081] The user terminal is equipped with a camera and microphone, and as a "means of emotion recognition," the terminal captures the user's facial expressions and voice, and an emotion engine analyzes this data to recognize the user's emotional state. The input is facial expressions and voice data, and the output is the user's emotional state.
[1082] Step 5:
[1083] The server formats the analysis results received from the artificial intelligence and the emotional state data from the emotion engine into a feedback format optimized for the user. As an "optimal feedback delivery method," it generates gentle explanations to reduce the user's stress and anxiety, and detailed technical feedback as needed. The input is the analysis results and emotional state data, and the output is the optimized feedback.
[1084] Step 6:
[1085] The formatted analysis results and improvement suggestions are sent from the server to the user's device. The user receives a notification and checks the results within the app. The user uses the code modification tool to modify the code based on the suggestions and re-uploads it if necessary. The input is the optimized feedback, and the output is the user's modified code.
[1086] The specific processing unit 290 transmits the result of the specific processing to the headset terminal 314. In the headset terminal 314, the control unit 46A causes the speaker 240 and display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating user input for the result of the specific processing. The control unit 46A transmits the audio data indicating user input acquired by the microphone 238 to the data processing unit 12. In the data processing unit 12, the specific processing unit 290 acquires the audio data.
[1087] Data generation model 58 is a type of so-called generative AI (Artificial Intelligence). One example of data generation model 58 is ChatGPT (Internet search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search) <url: https: gemini.google.com ?hl="ja">Examples of generative AI include the following. The data generation model 58 is obtained by performing deep learning on a neural network. The data generation model 58 is input with prompts containing instructions, and with inference data such as audio data representing speech, text data representing text, and image data representing images. The data generation model 58 infers from the input inference data according to the instructions indicated by the prompts, and outputs the inference results in data formats such as audio data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1088] In the above embodiment, an example was given in which specific processing is performed by the data processing device 12, but the technology of this disclosure is not limited thereto, and specific processing may also be performed by the headset terminal 314.
[1089] [Fourth Embodiment]
[1090] Figure 7 shows an example of the configuration of the data processing system 410 according to the fourth embodiment.
[1091] As shown in Figure 7, the 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.
[1092] The data processing device 12 comprises a computer 22, a database 24, and a communication interface 26. The computer 22 is an example of a "computer" related to the technology of this disclosure. The computer 22 comprises a processor 28, RAM 30, and storage 32. The processor 28, RAM 30, and storage 32 are connected to a bus 34. The database 24 and the communication interface 26 are also connected to the bus 34. The communication interface 26 is connected to a network 54. An example of the network 54 is a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[1093] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication interface 44, and a controlled object 443. The computer 36 includes a processor 46, RAM 48, and storage 50. The processor 46, RAM 48, and storage 50 are connected to a bus 52. The microphone 238, speaker 240, camera 42, and controlled object 443 are also connected to the bus 52.
[1094] The microphone 238 receives voice signals from the user 20 and receives instructions from the user 20. The microphone 238 captures the voice signals from the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio according to the instructions from the processor 46.
[1095] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an image sensor such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the area around the user 20 (for example, an imaging range defined by a field of view equivalent to the width of a typical healthy person's field of vision).
[1096] Communication interface 44 is connected to network 54. Communication interfaces 44 and 26 are responsible for the exchange of various information between processor 46 and processor 28 via network 54. The exchange of various information between processor 46 and processor 28 using communication interfaces 44 and 26 is performed in a secure manner.
[1097] The controlled object 443 includes a display device, LEDs in the eyes, and motors that drive 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 robot 414's emotions can be expressed by controlling these motors. Furthermore, the robot 414's facial expressions can also be expressed by controlling the illumination state of the LEDs in its eyes.
[1098] Figure 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Figure 8, the data processing device 12 performs specific processing using the processor 28. The storage 32 stores the specific processing program 56.
[1099] The specific processing program 56 is an example of a "program" relating to the technology of this 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.
[1100] The storage 32 stores the data generation model 58 and the emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1101] In robot 414, the processor 46 performs the reception output processing. The storage 50 stores the reception output program 60. 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 processing is realized by the processor 46 operating as a control unit 46A according to the reception output program 60 executed on the RAM 48.
[1102] Next, the specific processing performed by the specific processing unit 290 of the data processing device 12 will be described. In the following description, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".
[1103] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. The following components and procedures are necessary to implement this invention.
[1104] Uploading code from user terminals
[1105] The user launches the "CodeReview Plus" application on their device and logs in. After logging in, the user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This sends the code file to the server.
[1106] Code reception and parsing on the server
[1107] The server receives the uploaded code file. After receiving it, the server checks the file format and verifies that it is a code file. If this verification is successful, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During the analysis process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[1108] AI-powered code analysis and improvement suggestions
[1109] Next, the server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[1110] Server formatting of results and transmission to the user
[1111] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's terminal.
[1112] User review and correction of results
[1113] The user receives a notification of the analysis results and checks them within the app. Based on the displayed improvement suggestions, the user modifies their code. For example, if it is pointed out that a variable name is meaningless, the user changes the variable name to something more understandable. Also, if optimization of the repetitive structure is suggested, the user refactors the code according to the suggested method.
[1114] ---
[1115] In this way, the present invention reduces the burden of human code review and enables efficient and high-quality code review. As a result, time and costs are significantly reduced, and programmer productivity is improved.
[1116] The following describes the processing flow.
[1117] Step 1:
[1118] The user launches the "CodeReview Plus" application on their device and logs in.
[1119] Step 2:
[1120] The user clicks the "Upload Code" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This action sends the code file to the server.
[1121] Step 3:
[1122] The server receives the uploaded code file. After receiving it, the server verifies whether the file format is correct.
[1123] Step 4:
[1124] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During this analysis, syntax errors and warnings are collected and temporarily stored in a database.
[1125] Step 5:
[1126] The server analyzes the overall structure and dependencies of the code. This prepares the data so that the AI can gain a deep understanding of the code.
[1127] Step 6:
[1128] The server sends the code to the artificial intelligence model. The pre-trained AI model analyzes the code from the perspectives of readability, performance, and security.
[1129] Step 7:
[1130] Artificial intelligence generates analysis results and improvement suggestions. The generated analysis results and improvement suggestions are temporarily stored in a database.
[1131] Step 8:
[1132] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and instructions on how to make corrections.
[1133] Step 9:
[1134] The formatted results are sent to the user's device. The user receives a notification of the analysis results and checks them within the app.
[1135] Step 10:
[1136] The user modifies the code based on the analysis results. For example, this might involve changing variable names or fixing security vulnerabilities.
[1137] Step 11:
[1138] The user uploads the revised code again, and the same process is repeated for re-evaluation. This process can be repeated until the result is satisfactory.
[1139] The above outlines the specific process flow from when a user uses "CodeReview Plus" to analyze their code and receive improvement suggestions.
[1140] (Example 1)
[1141] Next, we will describe Example 1. In the following description, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".
[1142] In software development, code review is a crucial process for maintaining quality. However, manual code review is time-consuming and labor-intensive, and the accuracy of the review depends on the reviewer's skills. Furthermore, when dealing with a large volume of code, it is difficult to comprehensively review all of it. This increases the likelihood of bugs and security vulnerabilities being overlooked, potentially leading to a decline in software quality and development delays.
[1143] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 1 is realized by the following means.
[1144] In this invention, the server includes means for a user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for the server to send the code to a pre-trained generative AI model to generate analysis and improvement suggestions, means for the server to format the analysis results and send them to the user, and means for the user to modify the code based on the suggestions. This reduces the burden of human review and enables efficient and high-quality code review.
[1145] A "user terminal" refers to a computer device used by the user for operations such as uploading code or checking analysis results.
[1146] A "server" refers to a computer device that receives and analyzes uploaded code, and generates and sends improvement suggestions.
[1147] "Syntax analysis" refers to the process of analyzing the grammar of program code and detecting errors and warnings.
[1148] A "generative AI model" is a pre-trained artificial intelligence model used to analyze code and generate improvement suggestions.
[1149] "Improvement suggestions" refer to specific changes or modifications that would improve the readability, performance, and security of the code.
[1150] A "syntactic analysis tool" is software used to detect grammatical errors and warnings in code, and examples include Pylint and ESLint.
[1151] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. The following components and procedures are necessary to implement this invention.
[1152] Uploading code from user terminals
[1153] The user launches a dedicated application on their device and logs in. After logging in, they click the "Code Upload" button to display a file selection dialog. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button. This action sends the code file to the server.
[1154] Code reception and parsing on the server
[1155] The server receives the uploaded code file. After receiving it, the server checks the file format and verifies that the uploaded file is a code file. If this verification is successful, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During the analysis process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[1156] AI-powered code analysis and improvement suggestions
[1157] Next, the server sends the code to a pre-trained generative AI model. The generative AI model analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[1158] Server formatting of results and transmission to the user
[1159] The server receives the analysis results from the generated AI model and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's device.
[1160] User review and correction of results
[1161] The user receives a notification of the analysis results and checks them within the app. Based on the displayed improvement suggestions, the user modifies their code. For example, if it is pointed out that a variable name is meaningless, the user changes the variable name to something more understandable. Also, if optimization of the repetitive structure is suggested, the user refactors the code according to the suggested method.
[1162] Examples of specific cases and prompt statements
[1163] For example, suppose a user uploads a Python file named example.py. This file contains the following:
[1164] python
[1165] def example(a, b):
[1166] result = a + 1
[1167] return result
[1168] Let's assume that the generative AI model generates the following improvement suggestions for this code.
[1169] text
[1170] Line 1: It is recommended to change the function name 'example' to a name with a more concrete meaning.
[1171] Line 1: It is recommended that you change the parameters 'a' and 'b' to names that have specific meanings.
[1172] Line 2: Please consider improving the efficiency of the calculation method.
[1173] Based on these suggestions, the user will modify the code as follows:
[1174] python
[1175] def calculate_sum_and_multiply(addend, factor):
[1176] sum_result = addend + 1
[1177] return sum_result factor
[1178] The following is an example of a prompt message to input into the generative AI model.
[1179] text
[1180] Analyze user-uploaded Python code and generate suggestions for improvements to readability, performance, and security. Please analyze the following code:
[1181] The flow of the specific processing in Example 1 will be explained using Figure 11.
[1182] Step 1:
[1183] The user launches a dedicated application on their device and logs in.
[1184] Input: User authentication information (username, password)
[1185] Action: Enter your username and password on the login screen and click the "Login" button.
[1186] Output: Login success or failure notification
[1187] Step 2:
[1188] The user clicks the "Upload Code" button, which displays a file selection dialog.
[1189] Input: User click operation
[1190] Operation: A file system window appears, and the user selects the code file they want to analyze (e.g., example.py).
[1191] Output: Path to the selected code file
[1192] Step 3:
[1193] The user clicks the "Upload" button to send the selected code file to the server.
[1194] Input: User clicks and selected code file
[1195] Operation: The selected file is uploaded to the server using an HTTP POST request.
[1196] Output: Code file sent to the server
[1197] Step 4:
[1198] The server receives the uploaded code file.
[1199] Input: HTTP POST request and code file data
[1200] Operation: The server receives an HTTP request and saves the file data.
[1201] Output: Saved code file
[1202] Step 5:
[1203] The server checks the file format and verifies that it is a code file.
[1204] Input: Saved code file and its metadata
[1205] Operation: Checks the file extension and verifies whether it is in the correct format (e.g., .py, .js).
[1206] Output: Verification result (Pass or Fail)
[1207] Step 6:
[1208] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax.
[1209] Input: Code files that have passed verification
[1210] Operation: The server runs analysis tools and collects errors and warnings in the code.
[1211] Output: Analysis results (list of errors and warnings)
[1212] Step 7:
[1213] The server sends the code to a pre-trained generative AI model.
[1214] Input: Results of parsing and contents of the code file
[1215] Operation: The server sends code to the generated AI model via an API request, and the model parses the code.
[1216] Output: Analysis results and improvement suggestions from the generated AI model.
[1217] Step 8:
[1218] The server formats the analysis results from the generated AI model.
[1219] Input: Analysis results and improvement suggestions from the generated AI model.
[1220] Operation: The server converts the analysis results into JSON format and formats them into an easy-to-understand format, including specific line numbers and correction methods.
[1221] Output: Formatted analysis results
[1222] Step 9:
[1223] The server sends the formatted analysis results to the user's terminal.
[1224] Input: Formatted analysis results
[1225] Operation: The server sends the formatted result as an HTTP response to the user's application.
[1226] Output: Analysis results displayed in the application on the user's terminal.
[1227] Step 10:
[1228] Users receive notifications of analysis results within the app and can then review the results.
[1229] Input: Notification of analysis results
[1230] Operation: Users can view the analysis results through the application's notification function.
[1231] Output: Analysis results displayed to the user
[1232] Step 11:
[1233] The user modifies the code based on the displayed improvement suggestions.
[1234] Input: Improvement suggestions included in the analysis results
[1235] Operation: The user opens the editor and applies the suggested changes to the code. For example, they might rename variables or optimize loop structures.
[1236] Output: Modified code file
[1237] (Application Example 1)
[1238] Next, we will explain Application Example 1. In the following explanation, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".
[1239] In modern factory automation, ensuring the quality and security of control codes is extremely important. However, quickly and efficiently detecting and correcting errors and security vulnerabilities hidden in the control codes of factory automation machinery is not easy. Furthermore, manual code review is time-consuming and laborious, placing a heavy burden on programmers and engineers and potentially leading to decreased productivity. Therefore, efficiently improving the quality and security of control codes for factory automation machinery is a key challenge.
[1240] The specific processing performed by the specific processing unit 290 of the data processing device 12 in Application Example 1 is realized by the following means.
[1241] In this invention, the server includes means for a user to upload code from their information processing device, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, means for the server to format the analysis results and send them to the user, and means for the system to suggest security vulnerabilities and performance optimizations when receiving and analyzing control code for factory automation machines. This makes it possible to quickly and efficiently improve the quality and security of control code for factory automation machines.
[1242] A "user" is a person who uses the system to upload code and check the analysis results, or a person who operates an information processing device.
[1243] An "information processing device" is a device used by users to access a system and upload code, and includes personal computers and smartphones.
[1244] "Code" refers to a text file containing a program that controls the operation of automated factory machinery.
[1245] A "server" is a computing system that receives code uploaded by users, analyzes it, and generates improvement suggestions using artificial intelligence.
[1246] "Syntax analysis" is the process of deciphering the structure of code and detecting syntax errors and warnings.
[1247] "Artificial intelligence" is a technology that uses machine learning algorithms to analyze code and suggest improvements.
[1248] "Improvement suggestions" are recommendations for modifications generated by artificial intelligence to improve the quality and security of the code.
[1249] "Analysis results" refer to information about errors, warnings, and areas for improvement obtained after the server has performed syntactic analysis and artificial intelligence analysis.
[1250] "Factory automation machinery" refers to equipment equipped with control devices for performing tasks automatically within a factory, and includes industrial robots and production line machinery.
[1251] A "security hole" is a security vulnerability within control code that could potentially lead to unauthorized access or malfunctions.
[1252] "Performance optimization" refers to methods of modifying code to improve its operational efficiency, including increasing computation speed and reducing resource usage.
[1253] This invention is a system that improves the quality and security of control codes for factory automation machinery by allowing users to upload control codes from their own information processing devices, and a server to analyze those codes and provide improvement suggestions. Specific embodiments of this system are described below.
[1254] The user launches the "RobotCodeReview Plus" application using their own information processing device (PC or smartphone). After logging in within the application, the user clicks the "Code Upload" button, and a file selection dialog appears. Here, the user selects the control code file they want to analyze and clicks the "Upload" button. This sends the control code file to the server.
[1255] After receiving the uploaded code file, the server checks the file format and verifies that it is a control code file. If this verification is successful, the server uses a parsing tool (e.g., Pylint) to parse the code. During the parsing process, the server collects any errors or warnings it detects and temporarily stores them in a database. The overall structure and dependencies of the code are also analyzed.
[1256] Next, the server sends the code to a pre-trained artificial intelligence model (e.g., a custom PyTorch-based model). The AI model analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[1257] The server then receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's information processing device, where the user receives a notification of the analysis results and can view them within the app.
[1258] For example, if a security vulnerability is found in the control code file "robot_code.py", the following improvement suggestions will be displayed:
[1259] "Hardcoded encryption key found. Use environment variables to store encryption keys."
[1260] As a concrete example, we will use the following prompt to analyze an artificial intelligence model:
[1261] "Analyze the following robot control code for any potential security vulnerabilities or optimization opportunities. Provide clear and actionable improvement suggestions.
[1262] Robot Code:
[1263] Code content here
[1264] In this way, by using this system, the burden of human code review can be reduced, and efficient and high-quality code reviews can be achieved. As a result, the quality and security of control code for factory automation machinery are improved, and productivity is increased.
[1265] The flow of a specific process in Application Example 1 will be explained using Figure 12.
[1266] Step 1:
[1267] The user uploads control codes from their own information processing device.
[1268] Input: Control code file (e.g., robot_code.py)
[1269] Output: Code file included in the HTTP request to the server
[1270] Specific operation: The user clicks the "Code Upload" button on the application, and a file selection dialog appears. The user selects the control code file they want to analyze and clicks the "Upload" button. This action sends the control code file to the server.
[1271] Step 2:
[1272] The server receives the uploaded code and performs syntax analysis.
[1273] Input: Control code file sent by the user
[1274] Output: Results of parsing (error list and warning list)
[1275] Specific operation: The server receives an HTTP POST request and retrieves a control code file. It checks the file format and verifies that it contains control codes. After this, the server uses a parsing tool (e.g., Pylint) to parse the code, collects any errors or warnings found, and temporarily stores them in a database.
[1276] Step 3:
[1277] The server sends code to the artificial intelligence model, which then generates improvement suggestions.
[1278] Input: Parsed control codes, and a list of errors and warnings.
[1279] Output: Improvement suggestions generated by artificial intelligence
[1280] Specific operation: The server sends code to a pre-trained artificial intelligence model (e.g., a custom PyTorch-based model). The AI model analyzes the code from the perspectives of readability, performance, and security. Based on the prompt, it performs the analysis and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[1281] Step 4:
[1282] The server formats the analysis results and sends them to the user.
[1283] Input: Data for improvement suggestions generated by artificial intelligence.
[1284] Output: Formatted analysis results sent to the user
[1285] Specific operation: The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format. This formatting includes specific code line numbers and modification methods. The formatted analysis results are then sent back to the user's information processing device.
[1286] Step 5:
[1287] The user modifies the code based on their suggestions.
[1288] Input: Analysis results and improvement suggestions received from the server.
[1289] Output: User-modified control code
[1290] Specific actions: The user receives a notification of the analysis results and checks the results within the application. Based on the displayed improvement suggestions, they modify their control code. For example, if a security vulnerability is identified, the user modifies their code to use environment variables to store the encryption key.
[1291] In this way, by utilizing this system, users can quickly and efficiently improve the quality and security of control codes for factory automation machinery.
[1292] Furthermore, an emotion engine that estimates the user's emotions may be incorporated. That is, the identification processing unit 290 may use the emotion identification model 59 to estimate the user's emotions and perform identification processing using the user's emotions.
[1293] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. Furthermore, by incorporating an emotion engine that recognizes the user's emotions, it is possible to provide optimal feedback that takes the user's emotional state into account. The following components and procedures are necessary to implement this invention.
[1294] Code upload from user devices and emotion recognition
[1295] The user launches the "CodeReview Plus" application on their device and logs in. After logging in, the user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and presses the "Upload" button. This sends the code file to the server. Simultaneously, the emotion engine analyzes the user's facial expressions and voice data to recognize their current emotional state.
[1296] Code reception and parsing on the server
[1297] The server receives the uploaded code file. After receiving it, the server verifies whether the file format is correct. Next, the server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. During this analysis process, syntax errors and warnings are collected and temporarily stored in a database. The overall structure and dependencies of the code are also analyzed.
[1298] AI-powered code analysis and improvement suggestions
[1299] Next, the server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security, and generates improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[1300] Feedback that takes user sentiment data into account
[1301] In parallel, the server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed or anxious, the server adjusts the analysis results to explain them in a gentle way. Conversely, if the user is relaxed, it can provide detailed, technical feedback.
[1302] Server formatting of results and transmission to the user
[1303] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format, taking sentiment data into consideration. This formatting includes specific code line numbers and modification instructions. The formatted results are then sent back to the user's device.
[1304] User review and correction of results
[1305] Users receive notifications of analysis results and review them within the app. Based on the displayed improvement suggestions, users modify their code. Specific examples include changing variable names and fixing security vulnerabilities. They can also re-upload their code and repeat the same process as needed.
[1306] ---
[1307] In this way, the present invention reduces the burden of human code review and enables efficient and high-quality code review. Furthermore, by combining it with an emotion engine, it is possible to reduce the psychological burden on users and provide a more stress-free feedback environment. With the above configuration, it is expected that time and costs will be significantly reduced and programmer productivity will be improved.
[1308] The following describes the processing flow.
[1309] Step 1:
[1310] The user launches the "CodeReview Plus" application on their device and logs in. On the login screen, they enter their user ID and password and click the "Login" button.
[1311] Step 2:
[1312] The user clicks the "Upload Code" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., example.py) and clicks the "Upload" button.
[1313] Step 3:
[1314] The device sends a code file to the server. Simultaneously, the device's built-in camera and microphone are used to analyze the user's facial expressions and voice using an emotion engine, generating emotion data.
[1315] Step 4:
[1316] The server receives the uploaded code file. First, it verifies whether the file format is correct. For example, it checks that the content is not empty and that it is written in the specified programming language.
[1317] Step 5:
[1318] The server uses a syntax analysis tool (e.g., Pylint or ESLint) to analyze the code's syntax. Syntax errors and warnings found during this analysis are collected and temporarily stored in a database.
[1319] Step 6:
[1320] The server analyzes the overall structure and dependencies of the code. This deepens the understanding of the code and prepares data that makes AI analysis more effective.
[1321] Step 7:
[1322] The server sends the code to a pre-trained artificial intelligence model. The AI analyzes the code from the perspectives of readability, performance, and security.
[1323] Step 8:
[1324] Artificial intelligence generates analysis results and improvement suggestions. These suggestions include methods for refactoring code, fixing security vulnerabilities, and optimizing performance. The generated analysis results and improvement suggestions are temporarily stored in a database.
[1325] Step 9:
[1326] The server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed, it provides feedback in a gentle tone to avoid misunderstandings.
[1327] Step 10:
[1328] The server receives the analysis results from the artificial intelligence and formats them into a user-friendly format, taking sentiment data into consideration. This includes specific code line numbers and instructions on how to make corrections.
[1329] Step 11:
[1330] The server sends the formatted results to the user's device. The user receives a notification of the analysis results and checks them within the app.
[1331] Step 12:
[1332] Users modify the code based on the analysis results. For example, they might change variable names to make them easier to understand or fix security vulnerabilities. They also take appropriate action based on the feedback from the sentiment engine.
[1333] Step 13:
[1334] The user uploads the corrected code again for re-evaluation. This process is repeated as needed.
[1335] The above outlines the specific processing flow for code analysis and improvement suggestions using the "CodeReview Plus" system, which incorporates an emotion engine.
[1336] (Example 2)
[1337] Next, we will describe Example 2. In the following description, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".
[1338] Traditional code analysis systems provide syntax analysis and AI-powered improvement suggestions, but they lack the functionality to provide feedback while considering the user's emotional state. Therefore, the feedback a user receives may not always be optimal, potentially causing stress and difficulty in understanding. Furthermore, ignoring the user's emotional state can prevent effective code correction.
[1339] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 2 is realized by the following means.
[1340] In this invention, the server includes means for the user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, and means for the server to format the analysis results considering the user's emotional data and send them to the user. This makes it possible to provide optimal feedback according to the user's emotional state.
[1341] "User terminal" refers to electronic devices operated by a user, such as personal computers, smartphones, and tablets.
[1342] "Code upload" refers to the act of a user sending program code files from their device to a server via the internet.
[1343] A "server" refers to a computer or system that provides services to user terminals via a network.
[1344] "Syntax analysis" refers to the process of analyzing the structure and grammar of program code to detect syntax errors and warnings.
[1345] "Artificial intelligence" refers to a system that uses technologies such as machine learning and deep learning to learn patterns from large amounts of data and perform analysis and decision-making.
[1346] "Improvement suggestions" refer to proposed modifications provided based on the results of analysis by artificial intelligence, considering aspects such as code readability, performance, and security.
[1347] "Emotional data" refers to data that indicates a user's current emotional state, such as information extracted from facial expressions or voice.
[1348] "Feedback" refers to the act of returning information such as analysis results and improvement suggestions to the user.
[1349] This invention is a system in which a user uploads code from their device, the server analyzes it, and artificial intelligence provides the user with improvement suggestions. Furthermore, by combining it with an emotion engine that recognizes the user's emotions, it is possible to provide optimal feedback that takes into account the user's emotional state. A specific embodiment of this system is described below.
[1350] Code upload from user devices and emotion recognition
[1351] The user launches the "Code Review Application" on their device and logs in. After logging in, the user clicks the "Code Upload" button, and when the file selection dialog appears, selects the code file to be analyzed and presses the "Upload" button. This action sends the code file to the server. Simultaneously, the emotion engine uses the camera and microphone to analyze the user's facial expressions and voice data to recognize their current emotional state.
[1352] Code reception and parsing on the server
[1353] The server receives the uploaded code file. After receiving it, the server first verifies whether the file format is correct. Next, the server uses a syntax analysis tool such as Pylint or ESLint to analyze the code's syntax. Syntax errors and warnings detected during this analysis process are temporarily stored in a database. The overall structure and dependencies of the code are also analyzed.
[1354] AI-powered code analysis and improvement suggestions
[1355] Next, the server sends the code to a pre-trained artificial intelligence model. The AI model analyzes the code from the perspectives of readability, performance, and security, and generates specific improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. These analysis results and improvement suggestions are temporarily stored in a database.
[1356] Feedback that takes user sentiment data into account
[1357] In parallel, the server uses the emotional data received from the user's emotion engine to analyze it. For example, if the user is feeling stressed or anxious, the server adjusts the analysis results to explain them in a gentle way. Conversely, if the user is relaxed, it can provide detailed, technical feedback.
[1358] Server formatting of results and transmission to the user
[1359] The server receives the analysis results from the artificial intelligence model and, taking into account the user's emotional data, formats them into a user-friendly format. This formatting process includes specific code line numbers, correction methods, and emotionally sensitive feedback. The formatted results are then sent back to the user's device.
[1360] User review and correction of results
[1361] Users receive notifications of analysis results and view them within the app. Based on the displayed improvement suggestions, users modify their code. Specific examples include changing variable names, fixing security vulnerabilities, and refactoring functions. If necessary, they can re-upload and repeat the same process.
[1362] Specific example
[1363] For example, a user launches a "code review application" on their device and uploads a Python file named example.py. The server uses Pylint to parse the code and feeds the results into a pre-trained generative AI model. The generative AI model generates suggestions for improvements regarding readability, performance, and security, and sends these results to the user. Simultaneously, an emotion engine detects if the user is experiencing stress and adjusts the tone of the feedback accordingly.
[1364] Example of a prompt
[1365] The following prompt messages are input into the AI model to generate improvement suggestions.
[1366] Please analyze the Python code uploaded by users and provide improvement suggestions from the following perspectives: (1) Improve readability (2) Optimize performance (3) Fix security vulnerabilities
[1367] Code content:
[1368] As described above, by implementing this invention, it becomes possible to provide optimal feedback that corresponds to the user's emotional state.
[1369] The flow of the specific processing in Example 2 will be explained using Figure 13.
[1370] Step 1:
[1371] The user launches the "Code Review Application" on their device and logs into their account. They enter their username and password on the login screen. This sends the user's authentication information to the server, and if the login is successful, the main screen is displayed (Input: Username, Password) (Output: Login success / failure notification).
[1372] Step 2:
[1373] The user clicks the "Code Upload" button on the main screen, and a file selection dialog appears. The user selects the code file they want to analyze and clicks the "Upload" button. This sends the code file from the terminal to the server (Input: Code file) (Output: Code file sent to the server).
[1374] Step 3:
[1375] The device collects the user's facial expressions and voice data through its camera and microphone and sends it to the emotion engine. The emotion engine analyzes this data to recognize the user's current emotional state (input: facial expression data, voice data) (output: user's emotion data).
[1376] Step 4:
[1377] The server receives the uploaded code file. The server first verifies the file format, and then uses a syntax analysis tool such as Pylint or ESLint to analyze the code's syntax. Syntax errors and warnings detected during this analysis are stored in a database. Furthermore, the overall structure and dependencies of the code are also analyzed (Input: Code file) (Output: Syntax errors, warnings, code structure, dependencies).
[1378] Step 5:
[1379] The server sends the parsing results to a pre-trained artificial intelligence model. The generating AI model analyzes the code from the perspectives of readability, performance, and security, and generates specific improvement suggestions. These suggestions include methods for refactoring the code, fixing security vulnerabilities, and optimizing performance. The analysis results and improvement suggestions are stored in a database (input: parsing results) (output: improvement suggestions).
[1380] Step 6:
[1381] The server incorporates the emotional data received from the emotion engine into the analysis results and adjusts the feedback content according to the user's emotional state. For example, if the user is feeling stressed, the analysis results will be adjusted to be explained in a gentler tone (Input: Improvement suggestions, emotional data) (Output: Emotionally sensitive feedback).
[1382] Step 7:
[1383] The server formats the final analysis results and sends them to the user, including specific code line numbers and suggested corrections. The tone of the feedback is also adjusted, so that feedback is provided in a format that is easy for the user to understand (Input: Improvement suggestions, emotionally sensitive feedback) (Output: Formatted feedback).
[1384] Step 8:
[1385] Users receive notifications within the application and review the analysis results. Based on the suggested improvements, users modify their code. Examples include renaming variables, fixing security vulnerabilities, and refactoring functions (Input: Formatted feedback) (Output: Modified code). If necessary, users can upload the modified code again and repeat the same process (steps 1-8).
[1386] (Application Example 2)
[1387] Next, we will explain application example 2. In the following explanation, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".
[1388] Traditional code review systems simply provide suggestions for improving code quality and performance, without considering the psychological burden on the user. This could lead to stress and anxiety, potentially reducing work efficiency. This is especially true for highly technical code, such as control code for factory robots, where psychological support for the user is crucial.
[1389] In Application Example 2, the specific processing performed by the specific processing unit 290 of the data processing device 12 is realized by the following means. In this invention, the server includes means for the user to upload code from their terminal, means for the server to receive the uploaded code and perform syntactic analysis, means for artificial intelligence to analyze the code and generate improvement suggestions, means for the server to format the analysis results and send them to the user, means for the user to modify the code based on the suggestions, means for the emotion engine to recognize the user's emotional state, and means for providing optimal feedback based on the emotional state. This improves the effectiveness of code reviews and enables efficient feedback while reducing the psychological burden on the user.
[1390] A "code upload method" is a method for a user to send code from their device to a server.
[1391] A "syntactic analysis method" is a method by which a server receives uploaded code and analyzes the grammar and structure of the code.
[1392] The "improvement suggestion generation method" is a method in which artificial intelligence analyzes code and suggests improvements from the perspectives of readability, performance, and security.
[1393] "Analysis result formatting method" refers to a method by which a server formats the analysis results received from artificial intelligence into a format that is easy for the user to understand.
[1394] A "code modification method" is a method for users to modify their own code based on suggestions.
[1395] "Emotion recognition means" refers to a method by which an emotion engine analyzes the user's facial expressions and voice data to recognize their current emotional state.
[1396] An "optimal feedback delivery method" is a method of providing feedback tailored to the user based on the user's emotional state.
[1397] This invention uses the following system and program to realize a process in which a user uploads code from their terminal, the server analyzes it, and artificial intelligence provides improvement suggestions.
[1398] System Configuration
[1399] 1. User terminal:
[1400] Users launch an application that serves as a "code uploading method" using a device such as a smartphone, and upload code files to the server.
[1401] 2. Server:
[1402] The server receives the uploaded code and uses parsing tools such as Pylint or ESLint as its "parsing mechanism" to analyze the code's grammar and structure. The analysis results are temporarily stored in a database.
[1403] 3. Artificial Intelligence:
[1404] The server sends the analyzed code to a pre-trained generative AI model and, as a "means for generating improvement suggestions," proposes improvements from the perspectives of code readability, performance, and security.
[1405] 4. Emotional Engine:
[1406] The user terminal is equipped with a camera and microphone, and as a "means of emotion recognition," it analyzes the user's facial expressions and voice data to detect their emotional state.
[1407] 5. Server feedback generation:
[1408] The server processes the analysis results received from the artificial intelligence, taking into account the user's emotional state, into the most appropriate feedback format. As an "optimal feedback delivery method," it either provides gentle explanations or detailed technical feedback, depending on the emotional data.
[1409] 6. User code modifications:
[1410] Users who receive the analysis results can modify their code based on the suggestions and re-upload it if necessary.
[1411] Hardware and software to be used
[1412] Hardware:
[1413] Smartphone: Camera, microphone
[1414] server
[1415] software:
[1416] OpenCV: Facial Expression Analysis
[1417] EmotionRecognition Library: Emotion Recognition
[1418] Requests Library: Communication with the Server
[1419] Pylint and ESLint: Syntax Analysis
[1420] Database: Temporary storage of analysis results
[1421] Generative AI Model: Improvement suggestions using artificial intelligence
[1422] Specific processing examples
[1423] The user launches the "RoboReview Plus" application on their smartphone, selects and uploads the robot control code file (control_code.rs). The server receives this code and performs syntax analysis. Simultaneously, it uses the smartphone's camera and microphone to recognize the user's emotional state. If the recognized emotion is "anxiety," the server generates gentle and easy-to-understand feedback and sends it to the user. The user modifies the code based on the suggestions and re-uploads it if necessary.
[1424] Example of a prompt
[1425] Examples of prompt messages include the following:
[1426] Create a system that, after a user uploads code, uses emotion recognition to recognize the user's emotional state and provides feedback accordingly. Provide implementation methods and specific code examples for each step.
[1427] As described above, the present invention is a system that uses the latest technology to improve code quality and reduce the psychological burden on users.
[1428] The flow of a specific process in Application Example 2 will be explained using Figure 14.
[1429] Step 1:
[1430] The user launches the application on their device as a "code upload method." The user clicks the "Code Upload" button, and a file selection dialog appears. The user selects the code file they want to analyze (e.g., control_code.rs) and presses the "Upload" button. This operation sends the code file from the device to the server. The input is the code file selected by the user, and the output is the file sent to the server.
[1431] Step 2:
[1432] The server receives the uploaded code file and uses parsing tools such as Pylint and ESLint as its "parsing means" to analyze the code's grammar and structure. As a result of the analysis, syntax errors and warnings are collected and temporarily stored in a database. The input is the uploaded code file, and the output is the data from the parsing results.
[1433] Step 3:
[1434] The server sends the analyzed code to a pre-trained generative AI model and generates improvement suggestions from the perspectives of code readability, performance, and security, acting as a "means for generating improvement suggestions." The generated suggestions are stored in a database. The input is the data from the syntactic analysis results, and the output is the data of the AI's improvement suggestions.
[1435] Step 4:
[1436] The user terminal is equipped with a camera and microphone, and as a "means of emotion recognition," the terminal captures the user's facial expressions and voice, and an emotion engine analyzes this data to recognize the user's emotional state. The input is facial expressions and voice data, and the output is the user's emotional state.
[1437] Step 5:
[1438] The server formats the analysis results received from the artificial intelligence and the emotional state data from the emotion engine into a feedback format optimized for the user. As an "optimal feedback delivery method," it generates gentle explanations to reduce the user's stress and anxiety, and detailed technical feedback as needed. The input is the analysis results and emotional state data, and the output is the optimized feedback.
[1439] Step 6:
[1440] The formatted analysis results and improvement suggestions are sent from the server to the user's device. The user receives a notification and checks the results within the app. The user uses the code modification tool to modify the code based on the suggestions and re-uploads it if necessary. The input is the optimized feedback, and the output is the user's modified code.
[1441] 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 controlled object 443 to output the result of the specific processing. The microphone 238 acquires audio indicating user input for the result of the specific processing. The control unit 46A transmits the audio data indicating user input acquired by the microphone 238 to the data processing unit 12. In the data processing unit 12, the specific processing unit 290 acquires the audio data.
[1442] Data generation model 58 is a type of so-called generative AI (Artificial Intelligence). One example of data generation model 58 is ChatGPT (Internet search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search) <url: https: gemini.google.com ?hl="ja">Examples of generative AI include the following. The data generation model 58 is obtained by performing deep learning on a neural network. The data generation model 58 is input with prompts containing instructions, and with inference data such as audio data representing speech, text data representing text, and image data representing images. The data generation model 58 infers from the input inference data according to the instructions indicated by the prompts, and outputs the inference results in data formats such as audio data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1443] 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 this disclosure is not limited thereto, and the specific processing may also be performed by the robot 414.
[1444] Furthermore, the emotion identification model 59, acting 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 a specific mapping, which is an emotion map (see Figure 9). Similarly, the emotion identification model 59 may also determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.
[1445] Figure 9 shows an emotion map 400 in which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. The closer to the center of the concentric circles, the more primitive the emotions are located. Further out of the concentric circles, emotions representing states and actions arising from mental states are located. Emotion is a concept that includes feelings and mental states. On the left side of the concentric circles, emotions that are generally generated from reactions occurring in the brain are located. On the right side of the concentric circles, emotions that are generally induced by situational judgment are located. Above and below the concentric circles, emotions that are generally generated from reactions occurring in the brain and induced by situational judgment are located. In addition, the emotion of "pleasure" is located on the upper side of the concentric circles, and the emotion of "displeasure" is located on the lower side. Thus, in the emotion map 400, multiple emotions are mapped based on the structure in which emotions arise, and emotions that are likely to occur simultaneously are mapped close together.
[1446] These emotions are distributed at the 3 o'clock position on the Emotion Map 400, and usually fluctuate between feelings of security and anxiety. In the right half of the Emotion Map 400, situational awareness takes precedence over internal feelings, resulting in a calm impression.
[1447] The inside of the Emotion Map 400 represents inner thoughts, while the outside represents actions. Therefore, the further you go from the outside of the Emotion Map 400, the more visible (expressed in actions) your emotions become.
[1448] Here, human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, it results in discomfort, and when they approach the ideal, it results in pleasure. Similarly, in robots, cars, motorcycles, etc., emotions can be created based on various balances, such as posture and battery level. When these balances deviate from the ideal, it results in discomfort, and when they approach the ideal, it results in pleasure. The emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on a system for analyzing brain physiological signals of speech emotion recognition and emotion, Tokushima University, doctoral dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map contains emotions belonging to a region called "response," where sensation is dominant. The right half of the emotion map contains emotions belonging to a region called "situation," where situational awareness is dominant.
[1449] The emotion map defines two emotions that promote learning. One is the emotion around the middle of the negative "repentance" and "reflection" on the situation side. In other words, it is 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 the emotion around the positive "desire" on the reaction side. In other words, it is when the robot has positive feelings such as "I want more" or "I want to know more."
[1450] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values representing each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple training data sets, which are combinations of user input and emotion values representing each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions located close together have similar values, as shown in the emotion map 900 in Figure 10. Figure 10 shows an example where multiple emotions such as "reassured," "calm," and "confident" have similar emotion values.
[1451] The above description primarily focuses on the functions of the data processing device 12 in relation to this disclosure. However, the system related to this disclosure is not necessarily implemented on a server. The system related to this disclosure may be implemented as a general information processing system. This disclosure may be implemented, for example, as a software program that runs on a personal computer or as an application that runs on a smartphone. The method related to this disclosure may be provided to users in SaaS (Software as a Service) format.
[1452] In the above embodiment, an example was given in which a specific process is performed by a single computer 22. However, the technology of this disclosure is not limited thereto, and a distributed processing of the specific process may be performed by multiple computers, including computer 22. For example, a data generation model 58 may be provided in an external device of the data processing device 12, and the external device may generate data according to the input data.
[1453] In the above embodiment, an example was given in which the specific processing program 56 is stored in the storage 32, but the technology of this disclosure is not limited thereto. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-temporary storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-temporary storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes specific processing according to the specific processing program 56.
[1454] 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.
[1455] Furthermore, it is not necessary to store the entirety 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 the entirety of the specific processing program 56 in the storage 32; it is acceptable to store only a portion of the specific processing program 56.
[1456] The following types of processors can be used as hardware resources to perform specific processing. Examples of processors include a CPU, a general-purpose processor that functions as a hardware resource to perform specific processing by executing software, i.e., a program. Other examples of processors include dedicated electrical circuits, such as FPGAs (Field-Programmable Gate Arrays), PLDs (Programmable Logic Devices), or ASICs (Application Specific Integrated Circuits), which have circuit configurations specifically designed to perform specific processing. All of these processors have built-in or connected memory, and all of them perform specific processing by using memory.
[1457] The hardware resource that performs a specific process may consist of one of these various processors, or it may consist of 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). Alternatively, the hardware resource that performs a specific process may consist of a single processor.
[1458] Examples of configurations using a single processor include, firstly, a configuration in which one or more CPUs and software are combined to form a single processor, and this processor functions as a hardware resource that performs a specific process. Secondly, there is a configuration using a processor that realizes the functions of the entire system, including multiple hardware resources that perform a specific process, on a single IC chip, as exemplified by SoCs (System-on-a-chip). In this way, a specific process is realized using one or more of the above types of processors as hardware resources.
[1459] Furthermore, the hardware structure of these various processors can more specifically utilize electrical circuits that combine circuit elements such as semiconductor devices. Also, the specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps can be deleted, new steps added, or the processing order rearranged, as long as it does not deviate from the main purpose.
[1460] The descriptions and illustrations presented above are detailed explanations of the technical aspects of this disclosure and are merely examples of the technical aspects. For example, the above descriptions of the structure, function, operation, and effect are examples of the structure, function, operation, and effect of the technical aspects of this disclosure. Therefore, it goes without saying that you may delete unnecessary parts, add new elements, or replace elements in the descriptions and illustrations presented above, as long as you do not deviate from the essence of the technical aspects of this disclosure. Furthermore, in order to avoid confusion and facilitate understanding of the technical aspects of this disclosure, explanations of common technical knowledge and the like that do not require special explanation to enable the implementation of the technical aspects of this disclosure have been omitted from the descriptions and illustrations presented above.
[1461] All documents, patent applications, and technical standards described herein are incorporated by reference to the same extent as if each individual document, patent application, and technical standard were specifically and individually noted to be incorporated by reference.
[1462] The following is further disclosed regarding the embodiments described above.
[1463] (Claim 1)
[1464] [Means for users to upload code from their own devices,
[1465] [Means for receiving the uploaded code on the server and performing parsing,
[1466] [Methods for artificial intelligence to analyze code and generate improvement suggestions,
[1467] [Means by which the server formats the analysis results and sends them to the user,
[1468] [Means for users to modify the code based on suggestions,
[1469] A system that includes this.
[1470] (Claim 2)
[1471] The system according to claim 1, wherein the server uses a syntax analysis tool to collect syntax errors and warnings in the code.
[1472] (Claim 3)
[1473] [The system according to claim 1, in which the server sends code to an artificial intelligence model and generates performance improvement suggestions.
[1474] "Example 1"
[1475] (Claim 1)
[1476] [Means for users to upload code from their own devices,
[1477] [Means for receiving the uploaded code on the server and performing parsing,
[1478] [A means of sending code to a pre-trained generative AI model on a server to generate analysis and improvement suggestions,
[1479] [Means by which the server formats the analysis results and sends them to the user,
[1480] [Means for users to modify the code based on suggestions,
[1481] A system that includes this.
[1482] (Claim 2)
[1483] The system according to claim 1, wherein the server uses a syntax analysis tool to collect syntax errors and warnings in the code.
[1484] (Claim 3)
[1485] [The system according to claim 1, wherein the server sends code to a generated AI model and generates suggestions for improvements to readability, performance, and security.
[1486] "Application Example 1"
[1487] (Claim 1)
[1488] [Means for users to upload code from their own information processing device,
[1489] [Means for receiving the uploaded code on the server and performing parsing,
[1490] [Methods for artificial intelligence to analyze code and generate improvement suggestions,
[1491] [Means by which the server formats the analysis results and sends them to the user,
[1492] [Means for users to modify the code based on suggestions,
[1493] A system that includes means to suggest security vulnerabilities and performance optimizations when the system receives and analyzes control code for factory automation machinery.
[1494] (Claim 2)
[1495] The system according to claim 1, wherein the server uses a syntax analysis tool to collect syntax errors and warnings in the code.
[1496] (Claim 3)
[1497] [The system according to claim 1, in which the server sends code to an artificial intelligence model and generates performance improvement suggestions.
[1498] "Example 2 of combining an emotion engine"
[1499] (Claim 1)
[1500] [Means for users to upload code from their own devices,
[1501] [Means for receiving the uploaded code on the server and performing parsing,
[1502] [Methods for artificial intelligence to analyze code and generate improvement suggestions,
[1503] [Means for the server to format the analysis results, taking into account the user's sentiment data, and send them to the user,
[1504] [Means for users to modify the code based on suggestions,
[1505] A system that includes this.
[1506] (Claim 2)
[1507] The system according to claim 1, wherein the server uses a syntax analysis tool to collect syntax errors and warnings in the code.
[1508] (Claim 3)
[1509] [The system according to claim 1, in which the server sends code to an artificial intelligence model and generates performance improvement suggestions.
[1510] "Application example 2 when combining with an emotional engine"
[1511] (Claim 1)
[1512] [Means for users to upload code from their own devices,
[1513] [Means for receiving the uploaded code on the server and performing parsing,
[1514] [Methods for artificial intelligence to analyze code and generate improvement suggestions,
[1515] [Means by which the server formats the analysis results and sends them to the user,
[1516] [Means for users to modify the code based on suggestions,
[1517] [Means by which the emotion engine recognizes the user's emotional state,
[1518] [Means of providing optimal feedback based on emotional state,
[1519] A system that includes this.
[1520] (Claim 2)
[1521] The system according to claim 1, wherein the server uses a syntax analysis tool to collect syntax errors and warnings in the code.
[1522] (Claim 3)
[1523] [The system according to claim 1, in which the server sends code to an artificial intelligence model and generates performance improvement suggestions. [Explanation of symbols]
[1524] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Devices 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robots< / url:> < / url:> < / url:> < / url:>
Claims
1. A means for users to upload code from their own devices, A server receives uploaded code and performs parsing, A means for artificial intelligence to analyze code and generate improvement suggestions, A means by which the server formats the analysis results and sends them to the user, A means for users to modify the code based on their suggestions, A system that includes this.
2. The system according to claim 1, wherein the server uses a syntax analysis tool to collect syntax errors and warnings in the code.
3. The system according to claim 1, wherein the server sends code to an artificial intelligence model and generates suggestions for performance improvement.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A