System

The system automates code review by analyzing uploaded programs for compliance with customized standards, reducing stress and improving code quality through tailored feedback.

JP2026022485APending Publication Date: 2026-02-12SOFTBANK GROUP CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024124002
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

Existing code review methods cause interpersonal stress, require significant time and effort, and struggle to comply with customized coding standards, hindering code quality improvements and development efficiency.

Method used

A system that allows users to upload computer programs for lexical, syntactic, and static analysis, generates review text using natural language generation, and provides feedback while ensuring security through encryption, tailored to individual company or project standards.

Benefits of technology

Enables efficient, stress-free code reviews that produce high-quality code compliant with specific company or project standards, enhancing code quality and development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026022485000001_ABST
    Figure 2026022485000001_ABST
Patent Text Reader

Abstract

A system is provided.SOLUTION: A system comprising: means for allowing a user to upload his / her own computer program; means for transferring the uploaded computer program to an analysis server; means for performing lexical analysis, syntactic analysis, static analysis, and style guide check of the uploaded computer program in the analysis server; means for generating a list of improvements and error portions based on an analysis result; means for creating a review sentence from the generated list by a natural language generation technique; and means for feeding back the review sentence to the user.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The technology of the present disclosure relates to a system. [Background technology]

[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]

[0004] In software development, checking the quality of source code is an important task, but previous methods have the following problems. They cause interpersonal stress for those receiving code reviews, and require time and effort from those reviewing them. Furthermore, it is difficult to conduct reviews that comply with coding standards customized for specific companies or projects. This hinders improvements in code quality and an efficient development process. [Means for solving the problem]

[0005] To solve this problem, the following means are provided.

[0006] The system includes a means for users to upload their own computer programs and a means for transferring the uploaded computer programs to an analysis server. The analysis server provides a means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking of the uploaded computer programs. Furthermore, the system provides a means for generating a list of areas for improvement and errors based on the analysis results, and a means for creating review text from the generated list using natural language generation technology. Finally, the system includes a means for providing feedback on the review text to the user.

[0007] The system also includes a means for users to encrypt computer programs before uploading them to the analysis server and a means for users to decrypt feedback review texts, thereby enhancing security. The system also includes a means for the analysis server to perform analysis based on a style guide customized for each company or project, thereby providing more appropriate and individual reviews.

[0008] "User" means any person or entity that uses the System to upload computer programs that they have written.

[0009] A "computer program" is a set of instructions that software needs to perform a specific function; it is the code that a user uploads to a system.

[0010] An "uploading means" is a method or function by which a user transfers a computer program to a system.

[0011] "Analysis Server" is a central processing unit for analyzing uploaded computer programs.

[0012] "Lexical analysis" is the initial step in breaking down a computer program into tokens and understanding its basic content.

[0013] "Syntax analysis" is the process of constructing a syntax tree from tokens that have undergone lexical analysis and understanding the structure of the entire program.

[0014] "Static analysis" is a method for detecting the quality of source code and potential bugs and security holes without running the program.

[0015] A "style guide check" is the process of checking the style and format of a program based on specific coding conventions and rules.

[0016] "Points for improvement" are suggestions discovered based on the analysis results for improving the quality and efficiency of the source code.

[0017] An "error location" is a problem such as a bug or security hole in the source code that is discovered based on the analysis results.

[0018] "Natural language generation technology" is a technology in which a computer generates sentences in a format that humans can understand based on the results of analysis.

[0019] A "review text" is a text created using natural language generation technology that includes comments and suggestions regarding improvements and errors in the source code.

[0020] The "feedback means" refers to a method or function for transmitting the generated review text to the user.

[0021] "Encryption means" is a method or function that encrypts computer programs or data to enhance security.

[0022] A "means for decryption" is a method or function that returns encrypted data to its original form.

[0023] A "customized style guide for a company or project" refers to the unique coding conventions and rules used by a particular company or project. [Brief explanation of the drawings]

[0024] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14]FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION

[0025] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.

[0026] First, the terms used in the following description will be explained.

[0027] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).

[0028] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.

[0029] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.

[0030] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.

[0031] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."

[0032] [First embodiment]

[0033] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.

[0034] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.

[0035] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0036] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.

[0037] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.

[0038] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.

[0039] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.

[0040] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.

[0041] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[0042] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0043] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[0044] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0045] The "CodeReview Plus" system analyzes computer programs written by users and suggests improvements and errors to improve the efficiency of code reviews. This system automates the entire process from users uploading their code, to the server analyzing it, and then providing feedback on the results.

[0046] System configuration

[0047] 1. User-uploaded code

[0048] Users upload their computer programs through the CodeReview Plus application interface, which supports code file selection and upload operations.

[0049] 2. Code transmission and encryption

[0050] The device encodes the code uploaded by the user and encrypts it using SSL / TLS. This encrypted data is then sent to the server. This step is essential to ensure security.

[0051] 3. Server Analysis

[0052] The server decrypts the received encrypted data and analyzes the computer program. The analysis procedures include lexical analysis, syntactic analysis, static analysis, and style guide checks to determine the quality of the code and detect potential bugs, security holes, performance issues, etc.

[0053] 4. Generate a list of improvements and errors

[0054] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[0055] 5. Generating review text

[0056] The server uses natural language generation technology to create reviews that use harmless language to highlight areas for improvement and errors, allowing users to respond without feeling stressed.

[0057] 6. Feedback on review results

[0058] The server re-encrypts the generated review text and sends it to the user's device, which then decrypts the encrypted data and displays it to the user. The user can then modify the code based on this feedback.

[0059] Specific examples

[0060] For example, if a user uploads the following Python code:

[0061] python

[0062] def add_numbers(a, b):

[0063] return a + b

[0064] The server performs an analysis and identifies areas for improvement and errors, such as:

[0065] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[0066] Add documentation comments to functions to clarify their purpose.

[0067] The server then generates the following review text:

[0068] Improvements:

[0069] Change the variable names 'a' and 'b' to meaningful names.

[0070] Add a documentation comment to clarify the purpose of the function.

[0071] Specific suggested fixes:

[0072] def add_numbers(first_number, second_number):

[0073] """

[0074] Takes two numbers and returns their sum.

[0075] Args:

[0076] first_number (int): The first number

[0077] second_number (int): The second number

[0078] Returns:

[0079] int: the sum of two numbers

[0080] """

[0081] return first_number + second_number

[0082] Users can receive this feedback and modify their code to efficiently write high-quality code. Furthermore, the system analyzes code based on customized style guides for each company or project, enabling appropriate reviews in accordance with specific conventions.

[0083] As described above, the "CodeReview Plus" system allows users to undergo code reviews flexibly and without stress, and supports them in creating high-quality code that meets the requirements of each company or project.

[0084] The processing flow will be explained below.

[0085] Step 1:

[0086] The user selects their computer program (code file) and clicks the "Upload" button in the "CodeReview Plus" application.

[0087] Step 2:

[0088] The terminal encodes the selected code file and encrypts it using SSL / TLS, preparing the encrypted data to be sent to the server.

[0089] Step 3:

[0090] The device sends the encrypted data to the server, using an encryption protocol to ensure security.

[0091] Step 4:

[0092] The server uses SSL / TLS to decrypt the encrypted data it receives, and then decodes the decrypted data back to its original code.

[0093] Step 5:

[0094] The server lexically analyzes the decoded computer program, breaking the code down into tokens and identifying the individual components.

[0095] Example: def add_numbers(a, b): return a + b -> [def, add_numbers, (, a, ,, b, ), :, return, a, +, b]

[0096] Step 6:

[0097] The server performs syntax analysis based on the results of lexical analysis, converting tokens into a syntax tree (AST: Abstract Syntax Tree) to understand the overall structure of the code.

[0098] Example: def add_numbers(a, b): return a + b -> Builds a syntax tree and parses function names, arguments, return values, etc.

[0099] Step 7:

[0100] The server then performs static analysis based on the parsing results, checking for code quality, potential bugs, security holes, performance issues, etc.

[0101] Step 8:

[0102] The server checks whether the code complies with the standards based on a style guide customized for each company or project.

[0103] Step 9:

[0104] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[0105] Step 10:

[0106] The server uses natural language generation technology to create a review that highlights areas for improvement and errors. The generated review is written in a non-critical manner.

[0107] Step 11:

[0108] The server encodes the generated review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[0109] Step 12:

[0110] The server sends the encrypted data to the user's device.

[0111] Step 13:

[0112] The device decrypts the encrypted data received using SSL / TLS, and then decodes the decrypted data into the original review text.

[0113] Step 14:

[0114] Users can check the review results on their devices, and specific improvements and errors are clearly displayed.

[0115] Step 15:

[0116] Users can modify their code based on the review results and can also submit the modified code for review again.

[0117] Example 1

[0118] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0119] In conventional code review systems, analyzing program code uploaded by users and generating review documents are often done manually, making it difficult to perform code reviews efficiently. Furthermore, due to security concerns, unencrypted code data is transmitted, increasing the risk of data leakage. Furthermore, feedback on analysis results is limited, making it difficult to accommodate customized style guides for each company or project. This creates challenges that prevent improvements in code quality and development efficiency.

[0120] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[0121] In this invention, the server includes means for a user to upload their own program, means for transferring the uploaded program, means for a terminal to encrypt the transferred program, means for the server to decrypt the encrypted data received, means for the server to perform lexical analysis, syntactic analysis, static analysis, and style guide check of the uploaded program, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using prompt sentences through natural language generation technology, means for encrypting the review text and feeding it back to the user, and means for decrypting the feedback review text. This allows users to receive code reviews securely and efficiently, enabling them to create high-quality code tailored to the style of each company or project.

[0122] "User" means an entity that uses the system to upload its own programs for analysis and review.

[0123] A "program" is a set of coding instructions uploaded by a user and parsed by a server.

[0124] A "server" is a computer system that decrypts received programs and performs analysis and review generation.

[0125] "Uploading" is the act of a user sending their own program to a server.

[0126] "Encryption" is the process of converting data using the SSL / TLS protocol to transmit program data securely.

[0127] "Decryption" is the process of restoring encrypted data to its original state.

[0128] "Lexical analysis" is the process of breaking down a program's source code into its smallest units, called tokens.

[0129] "Syntax analysis" is the process of analyzing the structure of a program based on the tokens obtained by lexical analysis and generating an abstract syntax tree (AST).

[0130] "Static analysis" is the process of checking the structure and style of program code without executing it to detect potential problems or bugs.

[0131] A "style guide check" is the process of verifying that program code follows specific coding conventions.

[0132] The "list of improvements and errors" is a list of areas to be corrected and defects in the program that have been identified based on the analysis results.

[0133] "Natural language generation technology" is a technology that uses a generative AI model to generate sentences in a form that is easy for humans to understand based on the analysis results.

[0134] A "prompt sentence" is an instruction sentence input to a natural language generation technology.

[0135] A "review text" is a text that provides specific details about areas for improvement and errors and is provided to users as feedback.

[0136] MODE FOR CARRYING OUT THE INVENTION

[0137] The "CodeReview Plus" system analyzes programs written by users and suggests areas for improvement or errors, thereby increasing the efficiency of code reviews. This system automates the entire process from users uploading their code, to the server analyzing it, and providing feedback on the results.

[0138] Specifically, this is realized by the following hardware and software configuration.

[0139] Hardware and Software Configuration

[0140] User device:

[0141] PCs and tablets used by users

[0142] OpenSSL (a library for encryption and decryption)

[0143] server:

[0144] High-Performance Computer Server

[0145] OpenSSL (a library for encryption and decryption)

[0146] PLY (a library for lexical analysis)

[0147] Bison (a generator for parsing)

[0148] Pylint (a tool for static analysis)

[0149] Style guide checking tools (PEP 8, etc.)

[0150] Generative AI models such as GPT-3 (for natural language generation)

[0151] System Operation

[0152] Users upload their own programs through the CodeReview Plus application interface. The interface supports drag-and-drop and file selection dialogs, making it easy for users to upload code. The uploaded code is temporarily loaded into memory on the device.

[0153] The device uses the OpenSSL library to encrypt the uploaded code using the SSL / TLS protocol, and then sends the encrypted data to a server over the Internet, ensuring secure data transmission.

[0154] The server decrypts the received encrypted data using OpenSSL. The decrypted code data is then lexically analyzed using the PLY library and broken down into tokens. Next, it is parsed using a Bison generator to generate an abstract syntax tree (AST). After that, static analysis is performed using Pylint to check the code quality and detect potential bugs and security holes. Finally, a style guide checking tool is used to check whether coding standards are being followed.

[0155] Based on the analysis, the server generates a list of improvements and errors, which may include an entry such as "Rename variables 'a' and 'b' to meaningful names." This list is stored in an internal database.

[0156] Next, the server sends a prompt to the generative AI model to generate a natural language review. For example, the prompt "Please change the variable names 'a' and 'b' to meaningful names" is sent to GPT-3. The review text obtained as a response from the AI ​​model includes specific instructions such as "Please change the variable names 'a' and 'b' to meaningful names."

[0157] The generated review text is then re-encrypted and sent to the device, where it is decrypted and displayed in the user interface. The user can then modify the code based on this feedback and submit the review again.

[0158] Specific examples

[0159] For example, if a user uploads the following Python code:

[0160] python

[0161] def add_numbers(a, b):

[0162] return a + b

[0163] The server performs an analysis and identifies areas for improvement and errors, such as:

[0164] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[0165] Add documentation comments to functions to clarify their purpose.

[0166] Based on this, the server generates the following review text:

[0167] Improvements:

[0168] Change the variable names 'a' and 'b' to meaningful names.

[0169] Add a documentation comment to clarify the purpose of the function.

[0170] Specific suggested fixes:

[0171] def add_numbers(first_number, second_number):

[0172] """

[0173] Takes two numbers and returns their sum.

[0174] Args:

[0175] first_number (int): The first number

[0176] second_number (int): The second number

[0177] Returns:

[0178] int: the sum of two numbers

[0179] """

[0180] return first_number + second_number

[0181] In this way, the CodeReview Plus system enables users to undergo code reviews securely and efficiently, helping them create high-quality code that matches the style of their company or project.

[0182] keyword

[0183] Generative AI model, prompt sentence

[0184] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0185] Program processing flow and specific explanation

[0186] Step 1: User uploads code

[0187] explanation

[0188] The user uploads the program through the CodeReview Plus application interface by selecting the code file (e.g., example.py) to be analyzed through the file selection dialog and pressing the upload button.

[0189] input

[0190] A code file selected by the user.

[0191] output

[0192] The selected code file is transferred to the terminal and temporarily loaded into memory.

[0193] Specific actions

[0194] The user clicks the "Upload Code" button and selects example.py from the file dialog. The selected file is saved in temporary memory.

[0195] Step 2: Encrypt and transfer the code

[0196] explanation

[0197] The terminal encrypts the uploaded code file and transfers it to the server.

[0198] input

[0199] The user's code files loaded into memory.

[0200] output

[0201] The code data is encrypted using the SSL / TLS protocol and transmitted to the server.

[0202] Specific actions

[0203] The device uses the OpenSSL library to encrypt the contents of example.py and sends the encrypted data to the server as a POST request.

[0204] Step 3: Server decrypts the data

[0205] explanation

[0206] The server decrypts the received encrypted data.

[0207] input

[0208] Code data sent from the device encrypted with SSL / TLS.

[0209] output

[0210] The decrypted original code data.

[0211] Specific actions

[0212] The server uses OpenSSL to receive the encrypted data, decrypt it, and recreate the original code in example.py.

[0213] Step 4: Performing Lexical Analysis

[0214] explanation

[0215] The server breaks down the decrypted code data into tokens using a lexical analyzer.

[0216] input

[0217] Decoded code data.

[0218] output

[0219] A list of the code broken down into tokens.

[0220] Specific actions

[0221] The server uses the PLY library to break the contents of example.py into tokens and store them as a list.

[0222] Step 5: Performing Parsing

[0223] explanation

[0224] The server performs syntax analysis using the lexical analysis results.

[0225] input

[0226] Code data broken down into tokens.

[0227] output

[0228] Abstract Syntax Tree (AST).

[0229] Specific actions

[0230] The server uses a Bison generator to generate an AST from the token list.

[0231] Step 6: Running static analysis

[0232] explanation

[0233] The server performs static analysis using the parsing results.

[0234] input

[0235] AST.

[0236] output

[0237] Reporting code quality, potential bugs and security holes.

[0238] Specific actions

[0239] The server uses Pylint to parse example.py and generate a report on quality and bugs.

[0240] Step 7: Run a style guide check

[0241] explanation

[0242] The server performs a style guide check using the static analysis results.

[0243] input

[0244] Results of the previous static analysis.

[0245] output

[0246] Check results for compliance with coding standards.

[0247] Specific actions

[0248] The server uses a style guide checking tool to verify that example.py complies with coding standards such as PEP 8.

[0249] Step 8: Generate a list of improvements and errors

[0250] explanation

[0251] The server generates a list of improvements and error locations based on the analysis results.

[0252] input

[0253] Style guide check results.

[0254] output

[0255] List of improvements and errors.

[0256] Specific actions

[0257] Based on the analysis results, the server generates a list of improvements, such as "change the variable names 'a' and 'b' to meaningful names," and stores it in an internal database.

[0258] Step 9: Generate review text

[0259] explanation

[0260] The server sends prompt sentences to the generative AI model, which generates review sentences in natural language.

[0261] input

[0262] List of improvements and errors.

[0263] output

[0264] Review text written in natural language.

[0265] Specific actions

[0266] The server sends a prompt to GPT-3 saying, "Please change the variable names 'a' and 'b' to meaningful names," and stores the generated review text in an internal database.

[0267] Step 10: Encrypt and transfer the review text

[0268] explanation

[0269] The server re-encrypts the generated review text and sends it to the user's device.

[0270] input

[0271] Generated review text.

[0272] output

[0273] Review text data encrypted using the SSL / TLS protocol.

[0274] Specific actions

[0275] The server uses OpenSSL to encrypt the review text and send it to the terminal via a POST request.

[0276] Step 11: Decode and display the review text on the device

[0277] explanation

[0278] The terminal decrypts the encrypted review text data and displays it on the user interface.

[0279] input

[0280] Review text data encrypted using the SSL / TLS protocol.

[0281] output

[0282] The review text that is displayed to users.

[0283] Specific actions

[0284] The device uses OpenSSL to decrypt the encrypted data and reproduces the review text and displays it to the user, who can then review the feedback and modify the code.

[0285] (Application example 1)

[0286] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0287] Most conventional software review systems analyze and provide feedback on general computer programs, but there is a lack of systems specialized for specific applications, particularly factory robot control code. Factory robot control code differs from regular software in that it requires real-time performance and enhanced security, making a specialized code review system necessary. There is also a demand for improved productivity through immediate feedback of errors and areas for improvement in factory robot code.

[0288] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[0289] In this invention, the server includes means for users to upload their own software, means for transferring the uploaded software to an analysis device, means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking of the uploaded software in the analysis device, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using natural language generation technology, means for providing feedback on the review text to the user, and means for performing similar analysis and feedback on the control code of a factory robot, thereby enabling quality improvement of the control code of the factory robot and real-time error feedback.

[0290] "User" means a person who uploads software to the system and receives feedback.

[0291] "Software" means executable program code uploaded by Users to the System.

[0292] An "analysis device" is a computer system for analyzing uploaded software.

[0293] "Lexical analysis" is the analytical process of breaking down software code into its individual components and interpreting their meaning.

[0294] "Syntax analysis" is the process of analyzing the structure of software code and determining the relationships between components according to the grammar of the language.

[0295] "Static analysis" is the process of discovering bugs, errors, and performance problems by analyzing software code without executing it.

[0296] A "style guide check" is the process of verifying that software code complies with established coding standards and style guides.

[0297] "Points for improvement" are suggestions for improving the quality of the software code that are discovered by the analysis device.

[0298] The "error location" refers to an error or defect in the software code that is discovered by the analysis device.

[0299] "Natural language generation technology" is a technology that allows computers to generate natural human language.

[0300] A "review text" is a text generated based on the analysis results to provide feedback to the user.

[0301] "Feedback" is the process of communicating the review text generated by the analysis device to the user.

[0302] A "factory robot" is an automated mechanical device used in a factory that requires control code to perform specific tasks.

[0303] "Control code" is a software program written to control the operation of a factory robot.

[0304] The RoboCode Review Plus system aims to improve the quality of factory robot control code and provide real-time error feedback. The system uses an analysis device to analyze software uploaded by users, lists areas for improvement and errors based on the analysis results, and creates review text using natural language generation technology.

[0305] System configuration

[0306] 1. User Upload of Software

[0307] Users upload their software through the RoboCode Review Plus application interface, which supports software file selection and upload operations.

[0308] 2. Software Transfer and Encryption

[0309] The device encodes the software uploaded by the user and encrypts it using SSL / TLS, a step essential to ensure the security of sending this encrypted data to the analysis device.

[0310] 3. Analysis using an analytical device

[0311] The analysis device decrypts the received encrypted data and analyzes the software. The analysis procedures include lexical analysis, syntax analysis, static analysis, and style guide checks to detect code quality, potential bugs, security holes, performance issues, etc.

[0312] 4. Generate a list of improvements and errors

[0313] Based on the analysis results, the analyzer generates a list of improvements and errors, including specific points to be corrected.

[0314] 5. Generating review text

[0315] The analysis device uses natural language generation technology to create review text in easy-to-understand language about areas for improvement and errors, allowing users to respond without feeling stressed.

[0316] 6. Feedback on review results

[0317] The analysis device encrypts the review text and sends it to the user's device, which then decrypts the encrypted data and displays it to the user. The user can then modify the software based on this feedback.

[0318] Hardware and software used

[0319] Data encryption with SSL / TLS

[0320] Software lexical analysis, syntactic analysis, static analysis, and style guide checking by an analyzer

[0321] Creating review text using natural language generation technology

[0322] Specific examples

[0323] For example, suppose a user uploads the following control code for a factory robot:

[0324] python

[0325] def move_robot(direction, speed):

[0326] Code to move the robot

[0327] ...

[0328] return True

[0329] The analyzer analyzes this code and identifies areas for improvement and errors, such as:

[0330] The variable names 'direction' and 'speed' need to be changed to meaningful names.

[0331] Add documentation comments to functions to clarify their purpose.

[0332] Based on this, the analyzer generates the following review text:

[0333] "Rename the variables 'direction' and 'speed' to more meaningful names. Add documentation comments to clarify the purpose of the function."

[0334] Users can receive this feedback and modify their code to create high-quality control code.

[0335] Example prompts for generative AI models

[0336] "Review the robot's control code and identify the following improvements and errors. Please include specific suggestions for improvements and corrections for each error."

[0337] As described above, the RoboCode Review Plus system allows users to receive flexible and stress-free reviews, improving the quality of factory robot control code.

[0338] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0339] Step 1:

[0340] Users upload their own software through the system interface. The input is a software file stored on the user's device, and the user selects a specific software file from the file selection screen and clicks the upload button to prepare for transfer.

[0341] Step 2:

[0342] The device encodes the software uploaded by the user and encrypts it using SSL / TLS. The input here is the software file selected in step 1, and after encoding and encryption processing, the output is encrypted data that can be securely transferred over the network.

[0343] Step 3:

