system
The system assists users in converting and understanding program code by identifying the language, performing conversions, and providing natural language explanations, effectively lowering the learning barrier for programming.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2026-03-10
AI Technical Summary
Beginners and users face difficulties in converting existing code into another programming language and understanding its behavior, as it requires time and effort to learn the grammar and syntax of different languages, and verifying the correctness of the converted code is challenging.
A system that receives initial program code, identifies the programming language, converts it to another language, explains the behavior in natural language, and verifies the correctness, enabling users to understand the converted code easily.
The system facilitates easy conversion and understanding of programming languages, reducing the learning barrier and improving efficiency for beginners.
Smart Images

Figure 2026041449000001_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] Beginners and users who want to write code in a different programming language often find it difficult to convert existing code into another language and understand its behavior. Understanding the grammar and syntax of a different language, in particular, requires time and effort, making it a barrier to learning. Furthermore, verifying whether the converted code works correctly is also difficult. A system that solves this problem and allows even beginners to easily learn other programming languages is needed. [Means for solving the problem]
[0005] The system includes a means for receiving initial program code entered by a user and identifying the programming language of the code. It then provides a means for converting the code from the identified programming language to another programming language. It also includes a means for explaining the behavior of the converted code in natural language and providing the converted code to the user along with the explanation. The system includes a means for identifying the programming language based on specific keywords and a means for verifying that the behavior of the converted code is appropriate, thereby enabling the user to convert the code in an accurate and easy-to-understand manner and understand its behavior. In this way, the user can deepen their understanding of different programming languages and reduce the barrier to learning.
[0006] "Program code" is a set of computer-executable instructions.
[0007] A "user" is someone who uses this system to request program code conversion and operational explanations.
[0008] "Receive" refers to the system receiving and processing data sent by a user.
[0009] "Identifying" refers to the system identifying specific attributes or types from the information it receives.
[0010] A "programming language" is a set of rules and grammar for writing program code.
[0011] "Conversion" refers to changing program code written in one programming language into program code written in a different programming language.
[0012] An "action" refers to the sequence of steps or results that occur when program code is executed.
[0013] "Natural language" is a language that humans use on a daily basis and that is used to explain program code in an easy-to-understand manner.
[0014] "Explain" means to give verbal details about the characteristics or behavior of something to aid understanding.
[0015] "Providing" refers to presenting processing results or information to the user.
[0016] A "system" is a collection of hardware and software working together to achieve a particular function.
[0017] "Keywords" are specific words or symbols used in program code, and serve as indicators for identifying a programming language.
[0018] "Identify" refers to detecting and distinguishing the attributes or types of objects.
[0019] "Verify" means to confirm legitimacy or reliability based on specific criteria. [Brief explanation of the drawings]
[0020] [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
[0021] 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.
[0022] First, the terms used in the following description will be explained.
[0023] 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).
[0024] 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.
[0025] 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.
[0026] 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.
[0027] 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."
[0028] [First embodiment]
[0029] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0030] 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.
[0031] 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).
[0032] 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.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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."
[0041] The present invention provides a system for assisting users in converting program code into different programming languages and understanding its operation. Specific embodiments of this system will be described below.
[0042] First, the user inputs the first program code through the terminal. For example, the user inputs the code written in Python, print("Hello, World!"). This input code is sent to the server by the terminal.
[0043] The server has a way to analyze the received code and identify the programming language it is in. For example, if the received code contains the keyword "print(", the server will identify that the code is written in Python.
[0044] Next, the server converts the specified programming language into another programming language. For example, when converting from Python to JavaScript (registered trademark), print("Hello, World!") is converted into console.log("Hello, World!"); This conversion process is performed by a conversion means running on the server.
[0045] After generating the transformed code, the server generates a natural language description to help understand what the code does. For example, the code "console.log("Hello, World!");" generates a description such as "This code prints the message 'Hello, World!' to the console."
[0046] The converted code and its operation explanation are then sent to the terminal and provided to the user, who can check the original code (Python) they entered and the converted code (JavaScript), and understand what the code does through the operation explanation.
[0047] As a specific example, the following embodiment can be considered: When a user enters the Python code print("Hello, World!"), the following steps are taken:
[0048] 1. The user enters the code into the terminal and presses the send button.
[0049] 2. The device sends the entered code to the server.
[0050] 3. The server receives the code and identifies its programming language.
[0051] 4. The server converts the identified language to the target language (JavaScript in this case).
[0052] 5. The server explains in natural language what the converted code does.
[0053] 6. The server sends the converted code and operation instructions to the terminal.
[0054] 7. The terminal displays the converted code and an explanation of its operation to the user.
[0055] This invention allows users to easily convert the code they have written into other programming languages and understand its behavior, lowering the barrier to learning programming and allowing even beginners to learn efficiently.
[0056] The processing flow will be explained below.
[0057] Understood. The process flow will be explained below in concrete steps.
[0058] Step 1:
[0059] The user accesses a terminal and enters the program code they want to convert. For example, they provide the Python code print("Hello, World!") as input.
[0060] Step 2:
[0061] The terminal converts the program code entered by the user into a data format and transmits the data to the server.
[0062] Step 3:
[0063] The server receives the program code data from the terminal and begins analyzing it.
[0064] Step 4:
[0065] The server analyzes the content of the program code and identifies the programming language it is written in. For example, if it contains the code print("Hello, World!"), it identifies it as Python.
[0066] Step 5:
[0067] The server handles the conversion from the specified programming language (e.g. Python) to the target programming language (e.g. JavaScript), in this case converting print("Hello, World!") to console.log("Hello, World!");
[0068] Step 6:
[0069] After the server generates the transformed program code, it provides a natural language description of what the code does, in this case "This code will print the message 'Hello, World!' to the console."
[0070] Step 7:
[0071] The server transmits data including the converted code and an operation description to the terminal.
[0072] Step 8:
[0073] The terminal displays the converted code received from the server and its operation explanation to the user, allowing the user to compare the original code they entered with the converted code and understand its operation.
[0074] This process allows users to easily convert their program code into different programming languages and understand its specific behavior, making the system a useful tool, especially for beginners learning programming.
[0075] Example 1
[0076] 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."
[0077] Code conversion between programming languages has traditionally been difficult, especially for beginners, as it is difficult to understand different programming languages and perform appropriate conversions. Furthermore, understanding the behavior of the converted code requires specialized knowledge, which is a barrier to learning programming. Therefore, there is a need for a system that can easily convert program code entered by a user into a different programming language and understand its behavior in natural language.
[0078] 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.
[0079] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for providing the converted code and the operation explanation to the user, means for using a conversion algorithm for converting a specific programming language into a different programming language, means for converting argument portions, and means for storing the generated natural language explanation, thereby enabling a user to accurately convert their own program code into another language and easily understand its operation.
[0080] "User" refers to a person who operates the system and inputs or uses program code.
[0081] "Terminal" refers to electronic devices such as computers, smartphones, and tablets used by users.
[0082] "Server" refers to a computer system that is responsible for processing, translating, and interpreting input program code.
[0083] "Program code" refers to a set of instructions written in a particular programming language.
[0084] "Means for receiving" refers to a function for transferring program code input by a user through a terminal to a server.
[0085] The "means for identifying" refers to a function for identifying the programming language from the received program code.
[0086] "Means for performing conversion" refers to a function for converting program code in a specified programming language into another programming language.
[0087] "Means for explaining" refers to a function for explaining in natural language how the converted code will behave.
[0088] "Means for providing" refers to the function of communicating the converted program code and an explanation of its operation to the user.
[0089] "Transformation algorithm" refers to an algorithm for transforming code from one programming language to another.
[0090] An "argument" refers to data passed to a function or procedure in program code.
[0091] "Means for storing" refers to a function for saving the generated natural language explanation.
[0092] MODE FOR CARRYING OUT THE INVENTION
[0093] This invention is a system for converting program code entered by a user into another programming language and understanding the behavior of the converted code.
[0094] First, a user inputs program code through a terminal, such as a personal computer, smartphone, or tablet. The program code is entered by the user using a web browser or a dedicated application.
[0095] Next, the terminal sends the input program code to the server, which receives it via the network. HTTP or HTTPS is the typical communication protocol used.
[0096] The server analyzes the received program code and identifies the programming language. Specifically, it uses text analysis software to analyze the keywords and syntax in the code. For example, by detecting the keyword "print(" in the code, it can identify that the code is written in Python.
[0097] The server then translates the code from the identified programming language to the target language using a program translation algorithm or library, for example, converting the code print("Hello, World!") in Python to console.log("Hello, World!"); in JavaScript.
[0098] The server then uses a generative AI model to generate a natural language explanation of the behavior of the converted code, such as "This code prints the message 'Hello, World!' to the console."
[0099] Finally, the server sends the converted code and its description to the terminal, which receives it and displays it on the user interface. The user can easily check the original program code, the converted code, and its description.
[0100] As a specific example, the following embodiment can be considered: When a user inputs the Python code print("Hello, World!"), the following prompt sentence is input to the generative AI model, and the conversion process is executed:
[0101] Example prompt sentence:
[0102] "Convert the following Python code into JavaScript and explain its behavior in natural language. Code: print("Hello, World!")"
[0103] This allows users to easily convert their Python code into JavaScript and understand its behavior. This system improves the efficiency of programming learning and makes it easy for beginners to learn different programming languages.
[0104] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0105] Step 1:
[0106] A user inputs program code through a terminal. For example, a user inputs the Python code print("Hello, World!") into a browser input field and clicks the submit button. By doing this, the user provides the code as input data to the terminal. As output, this input data is passed to the next processing step.
[0107] Step 2:
[0108] The terminal sends the entered program code to the server. Specifically, the terminal creates an HTTP POST request and sends the entered code in the request body to the server. The code provided by the user is included as input, and the server receives the request as output.
[0109] Step 3:
[0110] The server receives the HTTP request and analyzes the code sent. The program code received from the terminal as input is stored in a memory buffer, and the code is sent to the analysis process as output. Specifically, the server reads the contents of the code as a string.
[0111] Step 4:
[0112] The server identifies the programming language of the parsed code. It receives the parsed code as input and uses text analysis software to analyze keywords and grammatical structures. For example, if the code contains the keyword "print(", it will identify that the code is written in Python. As output, the identified programming language is passed to the next processing step.
[0113] Step 5:
[0114] The server performs the translation from the identified programming language to the target language. It includes the identified programming language and the original code as input. It uses a program translation algorithm to convert, for example, Python print("Hello, World!") to JavaScript console.log("Hello, World!");. As output, it generates the translated code.
[0115] Step 6:
[0116] The server provides a natural language description of the behavior of the transformed code. It contains the transformed code as input and uses a generative AI model to generate text that describes the behavior of that code. For example, for console.log("Hello, World!"); it generates the description "This code displays the message 'Hello, World!' in the console." As output, it provides the generated natural language description.
[0117] Step 7:
[0118] The server sends the converted code and its description to the terminal. The converted code and the generated description are included as input, and are returned to the terminal as an HTTP response. The terminal receives the data as output.
[0119] Step 8:
[0120] The terminal displays the received converted code and its explanation in the user interface. Specifically, it displays the converted JavaScript code and its explanation in the display area of a web page or application. The input contains the data received from the server, and the output allows the user to visually confirm its contents.
[0121] (Application example 1)
[0122] 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."
[0123] Traditional programming education methods have made it difficult to efficiently learn multiple programming languages. Furthermore, there is a lack of systems that support real-time code conversion and understanding of code behavior during learning, which has been an obstacle to learning. Furthermore, there is also the problem of a lack of effective learning support in virtual classroom environments, which do not require a physical classroom.
[0124] 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.
[0125] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for providing the converted code and the explanation of its operation to the user, means for allowing the user to enter code and check the results in a virtual classroom environment, and means for supporting interaction between the user and other users or a virtual teacher in the virtual classroom. This allows for efficient learning of multiple programming languages and supports real-time code conversion and understanding of operation. Furthermore, the effectiveness of learning can be enhanced through interaction in the virtual classroom environment.
[0126] The "means for receiving the initial program code entered by the user" is a function that allows the server to receive the program code entered by the user through the terminal.
[0127] The "means for identifying the programming language of the received program code" is a function for identifying the description language of the program code received by the server.
[0128] "Means for converting from a specified programming language to another programming language" refers to a function for converting code in a specified programming language into another programming language.
[0129] "Means for explaining the behavior of the converted code in natural language" is a function for expressing the behavior of the converted program code in natural language.
[0130] The "means for providing the converted code and its operation explanation to the user" is a function for displaying the converted code and its explanation to the user.
[0131] "Means for allowing users to input code and check the results in a virtual classroom environment" is a function that allows users to input program code in a virtual space and check the results.
[0132] The "means for supporting interactions between a user and other users or a virtual teacher in a virtual classroom" is a function that supports a user in communicating with other users or a virtual teacher in a virtual classroom.
[0133] The present invention provides a system for assisting users in converting program code into different programming languages and understanding its operation. Specific embodiments of this system will be described below.
[0134] 1. Overview of the entire system
[0135] The system consists of the following main components:
[0136] A device that receives user input
[0137] Server that analyzes, converts, and generates explanations for code
[0138] Virtual classroom interface providing a virtual classroom environment
[0139] 2. User Input and Server Processing
[0140] User operations
[0141] Users log in to the virtual classroom through their terminals. Within the virtual classroom, users use an interface to input program code. Specifically, the following operations are possible:
[0142] Entering program code (e.g., "print("Hello, World!")")
[0143] Selecting a transformation language (e.g. Python to JavaScript)
[0144] Server Processing
[0145] The server performs the transaction using the following means:
[0146] "Means for receiving the initial program code entered by the user"
[0147] "Means for identifying the programming language of received program code"
[0148] "Means of converting from a specific programming language to another programming language"
[0149] "A means of explaining in natural language what the transformed code will do"
[0150] "A means of providing the user with the converted code and an explanation of its operation"
[0151] Specifically, the server receives program code entered by a user, identifies the programming language of the code, converts it from the identified programming language into a target language, and explains the behavior of the converted code in an easy-to-understand natural language.The user can then view the converted code and its explanation in the virtual classroom.
[0152] 3. Virtual Classroom Environment
[0153] The virtual classroom environment provides the following features:
[0154] "A means of letting users enter code and see the results in a virtual classroom environment"
[0155] "Means for supporting user interaction with other users or virtual teachers within a virtual classroom"
[0156] Users can enter program code and check the results in a virtual classroom. This environment is provided through devices such as smartphones and head-mounted displays (HMDs). Users can learn by interacting with other users and virtual teachers in real time, improving their learning effectiveness.
[0157] 4. Hardware and Software Used
[0158] Hardware:
[0159] Server: A server with high-performance data processing capabilities
[0160] Devices: smartphone, head-mounted display (HMD)
[0161] software:
[0162] Server-side software: Web application using the Flask framework
[0163] User Interface: Virtual Classroom Environment
[0164] 5. Examples of concrete examples and prompts
[0165] As a concrete example, a user wears a head-mounted display and types "print("Hello, World!")" in a virtual classroom. This code is sent to the server and converted into the JavaScript code "console.log("Hello, World!");". The server generates an explanation for this converted code, such as "This code will display the message 'Hello, World!' in the console," and sends it back to the user.
[0166] Example prompt for a generative AI model:
[0167] Convert Python code to JavaScript. For example, convert print("Hello, World!") to console.log("Hello, World!");
[0168] This invention allows for efficient learning of multiple programming languages, supports real-time code conversion and behavioral understanding, and enhances learning through interaction in a virtual classroom environment.
[0169] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0170] Step 1:
[0171] A user logs in to a terminal and accesses a virtual classroom environment. Here, the user uses an interface within the virtual classroom to input program code and select the programming language for conversion. For example, the user might input "print('Hello, World!')" and select the Python to JavaScript conversion. Based on the input, the terminal sends the input code and selection to the server.
[0172] Step 2:
[0173] The server receives the program code and selection information sent from the terminal. Based on the received data, the server begins analyzing the code. First, the server analyzes the code and identifies the programming language. For example, if the code "print("Hello, World!")" is received, the server detects the keyword "print(" and identifies it as Python.
[0174] Step 3:
[0175] The server performs the conversion from the specified programming language (here, Python) to the target language (here, JavaScript). The server uses a specific conversion logic to convert the Python code "print("Hello, World!")" into the JavaScript code "console.log("Hello, World!");". This conversion is performed based on predefined conversion rules.
[0176] Step 4:
[0177] Based on the converted code, the server explains the code's behavior in natural language. In this case, for the converted code "console.log("Hello, World!");", the server generates an explanation such as "This code displays the message 'Hello, World!' on the console." The server prepares the generated explanation in parallel.
[0178] Step 5:
[0179] The server compiles the converted program code and a description of its behavior and sends it back to the terminal. The returned data includes the original code, the converted code, and its natural language description. For example, it includes the original Python code "print("Hello, World!")", the converted JavaScript code "console.log("Hello, World!");", and the natural language description "This code will print the message 'Hello, World!' to the console."
[0180] Step 6:
[0181] The terminal displays the received data to the user. In the virtual classroom environment, the user can see the original code, the converted code, and a description of its operation. This allows the user to understand how the code they entered is implemented in other programming languages and understand its operation.
[0182] Step 7:
[0183] Within the virtual classroom environment, users interact with each other and with the virtual teacher as they learn, and can ask for comments on their results or follow-up questions, encouraging deeper exploration and improved understanding of the material.
[0184] Through this series of processes, users can efficiently learn multiple programming languages in a virtual classroom environment and are supported in real-time code conversion and behavioral understanding.
[0185] 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.
[0186] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. Specific embodiments of this system will be described below.
[0187] First, the user uses the terminal to input the program code to be converted. For example, the user inputs the Python code print("Hello, World!"). This input code is sent to the server by the terminal.
[0188] The server has a way to analyze the received code and identify the programming language it is in. For example, if the received code contains the keyword "print(", the server will identify that the code is written in Python.
[0189] The server then converts the specified programming language to another programming language. For example, when converting from Python to JavaScript, it converts print("Hello, World!") to console.log("Hello, World!");. This conversion process is performed by a conversion means running on the server.
[0190] Furthermore, the server generates a natural language explanation of the behavior of the converted program code. In this case, the code "console.log("Hello, World!");" generates an explanation such as "This code displays the message 'Hello, World!' on the console."
[0191] A distinctive feature of the present invention is the incorporation of an emotion engine. When a user inputs program code, the emotion of the user is recognized based on the user's facial expression, tone of voice, input speed, etc. For example, the user's facial expression and tone of voice can be detected using a camera or microphone, and the emotion engine analyzes this information.
[0192] Based on the emotions recognized by the emotion engine, the server can adjust the way it presents the output: for example, if the user is nervous, it can provide a more detailed explanation or display an encouraging message, or if the user is relaxed, it can provide a concise explanation.
[0193] For example, when a user types the Python code print("Hello, World!"), the following steps occur:
[0194] 1. The user enters the code into the terminal and presses the send button.
[0195] 2. The device sends the entered code to the server.
[0196] 3. The server receives the code and identifies its programming language.
[0197] 4. The server performs the conversion from the identified language to the target language (JavaScript in this case).
[0198] 5. The server explains in natural language what the converted code does.
[0199] 6. The emotion engine recognizes the user's emotions. For example, if the user is nervous when typing, that information is analyzed by the emotion engine.
[0200] 7. The server then adjusts the presentation of the converted code and instructions based on the perceived emotion, for example by displaying an encouraging message like "Good luck."
[0201] 8. The server sends the converted code, a description of its operation, and additional comments based on the emotion to the device.
[0202] 9. The device displays the information received from the server to the user, allowing the user to compare the original code they entered with the converted code, understand how it works, and receive encouragement from support messages.
[0203] This process allows users to easily convert their own program code into different programming languages and understand its specific behavior. Furthermore, the emotional engine's support makes learning programming smoother and reduces the psychological burden. This system is especially useful for beginners learning programming.
[0204] The processing flow will be explained below.
[0205] Understood. The process flow will be explained below in concrete steps.
[0206] Step 1:
[0207] The user accesses a terminal and enters the program code they want to convert, for example, the Python code print("Hello, World!").
[0208] Step 2:
[0209] The terminal converts the program code entered by the user into a data format and transmits the data to the server.
[0210] Step 3:
[0211] The server receives the program code data from the terminal and begins analyzing it.
[0212] Step 4:
[0213] The server analyzes the content of the program code and identifies the programming language it is written in. For example, if it contains the code print("Hello, World!"), it identifies it as Python.
[0214] Step 5:
[0215] The server handles the conversion from the specified programming language (e.g. Python) to the target programming language (e.g. JavaScript), in this case converting print("Hello, World!") to console.log("Hello, World!");
[0216] Step 6:
[0217] After the server generates the transformed program code, it provides a natural language description of what the code does, in this case "This code will print the message 'Hello, World!' to the console."
[0218] Step 7:
[0219] The device sends data to the emotion engine to analyze the user's facial expressions and tone of voice, including information collected through the camera and microphone.
[0220] Step 8:
[0221] The emotion engine recognizes the user's emotions. For example, if the user is nervous, this information will be analyzed by the emotion engine.
[0222] Step 9:
[0223] The server adjusts the presentation of the converted code and instructions based on the perceived emotion. For example, if the user is nervous, it adds an encouraging message like "Good luck."
[0224] Step 10:
[0225] The server sends the converted code, a description of the operation, and additional comments based on the emotion to the terminal.
[0226] Step 11:
[0227] The terminal displays the information received from the server to the user, including the converted code, an operation description, and an emotion-based support message, allowing the user to compare the original code they entered with the converted code, understand the operation, and be encouraged by the support message.
[0228] This system allows users to convert program code into different programming languages and understand its specific operations. Supported by an emotional engine, this system makes learning programming smoother and reduces the psychological burden.
[0229] Example 2
[0230] 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."
[0231] Conventional programming code conversion systems are limited to conversion functions between different programming languages and do not provide sufficient support for intuitively understanding the behavior of the code. Furthermore, because output adjustments are not performed taking into account the user's feelings or level of understanding, they are difficult to use, especially for beginners, and have the problem of not being able to fully achieve the learning effect.
[0232] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for receiving the initial program code input by the user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for recognizing the user's emotions and adjusting the presentation method of the output result based on the recognition result, and means for providing the converted code and an explanation of its operation to the user. This allows the user to not only convert code into a different programming language, but also intuitively understand the operation of the code, and further allows the user to receive support that takes into consideration the user's emotions.
[0233] "User" refers to a person who operates this system and inputs or views program code.
[0234] "Terminal" means the device through which a User accesses the System, enters the code, and receives the results. This may include a computer, smartphone, or tablet.
[0235] "Server" refers to the central device or system that receives, analyzes, and processes program code sent by users.
[0236] "Program code" refers to a series of instructions written in a particular programming language.
[0237] A "programming language" refers to a type of language used to write instructions for a computer. Examples include Python and JavaScript.
[0238] "Conversion" refers to the operation of changing code written in one programming language into another programming language.
[0239] "Natural language" refers to words and sentences that humans use on a daily basis, such as English and Japanese.
[0240] "Emotion" refers to the mental state or sensation that a user experiences when inputting or operating program code, including states such as relaxed or tense.
[0241] An "emotion engine" refers to a function or system that analyzes a user's emotions based on data such as the user's facial expressions and tone of voice.
[0242] The "means for receiving" refers to a method or device for inputting the program code entered by the user into the server.
[0243] "Means for identifying" refers to a method or apparatus for finding out the programming language of received program code.
[0244] "Means for explaining" refers to a method or device for expressing the operation of the converted program code in an easy-to-understand natural language.
[0245] "Means for providing" refers to a method or device for communicating the converted code and its explanation to the user.
[0246] The "means for recognizing" refers to a method or device for grasping the user's emotions.
[0247] The "adjusting means" refers to a method or device for appropriately changing the way in which the output result is presented based on the user's emotions.
[0248] MODE FOR CARRYING OUT THE INVENTION
[0249] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. Specific embodiments of this system will be described below.
[0250] 1. System Configuration
[0251] Hardware Configuration
[0252] Terminal: A device through which a user inputs program code and receives the results, such as a computer, smartphone, or tablet.
[0253] Server: A central device that receives, analyzes, and processes program code sent by users.
[0254] Camera and microphone: Devices that capture the user's facial expressions and tone of voice, thereby detecting the user's emotions.
[0255] Software Configuration
[0256] Programming language detection library (e.g., pylang-detector): Software that identifies the programming language of received code.
[0257] Program translation engine (e.g., BabelFish): Software that translates from one programming language to another.
[0258] Natural language generation engine (e.g., GPT-3 (registered trademark)): Software that explains the behavior of converted program code in natural language.
[0259] Emotion recognition engine (e.g., Affectiva): Software that analyzes a user's emotions.
[0260] 2. System Operation
[0261] The user uses the terminal to enter the program code to be converted.
[0262] For example, the user enters the Python code print("Hello, World!").
[0263] The camera and microphone connected to the device capture the user's facial expressions and tone of voice.
[0264] The device sends the entered code to the server
[0265] When the submit button is pressed, the terminal sends the code to the server in the form of a POST request.
[0266] The server receives the code and identifies its programming language
[0267] The server analyzes the received code using a programming language detection library and identifies it as Python code.
[0268] The server performs the translation from the specified programming language to another programming language.
[0269] The server uses the BabelFish library to convert the Python code into the JavaScript code console.log("Hello, World!");
[0270] The server explains the behavior of the converted program code in natural language
[0271] It uses a natural language generation engine (GPT-3) to generate an explanation: "This code will print the message 'Hello, World!' to the console."
[0272] Emotion engine recognizes user emotions
[0273] The user's facial expressions and tone of voice data sent to the server are analyzed by an emotion engine (Affectiva) and the system assesses whether the user is nervous.
[0274] The server adjusts the presentation of the output based on the recognized emotion.
[0275] For example, add an encouraging message such as "Do your best" to a user who is feeling nervous.
[0276] The server sends the converted code, a description of its operation, and additional comments based on emotions to the device.
[0277] The results are sent in JSON format and include the converted code, an explanation of how it works, and an encouraging message.
[0278] The device displays the information received from the server to the user.
[0279] The device will then display the converted JavaScript code, instructions on how it works, and an encouraging message on the screen.
[0280] 3. Examples and prompts
[0281] Examples:
[0282] The user enters the Python code print("Hello, World!") and presses the send button. The device sends the entered code to the server, which receives and analyzes the code, converts it from Python to JavaScript, and converts it into the code "console.log("Hello, World!");". Next, it explains the behavior of the converted code in natural language, providing an example that "This code will display the message 'Hello, World!' on the console." Furthermore, because the emotion engine recognizes that the user is nervous, it also adds an encouraging message saying "Good luck." Finally, the device displays this information to the user.
[0283] Example prompt sentence:
[0284] "Convert the Python code into JavaScript. The code is as follows: print("Hello, World!")"
[0285] This allows users to easily understand how to convert code into different programming languages and how it works, and they can also progress through their programming studies while receiving psychological support from the emotion engine.
[0286] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0287] Step 1: User enters program code into terminal
[0288] The user uses a text editor in the terminal to enter the program code to be converted. For example, the user enters the Python code print("Hello, World!").
[0289] Input: Python code that the user types into the terminal.
[0290] Output: Python code displayed in a terminal text editor.
[0291] Specifically, the user types code into a text editor using a keyboard.
[0292] Step 2: The device sends the entered code to the server
[0293] The terminal sends the code entered by the user to the server, specifically in the form of a POST request over the network.
[0294] Input: Python code entered by the user.
[0295] Output: The Python code sent to the server.
[0296] Specifically, when the send button is pressed, the terminal sends the code to the server as an HTTP request.
[0297] Step 3: The server receives the code and identifies the programming language
[0298] The server receives the code sent from the device. It analyzes the received code and uses a programming language detection library to identify the programming language it is in. For example, it identifies the code as Python based on the keyword "print(".
[0299] Input: Python code sent from the terminal.
[0300] Output: Code information with programming language identified.
[0301] Specifically, the server reads the code and performs an analysis based on keywords.
[0302] Step 4: Translate from the server-specific language to another programming language
[0303] The server converts the identified programming language (Python) to the target language (JavaScript). It uses the BabelFish library to convert the Python code print("Hello, World!") to the JavaScript code console.log("Hello, World!");
[0304] Input: Python code with programming language specified.
[0305] Output: Code converted to JavaScript.
[0306] Specifically, the server passes the code to a conversion engine to convert it into the desired target language.
[0307] Step 5: The server explains the behavior of the converted program code in natural language.
[0308] The server uses a generative AI model (e.g., GPT-3) to explain the behavior of the converted program code in natural language. For example, for the code "console.log("Hello, World!");", it generates an explanation such as "This code displays the message 'Hello, World!' in the console."
[0309] Input: Code converted to JavaScript.
[0310] Output: A natural language description of the behavior.
[0311] Specifically, the server inputs code into the generative AI model and receives an explanation in natural language.
[0312] Step 6: The emotion engine recognizes the user's emotion
[0313] The device uses a camera and microphone to capture the user's facial expressions and tone of voice, and sends the data to a server, which then analyzes the data with an emotion recognition engine (e.g., Affectiva) to identify the user's emotions.
[0314] Input: The captured user's facial expressions and tone of voice.
[0315] Output: Parsed user emotion information.
[0316] Specifically, the device sends the collected data to the server, where the emotion recognition engine analyzes the data.
[0317] Step 7: The server adjusts the output based on the recognized emotion.
[0318] The server adjusts the presentation of the output based on the recognized emotion, for example adding an encouraging message like "Good luck" if the user is nervous.
[0319] Input: Parsed user emotion information.
[0320] Output: The adjusted output result.
[0321] Specifically, the server dynamically changes the description and comments based on the emotion.
[0322] Step 8: The server sends the converted code, operation instructions, and additional comments to the terminal.
[0323] The server sends the converted code, a natural language description of the action, and additional comments based on the sentiment to the device. The data is sent in JSON format.
[0324] Input: The adjusted output result.
[0325] Output: The code sent to the terminal, a description, and any additional comments.
[0326] Specifically, the server packages the results in JSON format and sends them to the terminal as an HTTP response.
[0327] Step 9: The device displays the information received from the server to the user.
[0328] The terminal visually displays the information received from the server to the user, allowing the user to check the converted code, operation instructions, and encouraging messages.
[0329] Input: The code sent by the server, a description, and any additional comments.
[0330] Output: The converted code that will be displayed to the user, along with a description and any additional comments.
[0331] Specifically, the terminal analyzes the received data and displays it on the user interface.
[0332] This process allows users to intuitively and effectively convert program code and understand its behavior. Emotion recognition also provides psychological support to users.
[0333] (Application example 2)
[0334] 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."
[0335] Conventional programming learning support systems convert code into different programming languages and provide explanations to help users understand its operation, but they have the problem of being unable to flexibly respond to the user's emotions. In particular, if a beginner feels nervous or anxious, they may not be able to provide appropriate support, which could reduce the effectiveness of their learning. The objective of this invention is to improve the efficiency of programming learning by providing operation explanations and support messages that are tailored to the user's emotional state.
[0336] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0337] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, emotion analysis means for recognizing the user's facial expression and tone of voice to analyze their emotion, means for adjusting the operation explanation and additional message based on the analyzed emotion, and means for providing the converted code, operation explanation, and additional message based on the emotion to the user. This enables flexible program code conversion and explanation according to the user's emotion.
[0338] The "means for receiving the initial program code entered by the user" is a function for transmitting the program code entered by the user into the terminal to the server and for the server to receive it.
[0339] The "means for identifying the programming language of the received program code" is a processing function for identifying the programming language in which the transmitted program code is written.
[0340] The "means for converting from the identified programming language to another programming language" is a processing function for converting code in the identified programming language into another specified programming language.
[0341] "Means for explaining the behavior of the converted code in natural language" is a function for generating an easy-to-understand natural language explanation of how the converted program code operates.
[0342] "Emotion analysis means for recognizing a user's facial expression and tone of voice to analyze emotions" is a function that uses a camera and microphone to analyze a user's facial expression and tone of voice to recognize their emotional state at that time.
[0343] The "means for adjusting the operation explanation and additional message based on the analyzed emotion" is a function for adjusting the content and format of the operation explanation and additional message according to the recognized emotional state of the user.
[0344] The "means for providing the user with the converted code, an explanation of its operation, and an additional message based on the user's emotion" is a function for ultimately displaying the converted program code, an explanation of its operation, and an additional message tailored to the user's emotional state to the user on the terminal.
[0345] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. The system receives code entered by a user, analyzes it, converts it from a specific programming language to a different language, and then explains its behavior in natural language. It also has the ability to analyze the user's emotions and adjust the content and format of the behavior explanation based on that analysis. Specific embodiments for implementing this invention are described below.
[0346] A user inputs the first program code using a device such as a smartphone, tablet, or PC. For example, the user inputs the Python code "print("Hello, World!")". This input code is sent to the server by the device. The server executes the following steps:
[0347] First, the server has a means for receiving input code and receives the program code sent by the user. Next, it uses a program code language identification means, which is a means for analyzing the received code, to determine which programming language the code is in. For this determination, it uses a method for identifying that the code is Python based on the keyword "print(".
[0348] Next, the server has a means to convert the specified programming language into another programming language. For example, when converting from Python to JavaScript, it converts the received code "print("Hello, World!")" into "console.log("Hello, World!");". This conversion process is performed based on pre-defined conversion rules.
[0349] Furthermore, the server has a means to explain the behavior of the converted code in natural language. For the converted code "console.log("Hello, World!");", it generates a description such as "This code displays the message 'Hello, World!' on the console." This description is written in natural language so that users can easily understand it.
[0350] The server also uses hardware such as a camera and microphone to analyze the user's emotional state. It has an emotion analysis means that analyzes the user's facial expressions and tone of voice, and based on this information, it recognizes emotions such as whether the user is nervous or relaxed. The analyzed emotional information is used to adjust the content and presentation method of the action instructions. For example, if the user is nervous, it may provide more detailed instructions and display additional encouraging messages. Specifically, it may display a message such as "Do your best."
[0351] Finally, the system has a means for providing the user with the converted code, an explanation of the operation, and an additional message based on emotions. This information is sent to the terminal and displayed on the user's screen. This allows the user to compare the original code they entered with the converted code, understand the operation, and receive encouragement from the support message based on emotions.
[0352] As a concrete example, when a user enters the Python code "print("Hello, World!")", the process takes place in the following steps: When the user enters the code into a terminal and presses the send button, the terminal sends the entered code to the server. The server receives the code and identifies its programming language. Next, the server converts the identified language into the target language (JavaScript in this case). It generates a natural language explanation of the operation of the converted code and recognizes the user's emotions using sentiment analysis means. Finally, the server adjusts the presentation method of the converted code and operation explanation based on the recognized emotions, and provides information to the user, including additional comments.
[0353] Example prompt:
[0354] The user says, "I want to convert some Python code to JavaScript." Convert the following Python code into JavaScript and explain how it works clearly. Python code: print("Hello, World!") The user seems nervous. Based on this, you should provide more details and include an encouraging message.
[0355] According to this invention, a user can receive flexible programming learning support according to his / her emotions, thereby improving learning efficiency.
[0356] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0357] Step 1:
[0358] The user enters the program code into the terminal and presses the send button.
[0359] Input: Python code print("Hello, World!")
[0360] Specific operation: The user enters the code into the text editor and clicks the send button. The device sends this code to the server.
[0361] Step 2:
[0362] The server receives the entered code.
[0363] Input: Python code sent from the terminal
[0364] Output: Received program code
[0365] Specific operation: The server receives the code sent from the user through the network interface.
[0366] Step 3:
[0367] The server identifies the programming language of the received program code.
[0368] Input: Received program code print("Hello, World!")
[0369] Output: Programming language (Python)
[0370] What happens: The server performs a syntax analysis on the code and determines that it is written in Python because it contains the keyword "print(".
[0371] Step 4:
[0372] The server performs the conversion from the specified programming language to the target language (JavaScript).
[0373] Input: Programming language (Python) and program code
[0374] Output: Transformed code console.log("Hello, World!");
[0375] Specific operation: The server performs a conversion process to convert Python code into JavaScript code based on the conversion rules.
[0376] Step 5:
[0377] The server explains in natural language what the converted code does.
[0378] Input: Transformed code console.log("Hello, World!");
[0379] Output: Description: "This code prints the message 'Hello, World!' to the console."
[0380] Specific behavior: The server simulates the execution results of the converted code and generates a description to express the behavior in natural language.
[0381] Step 6:
[0382] The server recognizes the user's facial expressions and tone of voice to analyze their emotions.
[0383] Input: Camera video, microphone audio
[0384] Output: User's emotional state (tense)
[0385] How it works: The server uses the device's camera and microphone to capture the user's facial expressions and tone of voice, then analyzes the data using an emotion analysis engine to determine their emotional state.
[0386] Step 7:
[0387] The server adjusts the action description and additional messages based on the analyzed emotions.
[0388] Input: Action description and user's emotional state
[0389] Output: Tailored behavior explanation and encouragement message
[0390] What it does: If the user is nervous, the server provides a more detailed explanation and adds an encouraging message such as "Good luck."
[0391] Step 8:
[0392] The server transmits the converted code and the action description, as well as an additional message based on the emotion, to the terminal.
[0393] Input: converted code, adjusted behavior description, additional message
[0394] Output: Information to display on the terminal
[0395] Specific operations: The server composes the final data into packets and sends them to the terminal, which prepares the information to display to the user.
[0396] Step 9:
[0397] The terminal displays the information received from the server to the user.
[0398] Input: Information sent from the server
[0399] Output: The converted code displayed to the user, along with a description of what happened and any additional messages.
[0400] Specific operation: The terminal parses the received data and converts it into the appropriate format for display on the screen. On the screen, the user can see the code they entered, the converted code, operation instructions, and encouraging messages.
[0401] This process flow allows the user to receive flexible program code conversion and explanations that correspond to their emotions, improving the learning effect.
[0402] 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.
[0403] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (registered trademark) (Internet search engine).<URL: https: / / openai.com / blog / chatgpt> ), Gemini (registered trademark) (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.
[0404] 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.
[0405] [Second embodiment]
[0406] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0407] 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.
[0408] 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).
[0409] 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.
[0410] 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.
[0411] 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).
[0412] 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.
[0413] 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.
[0414] 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.
[0415] 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.
[0416] In the smart glasses 214, 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.
[0417] 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."
[0418] The present invention provides a system for assisting users in converting program code into different programming languages and understanding its operation. Specific embodiments of this system will be described below.
[0419] First, the user inputs the first program code through the terminal. For example, the user inputs the code written in Python, print("Hello, World!"). This input code is sent to the server by the terminal.
[0420] The server has a way to analyze the received code and identify the programming language it is in. For example, if the received code contains the keyword "print(", the server will identify that the code is written in Python.
[0421] The server then converts the specified programming language into another programming language. For example, when converting from Python to JavaScript, it converts print("Hello, World!") into console.log("Hello, World!");. This conversion process is performed by a conversion means running on the server.
[0422] After generating the transformed code, the server generates a natural language description to help understand what the code does. For example, the code "console.log("Hello, World!");" generates a description such as "This code prints the message 'Hello, World!' to the console."
[0423] The converted code and its operation explanation are then sent to the terminal and provided to the user, who can check the original code (Python) they entered and the converted code (JavaScript), and understand what the code does through the operation explanation.
[0424] As a specific example, the following embodiment can be considered: When a user enters the Python code print("Hello, World!"), the following steps are taken:
[0425] 1. The user enters the code into the terminal and presses the send button.
[0426] 2. The device sends the entered code to the server.
[0427] 3. The server receives the code and identifies its programming language.
[0428] 4. The server converts the identified language to the target language (JavaScript in this case).
[0429] 5. The server explains in natural language what the converted code does.
[0430] 6. The server sends the converted code and operation instructions to the terminal.
[0431] 7. The terminal displays the converted code and an explanation of its operation to the user.
[0432] This invention allows users to easily convert the code they have written into other programming languages and understand its behavior, lowering the barrier to learning programming and allowing even beginners to learn efficiently.
[0433] The processing flow will be explained below.
[0434] Understood. The process flow will be explained below in concrete steps.
[0435] Step 1:
[0436] The user accesses a terminal and enters the program code they want to convert. For example, they provide the Python code print("Hello, World!") as input.
[0437] Step 2:
[0438] The terminal converts the program code entered by the user into a data format and transmits the data to the server.
[0439] Step 3:
[0440] The server receives the program code data from the terminal and begins analyzing it.
[0441] Step 4:
[0442] The server analyzes the content of the program code and identifies the programming language it is written in. For example, if it contains the code print("Hello, World!"), it identifies it as Python.
[0443] Step 5:
[0444] The server handles the conversion from the specified programming language (e.g. Python) to the target programming language (e.g. JavaScript), in this case converting print("Hello, World!") to console.log("Hello, World!");
[0445] Step 6:
[0446] After the server generates the transformed program code, it provides a natural language description of what the code does, in this case "This code will print the message 'Hello, World!' to the console."
[0447] Step 7:
[0448] The server transmits data including the converted code and an operation description to the terminal.
[0449] Step 8:
[0450] The terminal displays the converted code received from the server and its operation explanation to the user, allowing the user to compare the original code they entered with the converted code and understand its operation.
[0451] This process allows users to easily convert their program code into different programming languages and understand its specific behavior, making the system a useful tool, especially for beginners learning programming.
[0452] Example 1
[0453] 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."
[0454] Code conversion between programming languages has traditionally been difficult, especially for beginners, as it is difficult to understand different programming languages and perform appropriate conversions. Furthermore, understanding the behavior of the converted code requires specialized knowledge, which is a barrier to learning programming. Therefore, there is a need for a system that can easily convert program code entered by a user into a different programming language and understand its behavior in natural language.
[0455] 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.
[0456] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for providing the converted code and the operation explanation to the user, means for using a conversion algorithm for converting a specific programming language into a different programming language, means for converting argument portions, and means for storing the generated natural language explanation, thereby enabling a user to accurately convert their own program code into another language and easily understand its operation.
[0457] "User" refers to a person who operates the system and inputs or uses program code.
[0458] "Terminal" refers to electronic devices such as computers, smartphones, and tablets used by users.
[0459] "Server" refers to a computer system that is responsible for processing, translating, and interpreting input program code.
[0460] "Program code" refers to a set of instructions written in a particular programming language.
[0461] "Means for receiving" refers to a function for transferring program code input by a user through a terminal to a server.
[0462] The "means for identifying" refers to a function for identifying the programming language from the received program code.
[0463] "Means for performing conversion" refers to a function for converting program code in a specified programming language into another programming language.
[0464] "Means for explaining" refers to a function for explaining in natural language how the converted code will behave.
[0465] "Means for providing" refers to the function of communicating the converted program code and an explanation of its operation to the user.
[0466] "Transformation algorithm" refers to an algorithm for transforming code from one programming language to another.
[0467] An "argument" refers to data passed to a function or procedure in program code.
[0468] "Means for storing" refers to a function for saving the generated natural language explanation.
[0469] MODE FOR CARRYING OUT THE INVENTION
[0470] This invention is a system for converting program code entered by a user into another programming language and understanding the behavior of the converted code.
[0471] First, a user inputs program code through a terminal, such as a personal computer, smartphone, or tablet. The program code is entered by the user using a web browser or a dedicated application.
[0472] Next, the terminal sends the input program code to the server, which receives it via the network. HTTP or HTTPS is the typical communication protocol used.
[0473] The server analyzes the received program code and identifies the programming language. Specifically, it uses text analysis software to analyze the keywords and syntax in the code. For example, by detecting the keyword "print(" in the code, it can identify that the code is written in Python.
[0474] The server then translates the code from the identified programming language to the target language using a program translation algorithm or library, for example, converting the code print("Hello, World!") in Python to console.log("Hello, World!"); in JavaScript.
[0475] The server then uses a generative AI model to generate a natural language explanation of the behavior of the converted code, such as "This code prints the message 'Hello, World!' to the console."
[0476] Finally, the server sends the converted code and its description to the terminal, which receives it and displays it on the user interface. The user can easily check the original program code, the converted code, and its description.
[0477] As a specific example, the following embodiment can be considered: When a user inputs the Python code print("Hello, World!"), the following prompt sentence is input to the generative AI model, and the conversion process is executed:
[0478] Example prompt sentence:
[0479] "Convert the following Python code into JavaScript and explain its behavior in natural language. Code: print("Hello, World!")"
[0480] This allows users to easily convert their Python code into JavaScript and understand its behavior. This system improves the efficiency of programming learning and makes it easy for beginners to learn different programming languages.
[0481] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0482] Step 1:
[0483] A user inputs program code through a terminal. For example, a user inputs the Python code print("Hello, World!") into a browser input field and clicks the submit button. By doing this, the user provides the code as input data to the terminal. As output, this input data is passed to the next processing step.
[0484] Step 2:
[0485] The terminal sends the entered program code to the server. Specifically, the terminal creates an HTTP POST request and sends the entered code in the request body to the server. The code provided by the user is included as input, and the server receives the request as output.
[0486] Step 3:
[0487] The server receives the HTTP request and analyzes the code sent. The program code received from the terminal as input is stored in a memory buffer, and the code is sent to the analysis process as output. Specifically, the server reads the contents of the code as a string.
[0488] Step 4:
[0489] The server identifies the programming language of the parsed code. It receives the parsed code as input and uses text analysis software to analyze keywords and grammatical structures. For example, if the code contains the keyword "print(", it will identify that the code is written in Python. As output, the identified programming language is passed to the next processing step.
[0490] Step 5:
[0491] The server performs the translation from the identified programming language to the target language. It includes the identified programming language and the original code as input. It uses a program translation algorithm to convert, for example, Python print("Hello, World!") to JavaScript console.log("Hello, World!");. As output, it generates the translated code.
[0492] Step 6:
[0493] The server provides a natural language description of the behavior of the transformed code. It contains the transformed code as input and uses a generative AI model to generate text that describes the behavior of that code. For example, for console.log("Hello, World!"); it generates the description "This code displays the message 'Hello, World!' in the console." As output, it provides the generated natural language description.
[0494] Step 7:
[0495] The server sends the converted code and its description to the terminal. The converted code and the generated description are included as input, and are returned to the terminal as an HTTP response. The terminal receives the data as output.
[0496] Step 8:
[0497] The terminal displays the received converted code and its explanation in the user interface. Specifically, it displays the converted JavaScript code and its explanation in the display area of a web page or application. The input contains the data received from the server, and the output allows the user to visually confirm its contents.
[0498] (Application example 1)
[0499] 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."
[0500] Traditional programming education methods have made it difficult to efficiently learn multiple programming languages. Furthermore, there is a lack of systems that support real-time code conversion and understanding of code behavior during learning, which has been an obstacle to learning. Furthermore, there is also the problem of a lack of effective learning support in virtual classroom environments, which do not require a physical classroom.
[0501] 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.
[0502] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for providing the converted code and the explanation of its operation to the user, means for allowing the user to enter code and check the results in a virtual classroom environment, and means for supporting interaction between the user and other users or a virtual teacher in the virtual classroom. This allows for efficient learning of multiple programming languages and supports real-time code conversion and understanding of operation. Furthermore, the effectiveness of learning can be enhanced through interaction in the virtual classroom environment.
[0503] The "means for receiving the initial program code entered by the user" is a function that allows the server to receive the program code entered by the user through the terminal.
[0504] The "means for identifying the programming language of the received program code" is a function for identifying the description language of the program code received by the server.
[0505] "Means for converting from a specified programming language to another programming language" refers to a function for converting code in a specified programming language into another programming language.
[0506] "Means for explaining the behavior of the converted code in natural language" is a function for expressing the behavior of the converted program code in natural language.
[0507] The "means for providing the converted code and its operation explanation to the user" is a function for displaying the converted code and its explanation to the user.
[0508] "Means for allowing users to input code and check the results in a virtual classroom environment" is a function that allows users to input program code in a virtual space and check the results.
[0509] The "means for supporting interactions between a user and other users or a virtual teacher in a virtual classroom" is a function that supports a user in communicating with other users or a virtual teacher in a virtual classroom.
[0510] The present invention provides a system for assisting users in converting program code into different programming languages and understanding its operation. Specific embodiments of this system will be described below.
[0511] 1. Overview of the entire system
[0512] The system consists of the following main components:
[0513] A device that receives user input
[0514] Server that analyzes, converts, and generates explanations for code
[0515] Virtual classroom interface providing a virtual classroom environment
[0516] 2. User Input and Server Processing
[0517] User operations
[0518] Users log in to the virtual classroom through their terminals. Within the virtual classroom, users use an interface to input program code. Specifically, the following operations are possible:
[0519] Entering program code (e.g., "print("Hello, World!")")
[0520] Selecting a transformation language (e.g. Python to JavaScript)
[0521] Server Processing
[0522] The server performs the transaction using the following means:
[0523] "Means for receiving the initial program code entered by the user"
[0524] "Means for identifying the programming language of received program code"
[0525] "Means of converting from a specific programming language to another programming language"
[0526] "A means of explaining in natural language what the transformed code will do"
[0527] "A means of providing the user with the converted code and an explanation of its operation"
[0528] Specifically, the server receives program code entered by a user, identifies the programming language of the code, converts it from the identified programming language into a target language, and explains the behavior of the converted code in an easy-to-understand natural language.The user can then view the converted code and its explanation in the virtual classroom.
[0529] 3. Virtual Classroom Environment
[0530] The virtual classroom environment provides the following features:
[0531] "A means of letting users enter code and see the results in a virtual classroom environment"
[0532] "Means for supporting user interaction with other users or virtual teachers within a virtual classroom"
[0533] Users can enter program code and check the results in a virtual classroom. This environment is provided through devices such as smartphones and head-mounted displays (HMDs). Users can learn by interacting with other users and virtual teachers in real time, improving their learning effectiveness.
[0534] 4. Hardware and Software Used
[0535] Hardware:
[0536] Server: A server with high-performance data processing capabilities
[0537] Devices: smartphone, head-mounted display (HMD)
[0538] software:
[0539] Server-side software: Web application using the Flask framework
[0540] User Interface: Virtual Classroom Environment
[0541] 5. Examples of concrete examples and prompts
[0542] As a concrete example, a user wears a head-mounted display and types "print("Hello, World!")" in a virtual classroom. This code is sent to the server and converted into the JavaScript code "console.log("Hello, World!");". The server generates an explanation for this converted code, such as "This code will display the message 'Hello, World!' in the console," and sends it back to the user.
[0543] Example prompt for a generative AI model:
[0544] Convert Python code to JavaScript. For example, convert print("Hello, World!") to console.log("Hello, World!");
[0545] This invention allows for efficient learning of multiple programming languages, supports real-time code conversion and behavioral understanding, and enhances learning through interaction in a virtual classroom environment.
[0546] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0547] Step 1:
[0548] A user logs in to a terminal and accesses a virtual classroom environment. Here, the user uses an interface within the virtual classroom to input program code and select the programming language for conversion. For example, the user might input "print('Hello, World!')" and select the Python to JavaScript conversion. Based on the input, the terminal sends the input code and selection to the server.
[0549] Step 2:
[0550] The server receives the program code and selection information sent from the terminal. Based on the received data, the server begins analyzing the code. First, the server analyzes the code and identifies the programming language. For example, if the code "print("Hello, World!")" is received, the server detects the keyword "print(" and identifies it as Python.
[0551] Step 3:
[0552] The server performs the conversion from the specified programming language (here, Python) to the target language (here, JavaScript). The server uses a specific conversion logic to convert the Python code "print("Hello, World!")" into the JavaScript code "console.log("Hello, World!");". This conversion is performed based on predefined conversion rules.
[0553] Step 4:
[0554] Based on the converted code, the server explains the code's behavior in natural language. In this case, for the converted code "console.log("Hello, World!");", the server generates an explanation such as "This code displays the message 'Hello, World!' on the console." The server prepares the generated explanation in parallel.
[0555] Step 5:
[0556] The server compiles the converted program code and a description of its behavior and sends it back to the terminal. The returned data includes the original code, the converted code, and its natural language description. For example, it includes the original Python code "print("Hello, World!")", the converted JavaScript code "console.log("Hello, World!");", and the natural language description "This code will print the message 'Hello, World!' to the console."
[0557] Step 6:
[0558] The terminal displays the received data to the user. In the virtual classroom environment, the user can see the original code, the converted code, and a description of its operation. This allows the user to understand how the code they entered is implemented in other programming languages and understand its operation.
[0559] Step 7:
[0560] Within the virtual classroom environment, users interact with each other and with the virtual teacher as they learn, and can ask for comments on their results or follow-up questions, encouraging deeper exploration and improved understanding of the material.
[0561] Through this series of processes, users can efficiently learn multiple programming languages in a virtual classroom environment and are supported in real-time code conversion and behavioral understanding.
[0562] 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.
[0563] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. Specific embodiments of this system will be described below.
[0564] First, the user uses the terminal to input the program code to be converted. For example, the user inputs the Python code print("Hello, World!"). This input code is sent to the server by the terminal.
[0565] The server has a way to analyze the received code and identify the programming language it is in. For example, if the received code contains the keyword "print(", the server will identify that the code is written in Python.
[0566] The server then converts the specified programming language to another programming language. For example, when converting from Python to JavaScript, it converts print("Hello, World!") to console.log("Hello, World!");. This conversion process is performed by a conversion means running on the server.
[0567] Furthermore, the server generates a natural language explanation of the behavior of the converted program code. In this case, the code "console.log("Hello, World!");" generates an explanation such as "This code displays the message 'Hello, World!' on the console."
[0568] A distinctive feature of the present invention is the incorporation of an emotion engine. When a user inputs program code, the emotion of the user is recognized based on the user's facial expression, tone of voice, input speed, etc. For example, the user's facial expression and tone of voice can be detected using a camera or microphone, and the emotion engine analyzes this information.
[0569] Based on the emotions recognized by the emotion engine, the server can adjust the way it presents the output: for example, if the user is nervous, it can provide a more detailed explanation or display an encouraging message, or if the user is relaxed, it can provide a concise explanation.
[0570] For example, when a user types the Python code print("Hello, World!"), the following steps occur:
[0571] 1. The user enters the code into the terminal and presses the send button.
[0572] 2. The device sends the entered code to the server.
[0573] 3. The server receives the code and identifies its programming language.
[0574] 4. The server performs the conversion from the identified language to the target language (JavaScript in this case).
[0575] 5. The server explains in natural language what the converted code does.
[0576] 6. The emotion engine recognizes the user's emotions. For example, if the user is nervous when typing, that information is analyzed by the emotion engine.
[0577] 7. The server then adjusts the presentation of the converted code and instructions based on the perceived emotion, for example by displaying an encouraging message like "Good luck."
[0578] 8. The server sends the converted code, a description of its operation, and additional comments based on the emotion to the device.
[0579] 9. The device displays the information received from the server to the user, allowing the user to compare the original code they entered with the converted code, understand how it works, and receive encouragement from support messages.
[0580] This process allows users to easily convert their own program code into different programming languages and understand its specific behavior. Furthermore, the emotional engine's support makes learning programming smoother and reduces the psychological burden. This system is especially useful for beginners learning programming.
[0581] The processing flow will be explained below.
[0582] Understood. The process flow will be explained below in concrete steps.
[0583] Step 1:
[0584] The user accesses a terminal and enters the program code they want to convert, for example, the Python code print("Hello, World!").
[0585] Step 2:
[0586] The terminal converts the program code entered by the user into a data format and transmits the data to the server.
[0587] Step 3:
[0588] The server receives the program code data from the terminal and begins analyzing it.
[0589] Step 4:
[0590] The server analyzes the content of the program code and identifies the programming language it is written in. For example, if it contains the code print("Hello, World!"), it identifies it as Python.
[0591] Step 5:
[0592] The server handles the conversion from the specified programming language (e.g. Python) to the target programming language (e.g. JavaScript), in this case converting print("Hello, World!") to console.log("Hello, World!");
[0593] Step 6:
[0594] After the server generates the transformed program code, it provides a natural language description of what the code does, in this case "This code will print the message 'Hello, World!' to the console."
[0595] Step 7:
[0596] The device sends data to the emotion engine to analyze the user's facial expressions and tone of voice, including information collected through the camera and microphone.
[0597] Step 8:
[0598] The emotion engine recognizes the user's emotions. For example, if the user is nervous, this information will be analyzed by the emotion engine.
[0599] Step 9:
[0600] The server then adjusts the presentation of the converted code and instructions based on the perceived emotion. For example, if the user is nervous, it adds an encouraging message like "Good luck."
[0601] Step 10:
[0602] The server sends the converted code, a description of the operation, and additional comments based on the emotion to the terminal.
[0603] Step 11:
[0604] The terminal displays the information received from the server to the user, including the converted code, an operation description, and an emotion-based support message, allowing the user to compare the original code they entered with the converted code, understand the operation, and be encouraged by the support message.
[0605] This system allows users to convert program code into different programming languages and understand its specific operations. Supported by an emotional engine, this system makes learning programming smoother and reduces the psychological burden.
[0606] Example 2
[0607] 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."
[0608] Conventional programming code conversion systems are limited to conversion functions between different programming languages and do not provide sufficient support for intuitively understanding the behavior of the code. Furthermore, because output adjustments are not performed taking into account the user's feelings or level of understanding, they are difficult to use, especially for beginners, and have the problem of not being able to fully achieve the learning effect.
[0609] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for receiving the initial program code input by the user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for recognizing the user's emotions and adjusting the presentation method of the output result based on the recognition result, and means for providing the converted code and an explanation of its operation to the user. This allows the user to not only convert code into a different programming language, but also intuitively understand the operation of the code, and further allows the user to receive support that takes into consideration the user's emotions.
[0610] "User" refers to a person who operates this system and inputs or views program code.
[0611] "Terminal" means the device through which a User accesses the System, enters the code, and receives the results. This may include a computer, smartphone, or tablet.
[0612] "Server" refers to the central device or system that receives, analyzes, and processes program code sent by users.
[0613] "Program code" refers to a series of instructions written in a particular programming language.
[0614] A "programming language" refers to a type of language used to write instructions for a computer. Examples include Python and JavaScript.
[0615] "Conversion" refers to the operation of changing code written in one programming language into another programming language.
[0616] "Natural language" refers to words and sentences that humans use on a daily basis, such as English and Japanese.
[0617] "Emotion" refers to the mental state or sensation that a user experiences when inputting or operating program code, including states such as relaxed or tense.
[0618] An "emotion engine" refers to a function or system that analyzes a user's emotions based on data such as the user's facial expressions and tone of voice.
[0619] The "means for receiving" refers to a method or device for inputting the program code entered by the user into the server.
[0620] "Means for identifying" refers to a method or apparatus for finding out the programming language of received program code.
[0621] "Means for explaining" refers to a method or device for expressing the operation of the converted program code in an easy-to-understand natural language.
[0622] "Means for providing" refers to a method or device for communicating the converted code and its explanation to the user.
[0623] The "means for recognizing" refers to a method or device for grasping the user's emotions.
[0624] The "adjusting means" refers to a method or device for appropriately changing the way in which the output result is presented based on the user's emotions.
[0625] MODE FOR CARRYING OUT THE INVENTION
[0626] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. Specific embodiments of this system will be described below.
[0627] 1. System Configuration
[0628] Hardware Configuration
[0629] Terminal: A device through which a user inputs program code and receives the results, such as a computer, smartphone, or tablet.
[0630] Server: A central device that receives, analyzes, and processes program code sent by users.
[0631] Camera and microphone: Devices that capture the user's facial expressions and tone of voice, thereby detecting the user's emotions.
[0632] Software Configuration
[0633] Programming language detection library (e.g., pylang-detector): Software that identifies the programming language of received code.
[0634] Program translation engine (e.g., BabelFish): Software that translates from one programming language to another.
[0635] Natural language generation engine (e.g., GPT-3): Software that explains the behavior of converted program code in natural language.
[0636] Emotion recognition engine (e.g., Affectiva): Software that analyzes a user's emotions.
[0637] 2. System Operation
[0638] The user uses the terminal to enter the program code to be converted.
[0639] For example, the user enters the Python code print("Hello, World!").
[0640] The camera and microphone connected to the device capture the user's facial expressions and tone of voice.
[0641] The device sends the entered code to the server
[0642] When the submit button is pressed, the terminal sends the code to the server in the form of a POST request.
[0643] The server receives the code and identifies its programming language
[0644] The server analyzes the received code using a programming language detection library and identifies it as Python code.
[0645] The server performs the translation from the specified programming language to another programming language.
[0646] The server uses the BabelFish library to convert the Python code into the JavaScript code console.log("Hello, World!");
[0647] The server explains the behavior of the converted program code in natural language
[0648] It uses a natural language generation engine (GPT-3) to generate an explanation: "This code will print the message 'Hello, World!' to the console."
[0649] Emotion engine recognizes user emotions
[0650] The user's facial expressions and tone of voice data sent to the server are analyzed by an emotion engine (Affectiva) and the system assesses whether the user is nervous.
[0651] The server adjusts the presentation of the output based on the recognized emotion.
[0652] For example, add an encouraging message such as "Do your best" to a user who is feeling nervous.
[0653] The server sends the converted code, a description of its operation, and additional comments based on emotions to the device.
[0654] The results are sent in JSON format and include the converted code, an explanation of how it works, and an encouraging message.
[0655] The device displays the information received from the server to the user.
[0656] The device will then display the converted JavaScript code, instructions on how it works, and an encouraging message on the screen.
[0657] 3. Examples and prompts
[0658] Examples:
[0659] The user enters the Python code print("Hello, World!") and presses the send button. The device sends the entered code to the server, which receives and analyzes the code, converts it from Python to JavaScript, and converts it into the code "console.log("Hello, World!");". Next, it explains the behavior of the converted code in natural language, providing an example that "This code will display the message 'Hello, World!' on the console." Furthermore, because the emotion engine recognizes that the user is nervous, it also adds an encouraging message saying "Good luck." Finally, the device displays this information to the user.
[0660] Example prompt sentence:
[0661] "Convert the Python code into JavaScript. The code is as follows: print("Hello, World!")"
[0662] This allows users to easily understand how to convert code into different programming languages and how it works, and they can also progress through their programming studies while receiving psychological support from the emotion engine.
[0663] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0664] Step 1: User enters program code into terminal
[0665] The user uses a text editor in the terminal to enter the program code to be converted. For example, the user enters the Python code print("Hello, World!").
[0666] Input: Python code that the user types into the terminal.
[0667] Output: Python code displayed in a terminal text editor.
[0668] Specifically, the user types code into a text editor using a keyboard.
[0669] Step 2: The device sends the entered code to the server
[0670] The terminal sends the code entered by the user to the server, specifically in the form of a POST request over the network.
[0671] Input: Python code entered by the user.
[0672] Output: The Python code sent to the server.
[0673] Specifically, when the send button is pressed, the terminal sends the code to the server as an HTTP request.
[0674] Step 3: The server receives the code and identifies the programming language
[0675] The server receives the code sent from the device. It analyzes the received code and uses a programming language detection library to identify the programming language it is in. For example, it identifies the code as Python based on the keyword "print(".
[0676] Input: Python code sent from the terminal.
[0677] Output: Code information with programming language identified.
[0678] Specifically, the server reads the code and performs an analysis based on keywords.
[0679] Step 4: Translate from the server-specific language to another programming language
[0680] The server converts the identified programming language (Python) to the target language (JavaScript). It uses the BabelFish library to convert the Python code print("Hello, World!") to the JavaScript code console.log("Hello, World!");
[0681] Input: Python code with programming language specified.
[0682] Output: Code converted to JavaScript.
[0683] Specifically, the server passes the code to a conversion engine to convert it into the desired target language.
[0684] Step 5: The server explains the behavior of the converted program code in natural language.
[0685] The server uses a generative AI model (e.g., GPT-3) to explain the behavior of the converted program code in natural language. For example, for the code "console.log("Hello, World!");", it generates an explanation such as "This code displays the message 'Hello, World!' in the console."
[0686] Input: Code converted to JavaScript.
[0687] Output: A natural language description of the behavior.
[0688] Specifically, the server inputs code into the generative AI model and receives an explanation in natural language.
[0689] Step 6: The emotion engine recognizes the user's emotion
[0690] The device uses a camera and microphone to capture the user's facial expressions and tone of voice, and sends the data to a server, which then analyzes the data with an emotion recognition engine (e.g., Affectiva) to identify the user's emotions.
[0691] Input: The captured user's facial expressions and tone of voice.
[0692] Output: Parsed user emotion information.
[0693] Specifically, the device sends the collected data to the server, where the emotion recognition engine analyzes the data.
[0694] Step 7: The server adjusts the output based on the recognized emotion.
[0695] The server adjusts the presentation of the output based on the recognized emotion, for example adding an encouraging message like "Good luck" if the user is nervous.
[0696] Input: Parsed user emotion information.
[0697] Output: The adjusted output result.
[0698] Specifically, the server dynamically changes the description and comments based on the emotion.
[0699] Step 8: The server sends the converted code, operation instructions, and additional comments to the terminal.
[0700] The server sends the converted code, a natural language description of the action, and additional comments based on the sentiment to the device. The data is sent in JSON format.
[0701] Input: The adjusted output result.
[0702] Output: The code sent to the terminal, a description, and any additional comments.
[0703] Specifically, the server packages the results in JSON format and sends them to the terminal as an HTTP response.
[0704] Step 9: The device displays the information received from the server to the user.
[0705] The terminal visually displays the information received from the server to the user, allowing the user to check the converted code, operation instructions, and encouraging messages.
[0706] Input: The code sent by the server, a description, and any additional comments.
[0707] Output: The converted code that will be displayed to the user, along with a description and any additional comments.
[0708] Specifically, the terminal analyzes the received data and displays it on the user interface.
[0709] This process allows users to intuitively and effectively convert program code and understand its behavior. Emotion recognition also provides psychological support to users.
[0710] (Application example 2)
[0711] 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."
[0712] Conventional programming learning support systems convert code into different programming languages and provide explanations to help users understand its operation, but they have the problem of being unable to flexibly respond to the user's emotions. In particular, if a beginner feels nervous or anxious, they may not be able to provide appropriate support, which could reduce the effectiveness of their learning. The objective of this invention is to improve the efficiency of programming learning by providing operation explanations and support messages that are tailored to the user's emotional state.
[0713] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0714] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, emotion analysis means for recognizing the user's facial expression and tone of voice to analyze their emotion, means for adjusting the operation explanation and additional message based on the analyzed emotion, and means for providing the converted code, operation explanation, and additional message based on the emotion to the user. This enables flexible program code conversion and explanation according to the user's emotion.
[0715] The "means for receiving the initial program code entered by the user" is a function for transmitting the program code entered by the user into the terminal to the server and for the server to receive it.
[0716] The "means for identifying the programming language of the received program code" is a processing function for identifying the programming language in which the transmitted program code is written.
[0717] The "means for converting from the identified programming language to another programming language" is a processing function for converting code in the identified programming language into another specified programming language.
[0718] "Means for explaining the behavior of the converted code in natural language" is a function for generating an easy-to-understand natural language explanation of how the converted program code operates.
[0719] "Emotion analysis means for recognizing a user's facial expression and tone of voice to analyze emotions" is a function that uses a camera and microphone to analyze a user's facial expression and tone of voice to recognize their emotional state at that time.
[0720] The "means for adjusting the operation explanation and additional message based on the analyzed emotion" is a function for adjusting the content and format of the operation explanation and additional message according to the recognized emotional state of the user.
[0721] The "means for providing the user with the converted code, an explanation of its operation, and an additional message based on the user's emotion" is a function for ultimately displaying the converted program code, an explanation of its operation, and an additional message tailored to the user's emotional state to the user on the terminal.
[0722] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. The system receives code entered by a user, analyzes it, converts it from a specific programming language to a different language, and then explains its behavior in natural language. It also has the ability to analyze the user's emotions and adjust the content and format of the behavior explanation based on that analysis. Specific embodiments for implementing this invention are described below.
[0723] A user inputs the first program code using a device such as a smartphone, tablet, or PC. For example, the user inputs the Python code "print("Hello, World!")". This input code is sent to the server by the device. The server executes the following steps:
[0724] First, the server has a means for receiving input code and receives the program code sent by the user. Next, it uses a program code language identification means, which is a means for analyzing the received code, to determine which programming language the code is in. For this determination, it uses a method for identifying that the code is Python based on the keyword "print(".
[0725] Next, the server has a means to convert the specified programming language into another programming language. For example, when converting from Python to JavaScript, it converts the received code "print("Hello, World!")" into "console.log("Hello, World!");". This conversion process is performed based on pre-defined conversion rules.
[0726] Furthermore, the server has a means to explain the behavior of the converted code in natural language. For the converted code "console.log("Hello, World!");", it generates a description such as "This code displays the message 'Hello, World!' on the console." This description is written in natural language so that users can easily understand it.
[0727] The server also uses hardware such as a camera and microphone to analyze the user's emotional state. It has an emotion analysis means that analyzes the user's facial expressions and tone of voice, and based on this information, it recognizes emotions such as whether the user is nervous or relaxed. The analyzed emotional information is used to adjust the content and presentation method of the action instructions. For example, if the user is nervous, it may provide more detailed instructions and display additional encouraging messages. Specifically, it may display a message such as "Do your best."
[0728] Finally, the system has a means for providing the user with the converted code, an explanation of the operation, and an additional message based on emotions. This information is sent to the terminal and displayed on the user's screen. This allows the user to compare the original code they entered with the converted code, understand the operation, and receive encouragement from the support message based on emotions.
[0729] As a concrete example, when a user enters the Python code "print("Hello, World!")", the process takes place in the following steps: When the user enters the code into a terminal and presses the send button, the terminal sends the entered code to the server. The server receives the code and identifies its programming language. Next, the server converts the identified language into the target language (JavaScript in this case). It generates a natural language explanation of the operation of the converted code and recognizes the user's emotions using sentiment analysis means. Finally, the server adjusts the presentation method of the converted code and operation explanation based on the recognized emotions, and provides information to the user, including additional comments.
[0730] Example prompt:
[0731] The user says, "I want to convert some Python code to JavaScript." Convert the following Python code into JavaScript and explain how it works clearly. Python code: print("Hello, World!") The user seems nervous. Based on this, you should provide more details and include an encouraging message.
[0732] According to this invention, a user can receive flexible programming learning support according to his / her emotions, thereby improving learning efficiency.
[0733] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0734] Step 1:
[0735] The user enters the program code into the terminal and presses the send button.
[0736] Input: Python code print("Hello, World!")
[0737] Specific operation: The user enters the code into the text editor and clicks the send button. The device sends this code to the server.
[0738] Step 2:
[0739] The server receives the entered code.
[0740] Input: Python code sent from the terminal
[0741] Output: Received program code
[0742] Specific operation: The server receives the code sent from the user through the network interface.
[0743] Step 3:
[0744] The server identifies the programming language of the received program code.
[0745] Input: Received program code print("Hello, World!")
[0746] Output: Programming language (Python)
[0747] What happens: The server performs a syntax analysis on the code and determines that it is written in Python because it contains the keyword "print(".
[0748] Step 4:
[0749] The server performs the conversion from the specified programming language to the target language (JavaScript).
[0750] Input: Programming language (Python) and program code
[0751] Output: Transformed code console.log("Hello, World!");
[0752] Specific operation: The server performs a conversion process to convert Python code into JavaScript code based on the conversion rules.
[0753] Step 5:
[0754] The server explains in natural language what the converted code does.
[0755] Input: Transformed code console.log("Hello, World!");
[0756] Output: Description: "This code prints the message 'Hello, World!' to the console."
[0757] Specific behavior: The server simulates the execution results of the converted code and generates a description to express the behavior in natural language.
[0758] Step 6:
[0759] The server recognizes the user's facial expressions and tone of voice to analyze their emotions.
[0760] Input: Camera video, microphone audio
[0761] Output: User's emotional state (tense)
[0762] How it works: The server uses the device's camera and microphone to capture the user's facial expressions and tone of voice, then analyzes the data using an emotion analysis engine to determine their emotional state.
[0763] Step 7:
[0764] The server adjusts the action description and additional messages based on the analyzed emotions.
[0765] Input: Action description and user's emotional state
[0766] Output: Tailored behavior explanation and encouragement message
[0767] What it does: If the user is nervous, the server provides a more detailed explanation and adds an encouraging message such as "Good luck."
[0768] Step 8:
[0769] The server transmits the converted code and the action description, as well as an additional message based on the emotion, to the terminal.
[0770] Input: converted code, adjusted behavior description, additional message
[0771] Output: Information to display on the terminal
[0772] Specific operations: The server composes the final data into packets and sends them to the terminal, which prepares the information to display to the user.
[0773] Step 9:
[0774] The terminal displays the information received from the server to the user.
[0775] Input: Information sent from the server
[0776] Output: The converted code displayed to the user, along with a description of what happened and any additional messages.
[0777] Specific operation: The terminal parses the received data and converts it into the appropriate format for display on the screen. On the screen, the user can see the code they entered, the converted code, operation instructions, and encouraging messages.
[0778] This process flow allows the user to receive flexible program code conversion and explanations that correspond to their emotions, improving the learning effect.
[0779] 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.
[0780] 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.
[0781] 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.
[0782] [Third embodiment]
[0783] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[0784] 5, the data processing system 310 includes the data processing device 12 and a headset terminal 314. An example of the data processing device 12 is a server.
[0785] 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).
[0786] 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.
[0787] 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.
[0788] 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).
[0789] 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.
[0790] 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.
[0791] 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.
[0792] 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.
[0793] 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.
[0794] 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."
[0795] The present invention provides a system for assisting users in converting program code into different programming languages and understanding its operation. Specific embodiments of this system will be described below.
[0796] First, the user inputs the first program code through the terminal. For example, the user inputs the code written in Python, print("Hello, World!"). This input code is sent to the server by the terminal.
[0797] The server has a way to analyze the received code and identify the programming language it is in. For example, if the received code contains the keyword "print(", the server will identify that the code is written in Python.
[0798] The server then converts the specified programming language into another programming language. For example, when converting from Python to JavaScript, it converts print("Hello, World!") into console.log("Hello, World!");. This conversion process is performed by a conversion means running on the server.
[0799] After generating the transformed code, the server generates a natural language description to help understand what the code does. For example, the code "console.log("Hello, World!");" generates a description such as "This code prints the message 'Hello, World!' to the console."
[0800] The converted code and its operation explanation are then sent to the terminal and provided to the user, who can check the original code (Python) they entered and the converted code (JavaScript), and understand what the code does through the operation explanation.
[0801] As a specific example, the following embodiment can be considered: When a user enters the Python code print("Hello, World!"), the following steps are taken:
[0802] 1. The user enters the code into the terminal and presses the send button.
[0803] 2. The device sends the entered code to the server.
[0804] 3. The server receives the code and identifies its programming language.
[0805] 4. The server converts the identified language to the target language (JavaScript in this case).
[0806] 5. The server explains in natural language what the converted code does.
[0807] 6. The server sends the converted code and operation instructions to the terminal.
[0808] 7. The terminal displays the converted code and an explanation of its operation to the user.
[0809] This invention allows users to easily convert the code they have written into other programming languages and understand its behavior, lowering the barrier to learning programming and allowing even beginners to learn efficiently.
[0810] The processing flow will be explained below.
[0811] Understood. The process flow will be explained below in concrete steps.
[0812] Step 1:
[0813] The user accesses a terminal and enters the program code they want to convert. For example, they provide the Python code print("Hello, World!") as input.
[0814] Step 2:
[0815] The terminal converts the program code entered by the user into a data format and transmits the data to the server.
[0816] Step 3:
[0817] The server receives the program code data from the terminal and begins analyzing it.
[0818] Step 4:
[0819] The server analyzes the content of the program code and identifies the programming language it is written in. For example, if it contains the code print("Hello, World!"), it identifies it as Python.
[0820] Step 5:
[0821] The server handles the conversion from the specified programming language (e.g. Python) to the target programming language (e.g. JavaScript), in this case converting print("Hello, World!") to console.log("Hello, World!");
[0822] Step 6:
[0823] After the server generates the transformed program code, it provides a natural language description of what the code does, in this case "This code will print the message 'Hello, World!' to the console."
[0824] Step 7:
[0825] The server transmits data including the converted code and an operation description to the terminal.
[0826] Step 8:
[0827] The terminal displays the converted code received from the server and its operation explanation to the user, allowing the user to compare the original code they entered with the converted code and understand its operation.
[0828] This process allows users to easily convert their program code into different programming languages and understand its specific behavior, making the system a useful tool, especially for beginners learning programming.
[0829] Example 1
[0830] 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."
[0831] Code conversion between programming languages has traditionally been difficult, especially for beginners, as it is difficult to understand different programming languages and perform appropriate conversions. Furthermore, understanding the behavior of the converted code requires specialized knowledge, which is a barrier to learning programming. Therefore, there is a need for a system that can easily convert program code entered by a user into a different programming language and understand its behavior in natural language.
[0832] 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.
[0833] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for providing the converted code and the operation explanation to the user, means for using a conversion algorithm for converting a specific programming language into a different programming language, means for converting argument portions, and means for storing the generated natural language explanation, thereby enabling a user to accurately convert their own program code into another language and easily understand its operation.
[0834] "User" refers to a person who operates the system and inputs or uses program code.
[0835] "Terminal" refers to electronic devices such as computers, smartphones, and tablets used by users.
[0836] "Server" refers to a computer system that is responsible for processing, translating, and interpreting input program code.
[0837] "Program code" refers to a set of instructions written in a particular programming language.
[0838] "Means for receiving" refers to a function for transferring program code input by a user through a terminal to a server.
[0839] The "means for identifying" refers to a function for identifying the programming language from the received program code.
[0840] "Means for performing conversion" refers to a function for converting program code in a specified programming language into another programming language.
[0841] "Means for explaining" refers to a function for explaining in natural language how the converted code will behave.
[0842] "Means for providing" refers to the function of communicating the converted program code and an explanation of its operation to the user.
[0843] "Transformation algorithm" refers to an algorithm for transforming code from one programming language to another.
[0844] An "argument" refers to data passed to a function or procedure in program code.
[0845] "Means for storing" refers to a function for saving the generated natural language explanation.
[0846] MODE FOR CARRYING OUT THE INVENTION
[0847] This invention is a system for converting program code entered by a user into another programming language and understanding the behavior of the converted code.
[0848] First, a user inputs program code through a terminal, such as a personal computer, smartphone, or tablet. The program code is entered by the user using a web browser or a dedicated application.
[0849] Next, the terminal sends the input program code to the server, which receives it via the network. HTTP or HTTPS is the typical communication protocol used.
[0850] The server analyzes the received program code and identifies the programming language. Specifically, it uses text analysis software to analyze the keywords and syntax in the code. For example, by detecting the keyword "print(" in the code, it can identify that the code is written in Python.
[0851] The server then translates the code from the identified programming language to the target language using a program translation algorithm or library, for example, converting the code print("Hello, World!") in Python to console.log("Hello, World!"); in JavaScript.
[0852] The server then uses a generative AI model to generate a natural language explanation of the behavior of the converted code, such as "This code prints the message 'Hello, World!' to the console."
[0853] Finally, the server sends the converted code and its description to the terminal, which receives it and displays it on the user interface. The user can easily check the original program code, the converted code, and its description.
[0854] As a specific example, the following embodiment can be considered: When a user inputs the Python code print("Hello, World!"), the following prompt sentence is input to the generative AI model, and the conversion process is executed:
[0855] Example prompt sentence:
[0856] "Convert the following Python code into JavaScript and explain its behavior in natural language. Code: print("Hello, World!")"
[0857] This allows users to easily convert their Python code into JavaScript and understand its behavior. This system improves the efficiency of programming learning and makes it easy for beginners to learn different programming languages.
[0858] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0859] Step 1:
[0860] A user inputs program code through a terminal. For example, a user inputs the Python code print("Hello, World!") into a browser input field and clicks the submit button. By doing this, the user provides the code as input data to the terminal. As output, this input data is passed to the next processing step.
[0861] Step 2:
[0862] The terminal sends the entered program code to the server. Specifically, the terminal creates an HTTP POST request and sends the entered code in the request body to the server. The code provided by the user is included as input, and the server receives the request as output.
[0863] Step 3:
[0864] The server receives the HTTP request and analyzes the code sent. The program code received from the terminal as input is stored in a memory buffer, and the code is sent to the analysis process as output. Specifically, the server reads the contents of the code as a string.
[0865] Step 4:
[0866] The server identifies the programming language of the parsed code. It receives the parsed code as input and uses text analysis software to analyze keywords and grammatical structures. For example, if the code contains the keyword "print(", it will identify that the code is written in Python. As output, the identified programming language is passed to the next processing step.
[0867] Step 5:
[0868] The server performs the translation from the identified programming language to the target language. It includes the identified programming language and the original code as input. It uses a program translation algorithm to convert, for example, Python print("Hello, World!") to JavaScript console.log("Hello, World!");. As output, it generates the translated code.
[0869] Step 6:
[0870] The server provides a natural language description of the behavior of the transformed code. It contains the transformed code as input and uses a generative AI model to generate text that describes the behavior of that code. For example, for console.log("Hello, World!"); it generates the description "This code displays the message 'Hello, World!' in the console." As output, it provides the generated natural language description.
[0871] Step 7:
[0872] The server sends the converted code and its description to the terminal. The converted code and the generated description are included as input, and are returned to the terminal as an HTTP response. The terminal receives the data as output.
[0873] Step 8:
[0874] The terminal displays the received converted code and its explanation in the user interface. Specifically, it displays the converted JavaScript code and its explanation in the display area of a web page or application. The input contains the data received from the server, and the output allows the user to visually confirm its contents.
[0875] (Application example 1)
[0876] 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."
[0877] Traditional programming education methods have made it difficult to efficiently learn multiple programming languages. Furthermore, there is a lack of systems that support real-time code conversion and understanding of code behavior during learning, which has been an obstacle to learning. Furthermore, there is also the problem of a lack of effective learning support in virtual classroom environments, which do not require a physical classroom.
[0878] 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.
[0879] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for providing the converted code and the explanation of its operation to the user, means for allowing the user to enter code and check the results in a virtual classroom environment, and means for supporting interaction between the user and other users or a virtual teacher in the virtual classroom. This allows for efficient learning of multiple programming languages and supports real-time code conversion and understanding of operation. Furthermore, the effectiveness of learning can be enhanced through interaction in the virtual classroom environment.
[0880] The "means for receiving the initial program code entered by the user" is a function that allows the server to receive the program code entered by the user through the terminal.
[0881] The "means for identifying the programming language of the received program code" is a function for identifying the description language of the program code received by the server.
[0882] "Means for converting from a specified programming language to another programming language" refers to a function for converting code in a specified programming language into another programming language.
[0883] "Means for explaining the behavior of the converted code in natural language" is a function for expressing the behavior of the converted program code in natural language.
[0884] The "means for providing the converted code and its operation explanation to the user" is a function for displaying the converted code and its explanation to the user.
[0885] "Means for allowing users to input code and check the results in a virtual classroom environment" is a function that allows users to input program code in a virtual space and check the results.
[0886] The "means for supporting interactions between a user and other users or a virtual teacher in a virtual classroom" is a function that supports a user in communicating with other users or a virtual teacher in a virtual classroom.
[0887] The present invention provides a system for assisting users in converting program code into different programming languages and understanding its operation. Specific embodiments of this system will be described below.
[0888] 1. Overview of the entire system
[0889] The system consists of the following main components:
[0890] A device that receives user input
[0891] Server that analyzes, converts, and generates explanations for code
[0892] Virtual classroom interface providing a virtual classroom environment
[0893] 2. User Input and Server Processing
[0894] User operations
[0895] Users log in to the virtual classroom through their terminals. Within the virtual classroom, users use an interface to input program code. Specifically, the following operations are possible:
[0896] Entering program code (e.g., "print("Hello, World!")")
[0897] Selecting a transformation language (e.g. Python to JavaScript)
[0898] Server Processing
[0899] The server performs the transaction using the following means:
[0900] "Means for receiving the initial program code entered by the user"
[0901] "Means for identifying the programming language of received program code"
[0902] "Means of converting from a specific programming language to another programming language"
[0903] "A means of explaining in natural language what the transformed code will do"
[0904] "A means of providing the user with the converted code and an explanation of its operation"
[0905] Specifically, the server receives program code entered by a user, identifies the programming language of the code, converts it from the identified programming language into a target language, and explains the behavior of the converted code in an easy-to-understand natural language.The user can then view the converted code and its explanation in the virtual classroom.
[0906] 3. Virtual Classroom Environment
[0907] The virtual classroom environment provides the following features:
[0908] "A means of letting users enter code and see the results in a virtual classroom environment"
[0909] "Means for supporting user interaction with other users or virtual teachers within a virtual classroom"
[0910] Users can enter program code and check the results in a virtual classroom. This environment is provided through devices such as smartphones and head-mounted displays (HMDs). Users can learn by interacting with other users and virtual teachers in real time, improving their learning effectiveness.
[0911] 4. Hardware and Software Used
[0912] Hardware:
[0913] Server: A server with high-performance data processing capabilities
[0914] Devices: smartphone, head-mounted display (HMD)
[0915] software:
[0916] Server-side software: Web application using the Flask framework
[0917] User Interface: Virtual Classroom Environment
[0918] 5. Examples of concrete examples and prompts
[0919] As a concrete example, a user wears a head-mounted display and types "print("Hello, World!")" in a virtual classroom. This code is sent to the server and converted into the JavaScript code "console.log("Hello, World!");". The server generates an explanation for this converted code, such as "This code will display the message 'Hello, World!' in the console," and sends it back to the user.
[0920] Example prompt for a generative AI model:
[0921] Convert Python code to JavaScript. For example, convert print("Hello, World!") to console.log("Hello, World!");
[0922] This invention allows for efficient learning of multiple programming languages, supports real-time code conversion and behavioral understanding, and enhances learning through interaction in a virtual classroom environment.
[0923] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0924] Step 1:
[0925] A user logs in to a terminal and accesses a virtual classroom environment. Here, the user uses an interface within the virtual classroom to input program code and select the programming language for conversion. For example, the user might input "print('Hello, World!')" and select the Python to JavaScript conversion. Based on the input, the terminal sends the input code and selection to the server.
[0926] Step 2:
[0927] The server receives the program code and selection information sent from the terminal. Based on the received data, the server begins analyzing the code. First, the server analyzes the code and identifies the programming language. For example, if the code "print("Hello, World!")" is received, the server detects the keyword "print(" and identifies it as Python.
[0928] Step 3:
[0929] The server performs the conversion from the specified programming language (here, Python) to the target language (here, JavaScript). The server uses a specific conversion logic to convert the Python code "print("Hello, World!")" into the JavaScript code "console.log("Hello, World!");". This conversion is performed based on predefined conversion rules.
[0930] Step 4:
[0931] Based on the converted code, the server explains the code's behavior in natural language. In this case, for the converted code "console.log("Hello, World!");", the server generates an explanation such as "This code displays the message 'Hello, World!' on the console." The server prepares the generated explanation in parallel.
[0932] Step 5:
[0933] The server compiles the converted program code and a description of its behavior and sends it back to the terminal. The returned data includes the original code, the converted code, and its natural language description. For example, it includes the original Python code "print("Hello, World!")", the converted JavaScript code "console.log("Hello, World!");", and the natural language description "This code will print the message 'Hello, World!' to the console."
[0934] Step 6:
[0935] The terminal displays the received data to the user. In the virtual classroom environment, the user can see the original code, the converted code, and a description of its operation. This allows the user to understand how the code they entered is implemented in other programming languages and understand its operation.
[0936] Step 7:
[0937] Within the virtual classroom environment, users interact with each other and with the virtual teacher as they learn, and can ask for comments on their results or follow-up questions, encouraging deeper exploration and improved understanding of the material.
[0938] Through this series of processes, users can efficiently learn multiple programming languages in a virtual classroom environment, and are assisted in real-time code conversion and behavioral understanding.
[0939] 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.
[0940] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. Specific embodiments of this system will be described below.
[0941] First, the user uses the terminal to input the program code to be converted. For example, the user inputs the Python code print("Hello, World!"). This input code is sent to the server by the terminal.
[0942] The server has a way to analyze the received code and identify the programming language it is in. For example, if the received code contains the keyword "print(", the server will identify that the code is written in Python.
[0943] The server then converts the specified programming language to another programming language. For example, when converting from Python to JavaScript, it converts print("Hello, World!") to console.log("Hello, World!");. This conversion process is performed by a conversion means running on the server.
[0944] Furthermore, the server generates a natural language explanation of the behavior of the converted program code. In this case, the code "console.log("Hello, World!");" generates an explanation such as "This code displays the message 'Hello, World!' on the console."
[0945] A distinctive feature of the present invention is the incorporation of an emotion engine. When a user inputs program code, the emotion of the user is recognized based on the user's facial expression, tone of voice, input speed, etc. For example, the user's facial expression and tone of voice can be detected using a camera or microphone, and the emotion engine analyzes this information.
[0946] Based on the emotions recognized by the emotion engine, the server can adjust the way it presents the output: for example, if the user is nervous, it can provide a more detailed explanation or display an encouraging message, or if the user is relaxed, it can provide a concise explanation.
[0947] For example, when a user types the Python code print("Hello, World!"), the following steps occur:
[0948] 1. The user enters the code into the terminal and presses the send button.
[0949] 2. The device sends the entered code to the server.
[0950] 3. The server receives the code and identifies its programming language.
[0951] 4. The server performs the conversion from the identified language to the target language (JavaScript in this case).
[0952] 5. The server explains in natural language what the converted code does.
[0953] 6. The emotion engine recognizes the user's emotions. For example, if the user is nervous when typing, that information is analyzed by the emotion engine.
[0954] 7. The server then adjusts the presentation of the converted code and instructions based on the perceived emotion, for example by displaying an encouraging message like "Good luck."
[0955] 8. The server sends the converted code, a description of its operation, and additional comments based on the emotion to the device.
[0956] 9. The device displays the information received from the server to the user, allowing the user to compare the original code they entered with the converted code, understand how it works, and receive encouragement from support messages.
[0957] This process allows users to easily convert their own program code into different programming languages and understand its specific behavior. Furthermore, the emotional engine's support makes learning programming smoother and reduces the psychological burden. This system is especially useful for beginners learning programming.
[0958] The processing flow will be explained below.
[0959] Understood. The process flow will be explained below in concrete steps.
[0960] Step 1:
[0961] The user accesses a terminal and enters the program code they want to convert, for example, the Python code print("Hello, World!").
[0962] Step 2:
[0963] The terminal converts the program code entered by the user into a data format and transmits the data to the server.
[0964] Step 3:
[0965] The server receives the program code data from the terminal and begins analyzing it.
[0966] Step 4:
[0967] The server analyzes the content of the program code and identifies the programming language it is written in. For example, if it contains the code print("Hello, World!"), it identifies it as Python.
[0968] Step 5:
[0969] The server handles the conversion from the specified programming language (e.g. Python) to the target programming language (e.g. JavaScript), in this case converting print("Hello, World!") to console.log("Hello, World!");
[0970] Step 6:
[0971] After the server generates the transformed program code, it provides a natural language description of what the code does, in this case "This code will print the message 'Hello, World!' to the console."
[0972] Step 7:
[0973] The device sends data to the emotion engine to analyze the user's facial expressions and tone of voice, including information collected through the camera and microphone.
[0974] Step 8:
[0975] The emotion engine recognizes the user's emotions. For example, if the user is nervous, this information will be analyzed by the emotion engine.
[0976] Step 9:
[0977] The server then adjusts the presentation of the converted code and instructions based on the perceived emotion. For example, if the user is nervous, it adds an encouraging message like "Good luck."
[0978] Step 10:
[0979] The server sends the converted code, a description of the operation, and additional comments based on the emotion to the terminal.
[0980] Step 11:
[0981] The terminal displays the information received from the server to the user, including the converted code, an operation description, and an emotion-based support message, allowing the user to compare the original code they entered with the converted code, understand the operation, and be encouraged by the support message.
[0982] This system allows users to convert program code into different programming languages and understand its specific operations. Supported by an emotional engine, this system makes learning programming smoother and reduces the psychological burden.
[0983] Example 2
[0984] 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."
[0985] Conventional programming code conversion systems are limited to conversion functions between different programming languages and do not provide sufficient support for intuitively understanding the behavior of the code. Furthermore, because output adjustments are not performed taking into account the user's feelings or level of understanding, they are difficult to use, especially for beginners, and have the problem of not being able to fully achieve the learning effect.
[0986] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for receiving the initial program code input by the user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for recognizing the user's emotions and adjusting the presentation method of the output result based on the recognition result, and means for providing the converted code and an explanation of its operation to the user. This allows the user to not only convert code into a different programming language, but also intuitively understand the operation of the code, and further allows the user to receive support that takes into consideration the user's emotions.
[0987] "User" refers to a person who operates this system and inputs or views program code.
[0988] "Terminal" means the device through which a User accesses the System, enters the code, and receives the results. This may include a computer, smartphone, or tablet.
[0989] "Server" refers to the central device or system that receives, analyzes, and processes program code sent by users.
[0990] "Program code" refers to a series of instructions written in a particular programming language.
[0991] A "programming language" refers to a type of language used to write instructions for a computer. Examples include Python and JavaScript.
[0992] "Conversion" refers to the operation of changing code written in one programming language into another programming language.
[0993] "Natural language" refers to words and sentences that humans use on a daily basis, such as English and Japanese.
[0994] "Emotion" refers to the mental state or sensation that a user experiences when inputting or operating program code, including states such as relaxed or tense.
[0995] An "emotion engine" refers to a function or system that analyzes a user's emotions based on data such as the user's facial expressions and tone of voice.
[0996] The "means for receiving" refers to a method or device for inputting the program code entered by the user into the server.
[0997] "Means for identifying" refers to a method or apparatus for finding out the programming language of received program code.
[0998] "Means for explaining" refers to a method or device for expressing the operation of the converted program code in an easy-to-understand natural language.
[0999] "Means for providing" refers to a method or device for communicating the converted code and its explanation to the user.
[1000] The "means for recognizing" refers to a method or device for grasping the user's emotions.
[1001] The "adjusting means" refers to a method or device for appropriately changing the way in which the output result is presented based on the user's emotions.
[1002] MODE FOR CARRYING OUT THE INVENTION
[1003] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. Specific embodiments of this system will be described below.
[1004] 1. System Configuration
[1005] Hardware Configuration
[1006] Terminal: A device through which a user inputs program code and receives the results, such as a computer, smartphone, or tablet.
[1007] Server: A central device that receives, analyzes, and processes program code sent by users.
[1008] Camera and microphone: Devices that capture the user's facial expressions and tone of voice, thereby detecting the user's emotions.
[1009] Software Configuration
[1010] Programming language detection library (e.g., pylang-detector): Software that identifies the programming language of received code.
[1011] Program translation engine (e.g., BabelFish): Software that translates from one programming language to another.
[1012] Natural language generation engine (e.g., GPT-3): Software that explains the behavior of converted program code in natural language.
[1013] Emotion recognition engine (e.g., Affectiva): Software that analyzes a user's emotions.
[1014] 2. System Operation
[1015] The user uses the terminal to enter the program code to be converted.
[1016] For example, the user enters the Python code print("Hello, World!").
[1017] The camera and microphone connected to the device capture the user's facial expressions and tone of voice.
[1018] The device sends the entered code to the server
[1019] When the submit button is pressed, the terminal sends the code to the server in the form of a POST request.
[1020] The server receives the code and identifies its programming language
[1021] The server analyzes the received code using a programming language detection library and identifies it as Python code.
[1022] The server performs the translation from the specified programming language to another programming language.
[1023] The server uses the BabelFish library to convert the Python code into the JavaScript code console.log("Hello, World!");
[1024] The server explains the behavior of the converted program code in natural language
[1025] It uses a natural language generation engine (GPT-3) to generate an explanation: "This code will print the message 'Hello, World!' to the console."
[1026] Emotion engine recognizes user emotions
[1027] The user's facial expressions and tone of voice data sent to the server are analyzed by an emotion engine (Affectiva) and the system assesses whether the user is nervous.
[1028] The server adjusts the presentation of the output based on the recognized emotion.
[1029] For example, add an encouraging message such as "Do your best" to a user who is feeling nervous.
[1030] The server sends the converted code, a description of its operation, and additional comments based on emotions to the device.
[1031] The results are sent in JSON format and include the converted code, an explanation of how it works, and an encouraging message.
[1032] The device displays the information received from the server to the user.
[1033] The device will then display the converted JavaScript code, instructions on how it works, and an encouraging message on the screen.
[1034] 3. Examples and prompts
[1035] Examples:
[1036] The user enters the Python code print("Hello, World!") and presses the send button. The device sends the entered code to the server, which receives and analyzes the code, converts it from Python to JavaScript, and converts it into the code "console.log("Hello, World!");". Next, it explains the behavior of the converted code in natural language, providing an example that "This code will display the message 'Hello, World!' on the console." Furthermore, because the emotion engine recognizes that the user is nervous, it also adds an encouraging message saying "Good luck." Finally, the device displays this information to the user.
[1037] Example prompt sentence:
[1038] "Convert the Python code into JavaScript. The code is as follows: print("Hello, World!")"
[1039] This allows users to easily understand how to convert code into different programming languages and how it works, and they can also progress through their programming studies while receiving psychological support from the emotion engine.
[1040] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1041] Step 1: User enters program code into terminal
[1042] The user uses a text editor in the terminal to enter the program code to be converted. For example, the user enters the Python code print("Hello, World!").
[1043] Input: Python code that the user types into the terminal.
[1044] Output: Python code displayed in a terminal text editor.
[1045] Specifically, the user types code into a text editor using a keyboard.
[1046] Step 2: The device sends the entered code to the server
[1047] The terminal sends the code entered by the user to the server, specifically in the form of a POST request over the network.
[1048] Input: Python code entered by the user.
[1049] Output: The Python code sent to the server.
[1050] Specifically, when the send button is pressed, the terminal sends the code to the server as an HTTP request.
[1051] Step 3: The server receives the code and identifies the programming language
[1052] The server receives the code sent from the device. It analyzes the received code and uses a programming language detection library to identify the programming language it is in. For example, it identifies the code as Python based on the keyword "print(".
[1053] Input: Python code sent from the terminal.
[1054] Output: Code information with programming language identified.
[1055] Specifically, the server reads the code and performs an analysis based on keywords.
[1056] Step 4: Translate from the server-specific language to another programming language
[1057] The server converts the identified programming language (Python) to the target language (JavaScript). It uses the BabelFish library to convert the Python code print("Hello, World!") to the JavaScript code console.log("Hello, World!");
[1058] Input: Python code with programming language specified.
[1059] Output: Code converted to JavaScript.
[1060] Specifically, the server passes the code to a conversion engine to convert it into the desired target language.
[1061] Step 5: The server explains the behavior of the converted program code in natural language.
[1062] The server uses a generative AI model (e.g., GPT-3) to explain the behavior of the converted program code in natural language. For example, for the code "console.log("Hello, World!");", it generates an explanation such as "This code displays the message 'Hello, World!' in the console."
[1063] Input: Code converted to JavaScript.
[1064] Output: A natural language description of the behavior.
[1065] Specifically, the server inputs code into the generative AI model and receives an explanation in natural language.
[1066] Step 6: The emotion engine recognizes the user's emotion
[1067] The device uses a camera and microphone to capture the user's facial expressions and tone of voice, and sends the data to a server, which then analyzes the data with an emotion recognition engine (e.g., Affectiva) to identify the user's emotions.
[1068] Input: The captured user's facial expressions and tone of voice.
[1069] Output: Parsed user emotion information.
[1070] Specifically, the device sends the collected data to the server, where the emotion recognition engine analyzes the data.
[1071] Step 7: The server adjusts the output based on the recognized emotion.
[1072] The server adjusts the presentation of the output based on the recognized emotion, for example adding an encouraging message like "Good luck" if the user is nervous.
[1073] Input: Parsed user emotion information.
[1074] Output: The adjusted output result.
[1075] Specifically, the server dynamically changes the description and comments based on the emotion.
[1076] Step 8: The server sends the converted code, operation instructions, and additional comments to the terminal.
[1077] The server sends the converted code, a natural language description of the action, and additional comments based on the sentiment to the device. The data is sent in JSON format.
[1078] Input: The adjusted output result.
[1079] Output: The code sent to the terminal, a description, and any additional comments.
[1080] Specifically, the server packages the results in JSON format and sends them to the terminal as an HTTP response.
[1081] Step 9: The device displays the information received from the server to the user.
[1082] The terminal visually displays the information received from the server to the user, allowing the user to check the converted code, operation instructions, and encouraging messages.
[1083] Input: The code sent by the server, a description, and any additional comments.
[1084] Output: The converted code that will be displayed to the user, along with a description and any additional comments.
[1085] Specifically, the terminal analyzes the received data and displays it on the user interface.
[1086] This process allows users to intuitively and effectively convert program code and understand its behavior. Emotion recognition also provides psychological support to users.
[1087] (Application example 2)
[1088] 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."
[1089] Conventional programming learning support systems convert code into different programming languages and provide explanations to help users understand its operation, but they have the problem of being unable to flexibly respond to the user's emotions. In particular, if a beginner feels nervous or anxious, they may not be able to provide appropriate support, which could reduce the effectiveness of their learning. The objective of this invention is to improve the efficiency of programming learning by providing operation explanations and support messages that are tailored to the user's emotional state.
[1090] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1091] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, emotion analysis means for recognizing the user's facial expression and tone of voice to analyze their emotion, means for adjusting the operation explanation and additional message based on the analyzed emotion, and means for providing the converted code, operation explanation, and additional message based on the emotion to the user. This enables flexible program code conversion and explanation according to the user's emotion.
[1092] The "means for receiving the initial program code entered by the user" is a function for transmitting the program code entered by the user into the terminal to the server and for the server to receive it.
[1093] The "means for identifying the programming language of the received program code" is a processing function for identifying the programming language in which the transmitted program code is written.
[1094] The "means for converting from the identified programming language to another programming language" is a processing function for converting code in the identified programming language into another specified programming language.
[1095] "Means for explaining the behavior of the converted code in natural language" is a function for generating an easy-to-understand natural language explanation of how the converted program code operates.
[1096] "Emotion analysis means for recognizing a user's facial expression and tone of voice to analyze emotions" is a function that uses a camera and microphone to analyze a user's facial expression and tone of voice to recognize their emotional state at that time.
[1097] The "means for adjusting the operation explanation and additional message based on the analyzed emotion" is a function for adjusting the content and format of the operation explanation and additional message according to the recognized emotional state of the user.
[1098] The "means for providing the user with the converted code, an explanation of its operation, and an additional message based on the user's emotion" is a function for ultimately displaying the converted program code, an explanation of its operation, and an additional message tailored to the user's emotional state to the user on the terminal.
[1099] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. The system receives code entered by a user, analyzes it, converts it from a specific programming language to a different language, and then explains its behavior in natural language. It also has the ability to analyze the user's emotions and adjust the content and format of the behavior explanation based on that analysis. Specific embodiments for implementing this invention are described below.
[1100] A user inputs the first program code using a device such as a smartphone, tablet, or PC. For example, the user inputs the Python code "print("Hello, World!")". This input code is sent to the server by the device. The server executes the following steps:
[1101] First, the server has a means for receiving input code and receives the program code sent by the user. Next, it uses a program code language identification means, which is a means for analyzing the received code, to determine which programming language the code is in. For this determination, it uses a method for identifying that the code is Python based on the keyword "print(".
[1102] Next, the server has a means to convert the specified programming language into another programming language. For example, when converting from Python to JavaScript, it converts the received code "print("Hello, World!")" into "console.log("Hello, World!");". This conversion process is performed based on pre-defined conversion rules.
[1103] Furthermore, the server has a means to explain the behavior of the converted code in natural language. For the converted code "console.log("Hello, World!");", it generates a description such as "This code displays the message 'Hello, World!' on the console." This description is written in natural language so that users can easily understand it.
[1104] The server also uses hardware such as a camera and microphone to analyze the user's emotional state. It has an emotion analysis means that analyzes the user's facial expressions and tone of voice, and based on this information, it recognizes emotions such as whether the user is nervous or relaxed. The analyzed emotional information is used to adjust the content and presentation method of the action instructions. For example, if the user is nervous, it may provide more detailed instructions and display additional encouraging messages. Specifically, it may display a message such as "Do your best."
[1105] Finally, the system has a means for providing the user with the converted code, an explanation of the operation, and an additional message based on emotions. This information is sent to the terminal and displayed on the user's screen. This allows the user to compare the original code they entered with the converted code, understand the operation, and receive encouragement from the support message based on emotions.
[1106] As a concrete example, when a user enters the Python code "print("Hello, World!")", the process takes place in the following steps: When the user enters the code into a terminal and presses the send button, the terminal sends the entered code to the server. The server receives the code and identifies its programming language. Next, the server converts the identified language into the target language (JavaScript in this case). It generates a natural language explanation of the operation of the converted code and recognizes the user's emotions using sentiment analysis means. Finally, the server adjusts the presentation method of the converted code and operation explanation based on the recognized emotions, and provides information to the user, including additional comments.
[1107] Example prompt:
[1108] The user says, "I want to convert some Python code to JavaScript." Convert the following Python code into JavaScript and explain how it works clearly. Python code: print("Hello, World!") The user seems nervous. Based on this, you should provide more details and include an encouraging message.
[1109] According to this invention, a user can receive flexible programming learning support according to his / her emotions, thereby improving learning efficiency.
[1110] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1111] Step 1:
[1112] The user enters the program code into the terminal and presses the send button.
[1113] Input: Python code print("Hello, World!")
[1114] Specific operation: The user enters the code into the text editor and clicks the send button. The device sends this code to the server.
[1115] Step 2:
[1116] The server receives the entered code.
[1117] Input: Python code sent from the terminal
[1118] Output: Received program code
[1119] Specific operation: The server receives the code sent from the user through the network interface.
[1120] Step 3:
[1121] The server identifies the programming language of the received program code.
[1122] Input: Received program code print("Hello, World!")
[1123] Output: Programming language (Python)
[1124] What happens: The server performs a syntax analysis on the code and determines that it is written in Python because it contains the keyword "print(".
[1125] Step 4:
[1126] The server performs the conversion from the specified programming language to the target language (JavaScript).
[1127] Input: Programming language (Python) and program code
[1128] Output: Transformed code console.log("Hello, World!");
[1129] Specific operation: The server performs a conversion process to convert Python code into JavaScript code based on the conversion rules.
[1130] Step 5:
[1131] The server explains in natural language what the converted code does.
[1132] Input: Transformed code console.log("Hello, World!");
[1133] Output: Description: "This code prints the message 'Hello, World!' to the console."
[1134] Specific behavior: The server simulates the execution results of the converted code and generates a description to express the behavior in natural language.
[1135] Step 6:
[1136] The server recognizes the user's facial expressions and tone of voice to analyze their emotions.
[1137] Input: Camera video, microphone audio
[1138] Output: User's emotional state (tense)
[1139] How it works: The server uses the device's camera and microphone to capture the user's facial expressions and tone of voice, then analyzes the data using an emotion analysis engine to determine their emotional state.
[1140] Step 7:
[1141] The server adjusts the action description and additional messages based on the analyzed emotions.
[1142] Input: Action description and user's emotional state
[1143] Output: Tailored behavior explanation and encouragement message
[1144] What it does: If the user is nervous, the server provides a more detailed explanation and adds an encouraging message such as "Good luck."
[1145] Step 8:
[1146] The server transmits the converted code and the action description, as well as an additional message based on the emotion, to the terminal.
[1147] Input: converted code, adjusted behavior description, additional message
[1148] Output: Information to display on the terminal
[1149] Specific operations: The server composes the final data into packets and sends them to the terminal, which prepares the information to display to the user.
[1150] Step 9:
[1151] The terminal displays the information received from the server to the user.
[1152] Input: Information sent from the server
[1153] Output: The converted code displayed to the user, along with a description of what happened and any additional messages.
[1154] Specific operation: The terminal parses the received data and converts it into the appropriate format for display on the screen. On the screen, the user can see the code they entered, the converted code, operation instructions, and encouraging messages.
[1155] This process flow allows the user to receive flexible program code conversion and explanations that correspond to their emotions, improving the learning effect.
[1156] 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.
[1157] 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.
[1158] 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.
[1159] [Fourth embodiment]
[1160] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1161] 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.
[1162] 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).
[1163] 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.
[1164] 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.
[1165] 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).
[1166] 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.
[1167] 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.
[1168] 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.
[1169] 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.
[1170] 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.
[1171] 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.
[1172] 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."
[1173] The present invention provides a system for assisting users in converting program code into different programming languages and understanding its operation. Specific embodiments of this system will be described below.
[1174] First, the user inputs the first program code through the terminal. For example, the user inputs the code written in Python, print("Hello, World!"). This input code is sent to the server by the terminal.
[1175] The server has a way to analyze the received code and identify the programming language it is in. For example, if the received code contains the keyword "print(", the server will identify that the code is written in Python.
[1176] The server then converts the specified programming language into another programming language. For example, when converting from Python to JavaScript, it converts print("Hello, World!") into console.log("Hello, World!");. This conversion process is performed by a conversion means running on the server.
[1177] After generating the transformed code, the server generates a natural language description to help understand what the code does. For example, the code "console.log("Hello, World!");" generates a description such as "This code prints the message 'Hello, World!' to the console."
[1178] The converted code and its operation explanation are then sent to the terminal and provided to the user, who can check the original code (Python) they entered and the converted code (JavaScript), and understand what the code does through the operation explanation.
[1179] As a specific example, the following embodiment can be considered: When a user enters the Python code print("Hello, World!"), the following steps are taken:
[1180] 1. The user enters the code into the terminal and presses the send button.
[1181] 2. The device sends the entered code to the server.
[1182] 3. The server receives the code and identifies its programming language.
[1183] 4. The server converts the identified language to the target language (JavaScript in this case).
[1184] 5. The server explains in natural language what the converted code does.
[1185] 6. The server sends the converted code and operation instructions to the terminal.
[1186] 7. The terminal displays the converted code and an explanation of its operation to the user.
[1187] This invention allows users to easily convert the code they have written into other programming languages and understand its behavior, lowering the barrier to learning programming and allowing even beginners to learn efficiently.
[1188] The processing flow will be explained below.
[1189] Understood. The process flow will be explained below in concrete steps.
[1190] Step 1:
[1191] The user accesses a terminal and enters the program code they want to convert. For example, they provide the Python code print("Hello, World!") as input.
[1192] Step 2:
[1193] The terminal converts the program code entered by the user into a data format and transmits the data to the server.
[1194] Step 3:
[1195] The server receives the program code data from the terminal and begins analyzing it.
[1196] Step 4:
[1197] The server analyzes the content of the program code and identifies the programming language it is written in. For example, if it contains the code print("Hello, World!"), it identifies it as Python.
[1198] Step 5:
[1199] The server handles the conversion from the specified programming language (e.g. Python) to the target programming language (e.g. JavaScript), in this case converting print("Hello, World!") to console.log("Hello, World!");
[1200] Step 6:
[1201] After the server generates the transformed program code, it provides a natural language description of what the code does, in this case "This code will print the message 'Hello, World!' to the console."
[1202] Step 7:
[1203] The server transmits data including the converted code and an operation description to the terminal.
[1204] Step 8:
[1205] The terminal displays the converted code received from the server and its operation explanation to the user, allowing the user to compare the original code they entered with the converted code and understand its operation.
[1206] This process allows users to easily convert their program code into different programming languages and understand its specific behavior, making the system a useful tool, especially for beginners learning programming.
[1207] Example 1
[1208] 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."
[1209] Code conversion between programming languages has traditionally been difficult, especially for beginners, as it is difficult to understand different programming languages and perform appropriate conversions. Furthermore, understanding the behavior of the converted code requires specialized knowledge, which is a barrier to learning programming. Therefore, there is a need for a system that can easily convert program code entered by a user into a different programming language and understand its behavior in natural language.
[1210] 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.
[1211] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for providing the converted code and the operation explanation to the user, means for using a conversion algorithm for converting a specific programming language into a different programming language, means for converting argument portions, and means for storing the generated natural language explanation, thereby enabling a user to accurately convert their own program code into another language and easily understand its operation.
[1212] "User" refers to a person who operates the system and inputs or uses program code.
[1213] "Terminal" refers to electronic devices such as computers, smartphones, and tablets used by users.
[1214] "Server" refers to a computer system that is responsible for processing, translating, and interpreting input program code.
[1215] "Program code" refers to a set of instructions written in a particular programming language.
[1216] "Means for receiving" refers to a function for transferring program code input by a user through a terminal to a server.
[1217] The "means for identifying" refers to a function for identifying the programming language from the received program code.
[1218] "Means for performing conversion" refers to a function for converting program code in a specified programming language into another programming language.
[1219] "Means for explaining" refers to a function for explaining in natural language how the converted code will behave.
[1220] "Means for providing" refers to the function of communicating the converted program code and an explanation of its operation to the user.
[1221] "Transformation algorithm" refers to an algorithm for transforming code from one programming language to another.
[1222] An "argument" refers to data passed to a function or procedure in program code.
[1223] "Means for storing" refers to a function for saving the generated natural language explanation.
[1224] MODE FOR CARRYING OUT THE INVENTION
[1225] This invention is a system for converting program code entered by a user into another programming language and understanding the behavior of the converted code.
[1226] First, a user inputs program code through a terminal, such as a personal computer, smartphone, or tablet. The program code is entered by the user using a web browser or a dedicated application.
[1227] Next, the terminal sends the input program code to the server, which receives it via the network. HTTP or HTTPS is the typical communication protocol used.
[1228] The server analyzes the received program code and identifies the programming language. Specifically, it uses text analysis software to analyze the keywords and syntax in the code. For example, by detecting the keyword "print(" in the code, it can identify that the code is written in Python.
[1229] The server then translates the code from the identified programming language to the target language using a program translation algorithm or library, for example, converting the code print("Hello, World!") in Python to console.log("Hello, World!"); in JavaScript.
[1230] The server then uses a generative AI model to generate a natural language explanation of the behavior of the converted code, such as "This code prints the message 'Hello, World!' to the console."
[1231] Finally, the server sends the converted code and its description to the terminal, which receives it and displays it on the user interface. The user can easily check the original program code, the converted code, and its description.
[1232] As a specific example, the following embodiment can be considered: When a user inputs the Python code print("Hello, World!"), the following prompt sentence is input to the generative AI model, and the conversion process is executed:
[1233] Example prompt sentence:
[1234] "Convert the following Python code into JavaScript and explain its behavior in natural language. Code: print("Hello, World!")"
[1235] This allows users to easily convert their Python code into JavaScript and understand its behavior. This system improves the efficiency of programming learning and makes it easy for beginners to learn different programming languages.
[1236] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1237] Step 1:
[1238] A user inputs program code through a terminal. For example, a user inputs the Python code print("Hello, World!") into a browser input field and clicks the submit button. By doing this, the user provides the code as input data to the terminal. As output, this input data is passed to the next processing step.
[1239] Step 2:
[1240] The terminal sends the entered program code to the server. Specifically, the terminal creates an HTTP POST request and sends the entered code in the request body to the server. The code provided by the user is included as input, and the server receives the request as output.
[1241] Step 3:
[1242] The server receives the HTTP request and analyzes the code sent. The program code received from the terminal as input is stored in a memory buffer, and the code is sent to the analysis process as output. Specifically, the server reads the contents of the code as a string.
[1243] Step 4:
[1244] The server identifies the programming language of the parsed code. It receives the parsed code as input and uses text analysis software to analyze keywords and grammatical structures. For example, if the code contains the keyword "print(", it will identify that the code is written in Python. As output, the identified programming language is passed to the next processing step.
[1245] Step 5:
[1246] The server performs the translation from the identified programming language to the target language. It includes the identified programming language and the original code as input. It uses a program translation algorithm to convert, for example, Python print("Hello, World!") to JavaScript console.log("Hello, World!");. As output, it generates the translated code.
[1247] Step 6:
[1248] The server provides a natural language description of the behavior of the transformed code. It contains the transformed code as input and uses a generative AI model to generate text that describes the behavior of that code. For example, for console.log("Hello, World!"); it generates the description "This code displays the message 'Hello, World!' in the console." As output, it provides the generated natural language description.
[1249] Step 7:
[1250] The server sends the converted code and its description to the terminal. The converted code and the generated description are included as input, and are returned to the terminal as an HTTP response. The terminal receives the data as output.
[1251] Step 8:
[1252] The terminal displays the received converted code and its explanation in the user interface. Specifically, it displays the converted JavaScript code and its explanation in the display area of a web page or application. The input contains the data received from the server, and the output allows the user to visually confirm its contents.
[1253] (Application example 1)
[1254] 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."
[1255] Traditional programming education methods have made it difficult to efficiently learn multiple programming languages. Furthermore, there is a lack of systems that support real-time code conversion and understanding of code behavior during learning, which has been an obstacle to learning. Furthermore, there is also the problem of a lack of effective learning support in virtual classroom environments, which do not require a physical classroom.
[1256] 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.
[1257] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for providing the converted code and the explanation of its operation to the user, means for allowing the user to enter code and check the results in a virtual classroom environment, and means for supporting interaction between the user and other users or a virtual teacher in the virtual classroom. This allows for efficient learning of multiple programming languages and supports real-time code conversion and understanding of operation. Furthermore, the effectiveness of learning can be enhanced through interaction in the virtual classroom environment.
[1258] The "means for receiving the initial program code entered by the user" is a function that allows the server to receive the program code entered by the user through the terminal.
[1259] The "means for identifying the programming language of the received program code" is a function for identifying the description language of the program code received by the server.
[1260] "Means for converting from a specified programming language to another programming language" refers to a function for converting code in a specified programming language into another programming language.
[1261] "Means for explaining the behavior of the converted code in natural language" is a function for expressing the behavior of the converted program code in natural language.
[1262] The "means for providing the converted code and its operation explanation to the user" is a function for displaying the converted code and its explanation to the user.
[1263] "Means for allowing users to input code and check the results in a virtual classroom environment" is a function that allows users to input program code in a virtual space and check the results.
[1264] The "means for supporting interactions between a user and other users or a virtual teacher in a virtual classroom" is a function that supports a user in communicating with other users or a virtual teacher in a virtual classroom.
[1265] The present invention provides a system for assisting users in converting program code into different programming languages and understanding its operation. Specific embodiments of this system will be described below.
[1266] 1. Overview of the entire system
[1267] The system consists of the following main components:
[1268] A device that receives user input
[1269] Server that analyzes, converts, and generates explanations for code
[1270] Virtual classroom interface providing a virtual classroom environment
[1271] 2. User Input and Server Processing
[1272] User operations
[1273] Users log in to the virtual classroom through their terminals. Within the virtual classroom, users use an interface to input program code. Specifically, the following operations are possible:
[1274] Entering program code (e.g., "print("Hello, World!")")
[1275] Selecting a transformation language (e.g. Python to JavaScript)
[1276] Server Processing
[1277] The server performs the transaction using the following means:
[1278] "Means for receiving the initial program code entered by the user"
[1279] "Means for identifying the programming language of received program code"
[1280] "Means of converting from a specific programming language to another programming language"
[1281] "A means of explaining in natural language what the transformed code will do"
[1282] "A means of providing the user with the converted code and an explanation of its operation"
[1283] Specifically, the server receives program code entered by a user, identifies the programming language of the code, converts it from the identified programming language into a target language, and explains the behavior of the converted code in an easy-to-understand natural language.The user can then view the converted code and its explanation in the virtual classroom.
[1284] 3. Virtual Classroom Environment
[1285] The virtual classroom environment provides the following features:
[1286] "A means of letting users enter code and see the results in a virtual classroom environment"
[1287] "Means for supporting user interaction with other users or virtual teachers within a virtual classroom"
[1288] Users can enter program code and check the results in a virtual classroom. This environment is provided through devices such as smartphones and head-mounted displays (HMDs). Users can learn by interacting with other users and virtual teachers in real time, improving their learning effectiveness.
[1289] 4. Hardware and Software Used
[1290] Hardware:
[1291] Server: A server with high-performance data processing capabilities
[1292] Devices: smartphone, head-mounted display (HMD)
[1293] software:
[1294] Server-side software: Web application using the Flask framework
[1295] User Interface: Virtual Classroom Environment
[1296] 5. Examples of concrete examples and prompts
[1297] As a concrete example, a user wears a head-mounted display and types "print("Hello, World!")" in a virtual classroom. This code is sent to the server and converted into the JavaScript code "console.log("Hello, World!");". The server generates an explanation for this converted code, such as "This code will display the message 'Hello, World!' in the console," and sends it back to the user.
[1298] Example prompt for a generative AI model:
[1299] Convert Python code to JavaScript. For example, convert print("Hello, World!") to console.log("Hello, World!");
[1300] This invention allows for efficient learning of multiple programming languages, supports real-time code conversion and behavioral understanding, and enhances learning through interaction in a virtual classroom environment.
[1301] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1302] Step 1:
[1303] A user logs in to a terminal and accesses a virtual classroom environment. Here, the user uses an interface within the virtual classroom to input program code and select the programming language for conversion. For example, the user might input "print('Hello, World!')" and select the Python to JavaScript conversion. Based on the input, the terminal sends the input code and selection to the server.
[1304] Step 2:
[1305] The server receives the program code and selection information sent from the terminal. Based on the received data, the server begins analyzing the code. First, the server analyzes the code and identifies the programming language. For example, if the code "print("Hello, World!")" is received, the server detects the keyword "print(" and identifies it as Python.
[1306] Step 3:
[1307] The server performs the conversion from the specified programming language (here, Python) to the target language (here, JavaScript). The server uses a specific conversion logic to convert the Python code "print("Hello, World!")" into the JavaScript code "console.log("Hello, World!");". This conversion is performed based on predefined conversion rules.
[1308] Step 4:
[1309] Based on the converted code, the server explains the code's behavior in natural language. In this case, for the converted code "console.log("Hello, World!");", the server generates an explanation such as "This code displays the message 'Hello, World!' on the console." The server prepares the generated explanation in parallel.
[1310] Step 5:
[1311] The server compiles the converted program code and a description of its behavior and sends it back to the terminal. The returned data includes the original code, the converted code, and its natural language description. For example, it includes the original Python code "print("Hello, World!")", the converted JavaScript code "console.log("Hello, World!");", and the natural language description "This code will print the message 'Hello, World!' to the console."
[1312] Step 6:
[1313] The terminal displays the received data to the user. In the virtual classroom environment, the user can see the original code, the converted code, and a description of its operation. This allows the user to understand how the code they entered is implemented in other programming languages and understand its operation.
[1314] Step 7:
[1315] Within the virtual classroom environment, users interact with each other and with the virtual teacher as they learn, and can ask for comments on their results or follow-up questions, encouraging deeper exploration and improved understanding of the material.
[1316] Through this series of processes, users can efficiently learn multiple programming languages in a virtual classroom environment and are supported in real-time code conversion and behavioral understanding.
[1317] 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.
[1318] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. Specific embodiments of this system will be described below.
[1319] First, the user uses the terminal to input the program code to be converted. For example, the user inputs the Python code print("Hello, World!"). This input code is sent to the server by the terminal.
[1320] The server has a way to analyze the received code and identify the programming language it is in. For example, if the received code contains the keyword "print(", the server will identify that the code is written in Python.
[1321] The server then converts the specified programming language to another programming language. For example, when converting from Python to JavaScript, it converts print("Hello, World!") to console.log("Hello, World!");. This conversion process is performed by a conversion means running on the server.
[1322] Furthermore, the server generates a natural language explanation of the behavior of the converted program code. In this case, the code "console.log("Hello, World!");" generates an explanation such as "This code displays the message 'Hello, World!' on the console."
[1323] A distinctive feature of the present invention is the incorporation of an emotion engine. When a user inputs program code, the emotion of the user is recognized based on the user's facial expression, tone of voice, input speed, etc. For example, the user's facial expression and tone of voice can be detected using a camera or microphone, and the emotion engine analyzes this information.
[1324] Based on the emotions recognized by the emotion engine, the server can adjust the way it presents the output: for example, if the user is nervous, it can provide a more detailed explanation or display an encouraging message, or if the user is relaxed, it can provide a concise explanation.
[1325] For example, when a user types the Python code print("Hello, World!"), the following steps occur:
[1326] 1. The user enters the code into the terminal and presses the send button.
[1327] 2. The device sends the entered code to the server.
[1328] 3. The server receives the code and identifies its programming language.
[1329] 4. The server performs the conversion from the identified language to the target language (JavaScript in this case).
[1330] 5. The server explains in natural language what the converted code does.
[1331] 6. The emotion engine recognizes the user's emotions. For example, if the user is nervous when typing, that information is analyzed by the emotion engine.
[1332] 7. The server then adjusts the presentation of the converted code and instructions based on the perceived emotion, for example by displaying an encouraging message like "Good luck."
[1333] 8. The server sends the converted code, a description of its operation, and additional comments based on the emotion to the device.
[1334] 9. The device displays the information received from the server to the user, allowing the user to compare the original code they entered with the converted code, understand how it works, and receive encouragement from support messages.
[1335] This process allows users to easily convert their own program code into different programming languages and understand its specific behavior. Furthermore, the emotional engine's support makes learning programming smoother and reduces the psychological burden. This system is especially useful for beginners learning programming.
[1336] The processing flow will be explained below.
[1337] Understood. The process flow will be explained below in concrete steps.
[1338] Step 1:
[1339] The user accesses a terminal and enters the program code they want to convert, for example, the Python code print("Hello, World!").
[1340] Step 2:
[1341] The terminal converts the program code entered by the user into a data format and transmits the data to the server.
[1342] Step 3:
[1343] The server receives the program code data from the terminal and begins analyzing it.
[1344] Step 4:
[1345] The server analyzes the content of the program code and identifies the programming language it is written in. For example, if it contains the code print("Hello, World!"), it identifies it as Python.
[1346] Step 5:
[1347] The server handles the conversion from the specified programming language (e.g. Python) to the target programming language (e.g. JavaScript), in this case converting print("Hello, World!") to console.log("Hello, World!");
[1348] Step 6:
[1349] After the server generates the transformed program code, it provides a natural language description of what the code does, in this case "This code will print the message 'Hello, World!' to the console."
[1350] Step 7:
[1351] The device sends data to the emotion engine to analyze the user's facial expressions and tone of voice, including information collected through the camera and microphone.
[1352] Step 8:
[1353] The emotion engine recognizes the user's emotions. For example, if the user is nervous, this information will be analyzed by the emotion engine.
[1354] Step 9:
[1355] The server then adjusts the presentation of the converted code and instructions based on the perceived emotion. For example, if the user is nervous, it adds an encouraging message like "Good luck."
[1356] Step 10:
[1357] The server sends the converted code, a description of the operation, and additional comments based on the emotion to the terminal.
[1358] Step 11:
[1359] The terminal displays the information received from the server to the user, including the converted code, an operation description, and an emotion-based support message, allowing the user to compare the original code they entered with the converted code, understand the operation, and be encouraged by the support message.
[1360] This system allows users to convert program code into different programming languages and understand its specific operations. Supported by an emotional engine, this system makes learning programming smoother and reduces the psychological burden.
[1361] Example 2
[1362] 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."
[1363] Conventional programming code conversion systems are limited to conversion functions between different programming languages and do not provide sufficient support for intuitively understanding the behavior of the code. Furthermore, because output adjustments are not performed taking into account the user's feelings or level of understanding, they are difficult to use, especially for beginners, and have the problem of not being able to fully achieve the learning effect.
[1364] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for receiving the initial program code input by the user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, means for recognizing the user's emotions and adjusting the presentation method of the output result based on the recognition result, and means for providing the converted code and an explanation of its operation to the user. This allows the user to not only convert code into a different programming language, but also intuitively understand the operation of the code, and further allows the user to receive support that takes into consideration the user's emotions.
[1365] "User" refers to a person who operates this system and inputs or views program code.
[1366] "Terminal" means the device through which a User accesses the System, enters the code, and receives the results. This may include a computer, smartphone, or tablet.
[1367] "Server" refers to the central device or system that receives, analyzes, and processes program code sent by users.
[1368] "Program code" refers to a series of instructions written in a particular programming language.
[1369] A "programming language" refers to a type of language used to write instructions for a computer. Examples include Python and JavaScript.
[1370] "Conversion" refers to the operation of changing code written in one programming language into another programming language.
[1371] "Natural language" refers to words and sentences that humans use on a daily basis, such as English and Japanese.
[1372] "Emotion" refers to the mental state or sensation that a user experiences when inputting or operating program code, including states such as relaxed or tense.
[1373] An "emotion engine" refers to a function or system that analyzes a user's emotions based on data such as the user's facial expressions and tone of voice.
[1374] The "means for receiving" refers to a method or device for inputting the program code entered by the user into the server.
[1375] "Means for identifying" refers to a method or apparatus for finding out the programming language of received program code.
[1376] "Means for explaining" refers to a method or device for expressing the operation of the converted program code in an easy-to-understand natural language.
[1377] "Means for providing" refers to a method or device for communicating the converted code and its explanation to the user.
[1378] The "means for recognizing" refers to a method or device for grasping the user's emotions.
[1379] The "adjusting means" refers to a method or device for appropriately changing the way in which the output result is presented based on the user's emotions.
[1380] MODE FOR CARRYING OUT THE INVENTION
[1381] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. Specific embodiments of this system will be described below.
[1382] 1. System Configuration
[1383] Hardware Configuration
[1384] Terminal: A device through which a user inputs program code and receives the results, such as a computer, smartphone, or tablet.
[1385] Server: A central device that receives, analyzes, and processes program code sent by users.
[1386] Camera and microphone: Devices that capture the user's facial expressions and tone of voice, thereby detecting the user's emotions.
[1387] Software Configuration
[1388] Programming language detection library (e.g., pylang-detector): Software that identifies the programming language of received code.
[1389] Program translation engine (e.g., BabelFish): Software that translates from one programming language to another.
[1390] Natural language generation engine (e.g., GPT-3): Software that explains the behavior of converted program code in natural language.
[1391] Emotion recognition engine (e.g., Affectiva): Software that analyzes a user's emotions.
[1392] 2. System Operation
[1393] The user uses the terminal to enter the program code to be converted.
[1394] For example, the user enters the Python code print("Hello, World!").
[1395] The camera and microphone connected to the device capture the user's facial expressions and tone of voice.
[1396] The device sends the entered code to the server
[1397] When the submit button is pressed, the terminal sends the code to the server in the form of a POST request.
[1398] The server receives the code and identifies its programming language
[1399] The server analyzes the received code using a programming language detection library and identifies it as Python code.
[1400] The server performs the translation from the specified programming language to another programming language.
[1401] The server uses the BabelFish library to convert the Python code into the JavaScript code console.log("Hello, World!");
[1402] The server explains the behavior of the converted program code in natural language
[1403] It uses a natural language generation engine (GPT-3) to generate an explanation: "This code will print the message 'Hello, World!' to the console."
[1404] Emotion engine recognizes user emotions
[1405] The user's facial expressions and tone of voice data sent to the server are analyzed by an emotion engine (Affectiva) and the system assesses whether the user is nervous.
[1406] The server adjusts the presentation of the output based on the recognized emotion.
[1407] For example, add an encouraging message such as "Do your best" to a user who is feeling nervous.
[1408] The server sends the converted code, a description of its operation, and additional comments based on emotions to the device.
[1409] The results are sent in JSON format and include the converted code, an explanation of how it works, and an encouraging message.
[1410] The device displays the information received from the server to the user.
[1411] The device will then display the converted JavaScript code, instructions on how it works, and an encouraging message on the screen.
[1412] 3. Examples and prompts
[1413] Examples:
[1414] The user enters the Python code print("Hello, World!") and presses the send button. The device sends the entered code to the server, which receives and analyzes the code, converts it from Python to JavaScript, and converts it into the code "console.log("Hello, World!");". Next, it explains the behavior of the converted code in natural language, providing an example that "This code will display the message 'Hello, World!' on the console." Furthermore, because the emotion engine recognizes that the user is nervous, it also adds an encouraging message saying "Good luck." Finally, the device displays this information to the user.
[1415] Example prompt sentence:
[1416] "Convert the Python code into JavaScript. The code is as follows: print("Hello, World!")"
[1417] This allows users to easily understand how to convert code into different programming languages and how it works, and they can also progress through their programming studies while receiving psychological support from the emotion engine.
[1418] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1419] Step 1: User enters program code into terminal
[1420] The user uses a text editor in the terminal to enter the program code to be converted. For example, the user enters the Python code print("Hello, World!").
[1421] Input: Python code that the user types into the terminal.
[1422] Output: Python code displayed in a terminal text editor.
[1423] Specifically, the user types code into a text editor using a keyboard.
[1424] Step 2: The device sends the entered code to the server
[1425] The terminal sends the code entered by the user to the server, specifically in the form of a POST request over the network.
[1426] Input: Python code entered by the user.
[1427] Output: The Python code sent to the server.
[1428] Specifically, when the send button is pressed, the terminal sends the code to the server as an HTTP request.
[1429] Step 3: The server receives the code and identifies the programming language
[1430] The server receives the code sent from the device. It analyzes the received code and uses a programming language detection library to identify the programming language it is in. For example, it identifies the code as Python based on the keyword "print(".
[1431] Input: Python code sent from the terminal.
[1432] Output: Code information with programming language identified.
[1433] Specifically, the server reads the code and performs an analysis based on keywords.
[1434] Step 4: Translate from the server-specific language to another programming language
[1435] The server converts the identified programming language (Python) to the target language (JavaScript). It uses the BabelFish library to convert the Python code print("Hello, World!") to the JavaScript code console.log("Hello, World!");
[1436] Input: Python code with programming language specified.
[1437] Output: Code converted to JavaScript.
[1438] Specifically, the server passes the code to a conversion engine to convert it into the desired target language.
[1439] Step 5: The server explains the behavior of the converted program code in natural language.
[1440] The server uses a generative AI model (e.g., GPT-3) to explain the behavior of the converted program code in natural language. For example, for the code "console.log("Hello, World!");", it generates an explanation such as "This code displays the message 'Hello, World!' in the console."
[1441] Input: Code converted to JavaScript.
[1442] Output: A natural language description of the behavior.
[1443] Specifically, the server inputs code into the generative AI model and receives an explanation in natural language.
[1444] Step 6: The emotion engine recognizes the user's emotion
[1445] The device uses a camera and microphone to capture the user's facial expressions and tone of voice, and sends the data to a server, which then analyzes the data with an emotion recognition engine (e.g., Affectiva) to identify the user's emotions.
[1446] Input: The captured user's facial expressions and tone of voice.
[1447] Output: Parsed user emotion information.
[1448] Specifically, the device sends the collected data to the server, where the emotion recognition engine analyzes the data.
[1449] Step 7: The server adjusts the output based on the recognized emotion.
[1450] The server adjusts the presentation of the output based on the recognized emotion, for example adding an encouraging message like "Good luck" if the user is nervous.
[1451] Input: Parsed user emotion information.
[1452] Output: The adjusted output result.
[1453] Specifically, the server dynamically changes the description and comments based on the emotion.
[1454] Step 8: The server sends the converted code, operation instructions, and additional comments to the terminal.
[1455] The server sends the converted code, a natural language description of the action, and additional comments based on the sentiment to the device. The data is sent in JSON format.
[1456] Input: The adjusted output result.
[1457] Output: The code sent to the terminal, a description, and any additional comments.
[1458] Specifically, the server packages the results in JSON format and sends them to the terminal as an HTTP response.
[1459] Step 9: The device displays the information received from the server to the user.
[1460] The terminal visually displays the information received from the server to the user, allowing the user to check the converted code, operation instructions, and encouraging messages.
[1461] Input: The code sent by the server, a description, and any additional comments.
[1462] Output: The converted code that will be displayed to the user, along with a description and any additional comments.
[1463] Specifically, the terminal analyzes the received data and displays it on the user interface.
[1464] This process allows users to intuitively and effectively convert program code and understand its behavior. Emotion recognition also provides psychological support to users.
[1465] (Application example 2)
[1466] 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."
[1467] Conventional programming learning support systems convert code into different programming languages and provide explanations to help users understand its operation, but they have the problem of being unable to flexibly respond to the user's emotions. In particular, if a beginner feels nervous or anxious, they may not be able to provide appropriate support, which could reduce the effectiveness of their learning. The objective of this invention is to improve the efficiency of programming learning by providing operation explanations and support messages that are tailored to the user's emotional state.
[1468] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1469] In this invention, the server includes means for receiving initial program code entered by a user, means for identifying the programming language of the received program code, means for converting the identified programming language into another programming language, means for explaining the operation of the converted code in natural language, emotion analysis means for recognizing the user's facial expression and tone of voice to analyze their emotion, means for adjusting the operation explanation and additional message based on the analyzed emotion, and means for providing the converted code, operation explanation, and additional message based on the emotion to the user. This enables flexible program code conversion and explanation according to the user's emotion.
[1470] The "means for receiving the initial program code entered by the user" is a function for transmitting the program code entered by the user into the terminal to the server and for the server to receive it.
[1471] The "means for identifying the programming language of the received program code" is a processing function for identifying the programming language in which the transmitted program code is written.
[1472] The "means for converting from the identified programming language to another programming language" is a processing function for converting code in the identified programming language into another specified programming language.
[1473] "Means for explaining the behavior of the converted code in natural language" is a function for generating an easy-to-understand natural language explanation of how the converted program code operates.
[1474] "Emotion analysis means for recognizing a user's facial expression and tone of voice to analyze emotions" is a function that uses a camera and microphone to analyze a user's facial expression and tone of voice to recognize their emotional state at that time.
[1475] The "means for adjusting the operation explanation and additional message based on the analyzed emotion" is a function for adjusting the content and format of the operation explanation and additional message according to the recognized emotional state of the user.
[1476] The "means for providing the user with the converted code, an explanation of its operation, and an additional message based on the user's emotion" is a function for ultimately displaying the converted program code, an explanation of its operation, and an additional message tailored to the user's emotional state to the user on the terminal.
[1477] This invention combines an emotion engine with a system that allows users to convert program code into different programming languages and understand its behavior. The system receives code entered by a user, analyzes it, converts it from a specific programming language to a different language, and then explains its behavior in natural language. It also has the ability to analyze the user's emotions and adjust the content and format of the behavior explanation based on that analysis. Specific embodiments for implementing this invention are described below.
[1478] A user inputs the first program code using a device such as a smartphone, tablet, or PC. For example, the user inputs the Python code "print("Hello, World!")". This input code is sent to the server by the device. The server executes the following steps:
[1479] First, the server has a means for receiving input code and receives the program code sent by the user. Next, it uses a program code language identification means, which is a means for analyzing the received code, to determine which programming language the code is in. For this determination, it uses a method for identifying that the code is Python based on the keyword "print(".
[1480] Next, the server has a means to convert the specified programming language into another programming language. For example, when converting from Python to JavaScript, it converts the received code "print("Hello, World!")" into "console.log("Hello, World!");". This conversion process is performed based on pre-defined conversion rules.
[1481] Furthermore, the server has a means to explain the behavior of the converted code in natural language. For the converted code "console.log("Hello, World!");", it generates a description such as "This code displays the message 'Hello, World!' on the console." This description is written in natural language so that users can easily understand it.
[1482] The server also uses hardware such as a camera and microphone to analyze the user's emotional state. It has an emotion analysis means that analyzes the user's facial expressions and tone of voice, and based on this information, it recognizes emotions such as whether the user is nervous or relaxed. The analyzed emotional information is used to adjust the content and presentation method of the action instructions. For example, if the user is nervous, it may provide more detailed instructions and display additional encouraging messages. Specifically, it may display a message such as "Do your best."
[1483] Finally, the system has a means for providing the user with the converted code, an explanation of the operation, and an additional message based on emotions. This information is sent to the terminal and displayed on the user's screen. This allows the user to compare the original code they entered with the converted code, understand the operation, and receive encouragement from the support message based on emotions.
[1484] As a concrete example, when a user enters the Python code "print("Hello, World!")", the process takes place in the following steps: When the user enters the code into a terminal and presses the send button, the terminal sends the entered code to the server. The server receives the code and identifies its programming language. Next, the server converts the identified language into the target language (JavaScript in this case). It generates a natural language explanation of the operation of the converted code and recognizes the user's emotions using sentiment analysis means. Finally, the server adjusts the presentation method of the converted code and operation explanation based on the recognized emotions, and provides information to the user, including additional comments.
[1485] Example prompt:
[1486] The user says, "I want to convert some Python code to JavaScript." Convert the following Python code into JavaScript and explain how it works clearly. Python code: print("Hello, World!") The user seems nervous. Based on this, you should provide more details and include an encouraging message.
[1487] According to this invention, a user can receive flexible programming learning support according to his / her emotions, thereby improving learning efficiency.
[1488] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1489] Step 1:
[1490] The user enters the program code into the terminal and presses the send button.
[1491] Input: Python code print("Hello, World!")
[1492] Specific operation: The user enters the code into the text editor and clicks the send button. The device sends this code to the server.
[1493] Step 2:
[1494] The server receives the entered code.
[1495] Input: Python code sent from the terminal
[1496] Output: Received program code
[1497] Specific operation: The server receives the code sent from the user through the network interface.
[1498] Step 3:
[1499] The server identifies the programming language of the received program code.
[1500] Input: Received program code print("Hello, World!")
[1501] Output: Programming language (Python)
[1502] What happens: The server performs a syntax analysis on the code and determines that it is written in Python because it contains the keyword "print(".
[1503] Step 4:
[1504] The server performs the conversion from the specified programming language to the target language (JavaScript).
[1505] Input: Programming language (Python) and program code
[1506] Output: Transformed code console.log("Hello, World!");
[1507] Specific operation: The server performs a conversion process to convert Python code into JavaScript code based on the conversion rules.
[1508] Step 5:
[1509] The server explains in natural language what the converted code does.
[1510] Input: Transformed code console.log("Hello, World!");
[1511] Output: Description: "This code prints the message 'Hello, World!' to the console."
[1512] Specific behavior: The server simulates the execution results of the converted code and generates a description to express the behavior in natural language.
[1513] Step 6:
[1514] The server recognizes the user's facial expressions and tone of voice to analyze their emotions.
[1515] Input: Camera video, microphone audio
[1516] Output: User's emotional state (tense)
[1517] How it works: The server uses the device's camera and microphone to capture the user's facial expressions and tone of voice, then analyzes the data using an emotion analysis engine to determine their emotional state.
[1518] Step 7:
[1519] The server adjusts the action description and additional messages based on the analyzed emotions.
[1520] Input: Action description and user's emotional state
[1521] Output: Tailored behavior explanation and encouragement message
[1522] What it does: If the user is nervous, the server provides a more detailed explanation and adds an encouraging message such as "Good luck."
[1523] Step 8:
[1524] The server transmits the converted code and the action description, as well as an additional message based on the emotion, to the terminal.
[1525] Input: converted code, adjusted behavior description, additional message
[1526] Output: Information to display on the terminal
[1527] Specific operations: The server composes the final data into packets and sends them to the terminal, which prepares the information to display to the user.
[1528] Step 9:
[1529] The terminal displays the information received from the server to the user.
[1530] Input: Information sent from the server
[1531] Output: The converted code displayed to the user, along with a description of what happened and any additional messages.
[1532] Specific operation: The terminal parses the received data and converts it into the appropriate format for display on the screen. On the screen, the user can see the code they entered, the converted code, operation instructions, and encouraging messages.
[1533] This process flow allows the user to receive flexible program code conversion and explanations that correspond to their emotions, improving the learning effect.
[1534] 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.
[1535] 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.
[1536] 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.
[1537] 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.
[1538] FIG. 9 illustrates 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 behaviors 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.
[1539] 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.
[1540] 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).
[1541] 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.
[1542] 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."
[1543] 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.
[1544] 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).
[1545] 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.
[1546] 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.
[1547] 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.
[1548] 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.
[1549] 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.
[1550] 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.
[1551] 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.
[1552] 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.
[1553] 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.
[1554] 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.
[1555] The following is further disclosed regarding the above embodiment.
[1556] (Claim 1)
[1557] means for receiving an initial program code entered by a user;
[1558] means for identifying the programming language of the received program code;
[1559] a means for converting from the identified programming language to another programming language;
[1560] A means of explaining in natural language what the transformed code will do;
[1561] a means for providing the converted code and an operational description to a user;
[1562] A system including:
[1563] (Claim 2)
[1564] 10. The system of claim 1, further comprising means for identifying a programming language based on specific keywords.
[1565] (Claim 3)
[1566] 10. The system of claim 1, further comprising means for verifying the converted code for proper operation before providing the converted code to a user.
[1567] "Example 1"
[1568] (Claim 1)
[1569] means for receiving an initial program code entered by a user;
[1570] means for identifying the programming language of the received program code;
[1571] a means for converting from the identified programming language to another programming language;
[1572] A means of explaining in natural language what the transformed code will do;
[1573] a means for providing the converted code and an operational description to a user;
[1574] means for using a conversion algorithm to convert a particular programming language into a different programming language;
[1575] A means for converting the argument part;
[1576] means for storing the generated natural language explanation;
[1577] A system including:
[1578] (Claim 2)
[1579] 10. The system of claim 1, further comprising means for identifying a programming language based on specific keywords.
[1580] (Claim 3)
[1581] 10. The system of claim 1, further comprising means for verifying the converted code for proper operation before providing the converted code to a user.
[1582] "Application Example 1"
[1583] (Claim 1)
[1584] means for receiving an initial program code entered by a user;
[1585] means for identifying the programming language of the received program code;
[1586] a means for converting from the identified programming language to another programming language;
[1587] A means of explaining in natural language what the transformed code will do;
[1588] a means for providing the converted code and an operational description to a user;
[1589] means for allowing a user to enter code and view results in a virtual classroom environment;
[1590] means for supporting interaction between the user and other users or a virtual teacher within the virtual classroom;
[1591] A system including:
[1592] (Claim 2)
[1593] 10. The system of claim 1, further comprising means for identifying a programming language based on specific keywords.
[1594] (Claim 3)
[1595] 10. The system of claim 1, further comprising means for verifying the converted code for proper operation before providing the converted code to a user.
[1596] "Example 2: Combining Emotion Engines"
[1597] (Claim 1)
[1598] means for receiving an initial program code entered by a user;
[1599] means for identifying the programming language of the received program code;
[1600] a means for converting from the identified programming language to another programming language;
[1601] A means of explaining in natural language what the transformed code will do;
[1602] means for recognizing a user's emotion and adjusting the presentation method of the output result based on the recognition result;
[1603] a means for providing the converted code and an operational description to a user;
[1604] A system including:
[1605] (Claim 2)
[1606] 10. The system of claim 1, further comprising means for identifying a programming language based on specific keywords.
[1607] (Claim 3)
[1608] 10. The system of claim 1, further comprising means for verifying the converted code for proper operation before providing the converted code to a user.
[1609] "Application example 2 when combining emotion engines"
[1610] (Claim 1)
[1611] means for receiving an initial program code entered by a user;
[1612] means for identifying the programming language of the received program code;
[1613] a means for converting from the identified programming language to another programming language;
[1614] A means of explaining in natural language what the transformed code will do;
[1615] emotion analysis means for recognizing a user's facial expression and tone of voice to analyze emotions;
[1616] means for adjusting the action description and additional messages based on the analyzed emotions;
[1617] means for providing the user with the converted code and an operation explanation and an additional message based on the emotion;
[1618] A system including:
[1619] (Claim 2)
[1620] 10. The system of claim 1, further comprising means for identifying a programming language based on specific keywords.
[1621] (Claim 3)
[1622] 10. The system of claim 1, further comprising means for verifying the converted code for proper operation before providing the converted code to a user. [Explanation of symbols]
[1623] 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. means for receiving an initial program code entered by a user; means for identifying the programming language of the received program code; a means for converting from the identified programming language to another programming language; A means of explaining in natural language what the transformed code will do; a means for providing the converted code and an operational description to a user; A system including:
2. 10. The system of claim 1, further comprising means for identifying a programming language based on a particular keyword.
3. 2. The system of claim 1, further comprising means for verifying the proper operation of the converted code before providing it to the user.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A