System
The system addresses inefficiencies in code understanding by analyzing and commenting on other developers' code in real-time, enhancing learning and development efficiency.
Patent Information
- Application Number
- JP2024118122
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2026-02-04
AI Technical Summary
Software developers face inefficiencies in understanding and learning new frameworks, libraries, and deciphering poorly commented code, which slows down development projects and reduces efficiency.
A system that analyzes other people's code in real-time, provides structured comments, and allows users to adjust the granularity of comments, helping to quickly understand complex directory structures and functions.
Enables developers to efficiently comprehend and learn new technologies by providing real-time analysis and easy-to-understand comments, improving development speed and accuracy.
Smart Images

Figure 2026017340000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]
[0004] Software developers spend a lot of time learning new frameworks, libraries, and algorithms. Furthermore, when deciphering someone else's code, it can take a long time to understand, especially if the code is poorly commented. This slows down the progress of development projects and reduces efficiency. This invention aims to shorten the time developers spend understanding code by quickly analyzing other people's code and providing easy-to-understand explanations of its structure and function, thereby providing an environment where developers can focus on learning new technologies and creative development. [Means for solving the problem]
[0005] The present invention provides a system that includes a means for reading other people's programs, a means for analyzing the structure and function of the read programs, a means for providing the analyzed information to the user in real time, and a means for adding the analyzed information to the programs as comments. The system also includes a means for adjusting the granularity of the comments in the analysis results, and a means for analyzing complex directory structures and explaining the results. This configuration allows users to quickly understand other people's code and work efficiently.
[0006] Understood. Below are definitions of important terms contained in the patent claims.
[0007] "Means for loading other people's programs" includes functions and processes for obtaining source code files created by other people and incorporating them into the system.
[0008] "Means for analyzing the structure and functionality of a loaded program" includes functions and processes for analyzing the acquired source code, identifying its structural and functional characteristics, such as function definitions, class definitions, variable usage, conditional branches, and loops, and organizing them into an explainable form.
[0009] The "means for providing analyzed information to a user in real time" includes functions and processes for immediately displaying information generated by the analysis engine to a user.
[0010] "Means for adding analyzed information to a program as comments" includes functions and processes for inserting the analysis results in the form of comments at appropriate locations in the source code and providing them in a form that is easily understandable to users.
[0011] The "means for adjusting the granularity of comments" includes functions and processes for changing the level of detail of generated comments to suit the user's preferences.
[0012] "Means for analyzing complex directory structures and explaining the results" includes functions and processes for analyzing complex directory and file structures and explaining their structures and relationships in an easy-to-understand manner. [Brief explanation of the drawings]
[0013] [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
[0014] 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.
[0015] First, the terms used in the following description will be explained.
[0016] 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).
[0017] 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.
[0018] 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.
[0019] 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.
[0020] 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."
[0021] [First embodiment]
[0022] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0023] 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.
[0024] 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).
[0025] 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.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0030] 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.
[0031] 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.
[0032] 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.
[0033] 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."
[0034] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the programs as comments. This system aims to help software developers quickly understand other people's code and to make learning new technologies and algorithms more efficient.
[0035] System Overview
[0036] This system consists of the following elements:
[0037] A means of loading other people's programs
[0038] A means of analyzing the structure and functionality of loaded programs
[0039] A means of providing analyzed information to users in real time
[0040] A means of adding parsed information to programs as comments
[0041] A way to control the granularity of comments
[0042] A way to analyze complex directory structures
[0043] Program processing explanation
[0044] 1. Loading the code
[0045] The user launches the CodeXplain application and selects the source code file they want to analyze.
[0046] The terminal uploads the selected source code file to the server.
[0047] 2. Code Analysis
[0048] The server receives the uploaded source code files.
[0049] The server's analysis engine identifies various elements in the source code (functions, classes, variables, conditional branches, loops, etc.) and analyzes their relationships.
[0050] The analysis engine generates analysis results to clarify the roles and functions of the identified elements.
[0051] 3. Creating and Inserting Comments
[0052] The server generates an appropriate comment based on the analysis results.
[0053] The generated comments are adjusted to the granularity (level of detail) of the comments specified by the user.
[0054] The server inserts the generated comments into the source code at the appropriate positions to create new commented source code.
[0055] 4. Providing results
[0056] The server transmits the commented source code to the user's terminal.
[0057] The terminal displays the transmitted commented source code to the user.
[0058] 5. References and Feedback
[0059] The user can check the displayed commented source code, and can modify the comment content or enter additional information as necessary.
[0060] The server receives feedback from users and uses it to improve the analytical model.
[0061] Specific example explanation
[0062] For example, if the following source code written in Python is entered:
[0063] python
[0064] def add(a, b):
[0065] return a + b
[0066] result = add(3, 4)
[0067] print(result)
[0068] The system performs the following analyses:
[0069] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[0070] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[0071] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[0072] The commented source code generated based on the analysis results is as follows:
[0073] python
[0074] Addition function
[0075] def add(a, b):
[0076] Returns the sum of a and b
[0077] return a + b
[0078] Call the add function and store the result in result
[0079] result = add(3, 4)
[0080] Output the result
[0081] print(result)
[0082] In this way, users can quickly understand the functionality of the code by using commented source code, which is particularly useful for beginners and when reviewing code written by others, and contributes to improving development efficiency.
[0083] The processing flow will be explained below.
[0084] Step 1:
[0085] Users launch the CodeXplain application and select the source code files they want to analyze by using a file browser to select the files from local storage.
[0086] Step 2:
[0087] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[0088] Step 3:
[0089] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[0090] Step 4:
[0091] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[0092] Step 5:
[0093] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzing the relationships between them.
[0094] Step 6:
[0095] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[0096] Step 7:
[0097] The server inserts the generated comments into the original source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[0098] Step 8:
[0099] The server transmits the commented source code to the user's device using a security protocol to ensure data integrity and confidentiality.
[0100] Step 9:
[0101] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[0102] Step 10:
[0103] Users can then provide feedback to the server with corrections and additional comments, which will be used to improve and optimize the analysis model in the future.
[0104] Through these steps, the CodeXplain system is able to quickly analyze other people's code and present its structure and functionality to users in an easy-to-understand manner.
[0105] Example 1
[0106] 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."
[0107] Efficiently understanding code written by others is an important challenge in software development. However, understanding code from scratch, which contains complex structures and many functions and classes, takes time and effort. Furthermore, conventional code reading makes it difficult to accurately grasp the code's function and role, and there is a risk of misunderstanding. Furthermore, even in team development, if other people's code lacks appropriate comments, maintaining and modifying the code becomes difficult. New technical methods are needed to solve these challenges.
[0108] 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.
[0109] In this invention, the server includes means for loading other people's programs, means for analyzing the structure and function of the loaded programs, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the program as comments, means for the user to select a code file to be analyzed and upload it from their terminal to the server, means for tokenizing the code received by the server using an analysis engine and performing syntax analysis, means for generating appropriate comments based on the analysis results and inserting the comments into the code, means for sending the commented source code to their terminal and displaying it to the user, and means for collecting feedback from users and using it to improve the analysis model. This makes it possible to quickly and accurately understand other people's code and significantly improve the efficiency of software development.
[0110] "Means for loading other people's programs" refers to a mechanism for incorporating source code files created by other people into the system in a specified manner.
[0111] "Means for analyzing the structure and function of a program" refers to a mechanism that performs processing to identify and understand each element of the loaded source code (functions, classes, variables, etc.), their relationships, and their roles.
[0112] "Means for providing analyzed information to users in real time" refers to a function for instantly obtaining the analysis results and instantly presenting them to the user.
[0113] The "means for adding analyzed information to a program as a comment" is a mechanism for generating appropriate comments based on the analyzed information and inserting the comments at appropriate positions in the original source code.
[0114] "Means for users to select code files to be analyzed and upload them from their devices to the server" refers to a mechanism whereby a user specifies the source code to be analyzed and sends that code from the user's device to the server.
[0115] "Means for tokenizing the code received by the server using an analysis engine and performing syntactic analysis" refers to a mechanism for dividing the source code received by the server into syntactic units using an analysis engine, and understanding the structure and meaning of the source code.
[0116] "Means for generating appropriate comments based on the analysis results and inserting the comments into the code" refers to a mechanism for adding comments generated based on the analyzed information to appropriate locations in the source code.
[0117] The "means for transmitting source code with comments to a terminal and displaying it to a user" is a mechanism for transmitting source code with added comments to a user's terminal and displaying it to the user.
[0118] "Means for collecting feedback from users and using it to improve the analysis model" refers to a mechanism for collecting comments and suggestions for corrections provided by users and using that information to improve the performance and accuracy of the analysis system.
[0119] This invention relates to a system that allows users to quickly and accurately understand programs written by others. In particular, it aims to analyze source code, provide analysis results in real time, and insert the analysis results into the code as appropriate comments.
[0120] This system consists of the following elements:
[0121] 1. A means of loading other people's programs: A function that allows users to select the source code they want to analyze and upload it to the server from their terminal. Specifically, users use the CodeXplain application to select the source code file and send an analysis request.
[0122] 2. A means for analyzing the structure and function of the loaded program: The server uses an analysis engine to tokenize and parse the source code received. The analysis engine identifies the roles and relationships of specific elements (functions, classes, variables, etc.). This analysis engine supports common programming languages (e.g., Python, Java, etc.).
[0123] 3. Means of providing analyzed information to users in real time: The server immediately generates the analysis results and provides them to users in real time. The analysis results are displayed using visualization tools or other methods in a format that users can easily understand.
[0124] 4. A means to add analyzed information to programs as comments: The server generates appropriate comments based on the analysis results and inserts them into the code to make it easier for users to understand. The level of detail of the comments can be adjusted according to the granularity specified by the user.
[0125] 5. A means for selecting the code file to be analyzed and uploading it from the terminal to the server: The system has a function that allows the user to select the code file to be analyzed and securely upload it to the server. This means encrypts and transfers data securely using the HTTPS protocol.
[0126] 6. The server uses an analysis engine to tokenize and parse the code it receives: The server has the ability to break down source code into tokens and perform syntax analysis. This clarifies the roles and relationships of each element in the code.
[0127] 7. Means for generating appropriate comments based on the analysis results and inserting the comments into the code: The server generates appropriate comments based on the analysis results and inserts them into the code at predetermined positions. The generated comments help the user understand the code.
[0128] 8. Means for sending commented source code to the terminal and displaying it to the user: The server sends the commented source code to the terminal, and the terminal displays it. The user can check the displayed commented source code and understand its contents.
[0129] 9. A means of collecting user feedback and using it to improve the analysis model: Users provide the system with comments and feedback on the analysis results. The server uses this information to improve the analysis model and generate more accurate analysis results.
[0130] Specific example explanation
[0131] For example, if the following Python code is entered:
[0132] def multiply(a, b):
[0133] return ab
[0134] result = multiply(5, 7)
[0135] print(result)
[0136] When our system analyzes this code, it generates the following commented source code:
[0137] Multiplication function
[0138] def multiply(a, b):
[0139] Returns the product of a and b
[0140] return ab
[0141] Call the multiply function and store the result in result
[0142] result = multiply(5, 7)
[0143] Output the result
[0144] print(result)
[0145] Prompt Sentence Examples
[0146] Input to the system is written as a prompt sentence like this:
[0147] Analyze this Python code and add your comments:
[0148] And include the following code:
[0149] def multiply(a, b):
[0150] return ab
[0151] result = multiply(5, 7)
[0152] print(result)
[0153] This allows the server to generate commented source code based on the input code and provide it to the user.
[0154] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0155] Step 1: Select and enter your code
[0156] The user launches the CodeXplain application and selects the source code file to be analyzed. Specifically, the user clicks the "Select File" button and selects the source code file to be analyzed.
[0157] Input: The source code file to be analyzed
[0158] Output: The path of the selected source code file.
[0159] Step 2: Upload the code
[0160] The device will upload the source code files selected by the user to the server, with a progress bar indicating the progress during the upload and a notification displayed to the user once the upload is complete.
[0161] Input: The path of the source code file selected in step 1
[0162] Output: Source code files uploaded to the server
[0163] Step 3: Receive the code and start analyzing
[0164] The server receives the uploaded source code file, after which the parsing engine breaks the source code into tokens and begins parsing it.
[0165] Input: Uploaded source code file
[0166] Output: Tokenized source code
[0167] Step 4: Analyzing the code structure and functionality
[0168] The server's analysis engine identifies various elements (functions, classes, variables, etc.) based on the tokenized source code and analyzes their relationships. The analysis engine generates analysis results to clarify roles and functions.
[0169] Input: Tokenized source code
[0170] Output: Analysis results (roles and relationships of each element)
[0171] Step 5: Generate comments
[0172] The server generates appropriate comments based on the analysis results, adjusting the level of detail of the comments to match the granularity of the comments specified by the user.
[0173] Input: Analysis results (roles and relationships of each element)
[0174] Output: Generated comments
[0175] Step 6: Inserting comments
[0176] The server inserts the generated comments into the source code at appropriate positions to create commented source code.
[0177] Input: Generated comments, original source code
[0178] Output: Commented source code
[0179] Step 7: Delivering results
[0180] The server transmits the commented source code to the user's terminal, which displays the received commented source code to the user.
[0181] Input: Commented source code
[0182] Output: Commented source code displayed in terminal.
[0183] Step 8: Gather feedback and improve the model
[0184] The user can review the displayed commented source code, modify the comments as necessary, and enter feedback. The server receives this feedback and uses it to improve the analysis model.
[0185] Input: User feedback
[0186] Output: Improved analytical model
[0187] (Application example 1)
[0188] 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."
[0189] Quickly understanding and efficiently reviewing someone else's code is extremely difficult, especially with large code bases. In fields like content distribution services, program quality and stability are essential, making accurate code analysis necessary. However, traditional methods rely on manual analysis, which is time-consuming and labor-intensive, and prone to errors. Furthermore, adding and generating comments can be time-consuming, hindering program comprehension.
[0190] 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.
[0191] In this invention, the server includes means for loading other people's programs, means for analyzing the structure and function of the loaded programs, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the programs as comments, means for uploading the programs from a mobile terminal, means for analyzing the programs on the server and returning the results to the terminal, and means for generating comments using a generative AI model. This allows users to easily upload other people's code using their mobile terminals and receive source code with comments that reflect the results of real-time analysis on the server.
[0192] "Third Party Programs" means software code created by a third party.
[0193] "Structural and functional analysis" means investigating the internal structure and operation of a program and clarifying the relationships between each element and function.
[0194] "Providing to the user in real time" means providing the analyzed information to the user immediately so that the user can check it without any time delay.
[0195] "Adding as a comment to the program" means inserting the analyzed information as explanatory text at an appropriate location in the program.
[0196] A "mobile device" is a portable computing device such as a smartphone or tablet.
[0197] A "server" is a central computer that provides services to other computers over a network.
[0198] A "generative AI model" is a mathematical model that uses artificial intelligence to generate appropriate comments and explanations from data.
[0199] "Uploading" means transferring data from a local terminal to a remote server via a network.
[0200] "Returning the analysis results to the terminal" means sending the analysis results processed by the server back to the user's mobile terminal.
[0201] The present invention provides a system for quickly and efficiently understanding other people's programs, particularly by linking a user's mobile device with a server. It also uses a generative AI model to automatically generate comments to aid in understanding the program. A specific embodiment of this system is described below.
[0202] System configuration
[0203] The system consists of the following elements:
[0204] Mobile device: A smartphone or tablet device owned by a user.
[0205] Server: A computer that processes data in cooperation with mobile devices via a network.
[0206] Generative AI model: A model that uses artificial intelligence to generate appropriate comments and explanations from data.
[0207] Program processing
[0208] 1. Loading and uploading other people's programs
[0209] A user launches an application on a mobile device, selects the source code file they want to analyze, and then uploads the program file from the mobile device to the server. The hardware used in this stage is a smartphone or tablet, and the software is the application on the device (e.g., an iOS or Android app).
[0210] 2. Program Analysis
[0211] The server analyzes the received source code files. This analysis uses Python's Abstract Syntax Tree (AST) module to identify various elements (functions, classes, variables, etc.) and analyze their relationships. Furthermore, a generative AI model is used to generate appropriate comments based on the analysis results. A Python script is used as the analysis engine for this step. The server can also utilize cloud infrastructure such as AWS EC2.
[0212] 3. Creating and Inserting Comments
[0213] The comments created by the generative AI model are inserted into the source code at the appropriate locations by the server, generating new commented source code, which is then immediately sent back to the mobile device.
[0214] 4. Providing results
[0215] The mobile device receives the commented source code from the server and displays it to the user, who can review it and make any necessary modifications. The hardware used at this stage is a smartphone or tablet, and a display application is used.
[0216] Specific examples
[0217] For example, if the following Python code is entered:
[0218] python
[0219] def greet(name):
[0220] print(f'Hello, {name}!')
[0221] greet('Alice')
[0222] Example prompt sentence:
[0223] "Analyze the following code and add comments for function definitions and calls."
[0224] Generated commented code:
[0225] python
[0226] The greet function has the following roles:
[0227] def greet(name):
[0228] print(f'Hello, {name}!')
[0229] The function greet was called
[0230] greet('Alice')
[0231] In this way, users can easily analyze other people's code from their mobile devices and add comments in an easy-to-understand format, which is expected to improve development efficiency by enabling quicker code review and understanding.
[0232] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0233] Step 1:
[0234] A user launches the application on their mobile device and selects the source code file they want to analyze, which inputs the source code file. The device then creates a request to upload this file to the server. This request includes the user's identifying information along with the source code file itself.
[0235] Step 2:
[0236] The terminal sends the created request to the server, which receives it. The server temporarily stores the received source code file and begins the process of analyzing its structure and functionality. At this stage, the server uses Python's Abstract Syntax Tree (AST) module to analyze the source code. The input for the analysis is the source code file, and the output is a list of various elements in the source code (functions, classes, variables, etc.).
[0237] Step 3:
[0238] The server uses a generative AI model to generate comments about the role and function of each element identified in the analysis results. The input here is a list of AST analysis results, and the output is appropriate comments generated by the generative AI model. The generated comments are based on the analysis results, so they help users understand the code.
[0239] Step 4:
[0240] The server inserts the generated comments into the corresponding positions in the source code to generate new commented source code. The input is the original source code and the generated comments, and the output is the source code with the inserted comments. After the server finishes this process, it temporarily saves the newly generated commented source code.
[0241] Step 5:
[0242] The server generates a request to return the commented source code to the terminal, and identifies the destination by referring to the request information from the user. The input is the commented source code and the user's identification information, and the output is an HTTP response to the terminal.
[0243] Step 6:
[0244] The terminal analyzes the commented source code received from the server and displays it to the user. The input is the HTTP response from the server, and the output is the source code displayed to the user. The user can review this and modify the comment content as necessary.
[0245] Step 7:
[0246] If the user corrects the comment, the terminal uploads the corrected source code to the server again and sends it as feedback, which allows the server to obtain data to improve the analysis model. The input is the source code corrected by the user, and the output is the feedback information sent to the server.
[0247] 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.
[0248] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the program as comments. In particular, this system has an added emotion engine that recognizes the user's emotions, and is characterized by providing optimal feedback according to the user's emotional state.
[0249] System Overview
[0250] This system consists of the following elements:
[0251] A means of loading other people's programs
[0252] A means of analyzing the structure and functionality of loaded programs
[0253] A means of providing analyzed information to users in real time
[0254] A means of adding parsed information to programs as comments
[0255] A way to control the granularity of comments
[0256] A way to analyze complex directory structures
[0257] Emotion engine that recognizes user emotions
[0258] Program processing explanation
[0259] 1. Loading the code
[0260] Users launch the CodeXplain application and select the source code files they want to analyze. Users use a file browser to select the target files from local storage.
[0261] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[0262] 2. Code Analysis
[0263] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[0264] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[0265] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and uses, conditional branches, loop structures, etc., and analyzing the relationships between them.
[0266] 3. Creating and Inserting Comments
[0267] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[0268] The server inserts the generated comments into the source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[0269] 4. Emotion Recognition by Emotion Engine
[0270] The terminal collects the user's emotional state through a camera and microphone and transmits it to the emotion engine.
[0271] The server's emotion engine analyzes the collected data and identifies the user's emotional state (e.g., stress, confusion, contentment).
[0272] 5. Providing and adjusting results
[0273] The server sends the commented source code to the user's device, and adjusts the granularity and format of the comments displayed based on the user's emotional state. For example, if the user is feeling stressed, the comments will be more detailed to help the user understand.
[0274] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[0275] 6. References and Feedback
[0276] The user can check the displayed commented source code, and can modify the comment content or enter additional information as necessary.
[0277] The server receives feedback from users and uses it to improve the analysis model. This feedback is useful for improving the accuracy of the emotion engine and optimizing the analysis algorithm.
[0278] Specific example explanation
[0279] For example, if the following source code written in Python is entered:
[0280] python
[0281] def add(a, b):
[0282] return a + b
[0283] result = add(3, 4)
[0284] print(result)
[0285] The system performs the following analyses:
[0286] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[0287] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[0288] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[0289] Also, if the emotion engine detects that the user is stressed, it will generate a more detailed comment:
[0290] python
[0291] This function is an addition function.
[0292] argument:
[0293] a (int): The first number to add
[0294] b (int): The second number to be added
[0295] Returns:
[0296] int: sum of a and b
[0297] def add(a, b):
[0298] Adds two arguments a and b and returns the result
[0299] return a + b
[0300] Calls the add function and stores the result in the result variable.
[0301] result = add(3, 4)
[0302] The contents of the variable result (addition result) are displayed on the standard output.
[0303] print(result)
[0304] In this way, the comments and feedback provided are adjusted appropriately according to the user's emotional state, which can more effectively promote understanding of the source code. By combining it with an emotion engine, we can expect to improve the user experience and further increase development efficiency.
[0305] The processing flow will be explained below.
[0306] Step 1:
[0307] Users launch the CodeXplain application and select the source code files they want to analyze. Users use a file browser to select the target files from local storage.
[0308] Step 2:
[0309] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[0310] Step 3:
[0311] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[0312] Step 4:
[0313] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[0314] Step 5:
[0315] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzing the relationships between them.
[0316] Step 6:
[0317] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[0318] Step 7:
[0319] The server inserts the generated comments into the source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[0320] Step 8:
[0321] The device collects the user's emotional state through a camera and microphone and transmits it to the emotion engine, which analyzes the collected data and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[0322] Step 9:
[0323] The server sends the commented source code to the user's device, and adjusts the granularity and format of the comments displayed based on the user's emotional state. For example, if the user is feeling stressed, the comments can be made more detailed to help the user understand the code.
[0324] Step 10:
[0325] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[0326] Step 11:
[0327] The user can review the displayed commented source code and, if necessary, edit the comments or enter additional information. User feedback will be used to improve the system.
[0328] To illustrate, consider the following Python code:
[0329] python
[0330] def add(a, b):
[0331] return a + b
[0332] result = add(3, 4)
[0333] print(result)
[0334] The analysis results from the above steps are as follows:
[0335] python
[0336] This function is an addition function.
[0337] argument:
[0338] a (int): The first number to add
[0339] b (int): The second number to be added
[0340] Returns:
[0341] int: sum of a and b
[0342] def add(a, b):
[0343] Adds two arguments a and b and returns the result
[0344] return a + b
[0345] Calls the add function and stores the result in the result variable.
[0346] result = add(3, 4)
[0347] The contents of the variable result (addition result) are displayed on the standard output.
[0348] print(result)
[0349] In this way, the system generates and adjusts comments taking into account the user's emotional state, helping users understand source code more efficiently. By combining it with an emotion engine, we can improve the user experience and further improve development efficiency.
[0350] Example 2
[0351] 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."
[0352] While conventional program analysis systems can analyze the structure and functionality of other people's programs, they lack the ability to effectively provide users with analysis results and automatically generate and insert annotations to aid understanding. Furthermore, they are unable to provide feedback that takes into account the user's emotional state, making it difficult to provide appropriate support when the user feels stressed or confused. Furthermore, there are insufficient means to use the feedback to improve the analysis model.
[0353] 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.
[0354] In this invention, the server includes means for reading other people's programs, means for analyzing the structure and function of the read program, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the program as annotations, means for collecting and analyzing the user's emotional state, means for adjusting the content of the annotations based on the emotional state, means for incorporating the adjusted annotations into the program, and means for collecting feedback from the user and using it to improve the analysis model. This makes it possible to deepen understanding of the program analysis results, provide appropriate support according to the user's emotional state, and further improve the analysis model by utilizing the collected feedback.
[0355] "Others' Programs" refers to software code obtained from a different developer or other source.
[0356] "Loading means" refers to an interface that has the functionality to select a program file and import it into the system.
[0357] "Means of analysis" refers to the ability to understand the structure and function of a program and decipher the contents of the code using specific algorithms.
[0358] "Means for providing in real time" refers to communication and display functions for instantly displaying analyzed information on the user's terminal.
[0359] "Means for adding as annotations" refers to a function for inserting analyzed information into appropriate positions in program code, and for generating and adding annotations.
[0360] "Means for collecting and analyzing emotional states" refers to software and hardware for collecting emotional data from the user's facial expressions and voice through a camera or microphone and analyzing it.
[0361] "Means for tailoring annotation content" refers to algorithms for changing the level of detail and format of automatically generated annotations based on the user's emotional state.
[0362] "Means for incorporating into a program" refers to a function for inserting the generated annotations into source code and saving them as part of the original code.
[0363] "Means of collecting feedback and using it to improve the analysis model" refers to the process of collecting opinions and correction information provided by users and using that information to improve the system's analysis accuracy and emotion recognition capabilities.
[0364] MODE FOR CARRYING OUT THE INVENTION
[0365] This invention relates to a system that can read other people's programs, analyze their structure and functions, provide the analysis results to the user in real time, and add them as annotations to the program. In particular, this system incorporates an emotion engine that recognizes the user's emotions and provides optimal feedback according to the user's emotional state.
[0366] System configuration
[0367] The system consists of the following components:
[0368] 1. How to load other people's programs
[0369] 2. Means of analyzing the structure and function of loaded programs
[0370] 3. A means of providing analyzed information to users in real time
[0371] 4. A means of annotating programs with the analyzed information
[0372] 5. Means of collecting and analyzing the user's emotional state
[0373] 6. A means to tailor annotation content based on emotional state
[0374] 7. Means of incorporating coordinated annotations into programs
[0375] 8. How to collect user feedback and use it to improve the analytical model
[0376] Software and Hardware Configuration
[0377] software
[0378] Program analysis engine: Automatically recognizes the file format and programming language of the source code and performs syntax analysis.
[0379] Automatic comment generation algorithm: Generates appropriate annotations based on the analysis results.
[0380] Emotion engine: An algorithm that analyzes the user's emotional state from data collected through cameras and microphones.
[0381] Hardware
[0382] Server: Operates the program analysis engine, automatic comment generation algorithm, and emotion engine.
[0383] Terminal: Reads the code, sends it to the server, and receives the results. Equipped with a camera and microphone, it collects user emotional data.
[0384] Network: Carries out data communication between the terminal and the server.
[0385] System operation example
[0386] Loading the code
[0387] The user launches the application and selects the source code file they want to analyze. The device uploads the file to the server, and the upload progress is displayed to the user via a progress bar on the device.
[0388] Code Analysis
[0389] The server receives the uploaded source code files and queues them for analysis. The server's analysis engine automatically recognizes the file format and programming language of the source code and performs syntax analysis. It identifies function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc., and analyzes the relationships between them.
[0390] Creating and Inserting Comments
[0391] The server uses an automatic comment generation algorithm to generate appropriate annotations based on the analysis results. The annotations are then inserted into the source code at the appropriate locations, adjusting the content based on the granularity of the annotations (detailed or concise) preset by the user.
[0392] Emotion recognition by emotion engine
[0393] The device collects the user's emotional state through a camera and microphone and sends the data to the emotion engine on the server, which analyzes it and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[0394] Providing and adjusting results
[0395] The server transmits the annotated source code to the user's device, adjusting the granularity and format of the annotations displayed based on the user's emotional state. The device receives the annotated source code and displays it to the user. The user can then refer to the displayed annotated source code and modify or add annotations as needed.
[0396] References and Feedback
[0397] The user can review the annotated source code and, if necessary, modify the annotations or enter additional information. The server receives feedback from the user and uses it to improve the analysis model. This feedback is useful for improving the accuracy of the emotion engine and optimizing the analysis algorithm.
[0398] Specific examples
[0399] For example, if the following source code written in Python is entered:
[0400] python
[0401] def add(a, b):
[0402] return a + b
[0403] result = add(3, 4)
[0404] print(result)
[0405] The system performs the following analyses:
[0406] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[0407] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[0408] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[0409] Also, if the emotion engine detects that the user is stressed, it generates more detailed annotations:
[0410] This function is an addition function.
[0411] argument:
[0412] a (int): The first number to add
[0413] b (int): The second number to be added
[0414] Returns:
[0415] int: sum of a and b
[0416] def add(a, b):
[0417] Adds two arguments a and b and returns the result
[0418] return a + b
[0419] Calls the add function and stores the result in the result variable.
[0420] result = add(3, 4)
[0421] The contents of the variable result (addition result) are displayed on the standard output.
[0422] print(result)
[0423] By combining it with an emotion engine, we can expect to improve the user experience and further improve development efficiency.
[0424] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0425] Step 1:
[0426] The user launches the CodeXplain application and selects the source code file they want to analyze. The terminal uses a file browser to select the target file from local storage and uploads it to the server. The input is the source code file, and the output is the file uploaded to the server. The terminal displays the progress with a progress bar and notifies you when the upload is complete.
[0427] Step 2:
[0428] The server receives the uploaded source code file and adds it to the analysis queue. The input is the source code file uploaded from the terminal, and the output is the status of successful addition to the analysis queue. The server temporarily stores the source code file in storage.
[0429] Step 3:
[0430] The server's analysis engine retrieves source code files from the analysis queue. The input is the file registered in the analysis queue, and the output is the start of syntax analysis by the analysis engine. The analysis engine recognizes the file format and programming language and performs syntax analysis. Specifically, it identifies function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc., and analyzes the relationships between them.
[0431] Step 4:
[0432] The server uses an automatic comment generation algorithm to create appropriate annotations based on the analysis results. The input is the analysis results obtained from the analysis engine, and the output is the generated annotations. The server adjusts the content based on the granularity of the comments preset by the user to optimize the annotations.
[0433] Step 5:
[0434] The server inserts the generated annotations into the source code at the appropriate positions. The input is the automatically generated annotations and the original source code file, and the output is a new source code file with the annotations inserted. The server takes care to maintain the structure of the original code and ensure that the annotations are inserted at the appropriate positions.
[0435] Step 6:
[0436] The device collects the user's emotional state through a camera or microphone and sends it to the emotion engine. The input is the emotional data collected from the camera or microphone, and the output is the data sent to the emotion engine. The device continues to collect emotional data periodically.
[0437] Step 7:
[0438] The emotion engine on the server analyzes the collected data and identifies the user's emotional state. The input is the emotional data sent from the device, and the output is the emotional state (stress, confusion, satisfaction, etc.) resulting from the analysis. The emotion engine updates the analysis results in real time.
[0439] Step 8:
[0440] The server sends the annotated source code to the user's device. The input is the source code with annotations inserted and the analysis results of the emotion engine, and the output is the data sent to the user's device. Based on the emotional state, the granularity and format of the annotations displayed are adjusted. The device receives the sent data and displays the new source code to the user.
[0441] Step 9:
[0442] The user checks the displayed annotated source code and, if necessary, modifies the annotations or enters additional information. The input is the annotated source code and the user's modifications, and the output is the modified source code and the user's feedback. The modified source code is then sent from the terminal to the server.
[0443] Step 10:
[0444] The server receives feedback from users and uses it to improve the analysis model. The input is the feedback data sent by the user, and the output is updating and improving the analysis model. The feedback is used to improve the accuracy of the emotion engine and optimize the analysis algorithm.
[0445] The above specific processing steps enable efficient analysis of other people's programs, provision of annotations in a form that is easy for the user to understand, and optimal feedback according to the user's emotional state.
[0446] (Application example 2)
[0447] 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."
[0448] Existing program analysis systems do not take into account the user's emotions when analyzing other people's programs, making it difficult to reduce user stress and confusion. Furthermore, when providing analysis information in real time and adding comments to programs, the granularity of the comments cannot be adjusted based on the user's emotional state. This results in analysis results that are not provided in an optimal format for the user, making it time-consuming to understand and correct the results.
[0449] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes: means for loading a program of another person; means for analyzing the structure and function of the loaded program; means for providing the analyzed information to the user in real time; means for adding the analyzed information to the program as a comment; means including a camera or microphone used to collect emotion recognition data; means for adjusting the granularity of the analysis result comments based on the user's emotional state using an emotion engine; and means for displaying the analysis results and the generated comments on a display device. This enables program analysis and feedback adapted to the user's emotional state, improving the user's understanding efficiency and facilitating development.
[0450] "Other people's programs" are source code or software created by another developer that you do not own.
[0451] "Structure" refers to the integrated arrangement and relationships of function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc. within a program.
[0452] "Function" refers to the specific actions that a program performs and the logic involved in those actions.
[0453] "Real-time" refers to the quality of providing results or information immediately after a specific action or event occurs.
[0454] A "comment" is text inserted as an annotation within a program to explain the program's behavior or intent.
[0455] "Emotion recognition data" is data that indicates the user's emotional state, and is analyzed from facial expressions and voice information collected through a camera or microphone.
[0456] "Camera or microphone" refers to a device for recording video and audio and providing input data to the emotion recognition engine.
[0457] An "emotion engine" is a software or hardware module that analyzes collected emotion recognition data and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[0458] The "display device" is a display device that visually presents the analysis results and generated comments to the user.
[0459] "Granularity of analysis result comments" refers to the detail and conciseness of the generated comments, which are adjusted to facilitate user understanding.
[0460] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the program as comments. In particular, this system has an added emotion engine that recognizes the user's emotions, and is characterized by providing optimal feedback according to the user's emotional state.
[0461] System Overview
[0462] This system consists of the following elements:
[0463] A means of loading other people's programs
[0464] A means of analyzing the structure and functionality of loaded programs
[0465] A means of providing analyzed information to users in real time
[0466] A means of adding parsed information to programs as comments
[0467] Cameras or microphones used to collect emotion recognition data
[0468] Emotion Engine
[0469] Display device
[0470] Explanation of program processing procedures
[0471] The server first loads the program specified by the user. The structure and function of the loaded program are analyzed. The analysis results are provided to the user in real time and, if necessary, are added as comments to the program. The user's emotional state is analyzed through a camera or microphone used to collect emotion recognition data, and the emotion engine determines the optimal granularity of the comments. The analysis results and generated comments are finally displayed on a display device.
[0472] Hardware and software used
[0473] Hardware: Smart glasses, local PC, camera (mounted on smart glasses), microphone
[0474] Software: OpenCV (for camera capture), EmotionRecognizer library (for emotion recognition), CodeAnalyzer (for program analysis)
[0475] Data processing and calculation
[0476] User emotion recognition data is collected through a camera or microphone and analyzed by the EmotionRecognizer library. The program code is analyzed by CodeAnalyzer, and the emotion engine determines the granularity of the generated comments based on the results. The results of this series of processes are displayed in real time on a display device. This allows the program's analysis results to be presented in a format that corresponds to the user's emotional state, facilitating user understanding.
[0477] Specific examples
[0478] The following are some specific examples of how this system can be used:
[0479] Prompt Sentence Examples
[0480] Generate feedback based on the code analysis results and the user's emotions. Analyze the following code and add detailed comments if the user is in a stressed state, or a concise comment if the user is not.
[0481] code:
[0482] def move_forward(steps):
[0483] for i in range(steps):
[0484] perform_step()
[0485] emotion: stressed
[0486] Analysis results and feedback
[0487] "This function moves the robot forward.
[0488] argument:
[0489] steps (int): number of steps to move forward
[0490] def move_forward(steps):
[0491] Repeat forward steps using a loop
[0492] for i in range(steps):
[0493] Calls a function to perform a step
[0494] perform_step()
[0495] In this way, program analysis and feedback that adapts to the user's emotional state becomes possible, improving the efficiency of user understanding and facilitating smoother development.
[0496] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0497] Step 1:
[0498] The terminal loads the program file specified by the user. Specifically, the user selects the source code file to be analyzed from the local storage, and the terminal uploads the file to the server. The input is the source code file, and the output is the source code file temporarily stored on the server.
[0499] Step 2:
[0500] The server receives the uploaded source code files and places them in an analysis queue. The server's analysis engine takes the source code files from the queue and analyzes the structure and functionality of the source code. It performs syntax analysis to identify function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzes the relationships between them. The input is the source code files stored on the server, and the output is the analysis results.
[0501] Step 3:
[0502] The device collects the user's emotion recognition data. It uses a camera or microphone installed on the device to collect the user's facial expression and voice data. The input is the user's facial expression and voice data, and the output is emotion recognition data.
[0503] Step 4:
[0504] The server's emotion engine analyzes the collected emotion recognition data. It uses the EmotionRecognizer library to identify the user's emotional state, distinguishing between stress, confusion, and satisfaction. The input is the emotion recognition data, and the output is the user's emotional state.
[0505] Step 5:
[0506] The server determines the granularity of the feedback based on the emotion engine's analysis results, depending on the user's emotional state. For example, if the emotion engine determines that the user is in a stressful state, it will provide more detailed feedback. The input is the user's emotional state and the results of source code analysis, and the output is comments with adjusted granularity.
[0507] Step 6:
[0508] The server inserts the generated comments into the appropriate positions in the source code to generate new commented source code. It takes care to maintain the structure of the original code and insert comments into the appropriate positions. The input is granular comments and the source code analysis results, and the output is commented source code.
[0509] Step 7:
[0510] The terminal receives the commented source code and displays it to the user. Feedback is displayed on the display device of the smart glasses, allowing the user to check the analysis results hands-free. The input is the commented source code, and the output is the feedback displayed on the display.
[0511] 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.
[0512] 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.
[0513] 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.
[0514] [Second embodiment]
[0515] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0516] 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.
[0517] 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).
[0518] 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.
[0519] 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.
[0520] 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).
[0521] 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.
[0522] 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.
[0523] 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.
[0524] 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.
[0525] 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.
[0526] 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."
[0527] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the programs as comments. This system aims to help software developers quickly understand other people's code and to make learning new technologies and algorithms more efficient.
[0528] System Overview
[0529] This system consists of the following elements:
[0530] A means of loading other people's programs
[0531] A means of analyzing the structure and functionality of loaded programs
[0532] A means of providing analyzed information to users in real time
[0533] A means of adding parsed information to programs as comments
[0534] A way to control the granularity of comments
[0535] A way to analyze complex directory structures
[0536] Program processing explanation
[0537] 1. Loading the code
[0538] The user launches the CodeXplain application and selects the source code file they want to analyze.
[0539] The terminal uploads the selected source code file to the server.
[0540] 2. Code Analysis
[0541] The server receives the uploaded source code files.
[0542] The server's analysis engine identifies various elements in the source code (functions, classes, variables, conditional branches, loops, etc.) and analyzes their relationships.
[0543] The analysis engine generates analysis results to clarify the roles and functions of the identified elements.
[0544] 3. Creating and Inserting Comments
[0545] The server generates an appropriate comment based on the analysis results.
[0546] The generated comments are adjusted to the granularity (level of detail) of the comments specified by the user.
[0547] The server inserts the generated comments into the source code at the appropriate positions to create new commented source code.
[0548] 4. Providing results
[0549] The server transmits the commented source code to the user's terminal.
[0550] The terminal displays the transmitted commented source code to the user.
[0551] 5. References and Feedback
[0552] The user can check the displayed commented source code, and can modify the comment content or enter additional information as necessary.
[0553] The server receives feedback from users and uses it to improve the analytical model.
[0554] Specific example explanation
[0555] For example, if the following source code written in Python is entered:
[0556] python
[0557] def add(a, b):
[0558] return a + b
[0559] result = add(3, 4)
[0560] print(result)
[0561] The system performs the following analyses:
[0562] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[0563] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[0564] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[0565] The commented source code generated based on the analysis results is as follows:
[0566] python
[0567] Addition function
[0568] def add(a, b):
[0569] Returns the sum of a and b
[0570] return a + b
[0571] Call the add function and store the result in result
[0572] result = add(3, 4)
[0573] Output the result
[0574] print(result)
[0575] In this way, users can quickly understand the functionality of the code by using commented source code, which is particularly useful for beginners and when reviewing code written by others, and contributes to improving development efficiency.
[0576] The processing flow will be explained below.
[0577] Step 1:
[0578] Users launch the CodeXplain application and select the source code files they want to analyze by using a file browser to select the files from local storage.
[0579] Step 2:
[0580] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[0581] Step 3:
[0582] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[0583] Step 4:
[0584] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[0585] Step 5:
[0586] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzing the relationships between them.
[0587] Step 6:
[0588] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[0589] Step 7:
[0590] The server inserts the generated comments into the original source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[0591] Step 8:
[0592] The server transmits the commented source code to the user's device using a security protocol to ensure data integrity and confidentiality.
[0593] Step 9:
[0594] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[0595] Step 10:
[0596] Users can then provide feedback to the server with corrections and additional comments, which will be used to improve and optimize the analysis model in the future.
[0597] Through these steps, the CodeXplain system is able to quickly analyze other people's code and present its structure and functionality to users in an easy-to-understand manner.
[0598] Example 1
[0599] 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."
[0600] Efficiently understanding code written by others is an important challenge in software development. However, understanding code from scratch, which contains complex structures and many functions and classes, takes time and effort. Furthermore, conventional code reading makes it difficult to accurately grasp the code's function and role, and there is a risk of misunderstanding. Furthermore, even in team development, if other people's code lacks appropriate comments, maintaining and modifying the code becomes difficult. New technical methods are needed to solve these challenges.
[0601] 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.
[0602] In this invention, the server includes means for loading other people's programs, means for analyzing the structure and function of the loaded programs, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the program as comments, means for the user to select a code file to be analyzed and upload it from their terminal to the server, means for tokenizing the code received by the server using an analysis engine and performing syntax analysis, means for generating appropriate comments based on the analysis results and inserting the comments into the code, means for sending the commented source code to their terminal and displaying it to the user, and means for collecting feedback from users and using it to improve the analysis model. This makes it possible to quickly and accurately understand other people's code and significantly improve the efficiency of software development.
[0603] "Means for loading other people's programs" refers to a mechanism for incorporating source code files created by other people into the system in a specified manner.
[0604] "Means for analyzing the structure and function of a program" refers to a mechanism that performs processing to identify and understand each element of the loaded source code (functions, classes, variables, etc.), their relationships, and their roles.
[0605] "Means for providing analyzed information to users in real time" refers to a function for instantly obtaining the analysis results and instantly presenting them to the user.
[0606] The "means for adding analyzed information to a program as a comment" is a mechanism for generating appropriate comments based on the analyzed information and inserting the comments at appropriate positions in the original source code.
[0607] "Means for users to select code files to be analyzed and upload them from their devices to the server" refers to a mechanism whereby a user specifies the source code to be analyzed and sends that code from the user's device to the server.
[0608] "Means for tokenizing the code received by the server using an analysis engine and performing syntactic analysis" refers to a mechanism for dividing the source code received by the server into syntactic units using an analysis engine, and understanding the structure and meaning of the source code.
[0609] "Means for generating appropriate comments based on the analysis results and inserting the comments into the code" refers to a mechanism for adding comments generated based on the analyzed information to appropriate locations in the source code.
[0610] The "means for transmitting source code with comments to a terminal and displaying it to a user" is a mechanism for transmitting source code with added comments to a user's terminal and displaying it to the user.
[0611] "Means for collecting feedback from users and using it to improve the analysis model" refers to a mechanism for collecting comments and suggestions for corrections provided by users and using that information to improve the performance and accuracy of the analysis system.
[0612] This invention relates to a system that allows users to quickly and accurately understand programs written by others. In particular, it aims to analyze source code, provide analysis results in real time, and insert the analysis results into the code as appropriate comments.
[0613] This system consists of the following elements:
[0614] 1. A means of loading other people's programs: A function that allows users to select the source code they want to analyze and upload it to the server from their terminal. Specifically, users use the CodeXplain application to select the source code file and send an analysis request.
[0615] 2. A means for analyzing the structure and function of the loaded program: The server uses an analysis engine to tokenize and parse the source code received. The analysis engine identifies the roles and relationships of specific elements (functions, classes, variables, etc.). This analysis engine supports common programming languages (e.g., Python, Java, etc.).
[0616] 3. Means of providing analyzed information to users in real time: The server immediately generates the analysis results and provides them to users in real time. The analysis results are displayed using visualization tools or other methods in a format that users can easily understand.
[0617] 4. A means to add analyzed information to programs as comments: The server generates appropriate comments based on the analysis results and inserts them into the code to make it easier for users to understand. The level of detail of the comments can be adjusted according to the granularity specified by the user.
[0618] 5. A means for selecting the code file to be analyzed and uploading it from the terminal to the server: The system has a function that allows the user to select the code file to be analyzed and securely upload it to the server. This means encrypts and transfers data securely using the HTTPS protocol.
[0619] 6. The server uses an analysis engine to tokenize and parse the code it receives: The server has the ability to break down source code into tokens and perform syntax analysis. This clarifies the roles and relationships of each element in the code.
[0620] 7. Means for generating appropriate comments based on the analysis results and inserting the comments into the code: The server generates appropriate comments based on the analysis results and inserts them into the code at predetermined positions. The generated comments help the user understand the code.
[0621] 8. Means for sending commented source code to the terminal and displaying it to the user: The server sends the commented source code to the terminal, and the terminal displays it. The user can check the displayed commented source code and understand its contents.
[0622] 9. A means of collecting user feedback and using it to improve the analysis model: Users provide the system with comments and feedback on the analysis results. The server uses this information to improve the analysis model and generate more accurate analysis results.
[0623] Specific example explanation
[0624] For example, if the following Python code is entered:
[0625] def multiply(a, b):
[0626] return ab
[0627] result = multiply(5, 7)
[0628] print(result)
[0629] When our system analyzes this code, it generates the following commented source code:
[0630] Multiplication function
[0631] def multiply(a, b):
[0632] Returns the product of a and b
[0633] return ab
[0634] Call the multiply function and store the result in result
[0635] result = multiply(5, 7)
[0636] Output the result
[0637] print(result)
[0638] Prompt Sentence Examples
[0639] Input to the system is written as a prompt sentence like this:
[0640] Analyze this Python code and add your comments:
[0641] And include the following code:
[0642] def multiply(a, b):
[0643] return ab
[0644] result = multiply(5, 7)
[0645] print(result)
[0646] This allows the server to generate commented source code based on the input code and provide it to the user.
[0647] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0648] Step 1: Select and enter your code
[0649] The user launches the CodeXplain application and selects the source code file to be analyzed. Specifically, the user clicks the "Select File" button and selects the source code file to be analyzed.
[0650] Input: The source code file to be analyzed
[0651] Output: The path of the selected source code file.
[0652] Step 2: Upload the code
[0653] The device will upload the source code files selected by the user to the server, with a progress bar indicating the progress during the upload and a notification displayed to the user once the upload is complete.
[0654] Input: The path of the source code file selected in step 1
[0655] Output: Source code files uploaded to the server
[0656] Step 3: Receive the code and start analyzing
[0657] The server receives the uploaded source code file, after which the parsing engine breaks the source code into tokens and begins parsing it.
[0658] Input: Uploaded source code file
[0659] Output: Tokenized source code
[0660] Step 4: Analyzing the code structure and functionality
[0661] The server's analysis engine identifies various elements (functions, classes, variables, etc.) based on the tokenized source code and analyzes their relationships. The analysis engine generates analysis results to clarify roles and functions.
[0662] Input: Tokenized source code
[0663] Output: Analysis results (roles and relationships of each element)
[0664] Step 5: Generate comments
[0665] The server generates appropriate comments based on the analysis results, adjusting the level of detail of the comments to match the granularity of the comments specified by the user.
[0666] Input: Analysis results (roles and relationships of each element)
[0667] Output: Generated comments
[0668] Step 6: Inserting comments
[0669] The server inserts the generated comments into the source code at appropriate positions to create commented source code.
[0670] Input: Generated comments, original source code
[0671] Output: Commented source code
[0672] Step 7: Delivering results
[0673] The server transmits the commented source code to the user's terminal, which displays the received commented source code to the user.
[0674] Input: Commented source code
[0675] Output: Commented source code displayed in terminal.
[0676] Step 8: Gather feedback and improve the model
[0677] The user can review the displayed commented source code, modify the comments as necessary, and enter feedback. The server receives this feedback and uses it to improve the analysis model.
[0678] Input: User feedback
[0679] Output: Improved analytical model
[0680] (Application example 1)
[0681] 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."
[0682] Quickly understanding and efficiently reviewing someone else's code is extremely difficult, especially with large code bases. In fields like content distribution services, program quality and stability are essential, making accurate code analysis necessary. However, traditional methods rely on manual analysis, which is time-consuming and labor-intensive, and prone to errors. Furthermore, adding and generating comments can be time-consuming, hindering program comprehension.
[0683] 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.
[0684] In this invention, the server includes means for loading other people's programs, means for analyzing the structure and function of the loaded programs, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the programs as comments, means for uploading the programs from a mobile terminal, means for analyzing the programs on the server and returning the results to the terminal, and means for generating comments using a generative AI model. This allows users to easily upload other people's code using their mobile terminals and receive source code with comments that reflect the results of real-time analysis on the server.
[0685] "Third Party Programs" means software code created by a third party.
[0686] "Structural and functional analysis" means investigating the internal structure and operation of a program and clarifying the relationships between each element and function.
[0687] "Providing to the user in real time" means providing the analyzed information to the user immediately so that the user can check it without any time delay.
[0688] "Adding as a comment to the program" means inserting the analyzed information as explanatory text at an appropriate location in the program.
[0689] A "mobile device" is a portable computing device such as a smartphone or tablet.
[0690] A "server" is a central computer that provides services to other computers over a network.
[0691] A "generative AI model" is a mathematical model that uses artificial intelligence to generate appropriate comments and explanations from data.
[0692] "Uploading" means transferring data from a local terminal to a remote server via a network.
[0693] "Returning the analysis results to the terminal" means sending the analysis results processed by the server back to the user's mobile terminal.
[0694] The present invention provides a system for quickly and efficiently understanding other people's programs, particularly by linking a user's mobile device with a server. It also uses a generative AI model to automatically generate comments to aid in understanding the program. A specific embodiment of this system is described below.
[0695] System configuration
[0696] The system consists of the following elements:
[0697] Mobile device: A smartphone or tablet device owned by a user.
[0698] Server: A computer that processes data in cooperation with mobile devices via a network.
[0699] Generative AI model: A model that uses artificial intelligence to generate appropriate comments and explanations from data.
[0700] Program processing
[0701] 1. Loading and uploading other people's programs
[0702] A user launches an application on a mobile device, selects the source code file they want to analyze, and then uploads the program file from the mobile device to the server. The hardware used in this stage is a smartphone or tablet, and the software is the application on the device (e.g., an iOS or Android app).
[0703] 2. Program Analysis
[0704] The server analyzes the received source code files. This analysis uses Python's Abstract Syntax Tree (AST) module to identify various elements (functions, classes, variables, etc.) and analyze their relationships. Furthermore, a generative AI model is used to generate appropriate comments based on the analysis results. A Python script is used as the analysis engine for this step. The server can also utilize cloud infrastructure such as AWS EC2.
[0705] 3. Creating and Inserting Comments
[0706] The comments created by the generative AI model are inserted into the source code at the appropriate locations by the server, generating new commented source code, which is then immediately sent back to the mobile device.
[0707] 4. Providing results
[0708] The mobile device receives the commented source code from the server and displays it to the user, who can review it and make any necessary modifications. The hardware used at this stage is a smartphone or tablet, and a display application is used.
[0709] Specific examples
[0710] For example, if the following Python code is entered:
[0711] python
[0712] def greet(name):
[0713] print(f'Hello, {name}!')
[0714] greet('Alice')
[0715] Example prompt sentence:
[0716] "Analyze the following code and add comments for function definitions and calls."
[0717] Generated commented code:
[0718] python
[0719] The greet function has the following roles:
[0720] def greet(name):
[0721] print(f'Hello, {name}!')
[0722] The function greet was called
[0723] greet('Alice')
[0724] In this way, users can easily analyze other people's code from their mobile devices and add comments in an easy-to-understand format, which is expected to improve development efficiency by enabling quicker code review and understanding.
[0725] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0726] Step 1:
[0727] A user launches the application on their mobile device and selects the source code file they want to analyze, which inputs the source code file. The device then creates a request to upload this file to the server. This request includes the user's identifying information along with the source code file itself.
[0728] Step 2:
[0729] The terminal sends the created request to the server, which receives it. The server temporarily stores the received source code file and begins the process of analyzing its structure and functionality. At this stage, the server uses Python's Abstract Syntax Tree (AST) module to analyze the source code. The input for the analysis is the source code file, and the output is a list of various elements in the source code (functions, classes, variables, etc.).
[0730] Step 3:
[0731] The server uses a generative AI model to generate comments about the role and function of each element identified in the analysis results. The input here is a list of AST analysis results, and the output is appropriate comments generated by the generative AI model. The generated comments are based on the analysis results, so they help users understand the code.
[0732] Step 4:
[0733] The server inserts the generated comments into the corresponding positions in the source code to generate new commented source code. The input is the original source code and the generated comments, and the output is the source code with the inserted comments. After the server finishes this process, it temporarily saves the newly generated commented source code.
[0734] Step 5:
[0735] The server generates a request to return the commented source code to the terminal, and identifies the destination by referring to the request information from the user. The input is the commented source code and the user's identification information, and the output is an HTTP response to the terminal.
[0736] Step 6:
[0737] The terminal analyzes the commented source code received from the server and displays it to the user. The input is the HTTP response from the server, and the output is the source code displayed to the user. The user can review this and modify the comment content as necessary.
[0738] Step 7:
[0739] If the user corrects the comment, the terminal uploads the corrected source code to the server again and sends it as feedback, which allows the server to obtain data to improve the analysis model. The input is the source code corrected by the user, and the output is the feedback information sent to the server.
[0740] 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.
[0741] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the program as comments. In particular, this system has an added emotion engine that recognizes the user's emotions, and is characterized by providing optimal feedback according to the user's emotional state.
[0742] System Overview
[0743] This system consists of the following elements:
[0744] A means of loading other people's programs
[0745] A means of analyzing the structure and functionality of loaded programs
[0746] A means of providing analyzed information to users in real time
[0747] A means of adding parsed information to programs as comments
[0748] A way to control the granularity of comments
[0749] A way to analyze complex directory structures
[0750] Emotion engine that recognizes user emotions
[0751] Program processing explanation
[0752] 1. Loading the code
[0753] Users launch the CodeXplain application and select the source code files they want to analyze. Users use a file browser to select the target files from local storage.
[0754] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[0755] 2. Code Analysis
[0756] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[0757] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[0758] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and uses, conditional branches, loop structures, etc., and analyzing the relationships between them.
[0759] 3. Creating and Inserting Comments
[0760] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[0761] The server inserts the generated comments into the source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[0762] 4. Emotion Recognition by Emotion Engine
[0763] The terminal collects the user's emotional state through a camera and microphone and transmits it to the emotion engine.
[0764] The server's emotion engine analyzes the collected data and identifies the user's emotional state (e.g., stress, confusion, contentment).
[0765] 5. Providing and adjusting results
[0766] The server sends the commented source code to the user's device, and adjusts the granularity and format of the comments displayed based on the user's emotional state. For example, if the user is feeling stressed, the comments will be more detailed to help the user understand.
[0767] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[0768] 6. References and Feedback
[0769] The user can check the displayed commented source code, and can modify the comment content or enter additional information as necessary.
[0770] The server receives feedback from users and uses it to improve the analysis model. This feedback is useful for improving the accuracy of the emotion engine and optimizing the analysis algorithm.
[0771] Specific example explanation
[0772] For example, if the following source code written in Python is entered:
[0773] python
[0774] def add(a, b):
[0775] return a + b
[0776] result = add(3, 4)
[0777] print(result)
[0778] The system performs the following analyses:
[0779] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[0780] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[0781] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[0782] Also, if the emotion engine detects that the user is stressed, it will generate a more detailed comment:
[0783] python
[0784] This function is an addition function.
[0785] argument:
[0786] a (int): The first number to add
[0787] b (int): The second number to be added
[0788] Returns:
[0789] int: sum of a and b
[0790] def add(a, b):
[0791] Adds two arguments a and b and returns the result
[0792] return a + b
[0793] Calls the add function and stores the result in the result variable.
[0794] result = add(3, 4)
[0795] The contents of the variable result (addition result) are displayed on the standard output.
[0796] print(result)
[0797] In this way, the comments and feedback provided are adjusted appropriately according to the user's emotional state, which can more effectively promote understanding of the source code. By combining it with an emotion engine, we can expect to improve the user experience and further increase development efficiency.
[0798] The processing flow will be explained below.
[0799] Step 1:
[0800] Users launch the CodeXplain application and select the source code files they want to analyze. They use a file browser to select the files from their local storage.
[0801] Step 2:
[0802] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[0803] Step 3:
[0804] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[0805] Step 4:
[0806] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[0807] Step 5:
[0808] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzing the relationships between them.
[0809] Step 6:
[0810] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[0811] Step 7:
[0812] The server inserts the generated comments into the source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[0813] Step 8:
[0814] The device collects the user's emotional state through a camera and microphone and transmits it to the emotion engine, which analyzes the collected data and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[0815] Step 9:
[0816] The server sends the commented source code to the user's device, and adjusts the granularity and format of the comments displayed based on the user's emotional state. For example, if the user is feeling stressed, the comments can be made more detailed to help the user understand the code.
[0817] Step 10:
[0818] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[0819] Step 11:
[0820] The user can review the displayed commented source code and, if necessary, edit the comments or enter additional information. User feedback will be used to improve the system.
[0821] To illustrate, consider the following Python code:
[0822] python
[0823] def add(a, b):
[0824] return a + b
[0825] result = add(3, 4)
[0826] print(result)
[0827] The analysis results from the above steps are as follows:
[0828] python
[0829] This function is an addition function.
[0830] argument:
[0831] a (int): The first number to add
[0832] b (int): The second number to be added
[0833] Returns:
[0834] int: sum of a and b
[0835] def add(a, b):
[0836] Adds two arguments a and b and returns the result
[0837] return a + b
[0838] Calls the add function and stores the result in the result variable.
[0839] result = add(3, 4)
[0840] The contents of the variable result (addition result) are displayed on the standard output.
[0841] print(result)
[0842] In this way, the system generates and adjusts comments taking into account the user's emotional state, helping users understand source code more efficiently. By combining it with an emotion engine, we can improve the user experience and further improve development efficiency.
[0843] Example 2
[0844] 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."
[0845] While conventional program analysis systems can analyze the structure and functionality of other people's programs, they lack the ability to effectively provide users with analysis results and automatically generate and insert annotations to aid understanding. Furthermore, they are unable to provide feedback that takes into account the user's emotional state, making it difficult to provide appropriate support when the user feels stressed or confused. Furthermore, there are insufficient means to use the feedback to improve the analysis model.
[0846] 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.
[0847] In this invention, the server includes means for reading other people's programs, means for analyzing the structure and function of the read program, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the program as annotations, means for collecting and analyzing the user's emotional state, means for adjusting the content of the annotations based on the emotional state, means for incorporating the adjusted annotations into the program, and means for collecting feedback from the user and using it to improve the analysis model. This makes it possible to deepen understanding of the program analysis results, provide appropriate support according to the user's emotional state, and further improve the analysis model by utilizing the collected feedback.
[0848] "Others' Programs" refers to software code obtained from a different developer or other source.
[0849] "Loading means" refers to an interface that has the functionality to select a program file and import it into the system.
[0850] "Means of analysis" refers to the ability to understand the structure and function of a program and decipher the contents of the code using specific algorithms.
[0851] "Means for providing in real time" refers to communication and display functions for instantly displaying analyzed information on the user's terminal.
[0852] "Means for adding as annotations" refers to a function for inserting analyzed information into appropriate positions in program code, and for generating and adding annotations.
[0853] "Means for collecting and analyzing emotional states" refers to software and hardware for collecting emotional data from the user's facial expressions and voice through a camera or microphone and analyzing it.
[0854] "Means for tailoring annotation content" refers to algorithms for changing the level of detail and format of automatically generated annotations based on the user's emotional state.
[0855] "Means for incorporating into a program" refers to a function for inserting the generated annotations into source code and saving them as part of the original code.
[0856] "Means of collecting feedback and using it to improve the analysis model" refers to the process of collecting opinions and correction information provided by users and using that information to improve the system's analysis accuracy and emotion recognition capabilities.
[0857] MODE FOR CARRYING OUT THE INVENTION
[0858] This invention relates to a system that can read other people's programs, analyze their structure and functions, provide the analysis results to the user in real time, and add them as annotations to the program. In particular, this system incorporates an emotion engine that recognizes the user's emotions and provides optimal feedback according to the user's emotional state.
[0859] System configuration
[0860] The system consists of the following components:
[0861] 1. How to load other people's programs
[0862] 2. Means of analyzing the structure and function of loaded programs
[0863] 3. A means of providing analyzed information to users in real time
[0864] 4. A means of annotating programs with the analyzed information
[0865] 5. Means of collecting and analyzing the user's emotional state
[0866] 6. A means to tailor annotation content based on emotional state
[0867] 7. Means of incorporating coordinated annotations into programs
[0868] 8. How to collect user feedback and use it to improve the analytical model
[0869] Software and Hardware Configuration
[0870] software
[0871] Program analysis engine: Automatically recognizes the file format and programming language of the source code and performs syntax analysis.
[0872] Automatic comment generation algorithm: Generates appropriate annotations based on the analysis results.
[0873] Emotion engine: An algorithm that analyzes the user's emotional state from data collected through cameras and microphones.
[0874] Hardware
[0875] Server: Operates the program analysis engine, automatic comment generation algorithm, and emotion engine.
[0876] Terminal: Reads the code, sends it to the server, and receives the results. Equipped with a camera and microphone, it collects user emotional data.
[0877] Network: Carries out data communication between the terminal and the server.
[0878] System operation example
[0879] Loading the code
[0880] The user launches the application and selects the source code file they want to analyze. The device uploads the file to the server, and the upload progress is displayed to the user via a progress bar on the device.
[0881] Code Analysis
[0882] The server receives the uploaded source code files and places them in the analysis queue. The server's analysis engine automatically recognizes the file format and programming language of the source code and performs syntax analysis. It identifies function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc., and analyzes the relationships between them.
[0883] Creating and Inserting Comments
[0884] The server uses an automatic comment generation algorithm to generate appropriate annotations based on the analysis results. The annotations are then inserted into the source code at the appropriate locations, adjusting the content based on the granularity of the annotations (detailed or concise) preset by the user.
[0885] Emotion recognition by emotion engine
[0886] The device collects the user's emotional state through a camera and microphone and sends the data to the emotion engine on the server, which analyzes it and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[0887] Providing and adjusting results
[0888] The server transmits the annotated source code to the user's device, adjusting the granularity and format of the annotations displayed based on the user's emotional state. The device receives the annotated source code and displays it to the user. The user can then refer to the displayed annotated source code and modify or add annotations as needed.
[0889] References and Feedback
[0890] The user can review the annotated source code and, if necessary, modify the annotations or enter additional information. The server receives feedback from the user and uses it to improve the analysis model. This feedback is useful for improving the accuracy of the emotion engine and optimizing the analysis algorithm.
[0891] Specific examples
[0892] For example, if the following source code written in Python is entered:
[0893] python
[0894] def add(a, b):
[0895] return a + b
[0896] result = add(3, 4)
[0897] print(result)
[0898] The system performs the following analyses:
[0899] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[0900] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[0901] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[0902] Also, if the emotion engine detects that the user is stressed, it generates more detailed annotations:
[0903] This function is an addition function.
[0904] argument:
[0905] a (int): The first number to add
[0906] b (int): The second number to be added
[0907] Returns:
[0908] int: sum of a and b
[0909] def add(a, b):
[0910] Adds two arguments a and b and returns the result
[0911] return a + b
[0912] Calls the add function and stores the result in the result variable.
[0913] result = add(3, 4)
[0914] The contents of the variable result (addition result) are displayed on the standard output.
[0915] print(result)
[0916] By combining it with an emotion engine, we can expect to improve the user experience and further improve development efficiency.
[0917] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0918] Step 1:
[0919] The user launches the CodeXplain application and selects the source code file they want to analyze. The terminal uses a file browser to select the target file from local storage and uploads it to the server. The input is the source code file, and the output is the file uploaded to the server. The terminal displays the progress with a progress bar and notifies you when the upload is complete.
[0920] Step 2:
[0921] The server receives the uploaded source code file and adds it to the analysis queue. The input is the source code file uploaded from the terminal, and the output is the status of successful addition to the analysis queue. The server temporarily stores the source code file in storage.
[0922] Step 3:
[0923] The server's analysis engine retrieves source code files from the analysis queue. The input is the file registered in the analysis queue, and the output is the start of syntax analysis by the analysis engine. The analysis engine recognizes the file format and programming language and performs syntax analysis. Specifically, it identifies function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc., and analyzes the relationships between them.
[0924] Step 4:
[0925] The server uses an automatic comment generation algorithm to create appropriate annotations based on the analysis results. The input is the analysis results obtained from the analysis engine, and the output is the generated annotations. The server adjusts the content based on the granularity of the comments preset by the user to optimize the annotations.
[0926] Step 5:
[0927] The server inserts the generated annotations into the source code at the appropriate positions. The input is the automatically generated annotations and the original source code file, and the output is a new source code file with the annotations inserted. The server takes care to maintain the structure of the original code and ensure that the annotations are inserted at the appropriate positions.
[0928] Step 6:
[0929] The device collects the user's emotional state through a camera or microphone and sends it to the emotion engine. The input is the emotional data collected from the camera or microphone, and the output is the data sent to the emotion engine. The device continues to collect emotional data periodically.
[0930] Step 7:
[0931] The emotion engine on the server analyzes the collected data and identifies the user's emotional state. The input is the emotional data sent from the device, and the output is the emotional state (stress, confusion, satisfaction, etc.) resulting from the analysis. The emotion engine updates the analysis results in real time.
[0932] Step 8:
[0933] The server sends the annotated source code to the user's device. The input is the source code with annotations inserted and the analysis results of the emotion engine, and the output is the data sent to the user's device. Based on the emotional state, the granularity and format of the annotations displayed are adjusted. The device receives the sent data and displays the new source code to the user.
[0934] Step 9:
[0935] The user checks the displayed annotated source code and, if necessary, modifies the annotations or enters additional information. The input is the annotated source code and the user's modifications, and the output is the modified source code and the user's feedback. The modified source code is then sent from the terminal to the server.
[0936] Step 10:
[0937] The server receives feedback from users and uses it to improve the analysis model. The input is the feedback data sent by the user, and the output is updating and improving the analysis model. The feedback is used to improve the accuracy of the emotion engine and optimize the analysis algorithm.
[0938] The above specific processing steps enable efficient analysis of other people's programs, provision of annotations in a form that is easy for the user to understand, and optimal feedback according to the user's emotional state.
[0939] (Application example 2)
[0940] 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."
[0941] Existing program analysis systems do not take into account the user's emotions when analyzing other people's programs, making it difficult to reduce user stress and confusion. Furthermore, when providing analysis information in real time and adding comments to programs, the granularity of the comments cannot be adjusted based on the user's emotional state. This results in analysis results that are not provided in an optimal format for the user, making it time-consuming to understand and correct the results.
[0942] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes: means for loading a program of another person; means for analyzing the structure and function of the loaded program; means for providing the analyzed information to the user in real time; means for adding the analyzed information to the program as a comment; means including a camera or microphone used to collect emotion recognition data; means for adjusting the granularity of the analysis result comments based on the user's emotional state using an emotion engine; and means for displaying the analysis results and the generated comments on a display device. This enables program analysis and feedback adapted to the user's emotional state, improving the user's understanding efficiency and facilitating development.
[0943] "Other people's programs" are source code or software created by another developer that you do not own.
[0944] "Structure" refers to the integrated arrangement and relationships of function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc. within a program.
[0945] "Function" refers to the specific actions that a program performs and the logic involved in those actions.
[0946] "Real-time" refers to the quality of providing results or information immediately after a specific action or event occurs.
[0947] A "comment" is text inserted as an annotation within a program to explain the program's behavior or intent.
[0948] "Emotion recognition data" is data that indicates the user's emotional state, and is analyzed from facial expressions and voice information collected through a camera or microphone.
[0949] "Camera or microphone" refers to a device for recording video and audio and providing input data to the emotion recognition engine.
[0950] An "emotion engine" is a software or hardware module that analyzes collected emotion recognition data and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[0951] The "display device" is a display device that visually presents the analysis results and generated comments to the user.
[0952] "Granularity of analysis result comments" refers to the detail and conciseness of the generated comments, which are adjusted to facilitate user understanding.
[0953] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the program as comments. In particular, this system has an added emotion engine that recognizes the user's emotions, and is characterized by providing optimal feedback according to the user's emotional state.
[0954] System Overview
[0955] This system consists of the following elements:
[0956] A means of loading other people's programs
[0957] A means of analyzing the structure and functionality of loaded programs
[0958] A means of providing analyzed information to users in real time
[0959] A means of adding parsed information to programs as comments
[0960] Cameras or microphones used to collect emotion recognition data
[0961] Emotion Engine
[0962] Display device
[0963] Explanation of program processing procedures
[0964] The server first loads the program specified by the user. The structure and function of the loaded program are analyzed. The analysis results are provided to the user in real time and, if necessary, are added as comments to the program. The user's emotional state is analyzed through a camera or microphone used to collect emotion recognition data, and the emotion engine determines the optimal granularity of the comments. The analysis results and generated comments are finally displayed on a display device.
[0965] Hardware and software used
[0966] Hardware: Smart glasses, local PC, camera (installed on smart glasses), microphone
[0967] Software: OpenCV (for camera capture), EmotionRecognizer library (for emotion recognition), CodeAnalyzer (for program analysis)
[0968] Data processing and calculation
[0969] User emotion recognition data is collected through a camera or microphone and analyzed by the EmotionRecognizer library. The program code is analyzed by CodeAnalyzer, and the emotion engine determines the granularity of the generated comments based on the results. The results of this series of processes are displayed in real time on a display device. This allows the program's analysis results to be presented in a format that corresponds to the user's emotional state, facilitating user understanding.
[0970] Specific examples
[0971] The following are some specific examples of how this system can be used:
[0972] Prompt Sentence Examples
[0973] Generate feedback based on the code analysis results and the user's emotions. Analyze the following code and add detailed comments if the user is in a stressed state, or a concise comment if the user is not.
[0974] code:
[0975] def move_forward(steps):
[0976] for i in range(steps):
[0977] perform_step()
[0978] emotion: stressed
[0979] Analysis results and feedback
[0980] "This function moves the robot forward.
[0981] argument:
[0982] steps (int): number of steps to move forward
[0983] def move_forward(steps):
[0984] Repeat forward steps using a loop
[0985] for i in range(steps):
[0986] Calls a function to perform a step
[0987] perform_step()
[0988] In this way, program analysis and feedback that adapts to the user's emotional state becomes possible, improving the efficiency of user understanding and facilitating smoother development.
[0989] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0990] Step 1:
[0991] The terminal loads the program file specified by the user. Specifically, the user selects the source code file to be analyzed from the local storage, and the terminal uploads the file to the server. The input is the source code file, and the output is the source code file temporarily stored on the server.
[0992] Step 2:
[0993] The server receives the uploaded source code files and places them in an analysis queue. The server's analysis engine takes the source code files from the queue and analyzes the structure and functionality of the source code. It performs syntax analysis to identify function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzes the relationships between them. The input is the source code files stored on the server, and the output is the analysis results.
[0994] Step 3:
[0995] The device collects the user's emotion recognition data. It uses a camera or microphone installed on the device to collect the user's facial expression and voice data. The input is the user's facial expression and voice data, and the output is emotion recognition data.
[0996] Step 4:
[0997] The server's emotion engine analyzes the collected emotion recognition data. It uses the EmotionRecognizer library to identify the user's emotional state, distinguishing between stress, confusion, and satisfaction. The input is the emotion recognition data, and the output is the user's emotional state.
[0998] Step 5:
[0999] The server determines the granularity of the feedback based on the emotion engine's analysis results, depending on the user's emotional state. For example, if the emotion engine determines that the user is in a stressful state, it will provide more detailed feedback. The input is the user's emotional state and the results of source code analysis, and the output is comments with adjusted granularity.
[1000] Step 6:
[1001] The server inserts the generated comments into the appropriate positions in the source code to generate new commented source code. It takes care to maintain the structure of the original code and insert comments into the appropriate positions. The input is granular comments and the source code analysis results, and the output is commented source code.
[1002] Step 7:
[1003] The terminal receives the commented source code and displays it to the user. Feedback is displayed on the display device of the smart glasses, allowing the user to check the analysis results hands-free. The input is the commented source code, and the output is the feedback displayed on the display.
[1004] 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.
[1005] 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.
[1006] 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.
[1007] [Third embodiment]
[1008] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[1009] 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.
[1010] 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).
[1011] 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.
[1012] 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.
[1013] 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).
[1014] 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.
[1015] 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.
[1016] 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.
[1017] 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.
[1018] 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.
[1019] 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."
[1020] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the results of the analysis to the user in real time, and adds them to the programs as comments. This system aims to help software developers quickly understand other people's code and to make learning new technologies and algorithms more efficient.
[1021] System Overview
[1022] This system consists of the following elements:
[1023] A means of loading other people's programs
[1024] A means of analyzing the structure and functionality of loaded programs
[1025] A means of providing analyzed information to users in real time
[1026] A means of adding parsed information to programs as comments
[1027] A way to control the granularity of comments
[1028] A way to analyze complex directory structures
[1029] Program processing explanation
[1030] 1. Loading the code
[1031] The user launches the CodeXplain application and selects the source code file they want to analyze.
[1032] The terminal uploads the selected source code file to the server.
[1033] 2. Code Analysis
[1034] The server receives the uploaded source code files.
[1035] The server's analysis engine identifies various elements in the source code (functions, classes, variables, conditional branches, loops, etc.) and analyzes their relationships.
[1036] The analysis engine generates analysis results to clarify the roles and functions of the identified elements.
[1037] 3. Creating and Inserting Comments
[1038] The server generates an appropriate comment based on the analysis results.
[1039] The generated comments are adjusted to the granularity (level of detail) of the comments specified by the user.
[1040] The server inserts the generated comments into the source code at the appropriate positions to create new commented source code.
[1041] 4. Providing results
[1042] The server transmits the commented source code to the user's terminal.
[1043] The terminal displays the transmitted commented source code to the user.
[1044] 5. References and Feedback
[1045] The user can check the displayed commented source code, and can modify the comment content or enter additional information as necessary.
[1046] The server receives feedback from users and uses it to improve the analytical model.
[1047] Specific example explanation
[1048] For example, if the following source code written in Python is entered:
[1049] python
[1050] def add(a, b):
[1051] return a + b
[1052] result = add(3, 4)
[1053] print(result)
[1054] The system performs the following analyses:
[1055] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[1056] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[1057] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[1058] The commented source code generated based on the analysis results is as follows:
[1059] python
[1060] Addition function
[1061] def add(a, b):
[1062] Returns the sum of a and b
[1063] return a + b
[1064] Call the add function and store the result in result
[1065] result = add(3, 4)
[1066] Output the result
[1067] print(result)
[1068] In this way, users can quickly understand the functionality of the code by using commented source code, which is particularly useful for beginners and when reviewing code written by others, and contributes to improving development efficiency.
[1069] The processing flow will be explained below.
[1070] Step 1:
[1071] Users launch the CodeXplain application and select the source code files they want to analyze by using a file browser to select the files from local storage.
[1072] Step 2:
[1073] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[1074] Step 3:
[1075] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[1076] Step 4:
[1077] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[1078] Step 5:
[1079] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzing the relationships between them.
[1080] Step 6:
[1081] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[1082] Step 7:
[1083] The server inserts the generated comments into the original source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[1084] Step 8:
[1085] The server transmits the commented source code to the user's terminal using a security protocol to ensure data integrity and confidentiality.
[1086] Step 9:
[1087] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[1088] Step 10:
[1089] Users can then provide feedback to the server with corrections and additional comments, which will be used to improve and optimize the analysis model in the future.
[1090] Through these steps, the CodeXplain system is able to quickly analyze other people's code and present its structure and functionality to users in an easy-to-understand manner.
[1091] Example 1
[1092] 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."
[1093] Efficiently understanding code written by others is an important challenge in software development. However, understanding code from scratch, which contains complex structures and many functions and classes, takes time and effort. Furthermore, conventional code reading makes it difficult to accurately grasp the code's function and role, and there is a risk of misunderstanding. Furthermore, even in team development, if other people's code lacks appropriate comments, maintaining and modifying the code becomes difficult. New technical methods are needed to solve these challenges.
[1094] 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.
[1095] In this invention, the server includes means for loading other people's programs, means for analyzing the structure and function of the loaded programs, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the program as comments, means for the user to select a code file to be analyzed and upload it from their terminal to the server, means for tokenizing the code received by the server using an analysis engine and performing syntax analysis, means for generating appropriate comments based on the analysis results and inserting the comments into the code, means for sending the commented source code to the terminal and displaying it to the user, and means for collecting feedback from users and using it to improve the analysis model. This makes it possible to quickly and accurately understand other people's code and significantly improve the efficiency of software development.
[1096] "Means for loading other people's programs" refers to a mechanism for incorporating source code files created by other people into the system in a specified manner.
[1097] "Means for analyzing the structure and function of a program" refers to a mechanism that performs processing to identify and understand each element of the loaded source code (functions, classes, variables, etc.), their relationships, and their roles.
[1098] "Means for providing analyzed information to users in real time" refers to a function for instantly obtaining the analysis results and instantly presenting them to the user.
[1099] The "means for adding analyzed information to a program as a comment" is a mechanism for generating appropriate comments based on the analyzed information and inserting the comments at appropriate positions in the original source code.
[1100] "Means for users to select code files to be analyzed and upload them from their devices to the server" refers to a mechanism whereby a user specifies the source code to be analyzed and sends that code from the user's device to the server.
[1101] "Means for tokenizing the code received by the server using an analysis engine and performing syntactic analysis" refers to a mechanism for dividing the source code received by the server into syntactic units using an analysis engine, and understanding the structure and meaning of the source code.
[1102] "Means for generating appropriate comments based on the analysis results and inserting the comments into the code" refers to a mechanism for adding comments generated based on the analyzed information to appropriate locations in the source code.
[1103] The "means for transmitting source code with comments to a terminal and displaying it to a user" is a mechanism for transmitting source code with added comments to a user's terminal and displaying it to the user.
[1104] "Means for collecting feedback from users and using it to improve the analysis model" refers to a mechanism for collecting comments and suggestions for corrections provided by users and using that information to improve the performance and accuracy of the analysis system.
[1105] This invention relates to a system that allows users to quickly and accurately understand programs written by others. In particular, it aims to analyze source code, provide analysis results in real time, and insert the analysis results into the code as appropriate comments.
[1106] This system consists of the following elements:
[1107] 1. A means of loading other people's programs: A function that allows users to select the source code they want to analyze and upload it to the server from their terminal. Specifically, users use the CodeXplain application to select the source code file and send an analysis request.
[1108] 2. A means for analyzing the structure and function of the loaded program: The server uses an analysis engine to tokenize and parse the source code received. The analysis engine identifies the roles and relationships of specific elements (functions, classes, variables, etc.). This analysis engine supports common programming languages (e.g., Python, Java, etc.).
[1109] 3. Means of providing analyzed information to users in real time: The server immediately generates the analysis results and provides them to users in real time. The analysis results are displayed using visualization tools or other methods in a format that users can easily understand.
[1110] 4. A means to add analyzed information to programs as comments: The server generates appropriate comments based on the analysis results and inserts them into the code to make it easier for users to understand. The level of detail of the comments can be adjusted according to the granularity specified by the user.
[1111] 5. A means for selecting the code file to be analyzed and uploading it from the terminal to the server: The system has a function that allows the user to select the code file to be analyzed and securely upload it to the server. This means encrypts and transfers data securely using the HTTPS protocol.
[1112] 6. The server uses an analysis engine to tokenize and parse the code it receives: The server has the ability to break down source code into tokens and perform syntax analysis. This clarifies the roles and relationships of each element in the code.
[1113] 7. Means for generating appropriate comments based on the analysis results and inserting the comments into the code: The server generates appropriate comments based on the analysis results and inserts them into the code at predetermined positions. The generated comments help the user understand the code.
[1114] 8. Means for sending commented source code to the terminal and displaying it to the user: The server sends the commented source code to the terminal, and the terminal displays it. The user can check the displayed commented source code and understand its contents.
[1115] 9. A means of collecting user feedback and using it to improve the analysis model: Users provide the system with comments and feedback on the analysis results. The server uses this information to improve the analysis model and generate more accurate analysis results.
[1116] Specific example explanation
[1117] For example, if the following Python code is entered:
[1118] def multiply(a, b):
[1119] return ab
[1120] result = multiply(5, 7)
[1121] print(result)
[1122] When our system analyzes this code, it generates the following commented source code:
[1123] Multiplication function
[1124] def multiply(a, b):
[1125] Returns the product of a and b
[1126] return ab
[1127] Call the multiply function and store the result in result
[1128] result = multiply(5, 7)
[1129] Output the result
[1130] print(result)
[1131] Prompt Sentence Examples
[1132] Input to the system is written as a prompt sentence like this:
[1133] Analyze this Python code and add your comments:
[1134] And include the following code:
[1135] def multiply(a, b):
[1136] return ab
[1137] result = multiply(5, 7)
[1138] print(result)
[1139] This allows the server to generate commented source code based on the input code and provide it to the user.
[1140] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1141] Step 1: Select and enter your code
[1142] The user launches the CodeXplain application and selects the source code file to be analyzed. Specifically, the user clicks the "Select File" button and selects the source code file to be analyzed.
[1143] Input: The source code file to be analyzed
[1144] Output: The path of the selected source code file.
[1145] Step 2: Upload the code
[1146] The device will upload the source code files selected by the user to the server, with a progress bar indicating the progress during the upload and a notification displayed to the user once the upload is complete.
[1147] Input: The path of the source code file selected in step 1
[1148] Output: Source code files uploaded to the server
[1149] Step 3: Receive the code and start analyzing
[1150] The server receives the uploaded source code file, after which the parsing engine breaks the source code into tokens and begins parsing it.
[1151] Input: Uploaded source code file
[1152] Output: Tokenized source code
[1153] Step 4: Analyzing the code structure and functionality
[1154] The server's analysis engine identifies various elements (functions, classes, variables, etc.) based on the tokenized source code and analyzes their relationships. The analysis engine generates analysis results to clarify roles and functions.
[1155] Input: Tokenized source code
[1156] Output: Analysis results (roles and relationships of each element)
[1157] Step 5: Generate comments
[1158] The server generates appropriate comments based on the analysis results, adjusting the level of detail of the comments to match the granularity of the comments specified by the user.
[1159] Input: Analysis results (roles and relationships of each element)
[1160] Output: Generated comments
[1161] Step 6: Inserting comments
[1162] The server inserts the generated comments into the source code at appropriate positions to create commented source code.
[1163] Input: Generated comments, original source code
[1164] Output: Commented source code
[1165] Step 7: Delivering results
[1166] The server transmits the commented source code to the user's terminal, which displays the received commented source code to the user.
[1167] Input: Commented source code
[1168] Output: Commented source code displayed in terminal.
[1169] Step 8: Gather feedback and improve the model
[1170] The user can review the displayed commented source code, modify the comments as necessary, and enter feedback. The server receives this feedback and uses it to improve the analysis model.
[1171] Input: User feedback
[1172] Output: Improved analytical model
[1173] (Application example 1)
[1174] 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."
[1175] Quickly understanding and efficiently reviewing someone else's code is extremely difficult, especially with large code bases. In fields like content distribution services, program quality and stability are essential, making accurate code analysis necessary. However, traditional methods rely on manual analysis, which is time-consuming and labor-intensive, and prone to errors. Furthermore, adding and generating comments can be time-consuming, hindering program comprehension.
[1176] 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.
[1177] In this invention, the server includes means for loading other people's programs, means for analyzing the structure and function of the loaded programs, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the programs as comments, means for uploading the programs from a mobile terminal, means for analyzing the programs on the server and returning the results to the terminal, and means for generating comments using a generative AI model. This allows users to easily upload other people's code using their mobile terminals and receive source code with comments that reflect the results of real-time analysis on the server.
[1178] "Third Party Programs" means software code created by a third party.
[1179] "Structural and functional analysis" means investigating the internal structure and operation of a program and clarifying the relationships between each element and function.
[1180] "Providing to the user in real time" means providing the analyzed information to the user immediately so that the user can check it without any time delay.
[1181] "Adding as a comment to the program" means inserting the analyzed information as explanatory text at an appropriate location in the program.
[1182] A "mobile device" is a portable computing device such as a smartphone or tablet.
[1183] A "server" is a central computer that provides services to other computers over a network.
[1184] A "generative AI model" is a mathematical model that uses artificial intelligence to generate appropriate comments and explanations from data.
[1185] "Uploading" means transferring data from a local terminal to a remote server via a network.
[1186] "Returning the analysis results to the terminal" means sending the analysis results processed by the server back to the user's mobile terminal.
[1187] The present invention provides a system for quickly and efficiently understanding other people's programs, particularly by linking a user's mobile device with a server. It also uses a generative AI model to automatically generate comments to aid in understanding the program. A specific embodiment of this system is described below.
[1188] System configuration
[1189] The system consists of the following elements:
[1190] Mobile device: A smartphone or tablet device owned by a user.
[1191] Server: A computer that processes data in cooperation with mobile devices via a network.
[1192] Generative AI model: A model that uses artificial intelligence to generate appropriate comments and explanations from data.
[1193] Program processing
[1194] 1. Loading and uploading other people's programs
[1195] A user launches an application on a mobile device, selects the source code file they want to analyze, and then uploads the program file from the mobile device to the server. The hardware used in this stage is a smartphone or tablet, and the software is the application on the device (e.g., an iOS or Android app).
[1196] 2. Program Analysis
[1197] The server analyzes the received source code files. This analysis uses Python's Abstract Syntax Tree (AST) module to identify various elements (functions, classes, variables, etc.) and analyze their relationships. Furthermore, a generative AI model is used to generate appropriate comments based on the analysis results. A Python script is used as the analysis engine for this step. The server can also utilize cloud infrastructure such as AWS EC2.
[1198] 3. Creating and Inserting Comments
[1199] The comments created by the generative AI model are inserted into the source code at the appropriate locations by the server, generating new commented source code, which is then immediately sent back to the mobile device.
[1200] 4. Providing results
[1201] The mobile device receives the commented source code from the server and displays it to the user, who can review it and make any necessary modifications. The hardware used at this stage is a smartphone or tablet, and a display application is used.
[1202] Specific examples
[1203] For example, if the following Python code is entered:
[1204] python
[1205] def greet(name):
[1206] print(f'Hello, {name}!')
[1207] greet('Alice')
[1208] Example prompt sentence:
[1209] "Analyze the following code and add comments for function definitions and calls."
[1210] Generated commented code:
[1211] python
[1212] The greet function has the following roles:
[1213] def greet(name):
[1214] print(f'Hello, {name}!')
[1215] The function greet was called
[1216] greet('Alice')
[1217] In this way, users can easily analyze other people's code from their mobile devices and add comments in an easy-to-understand format, which is expected to improve development efficiency by enabling quicker code review and understanding.
[1218] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1219] Step 1:
[1220] A user launches the application on their mobile device and selects the source code file they want to analyze, which inputs the source code file. The device then creates a request to upload this file to the server. This request includes the user's identifying information along with the source code file itself.
[1221] Step 2:
[1222] The terminal sends the created request to the server, which receives it. The server temporarily stores the received source code file and begins the process of analyzing its structure and functionality. At this stage, the server uses Python's Abstract Syntax Tree (AST) module to analyze the source code. The input for the analysis is the source code file, and the output is a list of various elements in the source code (functions, classes, variables, etc.).
[1223] Step 3:
[1224] The server uses a generative AI model to generate comments about the role and function of each element identified in the analysis results. The input here is a list of AST analysis results, and the output is appropriate comments generated by the generative AI model. The generated comments are based on the analysis results, so they help users understand the code.
[1225] Step 4:
[1226] The server inserts the generated comments into the corresponding positions in the source code to generate new commented source code. The input is the original source code and the generated comments, and the output is the source code with the inserted comments. After the server finishes this process, it temporarily saves the newly generated commented source code.
[1227] Step 5:
[1228] The server generates a request to return the commented source code to the terminal, and identifies the destination by referring to the request information from the user. The input is the commented source code and the user's identification information, and the output is an HTTP response to the terminal.
[1229] Step 6:
[1230] The terminal analyzes the commented source code received from the server and displays it to the user. The input is the HTTP response from the server, and the output is the source code displayed to the user. The user can review this and modify the comment content as necessary.
[1231] Step 7:
[1232] If the user corrects the comment, the terminal uploads the corrected source code to the server again and sends it as feedback, which allows the server to obtain data to improve the analysis model. The input is the source code corrected by the user, and the output is the feedback information sent to the server.
[1233] 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.
[1234] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the program as comments. In particular, this system has an added emotion engine that recognizes the user's emotions, and is characterized by providing optimal feedback according to the user's emotional state.
[1235] System Overview
[1236] This system consists of the following elements:
[1237] A means of loading other people's programs
[1238] A means of analyzing the structure and functionality of loaded programs
[1239] A means of providing analyzed information to users in real time
[1240] A means of adding parsed information to programs as comments
[1241] A way to control the granularity of comments
[1242] A way to analyze complex directory structures
[1243] Emotion engine that recognizes user emotions
[1244] Program processing explanation
[1245] 1. Loading the code
[1246] Users launch the CodeXplain application and select the source code files they want to analyze. They use a file browser to select the files from their local storage.
[1247] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[1248] 2. Code Analysis
[1249] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[1250] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[1251] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and uses, conditional branches, loop structures, etc., and analyzing the relationships between them.
[1252] 3. Creating and Inserting Comments
[1253] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[1254] The server inserts the generated comments into the source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[1255] 4. Emotion Recognition by Emotion Engine
[1256] The terminal collects the user's emotional state through a camera and microphone and transmits it to the emotion engine.
[1257] The server's emotion engine analyzes the collected data and identifies the user's emotional state (e.g., stress, confusion, contentment).
[1258] 5. Providing and adjusting results
[1259] The server sends the commented source code to the user's device, and adjusts the granularity and format of the comments displayed based on the user's emotional state. For example, if the user is feeling stressed, the comments will be more detailed to help the user understand.
[1260] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[1261] 6. References and Feedback
[1262] The user can check the displayed commented source code, and can modify the comment content or enter additional information as necessary.
[1263] The server receives feedback from users and uses it to improve the analysis model. This feedback is useful for improving the accuracy of the emotion engine and optimizing the analysis algorithm.
[1264] Specific example explanation
[1265] For example, if the following source code written in Python is entered:
[1266] python
[1267] def add(a, b):
[1268] return a + b
[1269] result = add(3, 4)
[1270] print(result)
[1271] The system performs the following analyses:
[1272] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[1273] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[1274] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[1275] Also, if the emotion engine detects that the user is stressed, it will generate a more detailed comment:
[1276] python
[1277] This function is an addition function.
[1278] argument:
[1279] a (int): The first number to add
[1280] b (int): The second number to be added
[1281] Returns:
[1282] int: sum of a and b
[1283] def add(a, b):
[1284] Adds two arguments a and b and returns the result
[1285] return a + b
[1286] Calls the add function and stores the result in the result variable.
[1287] result = add(3, 4)
[1288] The contents of the variable result (addition result) are displayed on the standard output.
[1289] print(result)
[1290] In this way, the comments and feedback provided are adjusted appropriately according to the user's emotional state, which can more effectively promote understanding of the source code. By combining it with an emotion engine, we can expect to improve the user experience and further increase development efficiency.
[1291] The processing flow will be explained below.
[1292] Step 1:
[1293] Users launch the CodeXplain application and select the source code files they want to analyze. Users use a file browser to select the target files from local storage.
[1294] Step 2:
[1295] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[1296] Step 3:
[1297] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[1298] Step 4:
[1299] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[1300] Step 5:
[1301] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzing the relationships between them.
[1302] Step 6:
[1303] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[1304] Step 7:
[1305] The server inserts the generated comments into the source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[1306] Step 8:
[1307] The device collects the user's emotional state through a camera and microphone and transmits it to the emotion engine, which analyzes the collected data and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[1308] Step 9:
[1309] The server sends the commented source code to the user's device, and adjusts the granularity and format of the comments displayed based on the user's emotional state. For example, if the user is feeling stressed, the comments can be made more detailed to help the user understand the code.
[1310] Step 10:
[1311] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[1312] Step 11:
[1313] The user can review the displayed commented source code and, if necessary, edit the comments or enter additional information. User feedback will be used to improve the system.
[1314] To illustrate, consider the following Python code:
[1315] python
[1316] def add(a, b):
[1317] return a + b
[1318] result = add(3, 4)
[1319] print(result)
[1320] The analysis results from the above steps are as follows:
[1321] python
[1322] This function is an addition function.
[1323] argument:
[1324] a (int): The first number to add
[1325] b (int): The second number to be added
[1326] Returns:
[1327] int: sum of a and b
[1328] def add(a, b):
[1329] Adds two arguments a and b and returns the result
[1330] return a + b
[1331] Calls the add function and stores the result in the result variable.
[1332] result = add(3, 4)
[1333] The contents of the variable result (addition result) are displayed on the standard output.
[1334] print(result)
[1335] In this way, the system generates and adjusts comments taking into account the user's emotional state, helping users understand source code more efficiently. By combining the emotion engine, we can improve the user experience and further improve development efficiency.
[1336] Example 2
[1337] 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."
[1338] While conventional program analysis systems can analyze the structure and functionality of other people's programs, they lack the ability to effectively provide users with analysis results and automatically generate and insert annotations to aid understanding. Furthermore, they are unable to provide feedback that takes into account the user's emotional state, making it difficult to provide appropriate support when the user feels stressed or confused. Furthermore, there are insufficient means to use the feedback to improve the analysis model.
[1339] 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.
[1340] In this invention, the server includes means for reading other people's programs, means for analyzing the structure and function of the read program, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the program as annotations, means for collecting and analyzing the user's emotional state, means for adjusting the content of the annotations based on the emotional state, means for incorporating the adjusted annotations into the program, and means for collecting feedback from the user and using it to improve the analysis model. This makes it possible to deepen understanding of the program analysis results, provide appropriate support according to the user's emotional state, and further improve the analysis model by utilizing the collected feedback.
[1341] "Others' Programs" refers to software code obtained from a different developer or other source.
[1342] "Loading means" refers to an interface that has the functionality to select a program file and import it into the system.
[1343] "Means of analysis" refers to the ability to understand the structure and function of a program and decipher the contents of the code using specific algorithms.
[1344] "Means for providing in real time" refers to communication and display functions for instantly displaying analyzed information on the user's terminal.
[1345] "Means for adding as annotations" refers to a function for inserting analyzed information into appropriate positions in program code, and for generating and adding annotations.
[1346] "Means for collecting and analyzing emotional states" refers to software and hardware for collecting emotional data from the user's facial expressions and voice through a camera or microphone and analyzing it.
[1347] "Means for tailoring annotation content" refers to algorithms for changing the level of detail and format of automatically generated annotations based on the user's emotional state.
[1348] "Means for incorporating into a program" refers to a function for inserting the generated annotations into source code and saving them as part of the original code.
[1349] "Means of collecting feedback and using it to improve the analysis model" refers to the process of collecting opinions and correction information provided by users and using that information to improve the system's analysis accuracy and emotion recognition capabilities.
[1350] MODE FOR CARRYING OUT THE INVENTION
[1351] This invention relates to a system that can read other people's programs, analyze their structure and functions, provide the analysis results to the user in real time, and add them as annotations to the program. In particular, this system incorporates an emotion engine that recognizes the user's emotions and provides optimal feedback according to the user's emotional state.
[1352] System configuration
[1353] The system consists of the following components:
[1354] 1. How to load other people's programs
[1355] 2. Means of analyzing the structure and function of loaded programs
[1356] 3. A means of providing analyzed information to users in real time
[1357] 4. A means of annotating programs with the analyzed information
[1358] 5. Means of collecting and analyzing the user's emotional state
[1359] 6. A means to tailor annotation content based on emotional state
[1360] 7. Means of incorporating coordinated annotations into programs
[1361] 8. How to collect user feedback and use it to improve the analytical model
[1362] Software and Hardware Configuration
[1363] software
[1364] Program analysis engine: Automatically recognizes the file format and programming language of the source code and performs syntax analysis.
[1365] Automatic comment generation algorithm: Generates appropriate annotations based on the analysis results.
[1366] Emotion engine: An algorithm that analyzes the user's emotional state from data collected through cameras and microphones.
[1367] Hardware
[1368] Server: Operates the program analysis engine, automatic comment generation algorithm, and emotion engine.
[1369] Terminal: Reads the code, sends it to the server, and receives the results. Equipped with a camera and microphone, it collects user emotional data.
[1370] Network: Carries out data communication between the terminal and the server.
[1371] System operation example
[1372] Loading the code
[1373] The user launches the application and selects the source code file they want to analyze. The device uploads the file to the server, and the upload progress is displayed to the user via a progress bar on the device.
[1374] Code Analysis
[1375] The server receives the uploaded source code files and places them in the analysis queue. The server's analysis engine automatically recognizes the file format and programming language of the source code and performs syntax analysis. It identifies function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc., and analyzes the relationships between them.
[1376] Creating and Inserting Comments
[1377] The server uses an automatic comment generation algorithm to generate appropriate annotations based on the analysis results. The annotations are then inserted into the source code at the appropriate locations, adjusting the content based on the granularity of the annotations (detailed or concise) preset by the user.
[1378] Emotion recognition by emotion engine
[1379] The device collects the user's emotional state through a camera and microphone and sends the data to the emotion engine on the server, which analyzes it and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[1380] Providing and adjusting results
[1381] The server transmits the annotated source code to the user's device, adjusting the granularity and format of the annotations displayed based on the user's emotional state. The device receives the annotated source code and displays it to the user. The user can then refer to the displayed annotated source code and modify or add annotations as needed.
[1382] References and Feedback
[1383] The user can review the annotated source code and, if necessary, modify the annotations or enter additional information. The server receives feedback from the user and uses it to improve the analysis model. This feedback is useful for improving the accuracy of the emotion engine and optimizing the analysis algorithm.
[1384] Specific examples
[1385] For example, if the following source code written in Python is entered:
[1386] python
[1387] def add(a, b):
[1388] return a + b
[1389] result = add(3, 4)
[1390] print(result)
[1391] The system performs the following analyses:
[1392] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[1393] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[1394] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[1395] Also, if the emotion engine detects that the user is stressed, it generates more detailed annotations:
[1396] This function is an addition function.
[1397] argument:
[1398] a (int): The first number to add
[1399] b (int): The second number to be added
[1400] Returns:
[1401] int: sum of a and b
[1402] def add(a, b):
[1403] Adds two arguments a and b and returns the result
[1404] return a + b
[1405] Calls the add function and stores the result in the result variable.
[1406] result = add(3, 4)
[1407] The contents of the variable result (addition result) are displayed on the standard output.
[1408] print(result)
[1409] By combining it with an emotion engine, we can expect to improve the user experience and further improve development efficiency.
[1410] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1411] Step 1:
[1412] The user launches the CodeXplain application and selects the source code file they want to analyze. The terminal uses a file browser to select the target file from local storage and uploads it to the server. The input is the source code file, and the output is the file uploaded to the server. The terminal displays the progress with a progress bar and notifies you when the upload is complete.
[1413] Step 2:
[1414] The server receives the uploaded source code file and adds it to the analysis queue. The input is the source code file uploaded from the terminal, and the output is the status of successful addition to the analysis queue. The server temporarily stores the source code file in storage.
[1415] Step 3:
[1416] The server's analysis engine retrieves source code files from the analysis queue. The input is the file registered in the analysis queue, and the output is the start of syntax analysis by the analysis engine. The analysis engine recognizes the file format and programming language and performs syntax analysis. Specifically, it identifies function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc., and analyzes the relationships between them.
[1417] Step 4:
[1418] The server uses an automatic comment generation algorithm to create appropriate annotations based on the analysis results. The input is the analysis results obtained from the analysis engine, and the output is the generated annotations. The content is adjusted based on the granularity of the comments preset by the user, optimizing the annotations.
[1419] Step 5:
[1420] The server inserts the generated annotations into the source code at the appropriate positions. The input is the automatically generated annotations and the original source code file, and the output is a new source code file with the annotations inserted. The server takes care to maintain the structure of the original code and ensure that the annotations are inserted at the appropriate positions.
[1421] Step 6:
[1422] The device collects the user's emotional state through a camera or microphone and sends it to the emotion engine. The input is the emotional data collected from the camera or microphone, and the output is the data sent to the emotion engine. The device continues to collect emotional data periodically.
[1423] Step 7:
[1424] The emotion engine on the server analyzes the collected data and identifies the user's emotional state. The input is the emotional data sent from the device, and the output is the emotional state (stress, confusion, satisfaction, etc.) resulting from the analysis. The emotion engine updates the analysis results in real time.
[1425] Step 8:
[1426] The server sends the annotated source code to the user's device. The input is the source code with annotations inserted and the analysis results of the emotion engine, and the output is the data sent to the user's device. Based on the emotional state, the granularity and format of the annotations displayed are adjusted. The device receives the sent data and displays the new source code to the user.
[1427] Step 9:
[1428] The user checks the displayed annotated source code and, if necessary, modifies the annotations or enters additional information. The input is the annotated source code and the user's modifications, and the output is the modified source code and the user's feedback. The modified source code is then sent from the terminal to the server.
[1429] Step 10:
[1430] The server receives feedback from users and uses it to improve the analysis model. The input is the feedback data sent by the user, and the output is updating and improving the analysis model. The feedback is used to improve the accuracy of the emotion engine and optimize the analysis algorithm.
[1431] The above specific processing steps enable efficient analysis of other people's programs, provision of annotations in a form that is easy for the user to understand, and optimal feedback according to the user's emotional state.
[1432] (Application example 2)
[1433] 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."
[1434] Existing program analysis systems do not take into account the user's emotions when analyzing other people's programs, making it difficult to reduce user stress and confusion. Furthermore, when providing analysis information in real time and adding comments to programs, the granularity of the comments cannot be adjusted based on the user's emotional state. This results in analysis results that are not provided in an optimal format for the user, making it time-consuming to understand and correct the results.
[1435] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes: means for loading a program of another person; means for analyzing the structure and function of the loaded program; means for providing the analyzed information to the user in real time; means for adding the analyzed information to the program as a comment; means including a camera or microphone used to collect emotion recognition data; means for adjusting the granularity of the analysis result comments based on the user's emotional state using an emotion engine; and means for displaying the analysis results and the generated comments on a display device. This enables program analysis and feedback adapted to the user's emotional state, improving the user's understanding efficiency and facilitating development.
[1436] "Other people's programs" are source code or software created by another developer that you do not own.
[1437] "Structure" refers to the integrated arrangement and relationships of function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc. within a program.
[1438] "Function" refers to the specific actions that a program performs and the logic involved in those actions.
[1439] "Real-time" refers to the ability to provide results or information immediately after a specific action or event occurs.
[1440] A "comment" is text inserted as an annotation within a program to explain the program's behavior or intent.
[1441] "Emotion recognition data" is data that indicates the user's emotional state, and is analyzed from facial expressions and voice information collected through a camera or microphone.
[1442] "Camera or microphone" refers to a device for recording video and audio and providing input data to the emotion recognition engine.
[1443] An "emotion engine" is a software or hardware module that analyzes collected emotion recognition data and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[1444] The "display device" is a display device that visually presents the analysis results and generated comments to the user.
[1445] "Granularity of analysis result comments" refers to the detail and conciseness of the generated comments, which are adjusted to facilitate user understanding.
[1446] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the program as comments. In particular, this system has an added emotion engine that recognizes the user's emotions, and is characterized by providing optimal feedback according to the user's emotional state.
[1447] System Overview
[1448] This system consists of the following elements:
[1449] A means of loading other people's programs
[1450] A means of analyzing the structure and functionality of loaded programs
[1451] A means of providing analyzed information to users in real time
[1452] A means of adding parsed information to programs as comments
[1453] Cameras or microphones used to collect emotion recognition data
[1454] Emotion Engine
[1455] Display device
[1456] Explanation of program processing procedures
[1457] The server first loads the program specified by the user. The structure and function of the loaded program are analyzed. The analysis results are provided to the user in real time and, if necessary, are added as comments to the program. The user's emotional state is analyzed through a camera or microphone used to collect emotion recognition data, and the emotion engine determines the optimal granularity of the comments. The analysis results and generated comments are finally displayed on a display device.
[1458] Hardware and software used
[1459] Hardware: Smart glasses, local PC, camera (mounted on smart glasses), microphone
[1460] Software: OpenCV (for camera capture), EmotionRecognizer library (for emotion recognition), CodeAnalyzer (for program analysis)
[1461] Data processing and calculation
[1462] User emotion recognition data is collected through a camera or microphone and analyzed by the EmotionRecognizer library. The program code is analyzed by CodeAnalyzer, and the emotion engine determines the granularity of the generated comments based on the results. The results of this series of processes are displayed in real time on a display device. This allows the program's analysis results to be presented in a format that corresponds to the user's emotional state, facilitating user understanding.
[1463] Specific examples
[1464] The following are some specific examples of how this system can be used:
[1465] Prompt Sentence Examples
[1466] Generate feedback based on the code analysis results and the user's emotions. Analyze the following code and add detailed comments if the user is in a stressed state, or a concise comment if the user is not.
[1467] code:
[1468] def move_forward(steps):
[1469] for i in range(steps):
[1470] perform_step()
[1471] emotion: stressed
[1472] Analysis results and feedback
[1473] "This function moves the robot forward.
[1474] argument:
[1475] steps (int): number of steps to move forward
[1476] def move_forward(steps):
[1477] Repeat forward steps using a loop
[1478] for i in range(steps):
[1479] Calls a function to perform a step
[1480] perform_step()
[1481] In this way, program analysis and feedback that adapts to the user's emotional state becomes possible, improving the efficiency of user understanding and facilitating smoother development.
[1482] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1483] Step 1:
[1484] The terminal loads the program file specified by the user. Specifically, the user selects the source code file to be analyzed from the local storage, and the terminal uploads the file to the server. The input is the source code file, and the output is the source code file temporarily stored on the server.
[1485] Step 2:
[1486] The server receives the uploaded source code files and places them in an analysis queue. The server's analysis engine takes the source code files from the queue and analyzes the structure and functionality of the source code. It performs syntax analysis to identify function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzes the relationships between them. The input is the source code files stored on the server, and the output is the analysis results.
[1487] Step 3:
[1488] The device collects the user's emotion recognition data. It uses a camera or microphone installed on the device to collect the user's facial expression and voice data. The input is the user's facial expression and voice data, and the output is emotion recognition data.
[1489] Step 4:
[1490] The server's emotion engine analyzes the collected emotion recognition data. It uses the EmotionRecognizer library to identify the user's emotional state, distinguishing between stress, confusion, and satisfaction. The input is the emotion recognition data, and the output is the user's emotional state.
[1491] Step 5:
[1492] The server determines the granularity of the feedback based on the emotion engine's analysis results, depending on the user's emotional state. For example, if the emotion engine determines that the user is in a stressful state, it will provide more detailed feedback. The input is the user's emotional state and the results of source code analysis, and the output is comments with adjusted granularity.
[1493] Step 6:
[1494] The server inserts the generated comments into the appropriate positions in the source code to generate new commented source code. It takes care to maintain the structure of the original code and insert comments into the appropriate positions. The input is granular comments and the source code analysis results, and the output is commented source code.
[1495] Step 7:
[1496] The terminal receives the commented source code and displays it to the user. Feedback is displayed on the display device of the smart glasses, allowing the user to check the analysis results hands-free. The input is the commented source code, and the output is the feedback displayed on the display.
[1497] 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.
[1498] 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.
[1499] 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.
[1500] [Fourth embodiment]
[1501] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1502] 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.
[1503] 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).
[1504] 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.
[1505] 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.
[1506] 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).
[1507] 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.
[1508] 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.
[1509] 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.
[1510] 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.
[1511] 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.
[1512] 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.
[1513] 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."
[1514] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the programs as comments. This system aims to help software developers quickly understand other people's code and to make learning new technologies and algorithms more efficient.
[1515] System Overview
[1516] This system consists of the following elements:
[1517] A means of loading other people's programs
[1518] A means of analyzing the structure and functionality of loaded programs
[1519] A means of providing analyzed information to users in real time
[1520] A means of adding parsed information to programs as comments
[1521] A way to control the granularity of comments
[1522] A way to analyze complex directory structures
[1523] Program processing explanation
[1524] 1. Loading the code
[1525] The user launches the CodeXplain application and selects the source code file they want to analyze.
[1526] The terminal uploads the selected source code file to the server.
[1527] 2. Code Analysis
[1528] The server receives the uploaded source code files.
[1529] The server's analysis engine identifies various elements in the source code (functions, classes, variables, conditional branches, loops, etc.) and analyzes their relationships.
[1530] The analysis engine generates analysis results to clarify the roles and functions of the identified elements.
[1531] 3. Creating and Inserting Comments
[1532] The server generates an appropriate comment based on the analysis results.
[1533] The generated comments are adjusted to the granularity (level of detail) of the comments specified by the user.
[1534] The server inserts the generated comments into the source code at the appropriate positions to create new commented source code.
[1535] 4. Providing results
[1536] The server transmits the commented source code to the user's terminal.
[1537] The terminal displays the transmitted commented source code to the user.
[1538] 5. References and Feedback
[1539] The user can check the displayed commented source code, and can modify the comment content or enter additional information as necessary.
[1540] The server receives feedback from users and uses it to improve the analytical model.
[1541] Specific example explanation
[1542] For example, if the following source code written in Python is entered:
[1543] python
[1544] def add(a, b):
[1545] return a + b
[1546] result = add(3, 4)
[1547] print(result)
[1548] The system performs the following analyses:
[1549] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[1550] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[1551] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[1552] The commented source code generated based on the analysis results is as follows:
[1553] python
[1554] Addition function
[1555] def add(a, b):
[1556] Returns the sum of a and b
[1557] return a + b
[1558] Call the add function and store the result in result
[1559] result = add(3, 4)
[1560] Output the result
[1561] print(result)
[1562] In this way, users can quickly understand the functionality of the code by using commented source code, which is particularly useful for beginners and when reviewing code written by others, and contributes to improving development efficiency.
[1563] The processing flow will be explained below.
[1564] Step 1:
[1565] Users launch the CodeXplain application and select the source code files they want to analyze by using a file browser to select the files from local storage.
[1566] Step 2:
[1567] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[1568] Step 3:
[1569] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[1570] Step 4:
[1571] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[1572] Step 5:
[1573] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzing the relationships between them.
[1574] Step 6:
[1575] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[1576] Step 7:
[1577] The server inserts the generated comments into the original source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[1578] Step 8:
[1579] The server transmits the commented source code to the user's device using a security protocol to ensure data integrity and confidentiality.
[1580] Step 9:
[1581] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[1582] Step 10:
[1583] Users can then provide feedback to the server with corrections and additional comments, which will be used to improve and optimize the analysis model in the future.
[1584] Through these steps, the CodeXplain system is able to quickly analyze other people's code and present its structure and functionality to users in an easy-to-understand manner.
[1585] Example 1
[1586] 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."
[1587] Efficiently understanding code written by others is an important challenge in software development. However, understanding code from scratch, which contains complex structures and many functions and classes, takes time and effort. Furthermore, conventional code reading makes it difficult to accurately grasp the code's function and role, and there is a risk of misunderstanding. Furthermore, even in team development, if other people's code lacks appropriate comments, maintaining and modifying the code becomes difficult. New technical methods are needed to solve these challenges.
[1588] 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.
[1589] In this invention, the server includes means for loading other people's programs, means for analyzing the structure and function of the loaded programs, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the program as comments, means for the user to select a code file to be analyzed and upload it from their terminal to the server, means for tokenizing the code received by the server using an analysis engine and performing syntax analysis, means for generating appropriate comments based on the analysis results and inserting the comments into the code, means for sending the commented source code to their terminal and displaying it to the user, and means for collecting feedback from users and using it to improve the analysis model. This makes it possible to quickly and accurately understand other people's code and significantly improve the efficiency of software development.
[1590] "Means for loading other people's programs" refers to a mechanism for incorporating source code files created by other people into the system in a specified manner.
[1591] "Means for analyzing the structure and function of a program" refers to a mechanism that performs processing to identify and understand each element of the loaded source code (functions, classes, variables, etc.), their relationships, and their roles.
[1592] "Means for providing analyzed information to users in real time" refers to a function for instantly obtaining the analysis results and instantly presenting them to the user.
[1593] The "means for adding analyzed information to a program as a comment" is a mechanism for generating appropriate comments based on the analyzed information and inserting the comments at appropriate positions in the original source code.
[1594] "Means for users to select code files to be analyzed and upload them from their devices to the server" refers to a mechanism whereby a user specifies the source code to be analyzed and sends that code from the user's device to the server.
[1595] "Means for tokenizing the code received by the server using an analysis engine and performing syntactic analysis" refers to a mechanism for dividing the source code received by the server into syntactic units using an analysis engine, and understanding the structure and meaning of the source code.
[1596] "Means for generating appropriate comments based on the analysis results and inserting the comments into the code" refers to a mechanism for adding comments generated based on the analyzed information to appropriate locations in the source code.
[1597] The "means for transmitting source code with comments to a terminal and displaying it to a user" is a mechanism for transmitting source code with added comments to a user's terminal and displaying it to the user.
[1598] "Means for collecting feedback from users and using it to improve the analysis model" refers to a mechanism for collecting comments and suggestions for corrections provided by users and using that information to improve the performance and accuracy of the analysis system.
[1599] This invention relates to a system that allows users to quickly and accurately understand programs written by others. In particular, it aims to analyze source code, provide analysis results in real time, and insert the analysis results into the code as appropriate comments.
[1600] This system consists of the following elements:
[1601] 1. A means of loading other people's programs: A function that allows users to select the source code they want to analyze and upload it to the server from their terminal. Specifically, users use the CodeXplain application to select the source code file and send an analysis request.
[1602] 2. A means for analyzing the structure and function of the loaded program: The server uses an analysis engine to tokenize and parse the source code received. The analysis engine identifies the roles and relationships of specific elements (functions, classes, variables, etc.). This analysis engine supports common programming languages (e.g., Python, Java, etc.).
[1603] 3. Means of providing analyzed information to users in real time: The server immediately generates the analysis results and provides them to users in real time. The analysis results are displayed using visualization tools or other methods in a format that users can easily understand.
[1604] 4. A means to add analyzed information to programs as comments: The server generates appropriate comments based on the analysis results and inserts them into the code to make it easier for users to understand. The level of detail of the comments can be adjusted according to the granularity specified by the user.
[1605] 5. A means for selecting the code file to be analyzed and uploading it from the terminal to the server: The system has a function that allows the user to select the code file to be analyzed and securely upload it to the server. This means encrypts and transfers data securely using the HTTPS protocol.
[1606] 6. The server uses an analysis engine to tokenize and parse the code it receives: The server has the ability to break down source code into tokens and perform syntax analysis. This clarifies the roles and relationships of each element in the code.
[1607] 7. Means for generating appropriate comments based on the analysis results and inserting the comments into the code: The server generates appropriate comments based on the analysis results and inserts them into the code at predetermined positions. The generated comments help the user understand the code.
[1608] 8. Means for sending commented source code to the terminal and displaying it to the user: The server sends the commented source code to the terminal, and the terminal displays it. The user can check the displayed commented source code and understand its contents.
[1609] 9. A means of collecting user feedback and using it to improve the analysis model: Users provide the system with comments and feedback on the analysis results. The server uses this information to improve the analysis model and generate more accurate analysis results.
[1610] Specific example explanation
[1611] For example, if the following Python code is entered:
[1612] def multiply(a, b):
[1613] return ab
[1614] result = multiply(5, 7)
[1615] print(result)
[1616] When our system analyzes this code, it generates the following commented source code:
[1617] Multiplication function
[1618] def multiply(a, b):
[1619] Returns the product of a and b
[1620] return ab
[1621] Call the multiply function and store the result in result
[1622] result = multiply(5, 7)
[1623] Output the result
[1624] print(result)
[1625] Prompt Sentence Examples
[1626] Input to the system is written as a prompt sentence like this:
[1627] Analyze this Python code and add your comments:
[1628] And include the following code:
[1629] def multiply(a, b):
[1630] return ab
[1631] result = multiply(5, 7)
[1632] print(result)
[1633] This allows the server to generate commented source code based on the input code and provide it to the user.
[1634] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1635] Step 1: Select and enter your code
[1636] The user launches the CodeXplain application and selects the source code file to be analyzed. Specifically, the user clicks the "Select File" button and selects the source code file to be analyzed.
[1637] Input: The source code file to be analyzed
[1638] Output: The path of the selected source code file.
[1639] Step 2: Upload the code
[1640] The device will upload the source code files selected by the user to the server, with a progress bar indicating the progress during the upload and a notification displayed to the user once the upload is complete.
[1641] Input: The path of the source code file selected in step 1
[1642] Output: Source code files uploaded to the server
[1643] Step 3: Receive the code and start analyzing
[1644] The server receives the uploaded source code file, after which the parsing engine breaks the source code into tokens and begins parsing it.
[1645] Input: Uploaded source code file
[1646] Output: Tokenized source code
[1647] Step 4: Analyzing the code structure and functionality
[1648] The server's analysis engine identifies various elements (functions, classes, variables, etc.) based on the tokenized source code and analyzes their relationships. The analysis engine generates analysis results to clarify roles and functions.
[1649] Input: Tokenized source code
[1650] Output: Analysis results (roles and relationships of each element)
[1651] Step 5: Generate comments
[1652] The server generates appropriate comments based on the analysis results, adjusting the level of detail of the comments to match the granularity of the comments specified by the user.
[1653] Input: Analysis results (roles and relationships of each element)
[1654] Output: Generated comments
[1655] Step 6: Inserting comments
[1656] The server inserts the generated comments into the source code at appropriate positions to create commented source code.
[1657] Input: Generated comments, original source code
[1658] Output: Commented source code
[1659] Step 7: Delivering results
[1660] The server transmits the commented source code to the user's terminal, which displays the received commented source code to the user.
[1661] Input: Commented source code
[1662] Output: Commented source code displayed in terminal.
[1663] Step 8: Gather feedback and improve the model
[1664] The user can review the displayed commented source code, modify the comments as necessary, and enter feedback. The server receives this feedback and uses it to improve the analysis model.
[1665] Input: User feedback
[1666] Output: Improved analytical model
[1667] (Application example 1)
[1668] 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."
[1669] Quickly understanding and efficiently reviewing someone else's code is extremely difficult, especially with large code bases. In fields like content distribution services, program quality and stability are essential, making accurate code analysis necessary. However, traditional methods rely on manual analysis, which is time-consuming and labor-intensive, and prone to errors. Furthermore, adding and generating comments can be time-consuming, hindering program comprehension.
[1670] 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.
[1671] In this invention, the server includes means for loading other people's programs, means for analyzing the structure and function of the loaded programs, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the programs as comments, means for uploading the programs from a mobile terminal, means for analyzing the programs on the server and returning the results to the terminal, and means for generating comments using a generative AI model. This allows users to easily upload other people's code using their mobile terminals and receive source code with comments that reflect the results of real-time analysis on the server.
[1672] "Third Party Programs" means software code created by a third party.
[1673] "Structural and functional analysis" means investigating the internal structure and operation of a program and clarifying the relationships between each element and function.
[1674] "Providing to the user in real time" means providing the analyzed information to the user immediately so that the user can check it without any time delay.
[1675] "Adding as a comment to the program" means inserting the analyzed information as explanatory text at an appropriate location in the program.
[1676] A "mobile device" is a portable computing device such as a smartphone or tablet.
[1677] A "server" is a central computer that provides services to other computers over a network.
[1678] A "generative AI model" is a mathematical model that uses artificial intelligence to generate appropriate comments and explanations from data.
[1679] "Uploading" means transferring data from a local terminal to a remote server via a network.
[1680] "Returning the analysis results to the terminal" means sending the analysis results processed by the server back to the user's mobile terminal.
[1681] The present invention provides a system for quickly and efficiently understanding other people's programs, particularly by linking a user's mobile device with a server. It also uses a generative AI model to automatically generate comments to aid in understanding the program. A specific embodiment of this system is described below.
[1682] System configuration
[1683] The system consists of the following elements:
[1684] Mobile device: A smartphone or tablet device owned by a user.
[1685] Server: A computer that processes data in cooperation with mobile devices via a network.
[1686] Generative AI model: A model that uses artificial intelligence to generate appropriate comments and explanations from data.
[1687] Program processing
[1688] 1. Loading and uploading other people's programs
[1689] A user launches an application on a mobile device, selects the source code file they want to analyze, and then uploads the program file from the mobile device to the server. The hardware used in this stage is a smartphone or tablet, and the software is the application on the device (e.g., an iOS or Android app).
[1690] 2. Program Analysis
[1691] The server analyzes the received source code files. This analysis uses Python's Abstract Syntax Tree (AST) module to identify various elements (functions, classes, variables, etc.) and analyze their relationships. Furthermore, a generative AI model is used to generate appropriate comments based on the analysis results. A Python script is used as the analysis engine for this step. The server can also utilize cloud infrastructure such as AWS EC2.
[1692] 3. Creating and Inserting Comments
[1693] The comments created by the generative AI model are inserted into the source code at the appropriate locations by the server, generating new commented source code, which is then immediately sent back to the mobile device.
[1694] 4. Providing results
[1695] The mobile device receives the commented source code from the server and displays it to the user, who can review it and make any necessary modifications. The hardware used at this stage is a smartphone or tablet, and a display application is used.
[1696] Specific examples
[1697] For example, if the following Python code is entered:
[1698] python
[1699] def greet(name):
[1700] print(f'Hello, {name}!')
[1701] greet('Alice')
[1702] Example prompt sentence:
[1703] "Analyze the following code and add comments for function definitions and calls."
[1704] Generated commented code:
[1705] python
[1706] The greet function has the following roles:
[1707] def greet(name):
[1708] print(f'Hello, {name}!')
[1709] The function greet was called
[1710] greet('Alice')
[1711] In this way, users can easily analyze other people's code from their mobile devices and add comments in an easy-to-understand format, which is expected to improve development efficiency by enabling quicker code review and understanding.
[1712] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1713] Step 1:
[1714] A user launches the application on their mobile device and selects the source code file they want to analyze, which inputs the source code file. The device then creates a request to upload this file to the server. This request includes the user's identifying information along with the source code file itself.
[1715] Step 2:
[1716] The terminal sends the created request to the server, which receives it. The server temporarily stores the received source code file and begins the process of analyzing its structure and functionality. At this stage, the server uses Python's Abstract Syntax Tree (AST) module to analyze the source code. The input for the analysis is the source code file, and the output is a list of various elements in the source code (functions, classes, variables, etc.).
[1717] Step 3:
[1718] The server uses a generative AI model to generate comments about the role and function of each element identified in the analysis results. The input here is a list of AST analysis results, and the output is appropriate comments generated by the generative AI model. The generated comments are based on the analysis results, so they help users understand the code.
[1719] Step 4:
[1720] The server inserts the generated comments into the corresponding positions in the source code to generate new commented source code. The input is the original source code and the generated comments, and the output is the source code with the inserted comments. After the server finishes this process, it temporarily saves the newly generated commented source code.
[1721] Step 5:
[1722] The server generates a request to return the commented source code to the terminal, and identifies the destination by referring to the request information from the user. The input is the commented source code and the user's identification information, and the output is an HTTP response to the terminal.
[1723] Step 6:
[1724] The terminal analyzes the commented source code received from the server and displays it to the user. The input is the HTTP response from the server, and the output is the source code displayed to the user. The user can review this and modify the comment content as necessary.
[1725] Step 7:
[1726] If the user corrects the comment, the terminal uploads the corrected source code to the server again and sends it as feedback, which allows the server to obtain data to improve the analysis model. The input is the source code corrected by the user, and the output is the feedback information sent to the server.
[1727] 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.
[1728] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the program as comments. In particular, this system has an added emotion engine that recognizes the user's emotions, and is characterized by providing optimal feedback according to the user's emotional state.
[1729] System Overview
[1730] This system consists of the following elements:
[1731] A means of loading other people's programs
[1732] A means of analyzing the structure and functionality of loaded programs
[1733] A means of providing analyzed information to users in real time
[1734] A means of adding parsed information to programs as comments
[1735] A way to control the granularity of comments
[1736] A way to analyze complex directory structures
[1737] Emotion engine that recognizes user emotions
[1738] Program processing explanation
[1739] 1. Loading the code
[1740] Users launch the CodeXplain application and select the source code files they want to analyze. They use a file browser to select the files from their local storage.
[1741] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[1742] 2. Code Analysis
[1743] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[1744] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[1745] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and uses, conditional branches, loop structures, etc., and analyzing the relationships between them.
[1746] 3. Creating and Inserting Comments
[1747] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[1748] The server inserts the generated comments into the source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[1749] 4. Emotion Recognition by Emotion Engine
[1750] The terminal collects the user's emotional state through a camera and microphone and transmits it to the emotion engine.
[1751] The server's emotion engine analyzes the collected data and identifies the user's emotional state (e.g., stress, confusion, contentment).
[1752] 5. Providing and adjusting results
[1753] The server sends the commented source code to the user's device, and adjusts the granularity and format of the comments displayed based on the user's emotional state. For example, if the user is feeling stressed, the comments will be more detailed to help the user understand.
[1754] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[1755] 6. References and Feedback
[1756] The user can check the displayed commented source code, and can modify the comment content or enter additional information as necessary.
[1757] The server receives feedback from users and uses it to improve the analysis model. This feedback is useful for improving the accuracy of the emotion engine and optimizing the analysis algorithm.
[1758] Specific example explanation
[1759] For example, if the following source code written in Python is entered:
[1760] python
[1761] def add(a, b):
[1762] return a + b
[1763] result = add(3, 4)
[1764] print(result)
[1765] The system performs the following analyses:
[1766] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[1767] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[1768] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[1769] Also, if the emotion engine detects that the user is stressed, it will generate a more detailed comment:
[1770] python
[1771] This function is an addition function.
[1772] argument:
[1773] a (int): The first number to add
[1774] b (int): The second number to be added
[1775] Returns:
[1776] int: sum of a and b
[1777] def add(a, b):
[1778] Adds two arguments a and b and returns the result
[1779] return a + b
[1780] Calls the add function and stores the result in the result variable.
[1781] result = add(3, 4)
[1782] The contents of the variable result (addition result) are displayed on the standard output.
[1783] print(result)
[1784] In this way, the comments and feedback provided are adjusted appropriately according to the user's emotional state, which can more effectively promote understanding of the source code. By combining it with an emotion engine, we can expect to improve the user experience and further increase development efficiency.
[1785] The processing flow will be explained below.
[1786] Step 1:
[1787] Users launch the CodeXplain application and select the source code files they want to analyze. They use a file browser to select the files from their local storage.
[1788] Step 2:
[1789] The terminal uploads the selected source code file to the server, and the upload progress is displayed to the user via a progress bar or the like.
[1790] Step 3:
[1791] The server receives the uploaded source code file and queues it for analysis. The source code file is temporarily stored in the server's storage.
[1792] Step 4:
[1793] The server's analysis engine retrieves the source code file from the analysis queue, and automatically recognizes the file format and programming language of the source code.
[1794] Step 5:
[1795] The server's analysis engine begins parsing the source code, identifying function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzing the relationships between them.
[1796] Step 6:
[1797] The server uses an automatic comment generation algorithm based on the analysis results to create appropriate comments, adjusting the content based on the granularity of the comments (e.g., detailed or concise) preset by the user.
[1798] Step 7:
[1799] The server inserts the generated comments into the source code at the appropriate positions and generates new commented source code, taking care to maintain the structure of the original code and to insert the comments at the appropriate positions.
[1800] Step 8:
[1801] The device collects the user's emotional state through a camera and microphone and transmits it to the emotion engine, which analyzes the collected data and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[1802] Step 9:
[1803] The server sends the commented source code to the user's device, and adjusts the granularity and format of the comments displayed based on the user's emotional state. For example, if the user is feeling stressed, the comments can be made more detailed to help the user understand the code.
[1804] Step 10:
[1805] The terminal receives the transmitted commented source code and displays it to the user, who can then refer to the displayed commented source code and modify or add comments as needed.
[1806] Step 11:
[1807] The user can review the displayed commented source code and, if necessary, edit the comments or enter additional information. User feedback will be used to improve the system.
[1808] To illustrate, consider the following Python code:
[1809] python
[1810] def add(a, b):
[1811] return a + b
[1812] result = add(3, 4)
[1813] print(result)
[1814] The analysis results from the above steps are as follows:
[1815] python
[1816] This function is an addition function.
[1817] argument:
[1818] a (int): The first number to add
[1819] b (int): The second number to be added
[1820] Returns:
[1821] int: sum of a and b
[1822] def add(a, b):
[1823] Adds two arguments a and b and returns the result
[1824] return a + b
[1825] Calls the add function and stores the result in the result variable.
[1826] result = add(3, 4)
[1827] The contents of the variable result (addition result) are displayed on the standard output.
[1828] print(result)
[1829] In this way, the system generates and adjusts comments taking into account the user's emotional state, helping users understand source code more efficiently. By combining the emotion engine, we can improve the user experience and further improve development efficiency.
[1830] Example 2
[1831] 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."
[1832] While conventional program analysis systems can analyze the structure and functionality of other people's programs, they lack the ability to effectively provide users with analysis results and automatically generate and insert annotations to aid understanding. Furthermore, they are unable to provide feedback that takes into account the user's emotional state, making it difficult to provide appropriate support when the user feels stressed or confused. Furthermore, there are insufficient means to use the feedback to improve the analysis model.
[1833] 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.
[1834] In this invention, the server includes means for reading other people's programs, means for analyzing the structure and function of the read program, means for providing the analyzed information to the user in real time, means for adding the analyzed information to the program as annotations, means for collecting and analyzing the user's emotional state, means for adjusting the content of the annotations based on the emotional state, means for incorporating the adjusted annotations into the program, and means for collecting feedback from the user and using it to improve the analysis model. This makes it possible to deepen understanding of the program analysis results, provide appropriate support according to the user's emotional state, and further improve the analysis model by utilizing the collected feedback.
[1835] "Others' Programs" refers to software code obtained from a different developer or other source.
[1836] "Loading means" refers to an interface that has the functionality to select a program file and import it into the system.
[1837] "Means of analysis" refers to the ability to understand the structure and function of a program and decipher the contents of the code using specific algorithms.
[1838] "Means for providing in real time" refers to communication and display functions for instantly displaying analyzed information on the user's terminal.
[1839] "Means for adding as annotations" refers to a function for inserting analyzed information into appropriate positions in program code, and for generating and adding annotations.
[1840] "Means for collecting and analyzing emotional states" refers to software and hardware for collecting emotional data from the user's facial expressions and voice through a camera or microphone and analyzing it.
[1841] "Means for tailoring annotation content" refers to algorithms for changing the level of detail and format of automatically generated annotations based on the user's emotional state.
[1842] "Means for incorporating into a program" refers to a function for inserting the generated annotations into source code and saving them as part of the original code.
[1843] "Means of collecting feedback and using it to improve the analysis model" refers to the process of collecting opinions and correction information provided by users and using that information to improve the system's analysis accuracy and emotion recognition capabilities.
[1844] MODE FOR CARRYING OUT THE INVENTION
[1845] This invention relates to a system that can read other people's programs, analyze their structure and functions, provide the analysis results to the user in real time, and add them as annotations to the program. In particular, this system incorporates an emotion engine that recognizes the user's emotions and provides optimal feedback according to the user's emotional state.
[1846] System configuration
[1847] The system consists of the following components:
[1848] 1. How to load other people's programs
[1849] 2. Means of analyzing the structure and function of loaded programs
[1850] 3. A means of providing analyzed information to users in real time
[1851] 4. A means of annotating programs with the analyzed information
[1852] 5. Means of collecting and analyzing the user's emotional state
[1853] 6. A means to tailor annotation content based on emotional state
[1854] 7. Means of incorporating coordinated annotations into programs
[1855] 8. How to collect user feedback and use it to improve the analytical model
[1856] Software and Hardware Configuration
[1857] software
[1858] Program analysis engine: Automatically recognizes the file format and programming language of the source code and performs syntax analysis.
[1859] Automatic comment generation algorithm: Generates appropriate annotations based on the analysis results.
[1860] Emotion engine: An algorithm that analyzes the user's emotional state from data collected through cameras and microphones.
[1861] Hardware
[1862] Server: Operates the program analysis engine, automatic comment generation algorithm, and emotion engine.
[1863] Terminal: Reads the code, sends it to the server, and receives the results. Equipped with a camera and microphone, it collects user emotional data.
[1864] Network: Carries out data communication between the terminal and the server.
[1865] System operation example
[1866] Loading the code
[1867] The user launches the application and selects the source code file they want to analyze. The device uploads the file to the server, and the upload progress is displayed to the user via a progress bar on the device.
[1868] Code Analysis
[1869] The server receives the uploaded source code files and queues them for analysis. The server's analysis engine automatically recognizes the file format and programming language of the source code and performs syntax analysis. It identifies function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc., and analyzes the relationships between them.
[1870] Creating and Inserting Comments
[1871] The server uses an automatic comment generation algorithm to generate appropriate annotations based on the analysis results. The annotations are then inserted into the source code at the appropriate locations, adjusting the content based on the granularity of the annotations (detailed or concise) preset by the user.
[1872] Emotion recognition by emotion engine
[1873] The device collects the user's emotional state through a camera and microphone and sends the data to the emotion engine on the server, which analyzes it and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[1874] Providing and adjusting results
[1875] The server transmits the annotated source code to the user's device, adjusting the granularity and format of the annotations displayed based on the user's emotional state. The device receives the annotated source code and displays it to the user. The user can then refer to the displayed annotated source code and modify or add annotations as needed.
[1876] References and Feedback
[1877] The user can review the annotated source code and, if necessary, modify the annotations or enter additional information. The server receives feedback from the user and uses it to improve the analysis model. This feedback is useful for improving the accuracy of the emotion engine and optimizing the analysis algorithm.
[1878] Specific examples
[1879] For example, if the following source code written in Python is entered:
[1880] python
[1881] def add(a, b):
[1882] return a + b
[1883] result = add(3, 4)
[1884] print(result)
[1885] The system performs the following analyses:
[1886] Analyzing a function definition: def add(a, b): identifies it as a function that takes two arguments and adds them.
[1887] Function call analysis: result = add(3, 4) identifies that the add function is called and the result is stored in the variable result.
[1888] Analysis of output processing: It is determined that print(result) displays the contents of the variable result to the standard output.
[1889] Also, if the emotion engine detects that the user is stressed, it generates more detailed annotations:
[1890] This function is an addition function.
[1891] argument:
[1892] a (int): The first number to add
[1893] b (int): The second number to be added
[1894] Returns:
[1895] int: sum of a and b
[1896] def add(a, b):
[1897] Adds two arguments a and b and returns the result
[1898] return a + b
[1899] Calls the add function and stores the result in the result variable.
[1900] result = add(3, 4)
[1901] The contents of the variable result (addition result) are displayed on the standard output.
[1902] print(result)
[1903] By combining it with an emotion engine, we can expect to improve the user experience and further improve development efficiency.
[1904] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1905] Step 1:
[1906] The user launches the CodeXplain application and selects the source code file they want to analyze. The terminal uses a file browser to select the target file from local storage and uploads it to the server. The input is the source code file, and the output is the file uploaded to the server. The terminal displays the progress with a progress bar and notifies you when the upload is complete.
[1907] Step 2:
[1908] The server receives the uploaded source code file and adds it to the analysis queue. The input is the source code file uploaded from the terminal, and the output is the status of successful addition to the analysis queue. The server temporarily stores the source code file in storage.
[1909] Step 3:
[1910] The server's analysis engine retrieves source code files from the analysis queue. The input is the file registered in the analysis queue, and the output is the start of syntax analysis by the analysis engine. The analysis engine recognizes the file format and programming language and performs syntax analysis. Specifically, it identifies function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc., and analyzes the relationships between them.
[1911] Step 4:
[1912] The server uses an automatic comment generation algorithm to create appropriate annotations based on the analysis results. The input is the analysis results obtained from the analysis engine, and the output is the generated annotations. The server adjusts the content based on the granularity of the comments preset by the user to optimize the annotations.
[1913] Step 5:
[1914] The server inserts the generated annotations into the source code at the appropriate positions. The input is the automatically generated annotations and the original source code file, and the output is a new source code file with the annotations inserted. The server takes care to maintain the structure of the original code and ensure that the annotations are inserted at the appropriate positions.
[1915] Step 6:
[1916] The device collects the user's emotional state through a camera or microphone and sends it to the emotion engine. The input is the emotional data collected from the camera or microphone, and the output is the data sent to the emotion engine. The device continues to collect emotional data periodically.
[1917] Step 7:
[1918] The emotion engine on the server analyzes the collected data and identifies the user's emotional state. The input is the emotional data sent from the device, and the output is the emotional state (stress, confusion, satisfaction, etc.) resulting from the analysis. The emotion engine updates the analysis results in real time.
[1919] Step 8:
[1920] The server sends the annotated source code to the user's device. The input is the source code with annotations inserted and the analysis results of the emotion engine, and the output is the data sent to the user's device. Based on the emotional state, the granularity and format of the annotations displayed are adjusted. The device receives the sent data and displays the new source code to the user.
[1921] Step 9:
[1922] The user checks the displayed annotated source code and, if necessary, modifies the annotations or enters additional information. The input is the annotated source code and the user's modifications, and the output is the modified source code and the user's feedback. The modified source code is then sent from the terminal to the server.
[1923] Step 10:
[1924] The server receives feedback from users and uses it to improve the analysis model. The input is the feedback data sent by the user, and the output is updating and improving the analysis model. The feedback is used to improve the accuracy of the emotion engine and optimize the analysis algorithm.
[1925] The above specific processing steps enable efficient analysis of other people's programs, provision of annotations in a form that is easy for the user to understand, and optimal feedback according to the user's emotional state.
[1926] (Application example 2)
[1927] 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."
[1928] Existing program analysis systems do not take into account the user's emotions when analyzing other people's programs, making it difficult to reduce user stress and confusion. Furthermore, when providing analysis information in real time and adding comments to programs, the granularity of the comments cannot be adjusted based on the user's emotional state. This results in analysis results that are not provided in an optimal format for the user, making it time-consuming to understand and correct the results.
[1929] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes: means for loading a program of another person; means for analyzing the structure and function of the loaded program; means for providing the analyzed information to the user in real time; means for adding the analyzed information to the program as a comment; means including a camera or microphone used to collect emotion recognition data; means for adjusting the granularity of the analysis result comments based on the user's emotional state using an emotion engine; and means for displaying the analysis results and the generated comments on a display device. This enables program analysis and feedback adapted to the user's emotional state, improving the user's understanding efficiency and facilitating development.
[1930] "Other people's programs" are source code or software created by another developer that you do not own.
[1931] "Structure" refers to the integrated arrangement and relationships of function definitions, class definitions, variable declarations and usage, conditional branching, loop structures, etc. within a program.
[1932] "Function" refers to the specific actions that a program performs and the logic involved in those actions.
[1933] "Real-time" refers to the quality of providing results or information immediately after a specific action or event occurs.
[1934] A "comment" is text inserted as an annotation within a program to explain the program's behavior or intent.
[1935] "Emotion recognition data" is data that indicates the user's emotional state, and is analyzed from facial expressions and voice information collected through a camera or microphone.
[1936] "Camera or microphone" refers to a device for recording video and audio and providing input data to the emotion recognition engine.
[1937] An "emotion engine" is a software or hardware module that analyzes collected emotion recognition data and identifies the user's emotional state (e.g., stress, confusion, satisfaction).
[1938] The "display device" is a display device that visually presents the analysis results and generated comments to the user.
[1939] "Granularity of analysis result comments" refers to the detail and conciseness of the generated comments, which are adjusted to facilitate user understanding.
[1940] This invention relates to a system that reads other people's programs, analyzes their structure and functions, provides the user with the analysis results in real time, and adds them to the program as comments. In particular, this system has an added emotion engine that recognizes the user's emotions, and is characterized by providing optimal feedback according to the user's emotional state.
[1941] System Overview
[1942] This system consists of the following elements:
[1943] A means of loading other people's programs
[1944] A means of analyzing the structure and functionality of loaded programs
[1945] A means of providing analyzed information to users in real time
[1946] A means of adding parsed information to programs as comments
[1947] Cameras or microphones used to collect emotion recognition data
[1948] Emotion Engine
[1949] Display device
[1950] Explanation of program processing procedures
[1951] The server first loads the program specified by the user. The structure and function of the loaded program are analyzed. The analysis results are provided to the user in real time and, if necessary, are added as comments to the program. The user's emotional state is analyzed through a camera or microphone used to collect emotion recognition data, and the emotion engine determines the optimal granularity of the comments. The analysis results and generated comments are finally displayed on a display device.
[1952] Hardware and software used
[1953] Hardware: Smart glasses, local PC, camera (installed on smart glasses), microphone
[1954] Software: OpenCV (for camera capture), EmotionRecognizer library (for emotion recognition), CodeAnalyzer (for program analysis)
[1955] Data processing and calculation
[1956] User emotion recognition data is collected through a camera or microphone and analyzed by the EmotionRecognizer library. The program code is analyzed by CodeAnalyzer, and the emotion engine determines the granularity of the generated comments based on the results. The results of this series of processes are displayed in real time on a display device. This allows the program's analysis results to be presented in a format that corresponds to the user's emotional state, facilitating user understanding.
[1957] Specific examples
[1958] The following are some specific examples of how this system can be used:
[1959] Prompt Sentence Examples
[1960] Generate feedback based on the code analysis results and the user's emotions. Analyze the following code and add detailed comments if the user is in a stressed state, or a concise comment if the user is not.
[1961] code:
[1962] def move_forward(steps):
[1963] for i in range(steps):
[1964] perform_step()
[1965] emotion: stressed
[1966] Analysis results and feedback
[1967] "This function moves the robot forward.
[1968] argument:
[1969] steps (int): number of steps to move forward
[1970] def move_forward(steps):
[1971] Repeat forward steps using a loop
[1972] for i in range(steps):
[1973] Calls a function to perform a step
[1974] perform_step()
[1975] In this way, program analysis and feedback that adapts to the user's emotional state becomes possible, improving the efficiency of user understanding and facilitating smoother development.
[1976] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1977] Step 1:
[1978] The terminal loads the program file specified by the user. Specifically, the user selects the source code file to be analyzed from the local storage, and the terminal uploads the file to the server. The input is the source code file, and the output is the source code file temporarily stored on the server.
[1979] Step 2:
[1980] The server receives the uploaded source code files and places them in an analysis queue. The server's analysis engine takes the source code files from the queue and analyzes the structure and functionality of the source code. It performs syntax analysis to identify function definitions, class definitions, variable declarations and usage, conditional branches, loop structures, etc., and analyzes the relationships between them. The input is the source code files stored on the server, and the output is the analysis results.
[1981] Step 3:
[1982] The device collects the user's emotion recognition data. It uses a camera or microphone installed on the device to collect the user's facial expression and voice data. The input is the user's facial expression and voice data, and the output is emotion recognition data.
[1983] Step 4:
[1984] The server's emotion engine analyzes the collected emotion recognition data. It uses the EmotionRecognizer library to identify the user's emotional state, distinguishing between stress, confusion, and satisfaction. The input is the emotion recognition data, and the output is the user's emotional state.
[1985] Step 5:
[1986] The server determines the granularity of the feedback based on the emotion engine's analysis results, depending on the user's emotional state. For example, if the emotion engine determines that the user is in a stressful state, it will provide more detailed feedback. The input is the user's emotional state and the results of source code analysis, and the output is comments with adjusted granularity.
[1987] Step 6:
[1988] The server inserts the generated comments into the appropriate positions in the source code to generate new commented source code. It takes care to maintain the structure of the original code and insert comments into the appropriate positions. The input is granular comments and the source code analysis results, and the output is commented source code.
[1989] Step 7:
[1990] The terminal receives the commented source code and displays it to the user. Feedback is displayed on the display device of the smart glasses, allowing the user to check the analysis results hands-free. The input is the commented source code, and the output is the feedback displayed on the display.
[1991] 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.
[1992] 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.
[1993] 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.
[1994] 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.
[1995] 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.
[1996] 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.
[1997] 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).
[1998] 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.
[1999] 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."
[2000] 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.
[2001] 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).
[2002] 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.
[2003] 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.
[2004] 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.
[2005] 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.
[2006] 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.
[2007] 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.
[2008] 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.
[2009] 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.
[2010] 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.
[2011] 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.
[2012] The following is further disclosed regarding the above embodiment.
[2013] (Claim 1)
[2014] A means for loading other people's programs;
[2015] means for analyzing the structure and function of the loaded program;
[2016] means for providing the analyzed information to a user in real time;
[2017] The system includes means for adding the analyzed information to the program as comments.
[2018] (Claim 2)
[2019] 2. The system according to claim 1, further comprising means for adjusting the granularity of the comments in the analysis results.
[2020] (Claim 3)
[2021] 2. The system according to claim 1, further comprising means for analyzing a complex directory structure and explaining the results.
[2022] "Example 1"
[2023] (Claim 1)
[2024] A means for loading other people's programs;
[2025] means for analyzing the structure and function of the loaded program;
[2026] means for providing the analyzed information to a user in real time;
[2027] means for adding the analyzed information to the program as a comment;
[2028] A means for the user to select the code file to be analyzed and upload it to the server from their device;
[2029] A means for tokenizing and parsing the code received by the server using an analysis engine;
[2030] means for generating appropriate comments based on the analysis results and inserting the comments into the code;
[2031] a means for transmitting the commented source code to a terminal and displaying it to a user;
[2032] A system that includes a means to collect feedback from users and use it to improve the analytical model.
[2033] (Claim 2)
[2034] 2. The system according to claim 1, further comprising means for adjusting the granularity of the comments in the analysis results.
[2035] (Claim 3)
[2036] 10. The system of claim 1, further comprising means for analyzing complex file structures and explaining the results.
[2037] "Application Example 1"
[2038] (Claim 1)
[2039] A means for loading other people's programs;
[2040] means for analyzing the structure and function of the loaded program;
[2041] means for providing the analyzed information to a user in real time;
[2042] means for adding the analyzed information to the program as a comment;
[2043] A means of uploading programs from a mobile device;
[2044] A means for analyzing the program on the server and returning the results to the terminal;
[2045] A system including means for generating comments using a generative AI model.
[2046] (Claim 2)
[2047] 2. The system according to claim 1, further comprising means for adjusting the granularity of the comments in the analysis results.
[2048] (Claim 3)
[2049] 2. The system according to claim 1, further comprising means for analyzing complex directory structures and explaining the results.
[2050] "Example 2: Combining Emotion Engines"
[2051] (Claim 1)
[2052] A means for loading other people's programs;
[2053] means for analyzing the structure and function of the loaded program;
[2054] means for providing the analyzed information to a user in real time;
[2055] means for adding the analyzed information to the program as annotations;
[2056] means for collecting and analyzing the user's emotional state;
[2057] means for adjusting the content of the annotation based on said emotional state;
[2058] means for incorporating the adjusted annotations into a program;
[2059] A means of collecting user feedback and using it to improve the analytical model;
[2060] A system including:
[2061] (Claim 2)
[2062] The system of claim 1, further comprising means for adjusting the granularity of annotation of the analysis results.
[2063] (Claim 3)
[2064] 2. The system according to claim 1, further comprising means for analyzing complex directory structures and explaining the results.
[2065] "Application example 2 when combining emotion engines"
[2066] (Claim 1)
[2067] A means for loading other people's programs;
[2068] means for analyzing the structure and function of the loaded program;
[2069] means for providing the analyzed information to a user in real time;
[2070] means for adding the analyzed information to the program as a comment;
[2071] means including a camera or microphone used to collect emotion recognition data;
[2072] a means for adjusting the granularity of the analysis results based on the emotional state of the user using an emotion engine;
[2073] means for displaying the analysis results and the generated comments on a display device;
[2074] A system including:
[2075] (Claim 2)
[2076] 2. The system according to claim 1, further comprising means for adjusting the granularity of the comments in the analysis results.
[2077] (Claim 3)
[2078] 2. The system according to claim 1, further comprising means for analyzing complex directory structures and explaining the results. [Explanation of symbols]
[2079] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url:> < / url:> < / url:>
Claims
1. A means for loading other people's programs; means for analyzing the structure and function of the loaded program; means for providing the analyzed information to a user in real time; The system includes means for adding the analyzed information to the program as comments.
2. 2. The system according to claim 1, further comprising means for adjusting the granularity of the comments in the analysis results.
3. 2. The system according to claim 1, further comprising means for analyzing a complex directory structure and explaining the results.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A