[0344] The terminal sends the encrypted data to the analysis device. The input is the encrypted data generated in step 2, and the output is the software data sent to the server. This process allows the software to reach the analysis device.

[0345] Step 4:

[0346] The server decrypts the encrypted data it receives and analyzes the software. The input is the encrypted data sent from the terminal, and the original software code is obtained after the decryption process. The output is the software code to be analyzed.

[0347] Step 5:

[0348] The server performs lexical analysis, syntax analysis, static analysis, and style guide checks on the software. The input is the decoded software code, and various analysis processes are performed to generate diagnostic results. The output is the diagnostic results.

[0349] Step 6:

[0350] The server generates a list of improvements and errors based on the analysis results. The input is the analysis results obtained in step 5, and specific improvements and errors are listed through further data processing. The output is a list of improvements and errors.

[0351] Step 7:

[0352] The server uses natural language generation technology to create a review from the generated list. The input is a list of improvements and errors, and prompts are used to translate the list into natural language that is easy for the user to understand. The output is the final review.

[0353] Step 8:

[0354] The server re-encrypts the review text and sends it to the user's device. The input is the review text generated in step 7, which is securely sent to the user after the encryption process. The output is the encrypted review text.

[0355] Step 9:

[0356] The device decrypts the encrypted review text and displays it to the user. The input is the encrypted review text sent from the server, and the original review text is extracted through the decryption process and displayed to the user. The output is the review content that the user can view.

[0357] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.

[0358] The "CodeReview Plus" system, which incorporates an emotion engine, not only analyzes the computer programs written by users in detail and suggests areas for improvement and errors, but also recognizes the user's emotions and adjusts the review text appropriately. This system automates the entire process, from the user uploading the code, to the server analyzing it, and providing feedback on the results, using the emotion engine.

[0359] System configuration

[0360] 1. User-uploaded code

[0361] Users upload their computer programs through the CodeReview Plus application interface, which supports code file selection and upload operations.

[0362] 2. Code transmission and encryption

[0363] The device encodes the code uploaded by the user and encrypts it using SSL / TLS, preparing this encrypted data for transmission to the server.

[0364] 3. Server Analysis

[0365] The server decrypts the encrypted data received using SSL / TLS, decodes the decrypted data back to the original code, and then analyzes the uploaded code using lexical analysis, syntax analysis, static analysis, and style guide checks.

[0366] 4. Generate a list of improvements and errors

[0367] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[0368] 5. Generating review text

[0369] The server uses natural language generation technology to generate reviews based on the generated list, which are usually written in a non-stingy style.

[0370] 6. Emotion Recognition by Emotion Engine

[0371] The device recognizes the user's emotions from their facial expressions and voice, and the emotion engine collects the user's emotional data and sends it to the server.

[0372] 7. Adjust review text based on sentiment

[0373] The server adjusts the tone and content of the review based on the user's emotional data received from the emotion engine. For example, if the user is feeling stressed, it uses gentle, encouraging language.

[0374] 8. Feedback on review results

[0375] The server encodes the revised review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[0376] 9. Check the review results

[0377] The device uses SSL / TLS to decrypt the encrypted data received and decode it into the original review text. The user can then review the review and correct the code.

[0378] Specific examples

[0379] For example, if a user uploads the following Python code:

[0380] python

[0381] def add_numbers(a, b):

[0382] return a + b

[0383] The server performs an analysis and identifies areas for improvement and errors, such as:

[0384] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[0385] Add documentation comments to functions to clarify their purpose.

[0386] The emotion engine recognizes when a user is feeling stressed from their facial expressions and voice.

[0387] The server then generates the following review text:

[0388] Improvements:

[0389] Change the variable names 'a' and 'b' to meaningful names.

[0390] Add a documentation comment to clarify the purpose of the function.

[0391] Specific suggested fixes:

[0392] def add_numbers(first_number, second_number):

[0393] """

[0394] Takes two numbers and returns their sum.

[0395] Args:

[0396] first_number (int): The first number

[0397] second_number (int): The second number

[0398] Returns:

[0399] int: the sum of two numbers

[0400] """

[0401] return first_number + second_number

[0402] Your efforts are paying off in a positive direction. Keep up the good work!

[0403] In this way, the "CodeReview Plus" system, which combines an emotion engine, can reduce stress and improve code quality by providing feedback that takes user emotions into account.

[0404] The processing flow will be explained below.

[0405] Step 1:

[0406] The user selects their computer program (code file) and clicks the "Upload" button in the "CodeReview Plus" application.

[0407] Step 2:

[0408] The terminal encodes the selected code file and encrypts it using SSL / TLS, preparing the encrypted data to be sent to the server.

[0409] Step 3:

[0410] The device sends the encrypted data to the server, using an encryption protocol to ensure security.

[0411] Step 4:

[0412] The server uses SSL / TLS to decrypt the encrypted data it receives, and then decodes the decrypted data back to its original code.

[0413] Step 5:

[0414] The server lexically analyzes the decoded computer program, breaking the code down into tokens and identifying the individual components.

[0415] Example: def add_numbers(a, b): return a + b -> [def, add_numbers, (, a, ,, b, ), :, return, a, +, b]

[0416] Step 6:

[0417] The server performs syntax analysis based on the results of lexical analysis, converting tokens into a syntax tree (AST: Abstract Syntax Tree) to understand the overall structure of the code.

[0418] Example: def add_numbers(a, b): return a + b -> Builds a syntax tree and parses function names, arguments, return values, etc.

[0419] Step 7:

[0420] The server then performs static analysis based on the parsing results, checking for code quality, potential bugs, security holes, performance issues, etc.

[0421] Step 8:

[0422] The server checks whether the code complies with the standards based on a style guide customized for each company or project.

[0423] Step 9:

[0424] Based on the analysis, the server generates a list of improvements and errors, including specific points to fix.

[0425] Step 10:

[0426] The server uses natural language generation technology to generate reviews, usually written in a non-stinging style, highlighting areas for improvement and errors.

[0427] Step 11:

[0428] The device uses an emotion engine that recognizes emotions from the user's facial expressions and voice, and this engine collects the user's emotion data and sends it to the server.

[0429] Step 12:

[0430] The server adjusts the tone and content of the review based on the user's emotional data received from the emotion engine. For example, if the user is feeling stressed, it uses gentle, encouraging language.

[0431] Step 13:

[0432] The server encodes the revised review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[0433] Step 14:

[0434] The server sends the encrypted data to the user's device.

[0435] Step 15:

[0436] The device decrypts the encrypted data received using SSL / TLS, and then decodes the decrypted data into the original review text.

[0437] Step 16:

[0438] Users can check the review results on their devices, and specific improvements and errors are clearly displayed.

[0439] Step 17:

[0440] Users can modify their code based on the review results and can also submit the modified code for review again.

[0441] Example 2

[0442] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0443] Traditional computer program review systems provide feedback without considering users' feelings, which can cause stress and demotivation. Furthermore, the reviews are often not presented in a format that users can easily understand, or are often cold-hearted, reducing users' motivation to improve. Furthermore, the lack of flexible analysis based on style guides customized for each company or project leads to issues with inconsistent feedback quality.

[0444] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[0445] In this invention, the server includes means for users to upload their own computer programs, means for transferring the uploaded computer programs to an analysis server, means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking on the uploaded computer programs in the analysis server, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using natural language generation technology, means for recognizing the user's emotions and adjusting the tone and content of the review text based on those emotions, and means for providing feedback on the review text to the user. This allows for flexible and high-quality feedback that takes the user's emotions into consideration, reducing user stress and increasing their motivation to improve.

[0446] "User" means any person or entity that wishes to use the System to have their computer program reviewed.

[0447] A "computer program" is a collection of computer-executable instructions and associated data structures.

[0448] "Uploading" is the act of a user transferring data from their own device to a specific server.

[0449] "Analysis Server" is a central management server for analyzing uploaded computer programs.

[0450] "Lexical analysis" is the process of breaking down program statements into units called tokens.

[0451] "Syntax analysis" is the process of rearranging the tokens into a tree structure and checking whether the grammar is correct.

[0452] "Static analysis" is a technique for analyzing source code without executing it to detect bugs and style violations.

[0453] A "style guide check" is the process of checking whether code complies with established coding standards.

[0454] The "List of improvements and errors" is a list of code corrections and problems.

[0455] "Natural language generation technology" is a technology that uses computers to generate text in natural language that humans can understand.

[0456] A "review document" is a document created based on the analysis results that describes improvements to the computer program and how to correct errors.

[0457] "Emotion recognition" is a technology that analyzes the user's emotions from their facial expressions and voice and grasps their situation.

[0458] "Adjusting tone and content" is the process of making changes to the way a sentence is expressed or its content based on the user's emotional data.

[0459] "Feedback" refers to the act of returning analysis results and review text to users and providing them with information.

[0460] This invention is a system that allows users to upload their own computer programs and automates the analysis and feedback of those programs. Specific embodiments for implementing this system are described below.

[0461] Configuration overview

[0462] The system consists of the following main components:

[0463] 1. The interface where users upload programs

[0464] 2. Terminals for receiving and transmitting uploaded programs

[0465] 3. Analysis server that performs analysis and generates reviews

[0466] 4. A sentiment engine that recognizes user sentiment and adjusts reviews accordingly

[0467] 5. Device that provides feedback results to users

[0468] Detailed process

[0469] 1. User-uploaded code

[0470] Through the system interface, the user selects and uploads a computer program from the local file system by clicking the "Upload" button.

[0471] 2. Code transmission and encryption

[0472] The device first encodes the code uploaded by the user and then encrypts it using the SSL / TLS protocol, which allows the data to be securely transmitted to the server.

[0473] 3. Server Analysis

[0474] The server decrypts the received encrypted data using SSL / TLS, decodes it back to the original code, and then uses analysis tools such as Pylint and ESLint to perform lexical analysis, syntax analysis, static analysis, and style guide checking.

[0475] 4. Generate a list of improvements and errors

[0476] Based on the analysis, the server generates a list of improvements and errors, including specific fixes, such as changing variable names or adding documentation comments.

[0477] 5. Generating review text

[0478] The server then passes the generated list as a prompt to a generative AI model (e.g., OpenAI's GPT-4) to create a review text, which includes specific revision suggestions and feedback.

[0479] 6. Emotion Recognition by Emotion Engine

[0480] While users browse reviews, the device uses a camera and microphone to capture their facial expressions and voice, and the emotion engine analyzes that data to recognize their emotional state.

[0481] 7. Adjust review text based on sentiment

[0482] The server uses the data received from the emotion engine to adjust the tone and content of the generated review text depending on the user's state of mind. For example, if the user is feeling stressed, the review text will be changed to a gentle, encouraging one.

[0483] 8. Feedback on review results

[0484] The adjusted review text is then encoded back into binary data, encrypted using SSL / TLS, and sent to the device, where it is received and decrypted, allowing the user to view the review results.

[0485] Specific examples

[0486] For example, if a user uploads the following Python code:

[0487] python

[0488] def add_numbers(a, b):

[0489] return a + b

[0490] The server performs an analysis and identifies areas for improvement and errors, such as:

[0491] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[0492] Add documentation comments to functions to clarify their purpose.

[0493] The emotion engine recognizes from the user's facial expressions and voice that the user is feeling stressed. Based on this, the server generates the following review text:

[0494] Improvements:

[0495] Change the variable names 'a' and 'b' to meaningful names.

[0496] Add a documentation comment to clarify the purpose of the function.

[0497] Specific suggested fixes:

[0498] def add_numbers(first_number, second_number):

[0499] """

[0500] Takes two numbers and returns their sum.

[0501] Args:

[0502] first_number (int): The first number

[0503] second_number (int): The second number

[0504] Returns:

[0505] int: the sum of two numbers

[0506] """

[0507] return first_number + second_number

[0508] Your efforts are paying off in a positive direction. Keep up the good work!

[0509] Prompt Sentence Examples

[0510] Enter the following prompt into the generative AI model:

[0511] In a stressful situation, please write in a gentle, encouraging tone, offering specific suggestions for improving the uploaded Python code.

[0512] Original code:

[0513] def add_numbers(a, b):

[0514] return a + b

[0515] Analysis results:

[0516] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[0517] Add documentation comments to functions to clarify their purpose.

[0518] Review in a gentle, encouraging tone:

[0519] In this way, you can take user sentiment into consideration and provide specific feedback to improve the quality of your code.

[0520] The flow of the identification process in the second embodiment will be described with reference to FIG.

[0521] Step 1:

[0522] Input: The user selects their computer program file.

[0523] Operation: The user opens the "CodeReview Plus" application interface, presses the "Upload Code" button, then selects the program file they want to review from the file selection dialog and clicks the "Upload" button.

[0524] Output: The selected program file is ready to be uploaded by the terminal.

[0525] Step 2:

[0526] Input: User presses upload button.

[0527] Actions: The device encodes the contents of the selected program file and encrypts it using the SSL / TLS protocol. The encrypted data is ready to be sent to the server.

[0528] Output: The encrypted program data is sent to the server.

[0529] Step 3:

[0530] Input: The server receives the encrypted data.

[0531] Processing behavior: The server decrypts the data using the SSL / TLS protocol, then decodes the decrypted data back into the original program code, and then uses analysis tools such as Pylint or ESLint to perform lexical analysis, syntax analysis, static analysis, and style guide checks.

[0532] Output: Analyzed data and analysis results.

[0533] Step 4:

[0534] Input: Parsed data and results.

[0535] Processing behavior: Based on the analysis results, the server generates a list of improvements and errors, including specific fixes. The list includes specific fixes such as changing variable names or adding comments.

[0536] Output: A list of improvements and errors.

[0537] Step 5:

[0538] Input: List of improvements and errors.

[0539] Processing operation: The server inputs the analysis result into a generative AI model (e.g., OpenAI's GPT-4) as a prompt sentence. The generative AI model generates a review sentence based on the prompt sentence. The generated review sentence includes correction suggestions and feedback.

[0540] Output: The edited review text.

[0541] Step 6:

[0542] Input: Review text and prompt text.

[0543] Processing behavior: While a user is browsing reviews, the device uses the camera and microphone to capture the user's facial expressions and voice data in real time. The emotion engine analyzes the data and recognizes the user's emotional state.

[0544] Output: Emotion data.

[0545] Step 7:

[0546] Input: Sentiment data and review text.

[0547] Processing action: The server adjusts the tone and content of the review based on the emotional data received. For example, if the user is feeling stressed, the review will be written in a more gentle and encouraging way.

[0548] Output: The adjusted review text.

[0549] Step 8:

[0550] Input: The adjusted review text.

[0551] Processing Actions: The server re-encodes the adjusted review text into binary data and encrypts it using the SSL / TLS protocol. The encrypted data is ready to be sent to the device.

[0552] Output: Encrypted review text.

[0553] Step 9:

[0554] Input: Encrypted review text.

[0555] Processing operation: The device receives the encrypted data from the server and decrypts it using the SSL / TLS protocol. The decrypted data is then decoded into the original review text and displayed on the application interface. The user checks the displayed review results and makes program modifications based on them.

[0556] Output: Decoded review text, and modified program.

[0557] (Application example 2)

[0558] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0559] Conventional computer program analysis systems do not consider the user's emotions when suggesting improvements or error locations, which can cause stress or burden to the user. Furthermore, in the maintenance of robots used in factories, the feedback of diagnostic results is mechanical and does not consider the emotions or mental state of the person in charge, making efficient maintenance difficult. Therefore, there is a need for a system that considers the emotions of users and workers while suggesting appropriate improvements and error locations.

[0560] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[0561] In this invention, the server includes: means for a user to upload his or her own computer program; means for transferring the uploaded computer program to an analysis server; means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking on the uploaded computer program in the analysis server; means for generating a list of improvements and error locations based on the analysis results; means for creating a review text from the generated list using natural language generation technology; means for providing the review text as feedback to the user; means for providing an emotion engine that recognizes the user's emotions in order to adjust the tone of the review text; and means for adjusting the tone of the review text based on the emotion recognition results. This allows code reviews to be performed while taking the user's emotions into consideration, reducing user stress and enabling efficient maintenance and improvement suggestions.

[0562] "User" means a person who uses the System to upload computer programs and receive analytical results.

[0563] A "computer program" refers to a collection of instructions that can be executed by a computer; that is, code written to perform a particular function or task.

[0564] "Upload" refers to the act of transferring data from the user's device to the analysis server.

[0565] "Analysis server" refers to a computer system that analyzes uploaded computer programs and identifies areas for improvement and errors.

[0566] "Lexical analysis" refers to the process of breaking down program code into tokens, and is an early step in understanding the meaning of the code.

[0567] "Syntax analysis" refers to the process of structurally analyzing the tokens broken down by lexical analysis to detect syntax errors.

[0568] "Static analysis" refers to the process of analyzing code without running the program to detect potential errors or problems.

[0569] "Style guide checking" refers to the process of verifying that program code adheres to a particular style guide or coding standard.

[0570] "List of Improvements and Errors" means a list of areas that need to be corrected or recommended improvements that is generated as a result of lexical analysis, syntactic analysis, static analysis and style guide checks.

[0571] "Natural language generation technology" refers to technology that allows a computer to generate human language, and is used to convert the generated list into easy-to-understand sentences.

[0572] "Review text" refers to the feedback generated based on the analysis results, and includes details of areas for improvement and errors, as well as how to correct them.

[0573] An "emotion engine" refers to a system that recognizes emotions from a user's facial expressions and voice and collects them as data.

[0574] "Emotion Recognition Results" refers to the user's emotional data detected by the emotion engine and used to adjust the review text.

[0575] "Adjusting tone" refers to the process of changing the way feedback is presented or worded based on how the user feels.

[0576] This invention provides a system in which a user uploads their own computer program, analyzes the program on an analysis server, and provides feedback on improvements and error locations based on the analysis results. This system is implemented as follows.

[0577] System configuration

[0578] 1. User Device

[0579] The user device provides an interface for users to upload their own computer programs. This interface supports code file selection and upload operations. The user device also has an emotion engine that can recognize emotions from the user's facial expressions and voice. This emotion data is used to adjust the tone of the review text.

[0580] 2. Encryption and Data Transmission

[0581] The user device encodes the uploaded code and encrypts it using SSL / TLS, protecting the entire chain of operations until it is sent to the analysis server.

[0582] 3. Analysis Server

[0583] The analysis server decrypts the received encrypted data using SSL / TLS and decodes it back into the original code. Next, it performs lexical analysis, syntax analysis, static analysis, and style guide checks to generate analysis results. Based on these analysis results, a list of areas for improvement and errors is created. It is also possible to perform analysis based on style guides customized for each company or project.

[0584] 4. Generate feedback

[0585] The analysis server uses natural language generation technology to create review text based on the generated list. These review texts are usually written in a mild manner, but the tone and content are adjusted based on the recognition results of the emotion engine. If the user is feeling stressed, the review text will be adjusted to a gentle, encouraging tone.

[0586] 5. Sending and Viewing Feedback

[0587] The generated review text is then encrypted again and sent to the user's device. The user's device then decrypts the received encrypted data and decodes it back to the original review text. The decoded review text is then displayed to the user, allowing them to modify the code.

[0588] Hardware and software used

[0589] Hardware

[0590] User devices (personal computers, smartphones, tablets, etc.)

[0591] Emotion recognition device (camera, microphone)

[0592] Analysis Server

[0593] software

[0594] Encryption library (SSL / TLS)

[0595] HTTP request library (requests)

[0596] Emotion detection library (EmotionEngine)

[0597] Natural language generation library (ReviewGenerator)

[0598] Specific examples

[0599] For example, if a user uploads the following Python code:

[0600] python

[0601] def add_numbers(a, b):

[0602] return a + b

[0603] The server performs an analysis and identifies areas for improvement and errors, such as:

[0604] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[0605] Add documentation comments to functions to clarify their purpose.

[0606] The emotion engine recognizes that the user is feeling stressed from their facial expressions and voice. Based on this, the server generates the following review text:

[0607] “Improvements:

[0608] Change the variable names 'a' and 'b' to meaningful names.

[0609] Add a documentation comment to clarify the purpose of the function.

[0610] Specific suggested fixes:

[0611] def add_numbers(first_number, second_number):

[0612] """

[0613] Takes two numbers and returns their sum.

[0614] Args:

[0615] first_number (int): The first number

[0616] second_number (int): The second number

[0617] Returns:

[0618] int: the sum of two numbers

[0619] """

[0620] return first_number + second_number

[0621] Your efforts are paying off in a positive direction. Keep up the good work!”

[0622] This allows a system that combines an emotion engine to provide accurate feedback while taking into account the user's emotions, reducing user stress and improving code quality.

[0623] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[0624] Step 1:

[0625] A user uploads the code of a computer program using their own device.

[0626] Specifically, the user opens the application interface on the terminal, selects the code file, and presses the upload button. The input data is the program code file, which is received by the terminal. The uploaded program is then sent to the system as data for later analysis.

[0627] Step 2:

[0628] The device encodes the uploaded code and encrypts it using SSL / TLS.

[0629] Specifically, the code uploaded as input data is encoded in UTF-8 format, and then encrypted data is generated using the SSL / TLS encryption library. This encrypted data is the output and passed to the next processing step.

[0630] Step 3:

[0631] The device sends the encrypted data to an analysis server.

[0632] Specifically, the encrypted data is sent to the analysis server as a POST request using an HTTP request library. The input data is the encrypted code, and the output is the completion of the transmission.

[0633] Step 4:

[0634] The encrypted data received by the server is decrypted using SSL / TLS and decoded back to the original code.

[0635] Specifically, it uses the SSL / TLS library to decrypt the encrypted data received as input, decodes the encoded code, and reproduces the program code. The output data is the decrypted program code.

[0636] Step 5:

[0637] The server performs lexical analysis, syntax analysis, static analysis and style guide checks on the program code.

[0638] Specifically, the decoded program code is passed as input data to the analysis engine, which then performs lexical analysis, syntactic analysis, static analysis, and style guide checks. The output data is the analysis results, including errors and areas for improvement.

[0639] Step 6:

[0640] The server generates a list of improvements and error locations based on the analysis results.

[0641] Specifically, the analysis results are taken in as input data, and a list of improvements and errors is compiled. The output data is a list of improvements and errors.

[0642] Step 7:

[0643] The server creates review text based on the list using natural language generation technology.

[0644] Specifically, the generated list is passed as input data to a natural language generation library to generate review text, and the output data is the review text.

[0645] Step 8:

[0646] The device uses an emotion engine to sense the user's facial expressions and voice and generate emotional data for the user.

[0647] Specifically, the emotion engine receives real-time facial expressions and voice data from the user as input data, and performs emotion recognition processing. The output data is emotion data.

[0648] Step 9:

[0649] The server adjusts the tone of the review text based on the emotional data.

[0650] Specifically, the server receives emotion data and review text as input data, analyzes it with an emotion engine, and adjusts the tone of the review text. The output data is the adjusted review text.

[0651] Step 10:

[0652] The server re-encrypts the adjusted review text and sends it to the user's device.

[0653] Specifically, the input data is the adjusted review text, which is encrypted using the SSL / TLS library and sent to the user's device using the HTTP request library. The output data is a notification of completion of transmission.

[0654] Step 11:

[0655] The device decrypts the received encrypted data and displays the review text to the user.

[0656] Specifically, the system uses an SSL / TLS library to decrypt the encrypted data received as input, decodes it into the original review text, and displays it to the user. The output data is the review text that the user can view.

[0657] Prompt Sentence Examples

[0658] When generating review text, the following is an example of a prompt sentence that reflects emotional data:

[0659] text

[0660] Please generate improvement suggestions in gentle language for the following diagnostic results: Battery degradation: Used for a long time. Motor abnormality: Abnormal noise detected. Please include encouraging language as the user is feeling stressed.

[0661] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[0662] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[0663] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.

[0664] [Second embodiment]

[0665] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.

[0666] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.

[0667] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0668] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.

