system
A generative AI-based system addresses inefficiencies in pair programming by allowing users to independently generate and improve code efficiently and flexibly, overcoming synchronization challenges.
Patent Information
- Application Number
- JP2024141630
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2026-03-06
AI Technical Summary
Pair programming in code development is inefficient due to the need for synchronization with another person's schedule and becomes increasingly difficult as program complexity rises, hindering individual efficiency and flexibility in code generation and review.
A system utilizing a generative AI to receive and generate program code based on user prompts, allowing users to efficiently and flexibly create, review, and improve code independently.
Enables users to generate and review program code quickly and efficiently, reducing the need for synchronization and enhancing flexibility in code development.
Smart Images

Figure 2026038295000001_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] While pair programming contributes to improving code quality and early bug detection by sharing effort, it has its drawbacks: it does not double efficiency and requires coordination with the other person's schedule. Furthermore, as the complexity of a program increases, it becomes more difficult to achieve perfect synchronization. Therefore, there is a need for a method that allows individual developers to efficiently generate, review, and improve code. [Means for solving the problem]
[0005] To solve the above problems, the present invention provides a system including a means for receiving a prompt for generated program code, a means for generating program code using a generation artificial intelligence based on the prompt, and a means for transmitting the generated program code. The system further includes a means for transmitting the prompt and a means for receiving and displaying the generated program code, and the generation artificial intelligence includes a means for generating program code corresponding to the prompt using natural language processing, thereby realizing a system that allows users to individually generate code with high efficiency and flexibly review and improve it.
[0006] "Generated program code" refers to the source code output by the generating artificial intelligence based on the user's prompts.
[0007] A "prompt" is a set of instructions written in natural language detailing the program code the user wants generated.
[0008] "Generative AI" is an AI system that analyzes user prompts and generates program code based on their content.
[0009] A "means" is a device or program module for performing a specific function or process.
[0010] A "system" is an assembly of multiple means working together to provide a desired function or service.
[0011] "Natural language processing" is a field of computer technology for understanding, analyzing, and generating human language.
[0012] A "user" is a developer or consumer who utilizes the system to enter prompts and receive generated program code.
[0013] The "receiving means" is a device or program module for receiving data or information from the outside.
[0014] A "transmitting means" is a device or program module for sending data or information to an external device or system.
[0015] The "display means" is a device or program module for visually displaying received data or information on a screen. [Brief explanation of the drawings]
[0016] [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
[0017] 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.
[0018] First, the terms used in the following description will be explained.
[0019] 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).
[0020] 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.
[0021] 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.
[0022] 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.
[0023] 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."
[0024] [First embodiment]
[0025] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0026] 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.
[0027] 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).
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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.
[0032] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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."
[0037] The present invention relates to a system that receives prompts for generated program code, generates the program code using a generation AI, and provides the generated code to a user. Specific embodiments of the system and how to use it are described below.
[0038] System configuration
[0039] The system of the present invention is mainly composed of three entities: a client terminal used by the user, a server on which the generation AI runs, and a network over which the two communicate.
[0040] 1. Client Terminal
[0041] Users use the system through client terminals.
[0042] The client terminal provides an interface for inputting prompts and has means for transmitting the prompts to the server.
[0043] The device includes means for receiving the generated program code returned from the server and displaying it to the user.
[0044] 2. Server
[0045] The server has means for receiving prompts sent from the client terminal.
[0046] A generative AI runs within the server and generates program code based on prompts.
[0047] It includes means for transmitting the generated program code to the client terminal.
[0048] System Operation
[0049] User operation (client terminal)
[0050] The user inputs a prompt through the interface on the client terminal. For example, if the user wants to create a Python function that performs addition, the user inputs the following prompt:
[0051] example:
[0052] Function Name: add_numbers
[0053] Arguments: a(number), b(number)
[0054] Returns: the sum of a and b
[0055] When the user inputs this prompt and presses the send button, the client terminal transmits this prompt to the server.
[0056] Server Processing
[0057] The server receives the prompt sent from the client terminal. For example, suppose the server receives the following prompt from the user:
[0058] Function Name: add_numbers
[0059] Arguments: a(number), b(number)
[0060] Returns: the sum of a and b
[0061] Based on the received prompt, the AI requests code generation. The AI uses natural language processing technology to generate program code corresponding to the prompt. For example, the AI generates the following Python code:
[0062] def add_numbers(a, b):
[0063] return a + b
[0064] The generated program code is formatted on the server side and sent to the client terminal.
[0065] Viewing the client terminal
[0066] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[0067] Generated code:
[0068] def add_numbers(a, b):
[0069] return a + b
[0070] In this way, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. This system allows users to individually produce code with high efficiency and flexibly review and improve it.
[0071] The processing flow will be explained below.
[0072] Step 1:
[0073] The user inputs a prompt through the client terminal interface, which is a natural language instruction detailing the program code they want generated.
[0074] Step 2:
[0075] The user presses the send button to send the entered prompt to the server. The client terminal generates a POST request including the prompt and sends it to the server's API endpoint.
[0076] Step 3:
[0077] The server receives the prompt sent from the client device. The server's API endpoint accepts the request, analyzes the request content, and extracts the prompt portion.
[0078] Step 4:
[0079] The server sets the parameters necessary to pass the extracted prompt to the generation AI, including the engine specification for calling the generation AI, the prompt content, the maximum number of tokens, etc.
[0080] Step 5:
[0081] The server sends a request to the API of the AI generator based on the set parameters. The AI generator receives the request and generates the corresponding program code based on the prompts.
[0082] Step 6:
[0083] The generation AI returns the generated program code to the server, which receives the returned code and formats it into an appropriate format.
[0084] Step 7:
[0085] The server prepares the formatted generated code as a response to the client terminal, includes the generated program code in a response object, and sends it to the client terminal.
[0086] Step 8:
[0087] The client terminal receives the response from the server, checks the status code of the response, and performs error checking if necessary.
[0088] Step 9:
[0089] If successful, the client terminal extracts the generated program code from the response and displays it on the screen of the client terminal for display to the user.
[0090] Step 10:
[0091] The user can check the generated code displayed on the client terminal and use it as needed, or if the generated code is not as expected, enter a new prompt to start the process again.
[0092] Through this process, the system of the present invention provides an environment in which users can efficiently generate program code and flexibly review and improve it.
[0093] Example 1
[0094] 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."
[0095] Conventionally, generating program code requires a high level of specialized knowledge and time, making it difficult for non-experts to generate code efficiently. Furthermore, there are only a limited number of systems that can instantly provide generated program code to users. Therefore, there is a demand for a system that allows users to easily generate program code and check its contents.
[0096] 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.
[0097] In this invention, the server includes means for inputting and transmitting a prompt sentence for program code generated at a terminal used by a user, a server for receiving the prompt sentence via a communication network, means for generating program code using a generative model based on the prompt sentence, means for transmitting the generated program code to the terminal, and means for displaying the generated program code on the terminal. This allows a user to automatically generate program code by simply inputting a specific prompt sentence, and to immediately check the generated code.
[0098] A "terminal used by a user" is an electronic device used by a user to input and send prompt sentences and receive responses from a server.
[0099] A "prompt sentence" is a text entered in natural language by a user that describes the specifications and requirements of the program code that the user requests.
[0100] A "communications network" is a network infrastructure for exchanging data between a user's terminal and a server.
[0101] A "server" is a computer system that receives a prompt sentence, generates program code using a generative model, and then transmits the generated code to a user's terminal.
[0102] A "generative model" is an algorithm or artificial intelligence system that uses natural language processing techniques to generate program code based on a user prompt.
[0103] "Natural language processing technology" is a technology that allows computers to understand and process human language, and is used as part of a generative model.
[0104] "Program code" is code that describes instructions for a computer to execute, and is generated based on user requirements.
[0105] This invention is a system that automatically generates program code based on a prompt entered by a user and immediately provides the generated code to the user. Specifically, it consists of a terminal used by the user, a server that receives the prompt, a generative AI model, and a communication network that connects them.
[0106] 1. Client Terminal
[0107] A user inputs a prompt sentence using a client terminal. This terminal may be a general personal computer, smartphone, or tablet, and accesses the system of the present invention through a web browser. The client terminal provides a web interface built with HTML, CSS, and JavaScript (registered trademark), and has the function of allowing the user to input and send a prompt sentence.
[0108] 2. Server
[0109] The server receives the prompt sentence sent by the user and generates program code based on the prompt sentence using a generative AI model. The server runs a generative AI model, such as GPT-4 (registered trademark), which uses natural language processing technology to generate program code corresponding to the input prompt sentence. The generated program code is formatted on the server side, converted into an appropriate format, and then transmitted to the client terminal.
[0110] 3. Communication Network
[0111] The user's device and the server communicate via the Internet. This communication is mainly carried out using the HTTPS protocol to ensure data security.
[0112] Specific examples
[0113] For example, if a user wants to create a Python function that performs addition, he or she can enter the following prompt statement into the client terminal:
[0114] Function Name: add_numbers
[0115] Arguments: a(number), b(number)
[0116] Returns: the sum of a and b
[0117] This prompt is sent to the server, and the generative AI model on the server generates program code based on it. The generated Python code looks like this, for example:
[0118] def add_numbers(a, b):
[0119] return a + b
[0120] The generated code is formatted, sent to the client terminal, and displayed to the user.
[0121] This allows users to easily generate program code in natural language and check it on the spot, even without specialized knowledge. By using this system, program code can be generated quickly and efficiently.
[0122] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0123] Step 1:
[0124] Entering a prompt statement
[0125] The user inputs the desired program code specifications through the client terminal interface, for example, "Function name: add_numbers, Arguments: a (numerical value), b (numerical value), Return value: sum of a and b" as a prompt statement.
[0126] Input: Prompt text based on user request
[0127] Output: The prompt text entered
[0128] Specific operation: The user enters a prompt sentence in the specified format on the keyboard and clicks the send button.
[0129] Step 2:
[0130] Sending a prompt
[0131] When the user presses the send button, the client terminal sends the entered prompt text to the server as an HTTP POST request.
[0132] Input: prompt statement
[0133] Output: The prompt is sent to the server.
[0134] Specific operation: The client terminal sends the entered prompt text to the specified endpoint of the server via an HTTP POST request.
[0135] Step 3:
[0136] Receiving a prompt
[0137] The server receives the prompt sentence sent from the client terminal.
[0138] Input: Prompt sent from the client terminal
[0139] Output: Prompt statement stored in server memory
[0140] Specific operation: The server receives an HTTP request, parses the prompt text, and stores it in its internal memory.
[0141] Step 4:
[0142] Program code generation request
[0143] The server sends a program code generation request to the generative AI model based on the received prompt sentence. This request is sent to the API endpoint of the generative AI model.
[0144] Input: Saved prompt statement
[0145] Output: Request to the generative AI model
[0146] Specific operation: The server inputs a prompt sentence into the API of the generation AI model and sends a generation request.
[0147] Step 5:
[0148] Generate program code
[0149] The generative AI model uses natural language processing technology to generate program code based on the received prompt. For example, if the prompt is "add_numbers," it generates the corresponding Python code.
[0150] Input: The prompt text sent as a generation request
[0151] Output: Generated program code
[0152] Specific operation: The generative AI model analyzes the prompt sentence and generates the appropriate program code.
[0153] Step 6:
[0154] Formatting generated code
[0155] The server receives the generated program code and formats it appropriately, ensuring that the code is displayed correctly.
[0156] Input: Program code returned from the generative AI model
[0157] Output: Formatted program code
[0158] What happens: The server formats the generated code and converts it into a format suitable for display or execution.
[0159] Step 7:
[0160] Submitting generated code
[0161] The server then sends the formatted program code to the client terminal as an HTTP response.
[0162] Input: Formatted program code
[0163] Output: Generated code sent to the client terminal
[0164] Specific operation: The server sends the program code to the client terminal as an HTTP response.
[0165] Step 8:
[0166] Viewing the Generated Code
[0167] The client terminal displays the generated code received from the server to the user, who can then check the displayed code and use its contents.
[0168] Input: Generated code sent from the server
[0169] Output: The program code displayed on the user's screen
[0170] Specific operation: The client terminal displays the received program code on the user interface using HTML / CSS.
[0171] This allows the user to easily input prompt statements and generate and check program code accurately and quickly.
[0172] (Application example 1)
[0173] 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."
[0174] In factories, there is a need to flexibly and quickly generate and execute a wide variety of work tasks to improve production efficiency. However, conventional methods require each work task to be programmed manually, which requires a great deal of time and effort. It is also not easy to regenerate programs to adapt to changes in the workplace. Therefore, the present invention aims to provide a system in which factory robots use generative AI to automatically generate and execute work tasks, thereby significantly improving production efficiency.
[0175] 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.
[0176] In this invention, the server includes means for receiving prompts for generated program code, means for generating program code using a generation artificial intelligence based on the prompts, means for transmitting the generated program code, and means for generating factory work tasks, which enables robots in the factory to dynamically and efficiently execute work tasks, improving production efficiency and enabling flexible responses.
[0177] A "prompt" is an instruction that a user enters in natural language to describe a particular task or request, and program code is generated based on that instruction.
[0178] "Generative AI" is AI that has algorithms that generate program code based on prompts received from a user.
[0179] "Program code" is a string of characters that describes instructions for performing a particular task or process, in a format that a computer can understand and execute.
[0180] "Transmit" refers to the act of transferring data from a client terminal to a server, or from a server to a client terminal or other device.
[0181] A "client terminal" is a device used by a user to enter prompts and view generated program code.
[0182] "Factory work tasks" refer to specific work content such as assembly, inspection, and palletizing that is carried out within a factory.
[0183] A "factory robot" is an automated machine for performing work tasks in a factory, and is a device that operates based on generated program code.
[0184] "Natural language processing" is a technology that allows computers to understand, analyze, and generate language that humans use on a daily basis.
[0185] The present invention relates to a system that automatically generates work tasks for factory robots using a generation AI and executes the tasks. Specific embodiments of the present invention are described below.
[0186] System Configuration
[0187] This system mainly consists of the following components:
[0188] 1. Client Terminal
[0189] A device that allows a user to enter prompts and view the generated program code for a work task, such as a smartphone or tablet.
[0190] It provides an interface where the user can input a prompt in natural language, e.g., "Task name: assembly, parameters: parts (engine)".
[0191] It has the function of displaying the generated program code.
[0192] 2. Server
[0193] A prompt sent from a client terminal is received, and program code is generated using a generation artificial intelligence.
[0194] The generated program code is sent to the client terminal and the factory robot.
[0195] It uses a generative AI model that runs on the server.
[0196] 3. Factory robots
[0197] The actual work task is executed based on the program code sent from the server.
[0198] Specific tasks such as assembly, inspection, and palletizing are automated.
[0199] Operation flow
[0200] 1. Enter the prompt
[0201] The user inputs work task instructions as prompts using a client terminal, for example, in the format "task name: assembly, parameters: parts (engine)."
[0202] 2. Sending a prompt
[0203] A prompt is sent from the client terminal to the server.
[0204] 3. Generate program code
[0205] The server analyzes the received prompts and generates appropriate program code using a generative AI model, where the generated program code includes instructions corresponding to the work task.
[0206] 4. Sending the program code
[0207] The generated program code is transmitted from the server to the client terminal and the factory robot.
[0208] 5. Performing work tasks
[0209] The factory robot executes the work task according to the received program code, for example, assembling the specified parts.
[0210] Specific examples
[0211] Examples of prompts:
[0212] Task Name: Assembly
[0213] Parameter: Parts (Engine)
[0214] The generative AI model receives this prompt and generates the program code needed to assemble the engine parts, which a factory robot then performs.
[0215] The above is the "Mode for Carrying Out the Invention", and the system of the present invention greatly improves the efficiency of production activities in factories and enables flexible responses.
[0216] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0217] Step 1:
[0218] The user inputs a prompt using a client terminal. The input prompt is, for example, in the format of "Task name: assembly, parameters: parts (engine)". The input data is saved locally and sent to the next processing step.
[0219] Step 2:
[0220] The client terminal sends the entered prompt text to the server. Specifically, data is transferred from the terminal to the server via an HTTP request or other method. The input is the prompt text, and the output is a request to the server.
[0221] Step 3:
[0222] The server analyzes the received prompt and inputs it into the generative AI model. The generative AI model generates program code based on the prompt and outputs that code to the server. The input is the prompt, and the output is the generated program code.
[0223] Step 4:
[0224] The server reformats the generated program code and sends it to the client device and the factory robot. Specifically, it converts the generated code into JSON or other appropriate format and sends it as an HTTP response. The input is the generated program code, and the output is the data to be sent to the client device and the factory robot.
[0225] Step 5:
[0226] The client terminal displays the program code received from the server to the user. The user can review and approve the code as needed. Specifically, the received code is rendered and displayed in a GUI. The input is the program code received from the server, and the output is the code displayed to the user.
[0227] Step 6:
[0228] Factory robots execute work tasks based on program codes received from a server. Specifically, they perform physical actions based on the code (e.g., assembling parts, inspecting products, etc.). The input is the program code received from the server, and the output is the executed work task.
[0229] The above are the specific processing steps of this system.
[0230] 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.
[0231] The present invention relates to a system that receives prompts for generated program code, generates the program code using a generation AI, and provides the generated code to a user, and further combines it with an emotion engine that recognizes the user's emotions. Specific embodiments of this system and how to use it are described below.
[0232] System configuration
[0233] The system of the present invention is mainly composed of a client terminal used by the user, a server on which the generation AI runs, an emotion engine that recognizes the user's emotions, and a network over which these communicate.
[0234] 1. Client Terminal
[0235] The user inputs the prompt using the interface of the client terminal.
[0236] The client terminal includes means for sending prompts to the server and means for displaying the generated program code received from the server.
[0237] 2. Server
[0238] The server includes means for receiving prompts from the client terminal and providing the prompts to the generation AI to generate the program code.
[0239] The server also has the function of transmitting the generated program code to the client terminal.
[0240] 3. Emotion Engine
[0241] The emotion engine has a means for recognizing the user's emotion and reflects the result in generating prompts.
[0242] The emotion engine detects emotions using a user's voice analysis, facial expression analysis, or operation patterns.
[0243] System Operation
[0244] User operation (client terminal)
[0245] The user enters a prompt through the client terminal interface. For example, to request the creation of a Python function that performs addition, the user enters the following prompt:
[0246] example:
[0247] Function Name: add_numbers
[0248] Arguments: a(number), b(number)
[0249] Returns: the sum of a and b
[0250] When the user inputs this prompt and presses the send button, the client terminal sends the prompt to the server.
[0251] Emotion Engine Operation
[0252] The client terminal includes an emotion engine that analyzes the user's voice, facial expressions, and operation patterns to recognize the user's emotions. The emotion engine then transmits the recognized emotion information to the server.
[0253] Server Processing
[0254] The server receives prompts and emotional information sent from the client device. The server sends a request to the generation AI based on the prompt and reflects the emotional information when generating the prompt.
[0255] Generative AI uses natural language processing techniques to generate program code corresponding to the prompt. For example, generative AI generates the following Python code:
[0256] def add_numbers(a, b):
[0257] return a + b
[0258] The generated code is formatted on the server and sent to the client terminal.
[0259] Viewing the client terminal
[0260] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[0261] Generated code:
[0262] def add_numbers(a, b):
[0263] return a + b
[0264] In this way, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. Furthermore, the emotion engine enables prompt generation that reflects the user's emotional state, resulting in code generation that is more tailored to the user.
[0265] The system of the present invention allows users to generate code individually and efficiently, and flexibly review and improve it. The emotion engine recognizes the user's emotions and reflects them in the prompt generation, reducing the burden on the user and enabling the generation of more satisfying program code.
[0266] The processing flow will be explained below.
[0267] Step 1:
[0268] The user enters a prompt using the client terminal interface, for example:
[0269] Function Name: add_numbers
[0270] Arguments: a(number), b(number)
[0271] Returns: the sum of a and b
[0272] Step 2:
[0273] The user presses the submit button to send the prompt they entered to the server. The client terminal generates a POST request including the prompt and sends it to the server's API endpoint.
[0274] Step 3:
[0275] At the same time, the emotion engine installed in the client device analyzes the user's voice, facial expressions, and operation patterns to detect the user's emotional state. For example, when analyzing the user's facial expressions with a camera, facial movements are captured to determine the user's emotions.
[0276] Step 4:
[0277] The emotion engine sends the detected emotion information to a cloud endpoint, including emotion information such as "the user is feeling impatient."
[0278] Step 5:
[0279] The server receives the prompt and emotion information sent from the client device. The server's API endpoint accepts the request, analyzes the request content, and extracts the prompt and emotion information.
[0280] Step 6:
[0281] The server provides the extracted prompt and emotional information to the generation AI. At this time, it sets parameters for the generation AI to reflect the emotional information along with the prompt. For example, if the user is feeling impatient, it sets the AI to generate concise, quickly executable code.
[0282] Step 7:
[0283] The server sends a request to the API of the generation AI based on the set parameters. The generation AI generates program code using the prompt and emotion information.
[0284] Step 8:
[0285] The Generative AI generates the following Python code and returns it to the server:
[0286] def add_numbers(a, b):
[0287] return a + b
[0288] Step 9:
[0289] The server formats the received program code, performs processing such as adding comments as necessary, and then creates a response to be sent to the client terminal.
[0290] Step 10:
[0291] The client terminal checks the response received from the server and extracts the generated program code, for example, "Generated code: def add_numbers(a, b): return a + b".
[0292] Step 11:
[0293] The user can check the generated program code displayed on the client terminal, and if necessary, modify or regenerate the code to ensure that it meets the expectations. The user can also enter a new prompt and send it again.
[0294] In this way, the user is effectively able to generate program code based on prompts, but also to utilize an environment in which optimal code generation occurs based on emotions recognized by the emotion engine.
[0295] Example 2
[0296] 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."
[0297] In conventional program code generation systems, the process of generating program code based on prompts entered by the user is standard, but it is not possible to reflect the user's emotional state. This makes it difficult to generate code flexibly according to the user's state, and there are issues such as not being able to sufficiently reduce the burden on the user or improve satisfaction.
[0298] 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 instructions regarding the generated program code, means for generating the program code using a generation artificial intelligence based on the instructions, means for transmitting the generated program code, means for recognizing the user's emotion, and means for reflecting the recognized emotion information in the instructions. As a result, the program code is generated reflecting the user's emotional state, enabling flexible and satisfying code generation according to individual needs.
[0299] "Generated program code" is software code that is automatically generated based on instructions entered by a user.
[0300] An "instruction" is input information that specifies the content of the program code that the user wants to generate.
[0301] "Generative AI" refers to algorithms and systems that automatically generate program code based on user instructions.
[0302] The "transmission means" is a function for sending the generated program code and other data from the server to the client terminal.
[0303] "Means for recognizing emotions" refers to technology or devices for detecting a user's emotional state (e.g., joy, sadness, stress, etc.).
[0304] "Emotional information" refers to data that represents the user's emotional state, and can be obtained from voice analysis, facial expression analysis, operation pattern analysis, etc.
[0305] The "receiving means" is a function that allows the server to receive instructions and emotional information sent from the client terminal.
[0306] The "display means" is a function for visually displaying the generated program code to the user.
[0307] The present invention relates to a system that receives instructions for generating program code, generates program code using artificial intelligence, and provides the generated code to a user. Furthermore, by combining it with an emotion engine that recognizes the user's emotions, the purpose is to realize code generation that is more suited to the user.
[0308] System Configuration
[0309] The system of the present invention comprises the following main components:
[0310] 1. Client Terminal
[0311] A user uses a client terminal to input instructions regarding the program code to be generated through an interface. The client terminal includes a means for sending prompts to the server and a means for displaying the generated program code received from the server. The client terminal also includes a built-in emotion engine that recognizes emotions from the user's voice, facial expressions, and operation patterns.
[0312] 2. Server
[0313] The server has a means for receiving prompts from the client terminal and providing the prompts to the generation artificial intelligence to generate program code. The server also includes a function for transmitting the generated program code to the client terminal. Specifically, the server generates program code corresponding to the prompts using natural language processing technology.
[0314] 3. Emotion Engine
[0315] The emotion engine has a means for detecting emotions using a user's voice analysis, facial expression analysis, or operation patterns. The recognized emotion information is reflected in the generation of prompts and transmitted to the server.
[0316] Hardware and software used
[0317] Client terminal
[0318] Client devices are personal computers or smartphones. The interface is often a web browser (such as Google Chrome (registered trademark) or Mozilla Firefox) or a dedicated app. The emotion engine uses OpenFace (facial expression analysis), Google (registered trademark) Speech-to-Text API (audio analysis), or a custom tactile pattern recognition algorithm.
[0319] server
[0320] The server is a remote server with high-performance computing resources, equipped with a search engine such as ElasticSearch (registered trademark) and a high-performance processor. Large-scale language models such as OpenAI's (registered trademark) GPT-3 (registered trademark) and ChatGPT (registered trademark) are used for generative artificial intelligence.
[0321] Example of operation
[0322] Below are some specific examples of how this system can be used.
[0323] Prompt Sentence Examples
[0324] If a user requests the creation of a Python function to perform addition from the client terminal interface, he or she enters the following prompt statement:
[0325] Function Name: add_numbers
[0326] Arguments: a(number), b(number)
[0327] Returns: the sum of a and b
[0328] By entering this prompt and pressing the send button, the client terminal sends the prompt to the server. At the same time, the emotion engine analyzes the user's emotions and sends that information to the server.
[0329] The server receives the prompt and emotion information and generates the specified Python function based on the artificial intelligence. The generated code is then sent to the client terminal and displayed to the user. The displayed content is as follows:
[0330] Generated code:
[0331] def add_numbers(a, b):
[0332] return a + b
[0333] As described above, the present invention realizes the generation of program code that reflects user instructions and emotional information, reduces the burden on the user, and provides code generation that is highly satisfying.
[0334] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0335] Step 1:
[0336] The user uses the client terminal interface to input and send a prompt for the program code they want to generate. The input is in the format of "Function name: add_numbers", "Arguments: a (number), b (number)", "Return value: sum of a and b". The input prompt is sent from the client terminal to the server as is.
[0337] Input: Prompt statement (e.g., "Function name: add_numbers", "Arguments: a (number), b (number)", "Return value: sum of a and b")
[0338] Output: Prompt sent from client terminal to server
[0339] Specific operation: The user inputs the prompts in the interface and presses the send button, and the client terminal sends a send request to the server.
[0340] Step 2:
[0341] The client terminal uses an emotion engine to analyze the user's emotions. The emotion engine performs voice analysis, facial expression analysis, and operation pattern analysis to acquire the user's emotion information. The acquired emotion information is then sent to the server along with a prompt.
[0342] Input: voice, facial expressions, operation patterns
[0343] Output: Emotional information (e.g., "relaxed")
[0344] Specific operation: Facial expressions are captured with a camera, audio is recorded with a microphone, and operations are recorded with a touchpad. Analysis software analyzes this to create emotional information and send it to the server.
[0345] Step 3:
[0346] The server receives prompts and emotion information sent from the client terminal, and stores the received prompts and emotion information in a database.
[0347] Input: prompt sentence, emotion information
[0348] Output: Prompt sentences and emotion information stored in a database
[0349] Specific operation: The server receives the transmitted data and stores it in the specified database. Data formatting and validation may also be performed.
[0350] Step 4:
[0351] The server provides the received prompt and emotion information to the AI generator and sends a request for program code generation. The AI generator uses natural language processing technology to generate program code corresponding to the prompt.
[0352] Input: prompt sentence, emotion information
[0353] Output: Generated program code (e.g. Python code)
[0354] Specific operation: The server makes a request to the generation AI, which generates code based on the request. The generated code is formatted and verified on the server.
[0355] Step 5:
[0356] The server formats the generated program code and transmits it to the client terminal.
[0357] Input: Generated program code
[0358] Output: Sending the formatted program code to the client terminal
[0359] Specific operation: The server formats the code appropriately and sends it to the client device as a response. Error checking and logging are also performed as appropriate.
[0360] Step 6:
[0361] The client terminal displays the program code received from the server to the user.
[0362] Input: Formatted program code sent from the server
[0363] Output: Program code displayed in the user interface
[0364] Specific operation: The client terminal receives the response from the server and displays the program code on the screen. The user can visually check it and modify or download it as necessary.
[0365] Through the above steps, the system generates program code that reflects the user's prompts and emotional state, thereby increasing user convenience and satisfaction.
[0366] (Application example 2)
[0367] 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."
[0368] In recent years, technology for automatically generating program code using generative AI models has evolved, but for users to use this technology efficiently, it is essential to input prompts appropriately and understand the generated code. However, if the user's emotional state or stress level is high, this input and understanding process can be burdensome, making it difficult to work efficiently. In particular, in situations requiring high precision, such as factory robot control programs, it is necessary to take the user's emotional state into consideration.
[0369] 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.
[0370] In this invention, the server includes means for receiving prompts related to the generated program code, means for transmitting the generated program code, means for generating the program code using a generative AI model, means for recognizing the emotional state of the user, means for optimizing the prompts based on the emotional state, and means for displaying the generated program code. This allows the program code to be generated efficiently and appropriately while taking the emotional state of the user into consideration, and for the user to use it.
[0371] A "generative program code prompt" is a set of instructions a user enters to use a generative AI model to generate program code that performs a specific function or action.
[0372] A "generative AI model" is an artificial intelligence model that uses natural language processing technology to automatically generate program code based on user prompts.
[0373] A "means for generating program code" is a means that has the function of generating program code from user prompts using a generative AI model.
[0374] The "transmission means" has a function of transmitting the generated program code to the user's client terminal.
[0375] "Means for recognizing emotional states" refers to technology that detects and recognizes a user's emotions using voice analysis, facial expression analysis, or operation patterns.
[0376] The "means for optimizing prompts" has a function of adjusting prompts to make them easier for the user to understand and input, taking into account the emotional state of the user.
[0377] The "display means" has the function of visually presenting the generated program code and other information to the user.
[0378] The present invention is a system that receives prompts for generated program code, generates program code using a generative AI model, and provides the generated code to a user, in combination with an emotion engine that recognizes the user's emotions.
[0379] System configuration
[0380] The system of the present invention is mainly composed of a client terminal used by the user, a server on which the generation AI runs, an emotion engine that recognizes the user's emotions, and a network over which these communicate.
[0381] 1. Client Terminal
[0382] A user inputs a prompt using an interface of a client terminal. The client terminal includes a means for transmitting the prompt to the server and a means for displaying the generated program code received from the server. Suitable client terminals include, for example, smartphones, smart glasses, and head-mounted displays.
[0383] 2. Server
[0384] The server includes a means for receiving prompts from the client device and providing the prompts to the generation AI to generate program code. The server also has a function for transmitting the generated program code to the client device. The generation AI model uses natural language processing technology.
[0385] 3. Emotion Engine
[0386] The emotion engine has a means for recognizing the user's emotion and reflects the result in generating prompts. The emotion engine detects the emotion by analyzing the user's voice, facial expression, or operation patterns.
[0387] System Operation
[0388] User operation (client terminal)
[0389] A user inputs a prompt through the interface of a client terminal. For example, to generate a control program for a factory robot, the user inputs the following prompt:
[0390] example:
[0391] Function name: pick_part
[0392] Arguments: robot_arm (robot arm instance), part_location (part location)
[0393] Return value: Executes the action of grabbing the part.
[0394] When the user inputs this prompt and presses the send button, the client terminal sends the prompt to the server.
[0395] Emotion Engine Operation
[0396] The emotion engine recognizes the user's emotional state through voice and facial expression analysis. For example, if the user is feeling stressed, it sends that information to the server.
[0397] Server Processing
[0398] The server receives the prompt and emotional information sent from the client device. The server sends a request to the generative AI model based on the prompt, and reflects the emotional information when generating the prompt. The generative AI model uses natural language processing technology to generate program code corresponding to the prompt. For example, the generative AI generates the following Python code:
[0399] example:
[0400] “def pick_part(robot_arm, part_location):
[0401] robot_arm.move_to(part_location)
[0402] robot_arm.grasp()
[0403] The generated code is formatted on the server and sent to the client terminal.
[0404] Viewing the client terminal
[0405] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[0406] example:
[0407] "Generated code:
[0408] def pick_part(robot_arm, part_location):
[0409] robot_arm.move_to(part_location)
[0410] robot_arm.grasp()
[0411] As described above, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. Furthermore, the emotion engine enables prompt generation that reflects the user's emotional state, enabling code generation that is more tailored to the user.
[0412] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0413] Step 1:
[0414] The user inputs a prompt using the interface of the client terminal. At this time, the text entered by the user is sent to the server by the client terminal as a prompt statement. An example of a prompt statement is "Function name: pick_part Arguments: robot_arm (robot arm instance), part_location (part location) Return value: Executes the action of picking up the part." In this process, the user's input becomes direct input data, and the data is sent through the mechanism of an HTTP request sent from the client terminal.
[0415] Step 2:
[0416] The client device is equipped with an emotion engine that analyzes the user's voice, facial expressions, and detects operation patterns. The emotion engine analyzes the user's emotional state and collects the results as data. This analysis is performed in real time to recognize the user's stress level and emotional state (e.g., excitement, relaxation). This data is also simultaneously sent to the server. In this step, voice recognition software and facial expression recognition algorithms perform processing and output the resulting emotional state data.
[0417] Step 3:
[0418] The server receives the prompt and emotional data sent from the client device. Based on the received data, it issues commands to the generative AI model. Specifically, it uses natural language processing technology to request the generation of program code based on the prompt. In this case, the input data for the generative AI model are the prompt and emotional data, and the generated program code is obtained as the output.
[0419] Step 4:
[0420] The server optimizes the generated program code based on the emotional information. For example, if the user is feeling stressed, the server may simplify the program code or add detailed explanatory comments. In this step, data processing is performed after code generation, and the optimized program code is output.
[0421] Step 5:
[0422] The server sends the optimized program code to the client terminal. What is sent is the generated program code itself. In this process, an HTTP response is sent from the server to the client terminal.
[0423] Step 6:
[0424] The client terminal displays the generated program code received from the server to the user. The code is displayed on the display of the client terminal so that the user can check it. In this step, the received data is displayed in text format as is.
[0425] These steps enable the system to efficiently generate program code while taking into account the user's emotional state and provide an environment that the user can use.
[0426] 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.
[0427] 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 (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.
[0428] 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.
[0429] [Second embodiment]
[0430] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0431] 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.
[0432] 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).
[0433] 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.
[0434] 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.
[0435] 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).
[0436] 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.
[0437] 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.
[0438] 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.
[0439] 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.
[0440] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0441] 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."
[0442] The present invention relates to a system that receives prompts for generated program code, generates the program code using a generation AI, and provides the generated code to a user. Specific embodiments of the system and how to use it are described below.
[0443] System configuration
[0444] The system of the present invention is mainly composed of three entities: a client terminal used by the user, a server on which the generation AI runs, and a network over which the two communicate.
[0445] 1. Client Terminal
[0446] Users use the system through client terminals.
[0447] The client terminal provides an interface for inputting prompts and has means for transmitting the prompts to the server.
[0448] The device includes means for receiving the generated program code returned from the server and displaying it to the user.
[0449] 2. Server
[0450] The server has means for receiving prompts sent from the client terminal.
[0451] A generative AI runs within the server and generates program code based on prompts.
[0452] It includes means for transmitting the generated program code to the client terminal.
[0453] System Operation
[0454] User operation (client terminal)
[0455] The user inputs a prompt through the interface on the client terminal. For example, if the user wants to create a Python function that performs addition, the user inputs the following prompt:
[0456] example:
[0457] Function Name: add_numbers
[0458] Arguments: a(number), b(number)
[0459] Returns: the sum of a and b
[0460] When the user inputs this prompt and presses the send button, the client terminal transmits this prompt to the server.
[0461] Server Processing
[0462] The server receives the prompt sent from the client terminal. For example, suppose the server receives the following prompt from the user:
[0463] Function Name: add_numbers
[0464] Arguments: a(number), b(number)
[0465] Returns: the sum of a and b
[0466] Based on the received prompt, the AI requests code generation. The AI uses natural language processing technology to generate program code corresponding to the prompt. For example, the AI generates the following Python code:
[0467] def add_numbers(a, b):
[0468] return a + b
[0469] The generated program code is formatted on the server side and sent to the client terminal.
[0470] Viewing the client terminal
[0471] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[0472] Generated code:
[0473] def add_numbers(a, b):
[0474] return a + b
[0475] In this way, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. This system allows users to individually produce code with high efficiency and flexibly review and improve it.
[0476] The processing flow will be explained below.
[0477] Step 1:
[0478] The user inputs a prompt through the client terminal interface, which is a natural language instruction detailing the program code they want generated.
[0479] Step 2:
[0480] The user presses the send button to send the entered prompt to the server. The client terminal generates a POST request including the prompt and sends it to the server's API endpoint.
[0481] Step 3:
[0482] The server receives the prompt sent from the client device. The server's API endpoint accepts the request, analyzes the request content, and extracts the prompt portion.
[0483] Step 4:
[0484] The server sets the parameters necessary to pass the extracted prompt to the generation AI, including the engine specification for calling the generation AI, the prompt content, the maximum number of tokens, etc.
[0485] Step 5:
[0486] The server sends a request to the API of the AI generator based on the set parameters. The AI generator receives the request and generates the corresponding program code based on the prompts.
[0487] Step 6:
[0488] The generation AI returns the generated program code to the server, which receives the returned code and formats it into an appropriate format.
[0489] Step 7:
[0490] The server prepares the formatted generated code as a response to the client terminal, includes the generated program code in a response object, and sends it to the client terminal.
[0491] Step 8:
[0492] The client terminal receives the response from the server, checks the status code of the response, and performs error checking if necessary.
[0493] Step 9:
[0494] If successful, the client terminal extracts the generated program code from the response and displays it on the screen of the client terminal for display to the user.
[0495] Step 10:
[0496] The user can check the generated code displayed on the client terminal and use it as needed, or if the generated code is not as expected, enter a new prompt to start the process again.
[0497] Through this process, the system of the present invention provides an environment in which users can efficiently generate program code and flexibly review and improve it.
[0498] Example 1
[0499] 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."
[0500] Conventionally, generating program code requires a high level of specialized knowledge and time, making it difficult for non-experts to generate code efficiently. Furthermore, there are only a limited number of systems that can instantly provide generated program code to users. Therefore, there is a demand for a system that allows users to easily generate program code and check its contents.
[0501] 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.
[0502] In this invention, the server includes means for inputting and transmitting a prompt sentence for program code generated at a terminal used by a user, a server for receiving the prompt sentence via a communication network, means for generating program code using a generative model based on the prompt sentence, means for transmitting the generated program code to the terminal, and means for displaying the generated program code on the terminal. This allows a user to automatically generate program code by simply inputting a specific prompt sentence, and to immediately check the generated code.
[0503] A "terminal used by a user" is an electronic device used by a user to input and send prompt sentences and receive responses from a server.
[0504] A "prompt sentence" is a text entered in natural language by a user that describes the specifications and requirements of the program code that the user requests.
[0505] A "communications network" is a network infrastructure for exchanging data between a user's terminal and a server.
[0506] A "server" is a computer system that receives a prompt sentence, generates program code using a generative model, and then transmits the generated code to a user's terminal.
[0507] A "generative model" is an algorithm or artificial intelligence system that uses natural language processing techniques to generate program code based on a user prompt.
[0508] "Natural language processing technology" is a technology that allows computers to understand and process human language, and is used as part of a generative model.
[0509] "Program code" is code that describes instructions for a computer to execute, and is generated based on user requirements.
[0510] This invention is a system that automatically generates program code based on a prompt entered by a user and immediately provides the generated code to the user. Specifically, it consists of a terminal used by the user, a server that receives the prompt, a generative AI model, and a communication network that connects them.
[0511] 1. Client Terminal
[0512] A user inputs a prompt sentence using a client terminal. This terminal may be a general personal computer, smartphone, or tablet, and accesses the system of the present invention through a web browser. The client terminal provides a web interface built with HTML, CSS, and JavaScript, and has the function of allowing the user to input and send a prompt sentence.
[0513] 2. Server
[0514] The server receives the prompt sent by the user and generates program code based on it using a generative AI model. The server runs a generative AI model, such as GPT-4, which uses natural language processing technology to generate program code corresponding to the input prompt. The generated program code is formatted on the server side, converted into an appropriate format, and then sent to the client device.
[0515] 3. Communication Network
[0516] The user's device and the server communicate via the Internet. This communication is mainly carried out using the HTTPS protocol to ensure data security.
[0517] Specific examples
[0518] For example, if a user wants to create a Python function that performs addition, he or she can enter the following prompt statement into the client terminal:
[0519] Function Name: add_numbers
[0520] Arguments: a(number), b(number)
[0521] Returns: the sum of a and b
[0522] This prompt is sent to the server, and the generative AI model on the server generates program code based on it. The generated Python code looks like this, for example:
[0523] def add_numbers(a, b):
[0524] return a + b
[0525] The generated code is formatted, sent to the client terminal, and displayed to the user.
[0526] This allows users to easily generate program code in natural language and check it on the spot, even without specialized knowledge. By using this system, program code can be generated quickly and efficiently.
[0527] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0528] Step 1:
[0529] Entering a prompt statement
[0530] The user inputs the desired program code specifications through the client terminal interface, for example, "Function name: add_numbers, Arguments: a (numerical value), b (numerical value), Return value: sum of a and b" as a prompt statement.
[0531] Input: Prompt text based on user request
[0532] Output: The prompt text entered
[0533] Specific operation: The user enters a prompt sentence in the specified format on the keyboard and clicks the send button.
[0534] Step 2:
[0535] Sending a prompt
[0536] When the user presses the send button, the client terminal sends the entered prompt text to the server as an HTTP POST request.
[0537] Input: prompt statement
[0538] Output: The prompt is sent to the server.
[0539] Specific operation: The client terminal sends the entered prompt text to the specified endpoint of the server via an HTTP POST request.
[0540] Step 3:
[0541] Receiving a prompt
[0542] The server receives the prompt sentence sent from the client terminal.
[0543] Input: Prompt sent from the client terminal
[0544] Output: Prompt statement stored in server memory
[0545] Specific operation: The server receives an HTTP request, parses the prompt text, and stores it in its internal memory.
[0546] Step 4:
[0547] Program code generation request
[0548] The server sends a program code generation request to the generative AI model based on the received prompt sentence. This request is sent to the API endpoint of the generative AI model.
[0549] Input: Saved prompt statement
[0550] Output: Request to the generative AI model
[0551] Specific operation: The server inputs a prompt sentence into the API of the generation AI model and sends a generation request.
[0552] Step 5:
[0553] Generate program code
[0554] The generative AI model uses natural language processing technology to generate program code based on the received prompt. For example, if the prompt is "add_numbers," it generates the corresponding Python code.
[0555] Input: The prompt text sent as a generation request
[0556] Output: Generated program code
[0557] Specific operation: The generative AI model analyzes the prompt sentence and generates the appropriate program code.
[0558] Step 6:
[0559] Formatting generated code
[0560] The server receives the generated program code and formats it appropriately, ensuring that the code is displayed correctly.
[0561] Input: Program code returned from the generative AI model
[0562] Output: Formatted program code
[0563] What happens: The server formats the generated code and converts it into a format suitable for display or execution.
[0564] Step 7:
[0565] Submitting generated code
[0566] The server then sends the formatted program code to the client terminal as an HTTP response.
[0567] Input: Formatted program code
[0568] Output: Generated code sent to the client terminal
[0569] Specific operation: The server sends the program code to the client terminal as an HTTP response.
[0570] Step 8:
[0571] Viewing the Generated Code
[0572] The client terminal displays the generated code received from the server to the user, who can then check the displayed code and use its contents.
[0573] Input: Generated code sent from the server
[0574] Output: The program code displayed on the user's screen
[0575] Specific operation: The client terminal displays the received program code on the user interface using HTML / CSS.
[0576] This allows the user to easily input prompt statements and generate and check program code accurately and quickly.
[0577] (Application example 1)
[0578] 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."
[0579] In factories, there is a need to flexibly and quickly generate and execute a wide variety of work tasks to improve production efficiency. However, conventional methods require each work task to be programmed manually, which requires a great deal of time and effort. It is also not easy to regenerate programs to adapt to changes in the workplace. Therefore, the present invention aims to provide a system in which factory robots use generative AI to automatically generate and execute work tasks, thereby significantly improving production efficiency.
[0580] 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.
[0581] In this invention, the server includes means for receiving prompts for generated program code, means for generating program code using a generation artificial intelligence based on the prompts, means for transmitting the generated program code, and means for generating factory work tasks, which enables robots in the factory to dynamically and efficiently execute work tasks, improving production efficiency and enabling flexible responses.
[0582] A "prompt" is an instruction that a user enters in natural language to describe a particular task or request, and program code is generated based on that instruction.
[0583] "Generative AI" is AI that has algorithms that generate program code based on prompts received from a user.
[0584] "Program code" is a string of characters that describes instructions for performing a particular task or process, in a format that a computer can understand and execute.
[0585] "Transmit" refers to the act of transferring data from a client terminal to a server, or from a server to a client terminal or other device.
[0586] A "client terminal" is a device used by a user to enter prompts and view generated program code.
[0587] "Factory work tasks" refer to specific work content such as assembly, inspection, and palletizing that is carried out within a factory.
[0588] A "factory robot" is an automated machine for performing work tasks in a factory, and is a device that operates based on generated program code.
[0589] "Natural language processing" is a technology that allows computers to understand, analyze, and generate language that humans use on a daily basis.
[0590] The present invention relates to a system that automatically generates work tasks for factory robots using a generation AI and executes the tasks. Specific embodiments of the present invention are described below.
[0591] System Configuration
[0592] This system mainly consists of the following components:
[0593] 1. Client Terminal
[0594] A device that allows a user to enter prompts and view the generated program code for a work task, such as a smartphone or tablet.
[0595] It provides an interface where the user can input a prompt in natural language, e.g., "Task name: assembly, parameters: parts (engine)".
[0596] It has the function of displaying the generated program code.
[0597] 2. Server
[0598] A prompt sent from a client terminal is received, and program code is generated using a generation artificial intelligence.
[0599] The generated program code is sent to the client terminal and the factory robot.
[0600] It uses a generative AI model that runs on the server.
[0601] 3. Factory robots
[0602] The actual work task is executed based on the program code sent from the server.
[0603] Specific tasks such as assembly, inspection, and palletizing are automated.
[0604] Operation flow
[0605] 1. Enter the prompt
[0606] The user inputs work task instructions as prompts using a client terminal, for example, in the format "task name: assembly, parameters: parts (engine)."
[0607] 2. Sending a prompt
[0608] A prompt is sent from the client terminal to the server.
[0609] 3. Generate program code
[0610] The server analyzes the received prompts and generates appropriate program code using a generative AI model, where the generated program code includes instructions corresponding to the work task.
[0611] 4. Sending the program code
[0612] The generated program code is transmitted from the server to the client terminal and the factory robot.
[0613] 5. Performing work tasks
[0614] The factory robot executes the work task according to the received program code, for example, assembling the specified parts.
[0615] Specific examples
[0616] Examples of prompts:
[0617] Task Name: Assembly
[0618] Parameter: Parts (Engine)
[0619] The generative AI model receives this prompt and generates the program code needed to assemble the engine parts, which a factory robot then performs.
[0620] The above is the "Mode for Carrying Out the Invention", and the system of the present invention greatly improves the efficiency of production activities in factories and enables flexible responses.
[0621] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0622] Step 1:
[0623] The user inputs a prompt using a client terminal. The input prompt is, for example, in the format of "Task name: assembly, parameters: parts (engine)". The input data is saved locally and sent to the next processing step.
[0624] Step 2:
[0625] The client terminal sends the entered prompt text to the server. Specifically, data is transferred from the terminal to the server via an HTTP request or other method. The input is the prompt text, and the output is a request to the server.
[0626] Step 3:
[0627] The server analyzes the received prompt and inputs it into the generative AI model. The generative AI model generates program code based on the prompt and outputs that code to the server. The input is the prompt, and the output is the generated program code.
[0628] Step 4:
[0629] The server reformats the generated program code and sends it to the client device and the factory robot. Specifically, it converts the generated code into JSON or other appropriate format and sends it as an HTTP response. The input is the generated program code, and the output is the data to be sent to the client device and the factory robot.
[0630] Step 5:
[0631] The client terminal displays the program code received from the server to the user. The user can review and approve the code as needed. Specifically, the received code is rendered and displayed in a GUI. The input is the program code received from the server, and the output is the code displayed to the user.
[0632] Step 6:
[0633] Factory robots execute work tasks based on program codes received from a server. Specifically, they perform physical actions based on the code (e.g., assembling parts, inspecting products, etc.). The input is the program code received from the server, and the output is the executed work task.
[0634] The above are the specific processing steps of this system.
[0635] 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.
[0636] The present invention relates to a system that receives prompts for generated program code, generates the program code using a generation AI, and provides the generated code to a user, and further combines it with an emotion engine that recognizes the user's emotions. Specific embodiments of this system and how to use it are described below.
[0637] System configuration
[0638] The system of the present invention is mainly composed of a client terminal used by the user, a server on which the generation AI runs, an emotion engine that recognizes the user's emotions, and a network over which these communicate.
[0639] 1. Client Terminal
[0640] The user inputs the prompt using the interface of the client terminal.
[0641] The client terminal includes means for sending prompts to the server and means for displaying the generated program code received from the server.
[0642] 2. Server
[0643] The server includes means for receiving prompts from the client terminal and providing the prompts to the generation AI to generate the program code.
[0644] The server also has the function of transmitting the generated program code to the client terminal.
[0645] 3. Emotion Engine
[0646] The emotion engine has a means for recognizing the user's emotion and reflects the result in generating prompts.
[0647] The emotion engine detects emotions using a user's voice analysis, facial expression analysis, or operation patterns.
[0648] System Operation
[0649] User operation (client terminal)
[0650] The user enters a prompt through the client terminal interface. For example, to request the creation of a Python function that performs addition, the user enters the following prompt:
[0651] example:
[0652] Function Name: add_numbers
[0653] Arguments: a(number), b(number)
[0654] Returns: the sum of a and b
[0655] When the user inputs this prompt and presses the send button, the client terminal sends the prompt to the server.
[0656] Emotion Engine Operation
[0657] The client terminal includes an emotion engine that analyzes the user's voice, facial expressions, and operation patterns to recognize the user's emotions. The emotion engine then transmits the recognized emotion information to the server.
[0658] Server Processing
[0659] The server receives prompts and emotional information sent from the client device. The server sends a request to the generation AI based on the prompt and reflects the emotional information when generating the prompt.
[0660] Generative AI uses natural language processing techniques to generate program code corresponding to the prompt. For example, generative AI generates the following Python code:
[0661] def add_numbers(a, b):
[0662] return a + b
[0663] The generated code is formatted on the server and sent to the client terminal.
[0664] Viewing the client terminal
[0665] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[0666] Generated code:
[0667] def add_numbers(a, b):
[0668] return a + b
[0669] In this way, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. Furthermore, the emotion engine enables prompt generation that reflects the user's emotional state, resulting in code generation that is more tailored to the user.
[0670] The system of the present invention allows users to generate code individually and efficiently, and flexibly review and improve it. The emotion engine recognizes the user's emotions and reflects them in the prompt generation, reducing the burden on the user and enabling the generation of more satisfying program code.
[0671] The processing flow will be explained below.
[0672] Step 1:
[0673] The user enters a prompt using the client terminal interface, for example:
[0674] Function Name: add_numbers
[0675] Arguments: a(number), b(number)
[0676] Returns: the sum of a and b
[0677] Step 2:
[0678] The user presses the submit button to send the prompt they entered to the server. The client terminal generates a POST request including the prompt and sends it to the server's API endpoint.
[0679] Step 3:
[0680] At the same time, the emotion engine installed in the client device analyzes the user's voice, facial expressions, and operation patterns to detect the user's emotional state. For example, when analyzing the user's facial expressions with a camera, facial movements are captured to determine the user's emotions.
[0681] Step 4:
[0682] The emotion engine sends the detected emotion information to a cloud endpoint, including emotion information such as "the user is feeling impatient."
[0683] Step 5:
[0684] The server receives the prompt and emotion information sent from the client device. The server's API endpoint accepts the request, analyzes the request content, and extracts the prompt and emotion information.
[0685] Step 6:
[0686] The server provides the extracted prompt and emotional information to the generation AI. At this time, it sets parameters for the generation AI to reflect the emotional information along with the prompt. For example, if the user is feeling impatient, it sets the AI to generate concise, quickly executable code.
[0687] Step 7:
[0688] The server sends a request to the API of the generation AI based on the set parameters. The generation AI generates program code using the prompt and emotion information.
[0689] Step 8:
[0690] The Generative AI generates the following Python code and returns it to the server:
[0691] def add_numbers(a, b):
[0692] return a + b
[0693] Step 9:
[0694] The server formats the received program code, performs processing such as adding comments as necessary, and then creates a response to be sent to the client terminal.
[0695] Step 10:
[0696] The client terminal checks the response received from the server and extracts the generated program code, for example, "Generated code: def add_numbers(a, b): return a + b".
[0697] Step 11:
[0698] The user can check the generated program code displayed on the client terminal, and if necessary, modify or regenerate the code to ensure that it meets the expectations. The user can also enter a new prompt and send it again.
[0699] In this way, the user is effectively able to generate program code based on prompts, but also to utilize an environment in which optimal code generation occurs based on emotions recognized by the emotion engine.
[0700] Example 2
[0701] 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."
[0702] In conventional program code generation systems, the process of generating program code based on prompts entered by the user is standard, but it is not possible to reflect the user's emotional state. This makes it difficult to generate code flexibly according to the user's state, and there are issues such as not being able to sufficiently reduce the burden on the user or improve satisfaction.
[0703] 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 instructions regarding the generated program code, means for generating the program code using a generation artificial intelligence based on the instructions, means for transmitting the generated program code, means for recognizing the user's emotion, and means for reflecting the recognized emotion information in the instructions. As a result, the program code is generated reflecting the user's emotional state, enabling flexible and satisfying code generation according to individual needs.
[0704] "Generated program code" is software code that is automatically generated based on instructions entered by a user.
[0705] An "instruction" is input information that specifies the content of the program code that the user wants to generate.
[0706] "Generative AI" refers to algorithms and systems that automatically generate program code based on user instructions.
[0707] The "transmission means" is a function for sending the generated program code and other data from the server to the client terminal.
[0708] "Means for recognizing emotions" refers to technology or devices for detecting a user's emotional state (e.g., joy, sadness, stress, etc.).
[0709] "Emotional information" refers to data that represents the user's emotional state, and can be obtained from voice analysis, facial expression analysis, operation pattern analysis, etc.
[0710] The "receiving means" is a function that allows the server to receive instructions and emotional information sent from the client terminal.
[0711] The "display means" is a function for visually displaying the generated program code to the user.
[0712] The present invention relates to a system that receives instructions for generating program code, generates program code using artificial intelligence, and provides the generated code to a user. Furthermore, by combining it with an emotion engine that recognizes the user's emotions, the purpose is to realize code generation that is more suited to the user.
[0713] System Configuration
[0714] The system of the present invention comprises the following main components:
[0715] 1. Client Terminal
[0716] A user uses a client terminal to input instructions regarding the program code to be generated through an interface. The client terminal includes a means for sending prompts to the server and a means for displaying the generated program code received from the server. The client terminal also includes a built-in emotion engine that recognizes emotions from the user's voice, facial expressions, and operation patterns.
[0717] 2. Server
[0718] The server has a means for receiving prompts from the client terminal and providing the prompts to the generation artificial intelligence to generate program code. The server also includes a function for transmitting the generated program code to the client terminal. Specifically, the server generates program code corresponding to the prompts using natural language processing technology.
[0719] 3. Emotion Engine
[0720] The emotion engine has a means for detecting emotions using a user's voice analysis, facial expression analysis, or operation patterns. The recognized emotion information is reflected in the generation of prompts and transmitted to the server.
[0721] Hardware and software used
[0722] Client terminal
[0723] Client devices are personal computers or smartphones. Interfaces are often web browsers (Google Chrome, Mozilla Firefox, etc.) or dedicated apps. Emotion engines include OpenFace (facial expression analysis), Google Speech-to-Text API (audio analysis), and custom tactile pattern recognition algorithms.
[0724] server
[0725] The servers are remote servers with high-performance computing resources, equipped with search engines such as Elasticsearch and high-performance processors, and large language models such as OpenAI's GPT-3 and ChatGPT are used for generative artificial intelligence.
[0726] Example of operation
[0727] Below are some specific examples of how this system can be used.
[0728] Prompt Sentence Examples
[0729] If a user requests the creation of a Python function to perform addition from the client terminal interface, he or she enters the following prompt statement:
[0730] Function Name: add_numbers
[0731] Arguments: a(number), b(number)
[0732] Returns: the sum of a and b
[0733] By entering this prompt and pressing the send button, the client terminal sends the prompt to the server. At the same time, the emotion engine analyzes the user's emotions and sends that information to the server.
[0734] The server receives the prompt and emotion information and generates the specified Python function based on the artificial intelligence. The generated code is then sent to the client terminal and displayed to the user. The displayed content is as follows:
[0735] Generated code:
[0736] def add_numbers(a, b):
[0737] return a + b
[0738] As described above, the present invention realizes the generation of program code that reflects user instructions and emotional information, reduces the burden on the user, and provides code generation that is highly satisfying.
[0739] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0740] Step 1:
[0741] The user uses the client terminal interface to input and send a prompt for the program code they want to generate. The input is in the format of "Function name: add_numbers", "Arguments: a (number), b (number)", "Return value: sum of a and b". The input prompt is sent from the client terminal to the server as is.
[0742] Input: Prompt statement (e.g., "Function name: add_numbers", "Arguments: a (number), b (number)", "Return value: sum of a and b")
[0743] Output: Prompt sent from client terminal to server
[0744] Specific operation: The user inputs the prompts in the interface and presses the send button, and the client terminal sends a send request to the server.
[0745] Step 2:
[0746] The client terminal uses an emotion engine to analyze the user's emotions. The emotion engine performs voice analysis, facial expression analysis, and operation pattern analysis to acquire the user's emotion information. The acquired emotion information is then sent to the server along with a prompt.
[0747] Input: voice, facial expressions, operation patterns
[0748] Output: Emotional information (e.g., "relaxed")
[0749] Specific operation: Facial expressions are captured with a camera, audio is recorded with a microphone, and operations are recorded with a touchpad. Analysis software analyzes this to create emotional information and send it to the server.
[0750] Step 3:
[0751] The server receives prompts and emotion information sent from the client terminal, and stores the received prompts and emotion information in a database.
[0752] Input: prompt sentence, emotion information
[0753] Output: Prompt sentences and emotion information stored in a database
[0754] Specific operation: The server receives the transmitted data and stores it in the specified database. Data formatting and validation may also be performed.
[0755] Step 4:
[0756] The server provides the received prompt and emotion information to the AI generator and sends a request for program code generation. The AI generator uses natural language processing technology to generate program code corresponding to the prompt.
[0757] Input: prompt sentence, emotion information
[0758] Output: Generated program code (e.g. Python code)
[0759] Specific operation: The server makes a request to the generation AI, which generates code based on the request. The generated code is formatted and verified on the server.
[0760] Step 5:
[0761] The server formats the generated program code and transmits it to the client terminal.
[0762] Input: Generated program code
[0763] Output: Sending the formatted program code to the client terminal
[0764] Specific operation: The server formats the code appropriately and sends it to the client device as a response. Error checking and logging are also performed as appropriate.
[0765] Step 6:
[0766] The client terminal displays the program code received from the server to the user.
[0767] Input: Formatted program code sent from the server
[0768] Output: Program code displayed in the user interface
[0769] Specific operation: The client terminal receives the response from the server and displays the program code on the screen. The user can visually check it and modify or download it as necessary.
[0770] Through the above steps, the system generates program code that reflects the user's prompts and emotional state, thereby increasing user convenience and satisfaction.
[0771] (Application example 2)
[0772] 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."
[0773] In recent years, technology for automatically generating program code using generative AI models has evolved, but for users to use this technology efficiently, it is essential to input prompts appropriately and understand the generated code. However, if the user's emotional state or stress level is high, this input and understanding process can be burdensome, making it difficult to work efficiently. In particular, in situations requiring high precision, such as factory robot control programs, it is necessary to take the user's emotional state into consideration.
[0774] 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.
[0775] In this invention, the server includes means for receiving prompts related to the generated program code, means for transmitting the generated program code, means for generating the program code using a generative AI model, means for recognizing the emotional state of the user, means for optimizing the prompts based on the emotional state, and means for displaying the generated program code. This allows the program code to be generated efficiently and appropriately while taking the emotional state of the user into consideration, and for the user to use it.
[0776] A "generative program code prompt" is a set of instructions a user enters to use a generative AI model to generate program code that performs a specific function or action.
[0777] A "generative AI model" is an artificial intelligence model that uses natural language processing technology to automatically generate program code based on user prompts.
[0778] A "means for generating program code" is a means that has the function of generating program code from user prompts using a generative AI model.
[0779] The "transmission means" has a function of transmitting the generated program code to the user's client terminal.
[0780] "Means for recognizing emotional states" refers to technology that detects and recognizes a user's emotions using voice analysis, facial expression analysis, or operation patterns.
[0781] The "means for optimizing prompts" has a function of adjusting prompts to make them easier for the user to understand and input, taking into account the emotional state of the user.
[0782] The "display means" has the function of visually presenting the generated program code and other information to the user.
[0783] The present invention is a system that receives prompts for generated program code, generates program code using a generative AI model, and provides the generated code to a user, in combination with an emotion engine that recognizes the user's emotions.
[0784] System configuration
[0785] The system of the present invention is mainly composed of a client terminal used by the user, a server on which the generation AI runs, an emotion engine that recognizes the user's emotions, and a network over which these communicate.
[0786] 1. Client Terminal
[0787] A user inputs a prompt using an interface of a client terminal. The client terminal includes a means for transmitting the prompt to the server and a means for displaying the generated program code received from the server. Suitable client terminals include, for example, smartphones, smart glasses, and head-mounted displays.
[0788] 2. Server
[0789] The server includes a means for receiving prompts from the client device and providing the prompts to the generation AI to generate program code. The server also has a function for transmitting the generated program code to the client device. The generation AI model uses natural language processing technology.
[0790] 3. Emotion Engine
[0791] The emotion engine has a means for recognizing the user's emotion and reflects the result in generating prompts. The emotion engine detects the emotion by analyzing the user's voice, facial expression, or operation patterns.
[0792] System Operation
[0793] User operation (client terminal)
[0794] A user inputs a prompt through the interface of a client terminal. For example, to generate a control program for a factory robot, the user inputs the following prompt:
[0795] example:
[0796] Function name: pick_part
[0797] Arguments: robot_arm (robot arm instance), part_location (part location)
[0798] Return value: Executes the action of grabbing the part.
[0799] When the user inputs this prompt and presses the send button, the client terminal sends the prompt to the server.
[0800] Emotion Engine Operation
[0801] The emotion engine recognizes the user's emotional state through voice and facial expression analysis. For example, if the user is feeling stressed, it sends that information to the server.
[0802] Server Processing
[0803] The server receives the prompt and emotional information sent from the client device. The server sends a request to the generative AI model based on the prompt, and reflects the emotional information when generating the prompt. The generative AI model uses natural language processing technology to generate program code corresponding to the prompt. For example, the generative AI generates the following Python code:
[0804] example:
[0805] “def pick_part(robot_arm, part_location):
[0806] robot_arm.move_to(part_location)
[0807] robot_arm.grasp()
[0808] The generated code is formatted on the server and sent to the client terminal.
[0809] Viewing the client terminal
[0810] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[0811] example:
[0812] "Generated code:
[0813] def pick_part(robot_arm, part_location):
[0814] robot_arm.move_to(part_location)
[0815] robot_arm.grasp()
[0816] As described above, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. Furthermore, the emotion engine enables prompt generation that reflects the user's emotional state, enabling code generation that is more tailored to the user.
[0817] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0818] Step 1:
[0819] The user inputs a prompt using the interface of the client terminal. At this time, the text entered by the user is sent to the server by the client terminal as a prompt statement. An example of a prompt statement is "Function name: pick_part Arguments: robot_arm (robot arm instance), part_location (part location) Return value: Executes the action of picking up the part." In this process, the user's input becomes direct input data, and the data is sent through the mechanism of an HTTP request sent from the client terminal.
[0820] Step 2:
[0821] The client device is equipped with an emotion engine that analyzes the user's voice, facial expressions, and detects operation patterns. The emotion engine analyzes the user's emotional state and collects the results as data. This analysis is performed in real time to recognize the user's stress level and emotional state (e.g., excitement, relaxation). This data is also simultaneously sent to the server. In this step, voice recognition software and facial expression recognition algorithms perform processing and output the resulting emotional state data.
[0822] Step 3:
[0823] The server receives the prompt and emotional data sent from the client device. Based on the received data, it issues commands to the generative AI model. Specifically, it uses natural language processing technology to request the generation of program code based on the prompt. In this case, the input data for the generative AI model are the prompt and emotional data, and the generated program code is obtained as the output.
[0824] Step 4:
[0825] The server optimizes the generated program code based on the emotional information. For example, if the user is feeling stressed, the server may simplify the program code or add detailed explanatory comments. In this step, data processing is performed after code generation, and the optimized program code is output.
[0826] Step 5:
[0827] The server sends the optimized program code to the client terminal. What is sent is the generated program code itself. In this process, an HTTP response is sent from the server to the client terminal.
[0828] Step 6:
[0829] The client terminal displays the generated program code received from the server to the user. The code is displayed on the display of the client terminal so that the user can check it. In this step, the received data is displayed in text format as is.
[0830] These steps enable the system to efficiently generate program code while taking into account the user's emotional state and provide an environment that the user can use.
[0831] 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.
[0832] 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.
[0833] 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.
[0834] [Third embodiment]
[0835] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[0836] 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.
[0837] 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).
[0838] 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.
[0839] 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.
[0840] 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).
[0841] 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.
[0842] 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.
[0843] 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.
[0844] 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.
[0845] 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.
[0846] 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."
[0847] The present invention relates to a system that receives prompts for generated program code, generates the program code using a generation AI, and provides the generated code to a user. Specific embodiments of the system and how to use it are described below.
[0848] System configuration
[0849] The system of the present invention is mainly composed of three entities: a client terminal used by the user, a server on which the generation AI runs, and a network over which the two communicate.
[0850] 1. Client Terminal
[0851] Users use the system through client terminals.
[0852] The client terminal provides an interface for inputting prompts and has means for transmitting the prompts to the server.
[0853] The device includes means for receiving the generated program code returned from the server and displaying it to the user.
[0854] 2. Server
[0855] The server has means for receiving prompts sent from the client terminal.
[0856] A generative AI runs within the server and generates program code based on prompts.
[0857] It includes means for transmitting the generated program code to the client terminal.
[0858] System Operation
[0859] User operation (client terminal)
[0860] The user inputs a prompt through the interface on the client terminal. For example, if the user wants to create a Python function that performs addition, the user inputs the following prompt:
[0861] example:
[0862] Function Name: add_numbers
[0863] Arguments: a(number), b(number)
[0864] Returns: the sum of a and b
[0865] When the user inputs this prompt and presses the send button, the client terminal transmits this prompt to the server.
[0866] Server Processing
[0867] The server receives the prompt sent from the client terminal. For example, suppose the server receives the following prompt from the user:
[0868] Function Name: add_numbers
[0869] Arguments: a(number), b(number)
[0870] Returns: the sum of a and b
[0871] Based on the received prompt, the AI requests code generation. The AI uses natural language processing technology to generate program code corresponding to the prompt. For example, the AI generates the following Python code:
[0872] def add_numbers(a, b):
[0873] return a + b
[0874] The generated program code is formatted on the server side and sent to the client terminal.
[0875] Viewing the client terminal
[0876] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[0877] Generated code:
[0878] def add_numbers(a, b):
[0879] return a + b
[0880] In this way, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. This system allows users to individually produce code with high efficiency and flexibly review and improve it.
[0881] The processing flow will be explained below.
[0882] Step 1:
[0883] The user inputs a prompt through the client terminal interface, which is a natural language instruction detailing the program code they want generated.
[0884] Step 2:
[0885] The user presses the send button to send the entered prompt to the server. The client terminal generates a POST request including the prompt and sends it to the server's API endpoint.
[0886] Step 3:
[0887] The server receives the prompt sent from the client device. The server's API endpoint accepts the request, analyzes the request content, and extracts the prompt portion.
[0888] Step 4:
[0889] The server sets the parameters necessary to pass the extracted prompt to the generation AI, including the engine specification for calling the generation AI, the prompt content, the maximum number of tokens, etc.
[0890] Step 5:
[0891] The server sends a request to the API of the AI generator based on the set parameters. The AI generator receives the request and generates the corresponding program code based on the prompts.
[0892] Step 6:
[0893] The generation AI returns the generated program code to the server, which receives the returned code and formats it into an appropriate format.
[0894] Step 7:
[0895] The server prepares the formatted generated code as a response to the client terminal, includes the generated program code in a response object, and sends it to the client terminal.
[0896] Step 8:
[0897] The client terminal receives the response from the server, checks the status code of the response, and performs error checking if necessary.
[0898] Step 9:
[0899] If successful, the client terminal extracts the generated program code from the response and displays it on the screen of the client terminal for display to the user.
[0900] Step 10:
[0901] The user can check the generated code displayed on the client terminal and use it as needed, or if the generated code is not as expected, enter a new prompt to start the process again.
[0902] Through this process, the system of the present invention provides an environment in which users can efficiently generate program code and flexibly review and improve it.
[0903] Example 1
[0904] 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."
[0905] Conventionally, generating program code requires a high level of specialized knowledge and time, making it difficult for non-experts to generate code efficiently. Furthermore, there are only a limited number of systems that can instantly provide generated program code to users. Therefore, there is a demand for a system that allows users to easily generate program code and check its contents.
[0906] 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.
[0907] In this invention, the server includes means for inputting and transmitting a prompt sentence for program code generated at a terminal used by a user, a server for receiving the prompt sentence via a communication network, means for generating program code using a generative model based on the prompt sentence, means for transmitting the generated program code to the terminal, and means for displaying the generated program code on the terminal. This allows a user to automatically generate program code by simply inputting a specific prompt sentence, and to immediately check the generated code.
[0908] A "terminal used by a user" is an electronic device used by a user to input and send prompt sentences and receive responses from a server.
[0909] A "prompt sentence" is a text entered in natural language by a user that describes the specifications and requirements of the program code that the user requests.
[0910] A "communications network" is a network infrastructure for exchanging data between a user's terminal and a server.
[0911] A "server" is a computer system that receives a prompt sentence, generates program code using a generative model, and then transmits the generated code to a user's terminal.
[0912] A "generative model" is an algorithm or artificial intelligence system that uses natural language processing techniques to generate program code based on a user prompt.
[0913] "Natural language processing technology" is a technology that allows computers to understand and process human language, and is used as part of a generative model.
[0914] "Program code" is code that describes instructions for a computer to execute, and is generated based on user requirements.
[0915] This invention is a system that automatically generates program code based on a prompt entered by a user and immediately provides the generated code to the user. Specifically, it consists of a terminal used by the user, a server that receives the prompt, a generative AI model, and a communication network that connects them.
[0916] 1. Client Terminal
[0917] A user inputs a prompt sentence using a client terminal. This terminal may be a general personal computer, smartphone, or tablet, and accesses the system of the present invention through a web browser. The client terminal provides a web interface built with HTML, CSS, and JavaScript, and has the function of allowing the user to input and send a prompt sentence.
[0918] 2. Server
[0919] The server receives the prompt sent by the user and generates program code based on it using a generative AI model. The server runs a generative AI model, such as GPT-4, which uses natural language processing technology to generate program code corresponding to the input prompt. The generated program code is formatted on the server side, converted into an appropriate format, and then sent to the client device.
[0920] 3. Communication Network
[0921] The user's device and the server communicate via the Internet. This communication is mainly carried out using the HTTPS protocol to ensure data security.
[0922] Specific examples
[0923] For example, if a user wants to create a Python function that performs addition, he or she can enter the following prompt statement into the client terminal:
[0924] Function Name: add_numbers
[0925] Arguments: a(number), b(number)
[0926] Returns: the sum of a and b
[0927] This prompt is sent to the server, and the generative AI model on the server generates program code based on it. The generated Python code looks like this, for example:
[0928] def add_numbers(a, b):
[0929] return a + b
[0930] The generated code is formatted, sent to the client terminal, and displayed to the user.
[0931] This allows users to easily generate program code in natural language and check it on the spot, even without specialized knowledge. By using this system, program code can be generated quickly and efficiently.
[0932] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0933] Step 1:
[0934] Entering a prompt statement
[0935] The user inputs the desired program code specifications through the client terminal interface, for example, "Function name: add_numbers, Arguments: a (numerical value), b (numerical value), Return value: sum of a and b" as a prompt statement.
[0936] Input: Prompt text based on user request
[0937] Output: The prompt text entered
[0938] Specific operation: The user enters a prompt sentence in the specified format on the keyboard and clicks the send button.
[0939] Step 2:
[0940] Sending a prompt
[0941] When the user presses the send button, the client terminal sends the entered prompt text to the server as an HTTP POST request.
[0942] Input: prompt statement
[0943] Output: The prompt is sent to the server.
[0944] Specific operation: The client terminal sends the entered prompt text to the specified endpoint of the server via an HTTP POST request.
[0945] Step 3:
[0946] Receiving a prompt
[0947] The server receives the prompt sentence sent from the client terminal.
[0948] Input: Prompt sent from the client terminal
[0949] Output: Prompt statement stored in server memory
[0950] Specific operation: The server receives an HTTP request, parses the prompt text, and stores it in its internal memory.
[0951] Step 4:
[0952] Program code generation request
[0953] The server sends a program code generation request to the generative AI model based on the received prompt sentence. This request is sent to the API endpoint of the generative AI model.
[0954] Input: Saved prompt statement
[0955] Output: Request to the generative AI model
[0956] Specific operation: The server inputs a prompt sentence into the API of the generation AI model and sends a generation request.
[0957] Step 5:
[0958] Generate program code
[0959] The generative AI model uses natural language processing technology to generate program code based on the received prompt. For example, if the prompt is "add_numbers," it generates the corresponding Python code.
[0960] Input: The prompt text sent as a generation request
[0961] Output: Generated program code
[0962] Specific operation: The generative AI model analyzes the prompt sentence and generates the appropriate program code.
[0963] Step 6:
[0964] Formatting generated code
[0965] The server receives the generated program code and formats it appropriately, ensuring that the code is displayed correctly.
[0966] Input: Program code returned from the generative AI model
[0967] Output: Formatted program code
[0968] What happens: The server formats the generated code and converts it into a format suitable for display or execution.
[0969] Step 7:
[0970] Submitting generated code
[0971] The server then sends the formatted program code to the client terminal as an HTTP response.
[0972] Input: Formatted program code
[0973] Output: Generated code sent to the client terminal
[0974] Specific operation: The server sends the program code to the client terminal as an HTTP response.
[0975] Step 8:
[0976] Viewing the Generated Code
[0977] The client terminal displays the generated code received from the server to the user, who can then check the displayed code and use its contents.
[0978] Input: Generated code sent from the server
[0979] Output: The program code displayed on the user's screen
[0980] Specific operation: The client terminal displays the received program code on the user interface using HTML / CSS.
[0981] This allows the user to easily input prompt statements and generate and check program code accurately and quickly.
[0982] (Application example 1)
[0983] 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."
[0984] In factories, there is a need to flexibly and quickly generate and execute a wide variety of work tasks to improve production efficiency. However, conventional methods require each work task to be programmed manually, which requires a great deal of time and effort. It is also not easy to regenerate programs to adapt to changes in the workplace. Therefore, the present invention aims to provide a system in which factory robots use generative AI to automatically generate and execute work tasks, thereby significantly improving production efficiency.
[0985] 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.
[0986] In this invention, the server includes means for receiving prompts for generated program code, means for generating program code using a generation artificial intelligence based on the prompts, means for transmitting the generated program code, and means for generating factory work tasks, which enables robots in the factory to dynamically and efficiently execute work tasks, improving production efficiency and enabling flexible responses.
[0987] A "prompt" is an instruction that a user enters in natural language to describe a particular task or request, and program code is generated based on that instruction.
[0988] "Generative AI" is AI that has algorithms that generate program code based on prompts received from a user.
[0989] "Program code" is a string of characters that describes instructions for performing a particular task or process, in a format that a computer can understand and execute.
[0990] "Transmit" refers to the act of transferring data from a client terminal to a server, or from a server to a client terminal or other device.
[0991] A "client terminal" is a device used by a user to enter prompts and view generated program code.
[0992] "Factory work tasks" refer to specific work content such as assembly, inspection, and palletizing that is carried out within a factory.
[0993] A "factory robot" is an automated machine for performing work tasks in a factory, and is a device that operates based on generated program code.
[0994] "Natural language processing" is a technology that allows computers to understand, analyze, and generate language that humans use on a daily basis.
[0995] The present invention relates to a system that automatically generates work tasks for factory robots using a generation AI and executes the tasks. Specific embodiments of the present invention are described below.
[0996] System Configuration
[0997] This system mainly consists of the following components:
[0998] 1. Client Terminal
[0999] A device that allows a user to enter prompts and view the generated program code for a work task, such as a smartphone or tablet.
[1000] It provides an interface where the user can input a prompt in natural language, e.g., "Task name: assembly, parameters: parts (engine)".
[1001] It has the function of displaying the generated program code.
[1002] 2. Server
[1003] A prompt sent from a client terminal is received, and program code is generated using a generation artificial intelligence.
[1004] The generated program code is sent to the client terminal and the factory robot.
[1005] It uses a generative AI model that runs on the server.
[1006] 3. Factory robots
[1007] The actual work task is executed based on the program code sent from the server.
[1008] Specific tasks such as assembly, inspection, and palletizing are automated.
[1009] Operation flow
[1010] 1. Enter the prompt
[1011] The user inputs work task instructions as prompts using a client terminal, for example, in the format "task name: assembly, parameters: parts (engine)."
[1012] 2. Sending a prompt
[1013] A prompt is sent from the client terminal to the server.
[1014] 3. Generate program code
[1015] The server analyzes the received prompts and generates appropriate program code using a generative AI model, where the generated program code includes instructions corresponding to the work task.
[1016] 4. Sending the program code
[1017] The generated program code is transmitted from the server to the client terminal and the factory robot.
[1018] 5. Performing work tasks
[1019] The factory robot executes the work task according to the received program code, for example, assembling the specified parts.
[1020] Specific examples
[1021] Examples of prompts:
[1022] Task Name: Assembly
[1023] Parameter: Parts (Engine)
[1024] The generative AI model receives this prompt and generates the program code needed to assemble the engine parts, which a factory robot then performs.
[1025] The above is the "Mode for Carrying Out the Invention", and the system of the present invention greatly improves the efficiency of production activities in factories and enables flexible responses.
[1026] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1027] Step 1:
[1028] The user inputs a prompt using a client terminal. The input prompt is, for example, in the format of "Task name: assembly, parameters: parts (engine)". The input data is saved locally and sent to the next processing step.
[1029] Step 2:
[1030] The client terminal sends the entered prompt text to the server. Specifically, data is transferred from the terminal to the server via an HTTP request or other method. The input is the prompt text, and the output is a request to the server.
[1031] Step 3:
[1032] The server analyzes the received prompt and inputs it into the generative AI model. The generative AI model generates program code based on the prompt and outputs that code to the server. The input is the prompt, and the output is the generated program code.
[1033] Step 4:
[1034] The server reformats the generated program code and sends it to the client device and the factory robot. Specifically, it converts the generated code into JSON or other appropriate format and sends it as an HTTP response. The input is the generated program code, and the output is the data to be sent to the client device and the factory robot.
[1035] Step 5:
[1036] The client terminal displays the program code received from the server to the user. The user can review and approve the code as needed. Specifically, the received code is rendered and displayed in a GUI. The input is the program code received from the server, and the output is the code displayed to the user.
[1037] Step 6:
[1038] Factory robots execute work tasks based on program codes received from a server. Specifically, they perform physical actions based on the code (e.g., assembling parts, inspecting products, etc.). The input is the program code received from the server, and the output is the executed work task.
[1039] The above are the specific processing steps of this system.
[1040] 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.
[1041] The present invention relates to a system that receives prompts for generated program code, generates the program code using a generation AI, and provides the generated code to a user, and further combines it with an emotion engine that recognizes the user's emotions. Specific embodiments of this system and how to use it are described below.
[1042] System configuration
[1043] The system of the present invention is mainly composed of a client terminal used by the user, a server on which the generation AI runs, an emotion engine that recognizes the user's emotions, and a network over which these communicate.
[1044] 1. Client Terminal
[1045] The user inputs the prompt using the interface of the client terminal.
[1046] The client terminal includes means for sending prompts to the server and means for displaying the generated program code received from the server.
[1047] 2. Server
[1048] The server includes means for receiving prompts from the client terminal and providing the prompts to the generation AI to generate the program code.
[1049] The server also has the function of transmitting the generated program code to the client terminal.
[1050] 3. Emotion Engine
[1051] The emotion engine has a means for recognizing the user's emotion and reflects the result in generating prompts.
[1052] The emotion engine detects emotions using a user's voice analysis, facial expression analysis, or operation patterns.
[1053] System Operation
[1054] User operation (client terminal)
[1055] The user enters a prompt through the client terminal interface. For example, to request the creation of a Python function that performs addition, the user enters the following prompt:
[1056] example:
[1057] Function Name: add_numbers
[1058] Arguments: a(number), b(number)
[1059] Returns: the sum of a and b
[1060] When the user inputs this prompt and presses the send button, the client terminal sends the prompt to the server.
[1061] Emotion Engine Operation
[1062] The client terminal includes an emotion engine that analyzes the user's voice, facial expressions, and operation patterns to recognize the user's emotions. The emotion engine then transmits the recognized emotion information to the server.
[1063] Server Processing
[1064] The server receives prompts and emotional information sent from the client device. The server sends a request to the generation AI based on the prompt and reflects the emotional information when generating the prompt.
[1065] Generative AI uses natural language processing techniques to generate program code corresponding to the prompt. For example, generative AI generates the following Python code:
[1066] def add_numbers(a, b):
[1067] return a + b
[1068] The generated code is formatted on the server and sent to the client terminal.
[1069] Viewing the client terminal
[1070] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[1071] Generated code:
[1072] def add_numbers(a, b):
[1073] return a + b
[1074] In this way, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. Furthermore, the emotion engine enables prompt generation that reflects the user's emotional state, resulting in code generation that is more tailored to the user.
[1075] The system of the present invention allows users to generate code individually and efficiently, and flexibly review and improve it. The emotion engine recognizes the user's emotions and reflects them in the prompt generation, reducing the burden on the user and enabling the generation of more satisfying program code.
[1076] The processing flow will be explained below.
[1077] Step 1:
[1078] The user enters a prompt using the client terminal interface, for example:
[1079] Function Name: add_numbers
[1080] Arguments: a(number), b(number)
[1081] Returns: the sum of a and b
[1082] Step 2:
[1083] The user presses the submit button to send the prompt they entered to the server. The client terminal generates a POST request including the prompt and sends it to the server's API endpoint.
[1084] Step 3:
[1085] At the same time, the emotion engine installed in the client device analyzes the user's voice, facial expressions, and operation patterns to detect the user's emotional state. For example, when analyzing the user's facial expressions with a camera, facial movements are captured to determine the user's emotions.
[1086] Step 4:
[1087] The emotion engine sends the detected emotion information to a cloud endpoint, including emotion information such as "the user is feeling impatient."
[1088] Step 5:
[1089] The server receives the prompt and emotion information sent from the client device. The server's API endpoint accepts the request, analyzes the request content, and extracts the prompt and emotion information.
[1090] Step 6:
[1091] The server provides the extracted prompt and emotional information to the generation AI. At this time, it sets parameters for the generation AI to reflect the emotional information along with the prompt. For example, if the user is feeling impatient, it sets the AI to generate concise, quickly executable code.
[1092] Step 7:
[1093] The server sends a request to the API of the generation AI based on the set parameters. The generation AI generates program code using the prompt and emotion information.
[1094] Step 8:
[1095] The Generative AI generates the following Python code and returns it to the server:
[1096] def add_numbers(a, b):
[1097] return a + b
[1098] Step 9:
[1099] The server formats the received program code, performs processing such as adding comments as necessary, and then creates a response to be sent to the client terminal.
[1100] Step 10:
[1101] The client terminal checks the response received from the server and extracts the generated program code, for example, "Generated code: def add_numbers(a, b): return a + b".
[1102] Step 11:
[1103] The user can check the generated program code displayed on the client terminal, and if necessary, modify or regenerate the code to ensure that it meets the expectations. The user can also enter a new prompt and send it again.
[1104] In this way, the user is effectively able to generate program code based on prompts, but also to utilize an environment in which optimal code generation occurs based on emotions recognized by the emotion engine.
[1105] Example 2
[1106] 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."
[1107] In conventional program code generation systems, the process of generating program code based on prompts entered by the user is standard, but it is not possible to reflect the user's emotional state. This makes it difficult to generate code flexibly according to the user's state, and there are issues such as not being able to sufficiently reduce the burden on the user or improve satisfaction.
[1108] 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 instructions regarding the generated program code, means for generating the program code using a generation artificial intelligence based on the instructions, means for transmitting the generated program code, means for recognizing the user's emotion, and means for reflecting the recognized emotion information in the instructions. As a result, the program code is generated reflecting the user's emotional state, enabling flexible and satisfying code generation according to individual needs.
[1109] "Generated program code" is software code that is automatically generated based on instructions entered by a user.
[1110] An "instruction" is input information that specifies the content of the program code that the user wants to generate.
[1111] "Generative AI" refers to algorithms and systems that automatically generate program code based on user instructions.
[1112] The "transmission means" is a function for sending the generated program code and other data from the server to the client terminal.
[1113] "Means for recognizing emotions" refers to technology or devices for detecting a user's emotional state (e.g., joy, sadness, stress, etc.).
[1114] "Emotional information" refers to data that represents the user's emotional state, and can be obtained from voice analysis, facial expression analysis, operation pattern analysis, etc.
[1115] The "receiving means" is a function that allows the server to receive instructions and emotional information sent from the client terminal.
[1116] The "display means" is a function for visually displaying the generated program code to the user.
[1117] The present invention relates to a system that receives instructions for generating program code, generates program code using artificial intelligence, and provides the generated code to a user. Furthermore, by combining it with an emotion engine that recognizes the user's emotions, the purpose is to realize code generation that is more suited to the user.
[1118] System Configuration
[1119] The system of the present invention comprises the following main components:
[1120] 1. Client Terminal
[1121] A user uses a client terminal to input instructions regarding the program code to be generated through an interface. The client terminal includes a means for sending prompts to the server and a means for displaying the generated program code received from the server. The client terminal also includes a built-in emotion engine that recognizes emotions from the user's voice, facial expressions, and operation patterns.
[1122] 2. Server
[1123] The server has a means for receiving prompts from the client terminal and providing the prompts to the generation artificial intelligence to generate program code. The server also includes a function for transmitting the generated program code to the client terminal. Specifically, the server generates program code corresponding to the prompts using natural language processing technology.
[1124] 3. Emotion Engine
[1125] The emotion engine has a means for detecting emotions using a user's voice analysis, facial expression analysis, or operation patterns. The recognized emotion information is reflected in the generation of prompts and transmitted to the server.
[1126] Hardware and software used
[1127] Client terminal
[1128] Client devices are personal computers or smartphones. Interfaces are often web browsers (Google Chrome, Mozilla Firefox, etc.) or dedicated apps. Emotion engines include OpenFace (facial expression analysis), Google Speech-to-Text API (audio analysis), and custom tactile pattern recognition algorithms.
[1129] server
[1130] The servers are remote servers with high-performance computing resources, equipped with search engines such as Elasticsearch and high-performance processors, and large language models such as OpenAI's GPT-3 and ChatGPT are used for generative artificial intelligence.
[1131] Example of operation
[1132] Below are some specific examples of how this system can be used.
[1133] Prompt Sentence Examples
[1134] If a user requests the creation of a Python function to perform addition from the client terminal interface, he or she enters the following prompt statement:
[1135] Function Name: add_numbers
[1136] Arguments: a(number), b(number)
[1137] Returns: the sum of a and b
[1138] By entering this prompt and pressing the send button, the client terminal sends the prompt to the server. At the same time, the emotion engine analyzes the user's emotions and sends that information to the server.
[1139] The server receives the prompt and emotion information and generates the specified Python function based on the artificial intelligence. The generated code is then sent to the client terminal and displayed to the user. The displayed content is as follows:
[1140] Generated code:
[1141] def add_numbers(a, b):
[1142] return a + b
[1143] As described above, the present invention realizes the generation of program code that reflects user instructions and emotional information, reduces the burden on the user, and provides code generation that is highly satisfying.
[1144] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1145] Step 1:
[1146] The user uses the client terminal interface to input and send a prompt for the program code they want to generate. The input is in the format of "Function name: add_numbers", "Arguments: a (number), b (number)", "Return value: sum of a and b". The input prompt is sent from the client terminal to the server as is.
[1147] Input: Prompt statement (e.g., "Function name: add_numbers", "Arguments: a (number), b (number)", "Return value: sum of a and b")
[1148] Output: Prompt sent from client terminal to server
[1149] Specific operation: The user inputs the prompts in the interface and presses the send button, and the client terminal sends a send request to the server.
[1150] Step 2:
[1151] The client terminal uses an emotion engine to analyze the user's emotions. The emotion engine performs voice analysis, facial expression analysis, and operation pattern analysis to acquire the user's emotion information. The acquired emotion information is then sent to the server along with a prompt.
[1152] Input: voice, facial expressions, operation patterns
[1153] Output: Emotional information (e.g., "relaxed")
[1154] Specific operation: Facial expressions are captured with a camera, audio is recorded with a microphone, and operations are recorded with a touchpad. Analysis software analyzes this to create emotional information and send it to the server.
[1155] Step 3:
[1156] The server receives prompts and emotion information sent from the client terminal, and stores the received prompts and emotion information in a database.
[1157] Input: prompt sentence, emotion information
[1158] Output: Prompt sentences and emotion information stored in a database
[1159] Specific operation: The server receives the transmitted data and stores it in the specified database. Data formatting and validation may also be performed.
[1160] Step 4:
[1161] The server provides the received prompt and emotion information to the AI generator and sends a request for program code generation. The AI generator uses natural language processing technology to generate program code corresponding to the prompt.
[1162] Input: prompt sentence, emotion information
[1163] Output: Generated program code (e.g. Python code)
[1164] Specific operation: The server makes a request to the generation AI, which generates code based on the request. The generated code is formatted and verified on the server.
[1165] Step 5:
[1166] The server formats the generated program code and transmits it to the client terminal.
[1167] Input: Generated program code
[1168] Output: Sending the formatted program code to the client terminal
[1169] Specific operation: The server formats the code appropriately and sends it to the client device as a response. Error checking and logging are also performed as appropriate.
[1170] Step 6:
[1171] The client terminal displays the program code received from the server to the user.
[1172] Input: Formatted program code sent from the server
[1173] Output: Program code displayed in the user interface
[1174] Specific operation: The client terminal receives the response from the server and displays the program code on the screen. The user can visually check it and modify or download it as necessary.
[1175] Through the above steps, the system generates program code that reflects the user's prompts and emotional state, thereby increasing user convenience and satisfaction.
[1176] (Application example 2)
[1177] 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."
[1178] In recent years, technology for automatically generating program code using generative AI models has evolved, but for users to use this technology efficiently, it is essential to input prompts appropriately and understand the generated code. However, if the user's emotional state or stress level is high, this input and understanding process can be burdensome, making it difficult to work efficiently. In particular, in situations requiring high precision, such as factory robot control programs, it is necessary to take the user's emotional state into consideration.
[1179] 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.
[1180] In this invention, the server includes means for receiving prompts related to the generated program code, means for transmitting the generated program code, means for generating the program code using a generative AI model, means for recognizing the emotional state of the user, means for optimizing the prompts based on the emotional state, and means for displaying the generated program code. This allows the program code to be generated efficiently and appropriately while taking the emotional state of the user into consideration, and for the user to use it.
[1181] A "generative program code prompt" is a set of instructions a user enters to use a generative AI model to generate program code that performs a specific function or action.
[1182] A "generative AI model" is an artificial intelligence model that uses natural language processing technology to automatically generate program code based on user prompts.
[1183] A "means for generating program code" is a means that has the function of generating program code from user prompts using a generative AI model.
[1184] The "transmission means" has a function of transmitting the generated program code to the user's client terminal.
[1185] "Means for recognizing emotional states" refers to technology that detects and recognizes a user's emotions using voice analysis, facial expression analysis, or operation patterns.
[1186] The "means for optimizing prompts" has a function of adjusting prompts to make them easier for the user to understand and input, taking into account the emotional state of the user.
[1187] The "display means" has the function of visually presenting the generated program code and other information to the user.
[1188] The present invention is a system that receives prompts for generated program code, generates program code using a generative AI model, and provides the generated code to a user, in combination with an emotion engine that recognizes the user's emotions.
[1189] System configuration
[1190] The system of the present invention is mainly composed of a client terminal used by the user, a server on which the generation AI runs, an emotion engine that recognizes the user's emotions, and a network over which these communicate.
[1191] 1. Client Terminal
[1192] A user inputs a prompt using an interface of a client terminal. The client terminal includes a means for transmitting the prompt to the server and a means for displaying the generated program code received from the server. Suitable client terminals include, for example, smartphones, smart glasses, and head-mounted displays.
[1193] 2. Server
[1194] The server includes a means for receiving prompts from the client device and providing the prompts to the generation AI to generate program code. The server also has a function for transmitting the generated program code to the client device. The generation AI model uses natural language processing technology.
[1195] 3. Emotion Engine
[1196] The emotion engine has a means for recognizing the user's emotion and reflects the result in generating prompts. The emotion engine detects the emotion by analyzing the user's voice, facial expression, or operation patterns.
[1197] System Operation
[1198] User operation (client terminal)
[1199] A user inputs a prompt through the interface of a client terminal. For example, to generate a control program for a factory robot, the user inputs the following prompt:
[1200] example:
[1201] Function name: pick_part
[1202] Arguments: robot_arm (robot arm instance), part_location (part location)
[1203] Return value: Executes the action of grabbing the part.
[1204] When the user inputs this prompt and presses the send button, the client terminal sends the prompt to the server.
[1205] Emotion Engine Operation
[1206] The emotion engine recognizes the user's emotional state through voice and facial expression analysis. For example, if the user is feeling stressed, it sends that information to the server.
[1207] Server Processing
[1208] The server receives the prompt and emotional information sent from the client device. The server sends a request to the generative AI model based on the prompt, and reflects the emotional information when generating the prompt. The generative AI model uses natural language processing technology to generate program code corresponding to the prompt. For example, the generative AI generates the following Python code:
[1209] example:
[1210] “def pick_part(robot_arm, part_location):
[1211] robot_arm.move_to(part_location)
[1212] robot_arm.grasp()
[1213] The generated code is formatted on the server and sent to the client terminal.
[1214] Viewing the client terminal
[1215] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[1216] example:
[1217] "Generated code:
[1218] def pick_part(robot_arm, part_location):
[1219] robot_arm.move_to(part_location)
[1220] robot_arm.grasp()
[1221] As described above, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. Furthermore, the emotion engine enables prompt generation that reflects the user's emotional state, enabling code generation that is more tailored to the user.
[1222] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1223] Step 1:
[1224] The user inputs a prompt using the interface of the client terminal. At this time, the text entered by the user is sent to the server by the client terminal as a prompt statement. An example of a prompt statement is "Function name: pick_part Arguments: robot_arm (robot arm instance), part_location (part location) Return value: Executes the action of picking up the part." In this process, the user's input becomes direct input data, and the data is sent through the mechanism of an HTTP request sent from the client terminal.
[1225] Step 2:
[1226] The client device is equipped with an emotion engine that analyzes the user's voice, facial expressions, and detects operation patterns. The emotion engine analyzes the user's emotional state and collects the results as data. This analysis is performed in real time to recognize the user's stress level and emotional state (e.g., excitement, relaxation). This data is also simultaneously sent to the server. In this step, voice recognition software and facial expression recognition algorithms perform processing and output the resulting emotional state data.
[1227] Step 3:
[1228] The server receives the prompt and emotional data sent from the client device. Based on the received data, it issues commands to the generative AI model. Specifically, it uses natural language processing technology to request the generation of program code based on the prompt. In this case, the input data for the generative AI model are the prompt and emotional data, and the generated program code is obtained as the output.
[1229] Step 4:
[1230] The server optimizes the generated program code based on the emotional information. For example, if the user is feeling stressed, the server may simplify the program code or add detailed explanatory comments. In this step, data processing is performed after code generation, and the optimized program code is output.
[1231] Step 5:
[1232] The server sends the optimized program code to the client terminal. What is sent is the generated program code itself. In this process, an HTTP response is sent from the server to the client terminal.
[1233] Step 6:
[1234] The client terminal displays the generated program code received from the server to the user. The code is displayed on the display of the client terminal so that the user can check it. In this step, the received data is displayed in text format as is.
[1235] These steps enable the system to efficiently generate program code while taking into account the user's emotional state and provide an environment that the user can use.
[1236] 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.
[1237] 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.
[1238] 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.
[1239] [Fourth embodiment]
[1240] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1241] 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.
[1242] 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).
[1243] 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.
[1244] 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.
[1245] 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).
[1246] 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.
[1247] 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.
[1248] 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.
[1249] 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.
[1250] 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.
[1251] 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.
[1252] 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."
[1253] The present invention relates to a system that receives prompts for generated program code, generates the program code using a generation AI, and provides the generated code to a user. Specific embodiments of the system and how to use it are described below.
[1254] System configuration
[1255] The system of the present invention is mainly composed of three entities: a client terminal used by the user, a server on which the generation AI runs, and a network over which the two communicate.
[1256] 1. Client Terminal
[1257] Users use the system through client terminals.
[1258] The client terminal provides an interface for inputting prompts and has means for transmitting the prompts to the server.
[1259] The device includes means for receiving the generated program code returned from the server and displaying it to the user.
[1260] 2. Server
[1261] The server has means for receiving prompts sent from the client terminal.
[1262] A generative AI runs within the server and generates program code based on prompts.
[1263] It includes means for transmitting the generated program code to the client terminal.
[1264] System Operation
[1265] User operation (client terminal)
[1266] The user inputs a prompt through the interface on the client terminal. For example, if the user wants to create a Python function that performs addition, the user inputs the following prompt:
[1267] example:
[1268] Function Name: add_numbers
[1269] Arguments: a(number), b(number)
[1270] Returns: the sum of a and b
[1271] When the user inputs this prompt and presses the send button, the client terminal transmits this prompt to the server.
[1272] Server Processing
[1273] The server receives the prompt sent from the client terminal. For example, suppose the server receives the following prompt from the user:
[1274] Function Name: add_numbers
[1275] Arguments: a(number), b(number)
[1276] Returns: the sum of a and b
[1277] Based on the received prompt, the AI requests code generation. The AI uses natural language processing technology to generate program code corresponding to the prompt. For example, the AI generates the following Python code:
[1278] def add_numbers(a, b):
[1279] return a + b
[1280] The generated program code is formatted on the server side and sent to the client terminal.
[1281] Viewing the client terminal
[1282] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[1283] Generated code:
[1284] def add_numbers(a, b):
[1285] return a + b
[1286] In this way, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. This system allows users to individually produce code with high efficiency and flexibly review and improve it.
[1287] The processing flow will be explained below.
[1288] Step 1:
[1289] The user inputs a prompt through the client terminal interface, which is a natural language instruction detailing the program code they want generated.
[1290] Step 2:
[1291] The user presses the send button to send the entered prompt to the server. The client terminal generates a POST request including the prompt and sends it to the server's API endpoint.
[1292] Step 3:
[1293] The server receives the prompt sent from the client device. The server's API endpoint accepts the request, analyzes the request content, and extracts the prompt portion.
[1294] Step 4:
[1295] The server sets the parameters necessary to pass the extracted prompt to the generation AI, including the engine specification for calling the generation AI, the prompt content, the maximum number of tokens, etc.
[1296] Step 5:
[1297] The server sends a request to the API of the AI generator based on the set parameters. The AI generator receives the request and generates the corresponding program code based on the prompts.
[1298] Step 6:
[1299] The generation AI returns the generated program code to the server, which receives the returned code and formats it into an appropriate format.
[1300] Step 7:
[1301] The server prepares the formatted generated code as a response to the client terminal, includes the generated program code in a response object, and sends it to the client terminal.
[1302] Step 8:
[1303] The client terminal receives the response from the server, checks the status code of the response, and performs error checking if necessary.
[1304] Step 9:
[1305] If successful, the client terminal extracts the generated program code from the response and displays it on the screen of the client terminal for display to the user.
[1306] Step 10:
[1307] The user can check the generated code displayed on the client terminal and use it as needed, or if the generated code is not as expected, enter a new prompt to start the process again.
[1308] Through this process, the system of the present invention provides an environment in which users can efficiently generate program code and flexibly review and improve it.
[1309] Example 1
[1310] 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."
[1311] Conventionally, generating program code requires a high level of specialized knowledge and time, making it difficult for non-experts to generate code efficiently. Furthermore, there are only a limited number of systems that can instantly provide generated program code to users. Therefore, there is a demand for a system that allows users to easily generate program code and check its contents.
[1312] 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.
[1313] In this invention, the server includes means for inputting and transmitting a prompt sentence for program code generated at a terminal used by a user, a server for receiving the prompt sentence via a communication network, means for generating program code using a generative model based on the prompt sentence, means for transmitting the generated program code to the terminal, and means for displaying the generated program code on the terminal. This allows a user to automatically generate program code by simply inputting a specific prompt sentence, and to immediately check the generated code.
[1314] A "terminal used by a user" is an electronic device used by a user to input and send prompt sentences and receive responses from a server.
[1315] A "prompt sentence" is a text entered in natural language by a user that describes the specifications and requirements of the program code that the user requests.
[1316] A "communications network" is a network infrastructure for exchanging data between a user's terminal and a server.
[1317] A "server" is a computer system that receives a prompt sentence, generates program code using a generative model, and then transmits the generated code to a user's terminal.
[1318] A "generative model" is an algorithm or artificial intelligence system that uses natural language processing techniques to generate program code based on a user prompt.
[1319] "Natural language processing technology" is a technology that allows computers to understand and process human language, and is used as part of a generative model.
[1320] "Program code" is code that describes instructions for a computer to execute, and is generated based on user requirements.
[1321] This invention is a system that automatically generates program code based on a prompt entered by a user and immediately provides the generated code to the user. Specifically, it consists of a terminal used by the user, a server that receives the prompt, a generative AI model, and a communication network that connects them.
[1322] 1. Client Terminal
[1323] A user inputs a prompt sentence using a client terminal. This terminal may be a general personal computer, smartphone, or tablet, and accesses the system of the present invention through a web browser. The client terminal provides a web interface built with HTML, CSS, and JavaScript, and has the function of allowing the user to input and send a prompt sentence.
[1324] 2. Server
[1325] The server receives the prompt sent by the user and generates program code based on it using a generative AI model. The server runs a generative AI model, such as GPT-4, which uses natural language processing technology to generate program code corresponding to the input prompt. The generated program code is formatted on the server side, converted into an appropriate format, and then sent to the client device.
[1326] 3. Communication Network
[1327] The user's device and the server communicate via the Internet. This communication is mainly carried out using the HTTPS protocol to ensure data security.
[1328] Specific examples
[1329] For example, if a user wants to create a Python function that performs addition, he or she can enter the following prompt statement into the client terminal:
[1330] Function Name: add_numbers
[1331] Arguments: a(number), b(number)
[1332] Returns: the sum of a and b
[1333] This prompt is sent to the server, and the generative AI model on the server generates program code based on it. The generated Python code looks like this, for example:
[1334] def add_numbers(a, b):
[1335] return a + b
[1336] The generated code is formatted, sent to the client terminal, and displayed to the user.
[1337] This allows users to easily generate program code in natural language and check it on the spot, even without specialized knowledge. By using this system, program code can be generated quickly and efficiently.
[1338] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1339] Step 1:
[1340] Entering a prompt statement
[1341] The user inputs the desired program code specifications through the client terminal interface, for example, "Function name: add_numbers, Arguments: a (numerical value), b (numerical value), Return value: sum of a and b" as a prompt statement.
[1342] Input: Prompt text based on user request
[1343] Output: The prompt text entered
[1344] Specific operation: The user enters a prompt sentence in the specified format on the keyboard and clicks the send button.
[1345] Step 2:
[1346] Sending a prompt
[1347] When the user presses the send button, the client terminal sends the entered prompt text to the server as an HTTP POST request.
[1348] Input: prompt statement
[1349] Output: The prompt is sent to the server.
[1350] Specific operation: The client terminal sends the entered prompt text to the specified endpoint of the server via an HTTP POST request.
[1351] Step 3:
[1352] Receiving a prompt
[1353] The server receives the prompt sentence sent from the client terminal.
[1354] Input: Prompt sent from the client terminal
[1355] Output: Prompt statement stored in server memory
[1356] Specific operation: The server receives an HTTP request, parses the prompt text, and stores it in its internal memory.
[1357] Step 4:
[1358] Program code generation request
[1359] The server sends a program code generation request to the generative AI model based on the received prompt sentence. This request is sent to the API endpoint of the generative AI model.
[1360] Input: Saved prompt statement
[1361] Output: Request to the generative AI model
[1362] Specific operation: The server inputs a prompt sentence into the API of the generation AI model and sends a generation request.
[1363] Step 5:
[1364] Generate program code
[1365] The generative AI model uses natural language processing technology to generate program code based on the received prompt. For example, if the prompt is "add_numbers," it generates the corresponding Python code.
[1366] Input: The prompt text sent as a generation request
[1367] Output: Generated program code
[1368] Specific operation: The generative AI model analyzes the prompt sentence and generates the appropriate program code.
[1369] Step 6:
[1370] Formatting generated code
[1371] The server receives the generated program code and formats it appropriately, ensuring that the code is displayed correctly.
[1372] Input: Program code returned from the generative AI model
[1373] Output: Formatted program code
[1374] What happens: The server formats the generated code and converts it into a format suitable for display or execution.
[1375] Step 7:
[1376] Submitting generated code
[1377] The server then sends the formatted program code to the client terminal as an HTTP response.
[1378] Input: Formatted program code
[1379] Output: Generated code sent to the client terminal
[1380] Specific operation: The server sends the program code to the client terminal as an HTTP response.
[1381] Step 8:
[1382] Viewing the Generated Code
[1383] The client terminal displays the generated code received from the server to the user, who can then check the displayed code and use its contents.
[1384] Input: Generated code sent from the server
[1385] Output: The program code displayed on the user's screen
[1386] Specific operation: The client terminal displays the received program code on the user interface using HTML / CSS.
[1387] This allows the user to easily input prompt statements and generate and check program code accurately and quickly.
[1388] (Application example 1)
[1389] 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."
[1390] In factories, there is a need to flexibly and quickly generate and execute a wide variety of work tasks to improve production efficiency. However, conventional methods require each work task to be programmed manually, which requires a great deal of time and effort. It is also not easy to regenerate programs to adapt to changes in the workplace. Therefore, the present invention aims to provide a system in which factory robots use generative AI to automatically generate and execute work tasks, thereby significantly improving production efficiency.
[1391] 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.
[1392] In this invention, the server includes means for receiving prompts for generated program code, means for generating program code using a generation artificial intelligence based on the prompts, means for transmitting the generated program code, and means for generating factory work tasks, which enables robots in the factory to dynamically and efficiently execute work tasks, improving production efficiency and enabling flexible responses.
[1393] A "prompt" is an instruction that a user enters in natural language to describe a particular task or request, and program code is generated based on that instruction.
[1394] "Generative AI" is AI that has algorithms that generate program code based on prompts received from a user.
[1395] "Program code" is a string of characters that describes instructions for performing a particular task or process, in a format that a computer can understand and execute.
[1396] "Transmit" refers to the act of transferring data from a client terminal to a server, or from a server to a client terminal or other device.
[1397] A "client terminal" is a device used by a user to enter prompts and view generated program code.
[1398] "Factory work tasks" refer to specific work content such as assembly, inspection, and palletizing that is carried out within a factory.
[1399] A "factory robot" is an automated machine for performing work tasks in a factory, and is a device that operates based on generated program code.
[1400] "Natural language processing" is a technology that allows computers to understand, analyze, and generate language that humans use on a daily basis.
[1401] The present invention relates to a system that automatically generates work tasks for factory robots using a generation AI and executes the tasks. Specific embodiments of the present invention are described below.
[1402] System Configuration
[1403] This system mainly consists of the following components:
[1404] 1. Client Terminal
[1405] A device that allows a user to enter prompts and view the generated program code for a work task, such as a smartphone or tablet.
[1406] It provides an interface where the user can input a prompt in natural language, e.g., "Task name: assembly, parameters: parts (engine)".
[1407] It has the function of displaying the generated program code.
[1408] 2. Server
[1409] A prompt sent from a client terminal is received, and program code is generated using a generation artificial intelligence.
[1410] The generated program code is sent to the client terminal and the factory robot.
[1411] It uses a generative AI model that runs on the server.
[1412] 3. Factory robots
[1413] The actual work task is executed based on the program code sent from the server.
[1414] Specific tasks such as assembly, inspection, and palletizing are automated.
[1415] Operation flow
[1416] 1. Enter the prompt
[1417] The user inputs work task instructions as prompts using a client terminal, for example, in the format "task name: assembly, parameters: parts (engine)."
[1418] 2. Sending a prompt
[1419] A prompt is sent from the client terminal to the server.
[1420] 3. Generate program code
[1421] The server analyzes the received prompts and generates appropriate program code using a generative AI model, where the generated program code includes instructions corresponding to the work task.
[1422] 4. Sending the program code
[1423] The generated program code is transmitted from the server to the client terminal and the factory robot.
[1424] 5. Performing work tasks
[1425] The factory robot executes the work task according to the received program code, for example, assembling the specified parts.
[1426] Specific examples
[1427] Examples of prompts:
[1428] Task Name: Assembly
[1429] Parameter: Parts (Engine)
[1430] The generative AI model receives this prompt and generates the program code needed to assemble the engine parts, which a factory robot then performs.
[1431] The above is the "Mode for Carrying Out the Invention", and the system of the present invention greatly improves the efficiency of production activities in factories and enables flexible responses.
[1432] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1433] Step 1:
[1434] The user inputs a prompt using a client terminal. The input prompt is, for example, in the format of "Task name: assembly, parameters: parts (engine)". The input data is saved locally and sent to the next processing step.
[1435] Step 2:
[1436] The client terminal sends the entered prompt text to the server. Specifically, data is transferred from the terminal to the server via an HTTP request or other method. The input is the prompt text, and the output is a request to the server.
[1437] Step 3:
[1438] The server analyzes the received prompt and inputs it into the generative AI model. The generative AI model generates program code based on the prompt and outputs that code to the server. The input is the prompt, and the output is the generated program code.
[1439] Step 4:
[1440] The server reformats the generated program code and sends it to the client device and the factory robot. Specifically, it converts the generated code into JSON or other appropriate format and sends it as an HTTP response. The input is the generated program code, and the output is the data to be sent to the client device and the factory robot.
[1441] Step 5:
[1442] The client terminal displays the program code received from the server to the user. The user can review and approve the code as needed. Specifically, the received code is rendered and displayed in a GUI. The input is the program code received from the server, and the output is the code displayed to the user.
[1443] Step 6:
[1444] Factory robots execute work tasks based on program codes received from a server. Specifically, they perform physical actions based on the code (e.g., assembling parts, inspecting products, etc.). The input is the program code received from the server, and the output is the executed work task.
[1445] The above are the specific processing steps of this system.
[1446] 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.
[1447] The present invention relates to a system that receives prompts for generated program code, generates the program code using a generation AI, and provides the generated code to a user, and further combines it with an emotion engine that recognizes the user's emotions. Specific embodiments of this system and how to use it are described below.
[1448] System configuration
[1449] The system of the present invention is mainly composed of a client terminal used by the user, a server on which the generation AI runs, an emotion engine that recognizes the user's emotions, and a network over which these communicate.
[1450] 1. Client Terminal
[1451] The user inputs the prompt using the interface of the client terminal.
[1452] The client terminal includes means for sending prompts to the server and means for displaying the generated program code received from the server.
[1453] 2. Server
[1454] The server includes means for receiving prompts from the client terminal and providing the prompts to the generation AI to generate the program code.
[1455] The server also has the function of transmitting the generated program code to the client terminal.
[1456] 3. Emotion Engine
[1457] The emotion engine has a means for recognizing the user's emotion and reflects the result in generating prompts.
[1458] The emotion engine detects emotions using a user's voice analysis, facial expression analysis, or operation patterns.
[1459] System Operation
[1460] User operation (client terminal)
[1461] The user enters a prompt through the client terminal interface. For example, to request the creation of a Python function that performs addition, the user enters the following prompt:
[1462] example:
[1463] Function Name: add_numbers
[1464] Arguments: a(number), b(number)
[1465] Returns: the sum of a and b
[1466] When the user inputs this prompt and presses the send button, the client terminal sends the prompt to the server.
[1467] Emotion Engine Operation
[1468] The client terminal includes an emotion engine that analyzes the user's voice, facial expressions, and operation patterns to recognize the user's emotions. The emotion engine then transmits the recognized emotion information to the server.
[1469] Server Processing
[1470] The server receives prompts and emotional information sent from the client device. The server sends a request to the generation AI based on the prompt and reflects the emotional information when generating the prompt.
[1471] Generative AI uses natural language processing techniques to generate program code corresponding to the prompt. For example, generative AI generates the following Python code:
[1472] def add_numbers(a, b):
[1473] return a + b
[1474] The generated code is formatted on the server and sent to the client terminal.
[1475] Viewing the client terminal
[1476] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[1477] Generated code:
[1478] def add_numbers(a, b):
[1479] return a + b
[1480] In this way, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. Furthermore, the emotion engine enables prompt generation that reflects the user's emotional state, resulting in code generation that is more tailored to the user.
[1481] The system of the present invention allows users to generate code individually and efficiently, and flexibly review and improve it. The emotion engine recognizes the user's emotions and reflects them in the prompt generation, reducing the burden on the user and enabling the generation of more satisfying program code.
[1482] The processing flow will be explained below.
[1483] Step 1:
[1484] The user enters a prompt using the client terminal interface, for example:
[1485] Function Name: add_numbers
[1486] Arguments: a(number), b(number)
[1487] Returns: the sum of a and b
[1488] Step 2:
[1489] The user presses the submit button to send the prompt they entered to the server. The client terminal generates a POST request including the prompt and sends it to the server's API endpoint.
[1490] Step 3:
[1491] At the same time, the emotion engine installed in the client device analyzes the user's voice, facial expressions, and operation patterns to detect the user's emotional state. For example, when analyzing the user's facial expressions with a camera, facial movements are captured to determine the user's emotions.
[1492] Step 4:
[1493] The emotion engine sends the detected emotion information to a cloud endpoint, including emotion information such as "the user is feeling impatient."
[1494] Step 5:
[1495] The server receives the prompt and emotion information sent from the client device. The server's API endpoint accepts the request, analyzes the request content, and extracts the prompt and emotion information.
[1496] Step 6:
[1497] The server provides the extracted prompt and emotional information to the generation AI. At this time, it sets parameters for the generation AI to reflect the emotional information along with the prompt. For example, if the user is feeling impatient, it sets the AI to generate concise, quickly executable code.
[1498] Step 7:
[1499] The server sends a request to the API of the generation AI based on the set parameters. The generation AI generates program code using the prompt and emotion information.
[1500] Step 8:
[1501] The Generative AI generates the following Python code and returns it to the server:
[1502] def add_numbers(a, b):
[1503] return a + b
[1504] Step 9:
[1505] The server formats the received program code, performs processing such as adding comments as necessary, and then creates a response to be sent to the client terminal.
[1506] Step 10:
[1507] The client terminal checks the response received from the server and extracts the generated program code, for example, "Generated code: def add_numbers(a, b): return a + b".
[1508] Step 11:
[1509] The user can check the generated program code displayed on the client terminal, and if necessary, modify or regenerate the code to ensure that it meets the expectations. The user can also enter a new prompt and send it again.
[1510] In this way, the user is effectively able to generate program code based on prompts, but also to utilize an environment in which optimal code generation occurs based on emotions recognized by the emotion engine.
[1511] Example 2
[1512] 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."
[1513] In conventional program code generation systems, the process of generating program code based on prompts entered by the user is standard, but it is not possible to reflect the user's emotional state. This makes it difficult to generate code flexibly according to the user's state, and there are issues such as not being able to sufficiently reduce the burden on the user or improve satisfaction.
[1514] 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 instructions regarding the generated program code, means for generating the program code using a generation artificial intelligence based on the instructions, means for transmitting the generated program code, means for recognizing the user's emotion, and means for reflecting the recognized emotion information in the instructions. As a result, the program code is generated reflecting the user's emotional state, enabling flexible and satisfying code generation according to individual needs.
[1515] "Generated program code" is software code that is automatically generated based on instructions entered by a user.
[1516] An "instruction" is input information that specifies the content of the program code that the user wants to generate.
[1517] "Generative AI" refers to algorithms and systems that automatically generate program code based on user instructions.
[1518] The "transmission means" is a function for sending the generated program code and other data from the server to the client terminal.
[1519] "Means for recognizing emotions" refers to technology or devices for detecting a user's emotional state (e.g., joy, sadness, stress, etc.).
[1520] "Emotional information" refers to data that represents the user's emotional state, and can be obtained from voice analysis, facial expression analysis, operation pattern analysis, etc.
[1521] The "receiving means" is a function that allows the server to receive instructions and emotional information sent from the client terminal.
[1522] The "display means" is a function for visually displaying the generated program code to the user.
[1523] The present invention relates to a system that receives instructions for generating program code, generates program code using artificial intelligence, and provides the generated code to a user. Furthermore, by combining it with an emotion engine that recognizes the user's emotions, the purpose is to realize code generation that is more suited to the user.
[1524] System Configuration
[1525] The system of the present invention comprises the following main components:
[1526] 1. Client Terminal
[1527] A user uses a client terminal to input instructions regarding the program code to be generated through an interface. The client terminal includes a means for sending prompts to the server and a means for displaying the generated program code received from the server. The client terminal also includes a built-in emotion engine that recognizes emotions from the user's voice, facial expressions, and operation patterns.
[1528] 2. Server
[1529] The server has a means for receiving prompts from the client terminal and providing the prompts to the generation artificial intelligence to generate program code. The server also includes a function for transmitting the generated program code to the client terminal. Specifically, the server generates program code corresponding to the prompts using natural language processing technology.
[1530] 3. Emotion Engine
[1531] The emotion engine has a means for detecting emotions using a user's voice analysis, facial expression analysis, or operation patterns. The recognized emotion information is reflected in the generation of prompts and transmitted to the server.
[1532] Hardware and software used
[1533] Client terminal
[1534] Client devices are personal computers or smartphones. Interfaces are often web browsers (Google Chrome, Mozilla Firefox, etc.) or dedicated apps. Emotion engines include OpenFace (facial expression analysis), Google Speech-to-Text API (audio analysis), and custom tactile pattern recognition algorithms.
[1535] server
[1536] The servers are remote servers with high-performance computing resources, equipped with search engines such as Elasticsearch and high-performance processors, and large language models such as OpenAI's GPT-3 and ChatGPT are used for generative artificial intelligence.
[1537] Example of operation
[1538] Below are some specific examples of how this system can be used.
[1539] Prompt Sentence Examples
[1540] If a user requests the creation of a Python function to perform addition from the client terminal interface, he or she enters the following prompt statement:
[1541] Function Name: add_numbers
[1542] Arguments: a(number), b(number)
[1543] Returns: the sum of a and b
[1544] By entering this prompt and pressing the send button, the client terminal sends the prompt to the server. At the same time, the emotion engine analyzes the user's emotions and sends that information to the server.
[1545] The server receives the prompt and emotion information and generates the specified Python function based on the artificial intelligence. The generated code is then sent to the client terminal and displayed to the user. The displayed content is as follows:
[1546] Generated code:
[1547] def add_numbers(a, b):
[1548] return a + b
[1549] As described above, the present invention realizes the generation of program code that reflects user instructions and emotional information, reduces the burden on the user, and provides code generation that is highly satisfying.
[1550] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1551] Step 1:
[1552] The user uses the client terminal interface to input and send a prompt for the program code they want to generate. The input is in the format of "Function name: add_numbers", "Arguments: a (number), b (number)", "Return value: sum of a and b". The input prompt is sent from the client terminal to the server as is.
[1553] Input: Prompt statement (e.g., "Function name: add_numbers", "Arguments: a (number), b (number)", "Return value: sum of a and b")
[1554] Output: Prompt sent from client terminal to server
[1555] Specific operation: The user inputs the prompts in the interface and presses the send button, and the client terminal sends a send request to the server.
[1556] Step 2:
[1557] The client terminal uses an emotion engine to analyze the user's emotions. The emotion engine performs voice analysis, facial expression analysis, and operation pattern analysis to acquire the user's emotion information. The acquired emotion information is then sent to the server along with a prompt.
[1558] Input: voice, facial expressions, operation patterns
[1559] Output: Emotional information (e.g., "relaxed")
[1560] Specific operation: Facial expressions are captured with a camera, audio is recorded with a microphone, and operations are recorded with a touchpad. Analysis software analyzes this to create emotional information and send it to the server.
[1561] Step 3:
[1562] The server receives prompts and emotion information sent from the client terminal, and stores the received prompts and emotion information in a database.
[1563] Input: prompt sentence, emotion information
[1564] Output: Prompt sentences and emotion information stored in a database
[1565] Specific operation: The server receives the transmitted data and stores it in the specified database. Data formatting and validation may also be performed.
[1566] Step 4:
[1567] The server provides the received prompt and emotion information to the AI generator and sends a request for program code generation. The AI generator uses natural language processing technology to generate program code corresponding to the prompt.
[1568] Input: prompt sentence, emotion information
[1569] Output: Generated program code (e.g. Python code)
[1570] Specific operation: The server makes a request to the generation AI, which generates code based on the request. The generated code is formatted and verified on the server.
[1571] Step 5:
[1572] The server formats the generated program code and transmits it to the client terminal.
[1573] Input: Generated program code
[1574] Output: Sending the formatted program code to the client terminal
[1575] Specific operation: The server formats the code appropriately and sends it to the client device as a response. Error checking and logging are also performed as appropriate.
[1576] Step 6:
[1577] The client terminal displays the program code received from the server to the user.
[1578] Input: Formatted program code sent from the server
[1579] Output: Program code displayed in the user interface
[1580] Specific operation: The client terminal receives the response from the server and displays the program code on the screen. The user can visually check it and modify or download it as necessary.
[1581] Through the above steps, the system generates program code that reflects the user's prompts and emotional state, thereby increasing user convenience and satisfaction.
[1582] (Application example 2)
[1583] 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."
[1584] In recent years, technology for automatically generating program code using generative AI models has evolved, but for users to use this technology efficiently, it is essential to input prompts appropriately and understand the generated code. However, if the user's emotional state or stress level is high, this input and understanding process can be burdensome, making it difficult to work efficiently. In particular, in situations requiring high precision, such as factory robot control programs, it is necessary to take the user's emotional state into consideration.
[1585] 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.
[1586] In this invention, the server includes means for receiving prompts related to the generated program code, means for transmitting the generated program code, means for generating the program code using a generative AI model, means for recognizing the emotional state of the user, means for optimizing the prompts based on the emotional state, and means for displaying the generated program code. This allows the program code to be generated efficiently and appropriately while taking the emotional state of the user into consideration, and for the user to use it.
[1587] A "generative program code prompt" is a set of instructions a user enters to use a generative AI model to generate program code that performs a specific function or action.
[1588] A "generative AI model" is an artificial intelligence model that uses natural language processing technology to automatically generate program code based on user prompts.
[1589] A "means for generating program code" is a means that has the function of generating program code from user prompts using a generative AI model.
[1590] The "transmission means" has a function of transmitting the generated program code to the user's client terminal.
[1591] "Means for recognizing emotional states" refers to technology that detects and recognizes a user's emotions using voice analysis, facial expression analysis, or operation patterns.
[1592] The "means for optimizing prompts" has a function of adjusting prompts to make them easier for the user to understand and input, taking into account the emotional state of the user.
[1593] The "display means" has the function of visually presenting the generated program code and other information to the user.
[1594] The present invention is a system that receives prompts for generated program code, generates program code using a generative AI model, and provides the generated code to a user, in combination with an emotion engine that recognizes the user's emotions.
[1595] System configuration
[1596] The system of the present invention is mainly composed of a client terminal used by the user, a server on which the generation AI runs, an emotion engine that recognizes the user's emotions, and a network over which these communicate.
[1597] 1. Client Terminal
[1598] A user inputs a prompt using an interface of a client terminal. The client terminal includes a means for transmitting the prompt to the server and a means for displaying the generated program code received from the server. Suitable client terminals include, for example, smartphones, smart glasses, and head-mounted displays.
[1599] 2. Server
[1600] The server includes a means for receiving prompts from the client device and providing the prompts to the generation AI to generate program code. The server also has a function for transmitting the generated program code to the client device. The generation AI model uses natural language processing technology.
[1601] 3. Emotion Engine
[1602] The emotion engine has a means for recognizing the user's emotion and reflects the result in generating prompts. The emotion engine detects the emotion by analyzing the user's voice, facial expression, or operation patterns.
[1603] System Operation
[1604] User operation (client terminal)
[1605] A user inputs a prompt through the interface of a client terminal. For example, to generate a control program for a factory robot, the user inputs the following prompt:
[1606] example:
[1607] Function name: pick_part
[1608] Arguments: robot_arm (robot arm instance), part_location (part location)
[1609] Return value: Executes the action of grabbing the part.
[1610] When the user inputs this prompt and presses the send button, the client terminal sends the prompt to the server.
[1611] Emotion Engine Operation
[1612] The emotion engine recognizes the user's emotional state through voice and facial expression analysis. For example, if the user is feeling stressed, it sends that information to the server.
[1613] Server Processing
[1614] The server receives the prompt and emotional information sent from the client device. The server sends a request to the generative AI model based on the prompt, and reflects the emotional information when generating the prompt. The generative AI model uses natural language processing technology to generate program code corresponding to the prompt. For example, the generative AI generates the following Python code:
[1615] example:
[1616] “def pick_part(robot_arm, part_location):
[1617] robot_arm.move_to(part_location)
[1618] robot_arm.grasp()
[1619] The generated code is formatted on the server and sent to the client terminal.
[1620] Viewing the client terminal
[1621] The client terminal displays the generated program code received from the server to the user. For example, the generated code may be displayed as follows:
[1622] example:
[1623] "Generated code:
[1624] def pick_part(robot_arm, part_location):
[1625] robot_arm.move_to(part_location)
[1626] robot_arm.grasp()
[1627] As described above, the system of the present invention provides an environment in which users can efficiently generate and review program code based on prompts. Furthermore, the emotion engine enables prompt generation that reflects the user's emotional state, enabling code generation that is more tailored to the user.
[1628] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1629] Step 1:
[1630] The user inputs a prompt using the interface of the client terminal. At this time, the text entered by the user is sent to the server by the client terminal as a prompt statement. An example of a prompt statement is "Function name: pick_part Arguments: robot_arm (robot arm instance), part_location (part location) Return value: Executes the action of picking up the part." In this process, the user's input becomes direct input data, and the data is sent through the mechanism of an HTTP request sent from the client terminal.
[1631] Step 2:
[1632] The client device is equipped with an emotion engine that analyzes the user's voice, facial expressions, and detects operation patterns. The emotion engine analyzes the user's emotional state and collects the results as data. This analysis is performed in real time to recognize the user's stress level and emotional state (e.g., excitement, relaxation). This data is also simultaneously sent to the server. In this step, voice recognition software and facial expression recognition algorithms perform processing and output the resulting emotional state data.
[1633] Step 3:
[1634] The server receives the prompt and emotional data sent from the client device. Based on the received data, it issues commands to the generative AI model. Specifically, it uses natural language processing technology to request the generation of program code based on the prompt. In this case, the input data for the generative AI model are the prompt and emotional data, and the generated program code is obtained as the output.
[1635] Step 4:
[1636] The server optimizes the generated program code based on the emotional information. For example, if the user is feeling stressed, the server may simplify the program code or add detailed explanatory comments. In this step, data processing is performed after code generation, and the optimized program code is output.
[1637] Step 5:
[1638] The server sends the optimized program code to the client terminal. What is sent is the generated program code itself. In this process, an HTTP response is sent from the server to the client terminal.
[1639] Step 6:
[1640] The client terminal displays the generated program code received from the server to the user. The code is displayed on the display of the client terminal so that the user can check it. In this step, the received data is displayed in text format as is.
[1641] These steps enable the system to efficiently generate program code while taking into account the user's emotional state and provide an environment that the user can use.
[1642] 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.
[1643] 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.
[1644] 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.
[1645] 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.
[1646] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.
[1647] 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.
[1648] 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).
[1649] 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.
[1650] 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."
[1651] 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.
[1652] 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).
[1653] 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.
[1654] 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.
[1655] 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.
[1656] 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.
[1657] 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.
[1658] 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.
[1659] 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.
[1660] 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.
[1661] 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.
[1662] 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.
[1663] The following is further disclosed regarding the above embodiment.
[1664] (Claim 1)
[1665] means for receiving a prompt regarding the generated program code;
[1666] means for generating program code using artificial intelligence based on the prompt;
[1667] means for transmitting the generated program code;
[1668] A system including:
[1669] (Claim 2)
[1670] means for sending the prompt;
[1671] means for receiving and displaying the generated program code;
[1672] 10. The system of claim 1, further comprising:
[1673] (Claim 3)
[1674] 10. The system of claim 1, wherein the generative artificial intelligence includes means for generating program code corresponding to the prompt using natural language processing.
[1675] "Example 1"
[1676] (Claim 1)
[1677] means for inputting and transmitting a prompt statement relating to the generated program code at a terminal used by a user;
[1678] a server that receives the prompt sentence via a communication network;
[1679] means for generating program code using a generative model based on the prompt sentence;
[1680] means for transmitting the generated program code to the terminal;
[1681] means for displaying the generated program code on the terminal;
[1682] A system including:
[1683] (Claim 2)
[1684] The system of claim 1 , wherein the generative model uses natural language processing techniques.
[1685] (Claim 3)
[1686] The system of claim 1 , wherein the generative model includes means for generating program code using a generative model algorithm.
[1687] "Application Example 1"
[1688] (Claim 1)
[1689] means for receiving a prompt regarding the generated program code;
[1690] means for generating program code using artificial intelligence based on the prompt;
[1691] means for transmitting the generated program code;
[1692] A system including a means for generating work tasks for a factory.
[1693] (Claim 2)
[1694] means for sending the prompt;
[1695] means for receiving and displaying the generated program code;
[1696] 2. The system according to claim 1, further comprising means for transmitting the generated program code to a factory robot to cause it to execute a work task.
[1697] (Claim 3)
[1698] 10. The system of claim 1, wherein the generative artificial intelligence includes means for generating program code corresponding to the prompt using natural language processing.
[1699] "Example 2: Combining Emotion Engines"
[1700] (Claim 1)
[1701] means for receiving instructions regarding the generated program code;
[1702] means for generating program code using artificial intelligence based on the instructions;
[1703] means for transmitting the generated program code;
[1704] means for recognizing a user's emotion;
[1705] a means for reflecting the recognized emotion information in the instruction;
[1706] A system including:
[1707] (Claim 2)
[1708] means for transmitting the instruction;
[1709] means for receiving and displaying the generated program code;
[1710] means for transmitting the emotion information;
[1711] 10. The system of claim 1, further comprising:
[1712] (Claim 3)
[1713] 10. The system of claim 1, wherein the generative artificial intelligence includes means for generating program code corresponding to instructions using natural language processing.
[1714] "Application example 2 when combining emotion engines"
[1715] (Claim 1)
[1716] means for receiving a prompt regarding the generated program code;
[1717] means for generating program code using a generative AI model based on the prompt;
[1718] means for transmitting the generated program code;
[1719] a means for recognizing the emotional state of a user;
[1720] means for optimizing prompts based on said emotional state;
[1721] means for displaying the generated program code;
[1722] A system including:
[1723] (Claim 2)
[1724] means for sending the prompt;
[1725] means for receiving and displaying the generated program code;
[1726] The emotion recognition and optimization means further includes
[1727] 10. The system of claim 1.
[1728] (Claim 3)
[1729] The generative AI model includes means for generating program code corresponding to the prompt using natural language processing.
[1730] 10. The system of claim 1.
[1731] Format that respects output conditions:
[1732] (Claim 1)
[1733] means for receiving a prompt regarding the generated program code;
[1734] means for generating program code using a generative AI model based on the prompt;
[1735] means for transmitting the generated program code;
[1736] a means for recognizing the emotional state of a user;
[1737] means for optimizing prompts based on said emotional state;
[1738] means for displaying the generated program code;
[1739] A system including:
[1740] (Claim 2)
[1741] means for sending the prompt;
[1742] means for receiving and displaying the generated program code;
[1743] The emotion recognition and optimization means further includes
[1744] 10. The system of claim 1.
[1745] (Claim 3)
[1746] The generative AI model includes means for generating program code corresponding to the prompt using natural language processing.
[1747] 10. The system of claim 1. [Explanation of symbols]
[1748] 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 a prompt regarding the generated program code; means for generating program code using artificial intelligence based on the prompt; means for transmitting the generated program code; A system including:
2. means for sending the prompt; means for receiving and displaying the generated program code; The system of claim 1 further comprising:
3. The system of claim 1 , wherein the generative artificial intelligence includes means for generating program code corresponding to the prompt using natural language processing.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A