[0669] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[0670] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[0671] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[0672] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[0673] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[0674] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0675] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[0676] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."

[0677] The "CodeReview Plus" system analyzes computer programs written by users and suggests improvements and errors to improve the efficiency of code reviews. This system automates the entire process from users uploading their code, to the server analyzing it, and then providing feedback on the results.

[0678] System configuration

[0679] 1. User-uploaded code

[0680] Users upload their computer programs through the CodeReview Plus application interface, which supports code file selection and upload operations.

[0681] 2. Code transmission and encryption

[0682] The device encodes the code uploaded by the user and encrypts it using SSL / TLS. This encrypted data is then sent to the server. This step is essential to ensure security.

[0683] 3. Server Analysis

[0684] The server decrypts the received encrypted data and analyzes the computer program. The analysis procedures include lexical analysis, syntactic analysis, static analysis, and style guide checks to determine the quality of the code and detect potential bugs, security holes, performance issues, etc.

[0685] 4. Generate a list of improvements and errors

[0686] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[0687] 5. Generating review text

[0688] The server uses natural language generation technology to create reviews that use harmless language to highlight areas for improvement and errors, allowing users to respond without feeling stressed.

[0689] 6. Feedback on review results

[0690] The server re-encrypts the generated review text and sends it to the user's device, which then decrypts the encrypted data and displays it to the user. The user can then modify the code based on this feedback.

[0691] Specific examples

[0692] For example, if a user uploads the following Python code:

[0693] python

[0694] def add_numbers(a, b):

[0695] return a + b

[0696] The server performs an analysis and identifies areas for improvement and errors, such as:

[0697] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[0698] Add documentation comments to functions to clarify their purpose.

[0699] The server then generates the following review text:

[0700] Improvements:

[0701] Change the variable names 'a' and 'b' to meaningful names.

[0702] Add a documentation comment to clarify the purpose of the function.

[0703] Specific suggested fixes:

[0704] def add_numbers(first_number, second_number):

[0705] """

[0706] Takes two numbers and returns their sum.

[0707] Args:

[0708] first_number (int): The first number

[0709] second_number (int): The second number

[0710] Returns:

[0711] int: the sum of two numbers

[0712] """

[0713] return first_number + second_number

[0714] Users can receive this feedback and modify their code to efficiently write high-quality code. Furthermore, the system analyzes code based on customized style guides for each company or project, enabling appropriate reviews in accordance with specific conventions.

[0715] As described above, the "CodeReview Plus" system allows users to undergo code reviews flexibly and without stress, and supports them in creating high-quality code that meets the requirements of each company or project.

[0716] The processing flow will be explained below.

[0717] Step 1:

[0718] The user selects their computer program (code file) and clicks the "Upload" button in the "CodeReview Plus" application.

[0719] Step 2:

[0720] The terminal encodes the selected code file and encrypts it using SSL / TLS, preparing the encrypted data to be sent to the server.

[0721] Step 3:

[0722] The device sends the encrypted data to the server, using an encryption protocol to ensure security.

[0723] Step 4:

[0724] The server uses SSL / TLS to decrypt the encrypted data it receives, and then decodes the decrypted data back to its original code.

[0725] Step 5:

[0726] The server lexically analyzes the decoded computer program, breaking the code down into tokens and identifying the individual components.

[0727] Example: def add_numbers(a, b): return a + b -> [def, add_numbers, (, a, ,, b, ), :, return, a, +, b]

[0728] Step 6:

[0729] The server performs syntax analysis based on the results of lexical analysis, converting tokens into a syntax tree (AST: Abstract Syntax Tree) to understand the overall structure of the code.

[0730] Example: def add_numbers(a, b): return a + b -> Builds a syntax tree and parses function names, arguments, return values, etc.

[0731] Step 7:

[0732] The server then performs static analysis based on the parsing results, checking for code quality, potential bugs, security holes, performance issues, etc.

[0733] Step 8:

[0734] The server checks whether the code complies with the standards based on a style guide customized for each company or project.

[0735] Step 9:

[0736] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[0737] Step 10:

[0738] The server uses natural language generation technology to create a review that highlights areas for improvement and errors. The generated review is written in a non-critical manner.

[0739] Step 11:

[0740] The server encodes the generated review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[0741] Step 12:

[0742] The server sends the encrypted data to the user's device.

[0743] Step 13:

[0744] The device decrypts the encrypted data received using SSL / TLS, and then decodes the decrypted data into the original review text.

[0745] Step 14:

[0746] Users can check the review results on their devices, and specific improvements and errors are clearly displayed.

[0747] Step 15:

[0748] Users can modify their code based on the review results and can also submit the modified code for review again.

[0749] Example 1

[0750] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0751] In conventional code review systems, analyzing program code uploaded by users and generating review documents are often done manually, making it difficult to perform code reviews efficiently. Furthermore, due to security concerns, unencrypted code data is transmitted, increasing the risk of data leakage. Furthermore, feedback on analysis results is limited, making it difficult to accommodate customized style guides for each company or project. This creates challenges that prevent improvements in code quality and development efficiency.

[0752] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[0753] In this invention, the server includes means for a user to upload their own program, means for transferring the uploaded program, means for a terminal to encrypt the transferred program, means for the server to decrypt the encrypted data received, means for the server to perform lexical analysis, syntactic analysis, static analysis, and style guide check of the uploaded program, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using prompt sentences through natural language generation technology, means for encrypting the review text and feeding it back to the user, and means for decrypting the feedback review text. This allows users to receive code reviews securely and efficiently, enabling them to create high-quality code tailored to the style of each company or project.

[0754] "User" means an entity that uses the system to upload its own programs for analysis and review.

[0755] A "program" is a set of coding instructions uploaded by a user and parsed by a server.

[0756] A "server" is a computer system that decrypts received programs and performs analysis and review generation.

[0757] "Uploading" is the act of a user sending their own program to a server.

[0758] "Encryption" is the process of converting data using the SSL / TLS protocol to transmit program data securely.

[0759] "Decryption" is the process of restoring encrypted data to its original state.

[0760] "Lexical analysis" is the process of breaking down a program's source code into its smallest units, called tokens.

[0761] "Syntax analysis" is the process of analyzing the structure of a program based on the tokens obtained by lexical analysis and generating an abstract syntax tree (AST).

[0762] "Static analysis" is the process of checking the structure and style of program code without executing it to detect potential problems or bugs.

[0763] A "style guide check" is the process of verifying that program code follows specific coding conventions.

[0764] The "list of improvements and errors" is a list of areas to be corrected and defects in the program that have been identified based on the analysis results.

[0765] "Natural language generation technology" is a technology that uses a generative AI model to generate sentences in a form that is easy for humans to understand based on the analysis results.

[0766] A "prompt sentence" is an instruction sentence input to a natural language generation technology.

[0767] A "review text" is a text that provides specific details about areas for improvement and errors and is provided to users as feedback.

[0768] MODE FOR CARRYING OUT THE INVENTION

[0769] The "CodeReview Plus" system analyzes programs written by users and suggests areas for improvement or errors, thereby increasing the efficiency of code reviews. This system automates the entire process from users uploading their code, to the server analyzing it, and providing feedback on the results.

[0770] Specifically, this is realized by the following hardware and software configuration.

[0771] Hardware and Software Configuration

[0772] User device:

[0773] PCs and tablets used by users

[0774] OpenSSL (a library for encryption and decryption)

[0775] server:

[0776] High-Performance Computer Server

[0777] OpenSSL (a library for encryption and decryption)

[0778] PLY (a library for lexical analysis)

[0779] Bison (a generator for parsing)

[0780] Pylint (a tool for static analysis)

[0781] Style guide checking tools (PEP 8, etc.)

[0782] Generative AI models such as GPT-3 (for natural language generation)

[0783] System Operation

[0784] Users upload their own programs through the CodeReview Plus application interface. The interface supports drag-and-drop and file selection dialogs, making it easy for users to upload code. The uploaded code is temporarily loaded into memory on the device.

[0785] The device uses the OpenSSL library to encrypt the uploaded code using the SSL / TLS protocol, and then sends the encrypted data to a server over the Internet, ensuring secure data transmission.

[0786] The server decrypts the received encrypted data using OpenSSL. The decrypted code data is then lexically analyzed using the PLY library and broken down into tokens. Next, it is parsed using a Bison generator to generate an abstract syntax tree (AST). After that, static analysis is performed using Pylint to check the code quality and detect potential bugs and security holes. Finally, a style guide checking tool is used to check whether coding standards are being followed.

[0787] Based on the analysis, the server generates a list of improvements and errors, which may include an entry such as "Rename variables 'a' and 'b' to meaningful names." This list is stored in an internal database.

[0788] Next, the server sends a prompt to the generative AI model to generate a natural language review. For example, the prompt "Please change the variable names 'a' and 'b' to meaningful names" is sent to GPT-3. The review text obtained as a response from the AI ​​model includes specific instructions such as "Please change the variable names 'a' and 'b' to meaningful names."

[0789] The generated review text is then re-encrypted and sent to the device, where it is decrypted and displayed in the user interface. The user can then modify the code based on this feedback and submit the review again.

[0790] Specific examples

[0791] For example, if a user uploads the following Python code:

[0792] python

[0793] def add_numbers(a, b):

[0794] return a + b

[0795] The server performs an analysis and identifies areas for improvement and errors, such as:

[0796] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[0797] Add documentation comments to functions to clarify their purpose.

[0798] Based on this, the server generates the following review text:

[0799] Improvements:

[0800] Change the variable names 'a' and 'b' to meaningful names.

[0801] Add a documentation comment to clarify the purpose of the function.

[0802] Specific suggested fixes:

[0803] def add_numbers(first_number, second_number):

[0804] """

[0805] Takes two numbers and returns their sum.

[0806] Args:

[0807] first_number (int): The first number

[0808] second_number (int): The second number

[0809] Returns:

[0810] int: the sum of two numbers

[0811] """

[0812] return first_number + second_number

[0813] In this way, the CodeReview Plus system enables users to undergo code reviews securely and efficiently, helping them create high-quality code that matches the style of their company or project.

[0814] keyword

[0815] Generative AI model, prompt sentence

[0816] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0817] Program processing flow and specific explanation

[0818] Step 1: User uploads code

[0819] explanation

[0820] The user uploads the program through the CodeReview Plus application interface by selecting the code file (e.g., example.py) to be analyzed through the file selection dialog and pressing the upload button.

[0821] input

[0822] A code file selected by the user.

[0823] output

[0824] The selected code file is transferred to the terminal and temporarily loaded into memory.

[0825] Specific actions

[0826] The user clicks the "Upload Code" button and selects example.py from the file dialog. The selected file is saved in temporary memory.

[0827] Step 2: Encrypt and transfer the code

[0828] explanation

[0829] The terminal encrypts the uploaded code file and transfers it to the server.

[0830] input

[0831] The user's code files loaded into memory.

[0832] output

[0833] The code data is encrypted using the SSL / TLS protocol and transmitted to the server.

[0834] Specific actions

[0835] The device uses the OpenSSL library to encrypt the contents of example.py and sends the encrypted data to the server as a POST request.

[0836] Step 3: Server decrypts the data

[0837] explanation

[0838] The server decrypts the received encrypted data.

[0839] input

[0840] Code data sent from the device encrypted with SSL / TLS.

[0841] output

[0842] The decrypted original code data.

[0843] Specific actions

[0844] The server uses OpenSSL to receive the encrypted data, decrypt it, and recreate the original code in example.py.

[0845] Step 4: Performing Lexical Analysis

[0846] explanation

[0847] The server breaks down the decrypted code data into tokens using a lexical analyzer.

[0848] input

[0849] Decoded code data.

[0850] output

[0851] A list of the code broken down into tokens.

[0852] Specific actions

[0853] The server uses the PLY library to break the contents of example.py into tokens and store them as a list.

[0854] Step 5: Performing Parsing

[0855] explanation

[0856] The server performs syntax analysis using the lexical analysis results.

[0857] input

[0858] Code data broken down into tokens.

[0859] output

[0860] Abstract Syntax Tree (AST).

[0861] Specific actions

[0862] The server uses a Bison generator to generate an AST from the token list.

[0863] Step 6: Running static analysis

[0864] explanation

[0865] The server performs static analysis using the parsing results.

[0866] input

[0867] AST.

[0868] output

[0869] Reporting code quality, potential bugs and security holes.

[0870] Specific actions

[0871] The server uses Pylint to parse example.py and generate a report on quality and bugs.

[0872] Step 7: Run a style guide check

[0873] explanation

[0874] The server performs a style guide check using the static analysis results.

[0875] input

[0876] Results of the previous static analysis.

[0877] output

[0878] Check results for compliance with coding standards.

[0879] Specific actions

[0880] The server uses a style guide checking tool to verify that example.py complies with coding standards such as PEP 8.

[0881] Step 8: Generate a list of improvements and errors

[0882] explanation

[0883] The server generates a list of improvements and error locations based on the analysis results.

[0884] input

[0885] Style guide check results.

[0886] output

[0887] List of improvements and errors.

[0888] Specific actions

[0889] Based on the analysis results, the server generates a list of improvements, such as "change the variable names 'a' and 'b' to meaningful names," and stores it in an internal database.

[0890] Step 9: Generate review text

[0891] explanation

[0892] The server sends prompt sentences to the generative AI model, which generates review sentences in natural language.

[0893] input

[0894] List of improvements and errors.

[0895] output

[0896] Review text written in natural language.

[0897] Specific actions

[0898] The server sends a prompt to GPT-3 saying, "Please change the variable names 'a' and 'b' to meaningful names," and stores the generated review text in an internal database.

[0899] Step 10: Encrypt and transfer the review text

[0900] explanation

[0901] The server re-encrypts the generated review text and sends it to the user's device.

[0902] input

[0903] Generated review text.

[0904] output

[0905] Review text data encrypted using the SSL / TLS protocol.

[0906] Specific actions

[0907] The server uses OpenSSL to encrypt the review text and send it to the terminal via a POST request.

[0908] Step 11: Decode and display the review text on the device

[0909] explanation

[0910] The terminal decrypts the encrypted review text data and displays it on the user interface.

[0911] input

[0912] Review text data encrypted using the SSL / TLS protocol.

[0913] output

[0914] The review text that is displayed to users.

[0915] Specific actions

[0916] The device uses OpenSSL to decrypt the encrypted data and reproduces the review text and displays it to the user, who can then review the feedback and modify the code.

[0917] (Application example 1)

[0918] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0919] Most conventional software review systems analyze and provide feedback on general computer programs, but there is a lack of systems specialized for specific applications, particularly factory robot control code. Factory robot control code differs from regular software in that it requires real-time performance and enhanced security, making a specialized code review system necessary. There is also a demand for improved productivity through immediate feedback of errors and areas for improvement in factory robot code.

[0920] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[0921] In this invention, the server includes means for users to upload their own software, means for transferring the uploaded software to an analysis device, means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking of the uploaded software in the analysis device, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using natural language generation technology, means for providing feedback on the review text to the user, and means for performing similar analysis and feedback on the control code of a factory robot, thereby enabling quality improvement of the control code of the factory robot and real-time error feedback.

[0922] "User" means a person who uploads software to the system and receives feedback.

[0923] "Software" means executable program code uploaded by Users to the System.

[0924] An "analysis device" is a computer system for analyzing uploaded software.

[0925] "Lexical analysis" is the analytical process of breaking down software code into its individual components and interpreting their meaning.

[0926] "Syntax analysis" is the process of analyzing the structure of software code and determining the relationships between components according to the grammar of the language.

[0927] "Static analysis" is the process of discovering bugs, errors, and performance problems by analyzing software code without executing it.

[0928] A "style guide check" is the process of verifying that software code complies with established coding standards and style guides.

[0929] "Points for improvement" are suggestions for improving the quality of the software code that are discovered by the analysis device.

[0930] The "error location" refers to an error or defect in the software code that is discovered by the analysis device.

[0931] "Natural language generation technology" is a technology that allows computers to generate natural human language.

[0932] A "review text" is a text generated based on the analysis results to provide feedback to the user.

[0933] "Feedback" is the process of communicating the review text generated by the analysis device to the user.

[0934] A "factory robot" is an automated mechanical device used in a factory that requires control code to perform specific tasks.

[0935] "Control code" is a software program written to control the operation of a factory robot.

[0936] The RoboCode Review Plus system aims to improve the quality of factory robot control code and provide real-time error feedback. The system uses an analysis device to analyze software uploaded by users, lists areas for improvement and errors based on the analysis results, and creates review text using natural language generation technology.

[0937] System configuration

[0938] 1. User Upload of Software

[0939] Users upload their software through the RoboCode Review Plus application interface, which supports software file selection and upload operations.

[0940] 2. Software Transfer and Encryption

[0941] The device encodes the software uploaded by the user and encrypts it using SSL / TLS, a step essential to ensure the security of sending this encrypted data to the analysis device.

[0942] 3. Analysis using an analytical device

[0943] The analysis device decrypts the received encrypted data and analyzes the software. The analysis procedures include lexical analysis, syntax analysis, static analysis, and style guide checks to detect code quality, potential bugs, security holes, performance issues, etc.

[0944] 4. Generate a list of improvements and errors

[0945] Based on the analysis results, the analyzer generates a list of improvements and errors, including specific points to be corrected.

[0946] 5. Generating review text

[0947] The analysis device uses natural language generation technology to create review text in easy-to-understand language about areas for improvement and errors, allowing users to respond without feeling stressed.

[0948] 6. Feedback on review results

[0949] The analysis device encrypts the review text and sends it to the user's device, which then decrypts the encrypted data and displays it to the user. The user can then modify the software based on this feedback.

[0950] Hardware and software used

[0951] Data encryption with SSL / TLS

[0952] Software lexical analysis, syntactic analysis, static analysis, and style guide checking by an analyzer

[0953] Creating review text using natural language generation technology

[0954] Specific examples

[0955] For example, suppose a user uploads the following control code for a factory robot:

[0956] python

[0957] def move_robot(direction, speed):

[0958] Code to move the robot

[0959] ...

[0960] return True

[0961] The analyzer analyzes this code and identifies areas for improvement and errors, such as:

[0962] The variable names 'direction' and 'speed' need to be changed to meaningful names.

[0963] Add documentation comments to functions to clarify their purpose.

[0964] Based on this, the analyzer generates the following review text:

[0965] "Rename the variables 'direction' and 'speed' to more meaningful names. Add documentation comments to clarify the purpose of the function."

[0966] Users can receive this feedback and modify their code to create high-quality control code.

[0967] Example prompts for generative AI models

[0968] "Review the robot's control code and identify the following improvements and errors. Please include specific suggestions for improvements and corrections for each error."

[0969] As described above, the RoboCode Review Plus system allows users to receive flexible and stress-free reviews, improving the quality of factory robot control code.

[0970] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0971] Step 1:

[0972] Users upload their own software through the system interface. The input is a software file stored on the user's device, and the user selects a specific software file from the file selection screen and clicks the upload button to prepare for transfer.

[0973] Step 2:

[0974] The device encodes the software uploaded by the user and encrypts it using SSL / TLS. The input here is the software file selected in step 1, and after encoding and encryption processing, the output is encrypted data that can be securely transferred over the network.

[0975] Step 3:

[0976] The terminal sends the encrypted data to the analysis device. The input is the encrypted data generated in step 2, and the output is the software data sent to the server. This process allows the software to reach the analysis device.

[0977] Step 4:

[0978] The server decrypts the encrypted data it receives and analyzes the software. The input is the encrypted data sent from the terminal, and the original software code is obtained after the decryption process. The output is the software code to be analyzed.

[0979] Step 5:

[0980] The server performs lexical analysis, syntax analysis, static analysis, and style guide checks on the software. The input is the decoded software code, and various analysis processes are performed to generate diagnostic results. The output is the diagnostic results.

[0981] Step 6:

[0982] The server generates a list of improvements and errors based on the analysis results. The input is the analysis results obtained in step 5, and specific improvements and errors are listed through further data processing. The output is a list of improvements and errors.

[0983] Step 7:

[0984] The server uses natural language generation technology to create a review from the generated list. The input is a list of improvements and errors, and prompts are used to translate the list into natural language that is easy for the user to understand. The output is the final review.

[0985] Step 8:

[0986] The server re-encrypts the review text and sends it to the user's device. The input is the review text generated in step 7, which is securely sent to the user after the encryption process. The output is the encrypted review text.

[0987] Step 9:

[0988] The device decrypts the encrypted review text and displays it to the user. The input is the encrypted review text sent from the server, and the original review text is extracted through the decryption process and displayed to the user. The output is the review content that the user can view.

[0989] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[0990] The "CodeReview Plus" system, which incorporates an emotion engine, not only analyzes the computer programs written by users in detail and suggests areas for improvement and errors, but also recognizes the user's emotions and adjusts the review text appropriately. This system automates the entire process, from the user uploading the code, to the server analyzing it, and providing feedback on the results, using the emotion engine.

[0991] System configuration

[0992] 1. User-uploaded code

[0993] Users upload their computer programs through the CodeReview Plus application interface, which supports code file selection and upload operations.

[0994] 2. Code transmission and encryption

[0995] The device encodes the code uploaded by the user and encrypts it using SSL / TLS, preparing this encrypted data for transmission to the server.

[0996] 3. Server Analysis

[0997] The server decrypts the encrypted data received using SSL / TLS, decodes the decrypted data back to the original code, and then analyzes the uploaded code using lexical analysis, syntax analysis, static analysis, and style guide checks.

[0998] 4. Generate a list of improvements and errors

[0999] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[1000] 5. Generating review text

[1001] The server uses natural language generation technology to generate reviews based on the generated list, which are usually written in a non-stingy style.

[1002] 6. Emotion Recognition by Emotion Engine

[1003] The device recognizes the user's emotions from their facial expressions and voice, and the emotion engine collects the user's emotional data and sends it to the server.

[1004] 7. Adjust review text based on sentiment

[1005] The server adjusts the tone and content of the review based on the user's emotional data received from the emotion engine. For example, if the user is feeling stressed, it uses gentle, encouraging language.

[1006] 8. Feedback on review results

[1007] The server encodes the revised review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[1008] 9. Check the review results

[1009] The device uses SSL / TLS to decrypt the encrypted data received and decode it into the original review text. The user can then review the review and correct the code.

[1010] Specific examples

[1011] For example, if a user uploads the following Python code:

[1012] python

[1013] def add_numbers(a, b):

[1014] return a + b

[1015] The server performs an analysis and identifies areas for improvement and errors, such as:

[1016] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1017] Add documentation comments to functions to clarify their purpose.

[1018] The emotion engine recognizes when a user is feeling stressed from their facial expressions and voice.

[1019] The server then generates the following review text:

[1020] Improvements:

[1021] Change the variable names 'a' and 'b' to meaningful names.

[1022] Add a documentation comment to clarify the purpose of the function.

[1023] Specific suggested fixes:

[1024] def add_numbers(first_number, second_number):

[1025] """

[1026] Takes two numbers and returns their sum.

[1027] Args:

[1028] first_number (int): The first number

[1029] second_number (int): The second number

[1030] Returns:

[1031] int: the sum of two numbers

[1032] """

[1033] return first_number + second_number

[1034] Your efforts are paying off in a positive direction. Keep up the good work!

[1035] In this way, the "CodeReview Plus" system, which combines an emotion engine, can reduce stress and improve code quality by providing feedback that takes user emotions into account.

[1036] The processing flow will be explained below.

[1037] Step 1:

[1038] The user selects their computer program (code file) and clicks the "Upload" button in the "CodeReview Plus" application.

[1039] Step 2:

[1040] The terminal encodes the selected code file and encrypts it using SSL / TLS, preparing the encrypted data to be sent to the server.

[1041] Step 3:

[1042] The device sends the encrypted data to the server, using an encryption protocol to ensure security.

[1043] Step 4:

[1044] The server uses SSL / TLS to decrypt the encrypted data it receives, and then decodes the decrypted data back to its original code.

[1045] Step 5:

[1046] The server lexically analyzes the decoded computer program, breaking the code down into tokens and identifying the individual components.

[1047] Example: def add_numbers(a, b): return a + b -> [def, add_numbers, (, a, ,, b, ), :, return, a, +, b]

[1048] Step 6:

[1049] The server performs syntax analysis based on the results of lexical analysis, converting tokens into a syntax tree (AST: Abstract Syntax Tree) to understand the overall structure of the code.

[1050] Example: def add_numbers(a, b): return a + b -> Builds a syntax tree and parses function names, arguments, return values, etc.

[1051] Step 7:

[1052] The server then performs static analysis based on the parsing results, checking for code quality, potential bugs, security holes, performance issues, etc.

[1053] Step 8:

[1054] The server checks whether the code complies with the standards based on a style guide customized for each company or project.

[1055] Step 9:

[1056] Based on the analysis, the server generates a list of improvements and errors, including specific points to fix.

[1057] Step 10:

[1058] The server uses natural language generation technology to generate reviews, usually written in a non-stinging style, highlighting areas for improvement and errors.

[1059] Step 11:

[1060] The device uses an emotion engine that recognizes emotions from the user's facial expressions and voice, and this engine collects the user's emotion data and sends it to the server.

[1061] Step 12:

[1062] The server adjusts the tone and content of the review based on the user's emotional data received from the emotion engine. For example, if the user is feeling stressed, it uses gentle, encouraging language.

[1063] Step 13:

[1064] The server encodes the revised review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[1065] Step 14:

[1066] The server sends the encrypted data to the user's device.

[1067] Step 15:

[1068] The device decrypts the encrypted data received using SSL / TLS, and then decodes the decrypted data into the original review text.

[1069] Step 16:

[1070] Users can check the review results on their devices, and specific improvements and errors are clearly displayed.

[1071] Step 17:

[1072] Users can modify their code based on the review results and can also submit the modified code for review again.

[1073] Example 2

[1074] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[1075] Traditional computer program review systems provide feedback without considering users' feelings, which can cause stress and demotivation. Furthermore, the reviews are often not presented in a format that users can easily understand, or are often cold-hearted, reducing users' motivation to improve. Furthermore, the lack of flexible analysis based on style guides customized for each company or project leads to issues with inconsistent feedback quality.

[1076] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[1077] In this invention, the server includes means for users to upload their own computer programs, means for transferring the uploaded computer programs to an analysis server, means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking on the uploaded computer programs in the analysis server, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using natural language generation technology, means for recognizing the user's emotions and adjusting the tone and content of the review text based on those emotions, and means for providing feedback on the review text to the user. This allows for flexible and high-quality feedback that takes the user's emotions into consideration, reducing user stress and increasing their motivation to improve.

[1078] "User" means any person or entity that wishes to use the System to have their computer program reviewed.

[1079] A "computer program" is a collection of computer-executable instructions and associated data structures.

[1080] "Uploading" is the act of a user transferring data from their own device to a specific server.

[1081] "Analysis Server" is a central management server for analyzing uploaded computer programs.

[1082] "Lexical analysis" is the process of breaking down program statements into units called tokens.

[1083] "Syntax analysis" is the process of rearranging the tokens into a tree structure and checking whether the grammar is correct.

[1084] "Static analysis" is a technique for analyzing source code without executing it to detect bugs and style violations.

[1085] A "style guide check" is the process of checking whether code complies with established coding standards.

[1086] The "List of improvements and errors" is a list of code corrections and problems.

[1087] "Natural language generation technology" is a technology that uses computers to generate text in natural language that humans can understand.

[1088] A "review document" is a document created based on the analysis results that describes improvements to the computer program and how to correct errors.

[1089] "Emotion recognition" is a technology that analyzes the user's emotions from their facial expressions and voice and grasps their situation.

[1090] "Adjusting tone and content" is the process of making changes to the way a sentence is expressed or its content based on the user's emotional data.

[1091] "Feedback" refers to the act of returning analysis results and review text to users and providing them with information.

[1092] This invention is a system that allows users to upload their own computer programs and automates the analysis and feedback of those programs. Specific embodiments for implementing this system are described below.

[1093] Configuration overview

[1094] The system consists of the following main components:

[1095] 1. The interface where users upload programs

[1096] 2. Terminals for receiving and transmitting uploaded programs

[1097] 3. Analysis server that performs analysis and generates reviews

[1098] 4. A sentiment engine that recognizes user sentiment and adjusts reviews accordingly

[1099] 5. Device that provides feedback results to users

[1100] Detailed process

[1101] 1. User-uploaded code

[1102] Through the system interface, the user selects and uploads a computer program from the local file system by clicking the "Upload" button.

[1103] 2. Code transmission and encryption

[1104] The device first encodes the code uploaded by the user and then encrypts it using the SSL / TLS protocol, which allows the data to be securely transmitted to the server.

[1105] 3. Server Analysis

[1106] The server decrypts the received encrypted data using SSL / TLS, decodes it back to the original code, and then uses analysis tools such as Pylint and ESLint to perform lexical analysis, syntax analysis, static analysis, and style guide checking.

[1107] 4. Generate a list of improvements and errors

[1108] Based on the analysis, the server generates a list of improvements and errors, including specific fixes, such as changing variable names or adding documentation comments.

[1109] 5. Generating review text

[1110] The server then passes the generated list as a prompt to a generative AI model (e.g., OpenAI's GPT-4) to create a review text, which includes specific revision suggestions and feedback.

[1111] 6. Emotion Recognition by Emotion Engine

[1112] While users browse reviews, the device uses a camera and microphone to capture their facial expressions and voice, and the emotion engine analyzes that data to recognize their emotional state.

[1113] 7. Adjust review text based on sentiment

[1114] The server uses the data received from the emotion engine to adjust the tone and content of the generated review text depending on the user's state of mind. For example, if the user is feeling stressed, the review text will be changed to a gentle, encouraging one.

[1115] 8. Feedback on review results

[1116] The adjusted review text is then encoded back into binary data, encrypted using SSL / TLS, and sent to the device, where it is received and decrypted, allowing the user to view the review results.

[1117] Specific examples

[1118] For example, if a user uploads the following Python code:

[1119] python

[1120] def add_numbers(a, b):

[1121] return a + b

[1122] The server performs an analysis and identifies areas for improvement and errors, such as:

[1123] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1124] Add documentation comments to functions to clarify their purpose.

[1125] The emotion engine recognizes from the user's facial expressions and voice that the user is feeling stressed. Based on this, the server generates the following review text:

[1126] Improvements:

[1127] Change the variable names 'a' and 'b' to meaningful names.

[1128] Add a documentation comment to clarify the purpose of the function.

[1129] Specific suggested fixes:

[1130] def add_numbers(first_number, second_number):

[1131] """

[1132] Takes two numbers and returns their sum.

[1133] Args:

[1134] first_number (int): The first number

[1135] second_number (int): The second number

[1136] Returns:

[1137] int: the sum of two numbers

[1138] """

[1139] return first_number + second_number

[1140] Your efforts are paying off in a positive direction. Keep up the good work!

[1141] Prompt Sentence Examples

[1142] Enter the following prompt into the generative AI model:

[1143] In a stressful situation, please write in a gentle, encouraging tone, offering specific suggestions for improving the uploaded Python code.

[1144] Original code:

[1145] def add_numbers(a, b):

[1146] return a + b

[1147] Analysis results:

[1148] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1149] Add documentation comments to functions to clarify their purpose.

[1150] Review in a gentle, encouraging tone:

[1151] In this way, you can take user sentiment into consideration and provide specific feedback to improve the quality of your code.

[1152] The flow of the identification process in the second embodiment will be described with reference to FIG.

[1153] Step 1:

[1154] Input: The user selects their computer program file.

[1155] Operation: The user opens the "CodeReview Plus" application interface, presses the "Upload Code" button, then selects the program file they want to review from the file selection dialog and clicks the "Upload" button.

[1156] Output: The selected program file is ready to be uploaded by the terminal.

[1157] Step 2:

[1158] Input: User presses upload button.

[1159] Actions: The device encodes the contents of the selected program file and encrypts it using the SSL / TLS protocol. The encrypted data is ready to be sent to the server.

[1160] Output: The encrypted program data is sent to the server.

[1161] Step 3:

[1162] Input: The server receives the encrypted data.

[1163] Processing behavior: The server decrypts the data using the SSL / TLS protocol, then decodes the decrypted data back into the original program code, and then uses analysis tools such as Pylint or ESLint to perform lexical analysis, syntax analysis, static analysis, and style guide checks.

[1164] Output: Analyzed data and analysis results.

[1165] Step 4:

[1166] Input: Parsed data and results.

[1167] Processing behavior: Based on the analysis results, the server generates a list of improvements and errors, including specific fixes. The list includes specific fixes such as changing variable names or adding comments.

[1168] Output: A list of improvements and errors.

[1169] Step 5:

[1170] Input: List of improvements and errors.

[1171] Processing operation: The server inputs the analysis result into a generative AI model (e.g., OpenAI's GPT-4) as a prompt sentence. The generative AI model generates a review sentence based on the prompt sentence. The generated review sentence includes correction suggestions and feedback.

[1172] Output: The edited review text.

[1173] Step 6:

[1174] Input: Review text and prompt text.

[1175] Processing behavior: While a user is browsing reviews, the device uses the camera and microphone to capture the user's facial expressions and voice data in real time. The emotion engine analyzes the data and recognizes the user's emotional state.

[1176] Output: Emotion data.

[1177] Step 7:

[1178] Input: Sentiment data and review text.

[1179] Processing action: The server adjusts the tone and content of the review based on the emotional data received. For example, if the user is feeling stressed, the review will be written in a more gentle and encouraging way.

[1180] Output: The adjusted review text.

[1181] Step 8:

[1182] Input: The adjusted review text.

[1183] Processing Actions: The server re-encodes the adjusted review text into binary data and encrypts it using the SSL / TLS protocol. The encrypted data is ready to be sent to the device.

[1184] Output: Encrypted review text.

[1185] Step 9:

[1186] Input: Encrypted review text.

[1187] Processing operation: The device receives the encrypted data from the server and decrypts it using the SSL / TLS protocol. The decrypted data is then decoded into the original review text and displayed on the application interface. The user checks the displayed review results and makes program modifications based on them.

[1188] Output: Decoded review text, and modified program.

[1189] (Application example 2)

[1190] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[1191] Conventional computer program analysis systems do not consider the user's emotions when suggesting improvements or error locations, which can cause stress or burden to the user. Furthermore, in the maintenance of robots used in factories, the feedback of diagnostic results is mechanical and does not consider the emotions or mental state of the person in charge, making efficient maintenance difficult. Therefore, there is a need for a system that considers the emotions of users and workers while suggesting appropriate improvements and error locations.

[1192] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[1193] In this invention, the server includes: means for a user to upload his or her own computer program; means for transferring the uploaded computer program to an analysis server; means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking on the uploaded computer program in the analysis server; means for generating a list of improvements and error locations based on the analysis results; means for creating a review text from the generated list using natural language generation technology; means for providing the review text as feedback to the user; means for providing an emotion engine that recognizes the user's emotions in order to adjust the tone of the review text; and means for adjusting the tone of the review text based on the emotion recognition results. This allows code reviews to be performed while taking the user's emotions into consideration, reducing user stress and enabling efficient maintenance and improvement suggestions.

[1194] "User" means a person who uses the System to upload computer programs and receive analytical results.

[1195] A "computer program" refers to a collection of instructions that can be executed by a computer; that is, code written to perform a particular function or task.

[1196] "Upload" refers to the act of transferring data from the user's device to the analysis server.

[1197] "Analysis server" refers to a computer system that analyzes uploaded computer programs and identifies areas for improvement and errors.

[1198] "Lexical analysis" refers to the process of breaking down program code into tokens, and is an early step in understanding the meaning of the code.

[1199] "Syntax analysis" refers to the process of structurally analyzing the tokens broken down by lexical analysis to detect syntax errors.

[1200] "Static analysis" refers to the process of analyzing code without running the program to detect potential errors or problems.

[1201] "Style guide checking" refers to the process of verifying that program code adheres to a particular style guide or coding standard.

[1202] "List of Improvements and Errors" means a list of areas that need to be corrected or recommended improvements that is generated as a result of lexical analysis, syntactic analysis, static analysis and style guide checks.

[1203] "Natural language generation technology" refers to technology that allows a computer to generate human language, and is used to convert the generated list into easy-to-understand sentences.

[1204] "Review text" refers to the feedback generated based on the analysis results, and includes details of areas for improvement and errors, as well as how to correct them.

[1205] An "emotion engine" refers to a system that recognizes emotions from a user's facial expressions and voice and collects them as data.

[1206] "Emotion Recognition Results" refers to the user's emotional data detected by the emotion engine and used to adjust the review text.

[1207] "Adjusting tone" refers to the process of changing the way feedback is presented or worded based on how the user feels.

[1208] This invention provides a system in which a user uploads their own computer program, analyzes the program on an analysis server, and provides feedback on improvements and error locations based on the analysis results. This system is implemented as follows.

[1209] System configuration

[1210] 1. User Device

[1211] The user device provides an interface for users to upload their own computer programs. This interface supports code file selection and upload operations. The user device also has an emotion engine that can recognize emotions from the user's facial expressions and voice. This emotion data is used to adjust the tone of the review text.

[1212] 2. Encryption and Data Transmission

[1213] The user device encodes the uploaded code and encrypts it using SSL / TLS, protecting the entire chain of operations until it is sent to the analysis server.

[1214] 3. Analysis Server

[1215] The analysis server decrypts the received encrypted data using SSL / TLS and decodes it back into the original code. Next, it performs lexical analysis, syntax analysis, static analysis, and style guide checks to generate analysis results. Based on these analysis results, a list of areas for improvement and errors is created. It is also possible to perform analysis based on style guides customized for each company or project.

[1216] 4. Generate feedback

[1217] The analysis server uses natural language generation technology to create review text based on the generated list. These review texts are usually written in a mild manner, but the tone and content are adjusted based on the recognition results of the emotion engine. If the user is feeling stressed, the review text will be adjusted to a gentle, encouraging tone.

[1218] 5. Sending and Viewing Feedback

[1219] The generated review text is then encrypted again and sent to the user's device. The user's device then decrypts the received encrypted data and decodes it back to the original review text. The decoded review text is then displayed to the user, allowing them to modify the code.

[1220] Hardware and software used

[1221] Hardware

[1222] User devices (personal computers, smartphones, tablets, etc.)

[1223] Emotion recognition device (camera, microphone)

[1224] Analysis Server

[1225] software

[1226] Encryption library (SSL / TLS)

[1227] HTTP request library (requests)

[1228] Emotion detection library (EmotionEngine)

[1229] Natural language generation library (ReviewGenerator)

[1230] Specific examples

[1231] For example, if a user uploads the following Python code:

[1232] python

[1233] def add_numbers(a, b):

[1234] return a + b

[1235] The server performs an analysis and identifies areas for improvement and errors, such as:

[1236] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1237] Add documentation comments to functions to clarify their purpose.

[1238] The emotion engine recognizes that the user is feeling stressed from their facial expressions and voice. Based on this, the server generates the following review text:

[1239] “Improvements:

[1240] Change the variable names 'a' and 'b' to meaningful names.

[1241] Add a documentation comment to clarify the purpose of the function.

[1242] Specific suggested fixes:

[1243] def add_numbers(first_number, second_number):

[1244] """

[1245] Takes two numbers and returns their sum.

[1246] Args:

[1247] first_number (int): The first number

[1248] second_number (int): The second number

[1249] Returns:

[1250] int: the sum of two numbers

[1251] """

[1252] return first_number + second_number

[1253] Your efforts are paying off in a positive direction. Keep up the good work!”

[1254] This allows a system that combines an emotion engine to provide accurate feedback while taking into account the user's emotions, reducing user stress and improving code quality.

[1255] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[1256] Step 1:

[1257] A user uploads the code of a computer program using their own device.

[1258] Specifically, the user opens the application interface on the terminal, selects the code file, and presses the upload button. The input data is the program code file, which is received by the terminal. The uploaded program is then sent to the system as data for later analysis.

[1259] Step 2:

[1260] The device encodes the uploaded code and encrypts it using SSL / TLS.

[1261] Specifically, the code uploaded as input data is encoded in UTF-8 format, and then encrypted data is generated using the SSL / TLS encryption library. This encrypted data is the output and passed to the next processing step.

[1262] Step 3:

[1263] The device sends the encrypted data to an analysis server.

[1264] Specifically, the encrypted data is sent to the analysis server as a POST request using an HTTP request library. The input data is the encrypted code, and the output is the completion of the transmission.

[1265] Step 4:

[1266] The encrypted data received by the server is decrypted using SSL / TLS and decoded back to the original code.

[1267] Specifically, it uses the SSL / TLS library to decrypt the encrypted data received as input, decodes the encoded code, and reproduces the program code. The output data is the decrypted program code.

[1268] Step 5:

[1269] The server performs lexical analysis, syntax analysis, static analysis and style guide checks on the program code.

[1270] Specifically, the decoded program code is passed as input data to the analysis engine, which then performs lexical analysis, syntactic analysis, static analysis, and style guide checks. The output data is the analysis results, including errors and areas for improvement.

[1271] Step 6:

[1272] The server generates a list of improvements and error locations based on the analysis results.

[1273] Specifically, the analysis results are taken in as input data, and a list of improvements and errors is compiled. The output data is a list of improvements and errors.

[1274] Step 7:

[1275] The server creates review text based on the list using natural language generation technology.

[1276] Specifically, the generated list is passed as input data to a natural language generation library to generate review text, and the output data is the review text.

[1277] Step 8:

[1278] The device uses an emotion engine to sense the user's facial expressions and voice and generate emotional data for the user.

[1279] Specifically, the emotion engine receives real-time facial expressions and voice data from the user as input data, and performs emotion recognition processing. The output data is emotion data.

[1280] Step 9:

[1281] The server adjusts the tone of the review text based on the emotional data.

[1282] Specifically, the server receives emotion data and review text as input data, analyzes it with an emotion engine, and adjusts the tone of the review text. The output data is the adjusted review text.

[1283] Step 10:

[1284] The server re-encrypts the adjusted review text and sends it to the user's device.

[1285] Specifically, the input data is the adjusted review text, which is encrypted using the SSL / TLS library and sent to the user's device using the HTTP request library. The output data is a notification of completion of transmission.

[1286] Step 11:

[1287] The device decrypts the received encrypted data and displays the review text to the user.

[1288] Specifically, the system uses an SSL / TLS library to decrypt the encrypted data received as input, decodes it into the original review text, and displays it to the user. The output data is the review text that the user can view.

[1289] Prompt Sentence Examples

[1290] When generating review text, the following is an example of a prompt sentence that reflects emotional data:

[1291] text

[1292] Please generate improvement suggestions in gentle language for the following diagnostic results: Battery degradation: Used for a long time. Motor abnormality: Abnormal noise detected. Please include encouraging language as the user is feeling stressed.

[1293] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[1294] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[1295] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.

[1296] [Third embodiment]

[1297] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.

[1298] 5, the data processing system 310 includes the data processing device 12 and a headset type terminal 314. An example of the data processing device 12 is a server.

[1299] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[1300] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.

[1301] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[1302] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[1303] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[1304] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[1305] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[1306] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[1307] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[1308] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."

[1309] The "CodeReview Plus" system analyzes computer programs written by users and suggests improvements and errors to improve the efficiency of code reviews. This system automates the entire process from users uploading their code, to the server analyzing it, and then providing feedback on the results.

[1310] System configuration

[1311] 1. User-uploaded code

[1312] Users upload their computer programs through the CodeReview Plus application interface, which supports code file selection and upload operations.

[1313] 2. Code transmission and encryption

[1314] The device encodes the code uploaded by the user and encrypts it using SSL / TLS. This encrypted data is then sent to the server. This step is essential to ensure security.

[1315] 3. Server Analysis

[1316] The server decrypts the received encrypted data and analyzes the computer program. The analysis procedures include lexical analysis, syntactic analysis, static analysis, and style guide checks to determine the quality of the code and detect potential bugs, security holes, performance issues, etc.

[1317] 4. Generate a list of improvements and errors

[1318] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[1319] 5. Generating review text

[1320] The server uses natural language generation technology to create reviews that use harmless language to highlight areas for improvement and errors, allowing users to respond without feeling stressed.

[1321] 6. Feedback on review results

[1322] The server re-encrypts the generated review text and sends it to the user's device, which then decrypts the encrypted data and displays it to the user. The user can then modify the code based on this feedback.

[1323] Specific examples

[1324] For example, if a user uploads the following Python code:

[1325] python

[1326] def add_numbers(a, b):

[1327] return a + b

[1328] The server performs an analysis and identifies areas for improvement and errors, such as:

[1329] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1330] Add documentation comments to functions to clarify their purpose.

[1331] The server then generates the following review text:

[1332] Improvements:

[1333] Change the variable names 'a' and 'b' to meaningful names.

[1334] Add a documentation comment to clarify the purpose of the function.

[1335] Specific suggested fixes:

[1336] def add_numbers(first_number, second_number):

[1337] """

[1338] Takes two numbers and returns their sum.

[1339] Args:

[1340] first_number (int): The first number

[1341] second_number (int): The second number

[1342] Returns:

[1343] int: the sum of two numbers

[1344] """

[1345] return first_number + second_number

[1346] Users can receive this feedback and modify their code to efficiently write high-quality code. Furthermore, the system analyzes code based on customized style guides for each company or project, enabling appropriate reviews in accordance with specific conventions.

[1347] As described above, the "CodeReview Plus" system allows users to undergo code reviews flexibly and without stress, and supports them in creating high-quality code that meets the requirements of each company or project.

[1348] The processing flow will be explained below.

[1349] Step 1:

[1350] The user selects their computer program (code file) and clicks the "Upload" button in the "CodeReview Plus" application.

[1351] Step 2:

[1352] The terminal encodes the selected code file and encrypts it using SSL / TLS, preparing the encrypted data to be sent to the server.

[1353] Step 3:

[1354] The device sends the encrypted data to the server, using an encryption protocol to ensure security.

[1355] Step 4:

[1356] The server uses SSL / TLS to decrypt the encrypted data it receives, and then decodes the decrypted data back to its original code.

[1357] Step 5:

[1358] The server lexically analyzes the decoded computer program, breaking the code down into tokens and identifying the individual components.

[1359] Example: def add_numbers(a, b): return a + b -> [def, add_numbers, (, a, ,, b, ), :, return, a, +, b]

[1360] Step 6:

[1361] The server performs syntax analysis based on the results of lexical analysis, converting tokens into a syntax tree (AST: Abstract Syntax Tree) to understand the overall structure of the code.

[1362] Example: def add_numbers(a, b): return a + b -> Builds a syntax tree and parses function names, arguments, return values, etc.

[1363] Step 7:

[1364] The server then performs static analysis based on the parsing results, checking for code quality, potential bugs, security holes, performance issues, etc.

[1365] Step 8:

[1366] The server checks whether the code complies with the standards based on a style guide customized for each company or project.

[1367] Step 9:

[1368] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[1369] Step 10:

[1370] The server uses natural language generation technology to create a review that highlights areas for improvement and errors. The generated review is written in a non-critical manner.

[1371] Step 11:

[1372] The server encodes the generated review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[1373] Step 12:

[1374] The server sends the encrypted data to the user's device.

[1375] Step 13:

[1376] The device decrypts the encrypted data received using SSL / TLS, and then decodes the decrypted data into the original review text.

[1377] Step 14:

[1378] Users can check the review results on their devices, and specific improvements and errors are clearly displayed.

[1379] Step 15:

[1380] Users can modify their code based on the review results and can also submit the modified code for review again.

[1381] Example 1

[1382] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[1383] In conventional code review systems, analyzing program code uploaded by users and generating review documents are often done manually, making it difficult to perform code reviews efficiently. Furthermore, due to security concerns, unencrypted code data is transmitted, increasing the risk of data leakage. Furthermore, feedback on analysis results is limited, making it difficult to accommodate customized style guides for each company or project. This creates challenges that prevent improvements in code quality and development efficiency.

[1384] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[1385] In this invention, the server includes means for a user to upload their own program, means for transferring the uploaded program, means for a terminal to encrypt the transferred program, means for the server to decrypt the encrypted data received, means for the server to perform lexical analysis, syntactic analysis, static analysis, and style guide check of the uploaded program, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using prompt sentences through natural language generation technology, means for encrypting the review text and feeding it back to the user, and means for decrypting the feedback review text. This allows users to receive code reviews securely and efficiently, enabling them to create high-quality code tailored to the style of each company or project.

[1386] "User" means an entity that uses the system to upload its own programs for analysis and review.

[1387] A "program" is a set of coding instructions uploaded by a user and parsed by a server.

[1388] A "server" is a computer system that decrypts received programs and performs analysis and review generation.

[1389] "Uploading" is the act of a user sending their own program to a server.

[1390] "Encryption" is the process of converting data using the SSL / TLS protocol to transmit program data securely.

[1391] "Decryption" is the process of restoring encrypted data to its original state.

[1392] "Lexical analysis" is the process of breaking down a program's source code into its smallest units, called tokens.

[1393] "Syntax analysis" is the process of analyzing the structure of a program based on the tokens obtained by lexical analysis and generating an abstract syntax tree (AST).

[1394] "Static analysis" is the process of checking the structure and style of program code without executing it to detect potential problems or bugs.

[1395] A "style guide check" is the process of verifying that program code follows specific coding conventions.

[1396] The "list of improvements and errors" is a list of areas to be corrected and defects in the program that have been identified based on the analysis results.

[1397] "Natural language generation technology" is a technology that uses a generative AI model to generate sentences in a form that is easy for humans to understand based on the analysis results.

[1398] A "prompt sentence" is an instruction sentence input to a natural language generation technology.

[1399] A "review text" is a text that provides specific details about areas for improvement and errors and is provided to users as feedback.

[1400] MODE FOR CARRYING OUT THE INVENTION

[1401] The "CodeReview Plus" system analyzes programs written by users and suggests areas for improvement or errors, thereby increasing the efficiency of code reviews. This system automates the entire process from users uploading their code, to the server analyzing it, and providing feedback on the results.

[1402] Specifically, this is realized by the following hardware and software configuration.

[1403] Hardware and Software Configuration

[1404] User device:

[1405] PCs and tablets used by users

[1406] OpenSSL (a library for encryption and decryption)

[1407] server:

[1408] High-Performance Computer Server

[1409] OpenSSL (a library for encryption and decryption)

[1410] PLY (a library for lexical analysis)

[1411] Bison (a generator for parsing)

[1412] Pylint (a tool for static analysis)

[1413] Style guide checking tools (PEP 8, etc.)

[1414] Generative AI models such as GPT-3 (for natural language generation)

[1415] System Operation

[1416] Users upload their own programs through the CodeReview Plus application interface. The interface supports drag-and-drop and file selection dialogs, making it easy for users to upload code. The uploaded code is temporarily loaded into memory on the device.

[1417] The device uses the OpenSSL library to encrypt the uploaded code using the SSL / TLS protocol, and then sends the encrypted data to a server over the Internet, ensuring secure data transmission.

[1418] The server decrypts the received encrypted data using OpenSSL. The decrypted code data is then lexically analyzed using the PLY library and broken down into tokens. Next, it is parsed using a Bison generator to generate an abstract syntax tree (AST). After that, static analysis is performed using Pylint to check the code quality and detect potential bugs and security holes. Finally, a style guide checking tool is used to check whether coding standards are being followed.

[1419] Based on the analysis, the server generates a list of improvements and errors, which may include an entry such as "Rename variables 'a' and 'b' to meaningful names." This list is stored in an internal database.

[1420] Next, the server sends a prompt to the generative AI model to generate a natural language review. For example, the prompt "Please change the variable names 'a' and 'b' to meaningful names" is sent to GPT-3. The review text obtained as a response from the AI ​​model includes specific instructions such as "Please change the variable names 'a' and 'b' to meaningful names."

[1421] The generated review text is then re-encrypted and sent to the device, where it is decrypted and displayed in the user interface. The user can then modify the code based on this feedback and submit the review again.

[1422] Specific examples

[1423] For example, if a user uploads the following Python code:

[1424] python

[1425] def add_numbers(a, b):

[1426] return a + b

[1427] The server performs an analysis and identifies areas for improvement and errors, such as:

[1428] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1429] Add documentation comments to functions to clarify their purpose.

[1430] Based on this, the server generates the following review text:

[1431] Improvements:

[1432] Change the variable names 'a' and 'b' to meaningful names.

[1433] Add a documentation comment to clarify the purpose of the function.

[1434] Specific suggested fixes:

[1435] def add_numbers(first_number, second_number):

[1436] """

[1437] Takes two numbers and returns their sum.

[1438] Args:

[1439] first_number (int): The first number

[1440] second_number (int): The second number

[1441] Returns:

[1442] int: the sum of two numbers

[1443] """

[1444] return first_number + second_number

[1445] In this way, the CodeReview Plus system enables users to undergo code reviews securely and efficiently, helping them create high-quality code that matches the style of their company or project.

[1446] keyword

[1447] Generative AI model, prompt sentence

[1448] The flow of the identification process in the first embodiment will be described with reference to FIG.

[1449] Program processing flow and specific explanation

[1450] Step 1: User uploads code

[1451] explanation

[1452] The user uploads the program through the CodeReview Plus application interface by selecting the code file (e.g., example.py) to be analyzed through the file selection dialog and pressing the upload button.

[1453] input

[1454] A code file selected by the user.

[1455] output

[1456] The selected code file is transferred to the terminal and temporarily loaded into memory.

[1457] Specific actions

[1458] The user clicks the "Upload Code" button and selects example.py from the file dialog. The selected file is saved in temporary memory.

[1459] Step 2: Encrypt and transfer the code

[1460] explanation

[1461] The terminal encrypts the uploaded code file and transfers it to the server.

[1462] input

[1463] The user's code files loaded into memory.

[1464] output

[1465] The code data is encrypted using the SSL / TLS protocol and transmitted to the server.

[1466] Specific actions

[1467] The device uses the OpenSSL library to encrypt the contents of example.py and sends the encrypted data to the server as a POST request.

[1468] Step 3: Server decrypts the data

[1469] explanation

[1470] The server decrypts the received encrypted data.

[1471] input

[1472] Code data sent from the device encrypted with SSL / TLS.

[1473] output

[1474] The decrypted original code data.

[1475] Specific actions

[1476] The server uses OpenSSL to receive the encrypted data, decrypt it, and recreate the original code in example.py.

[1477] Step 4: Performing Lexical Analysis

[1478] explanation

[1479] The server breaks down the decrypted code data into tokens using a lexical analyzer.

[1480] input

[1481] Decoded code data.

[1482] output

[1483] A list of the code broken down into tokens.

[1484] Specific actions

[1485] The server uses the PLY library to break the contents of example.py into tokens and store them as a list.

[1486] Step 5: Performing Parsing

[1487] explanation

[1488] The server performs syntax analysis using the lexical analysis results.

[1489] input

[1490] Code data broken down into tokens.

[1491] output

[1492] Abstract Syntax Tree (AST).

[1493] Specific actions

[1494] The server uses a Bison generator to generate an AST from the token list.

[1495] Step 6: Running static analysis

[1496] explanation

[1497] The server performs static analysis using the parsing results.

[1498] input

[1499] AST.

[1500] output

[1501] Reporting code quality, potential bugs and security holes.

[1502] Specific actions

[1503] The server uses Pylint to parse example.py and generate a report on quality and bugs.

[1504] Step 7: Run a style guide check

[1505] explanation

[1506] The server performs a style guide check using the static analysis results.

[1507] input

[1508] Results of the previous static analysis.

[1509] output

[1510] Check results for compliance with coding standards.

[1511] Specific actions

[1512] The server uses a style guide checking tool to verify that example.py complies with coding standards such as PEP 8.

[1513] Step 8: Generate a list of improvements and errors

[1514] explanation

[1515] The server generates a list of improvements and error locations based on the analysis results.

[1516] input

[1517] Style guide check results.

[1518] output

[1519] List of improvements and errors.

[1520] Specific actions

[1521] Based on the analysis results, the server generates a list of improvements, such as "change the variable names 'a' and 'b' to meaningful names," and stores it in an internal database.

[1522] Step 9: Generate review text

[1523] explanation

[1524] The server sends prompt sentences to the generative AI model, which generates review sentences in natural language.

[1525] input

[1526] List of improvements and errors.

[1527] output

[1528] Review text written in natural language.

[1529] Specific actions

[1530] The server sends a prompt to GPT-3 saying, "Please change the variable names 'a' and 'b' to meaningful names," and stores the generated review text in an internal database.

[1531] Step 10: Encrypt and transfer the review text

[1532] explanation

[1533] The server re-encrypts the generated review text and sends it to the user's device.

[1534] input

[1535] Generated review text.

[1536] output

[1537] Review text data encrypted using the SSL / TLS protocol.

[1538] Specific actions

[1539] The server uses OpenSSL to encrypt the review text and send it to the terminal via a POST request.

[1540] Step 11: Decode and display the review text on the device

[1541] explanation

[1542] The terminal decrypts the encrypted review text data and displays it on the user interface.

[1543] input

[1544] Review text data encrypted using the SSL / TLS protocol.

[1545] output

[1546] The review text that is displayed to users.

[1547] Specific actions

[1548] The device uses OpenSSL to decrypt the encrypted data and reproduces the review text and displays it to the user, who can then review the feedback and modify the code.

[1549] (Application example 1)

[1550] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[1551] Most conventional software review systems analyze and provide feedback on general computer programs, but there is a lack of systems specialized for specific applications, particularly factory robot control code. Factory robot control code differs from regular software in that it requires real-time performance and enhanced security, making a specialized code review system necessary. There is also a demand for improved productivity through immediate feedback of errors and areas for improvement in factory robot code.

[1552] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[1553] In this invention, the server includes means for users to upload their own software, means for transferring the uploaded software to an analysis device, means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking of the uploaded software in the analysis device, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using natural language generation technology, means for providing feedback on the review text to the user, and means for performing similar analysis and feedback on the control code of a factory robot, thereby enabling quality improvement of the control code of the factory robot and real-time error feedback.

[1554] "User" means a person who uploads software to the system and receives feedback.

[1555] "Software" means executable program code uploaded by Users to the System.

[1556] An "analysis device" is a computer system for analyzing uploaded software.

[1557] "Lexical analysis" is the analytical process of breaking down software code into its individual components and interpreting their meaning.

[1558] "Syntax analysis" is the process of analyzing the structure of software code and determining the relationships between components according to the grammar of the language.

[1559] "Static analysis" is the process of discovering bugs, errors, and performance problems by analyzing software code without executing it.

[1560] A "style guide check" is the process of verifying that software code complies with established coding standards and style guides.

[1561] "Points for improvement" are suggestions for improving the quality of the software code that are discovered by the analysis device.

[1562] The "error location" refers to an error or defect in the software code that is discovered by the analysis device.

[1563] "Natural language generation technology" is a technology that allows computers to generate natural human language.

[1564] A "review text" is a text generated based on the analysis results to provide feedback to the user.

[1565] "Feedback" is the process of communicating the review text generated by the analysis device to the user.

[1566] A "factory robot" is an automated mechanical device used in a factory that requires control code to perform specific tasks.

[1567] "Control code" is a software program written to control the operation of a factory robot.

[1568] The RoboCode Review Plus system aims to improve the quality of factory robot control code and provide real-time error feedback. The system uses an analysis device to analyze software uploaded by users, lists areas for improvement and errors based on the analysis results, and creates review text using natural language generation technology.

[1569] System configuration

[1570] 1. User Upload of Software

[1571] Users upload their software through the RoboCode Review Plus application interface, which supports software file selection and upload operations.

[1572] 2. Software Transfer and Encryption

[1573] The device encodes the software uploaded by the user and encrypts it using SSL / TLS, a step essential to ensure the security of sending this encrypted data to the analysis device.

[1574] 3. Analysis using an analytical device

[1575] The analysis device decrypts the received encrypted data and analyzes the software. The analysis procedures include lexical analysis, syntax analysis, static analysis, and style guide checks to detect code quality, potential bugs, security holes, performance issues, etc.

[1576] 4. Generate a list of improvements and errors

[1577] Based on the analysis results, the analyzer generates a list of improvements and errors, including specific points to be corrected.

[1578] 5. Generating review text

[1579] The analysis device uses natural language generation technology to create review text in easy-to-understand language about areas for improvement and errors, allowing users to respond without feeling stressed.

[1580] 6. Feedback on review results

[1581] The analysis device encrypts the review text and sends it to the user's device, which then decrypts the encrypted data and displays it to the user. The user can then modify the software based on this feedback.

[1582] Hardware and software used

[1583] Data encryption with SSL / TLS

[1584] Software lexical analysis, syntactic analysis, static analysis, and style guide checking by an analyzer

[1585] Creating review text using natural language generation technology

[1586] Specific examples

[1587] For example, suppose a user uploads the following control code for a factory robot:

[1588] python

[1589] def move_robot(direction, speed):

[1590] Code to move the robot

[1591] ...

[1592] return True

[1593] The analyzer analyzes this code and identifies areas for improvement and errors, such as:

[1594] The variable names 'direction' and 'speed' need to be changed to meaningful names.

[1595] Add documentation comments to functions to clarify their purpose.

[1596] Based on this, the analyzer generates the following review text:

[1597] "Rename the variables 'direction' and 'speed' to more meaningful names. Add documentation comments to clarify the purpose of the function."

[1598] Users can receive this feedback and modify their code to create high-quality control code.

[1599] Example prompts for generative AI models

[1600] "Review the robot's control code and identify the following improvements and errors. Please include specific suggestions for improvements and corrections for each error."

[1601] As described above, the RoboCode Review Plus system allows users to receive flexible and stress-free reviews, improving the quality of factory robot control code.

[1602] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[1603] Step 1:

[1604] Users upload their own software through the system interface. The input is a software file stored on the user's device, and the user selects a specific software file from the file selection screen and clicks the upload button to prepare for transfer.

[1605] Step 2:

[1606] The device encodes the software uploaded by the user and encrypts it using SSL / TLS. The input here is the software file selected in step 1, and after encoding and encryption processing, the output is encrypted data that can be securely transferred over the network.

[1607] Step 3:

[1608] The terminal sends the encrypted data to the analysis device. The input is the encrypted data generated in step 2, and the output is the software data sent to the server. This process allows the software to reach the analysis device.

[1609] Step 4:

[1610] The server decrypts the encrypted data it receives and analyzes the software. The input is the encrypted data sent from the terminal, and the original software code is obtained after the decryption process. The output is the software code to be analyzed.

[1611] Step 5:

[1612] The server performs lexical analysis, syntax analysis, static analysis, and style guide checks on the software. The input is the decoded software code, and various analysis processes are performed to generate diagnostic results. The output is the diagnostic results.

[1613] Step 6:

[1614] The server generates a list of improvements and errors based on the analysis results. The input is the analysis results obtained in step 5, and specific improvements and errors are listed through further data processing. The output is a list of improvements and errors.

[1615] Step 7:

[1616] The server uses natural language generation technology to create a review from the generated list. The input is a list of improvements and errors, and prompts are used to translate the list into natural language that is easy for the user to understand. The output is the final review.

[1617] Step 8:

[1618] The server re-encrypts the review text and sends it to the user's device. The input is the review text generated in step 7, which is securely sent to the user after the encryption process. The output is the encrypted review text.

[1619] Step 9:

[1620] The device decrypts the encrypted review text and displays it to the user. The input is the encrypted review text sent from the server, and the original review text is extracted through the decryption process and displayed to the user. The output is the review content that the user can view.

[1621] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[1622] The "CodeReview Plus" system, which incorporates an emotion engine, not only analyzes the computer programs written by users in detail and suggests areas for improvement and errors, but also recognizes the user's emotions and adjusts the review text appropriately. This system automates the entire process, from the user uploading the code, to the server analyzing it, and providing feedback on the results, using the emotion engine.

[1623] System configuration

[1624] 1. User-uploaded code

[1625] Users upload their computer programs through the CodeReview Plus application interface, which supports code file selection and upload operations.

[1626] 2. Code transmission and encryption

[1627] The device encodes the code uploaded by the user and encrypts it using SSL / TLS, preparing this encrypted data for transmission to the server.

[1628] 3. Server Analysis

[1629] The server decrypts the encrypted data received using SSL / TLS, decodes the decrypted data back to the original code, and then analyzes the uploaded code using lexical analysis, syntax analysis, static analysis, and style guide checks.

[1630] 4. Generate a list of improvements and errors

[1631] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[1632] 5. Generating review text

[1633] The server uses natural language generation technology to generate reviews based on the generated list, which are usually written in a non-stingy style.

[1634] 6. Emotion Recognition by Emotion Engine

[1635] The device recognizes the user's emotions from their facial expressions and voice, and the emotion engine collects the user's emotional data and sends it to the server.

[1636] 7. Adjust review text based on sentiment

[1637] The server adjusts the tone and content of the review based on the user's emotional data received from the emotion engine. For example, if the user is feeling stressed, it uses gentle, encouraging language.

[1638] 8. Feedback on review results

[1639] The server encodes the revised review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[1640] 9. Check the review results

[1641] The device uses SSL / TLS to decrypt the encrypted data received and decode it into the original review text. The user can then review the review and correct the code.

[1642] Specific examples

[1643] For example, if a user uploads the following Python code:

[1644] python

[1645] def add_numbers(a, b):

[1646] return a + b

[1647] The server performs an analysis and identifies areas for improvement and errors, such as:

[1648] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1649] Add documentation comments to functions to clarify their purpose.

[1650] The emotion engine recognizes when a user is feeling stressed from their facial expressions and voice.

[1651] The server then generates the following review text:

[1652] Improvements:

[1653] Change the variable names 'a' and 'b' to meaningful names.

[1654] Add a documentation comment to clarify the purpose of the function.

[1655] Specific suggested fixes:

[1656] def add_numbers(first_number, second_number):

[1657] """

[1658] Takes two numbers and returns their sum.

[1659] Args:

[1660] first_number (int): The first number

[1661] second_number (int): The second number

[1662] Returns:

[1663] int: the sum of two numbers

[1664] """

[1665] return first_number + second_number

[1666] Your efforts are paying off in a positive direction. Keep up the good work!

[1667] In this way, the "CodeReview Plus" system, which combines an emotion engine, can reduce stress and improve code quality by providing feedback that takes user emotions into account.

[1668] The processing flow will be explained below.

[1669] Step 1:

[1670] The user selects their computer program (code file) and clicks the "Upload" button in the "CodeReview Plus" application.

[1671] Step 2:

[1672] The terminal encodes the selected code file and encrypts it using SSL / TLS, preparing the encrypted data to be sent to the server.

[1673] Step 3:

[1674] The device sends the encrypted data to the server, using an encryption protocol to ensure security.

[1675] Step 4:

[1676] The server uses SSL / TLS to decrypt the encrypted data it receives, and then decodes the decrypted data back to its original code.

[1677] Step 5:

[1678] The server lexically analyzes the decoded computer program, breaking the code down into tokens and identifying the individual components.

[1679] Example: def add_numbers(a, b): return a + b -> [def, add_numbers, (, a, ,, b, ), :, return, a, +, b]

[1680] Step 6:

[1681] The server performs syntax analysis based on the results of lexical analysis, converting tokens into a syntax tree (AST: Abstract Syntax Tree) to understand the overall structure of the code.

[1682] Example: def add_numbers(a, b): return a + b -> Builds a syntax tree and parses function names, arguments, return values, etc.

[1683] Step 7:

[1684] The server then performs static analysis based on the parsing results, checking for code quality, potential bugs, security holes, performance issues, etc.

[1685] Step 8:

[1686] The server checks whether the code complies with the standards based on a style guide customized for each company or project.

[1687] Step 9:

[1688] Based on the analysis, the server generates a list of improvements and errors, including specific points to fix.

[1689] Step 10:

[1690] The server uses natural language generation technology to generate reviews, usually written in a non-stinging style, highlighting areas for improvement and errors.

[1691] Step 11:

[1692] The device uses an emotion engine that recognizes emotions from the user's facial expressions and voice, and this engine collects the user's emotion data and sends it to the server.

[1693] Step 12:

[1694] The server adjusts the tone and content of the review based on the user's emotional data received from the emotion engine. For example, if the user is feeling stressed, it uses gentle, encouraging language.

[1695] Step 13:

[1696] The server encodes the revised review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[1697] Step 14:

[1698] The server sends the encrypted data to the user's device.

[1699] Step 15:

[1700] The device decrypts the encrypted data received using SSL / TLS, and then decodes the decrypted data into the original review text.

[1701] Step 16:

[1702] Users can check the review results on their devices, and specific improvements and errors are clearly displayed.

[1703] Step 17:

[1704] Users can modify their code based on the review results and can also submit the modified code for review again.

[1705] Example 2

[1706] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[1707] Traditional computer program review systems provide feedback without considering users' feelings, which can cause stress and demotivation. Furthermore, the reviews are often not presented in a format that users can easily understand, or are often cold-hearted, reducing users' motivation to improve. Furthermore, the lack of flexible analysis based on style guides customized for each company or project leads to issues with inconsistent feedback quality.

[1708] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[1709] In this invention, the server includes means for users to upload their own computer programs, means for transferring the uploaded computer programs to an analysis server, means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking on the uploaded computer programs in the analysis server, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using natural language generation technology, means for recognizing the user's emotions and adjusting the tone and content of the review text based on those emotions, and means for providing feedback on the review text to the user. This allows for flexible and high-quality feedback that takes the user's emotions into consideration, reducing user stress and increasing their motivation to improve.

[1710] "User" means any person or entity that wishes to use the System to have their computer program reviewed.

[1711] A "computer program" is a collection of computer-executable instructions and associated data structures.

[1712] "Uploading" is the act of a user transferring data from their own device to a specific server.

[1713] "Analysis Server" is a central management server for analyzing uploaded computer programs.

[1714] "Lexical analysis" is the process of breaking down program statements into units called tokens.

[1715] "Syntax analysis" is the process of rearranging the tokens into a tree structure and checking whether the grammar is correct.

[1716] "Static analysis" is a technique for analyzing source code without executing it to detect bugs and style violations.

[1717] A "style guide check" is the process of checking whether code complies with established coding standards.

[1718] The "List of improvements and errors" is a list of code corrections and problems.

[1719] "Natural language generation technology" is a technology that uses computers to generate text in natural language that humans can understand.

[1720] A "review document" is a document created based on the analysis results that describes improvements to the computer program and how to correct errors.

[1721] "Emotion recognition" is a technology that analyzes the user's emotions from their facial expressions and voice and grasps their situation.

[1722] "Adjusting tone and content" is the process of making changes to the way a sentence is expressed or its content based on the user's emotional data.

[1723] "Feedback" refers to the act of returning analysis results and review text to users and providing them with information.

[1724] This invention is a system that allows users to upload their own computer programs and automates the analysis and feedback of those programs. Specific embodiments for implementing this system are described below.

[1725] Configuration overview

[1726] The system consists of the following main components:

[1727] 1. The interface where users upload programs

[1728] 2. Terminals for receiving and transmitting uploaded programs

[1729] 3. Analysis server that performs analysis and generates reviews

[1730] 4. A sentiment engine that recognizes user sentiment and adjusts reviews accordingly

[1731] 5. Device that provides feedback results to users

[1732] Detailed process

[1733] 1. User-uploaded code

[1734] Through the system interface, the user selects and uploads a computer program from the local file system by clicking the "Upload" button.

[1735] 2. Code transmission and encryption

[1736] The device first encodes the code uploaded by the user and then encrypts it using the SSL / TLS protocol, which allows the data to be securely transmitted to the server.

[1737] 3. Server Analysis

[1738] The server decrypts the received encrypted data using SSL / TLS, decodes it back to the original code, and then uses analysis tools such as Pylint and ESLint to perform lexical analysis, syntax analysis, static analysis, and style guide checking.

[1739] 4. Generate a list of improvements and errors

[1740] Based on the analysis, the server generates a list of improvements and errors, including specific fixes, such as changing variable names or adding documentation comments.

[1741] 5. Generating review text

[1742] The server then passes the generated list as a prompt to a generative AI model (e.g., OpenAI's GPT-4) to create a review text, which includes specific revision suggestions and feedback.

[1743] 6. Emotion Recognition by Emotion Engine

[1744] While users browse reviews, the device uses a camera and microphone to capture their facial expressions and voice, and the emotion engine analyzes that data to recognize their emotional state.

[1745] 7. Adjust review text based on sentiment

[1746] The server uses the data received from the emotion engine to adjust the tone and content of the generated review text depending on the user's state of mind. For example, if the user is feeling stressed, the review text will be changed to a gentle, encouraging one.

[1747] 8. Feedback on review results

[1748] The adjusted review text is then encoded back into binary data, encrypted using SSL / TLS, and sent to the device, where it is received and decrypted, allowing the user to view the review results.

[1749] Specific examples

[1750] For example, if a user uploads the following Python code:

[1751] python

[1752] def add_numbers(a, b):

[1753] return a + b

[1754] The server performs an analysis and identifies areas for improvement and errors, such as:

[1755] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1756] Add documentation comments to functions to clarify their purpose.

[1757] The emotion engine recognizes from the user's facial expressions and voice that the user is feeling stressed. Based on this, the server generates the following review text:

[1758] Improvements:

[1759] Change the variable names 'a' and 'b' to meaningful names.

[1760] Add a documentation comment to clarify the purpose of the function.

[1761] Specific suggested fixes:

[1762] def add_numbers(first_number, second_number):

[1763] """

[1764] Takes two numbers and returns their sum.

[1765] Args:

[1766] first_number (int): The first number

[1767] second_number (int): The second number

[1768] Returns:

[1769] int: the sum of two numbers

[1770] """

[1771] return first_number + second_number

[1772] Your efforts are paying off in a positive direction. Keep up the good work!

[1773] Prompt Sentence Examples

[1774] Enter the following prompt into the generative AI model:

[1775] In a stressful situation, please write in a gentle, encouraging tone, offering specific suggestions for improving the uploaded Python code.

[1776] Original code:

[1777] def add_numbers(a, b):

[1778] return a + b

[1779] Analysis results:

[1780] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1781] Add documentation comments to functions to clarify their purpose.

[1782] Review in a gentle, encouraging tone:

[1783] In this way, you can take user sentiment into consideration and provide specific feedback to improve the quality of your code.

[1784] The flow of the identification process in the second embodiment will be described with reference to FIG.

[1785] Step 1:

[1786] Input: The user selects their computer program file.

[1787] Operation: The user opens the "CodeReview Plus" application interface, presses the "Upload Code" button, then selects the program file they want to review from the file selection dialog and clicks the "Upload" button.

[1788] Output: The selected program file is ready to be uploaded by the terminal.

[1789] Step 2:

[1790] Input: User presses upload button.

[1791] Actions: The device encodes the contents of the selected program file and encrypts it using the SSL / TLS protocol. The encrypted data is ready to be sent to the server.

[1792] Output: The encrypted program data is sent to the server.

[1793] Step 3:

[1794] Input: The server receives the encrypted data.

[1795] Processing behavior: The server decrypts the data using the SSL / TLS protocol, then decodes the decrypted data back into the original program code, and then uses analysis tools such as Pylint or ESLint to perform lexical analysis, syntax analysis, static analysis, and style guide checks.

[1796] Output: Analyzed data and analysis results.

[1797] Step 4:

[1798] Input: Parsed data and results.

[1799] Processing behavior: Based on the analysis results, the server generates a list of improvements and errors, including specific fixes. The list includes specific fixes such as changing variable names or adding comments.

[1800] Output: A list of improvements and errors.

[1801] Step 5:

[1802] Input: List of improvements and errors.

[1803] Processing operation: The server inputs the analysis result into a generative AI model (e.g., OpenAI's GPT-4) as a prompt sentence. The generative AI model generates a review sentence based on the prompt sentence. The generated review sentence includes correction suggestions and feedback.

[1804] Output: The edited review text.

[1805] Step 6:

[1806] Input: Review text and prompt text.

[1807] Processing behavior: While a user is browsing reviews, the device uses the camera and microphone to capture the user's facial expressions and voice data in real time. The emotion engine analyzes the data and recognizes the user's emotional state.

[1808] Output: Emotion data.

[1809] Step 7:

[1810] Input: Sentiment data and review text.

[1811] Processing action: The server adjusts the tone and content of the review based on the emotional data received. For example, if the user is feeling stressed, the review will be written in a more gentle and encouraging way.

[1812] Output: The adjusted review text.

[1813] Step 8:

[1814] Input: The adjusted review text.

[1815] Processing Actions: The server re-encodes the adjusted review text into binary data and encrypts it using the SSL / TLS protocol. The encrypted data is ready to be sent to the device.

[1816] Output: Encrypted review text.

[1817] Step 9:

[1818] Input: Encrypted review text.

[1819] Processing operation: The device receives the encrypted data from the server and decrypts it using the SSL / TLS protocol. The decrypted data is then decoded into the original review text and displayed on the application interface. The user checks the displayed review results and makes program modifications based on them.

[1820] Output: Decoded review text, and modified program.

[1821] (Application example 2)

[1822] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[1823] Conventional computer program analysis systems do not consider the user's emotions when suggesting improvements or error locations, which can cause stress or burden to the user. Furthermore, in the maintenance of robots used in factories, the feedback of diagnostic results is mechanical and does not consider the emotions or mental state of the person in charge, making efficient maintenance difficult. Therefore, there is a need for a system that considers the emotions of users and workers while suggesting appropriate improvements and error locations.

[1824] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[1825] In this invention, the server includes: means for a user to upload his or her own computer program; means for transferring the uploaded computer program to an analysis server; means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking on the uploaded computer program in the analysis server; means for generating a list of improvements and error locations based on the analysis results; means for creating a review text from the generated list using natural language generation technology; means for providing the review text as feedback to the user; means for providing an emotion engine that recognizes the user's emotions in order to adjust the tone of the review text; and means for adjusting the tone of the review text based on the emotion recognition results. This allows code reviews to be performed while taking the user's emotions into consideration, reducing user stress and enabling efficient maintenance and improvement suggestions.

[1826] "User" means a person who uses the System to upload computer programs and receive analytical results.

[1827] A "computer program" refers to a collection of instructions that can be executed by a computer; that is, code written to perform a particular function or task.

[1828] "Upload" refers to the act of transferring data from the user's device to the analysis server.

[1829] "Analysis server" refers to a computer system that analyzes uploaded computer programs and identifies areas for improvement and errors.

[1830] "Lexical analysis" refers to the process of breaking down program code into tokens, and is an early step in understanding the meaning of the code.

[1831] "Syntax analysis" refers to the process of structurally analyzing the tokens broken down by lexical analysis to detect syntax errors.

[1832] "Static analysis" refers to the process of analyzing code without running the program to detect potential errors or problems.

[1833] "Style guide checking" refers to the process of verifying that program code adheres to a particular style guide or coding standard.

[1834] "List of Improvements and Errors" means a list of areas that need to be corrected or recommended improvements that is generated as a result of lexical analysis, syntactic analysis, static analysis and style guide checks.

[1835] "Natural language generation technology" refers to technology that allows a computer to generate human language, and is used to convert the generated list into easy-to-understand sentences.

[1836] "Review text" refers to the feedback generated based on the analysis results, and includes details of areas for improvement and errors, as well as how to correct them.

[1837] An "emotion engine" refers to a system that recognizes emotions from a user's facial expressions and voice and collects them as data.

[1838] "Emotion Recognition Results" refers to the user's emotional data detected by the emotion engine and used to adjust the review text.

[1839] "Adjusting tone" refers to the process of changing the way feedback is presented or worded based on how the user feels.

[1840] This invention provides a system in which a user uploads their own computer program, analyzes the program on an analysis server, and provides feedback on improvements and error locations based on the analysis results. This system is implemented as follows.

[1841] System configuration

[1842] 1. User Device

[1843] The user device provides an interface for users to upload their own computer programs. This interface supports code file selection and upload operations. The user device also has an emotion engine that can recognize emotions from the user's facial expressions and voice. This emotion data is used to adjust the tone of the review text.

[1844] 2. Encryption and Data Transmission

[1845] The user device encodes the uploaded code and encrypts it using SSL / TLS, protecting the entire chain of operations until it is sent to the analysis server.

[1846] 3. Analysis Server

[1847] The analysis server decrypts the received encrypted data using SSL / TLS and decodes it back into the original code. Next, it performs lexical analysis, syntax analysis, static analysis, and style guide checks to generate analysis results. Based on these analysis results, a list of areas for improvement and errors is created. It is also possible to perform analysis based on style guides customized for each company or project.

[1848] 4. Generate feedback

[1849] The analysis server uses natural language generation technology to create review text based on the generated list. These review texts are usually written in a mild manner, but the tone and content are adjusted based on the recognition results of the emotion engine. If the user is feeling stressed, the review text will be adjusted to a gentle, encouraging tone.

[1850] 5. Sending and Viewing Feedback

[1851] The generated review text is then encrypted again and sent to the user's device. The user's device then decrypts the received encrypted data and decodes it back to the original review text. The decoded review text is then displayed to the user, allowing them to modify the code.

[1852] Hardware and software used

[1853] Hardware

[1854] User devices (personal computers, smartphones, tablets, etc.)

[1855] Emotion recognition device (camera, microphone)

[1856] Analysis Server

[1857] software

[1858] Encryption library (SSL / TLS)

[1859] HTTP request library (requests)

[1860] Emotion detection library (EmotionEngine)

[1861] Natural language generation library (ReviewGenerator)

[1862] Specific examples

[1863] For example, if a user uploads the following Python code:

[1864] python

[1865] def add_numbers(a, b):

[1866] return a + b

[1867] The server performs an analysis and identifies areas for improvement and errors, such as:

[1868] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1869] Add documentation comments to functions to clarify their purpose.

[1870] The emotion engine recognizes that the user is feeling stressed from their facial expressions and voice. Based on this, the server generates the following review text:

[1871] “Improvements:

[1872] Change the variable names 'a' and 'b' to meaningful names.

[1873] Add a documentation comment to clarify the purpose of the function.

[1874] Specific suggested fixes:

[1875] def add_numbers(first_number, second_number):

[1876] """

[1877] Takes two numbers and returns their sum.

[1878] Args:

[1879] first_number (int): The first number

[1880] second_number (int): The second number

[1881] Returns:

[1882] int: the sum of two numbers

[1883] """

[1884] return first_number + second_number

[1885] Your efforts are paying off in a positive direction. Keep up the good work!”

[1886] This allows a system that combines an emotion engine to provide accurate feedback while taking into account the user's emotions, reducing user stress and improving code quality.

[1887] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[1888] Step 1:

[1889] A user uploads the code of a computer program using their own device.

[1890] Specifically, the user opens the application interface on the terminal, selects the code file, and presses the upload button. The input data is the program code file, which is received by the terminal. The uploaded program is then sent to the system as data for later analysis.

[1891] Step 2:

[1892] The device encodes the uploaded code and encrypts it using SSL / TLS.

[1893] Specifically, the code uploaded as input data is encoded in UTF-8 format, and then encrypted data is generated using the SSL / TLS encryption library. This encrypted data is the output and passed to the next processing step.

[1894] Step 3:

[1895] The device sends the encrypted data to an analysis server.

[1896] Specifically, the encrypted data is sent to the analysis server as a POST request using an HTTP request library. The input data is the encrypted code, and the output is the completion of the transmission.

[1897] Step 4:

[1898] The encrypted data received by the server is decrypted using SSL / TLS and decoded back to the original code.

[1899] Specifically, it uses the SSL / TLS library to decrypt the encrypted data received as input, decodes the encoded code, and reproduces the program code. The output data is the decrypted program code.

[1900] Step 5:

[1901] The server performs lexical analysis, syntax analysis, static analysis and style guide checks on the program code.

[1902] Specifically, the decoded program code is passed as input data to the analysis engine, which then performs lexical analysis, syntactic analysis, static analysis, and style guide checks. The output data is the analysis results, including errors and areas for improvement.

[1903] Step 6:

[1904] The server generates a list of improvements and error locations based on the analysis results.

[1905] Specifically, the analysis results are taken in as input data, and a list of improvements and errors is compiled. The output data is a list of improvements and errors.

[1906] Step 7:

[1907] The server creates review text based on the list using natural language generation technology.

[1908] Specifically, the generated list is passed as input data to a natural language generation library to generate review text, and the output data is the review text.

[1909] Step 8:

[1910] The device uses an emotion engine to sense the user's facial expressions and voice and generate emotional data for the user.

[1911] Specifically, the emotion engine receives real-time facial expressions and voice data from the user as input data, and performs emotion recognition processing. The output data is emotion data.

[1912] Step 9:

[1913] The server adjusts the tone of the review text based on the emotional data.

[1914] Specifically, the server receives emotion data and review text as input data, analyzes it with an emotion engine, and adjusts the tone of the review text. The output data is the adjusted review text.

[1915] Step 10:

[1916] The server re-encrypts the adjusted review text and sends it to the user's device.

[1917] Specifically, the input data is the adjusted review text, which is encrypted using the SSL / TLS library and sent to the user's device using the HTTP request library. The output data is a notification of completion of transmission.

[1918] Step 11:

[1919] The device decrypts the received encrypted data and displays the review text to the user.

[1920] Specifically, the system uses an SSL / TLS library to decrypt the encrypted data received as input, decodes it into the original review text, and displays it to the user. The output data is the review text that the user can view.

[1921] Prompt Sentence Examples

[1922] When generating review text, the following is an example of a prompt sentence that reflects emotional data:

[1923] text

[1924] Please generate improvement suggestions in gentle language for the following diagnostic results: Battery degradation: Used for a long time. Motor abnormality: Abnormal noise detected. Please include encouraging language as the user is feeling stressed.

[1925] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[1926] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[1927] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.

[1928] [Fourth embodiment]

[1929] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.

[1930] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.

[1931] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[1932] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.

[1933] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[1934] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[1935] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[1936] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.

[1937] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[1938] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[1939] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[1940] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[1941] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1942] The "CodeReview Plus" system analyzes computer programs written by users and suggests improvements and errors to improve the efficiency of code reviews. This system automates the entire process from users uploading their code, to the server analyzing it, and then providing feedback on the results.

[1943] System configuration

[1944] 1. User-uploaded code

[1945] Users upload their computer programs through the CodeReview Plus application interface, which supports code file selection and upload operations.

[1946] 2. Code transmission and encryption

[1947] The device encodes the code uploaded by the user and encrypts it using SSL / TLS. This encrypted data is then sent to the server. This step is essential to ensure security.

[1948] 3. Server Analysis

[1949] The server decrypts the received encrypted data and analyzes the computer program. The analysis procedures include lexical analysis, syntactic analysis, static analysis, and style guide checks to determine the quality of the code and detect potential bugs, security holes, performance issues, etc.

[1950] 4. Generate a list of improvements and errors

[1951] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[1952] 5. Generating review text

[1953] The server uses natural language generation technology to create reviews that use harmless language to highlight areas for improvement and errors, allowing users to respond without feeling stressed.

[1954] 6. Feedback on review results

[1955] The server re-encrypts the generated review text and sends it to the user's device, which then decrypts the encrypted data and displays it to the user. The user can then modify the code based on this feedback.

[1956] Specific examples

[1957] For example, if a user uploads the following Python code:

[1958] python

[1959] def add_numbers(a, b):

[1960] return a + b

[1961] The server performs an analysis and identifies areas for improvement and errors, such as:

[1962] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[1963] Add documentation comments to functions to clarify their purpose.

[1964] The server then generates the following review text:

[1965] Improvements:

[1966] Change the variable names 'a' and 'b' to meaningful names.

[1967] Add a documentation comment to clarify the purpose of the function.

[1968] Specific suggested fixes:

[1969] def add_numbers(first_number, second_number):

[1970] """

[1971] Takes two numbers and returns their sum.

[1972] Args:

[1973] first_number (int): The first number

[1974] second_number (int): The second number

[1975] Returns:

[1976] int: the sum of two numbers

[1977] """

[1978] return first_number + second_number

[1979] Users can receive this feedback and modify their code to efficiently write high-quality code. Furthermore, the system analyzes code based on customized style guides for each company or project, enabling appropriate reviews in accordance with specific conventions.

[1980] As described above, the "CodeReview Plus" system allows users to undergo code reviews flexibly and without stress, and supports them in creating high-quality code that meets the requirements of each company or project.

[1981] The processing flow will be explained below.

[1982] Step 1:

[1983] The user selects their computer program (code file) and clicks the "Upload" button in the "CodeReview Plus" application.

[1984] Step 2:

[1985] The terminal encodes the selected code file and encrypts it using SSL / TLS, preparing the encrypted data to be sent to the server.

[1986] Step 3:

[1987] The device sends the encrypted data to the server, using an encryption protocol to ensure security.

[1988] Step 4:

[1989] The server uses SSL / TLS to decrypt the encrypted data it receives, and then decodes the decrypted data back to its original code.

[1990] Step 5:

[1991] The server lexically analyzes the decoded computer program, breaking the code down into tokens and identifying the individual components.

[1992] Example: def add_numbers(a, b): return a + b -> [def, add_numbers, (, a, ,, b, ), :, return, a, +, b]

[1993] Step 6:

[1994] The server performs syntax analysis based on the results of lexical analysis, converting tokens into a syntax tree (AST: Abstract Syntax Tree) to understand the overall structure of the code.

[1995] Example: def add_numbers(a, b): return a + b -> Builds a syntax tree and parses function names, arguments, return values, etc.

[1996] Step 7:

[1997] The server then performs static analysis based on the parsing results, checking for code quality, potential bugs, security holes, performance issues, etc.

[1998] Step 8:

[1999] The server checks whether the code complies with the standards based on a style guide customized for each company or project.

[2000] Step 9:

[2001] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[2002] Step 10:

[2003] The server uses natural language generation technology to create a review that highlights areas for improvement and errors. The generated review is written in a non-critical manner.

[2004] Step 11:

[2005] The server encodes the generated review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[2006] Step 12:

[2007] The server sends the encrypted data to the user's device.

[2008] Step 13:

[2009] The device decrypts the encrypted data received using SSL / TLS, and then decodes the decrypted data into the original review text.

[2010] Step 14:

[2011] Users can check the review results on their devices, and specific improvements and errors are clearly displayed.

[2012] Step 15:

[2013] Users can modify their code based on the review results and can also submit the modified code for review again.

[2014] Example 1

[2015] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[2016] In conventional code review systems, analyzing program code uploaded by users and generating review documents are often done manually, making it difficult to perform code reviews efficiently. Furthermore, due to security concerns, unencrypted code data is transmitted, increasing the risk of data leakage. Furthermore, feedback on analysis results is limited, making it difficult to accommodate customized style guides for each company or project. This creates challenges that prevent improvements in code quality and development efficiency.

[2017] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[2018] In this invention, the server includes means for a user to upload their own program, means for transferring the uploaded program, means for a terminal to encrypt the transferred program, means for the server to decrypt the encrypted data received, means for the server to perform lexical analysis, syntactic analysis, static analysis, and style guide check of the uploaded program, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using prompt sentences through natural language generation technology, means for encrypting the review text and feeding it back to the user, and means for decrypting the feedback review text. This allows users to receive code reviews securely and efficiently, enabling them to create high-quality code tailored to the style of each company or project.

[2019] "User" means an entity that uses the system to upload its own programs for analysis and review.

[2020] A "program" is a set of coding instructions uploaded by a user and parsed by a server.

[2021] A "server" is a computer system that decrypts received programs and performs analysis and review generation.

[2022] "Uploading" is the act of a user sending their own program to a server.

[2023] "Encryption" is the process of converting data using the SSL / TLS protocol to transmit program data securely.

[2024] "Decryption" is the process of restoring encrypted data to its original state.

[2025] "Lexical analysis" is the process of breaking down a program's source code into its smallest units, called tokens.

[2026] "Syntax analysis" is the process of analyzing the structure of a program based on the tokens obtained by lexical analysis and generating an abstract syntax tree (AST).

[2027] "Static analysis" is the process of checking the structure and style of program code without executing it to detect potential problems or bugs.

[2028] A "style guide check" is the process of verifying that program code follows specific coding conventions.

[2029] The "list of improvements and errors" is a list of areas to be corrected and defects in the program that have been identified based on the analysis results.

[2030] "Natural language generation technology" is a technology that uses a generative AI model to generate sentences in a form that is easy for humans to understand based on the analysis results.

[2031] A "prompt sentence" is an instruction sentence input to a natural language generation technology.

[2032] A "review text" is a text that provides specific details about areas for improvement and errors and is provided to users as feedback.

[2033] MODE FOR CARRYING OUT THE INVENTION

[2034] The "CodeReview Plus" system analyzes programs written by users and suggests areas for improvement or errors, thereby increasing the efficiency of code reviews. This system automates the entire process from users uploading their code, to the server analyzing it, and providing feedback on the results.

[2035] Specifically, this is realized by the following hardware and software configuration.

[2036] Hardware and Software Configuration

[2037] User device:

[2038] PCs and tablets used by users

[2039] OpenSSL (a library for encryption and decryption)

[2040] server:

[2041] High-Performance Computer Server

[2042] OpenSSL (a library for encryption and decryption)

[2043] PLY (a library for lexical analysis)

[2044] Bison (a generator for parsing)

[2045] Pylint (a tool for static analysis)

[2046] Style guide checking tools (PEP 8, etc.)

[2047] Generative AI models such as GPT-3 (for natural language generation)

[2048] System Operation

[2049] Users upload their own programs through the CodeReview Plus application interface. The interface supports drag-and-drop and file selection dialogs, making it easy for users to upload code. The uploaded code is temporarily loaded into memory on the device.

[2050] The device uses the OpenSSL library to encrypt the uploaded code using the SSL / TLS protocol, and then sends the encrypted data to a server over the Internet, ensuring secure data transmission.

[2051] The server decrypts the received encrypted data using OpenSSL. The decrypted code data is then lexically analyzed using the PLY library and broken down into tokens. Next, it is parsed using a Bison generator to generate an abstract syntax tree (AST). After that, static analysis is performed using Pylint to check the code quality and detect potential bugs and security holes. Finally, a style guide checking tool is used to check whether coding standards are being followed.

[2052] Based on the analysis, the server generates a list of improvements and errors, which may include an entry such as "Rename variables 'a' and 'b' to meaningful names." This list is stored in an internal database.

[2053] Next, the server sends a prompt to the generative AI model to generate a natural language review. For example, the prompt "Please change the variable names 'a' and 'b' to meaningful names" is sent to GPT-3. The review text obtained as a response from the AI ​​model includes specific instructions such as "Please change the variable names 'a' and 'b' to meaningful names."

[2054] The generated review text is then re-encrypted and sent to the device, where it is decrypted and displayed in the user interface. The user can then modify the code based on this feedback and submit the review again.

[2055] Specific examples

[2056] For example, if a user uploads the following Python code:

[2057] python

[2058] def add_numbers(a, b):

[2059] return a + b

[2060] The server performs an analysis and identifies areas for improvement and errors, such as:

[2061] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[2062] Add documentation comments to functions to clarify their purpose.

[2063] Based on this, the server generates the following review text:

[2064] Improvements:

[2065] Change the variable names 'a' and 'b' to meaningful names.

[2066] Add a documentation comment to clarify the purpose of the function.

[2067] Specific suggested fixes:

[2068] def add_numbers(first_number, second_number):

[2069] """

[2070] Takes two numbers and returns their sum.

[2071] Args:

[2072] first_number (int): The first number

[2073] second_number (int): The second number

[2074] Returns:

[2075] int: the sum of two numbers

[2076] """

[2077] return first_number + second_number

[2078] In this way, the CodeReview Plus system enables users to undergo code reviews securely and efficiently, helping them create high-quality code that matches the style of their company or project.

[2079] keyword

[2080] Generative AI model, prompt sentence

[2081] The flow of the identification process in the first embodiment will be described with reference to FIG.

[2082] Program processing flow and specific explanation

[2083] Step 1: User uploads code

[2084] explanation

[2085] The user uploads the program through the CodeReview Plus application interface by selecting the code file (e.g., example.py) to be analyzed through the file selection dialog and pressing the upload button.

[2086] input

[2087] A code file selected by the user.

[2088] output

[2089] The selected code file is transferred to the terminal and temporarily loaded into memory.

[2090] Specific actions

[2091] The user clicks the "Upload Code" button and selects example.py from the file dialog. The selected file is saved in temporary memory.

[2092] Step 2: Encrypt and transfer the code

[2093] explanation

[2094] The terminal encrypts the uploaded code file and transfers it to the server.

[2095] input

[2096] The user's code files loaded into memory.

[2097] output

[2098] The code data is encrypted using the SSL / TLS protocol and transmitted to the server.

[2099] Specific actions

[2100] The device uses the OpenSSL library to encrypt the contents of example.py and sends the encrypted data to the server as a POST request.

[2101] Step 3: Server decrypts the data

[2102] explanation

[2103] The server decrypts the received encrypted data.

[2104] input

[2105] Code data sent from the device encrypted with SSL / TLS.

[2106] output

[2107] The decrypted original code data.

[2108] Specific actions

[2109] The server uses OpenSSL to receive the encrypted data, decrypt it, and recreate the original code in example.py.

[2110] Step 4: Performing Lexical Analysis

[2111] explanation

[2112] The server breaks down the decrypted code data into tokens using a lexical analyzer.

[2113] input

[2114] Decoded code data.

[2115] output

[2116] A list of the code broken down into tokens.

[2117] Specific actions

[2118] The server uses the PLY library to break the contents of example.py into tokens and store them as a list.

[2119] Step 5: Performing Parsing

[2120] explanation

[2121] The server performs syntax analysis using the lexical analysis results.

[2122] input

[2123] Code data broken down into tokens.

[2124] output

[2125] Abstract Syntax Tree (AST).

[2126] Specific actions

[2127] The server uses a Bison generator to generate an AST from the token list.

[2128] Step 6: Running static analysis

[2129] explanation

[2130] The server performs static analysis using the parsing results.

[2131] input

[2132] AST.

[2133] output

[2134] Reporting code quality, potential bugs and security holes.

[2135] Specific actions

[2136] The server uses Pylint to parse example.py and generate a report on quality and bugs.

[2137] Step 7: Run a style guide check

[2138] explanation

[2139] The server performs a style guide check using the static analysis results.

[2140] input

[2141] Results of the previous static analysis.

[2142] output

[2143] Check results for compliance with coding standards.

[2144] Specific actions

[2145] The server uses a style guide checking tool to verify that example.py complies with coding standards such as PEP 8.

[2146] Step 8: Generate a list of improvements and errors

[2147] explanation

[2148] The server generates a list of improvements and error locations based on the analysis results.

[2149] input

[2150] Style guide check results.

[2151] output

[2152] List of improvements and errors.

[2153] Specific actions

[2154] Based on the analysis results, the server generates a list of improvements, such as "change the variable names 'a' and 'b' to meaningful names," and stores it in an internal database.

[2155] Step 9: Generate review text

[2156] explanation

[2157] The server sends prompt sentences to the generative AI model, which generates review sentences in natural language.

[2158] input

[2159] List of improvements and errors.

[2160] output

[2161] Review text written in natural language.

[2162] Specific actions

[2163] The server sends a prompt to GPT-3 saying, "Please change the variable names 'a' and 'b' to meaningful names," and stores the generated review text in an internal database.

[2164] Step 10: Encrypt and transfer the review text

[2165] explanation

[2166] The server re-encrypts the generated review text and sends it to the user's device.

[2167] input

[2168] Generated review text.

[2169] output

[2170] Review text data encrypted using the SSL / TLS protocol.

[2171] Specific actions

[2172] The server uses OpenSSL to encrypt the review text and send it to the terminal via a POST request.

[2173] Step 11: Decode and display the review text on the device

[2174] explanation

[2175] The terminal decrypts the encrypted review text data and displays it on the user interface.

[2176] input

[2177] Review text data encrypted using the SSL / TLS protocol.

[2178] output

[2179] The review text that is displayed to users.

[2180] Specific actions

[2181] The device uses OpenSSL to decrypt the encrypted data and reproduces the review text and displays it to the user, who can then review the feedback and modify the code.

[2182] (Application example 1)

[2183] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[2184] Most conventional software review systems analyze and provide feedback on general computer programs, but there is a lack of systems specialized for specific applications, particularly factory robot control code. Factory robot control code differs from regular software in that it requires real-time performance and enhanced security, making a specialized code review system necessary. There is also a demand for improved productivity through immediate feedback of errors and areas for improvement in factory robot code.

[2185] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[2186] In this invention, the server includes means for users to upload their own software, means for transferring the uploaded software to an analysis device, means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking of the uploaded software in the analysis device, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using natural language generation technology, means for providing feedback on the review text to the user, and means for performing similar analysis and feedback on the control code of a factory robot, thereby enabling quality improvement of the control code of the factory robot and real-time error feedback.

[2187] "User" means a person who uploads software to the system and receives feedback.

[2188] "Software" means executable program code uploaded by Users to the System.

[2189] An "analysis device" is a computer system for analyzing uploaded software.

[2190] "Lexical analysis" is the analytical process of breaking down software code into its individual components and interpreting their meaning.

[2191] "Syntax analysis" is the process of analyzing the structure of software code and determining the relationships between components according to the grammar of the language.

[2192] "Static analysis" is the process of discovering bugs, errors, and performance problems by analyzing software code without executing it.

[2193] A "style guide check" is the process of verifying that software code complies with established coding standards and style guides.

[2194] "Points for improvement" are suggestions for improving the quality of the software code that are discovered by the analysis device.

[2195] The "error location" refers to an error or defect in the software code that is discovered by the analysis device.

[2196] "Natural language generation technology" is a technology that allows computers to generate natural human language.

[2197] A "review text" is a text generated based on the analysis results to provide feedback to the user.

[2198] "Feedback" is the process of communicating the review text generated by the analysis device to the user.

[2199] A "factory robot" is an automated mechanical device used in a factory that requires control code to perform specific tasks.

[2200] "Control code" is a software program written to control the operation of a factory robot.

[2201] The RoboCode Review Plus system aims to improve the quality of factory robot control code and provide real-time error feedback. The system uses an analysis device to analyze software uploaded by users, lists areas for improvement and errors based on the analysis results, and creates review text using natural language generation technology.

[2202] System configuration

[2203] 1. User Upload of Software

[2204] Users upload their software through the RoboCode Review Plus application interface, which supports software file selection and upload operations.

[2205] 2. Software Transfer and Encryption

[2206] The device encodes the software uploaded by the user and encrypts it using SSL / TLS, a step essential to ensure the security of sending this encrypted data to the analysis device.

[2207] 3. Analysis using an analytical device

[2208] The analysis device decrypts the received encrypted data and analyzes the software. The analysis procedures include lexical analysis, syntax analysis, static analysis, and style guide checks to detect code quality, potential bugs, security holes, performance issues, etc.

[2209] 4. Generate a list of improvements and errors

[2210] Based on the analysis results, the analyzer generates a list of improvements and errors, including specific points to be corrected.

[2211] 5. Generating review text

[2212] The analysis device uses natural language generation technology to create review text in easy-to-understand language about areas for improvement and errors, allowing users to respond without feeling stressed.

[2213] 6. Feedback on review results

[2214] The analysis device encrypts the review text and sends it to the user's device, which then decrypts the encrypted data and displays it to the user. The user can then modify the software based on this feedback.

[2215] Hardware and software used

[2216] Data encryption with SSL / TLS

[2217] Software lexical analysis, syntactic analysis, static analysis, and style guide checking by an analyzer

[2218] Creating review text using natural language generation technology

[2219] Specific examples

[2220] For example, suppose a user uploads the following control code for a factory robot:

[2221] python

[2222] def move_robot(direction, speed):

[2223] Code to move the robot

[2224] ...

[2225] return True

[2226] The analyzer analyzes this code and identifies areas for improvement and errors, such as:

[2227] The variable names 'direction' and 'speed' need to be changed to meaningful names.

[2228] Add documentation comments to functions to clarify their purpose.

[2229] Based on this, the analyzer generates the following review text:

[2230] "Rename the variables 'direction' and 'speed' to more meaningful names. Add documentation comments to clarify the purpose of the function."

[2231] Users can receive this feedback and modify their code to create high-quality control code.

[2232] Example prompts for generative AI models

[2233] "Review the robot's control code and identify the following improvements and errors. Please include specific suggestions for improvements and corrections for each error."

[2234] As described above, the RoboCode Review Plus system allows users to receive flexible and stress-free reviews, improving the quality of factory robot control code.

[2235] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[2236] Step 1:

[2237] Users upload their own software through the system interface. The input is a software file stored on the user's device, and the user selects a specific software file from the file selection screen and clicks the upload button to prepare for transfer.

[2238] Step 2:

[2239] The device encodes the software uploaded by the user and encrypts it using SSL / TLS. The input here is the software file selected in step 1, and after encoding and encryption processing, the output is encrypted data that can be securely transferred over the network.

[2240] Step 3:

[2241] The terminal sends the encrypted data to the analysis device. The input is the encrypted data generated in step 2, and the output is the software data sent to the server. This process allows the software to reach the analysis device.

[2242] Step 4:

[2243] The server decrypts the encrypted data it receives and analyzes the software. The input is the encrypted data sent from the terminal, and the original software code is obtained after the decryption process. The output is the software code to be analyzed.

[2244] Step 5:

[2245] The server performs lexical analysis, syntax analysis, static analysis, and style guide checks on the software. The input is the decoded software code, and various analysis processes are performed to generate diagnostic results. The output is the diagnostic results.

[2246] Step 6:

[2247] The server generates a list of improvements and errors based on the analysis results. The input is the analysis results obtained in step 5, and specific improvements and errors are listed through further data processing. The output is a list of improvements and errors.

[2248] Step 7:

[2249] The server uses natural language generation technology to create a review from the generated list. The input is a list of improvements and errors, and prompts are used to translate the list into natural language that is easy for the user to understand. The output is the final review.

[2250] Step 8:

[2251] The server re-encrypts the review text and sends it to the user's device. The input is the review text generated in step 7, which is securely sent to the user after the encryption process. The output is the encrypted review text.

[2252] Step 9:

[2253] The device decrypts the encrypted review text and displays it to the user. The input is the encrypted review text sent from the server, and the original review text is extracted through the decryption process and displayed to the user. The output is the review content that the user can view.

[2254] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[2255] The "CodeReview Plus" system, which incorporates an emotion engine, not only analyzes the computer programs written by users in detail and suggests areas for improvement and errors, but also recognizes the user's emotions and adjusts the review text appropriately. This system automates the entire process, from the user uploading the code, to the server analyzing it, and providing feedback on the results, using the emotion engine.

[2256] System configuration

[2257] 1. User-uploaded code

[2258] Users upload their computer programs through the CodeReview Plus application interface, which supports code file selection and upload operations.

[2259] 2. Code transmission and encryption

[2260] The device encodes the code uploaded by the user and encrypts it using SSL / TLS, preparing this encrypted data for transmission to the server.

[2261] 3. Server Analysis

[2262] The server decrypts the encrypted data received using SSL / TLS, decodes the decrypted data back to the original code, and then analyzes the uploaded code using lexical analysis, syntax analysis, static analysis, and style guide checks.

[2263] 4. Generate a list of improvements and errors

[2264] Based on the analysis, the server generates a list of improvements and errors, including specific points that need to be fixed.

[2265] 5. Generating review text

[2266] The server uses natural language generation technology to generate reviews based on the generated list, which are usually written in a non-stingy style.

[2267] 6. Emotion Recognition by Emotion Engine

[2268] The device recognizes the user's emotions from their facial expressions and voice, and the emotion engine collects the user's emotional data and sends it to the server.

[2269] 7. Adjust review text based on sentiment

[2270] The server adjusts the tone and content of the review based on the user's emotional data received from the emotion engine. For example, if the user is feeling stressed, it uses gentle, encouraging language.

[2271] 8. Feedback on review results

[2272] The server encodes the revised review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[2273] 9. Check the review results

[2274] The device uses SSL / TLS to decrypt the encrypted data received and decode it into the original review text. The user can then review the review and correct the code.

[2275] Specific examples

[2276] For example, if a user uploads the following Python code:

[2277] python

[2278] def add_numbers(a, b):

[2279] return a + b

[2280] The server performs an analysis and identifies areas for improvement and errors, such as:

[2281] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[2282] Add documentation comments to functions to clarify their purpose.

[2283] The emotion engine recognizes when a user is feeling stressed from their facial expressions and voice.

[2284] The server then generates the following review text:

[2285] Improvements:

[2286] Change the variable names 'a' and 'b' to meaningful names.

[2287] Add a documentation comment to clarify the purpose of the function.

[2288] Specific suggested fixes:

[2289] def add_numbers(first_number, second_number):

[2290] """

[2291] Takes two numbers and returns their sum.

[2292] Args:

[2293] first_number (int): The first number

[2294] second_number (int): The second number

[2295] Returns:

[2296] int: the sum of two numbers

[2297] """

[2298] return first_number + second_number

[2299] Your efforts are paying off in a positive direction. Keep up the good work!

[2300] In this way, the "CodeReview Plus" system, which combines an emotion engine, can reduce stress and improve code quality by providing feedback that takes user emotions into account.

[2301] The processing flow will be explained below.

[2302] Step 1:

[2303] The user selects their computer program (code file) and clicks the "Upload" button in the "CodeReview Plus" application.

[2304] Step 2:

[2305] The terminal encodes the selected code file and encrypts it using SSL / TLS, preparing the encrypted data to be sent to the server.

[2306] Step 3:

[2307] The device sends the encrypted data to the server, using an encryption protocol to ensure security.

[2308] Step 4:

[2309] The server uses SSL / TLS to decrypt the encrypted data it receives, and then decodes the decrypted data back to its original code.

[2310] Step 5:

[2311] The server lexically analyzes the decoded computer program, breaking the code down into tokens and identifying the individual components.

[2312] Example: def add_numbers(a, b): return a + b -> [def, add_numbers, (, a, ,, b, ), :, return, a, +, b]

[2313] Step 6:

[2314] The server performs syntax analysis based on the results of lexical analysis, converting tokens into a syntax tree (AST: Abstract Syntax Tree) to understand the overall structure of the code.

[2315] Example: def add_numbers(a, b): return a + b -> Builds a syntax tree and parses function names, arguments, return values, etc.

[2316] Step 7:

[2317] The server then performs static analysis based on the parsing results, checking for code quality, potential bugs, security holes, performance issues, etc.

[2318] Step 8:

[2319] The server checks whether the code complies with the standards based on a style guide customized for each company or project.

[2320] Step 9:

[2321] Based on the analysis, the server generates a list of improvements and errors, including specific points to fix.

[2322] Step 10:

[2323] The server uses natural language generation technology to generate reviews, usually written in a non-stinging style, highlighting areas for improvement and errors.

[2324] Step 11:

[2325] The device uses an emotion engine that recognizes emotions from the user's facial expressions and voice, and this engine collects the user's emotion data and sends it to the server.

[2326] Step 12:

[2327] The server adjusts the tone and content of the review based on the user's emotional data received from the emotion engine. For example, if the user is feeling stressed, it uses gentle, encouraging language.

[2328] Step 13:

[2329] The server encodes the revised review text into binary data and encrypts it using SSL / TLS, preparing the encrypted data for transmission to the user's device.

[2330] Step 14:

[2331] The server sends the encrypted data to the user's device.

[2332] Step 15:

[2333] The device decrypts the encrypted data received using SSL / TLS, and then decodes the decrypted data into the original review text.

[2334] Step 16:

[2335] Users can check the review results on their devices, and specific improvements and errors are clearly displayed.

[2336] Step 17:

[2337] Users can modify their code based on the review results and can also submit the modified code for review again.

[2338] Example 2

[2339] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[2340] Traditional computer program review systems provide feedback without considering users' feelings, which can cause stress and demotivation. Furthermore, the reviews are often not presented in a format that users can easily understand, or are often cold-hearted, reducing users' motivation to improve. Furthermore, the lack of flexible analysis based on style guides customized for each company or project leads to issues with inconsistent feedback quality.

[2341] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[2342] In this invention, the server includes means for users to upload their own computer programs, means for transferring the uploaded computer programs to an analysis server, means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking on the uploaded computer programs in the analysis server, means for generating a list of improvements and error locations based on the analysis results, means for creating a review text from the generated list using natural language generation technology, means for recognizing the user's emotions and adjusting the tone and content of the review text based on those emotions, and means for providing feedback on the review text to the user. This allows for flexible and high-quality feedback that takes the user's emotions into consideration, reducing user stress and increasing their motivation to improve.

[2343] "User" means any person or entity that wishes to use the System to have their computer program reviewed.

[2344] A "computer program" is a collection of computer-executable instructions and associated data structures.

[2345] "Uploading" is the act of a user transferring data from their own device to a specific server.

[2346] "Analysis Server" is a central management server for analyzing uploaded computer programs.

[2347] "Lexical analysis" is the process of breaking down program statements into units called tokens.

[2348] "Syntax analysis" is the process of rearranging the tokens into a tree structure and checking whether the grammar is correct.

[2349] "Static analysis" is a technique for analyzing source code without executing it to detect bugs and style violations.

[2350] A "style guide check" is the process of checking whether code complies with established coding standards.

[2351] The "List of improvements and errors" is a list of code corrections and problems.

[2352] "Natural language generation technology" is a technology that uses computers to generate text in natural language that humans can understand.

[2353] A "review document" is a document created based on the analysis results that describes improvements to the computer program and how to correct errors.

[2354] "Emotion recognition" is a technology that analyzes the user's emotions from their facial expressions and voice and grasps their situation.

[2355] "Adjusting tone and content" is the process of making changes to the way a sentence is expressed or its content based on the user's emotional data.

[2356] "Feedback" refers to the act of returning analysis results and review text to users and providing them with information.

[2357] This invention is a system that allows users to upload their own computer programs and automates the analysis and feedback of those programs. Specific embodiments for implementing this system are described below.

[2358] Configuration overview

[2359] The system consists of the following main components:

[2360] 1. The interface where users upload programs

[2361] 2. Terminals for receiving and transmitting uploaded programs

[2362] 3. Analysis server that performs analysis and generates reviews

[2363] 4. A sentiment engine that recognizes user sentiment and adjusts reviews accordingly

[2364] 5. Device that provides feedback results to users

[2365] Detailed process

[2366] 1. User-uploaded code

[2367] Through the system interface, the user selects and uploads a computer program from the local file system by clicking the "Upload" button.

[2368] 2. Code transmission and encryption

[2369] The device first encodes the code uploaded by the user and then encrypts it using the SSL / TLS protocol, which allows the data to be securely transmitted to the server.

[2370] 3. Server Analysis

[2371] The server decrypts the received encrypted data using SSL / TLS, decodes it back to the original code, and then uses analysis tools such as Pylint and ESLint to perform lexical analysis, syntax analysis, static analysis, and style guide checking.

[2372] 4. Generate a list of improvements and errors

[2373] Based on the analysis, the server generates a list of improvements and errors, including specific fixes, such as changing variable names or adding documentation comments.

[2374] 5. Generating review text

[2375] The server then passes the generated list as a prompt to a generative AI model (e.g., OpenAI's GPT-4) to create a review text, which includes specific revision suggestions and feedback.

[2376] 6. Emotion Recognition by Emotion Engine

[2377] While users browse reviews, the device uses a camera and microphone to capture their facial expressions and voice, and the emotion engine analyzes that data to recognize their emotional state.

[2378] 7. Adjust review text based on sentiment

[2379] The server uses the data received from the emotion engine to adjust the tone and content of the generated review text depending on the user's state of mind. For example, if the user is feeling stressed, the review text will be changed to a gentle, encouraging one.

[2380] 8. Feedback on review results

[2381] The adjusted review text is then encoded back into binary data, encrypted using SSL / TLS, and sent to the device, where it is received and decrypted, allowing the user to view the review results.

[2382] Specific examples

[2383] For example, if a user uploads the following Python code:

[2384] python

[2385] def add_numbers(a, b):

[2386] return a + b

[2387] The server performs an analysis and identifies areas for improvement and errors, such as:

[2388] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[2389] Add documentation comments to functions to clarify their purpose.

[2390] The emotion engine recognizes from the user's facial expressions and voice that the user is feeling stressed. Based on this, the server generates the following review text:

[2391] Improvements:

[2392] Change the variable names 'a' and 'b' to meaningful names.

[2393] Add a documentation comment to clarify the purpose of the function.

[2394] Specific suggested fixes:

[2395] def add_numbers(first_number, second_number):

[2396] """

[2397] Takes two numbers and returns their sum.

[2398] Args:

[2399] first_number (int): The first number

[2400] second_number (int): The second number

[2401] Returns:

[2402] int: the sum of two numbers

[2403] """

[2404] return first_number + second_number

[2405] Your efforts are paying off in a positive direction. Keep up the good work!

[2406] Prompt Sentence Examples

[2407] Enter the following prompt into the generative AI model:

[2408] In a stressful situation, please write in a gentle, encouraging tone, offering specific suggestions for improving the uploaded Python code.

[2409] Original code:

[2410] def add_numbers(a, b):

[2411] return a + b

[2412] Analysis results:

[2413] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[2414] Add documentation comments to functions to clarify their purpose.

[2415] Review in a gentle, encouraging tone:

[2416] In this way, you can take user sentiment into consideration and provide specific feedback to improve the quality of your code.

[2417] The flow of the identification process in the second embodiment will be described with reference to FIG.

[2418] Step 1:

[2419] Input: The user selects their computer program file.

[2420] Operation: The user opens the "CodeReview Plus" application interface, presses the "Upload Code" button, then selects the program file they want to review from the file selection dialog and clicks the "Upload" button.

[2421] Output: The selected program file is ready to be uploaded by the terminal.

[2422] Step 2:

[2423] Input: User presses upload button.

[2424] Actions: The device encodes the contents of the selected program file and encrypts it using the SSL / TLS protocol. The encrypted data is ready to be sent to the server.

[2425] Output: The encrypted program data is sent to the server.

[2426] Step 3:

[2427] Input: The server receives the encrypted data.

[2428] Processing behavior: The server decrypts the data using the SSL / TLS protocol, then decodes the decrypted data back into the original program code, and then uses analysis tools such as Pylint or ESLint to perform lexical analysis, syntax analysis, static analysis, and style guide checks.

[2429] Output: Analyzed data and analysis results.

[2430] Step 4:

[2431] Input: Parsed data and results.

[2432] Processing behavior: Based on the analysis results, the server generates a list of improvements and errors, including specific fixes. The list includes specific fixes such as changing variable names or adding comments.

[2433] Output: A list of improvements and errors.

[2434] Step 5:

[2435] Input: List of improvements and errors.

[2436] Processing operation: The server inputs the analysis result into a generative AI model (e.g., OpenAI's GPT-4) as a prompt sentence. The generative AI model generates a review sentence based on the prompt sentence. The generated review sentence includes correction suggestions and feedback.

[2437] Output: The edited review text.

[2438] Step 6:

[2439] Input: Review text and prompt text.

[2440] Processing behavior: While a user is browsing reviews, the device uses the camera and microphone to capture the user's facial expressions and voice data in real time. The emotion engine analyzes the data and recognizes the user's emotional state.

[2441] Output: Emotion data.

[2442] Step 7:

[2443] Input: Sentiment data and review text.

[2444] Processing action: The server adjusts the tone and content of the review based on the emotional data received. For example, if the user is feeling stressed, the review will be written in a more gentle and encouraging way.

[2445] Output: The adjusted review text.

[2446] Step 8:

[2447] Input: The adjusted review text.

[2448] Processing Actions: The server re-encodes the adjusted review text into binary data and encrypts it using the SSL / TLS protocol. The encrypted data is ready to be sent to the device.

[2449] Output: Encrypted review text.

[2450] Step 9:

[2451] Input: Encrypted review text.

[2452] Processing operation: The device receives the encrypted data from the server and decrypts it using the SSL / TLS protocol. The decrypted data is then decoded into the original review text and displayed on the application interface. The user checks the displayed review results and makes program modifications based on them.

[2453] Output: Decoded review text, and modified program.

[2454] (Application example 2)

[2455] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[2456] Conventional computer program analysis systems do not consider the user's emotions when suggesting improvements or error locations, which can cause stress or burden to the user. Furthermore, in the maintenance of robots used in factories, the feedback of diagnostic results is mechanical and does not consider the emotions or mental state of the person in charge, making efficient maintenance difficult. Therefore, there is a need for a system that considers the emotions of users and workers while suggesting appropriate improvements and error locations.

[2457] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[2458] In this invention, the server includes: means for a user to upload his or her own computer program; means for transferring the uploaded computer program to an analysis server; means for performing lexical analysis, syntactic analysis, static analysis, and style guide checking on the uploaded computer program in the analysis server; means for generating a list of improvements and error locations based on the analysis results; means for creating a review text from the generated list using natural language generation technology; means for providing the review text as feedback to the user; means for providing an emotion engine that recognizes the user's emotions in order to adjust the tone of the review text; and means for adjusting the tone of the review text based on the emotion recognition results. This allows code reviews to be performed while taking the user's emotions into consideration, reducing user stress and enabling efficient maintenance and improvement suggestions.

[2459] "User" means a person who uses the System to upload computer programs and receive analytical results.

[2460] A "computer program" refers to a collection of instructions that can be executed by a computer; that is, code written to perform a particular function or task.

[2461] "Upload" refers to the act of transferring data from the user's device to the analysis server.

[2462] "Analysis server" refers to a computer system that analyzes uploaded computer programs and identifies areas for improvement and errors.

[2463] "Lexical analysis" refers to the process of breaking down program code into tokens, and is an early step in understanding the meaning of the code.

[2464] "Syntax analysis" refers to the process of structurally analyzing the tokens broken down by lexical analysis to detect syntax errors.

[2465] "Static analysis" refers to the process of analyzing code without running the program to detect potential errors or problems.

[2466] "Style guide checking" refers to the process of verifying that program code adheres to a particular style guide or coding standard.

[2467] "List of Improvements and Errors" means a list of areas that need to be corrected or recommended improvements that is generated as a result of lexical analysis, syntactic analysis, static analysis and style guide checks.

[2468] "Natural language generation technology" refers to technology that allows a computer to generate human language, and is used to convert the generated list into easy-to-understand sentences.

[2469] "Review text" refers to the feedback generated based on the analysis results, and includes details of areas for improvement and errors, as well as how to correct them.

[2470] An "emotion engine" refers to a system that recognizes emotions from a user's facial expressions and voice and collects them as data.

[2471] "Emotion Recognition Results" refers to the user's emotional data detected by the emotion engine and used to adjust the review text.

[2472] "Adjusting tone" refers to the process of changing the way feedback is presented or worded based on how the user feels.

[2473] This invention provides a system in which a user uploads their own computer program, analyzes the program on an analysis server, and provides feedback on improvements and error locations based on the analysis results. This system is implemented as follows.

[2474] System configuration

[2475] 1. User Device

[2476] The user device provides an interface for users to upload their own computer programs. This interface supports code file selection and upload operations. The user device also has an emotion engine that can recognize emotions from the user's facial expressions and voice. This emotion data is used to adjust the tone of the review text.

[2477] 2. Encryption and Data Transmission

[2478] The user device encodes the uploaded code and encrypts it using SSL / TLS, protecting the entire chain of operations until it is sent to the analysis server.

[2479] 3. Analysis Server

[2480] The analysis server decrypts the received encrypted data using SSL / TLS and decodes it back into the original code. Next, it performs lexical analysis, syntax analysis, static analysis, and style guide checks to generate analysis results. Based on these analysis results, a list of areas for improvement and errors is created. It is also possible to perform analysis based on style guides customized for each company or project.

[2481] 4. Generate feedback

[2482] The analysis server uses natural language generation technology to create review text based on the generated list. These review texts are usually written in a mild manner, but the tone and content are adjusted based on the recognition results of the emotion engine. If the user is feeling stressed, the review text will be adjusted to a gentle, encouraging tone.

[2483] 5. Sending and Viewing Feedback

[2484] The generated review text is then encrypted again and sent to the user's device. The user's device then decrypts the received encrypted data and decodes it back to the original review text. The decoded review text is then displayed to the user, allowing them to modify the code.

[2485] Hardware and software used

[2486] Hardware

[2487] User devices (personal computers, smartphones, tablets, etc.)

[2488] Emotion recognition device (camera, microphone)

[2489] Analysis Server

[2490] software

[2491] Encryption library (SSL / TLS)

[2492] HTTP request library (requests)

[2493] Emotion detection library (EmotionEngine)

[2494] Natural language generation library (ReviewGenerator)

[2495] Specific examples

[2496] For example, if a user uploads the following Python code:

[2497] python

[2498] def add_numbers(a, b):

[2499] return a + b

[2500] The server performs an analysis and identifies areas for improvement and errors, such as:

[2501] The variable names 'a' and 'b' are meaningless and should be changed to more descriptive names.

[2502] Add documentation comments to functions to clarify their purpose.

[2503] The emotion engine recognizes that the user is feeling stressed from their facial expressions and voice. Based on this, the server generates the following review text:

[2504] “Improvements:

[2505] Change the variable names 'a' and 'b' to meaningful names.

[2506] Add a documentation comment to clarify the purpose of the function.

[2507] Specific suggested fixes:

[2508] def add_numbers(first_number, second_number):

[2509] """

[2510] Takes two numbers and returns their sum.

[2511] Args:

[2512] first_number (int): The first number

[2513] second_number (int): The second number

[2514] Returns:

[2515] int: the sum of two numbers

[2516] """

[2517] return first_number + second_number

[2518] Your efforts are paying off in a positive direction. Keep up the good work!”

[2519] This allows a system that combines an emotion engine to provide accurate feedback while taking into account the user's emotions, reducing user stress and improving code quality.

[2520] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[2521] Step 1:

[2522] A user uploads the code of a computer program using their own device.

[2523] Specifically, the user opens the application interface on the terminal, selects the code file, and presses the upload button. The input data is the program code file, which is received by the terminal. The uploaded program is then sent to the system as data for later analysis.

[2524] Step 2:

[2525] The device encodes the uploaded code and encrypts it using SSL / TLS.

[2526] Specifically, the code uploaded as input data is encoded in UTF-8 format, and then encrypted data is generated using the SSL / TLS encryption library. This encrypted data is the output and passed to the next processing step.

[2527] Step 3:

[2528] The device sends the encrypted data to an analysis server.

[2529] Specifically, the encrypted data is sent to the analysis server as a POST request using an HTTP request library. The input data is the encrypted code, and the output is the completion of the transmission.

[2530] Step 4:

[2531] The encrypted data received by the server is decrypted using SSL / TLS and decoded back to the original code.

[2532] Specifically, it uses the SSL / TLS library to decrypt the encrypted data received as input, decodes the encoded code, and reproduces the program code. The output data is the decrypted program code.

[2533] Step 5:

[2534] The server performs lexical analysis, syntax analysis, static analysis and style guide checks on the program code.

[2535] Specifically, the decoded program code is passed as input data to the analysis engine, which then performs lexical analysis, syntactic analysis, static analysis, and style guide checks. The output data is the analysis results, including errors and areas for improvement.

[2536] Step 6:

[2537] The server generates a list of improvements and error locations based on the analysis results.

[2538] Specifically, the analysis results are taken in as input data, and a list of improvements and errors is compiled. The output data is a list of improvements and errors.

[2539] Step 7:

[2540] The server creates review text based on the list using natural language generation technology.

[2541] Specifically, the generated list is passed as input data to a natural language generation library to generate review text, and the output data is the review text.

[2542] Step 8:

[2543] The device uses an emotion engine to sense the user's facial expressions and voice and generate emotional data for the user.

[2544] Specifically, the emotion engine receives real-time facial expressions and voice data from the user as input data, and performs emotion recognition processing. The output data is emotion data.

[2545] Step 9:

[2546] The server adjusts the tone of the review text based on the emotional data.

[2547] Specifically, the server receives emotion data and review text as input data, analyzes it with an emotion engine, and adjusts the tone of the review text. The output data is the adjusted review text.

[2548] Step 10:

[2549] The server re-encrypts the adjusted review text and sends it to the user's device.

[2550] Specifically, the input data is the adjusted review text, which is encrypted using the SSL / TLS library and sent to the user's device using the HTTP request library. The output data is a notification of completion of transmission.

[2551] Step 11:

[2552] The device decrypts the received encrypted data and displays the review text to the user.

[2553] Specifically, the system uses an SSL / TLS library to decrypt the encrypted data received as input, decodes it into the original review text, and displays it to the user. The output data is the review text that the user can view.

[2554] Prompt Sentence Examples

[2555] When generating review text, the following is an example of a prompt sentence that reflects emotional data:

[2556] text

[2557] Please generate improvement suggestions in gentle language for the following diagnostic results: Battery degradation: Used for a long time. Motor abnormality: Abnormal noise detected. Please include encouraging language as the user is feeling stressed.

[2558] The specific processing unit 290 transmits the result of the specific processing to the robot 414. In the robot 414, the control unit 46A causes the speaker 240 and the control target 443 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input regarding the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.

[2559] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[2560] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the robot 414.

[2561] The emotion identification model 59 as an emotion engine may determine the user's emotion according to a specific mapping. Specifically, the emotion identification model 59 may determine the user's emotion according to an emotion map (see FIG. 9), which is a specific mapping. Similarly, the emotion identification model 59 may determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.

[2562] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.

[2563] These emotions are distributed in the 3 o'clock direction on emotion map 400, and typically fluctuate between relief and anxiety. In the right half of emotion map 400, situational awareness dominates over internal sensations, resulting in a sense of calm.

[2564] The inside of emotion map 400 represents what is going on in the mind, and the outside of emotion map 400 represents behavior, so the further you go outside emotion map 400, the more visible the emotions become (the more they are expressed in behavior).

[2565] Human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. Emotions can also be created for robots, automobiles, and motorcycles, based on various balances, such as posture and remaining battery life. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. An emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on Voice Emotion Recognition and Emotional Brain Physiological Signal Analysis Systems, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map lists emotions belonging to the "reaction" domain, where sensation is dominant. The right half of the emotion map lists emotions belonging to the "situation" domain, where situational awareness is dominant.

[2566] The emotion map defines two emotions that promote learning. One is a negative emotion on the situation side, around the middle of "repentance" or "reflection." In other words, this occurs when the robot experiences negative emotions such as "I never want to feel this way again" or "I don't want to be scolded again." The other is a positive emotion on the response side, around "desire." In other words, this occurs when the robot experiences positive feelings such as "I want more" or "I want to know more."

[2567] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values ​​indicating each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple pieces of training data that are combinations of user input and emotion values ​​indicating each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions that are located close to each other have similar values, as in the emotion map 900 shown in FIG. 10. FIG. 10 shows an example in which multiple emotions, "relieved," "calm," and "reassuring," have similar emotion values.

[2568] The system according to the present disclosure has been described above mainly with respect to the functions of the data processing device 12, but the system according to the present disclosure is not necessarily implemented on a server. The system according to the present disclosure may be implemented as a general information processing system. The present disclosure may be implemented, for example, as a software program running on a personal computer or an application running on a smartphone, etc. The method according to the present disclosure may be provided to users in the form of SaaS (Software as a Service).

[2569] In the above embodiment, an example was given in which the specific processing is performed by one computer 22, but the technology of the present disclosure is not limited to this, and the specific processing may be distributed and performed by a plurality of computers including the computer 22. For example, the data generation model 58 may be provided in an external device of the data processing device 12, and data may be generated in the external device in accordance with input data.

[2570] In the above embodiment, an example in which the specific processing program 56 is stored in the storage 32 has been described, but the technology of the present disclosure is not limited to this. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-transitory storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-transitory storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes the specific processing in accordance with the specific processing program 56.

[2571] 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.

[2572] It is not necessary to store all of the specific processing program 56 in a storage device such as a server connected to the data processing device 12 via the network 54, or to store all of the specific processing program 56 in the storage 32; only a portion of the specific processing program 56 may be stored.

[2573] The hardware resource for executing a specific process can be any of the following processors: An example of a processor is a CPU, which is a general-purpose processor that functions as a hardware resource for executing a specific process by executing software, i.e., a program. Another example of a processor is a dedicated electrical circuit, such as an FPGA (Field-Programmable Gate Array), a PLD (Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit), which is a processor with a circuit configuration designed specifically for executing a specific process. Each processor has built-in or connected memory, and each processor uses the memory to execute the specific process.

[2574] The hardware resource that executes the specific processing may be configured with one of these various processors, or may be configured with a combination of two or more processors of the same or different types (for example, a combination of multiple FPGAs, or a combination of a CPU and an FPGA). Also, the hardware resource that executes the specific processing may be a single processor.

[2575] As an example of a system configured with a single processor, first, one processor is configured by combining one or more CPUs and software, and this processor functions as a hardware resource that executes a specific process. Second, there is a system that uses a processor that realizes the functions of an entire system including multiple hardware resources that execute a specific process on a single IC chip, as typified by SoC (System-on-a-chip). In this way, a specific process is realized using one or more of the above-mentioned various processors as hardware resources.

[2576] Furthermore, the hardware structure of these various processors can be, more specifically, an electric circuit that combines circuit elements such as semiconductor devices. The specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps may be deleted, new steps may be added, or the processing order may be rearranged, without departing from the spirit of the invention.

[2577] The above-described description and illustrations are a detailed explanation of the parts related to the technology of the present disclosure and are merely an example of the technology of the present disclosure. For example, the above description of the configuration, functions, actions, and effects is an explanation of an example of the configuration, functions, actions, and effects of the parts related to the technology of the present disclosure. Therefore, it goes without saying that unnecessary parts may be deleted, new elements may be added, or replacements may be made to the above-described description and illustrations within the scope of the gist of the technology of the present disclosure. Furthermore, to avoid confusion and facilitate understanding of the parts related to the technology of the present disclosure, the above-described description and illustrations omit explanations of common technical knowledge that do not require particular explanation to enable the implementation of the technology of the present disclosure.

[2578] All publications, patent applications, and technical standards mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent application, or technical standard was specifically and individually indicated to be incorporated by reference.

[2579] The following is further disclosed regarding the above embodiment.

[2580] (Claim 1)

[2581] a means for users to upload their own computer programs;

[2582] means for transferring the uploaded computer program to an analysis server;

[2583] means for performing lexical analysis, syntactic analysis, static analysis and style guide checking of the uploaded computer program in an analysis server;

[2584] A means for generating a list of improvements and error locations based on the analysis results;

[2585] A means for creating a review sentence from the generated list using natural language generation technology;

[2586] A system including a means for providing feedback of review text to users.

[2587] (Claim 2)

[2588] 10. The system of claim 1, further comprising means for a user to encrypt a computer program before uploading it to the analysis server and means for a user to decrypt a feedback review text.

[2589] (Claim 3)

[2590] 2. The system according to claim 1, wherein the analysis server comprises means for performing analysis based on a style guide customized for each company or project.

[2591] "Example 1"

[2592] (Claim 1)

[2593] A means for users to upload their own programs;

[2594] a means for transferring the uploaded program;

[2595] A means for the terminal to encrypt the transferred program;

[2596] means for decrypting the encrypted data received by the server;

[2597] a server for carrying out lexical analysis, syntax analysis, static analysis and style guide checking of the uploaded program;

[2598] A means for generating a list of improvements and error locations based on the analysis results;

[2599] A means for generating a review sentence from the generated list using a prompt sentence by natural language generation technology;

[2600] A method to encrypt review text and provide feedback to users,

[2601] The system includes a means for decoding the feedback review text.

[2602] (Claim 2)

[2603] 10. The system of claim 1, further comprising means for storing the list generated during the analysis in an internal database.

[2604] (Claim 3)

[2605] 2. The system according to claim 1, wherein the server comprises means for performing analysis based on a style guide customized for each company or project.

[2606] "Application Example 1"

[2607] (Claim 1)

[2608] A means for users to upload their own software;

[2609] means for transferring the uploaded software to an analysis device;

[2610] means for performing lexical analysis, syntactic analysis, static analysis and style guide check of the uploaded software in the analysis device;

[2611] A means for generating a list of improvements and error locations based on the analysis results;

[2612] A means for creating a review sentence from the generated list using natural language generation technology;

[2613] A means of providing feedback to users on review text,

[2614] A means of performing similar analysis and feedback on the control code of factory robots;

[2615] A system including:

[2616] (Claim 2)

[2617] 10. The system of claim 1, further comprising means for a user to encrypt software before uploading it to the analysis device and means for decrypting feedback review text.

[2618] (Claim 3)

[2619] 2. The system according to claim 1, wherein the analysis device comprises means for performing analysis based on a style guide customized for each organization or project.

[2620] "Example 2: Combining Emotion Engines"

[2621] (Claim 1)

[2622] a means for users to upload their own computer programs;

[2623] means for transferring the uploaded computer program to an analysis server;

[2624] means for performing lexical analysis, syntactic analysis, static analysis and style guide checking of the uploaded computer program in an analysis server;

[2625] A means for generating a list of improvements and error locations based on the analysis results;

[2626] A means for creating a review sentence from the generated list using natural language generation technology;

[2627] A way to recognize user sentiment and adjust the tone and content of reviews accordingly;

[2628] A system including a means for providing feedback of review text to users.

[2629] ...

Claims

1. a means for users to upload their own computer programs; means for transferring the uploaded computer program to an analysis server; means for performing lexical analysis, syntactic analysis, static analysis and style guide checking of the uploaded computer program in an analysis server; A means for generating a list of improvements and error locations based on the analysis results; A means for creating a review sentence from the generated list using natural language generation technology; A system including a means for providing feedback of review text to users.

2. 2. The system of claim 1, further comprising means for a user to encrypt a computer program before uploading it to the analysis server and means for a user to decrypt a feedback review text.

3. 2. The system according to claim 1, wherein the analysis server comprises means for performing analysis based on a style guide customized for each company or project.

Citation Information

Patent Citations

  • Persona chatbot control method and system

    JP2022180282A