System

By integrating TDD with generative AI models, the system addresses the reliability issues of code generation, ensuring accurate and efficient conversion of natural language requirements into reliable program code.

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

Patent Information

Application Number
JP2024130384
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2026-02-19

AI Technical Summary

Technical Problem

Existing generative AI models generate code that may be incorrect, with no reliable way to verify its functionality, leading to potential bugs and errors, and lack automation in converting natural language requirements to accurate program code.

Method used

Introduce test-driven development (TDD) into code generation using a generative AI model, analyzing user requirements into simple functions, generating test code, executing and verifying its accuracy, and integrating implementation code to ensure reliability.

Benefits of technology

The system generates highly reliable code that accurately meets user requirements by automating the process from natural language input to a coherent program, improving development efficiency and reducing bugs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026028086000001_ABST
    Figure 2026028086000001_ABST
Patent Text Reader

Abstract

A system is provided.SOLUTION: A system comprising: means for analyzing a generated request and dividing the request into simple functions; means for generating test codes for the divided simple functions; means for executing the generated test codes and checking the correctness thereof; means for generating implementation codes based on the test codes; means for integrating a plurality of implementation codes into one program; and means for providing a final program.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

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

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

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

[0004] When generating program code using a generative AI model, there is always the possibility that the generated code may be incorrect. This problem poses the risk of bugs or errors, as there is no way to verify whether the generated code actually works. There are also limited ways to ensure that the generated code accurately reflects the required specifications. This results in unreliable code, increasing the likelihood of problems occurring during actual use. Therefore, improving the reliability of code generation using generative AI models is a very important challenge. [Means for solving the problem]

[0005] This invention provides a means for improving the reliability of generated code by introducing the concept of test-driven development (TDD) into code generation using a generative AI model. Specifically, it provides a means for analyzing generated requirements and dividing them into simple functions, a means for generating test code for the divided simple functions, and a means for executing the generated test code and verifying its accuracy. It also provides a system that includes a means for generating implementation code based on the test code, a means for integrating multiple implementation codes into a single program, and a means for providing the final program. This system ensures that the generated code accurately meets the requirements and minimizes the occurrence of bugs and errors.

[0006] "Generated requirements" refer to the desires and desired functions input by a user to the system.

[0007] "Analysis" refers to the process by which a generative AI model understands a user's requirements and breaks them down into simple functions.

[0008] "Simple functions" refer to the individual specific operations or behaviors that are obtained by breaking down complex requirements.

[0009] "Test code" refers to code that is executed under predetermined conditions to check whether a specific simple function works correctly.

[0010] "Execution" refers to the process of running the generated test code and checking the results.

[0011] "Accuracy" refers to an indicator that indicates whether the generated test code and implementation code operate without error according to the required specifications and objectives.

[0012] "Implementation code" refers to program code written to realize specific functions and operations based on test code.

[0013] "Integration" refers to the process of combining multiple implementations into a single coherent program.

[0014] "Program" refers to the entire code that contains a set of instructions that are executed on a particular computer.

[0015] "Providing" refers to the process of delivering the generated program to the user in a usable state. [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] This invention relates to a test-driven development (TDD) tool system that uses generative AI models, which can improve the reliability of generated code and generate accurate programs that meet user requirements.

[0038] Overall system configuration

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

[0040] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0041] 2. Server: A central processing unit on which the generative AI model and TDD tools are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0042] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0043] 4. TDD tools: Tools to run the generated test code and check its correctness.

[0044] Program processing

[0045] Entering and splitting requests

[0046] Subject: User

[0047] A user inputs the desired function in natural language via a terminal. For example, the user inputs a request such as "I want to create a system with a user authentication function."

[0048] Subject: Server

[0049] The server uses a generative AI model to analyze the user's request and divide it into simple functions, such as "user registration function," "login function," and "authority check function."

[0050] Test code generation

[0051] Subject: Server

[0052] The server uses a generative AI model to generate test code for each simple function. For example, for a "user registration function," test code for "validating user data" and "saving data to the database" is generated.

[0053] Run and check the test code

[0054] Subject: Server

[0055] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0056] Generating implementation code

[0057] Subject: Server

[0058] The server generates the corresponding implementation code based on the test code. For example, it generates code for "validating user data" and code for "saving to database".

[0059] Code Integration

[0060] Subject: Server

[0061] The server then combines the generated implementation code into a single coherent program, resulting in a complete program where each simple function works together.

[0062] Program Offering

[0063] Subject: Server

[0064] The server provides the final program to the user's terminal, where the user can download and use the program.

[0065] Specific examples

[0066] For example, the requirement to "create a system with user authentication functionality" can be broken down into the following simple functions:

[0067] 1. User registration function: Enters and validates user data and saves the data in the database.

[0068] 2. Login function: Uses registered user data to verify the correct user.

[0069] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[0070] In this way, a series of processes produces highly reliable code and provides an accurate program that meets the user's requirements.

[0071] The above is an embodiment of the present invention. This system can significantly improve the reliability of code generation using a generative AI model.

[0072] The processing flow will be explained below.

[0073] Step 1:

[0074] Subject: User

[0075] The user inputs the desired function to the system in natural language via a terminal, for example, "I want to create a system with a user authentication function."

[0076] Step 2:

[0077] Subject: Server

[0078] The server uses a generative AI model to analyze the user's request and divide it into simple functions. For example, it divides the user authentication function into simple functions such as "user registration function," "login function," and "authority check function."

[0079] Step 3:

[0080] Subject: Server

[0081] The server generates appropriate test code for each simple function. Using a generative AI model, it creates test code to verify each simple function. For example, it generates test code for "validating user data" and "saving to a database."

[0082] Step 4:

[0083] Subject: Server

[0084] The server runs the generated test code to verify its accuracy. If the test results are not as expected, a feedback process is used to regenerate the code, ensuring the reliability of the test code.

[0085] Step 5:

[0086] Subject: Server

[0087] The server generates implementation code based on the test code, such as code for validating user data and saving it to a database, using a generative AI model.

[0088] Step 6:

[0089] Subject: Server

[0090] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0091] Step 7:

[0092] Subject: Server

[0093] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0094] Example 1

[0095] 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."

[0096] Conventional test-driven development has the problem that developers manually write test code and then modify the implementation code based on the test results, which is a cumbersome and time-consuming process. Furthermore, there is a lack of technology to directly convert requirements input in natural language into programs, which reduces development efficiency. The purpose of this invention is to solve these problems and improve development efficiency and code reliability by automating the process from requirements to implementation.

[0097] 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.

[0098] In this invention, the server includes means for inputting a request expressed in natural language, means for analyzing the generated request and dividing it into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing the final program, means for analyzing the request using a generative AI model and dividing it into simple functions, means for using prompt statements to generate test code and implementation code, and means for automatically correcting problems and re-executing if the test code fails. This makes it possible to seamlessly generate high-quality programs from natural language.

[0099] "Requirements expressed in natural language" are specifications or functional requirements written by a user in a language-based format.

[0100] The "generated requirements" refer to specific functions and specifications obtained by analyzing the requirements input by the user in natural language.

[0101] "Simple functions" refer to the individual basic functions that are obtained when complex requirements are broken down.

[0102] A "generative AI model" is an artificial intelligence system that uses machine learning algorithms to analyze requirements and generate test code and implementation code.

[0103] "Test code" is verification code that is automatically generated to check whether the functions to be implemented work correctly.

[0104] "Implementation code" refers to the code of an actual program that is generated based on test code.

[0105] "Integration" is the process of combining multiple separate implementations into a single coherent program.

[0106] The "final program" is the complete program that satisfies the user's requirements, obtained after all implementation code has been integrated.

[0107] A "prompt sentence" is an instruction or example sentence that is input into a generative AI model, and test code and implementation code are generated based on this.

[0108] "Feedback" is the process of providing information for next steps and further improvements based on the analysis and test results generated.

[0109] "Test-driven development" is a method of first creating test code and then developing implementation code that passes the tests.

[0110] This invention relates to a test-driven development (TDD) tool system that uses generative AI models. This system aims to improve development efficiency and code reliability by analyzing requirements entered by a user in natural language and automatically generating test code and implementation code.

[0111] System configuration

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

[0113] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program. For example, a PC or smartphone.

[0114] 2. Server: A central processing unit on which the generative AI model and TDD tools are installed. It analyzes user requirements, breaks them down into simple functions, and generates test code and implementation code.

[0115] 3. Generative AI model: Using machine learning algorithms, it analyzes user requirements, breaks them down into simple functions, and automatically generates corresponding test code and implementation code.

[0116] 4. TDD Tools: Tools to run the generated test code and check its accuracy, providing feedback based on test-driven development techniques.

[0117] Detailed program processing

[0118] The user inputs the desired function in natural language via the terminal. For example, they might input, "I want to create a system with user authentication functionality." The server then uses a generative AI model to analyze the input natural language request and divide it into simple functions. For example, it may be divided into "user registration function," "login function," "authority check function," etc.

[0119] The server uses a generative AI model to generate test code for each simple function. For example, for the "user registration function," it generates test code for "validating user data" and "saving to the database." The generated test code is run in a test environment within the server to verify its accuracy. If a test fails, details of the error are recorded in a log file, and the test code generation process is run again. This cycle continues until all tests pass.

[0120] After all tests pass, the server generates the corresponding implementation code. The generative AI model generates implementation code based on the contents of the test code. For example, it may include "validating user data" and "saving to a database." The server integrates the multiple generated implementation codes into a single, consistent program. A version control system (e.g., Git) is often used during the integration process.

[0121] Once the final program is integrated, the server provides it to the user's device, where the user can download and run the program through a dedicated interface. The server also provides documentation of the generated code and test result reports for easy understanding by the user.

[0122] Examples of prompt statements

[0123] Example prompt for breaking down into simple functions:

[0124] "Please create a system with user authentication functions. Specific functions include user registration, login, and authorization check."

[0125] Example prompt for generating test code:

[0126] "Generate test code for the user registration functionality, including tests for validation and saving to the database."

[0127] Example prompt for generating implementation code:

[0128] "Generate the implementation code for the user registration function, including validation and saving to the database."

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

[0130] Step 1:

[0131] User request input

[0132] The user uses the terminal to input the desired function in natural language. This input is done through a text box or voice input. For example, the user might input "I want to create a system with user authentication function." This request (input) is sent from the terminal to the server.

[0133] Step 2:

[0134] Requirement analysis and functional division

[0135] The server uses a generative AI model to analyze the natural language requests sent by the user. This analysis uses NLP (natural language processing) technology to break down the requests into simple functions. For example, the requests are broken down into basic functions such as "user registration function," "login function," and "authority check function." These divided functions (output) are then incorporated into a data structure within the server.

[0136] Step 3:

[0137] Test code generation

[0138] The server uses a generative AI model to generate test code for simple functions obtained through analysis. For example, for a "user registration function," test code is generated for "validating user data" and "saving data to the database." The generated test code (output) is stored in the server's internal storage.

[0139] Step 4:

[0140] Execute test code and check results

[0141] The server executes the saved test code in its own execution environment. During this process, it checks whether each test passes. The test execution results (output) are generated in report format and recorded on the server. If a test fails, error details are written to a log file and the test code generation process is automatically executed again.

[0142] Step 5:

[0143] Generating implementation code

[0144] After all tests pass, the server proceeds to generate the corresponding implementation code. The generative AI model generates implementation code based on the contents of the test code. For example, this includes code for "validating user data" and "saving to the database." The generated implementation code (output) is saved in the server's storage.

[0145] Step 6:

[0146] Integration of implementation code

[0147] The server then integrates the generated implementation code into a single code. To create a coherent program, the code is merged so that each feature works together. This process often uses a version control system (e.g., Git). The integrated program (output) is stored in a repository.

[0148] Step 7:

[0149] Final program delivery

[0150] The server provides the final program to the user's terminal. This program runs completely based on the user's requests. The user can download and run the program through a dedicated interface on the terminal. This final program (output) is sent from the server to the terminal.

[0151] At each step, we clarify how the input data is processed and what output is obtained, and explain the specific operations based on that. This allows you to understand the process of generating the final program from the user's requirements as a series of steps.

[0152] (Application example 1)

[0153] 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."

[0154] With conventional technology, generating an operating program for an industrial robot required a great deal of time and effort. Furthermore, to ensure the reliability and accuracy of the generated program, extensive testing and debugging work was required, resulting in a decline in production efficiency. Furthermore, the need for specialized knowledge made it difficult for ordinary factory workers to use.

[0155] 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.

[0156] In this invention, the server includes means for analyzing generated requests and dividing them into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing a final program, means for inputting requests in natural language and generating an operation program for an industrial robot, and means for supplying the final program to a control unit of the robot. This makes it possible to generate an operation program for an industrial robot based on request input in natural language and provide the program quickly and efficiently while maintaining high reliability and accuracy.

[0157] A "generated request" is a specific need or instruction that the system extracts by analyzing the desired operation or function input by the user in natural language.

[0158] "Simple functions" are specific, single tasks or operations that are generated by analyzing the generated requirements and breaking down complex requirements.

[0159] "Test code" is a test program code generated to verify that simple functions work correctly.

[0160] "Implementation code" is program code that is generated based on test code and actually executes simple functions.

[0161] A "program" is software that integrates multiple implementation codes to realize consistent operations and functions that meet user requirements.

[0162] "Input in natural language" means inputting requests or instructions to a system using a language that humans use on a daily basis (for example, Japanese or English).

[0163] An "industrial robot" is a mechanical device used in production sites such as factories to perform various automated tasks.

[0164] A "control unit" is a computer or electronic device that controls the operation of an industrial robot.

[0165] A "generative AI model" is an algorithm that uses artificial intelligence to analyze natural language requirements, break them down into simple functions, and generate test code and implementation code.

[0166] To implement this invention, we need to build a system using a generative AI model. This system consists of the following main components:

[0167] 1. System Components

[0168] 1.1 Terminal

[0169] A terminal is a device that provides an interface for a user to input requests in natural language. Examples include tablets, smartphones, and personal computers.

[0170] 1.2 Server

[0171] The server is a central processing unit on which generative AI models and test-driven development (TDD) tools are installed. It analyzes user requirements, breaks them down into simple functions, generates test code and implementation code based on them, and also executes tests and modifies programs based on the results.

[0172] 1.3 Generative AI Models

[0173] The generative AI model includes algorithms for analyzing user requirements and breaking them down into simple functions, and is capable of generating test code and implementation code for the simple functions.

[0174] 1.4 TDD Tools

[0175] TDD tools are used to run the generated test code and check its accuracy, and if the test fails, the generative AI model uses the results to fix the problem.

[0176] 2. Program Processing

[0177] 2.1 Entering and dividing requirements

[0178] The user inputs the desired function in natural language via the terminal. For example, the user inputs a request such as "I want to pick and inspect products."

[0179] The server uses the generative AI model to analyze the user's request and break it down into simple functions, such as "pick the product from the shelf," "inspect the picked product," and "prepare the inspected product for shipment."

[0180] 2.2 Test Code Generation

[0181] The server uses a generative AI model to generate test code for each simple function. For example, for the task of "picking products from shelves," the server generates test code for "picking the correct product in the correct quantity."

[0182] 2.3 Executing and checking test code

[0183] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0184] 2.4 Generating Implementation Code

[0185] The server generates implementation code based on the test code, such as control code for a robot arm used for picking and code for processing inspection data obtained from sensors.

[0186] 2.5 Code Integration

[0187] The server then combines the generated implementation code into a single coherent program, resulting in a complete program where each simple function works together.

[0188] 2.6 Program Offering

[0189] The server provides the final program to the robot's control unit, which allows the industrial robot to initiate actions based on user requests.

[0190] 3. Specific Examples

[0191] For example, a requirement to "pick and inspect products" can be broken down into the following simple functions:

[0192] 1. Picking the right product from the shelf: The robot arm's movements are subdivided to pick the correct product from the shelf.

[0193] 2. Inspection of picked products: Sensors are used to check whether the products are correct, and the weight, barcode, etc. are inspected.

[0194] 3. Prepare inspected products for shipment: Move the products to the shipping preparation station and prepare them for shipment.

[0195] An example of a prompt for a generative AI model is:

[0196] "I want to pick and inspect products."

[0197] Request: Please generate specific procedures for picking and inspecting goods.

[0198] 1. Picking products from shelves

[0199] 2. Inspection of picked products

[0200] 3. Inspect the products and prepare them for shipment

[0201] This makes it possible to generate operating programs for industrial robots based on request input in natural language, and to provide programs quickly and efficiently while maintaining high reliability and accuracy.

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

[0203] Step 1:

[0204] The user inputs the desired function in natural language via the terminal. For example, the user inputs a request such as "I want to pick and inspect products." The input data includes the operation details desired by the user. The input request is sent to the server as output.

[0205] Step 2:

[0206] The server analyzes the received user request using a generative AI model and breaks it down into simple functions, such as "picking products," "inspecting the picked products," and "preparing inspected products for shipment." The input data is the user's natural language request, and the output is a list of the broken down simple functions.

[0207] Step 3:

[0208] The server uses a generative AI model to generate test code for each divided simple function. For example, for "picking products," test code is generated to "pick the correct product in the correct quantity." The input data is a list of simple functions, and the generated test code is obtained as the output.

[0209] Step 4:

[0210] The server executes the generated test code and checks its accuracy. Specifically, it runs the test code in a virtual or simulated environment and compares the expected results with the actual results. The input data is the generated test code, and the output is the test results.

[0211] Step 5:

[0212] If the test results are successful, the server generates implementation code based on the test code. For example, it generates operation control code for a robot arm that performs picking, or code to process inspection data obtained from a sensor. The input data is the successful test code, and the output is the implementation code.

[0213] Step 6:

[0214] The server integrates the generated implementation codes into a single coherent program, resulting in a complete program in which each simple function works together. The input data is the implementation code for each simple function, and the output is the integrated program.

[0215] Step 7:

[0216] The server provides the final program to the robot's control unit. The program is then sent to the robot via the network to control its movements. The input data is the integrated program, and the output is the robot's desired behavior.

[0217] 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.

[0218] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. This system enables the generative AI model to consider the user's emotional state and perform optimal, simple function division and code generation in response to requests. As a result, the reliability of the generated code is further improved, enabling it to flexibly and accurately respond to user requests.

[0219] Overall system configuration

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

[0221] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0222] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tool are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0223] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0224] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[0225] 5. TDD tools: Tools to run the generated test code and check its correctness.

[0226] Program processing

[0227] Request input and emotion recognition

[0228] Subject: User

[0229] A user inputs the desired function to the system in natural language via a terminal. For example, the user inputs a request such as "I want to create a system with a user authentication function."

[0230] Subject: Server

[0231] The server uses an emotion engine to analyze the emotions contained in the user's input. The emotion engine optimizes the generated request based on the user's emotional state. For example, if the user is expressing impatience, it converts the request into a simpler, more intuitive form.

[0232] Parsing and Decomposing Requirements

[0233] Subject: Server

[0234] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, such as a user authentication function divided into a "user registration function," a "login function," and an "authority check function."

[0235] Test code generation

[0236] Subject: Server

[0237] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," test code is generated for "validating user data" and "saving it to the database."

[0238] Run and check the test code

[0239] Subject: Server

[0240] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0241] Generating implementation code

[0242] Subject: Server

[0243] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database, using a generative AI model.

[0244] Code Integration

[0245] Subject: Server

[0246] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0247] Program Offering

[0248] Subject: Server

[0249] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0250] Specific examples

[0251] For example, if the emotion engine detects a sense of impatience in the user's input for a request to "create a system with a user authentication function," the request will be optimized into a simpler and more intuitive form. Specifically, the request will be divided into simple functions such as "user registration function," "login function," and "authority check function."

[0252] 1. User registration function: Enters and validates user data and saves the data in the database.

[0253] 2. Login function: Uses registered user data to verify the correct user.

[0254] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[0255] In this way, by combining emotion engines, it becomes possible to respond flexibly while taking into account the user's emotional state, and more appropriate and accurate programs can be generated.

[0256] The above is an embodiment of the present invention. This system further improves the reliability of code generation by the generative AI model, and can provide optimal code that meets user requirements.

[0257] The processing flow will be explained below.

[0258] Step 1:

[0259] Subject: User

[0260] A user inputs the desired function to the system in natural language via a terminal. For example, a user may input a request such as "I want to create a system with a user authentication function."

[0261] Step 2:

[0262] Subject: Server

[0263] The server uses an emotion engine to analyze the emotion from the user's input. The emotion engine analyzes the emotional nuances of the input text and recognizes whether the user is in an emotional state, such as impatience, excitement, satisfaction, or doubt. For example, if the user's input contains impatience, the system will adjust the request accordingly.

[0264] Step 3:

[0265] Subject: Server

[0266] The server uses a generative AI model to analyze the user's request and break it down into simple functions, such as dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[0267] Step 4:

[0268] Subject: Server

[0269] The server generates appropriate test code for each simple function. Using a generative AI model, it creates test code to verify each simple function. For example, as test code for a "user registration function," it generates test code for "validating user data" and "saving to the database."

[0270] Step 5:

[0271] Subject: Server

[0272] The server runs the generated test code and checks its accuracy. If the test results are not as expected, the generative AI model is used again to fix the issues and generate new test code. This feedback process results in highly accurate test code.

[0273] Step 6:

[0274] Subject: Server

[0275] The server generates implementation code based on the test code. For each simple function, it generates code for, for example, "validating user data" or "saving to database".

[0276] Step 7:

[0277] Subject: Server

[0278] The server integrates the generated implementation code into a single, consistent program. For example, to implement a "user authentication function," it integrates the implementation code for a "user registration function," a "login function," and a "authority check function."

[0279] Step 8:

[0280] Subject: Server

[0281] The server then provides the final program to the user's device, where the user can download the program and use it in a real environment. In this way, the system of the present invention can generate accurate code that meets the user's requirements while taking into account the user's emotional state.

[0282] Example 2

[0283] 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."

[0284] Conventional test-driven development (TDD) tools do not take the user's emotional state into account when analyzing user requirements, breaking them down into simple functions, and generating test code and implementation code. As a result, if the requirements entered by the user are vague or influenced by emotions, the accuracy of the analysis and the reliability of the generated code may be reduced. Furthermore, there are insufficient means for properly analyzing requirements entered in natural language and providing optimal feedback. The present invention aims to solve these problems and provide a system that generates more flexible and accurate code by taking the user's emotional state into account.

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

[0286] In this invention, the server includes: means for a user to input requests in natural language; means for recognizing the user's emotional state and optimizing the requests; means for analyzing the generated requests and dividing them into simple functions; means for generating test code for the divided simple functions using a generative AI model; means for executing the generated test code and checking its accuracy; means for executing a regeneration process based on the feedback; means for generating implementation code based on the test code; means for integrating multiple implementation codes into a single program; and means for providing the final program. This enables request analysis and code generation that take the user's emotional state into consideration, improving the reliability and adaptability of the generated code.

[0287] A "requirement" refers to a function or operation that a user wants to achieve from a system, expressed in natural language.

[0288] "Emotional state" refers to the psychological state analyzed from the user's input and behavior, and includes, for example, feelings of impatience and anticipation.

[0289] A "generative AI model" refers to an artificial intelligence algorithm that analyzes user requirements, breaks them down into simple functions, and generates test code and implementation code for each function.

[0290] "Natural language" refers to a language used in everyday conversation, such as Japanese or English, rather than a programming language.

[0291] "Optimization" refers to converting the content of a request into a more appropriate and specific form, taking into account the user's emotional state and the specific content of the request.

[0292] "Test code" refers to code used to check whether the generated functions work correctly.

[0293] "Implementation code" refers to code for building functions that actually work based on user requests.

[0294] "Feedback" refers to information that allows a system or generative AI model to improve or adjust based on test results or analysis results.

[0295] "Simple functionality" refers to specific subtasks or subfunctions that result from analyzing and breaking down requirements.

[0296] A "program" refers to a consistent set of code that integrates multiple generated implementation codes to achieve the intended function as a whole.

[0297] The "server" refers to the central processing unit on which the generative AI model, emotion engine, and TDD tool are installed, and which is responsible for processing requests from users.

[0298] A "terminal" is a device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0299] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. This system enables the generative AI model to consider the user's emotional state and perform optimal, simple function division and code generation in response to requests. As a result, the reliability of the generated code is further improved, enabling it to flexibly and accurately respond to user requests.

[0300] Overall system configuration

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

[0302] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0303] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tool are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0304] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0305] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[0306] 5. TDD tools: Tools to run the generated test code and check its correctness.

[0307] Program processing

[0308] Request input and emotion recognition

[0309] Subject: User

[0310] A user inputs the desired function to the system in natural language via a terminal. For example, a request such as "I want to create a system with a user authentication function" is input into the text input field of the terminal.

[0311] Emotion analysis

[0312] Subject: Server

[0313] The server receives the user's input and analyzes the user's emotional state using an emotion engine. Based on the analysis, the server optimizes the request.

[0314] Parsing and Decomposing Requirements

[0315] Subject: Server

[0316] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, for example, dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[0317] Test code generation

[0318] Subject: Server

[0319] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," it generates test code for "validating user data" and "saving it to the database."

[0320] Run and check the test code

[0321] Subject: Server

[0322] The server runs the generated test code to verify its accuracy. If the test fails during this process, it goes through the generation process again to fix the problem.

[0323] Generating implementation code

[0324] Subject: Server

[0325] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database, using a generative AI model.

[0326] Code Integration

[0327] Subject: Server

[0328] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0329] Program Offering

[0330] Subject: Server

[0331] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0332] Specific examples

[0333] For example, if the emotion engine detects a sense of impatience in the user's input for a request to "create a system with a user authentication function," the request will be optimized into a simpler and more intuitive form. Specifically, the request will be divided into simple functions such as "user registration function," "login function," and "authority check function."

[0334] 1. User registration function: Enters and validates user data and saves the data in the database.

[0335] 2. Login function: Uses registered user data to verify the correct user.

[0336] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[0337] Prompt Sentence Examples

[0338] The following is an example of a prompt sentence that can be input to a generative AI model to express a request such as "I want to create a system with user authentication functionality."

[0339] We want to create a system with user authentication functions, including user registration, login, and authorization check functions, and optimize these requirements based on the analysis of the user's emotional state.

[0340] This concludes the detailed description of the "Mode for Carrying Out the Invention." This system further improves the reliability of code generation by generative AI models, enabling the provision of optimal code that meets user requirements.

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

[0342] Step 1: User Request Input

[0343] Subject: User

[0344] The user operates the terminal and inputs the functions they want to realize into the system in natural language. The input is in text format and is sent to the server by pressing the send button.

[0345] Input: A user's request written in natural language (e.g., "I want to create a system with user authentication functionality.")

[0346] Output: Request data sent to the server in text format

[0347] Specific operation: The user uses the terminal keyboard to type "I would like to create a system with user authentication function" and clicks the send button.

[0348] Step 2: Sentiment Analysis

[0349] Subject: Server

[0350] The server receives the user's input and analyzes the user's emotional state using an emotion engine that analyzes the user's input text to identify the emotional state and optimize the request.

[0351] Input: User's text request

[0352] Output: Analyzed emotional state and optimized request

[0353] Specific operation: The server sends the received text to the emotion engine, which analyzes the user's impatience and expectations and optimizes the request.

[0354] Step 3: Parsing and splitting the request

[0355] Subject: Server

[0356] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, for example, dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[0357] Input: Optimized request

[0358] Output: Requirements broken down into simple functions

[0359] Specific operation: The generative AI model analyzes the input request and divides the "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[0360] Step 4: Generate test code

[0361] Subject: Server

[0362] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," it generates test code for "validating user data" and "saving it to the database."

[0363] Input: Requirements broken down into simple features

[0364] Output: Generated test code

[0365] Specific operation: The generative AI model generates test code for the "user registration function" using pytest, a Python unit testing framework.

[0366] Step 5: Run and check the test code

[0367] Subject: Server

[0368] The server runs the generated test code to verify its accuracy. If the test fails during this process, it goes through the generation process again to fix the problem.

[0369] Input: Generated test code

[0370] Output: Test execution result (success / failure)

[0371] How it works: The server runs the generated test code, evaluates the results, and if any tests fail, sends feedback to the generative AI model, which then regenerates the corrected test code.

[0372] Step 6: Generate implementation code

[0373] Subject: Server

[0374] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database.

[0375] Input: Test code

[0376] Output: Generated implementation code

[0377] Specific operation: Based on the test code, the generative AI model generates implementation code to process user data using Python's Flask framework.

[0378] Step 7: Integrating the Code

[0379] Subject: Server

[0380] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0381] Input: Implementation code

[0382] Output: Integrated program

[0383] What it does: The server aggregates each endpoint of your Flask application and creates a code file with the overall application structure.

[0384] Step 8: Program Delivery

[0385] Subject: Server

[0386] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0387] Input: Integrated Program

[0388] Output: The program file that is delivered to the user's device.

[0389] Specific operation: The server compresses the generated program into a ZIP file and provides a download link to the user. The user clicks the link to download the file.

[0390] (Application example 2)

[0391] 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."

[0392] Conventional code generation systems using generative AI models do not take into account the user's emotional state when generating code, resulting in a poor user experience. In particular, content creation support tools often have problems where the generated content does not match the user's emotional state, necessitating frequent revisions and regeneration. This increases the user's psychological burden and makes it difficult to work efficiently.

[0393] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for analyzing the generated request and dividing it into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing the final program, means for analyzing the user's emotional state regarding the generated request in real time, and means for optimizing the dividing means and generating means based on the analyzed emotional state. This makes it possible to generate optimal code and content according to the user's emotional state, thereby improving the user experience and work efficiency.

[0394] "Means for analyzing generated requirements and breaking them down into simple functions" refers to a device or program that analyzes the requirements entered by the user and executes the process of breaking them down into the basic functions required to realize those requirements.

[0395] The "means for generating test code for the divided simple functions" is a device or program that automatically generates test code corresponding to each divided basic function.

[0396] "Means for executing the generated test code and verifying its accuracy" refers to a device or program that actually executes the generated test code and verifies whether its behavior is as expected.

[0397] The "means for generating implementation code based on test code" refers to a device or program that creates code for implementing the corresponding actual function based on test code whose accuracy has been confirmed.

[0398] "Means for integrating multiple implementation codes into a single program" refers to a device or program that integrates multiple implementation codes that were created individually into a single integrated program, allowing them to work together.

[0399] The "means for providing the final program" refers to a device or program that provides the completed program to the user.

[0400] The "means for analyzing the user's emotional state in response to the generated request in real time" refers to a device or program that detects and analyzes the user's emotions in response to the request input by the user in real time.

[0401] The "means for optimizing the splitting means and generation means based on the analyzed emotional state" refers to a device or program that optimizes the request splitting method and code generation method according to the detected and analyzed user emotions.

[0402] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. Specific embodiments for realizing this system are described below.

[0403] System configuration

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

[0405] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0406] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tools are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0407] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0408] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[0409] 5. TDD tools: Tools to run the generated test code and check its correctness.

[0410] System Operation

[0411] 1. Request input and emotion recognition

[0412] A user inputs the desired function to the system in natural language via a terminal. For example, in a content distribution service, a user inputs a request such as "I want to create a blog post about a new lifestyle." The server uses an emotion engine to analyze the emotion contained in the user's input. The emotion engine optimizes the generated request based on the user's emotional state. For example, if the user expresses happiness, the request will be converted to more positive content.

[0413] 2. Analyzing and Decomposing Requirements

[0414] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, such as breaking down a blog post function into simple functions like "create introduction," "create body," and "insert image."

[0415] 3. Test Code Generation

[0416] The server generates test code for each simple function using a generative AI model. For example, for "creating an introduction," it generates "grammar check for the introduction" and "test code for the flow of the introduction."

[0417] 4. Run and check the test code

[0418] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0419] 5. Generating the implementation code

[0420] The server generates the corresponding implementation code based on the test code, for example, the implementation code corresponding to the automatic generation of the introduction and main text. This code generation is also performed using a generative AI model.

[0421] 6. Code Integration

[0422] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0423] 7. Program Offering

[0424] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0425] Hardware and software used

[0426] Hardware: Smartphone (user device), server

[0427] Software: NLTK (sentiment analysis), OpenAI GPT-3 (generative AI model), test-driven development tools

[0428] Examples and prompts

[0429] For example, if the emotion engine detects a feeling of happiness in response to a request to "create a blog post about a new lifestyle," the specific prompt might look like this:

[0430] Prompt statement:

[0431] "I want to create a fun blog post about a new lifestyle."

[0432] This system can provide optimal content according to the user's emotional state, improving the user experience and increasing work efficiency.

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

[0434] Step 1: Entering the request

[0435] Users input the desired functions to the system in natural language via a terminal. For example, they can input a request such as "I want to create a blog post about a new lifestyle."

[0436] Input: User's natural language request

[0437] Output: The requested text entered

[0438] Specific actions

[0439] The terminal receives text input from the user and transmits it to the server.

[0440] Step 2: Emotion Recognition

[0441] The server inputs the received request text into the emotion engine and analyzes the user's emotional state in real time, for example, detecting whether the user is expressing happiness from the request text.

[0442] Input: User requested text

[0443] Output: User's emotional data (e.g., happiness)

[0444] Specific actions

[0445] The server uses NLTK (a sentiment analysis library) to analyze the sentiment contained in the request text.

[0446] Step 3: Parsing and splitting the request

[0447] The server uses a generative AI model to split requests into simple functions based on the analyzed sentiment data and the request text, for example, splitting a request to create a blog post into simple functions such as "create introduction," "create body," and "insert image."

[0448] Input: User request text and emotion data

[0449] Output: A simple split feature list

[0450] Specific actions

[0451] The server uses a generative AI model (e.g., GPT-3) to parse the request text and break it down into simple features.

[0452] Step 4: Generate test code

[0453] The server uses a generative AI model to generate test code for each simple function, for example, generating test code for grammar checks for "creating an introduction."

[0454] Input: A simple, split list of features

[0455] Output: Generated test code

[0456] Specific actions

[0457] The server automatically generates test code for each simple function.

[0458] Step 5: Run the test code

[0459] The server runs the generated test code to verify its accuracy, for example by running grammar check test code to verify that the introduction is generated correctly.

[0460] Input: Generated test code

[0461] Output: Test result (success / failure)

[0462] Specific actions

[0463] The server runs the generated test code, records the results, and if it's not successful, goes through the generation process again to fix the problem.

[0464] Step 6: Generate implementation code

[0465] The server generates the corresponding implementation code based on the test code whose accuracy has been confirmed, for example, generating auto-generated code for the introduction section.

[0466] Input: Test code that has been verified for accuracy

[0467] Output: Implementation code

[0468] Specific actions

[0469] The server generates implementation code with actual functionality based on the verified test code.

[0470] Step 7: Integrating the Code

[0471] The server integrates the generated code into a single coherent program, ensuring that each simple function works together.

[0472] Input: Multiple implementation codes

[0473] Output: Integrated program

[0474] Specific actions

[0475] The server integrates each implementation code and compiles it into a single complete program.

[0476] Step 8: Program Delivery

[0477] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0478] Input: Integrated Program

[0479] Output: Provide the program to the user's terminal

[0480] Specific actions

[0481] The server transmits the final program to the user's terminal for download by the user.

[0482] In this way, specific data processing and calculations are performed based on the input data at each step, and the output is used in the next step, making it possible to generate optimal code and content.

[0483] 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.

[0484] 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.

[0485] 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.

[0486] [Second embodiment]

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

[0488] 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.

[0489] 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).

[0490] 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.

[0491] 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.

[0492] 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).

[0493] 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.

[0494] 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.

[0495] 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.

[0496] 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.

[0497] 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.

[0498] 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."

[0499] This invention relates to a test-driven development (TDD) tool system that uses generative AI models, which can improve the reliability of generated code and generate accurate programs that meet user requirements.

[0500] Overall system configuration

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

[0502] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0503] 2. Server: A central processing unit on which the generative AI model and TDD tools are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0504] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0505] 4. TDD tools: Tools to run the generated test code and check its correctness.

[0506] Program processing

[0507] Entering and splitting requests

[0508] Subject: User

[0509] A user inputs the desired function in natural language via a terminal. For example, the user inputs a request such as "I want to create a system with a user authentication function."

[0510] Subject: Server

[0511] The server uses a generative AI model to analyze the user's request and divide it into simple functions, such as "user registration function," "login function," and "authority check function."

[0512] Test code generation

[0513] Subject: Server

[0514] The server uses a generative AI model to generate test code for each simple function. For example, for a "user registration function," test code for "validating user data" and "saving data to the database" is generated.

[0515] Run and check the test code

[0516] Subject: Server

[0517] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0518] Generating implementation code

[0519] Subject: Server

[0520] The server generates the corresponding implementation code based on the test code. For example, it generates code for "validating user data" and code for "saving to database".

[0521] Code Integration

[0522] Subject: Server

[0523] The server then combines the generated implementation code into a single coherent program, resulting in a complete program where each simple function works together.

[0524] Program Offering

[0525] Subject: Server

[0526] The server provides the final program to the user's terminal, where the user can download and use the program.

[0527] Specific examples

[0528] For example, the requirement to "create a system with user authentication functionality" can be broken down into the following simple functions:

[0529] 1. User registration function: Enters and validates user data and saves the data in the database.

[0530] 2. Login function: Uses registered user data to verify the correct user.

[0531] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[0532] In this way, a series of processes produces highly reliable code and provides an accurate program that meets the user's requirements.

[0533] The above is an embodiment of the present invention. This system can significantly improve the reliability of code generation using a generative AI model.

[0534] The processing flow will be explained below.

[0535] Step 1:

[0536] Subject: User

[0537] The user inputs the desired function to the system in natural language via a terminal, for example, "I want to create a system with a user authentication function."

[0538] Step 2:

[0539] Subject: Server

[0540] The server uses a generative AI model to analyze the user's request and divide it into simple functions. For example, it divides the user authentication function into simple functions such as "user registration function," "login function," and "authority check function."

[0541] Step 3:

[0542] Subject: Server

[0543] The server generates appropriate test code for each simple function. Using a generative AI model, it creates test code to verify each simple function. For example, it generates test code for "validating user data" and "saving to a database."

[0544] Step 4:

[0545] Subject: Server

[0546] The server runs the generated test code to verify its accuracy. If the test results are not as expected, a feedback process is used to regenerate the code, ensuring the reliability of the test code.

[0547] Step 5:

[0548] Subject: Server

[0549] The server generates implementation code based on the test code, such as code for validating user data and saving it to a database, using a generative AI model.

[0550] Step 6:

[0551] Subject: Server

[0552] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0553] Step 7:

[0554] Subject: Server

[0555] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0556] Example 1

[0557] 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."

[0558] Conventional test-driven development has the problem that developers manually write test code and then modify the implementation code based on the test results, which is a cumbersome and time-consuming process. Furthermore, there is a lack of technology to directly convert requirements input in natural language into programs, which reduces development efficiency. The purpose of this invention is to solve these problems and improve development efficiency and code reliability by automating the process from requirements to implementation.

[0559] 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.

[0560] In this invention, the server includes means for inputting a request expressed in natural language, means for analyzing the generated request and dividing it into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing the final program, means for analyzing the request using a generative AI model and dividing it into simple functions, means for using prompt statements to generate test code and implementation code, and means for automatically correcting problems and re-executing if the test code fails. This makes it possible to seamlessly generate high-quality programs from natural language.

[0561] "Requirements expressed in natural language" are specifications or functional requirements written by a user in a language-based format.

[0562] The "generated requirements" refer to specific functions and specifications obtained by analyzing the requirements input by the user in natural language.

[0563] "Simple functions" refer to the individual basic functions that are obtained when complex requirements are broken down.

[0564] A "generative AI model" is an artificial intelligence system that uses machine learning algorithms to analyze requirements and generate test code and implementation code.

[0565] "Test code" is verification code that is automatically generated to check whether the functions to be implemented work correctly.

[0566] "Implementation code" refers to the code of an actual program that is generated based on test code.

[0567] "Integration" is the process of combining multiple separate implementations into a single coherent program.

[0568] The "final program" is the complete program that satisfies the user's requirements, obtained after all implementation code has been integrated.

[0569] A "prompt sentence" is an instruction or example sentence that is input into a generative AI model, and test code and implementation code are generated based on this.

[0570] "Feedback" is the process of providing information for next steps and further improvements based on the analysis and test results generated.

[0571] "Test-driven development" is a method of first creating test code and then developing implementation code that passes the tests.

[0572] This invention relates to a test-driven development (TDD) tool system that uses generative AI models. This system aims to improve development efficiency and code reliability by analyzing requirements entered by a user in natural language and automatically generating test code and implementation code.

[0573] System configuration

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

[0575] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program. For example, a PC or smartphone.

[0576] 2. Server: A central processing unit on which the generative AI model and TDD tools are installed. It analyzes user requirements, breaks them down into simple functions, and generates test code and implementation code.

[0577] 3. Generative AI model: Using machine learning algorithms, it analyzes user requirements, breaks them down into simple functions, and automatically generates corresponding test code and implementation code.

[0578] 4. TDD Tools: Tools to run the generated test code and check its accuracy, providing feedback based on test-driven development techniques.

[0579] Detailed program processing

[0580] The user inputs the desired function in natural language via the terminal. For example, they might input, "I want to create a system with user authentication functionality." The server then uses a generative AI model to analyze the input natural language request and divide it into simple functions. For example, it may be divided into "user registration function," "login function," "authority check function," etc.

[0581] The server uses a generative AI model to generate test code for each simple function. For example, for the "user registration function," it generates test code for "validating user data" and "saving to the database." The generated test code is run in a test environment within the server to verify its accuracy. If a test fails, details of the error are recorded in a log file, and the test code generation process is run again. This cycle continues until all tests pass.

[0582] After all tests pass, the server generates the corresponding implementation code. The generative AI model generates implementation code based on the contents of the test code. For example, it may include "validating user data" and "saving to a database." The server integrates the multiple generated implementation codes into a single, consistent program. A version control system (e.g., Git) is often used during the integration process.

[0583] Once the final program is integrated, the server provides it to the user's device, where the user can download and run the program through a dedicated interface. The server also provides documentation of the generated code and test result reports for easy understanding by the user.

[0584] Examples of prompt statements

[0585] Example prompt for breaking down into simple functions:

[0586] "Please create a system with user authentication functions. Specific functions include user registration, login, and authorization check."

[0587] Example prompt for generating test code:

[0588] "Generate test code for the user registration functionality, including tests for validation and saving to the database."

[0589] Example prompt for generating implementation code:

[0590] "Generate the implementation code for the user registration function, including validation and saving to the database."

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

[0592] Step 1:

[0593] User request input

[0594] The user uses the terminal to input the desired function in natural language. This input is done through a text box or voice input. For example, the user might input "I want to create a system with user authentication function." This request (input) is sent from the terminal to the server.

[0595] Step 2:

[0596] Requirement analysis and functional division

[0597] The server uses a generative AI model to analyze the natural language requests sent by the user. This analysis uses NLP (natural language processing) technology to break down the requests into simple functions. For example, the requests are broken down into basic functions such as "user registration function," "login function," and "authority check function." These divided functions (output) are then incorporated into a data structure within the server.

[0598] Step 3:

[0599] Test code generation

[0600] The server uses a generative AI model to generate test code for simple functions obtained through analysis. For example, for a "user registration function," test code is generated for "validating user data" and "saving data to the database." The generated test code (output) is stored in the server's internal storage.

[0601] Step 4:

[0602] Execute test code and check results

[0603] The server executes the saved test code in its own execution environment. During this process, it checks whether each test passes. The test execution results (output) are generated in report format and recorded on the server. If a test fails, error details are written to a log file and the test code generation process is automatically executed again.

[0604] Step 5:

[0605] Generating implementation code

[0606] After all tests pass, the server proceeds to generate the corresponding implementation code. The generative AI model generates implementation code based on the contents of the test code. For example, this includes code for "validating user data" and "saving to the database." The generated implementation code (output) is saved in the server's storage.

[0607] Step 6:

[0608] Integration of implementation code

[0609] The server then integrates the generated implementation code into a single code. To create a coherent program, the code is merged so that each feature works together. This process often uses a version control system (e.g., Git). The integrated program (output) is stored in a repository.

[0610] Step 7:

[0611] Final program delivery

[0612] The server provides the final program to the user's terminal. This program runs completely based on the user's requests. The user can download and run the program through a dedicated interface on the terminal. This final program (output) is sent from the server to the terminal.

[0613] At each step, we clarify how the input data is processed and what output is obtained, and explain the specific operations based on that. This allows you to understand the process of generating the final program from the user's requirements as a series of steps.

[0614] (Application example 1)

[0615] 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."

[0616] With conventional technology, generating an operating program for an industrial robot required a great deal of time and effort. Furthermore, to ensure the reliability and accuracy of the generated program, extensive testing and debugging work was required, resulting in a decline in production efficiency. Furthermore, the need for specialized knowledge made it difficult for ordinary factory workers to use.

[0617] 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.

[0618] In this invention, the server includes means for analyzing generated requests and dividing them into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing a final program, means for inputting requests in natural language and generating an operation program for an industrial robot, and means for supplying the final program to a control unit of the robot. This makes it possible to generate an operation program for an industrial robot based on request input in natural language and provide the program quickly and efficiently while maintaining high reliability and accuracy.

[0619] A "generated request" is a specific need or instruction that the system extracts by analyzing the desired operation or function input by the user in natural language.

[0620] "Simple functions" are specific, single tasks or operations that are generated by analyzing the generated requirements and breaking down complex requirements.

[0621] "Test code" is a test program code generated to verify that simple functions work correctly.

[0622] "Implementation code" is program code that is generated based on test code and actually executes simple functions.

[0623] A "program" is software that integrates multiple implementation codes to realize consistent operations and functions that meet user requirements.

[0624] "Input in natural language" means inputting requests or instructions to a system using a language that humans use on a daily basis (for example, Japanese or English).

[0625] An "industrial robot" is a mechanical device used in production sites such as factories to perform various automated tasks.

[0626] A "control unit" is a computer or electronic device that controls the operation of an industrial robot.

[0627] A "generative AI model" is an algorithm that uses artificial intelligence to analyze natural language requirements, break them down into simple functions, and generate test code and implementation code.

[0628] To implement this invention, we need to build a system using a generative AI model. This system consists of the following main components:

[0629] 1. System Components

[0630] 1.1 Terminal

[0631] A terminal is a device that provides an interface for a user to input requests in natural language. Examples include tablets, smartphones, and personal computers.

[0632] 1.2 Server

[0633] The server is a central processing unit on which generative AI models and test-driven development (TDD) tools are installed. It analyzes user requirements, breaks them down into simple functions, generates test code and implementation code based on them, and also executes tests and modifies programs based on the results.

[0634] 1.3 Generative AI Models

[0635] The generative AI model includes algorithms for analyzing user requirements and breaking them down into simple functions, and is capable of generating test code and implementation code for the simple functions.

[0636] 1.4 TDD Tools

[0637] TDD tools are used to run the generated test code and check its accuracy, and if the test fails, the generative AI model uses the results to fix the problem.

[0638] 2. Program Processing

[0639] 2.1 Entering and dividing requirements

[0640] The user inputs the desired function in natural language via the terminal. For example, the user inputs a request such as "I want to pick and inspect products."

[0641] The server uses the generative AI model to analyze the user's request and break it down into simple functions, such as "pick the product from the shelf," "inspect the picked product," and "prepare the inspected product for shipment."

[0642] 2.2 Test Code Generation

[0643] The server uses a generative AI model to generate test code for each simple function. For example, for the task of "picking products from shelves," the server generates test code for "picking the correct product in the correct quantity."

[0644] 2.3 Executing and checking test code

[0645] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0646] 2.4 Generating Implementation Code

[0647] The server generates implementation code based on the test code, such as control code for a robot arm used for picking and code for processing inspection data obtained from sensors.

[0648] 2.5 Code Integration

[0649] The server then combines the generated implementation code into a single coherent program, resulting in a complete program where each simple function works together.

[0650] 2.6 Program Offering

[0651] The server provides the final program to the robot's control unit, which allows the industrial robot to initiate actions based on user requests.

[0652] 3. Specific Examples

[0653] For example, a requirement to "pick and inspect products" can be broken down into the following simple functions:

[0654] 1. Picking the right product from the shelf: The robot arm's movements are subdivided to pick the correct product from the shelf.

[0655] 2. Inspection of picked products: Sensors are used to check whether the products are correct, and the weight, barcode, etc. are inspected.

[0656] 3. Prepare inspected products for shipment: Move the products to the shipping preparation station and prepare them for shipment.

[0657] An example of a prompt for a generative AI model is:

[0658] "I want to pick and inspect products."

[0659] Request: Please generate specific procedures for picking and inspecting goods.

[0660] 1. Picking products from shelves

[0661] 2. Inspection of picked products

[0662] 3. Inspect the products and prepare them for shipment

[0663] This makes it possible to generate operating programs for industrial robots based on request input in natural language, and to provide programs quickly and efficiently while maintaining high reliability and accuracy.

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

[0665] Step 1:

[0666] The user inputs the desired function in natural language via the terminal. For example, the user inputs a request such as "I want to pick and inspect products." The input data includes the operation details desired by the user. The input request is sent to the server as output.

[0667] Step 2:

[0668] The server analyzes the received user request using a generative AI model and breaks it down into simple functions, such as "picking products," "inspecting the picked products," and "preparing inspected products for shipment." The input data is the user's natural language request, and the output is a list of the broken down simple functions.

[0669] Step 3:

[0670] The server uses a generative AI model to generate test code for each divided simple function. For example, for "picking products," test code is generated to "pick the correct product in the correct quantity." The input data is a list of simple functions, and the generated test code is obtained as the output.

[0671] Step 4:

[0672] The server executes the generated test code and checks its accuracy. Specifically, it runs the test code in a virtual or simulated environment and compares the expected results with the actual results. The input data is the generated test code, and the output is the test results.

[0673] Step 5:

[0674] If the test results are successful, the server generates implementation code based on the test code. For example, it generates operation control code for a robot arm that performs picking, or code to process inspection data obtained from a sensor. The input data is the successful test code, and the output is the implementation code.

[0675] Step 6:

[0676] The server integrates the generated implementation codes into a single coherent program, resulting in a complete program in which each simple function works together. The input data is the implementation code for each simple function, and the output is the integrated program.

[0677] Step 7:

[0678] The server provides the final program to the robot's control unit. The program is then sent to the robot via the network to control its movements. The input data is the integrated program, and the output is the robot's desired behavior.

[0679] 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.

[0680] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. This system enables the generative AI model to consider the user's emotional state and perform optimal, simple function division and code generation in response to requests. As a result, the reliability of the generated code is further improved, enabling it to flexibly and accurately respond to user requests.

[0681] Overall system configuration

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

[0683] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0684] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tool are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0685] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0686] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[0687] 5. TDD tools: Tools to run the generated test code and check its correctness.

[0688] Program processing

[0689] Request input and emotion recognition

[0690] Subject: User

[0691] A user inputs the desired function to the system in natural language via a terminal. For example, the user inputs a request such as "I want to create a system with a user authentication function."

[0692] Subject: Server

[0693] The server uses an emotion engine to analyze the emotions contained in the user's input. The emotion engine optimizes the generated request based on the user's emotional state. For example, if the user is expressing impatience, it converts the request into a simpler, more intuitive form.

[0694] Parsing and Decomposing Requirements

[0695] Subject: Server

[0696] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, such as a user authentication function divided into a "user registration function," a "login function," and an "authority check function."

[0697] Test code generation

[0698] Subject: Server

[0699] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," test code is generated for "validating user data" and "saving it to the database."

[0700] Run and check the test code

[0701] Subject: Server

[0702] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0703] Generating implementation code

[0704] Subject: Server

[0705] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database, using a generative AI model.

[0706] Code Integration

[0707] Subject: Server

[0708] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0709] Program Offering

[0710] Subject: Server

[0711] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0712] Specific examples

[0713] For example, if the emotion engine detects a sense of impatience in the user's input for a request to "create a system with a user authentication function," the request will be optimized into a simpler and more intuitive form. Specifically, the request will be divided into simple functions such as "user registration function," "login function," and "authority check function."

[0714] 1. User registration function: Enters and validates user data and saves the data in the database.

[0715] 2. Login function: Uses registered user data to verify the correct user.

[0716] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[0717] In this way, by combining emotion engines, it becomes possible to respond flexibly while taking into account the user's emotional state, and more appropriate and accurate programs can be generated.

[0718] The above is an embodiment of the present invention. This system further improves the reliability of code generation by the generative AI model, and can provide optimal code that meets user requirements.

[0719] The processing flow will be explained below.

[0720] Step 1:

[0721] Subject: User

[0722] A user inputs the desired function to the system in natural language via a terminal. For example, a user may input a request such as "I want to create a system with a user authentication function."

[0723] Step 2:

[0724] Subject: Server

[0725] The server uses an emotion engine to analyze the emotion from the user's input. The emotion engine analyzes the emotional nuances of the input text and recognizes whether the user is in an emotional state, such as impatience, excitement, satisfaction, or doubt. For example, if the user's input contains impatience, the system will adjust the request accordingly.

[0726] Step 3:

[0727] Subject: Server

[0728] The server uses a generative AI model to analyze the user's request and break it down into simple functions, such as dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[0729] Step 4:

[0730] Subject: Server

[0731] The server generates appropriate test code for each simple function. Using a generative AI model, it creates test code to verify each simple function. For example, as test code for a "user registration function," it generates test code for "validating user data" and "saving to the database."

[0732] Step 5:

[0733] Subject: Server

[0734] The server runs the generated test code and checks its accuracy. If the test results are not as expected, the generative AI model is used again to fix the issues and generate new test code. This feedback process results in highly accurate test code.

[0735] Step 6:

[0736] Subject: Server

[0737] The server generates implementation code based on the test code. For each simple function, it generates code for, for example, "validating user data" or "saving to database".

[0738] Step 7:

[0739] Subject: Server

[0740] The server integrates the generated implementation code into a single, consistent program. For example, to implement a "user authentication function," it integrates the implementation code for a "user registration function," a "login function," and a "authority check function."

[0741] Step 8:

[0742] Subject: Server

[0743] The server then provides the final program to the user's device, where the user can download the program and use it in a real environment. In this way, the system of the present invention can generate accurate code that meets the user's requirements while taking into account the user's emotional state.

[0744] Example 2

[0745] 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."

[0746] Conventional test-driven development (TDD) tools do not take the user's emotional state into account when analyzing user requirements, breaking them down into simple functions, and generating test code and implementation code. As a result, if the requirements entered by the user are vague or influenced by emotions, the accuracy of the analysis and the reliability of the generated code may be reduced. Furthermore, there are insufficient means for properly analyzing requirements entered in natural language and providing optimal feedback. The present invention aims to solve these problems and provide a system that generates more flexible and accurate code by taking the user's emotional state into account.

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

[0748] In this invention, the server includes: means for a user to input requests in natural language; means for recognizing the user's emotional state and optimizing the requests; means for analyzing the generated requests and dividing them into simple functions; means for generating test code for the divided simple functions using a generative AI model; means for executing the generated test code and checking its accuracy; means for executing a regeneration process based on the feedback; means for generating implementation code based on the test code; means for integrating multiple implementation codes into a single program; and means for providing the final program. This enables request analysis and code generation that take the user's emotional state into consideration, improving the reliability and adaptability of the generated code.

[0749] A "requirement" refers to a function or operation that a user wants to achieve from a system, expressed in natural language.

[0750] "Emotional state" refers to the psychological state analyzed from the user's input and behavior, and includes, for example, feelings of impatience and anticipation.

[0751] A "generative AI model" refers to an artificial intelligence algorithm that analyzes user requirements, breaks them down into simple functions, and generates test code and implementation code for each function.

[0752] "Natural language" refers to a language used in everyday conversation, such as Japanese or English, rather than a programming language.

[0753] "Optimization" refers to converting the content of a request into a more appropriate and specific form, taking into account the user's emotional state and the specific content of the request.

[0754] "Test code" refers to code used to check whether the generated functions work correctly.

[0755] "Implementation code" refers to code for building functions that actually work based on user requests.

[0756] "Feedback" refers to information that allows a system or generative AI model to improve or adjust based on test results or analysis results.

[0757] "Simple functionality" refers to specific subtasks or subfunctions that result from analyzing and breaking down requirements.

[0758] A "program" refers to a consistent set of code that integrates multiple generated implementation codes to achieve the intended function as a whole.

[0759] The "server" refers to the central processing unit on which the generative AI model, emotion engine, and TDD tool are installed, and which is responsible for processing requests from users.

[0760] A "terminal" is a device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0761] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. This system enables the generative AI model to consider the user's emotional state and perform optimal, simple function division and code generation in response to requests. As a result, the reliability of the generated code is further improved, enabling it to flexibly and accurately respond to user requests.

[0762] Overall system configuration

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

[0764] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0765] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tool are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0766] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0767] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[0768] 5. TDD tools: Tools to run the generated test code and check its correctness.

[0769] Program processing

[0770] Request input and emotion recognition

[0771] Subject: User

[0772] A user inputs the desired function to the system in natural language via a terminal. For example, a request such as "I want to create a system with a user authentication function" is input into the text input field of the terminal.

[0773] Emotion analysis

[0774] Subject: Server

[0775] The server receives the user's input and analyzes the user's emotional state using an emotion engine. Based on the analysis, the server optimizes the request.

[0776] Parsing and Decomposing Requirements

[0777] Subject: Server

[0778] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, for example, dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[0779] Test code generation

[0780] Subject: Server

[0781] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," it generates test code for "validating user data" and "saving it to the database."

[0782] Run and check the test code

[0783] Subject: Server

[0784] The server runs the generated test code to verify its accuracy. If the test fails during this process, it goes through the generation process again to fix the problem.

[0785] Generating implementation code

[0786] Subject: Server

[0787] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database, using a generative AI model.

[0788] Code Integration

[0789] Subject: Server

[0790] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0791] Program Offering

[0792] Subject: Server

[0793] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0794] Specific examples

[0795] For example, if the emotion engine detects a sense of impatience in the user's input for a request to "create a system with a user authentication function," the request will be optimized into a simpler and more intuitive form. Specifically, the request will be divided into simple functions such as "user registration function," "login function," and "authority check function."

[0796] 1. User registration function: Enters and validates user data and saves the data in the database.

[0797] 2. Login function: Uses registered user data to verify the correct user.

[0798] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[0799] Prompt Sentence Examples

[0800] The following is an example of a prompt sentence that can be input to a generative AI model to express a request such as "I want to create a system with user authentication functionality."

[0801] We want to create a system with user authentication functions, including user registration, login, and authorization check functions, and optimize these requirements based on the analysis of the user's emotional state.

[0802] This concludes the detailed description of the "Mode for Carrying Out the Invention." This system further improves the reliability of code generation by generative AI models, enabling the provision of optimal code that meets user requirements.

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

[0804] Step 1: User Request Input

[0805] Subject: User

[0806] The user operates the terminal and inputs the functions they want to realize into the system in natural language. The input is in text format and is sent to the server by pressing the send button.

[0807] Input: A user's request written in natural language (e.g., "I want to create a system with user authentication functionality.")

[0808] Output: Request data sent to the server in text format

[0809] Specific operation: The user uses the terminal keyboard to type "I would like to create a system with user authentication function" and clicks the send button.

[0810] Step 2: Sentiment Analysis

[0811] Subject: Server

[0812] The server receives the user's input and analyzes the user's emotional state using an emotion engine that analyzes the user's input text to identify the emotional state and optimize the request.

[0813] Input: User's text request

[0814] Output: Analyzed emotional state and optimized request

[0815] Specific operation: The server sends the received text to the emotion engine, which analyzes the user's impatience and expectations and optimizes the request.

[0816] Step 3: Parsing and splitting the request

[0817] Subject: Server

[0818] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, for example, dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[0819] Input: Optimized request

[0820] Output: Requirements broken down into simple functions

[0821] Specific operation: The generative AI model analyzes the input request and divides the "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[0822] Step 4: Generate test code

[0823] Subject: Server

[0824] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," it generates test code for "validating user data" and "saving it to the database."

[0825] Input: Requirements broken down into simple features

[0826] Output: Generated test code

[0827] Specific operation: The generative AI model generates test code for the "user registration function" using pytest, a Python unit testing framework.

[0828] Step 5: Run and check the test code

[0829] Subject: Server

[0830] The server runs the generated test code to verify its accuracy. If the test fails during this process, it goes through the generation process again to fix the problem.

[0831] Input: Generated test code

[0832] Output: Test execution result (success / failure)

[0833] How it works: The server runs the generated test code, evaluates the results, and if any tests fail, sends feedback to the generative AI model, which then regenerates the corrected test code.

[0834] Step 6: Generate implementation code

[0835] Subject: Server

[0836] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database.

[0837] Input: Test code

[0838] Output: Generated implementation code

[0839] Specific operation: Based on the test code, the generative AI model generates implementation code to process user data using Python's Flask framework.

[0840] Step 7: Integrating the Code

[0841] Subject: Server

[0842] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0843] Input: Implementation code

[0844] Output: Integrated program

[0845] What it does: The server aggregates each endpoint of your Flask application and creates a code file with the overall application structure.

[0846] Step 8: Program Delivery

[0847] Subject: Server

[0848] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0849] Input: Integrated Program

[0850] Output: The program file that is delivered to the user's device.

[0851] Specific operation: The server compresses the generated program into a ZIP file and provides a download link to the user. The user clicks the link to download the file.

[0852] (Application example 2)

[0853] 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."

[0854] Conventional code generation systems using generative AI models do not take into account the user's emotional state when generating code, resulting in a poor user experience. In particular, content creation support tools often have problems where the generated content does not match the user's emotional state, necessitating frequent revisions and regeneration. This increases the user's psychological burden and makes it difficult to work efficiently.

[0855] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for analyzing the generated request and dividing it into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing the final program, means for analyzing the user's emotional state regarding the generated request in real time, and means for optimizing the dividing means and generating means based on the analyzed emotional state. This makes it possible to generate optimal code and content according to the user's emotional state, thereby improving the user experience and work efficiency.

[0856] "Means for analyzing generated requirements and breaking them down into simple functions" refers to a device or program that analyzes the requirements entered by the user and executes the process of breaking them down into the basic functions required to realize those requirements.

[0857] The "means for generating test code for the divided simple functions" is a device or program that automatically generates test code corresponding to each divided basic function.

[0858] "Means for executing the generated test code and verifying its accuracy" refers to a device or program that actually executes the generated test code and verifies whether its behavior is as expected.

[0859] The "means for generating implementation code based on test code" refers to a device or program that creates code for implementing the corresponding actual function based on test code whose accuracy has been confirmed.

[0860] "Means for integrating multiple implementation codes into a single program" refers to a device or program that integrates multiple implementation codes that were created individually into a single integrated program, allowing them to work together.

[0861] The "means for providing the final program" refers to a device or program that provides the completed program to the user.

[0862] The "means for analyzing the user's emotional state in response to the generated request in real time" refers to a device or program that detects and analyzes the user's emotions in response to the request input by the user in real time.

[0863] The "means for optimizing the splitting means and generation means based on the analyzed emotional state" refers to a device or program that optimizes the request splitting method and code generation method according to the detected and analyzed user emotions.

[0864] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. Specific embodiments for realizing this system are described below.

[0865] System configuration

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

[0867] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0868] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tools are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0869] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0870] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[0871] 5. TDD tools: Tools to run the generated test code and check its correctness.

[0872] System Operation

[0873] 1. Request input and emotion recognition

[0874] A user inputs the desired function to the system in natural language via a terminal. For example, in a content distribution service, a user inputs a request such as "I want to create a blog post about a new lifestyle." The server uses an emotion engine to analyze the emotion contained in the user's input. The emotion engine optimizes the generated request based on the user's emotional state. For example, if the user expresses happiness, the request will be converted to more positive content.

[0875] 2. Analyzing and Decomposing Requirements

[0876] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, such as breaking down a blog post function into simple functions like "create introduction," "create body," and "insert image."

[0877] 3. Test Code Generation

[0878] The server generates test code for each simple function using a generative AI model. For example, for "creating an introduction," it generates "grammar check for the introduction" and "test code for the flow of the introduction."

[0879] 4. Run and check the test code

[0880] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0881] 5. Generating the implementation code

[0882] The server generates the corresponding implementation code based on the test code, for example, the implementation code corresponding to the automatic generation of the introduction and main text. This code generation is also performed using a generative AI model.

[0883] 6. Code Integration

[0884] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[0885] 7. Program Offering

[0886] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0887] Hardware and software used

[0888] Hardware: Smartphone (user device), server

[0889] Software: NLTK (sentiment analysis), OpenAI GPT-3 (generative AI model), test-driven development tools

[0890] Examples and prompts

[0891] For example, if the emotion engine detects a feeling of happiness in response to a request to "create a blog post about a new lifestyle," the specific prompt might look like this:

[0892] Prompt statement:

[0893] "I want to create a fun blog post about a new lifestyle."

[0894] This system can provide optimal content according to the user's emotional state, improving the user experience and increasing work efficiency.

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

[0896] Step 1: Entering the request

[0897] Users input the desired functions to the system in natural language via a terminal. For example, they can input a request such as "I want to create a blog post about a new lifestyle."

[0898] Input: User's natural language request

[0899] Output: The requested text entered

[0900] Specific actions

[0901] The terminal receives text input from the user and transmits it to the server.

[0902] Step 2: Emotion Recognition

[0903] The server inputs the received request text into the emotion engine and analyzes the user's emotional state in real time, for example, detecting whether the user is expressing happiness from the request text.

[0904] Input: User requested text

[0905] Output: User's emotional data (e.g., happiness)

[0906] Specific actions

[0907] The server uses NLTK (a sentiment analysis library) to analyze the sentiment contained in the request text.

[0908] Step 3: Parsing and splitting the request

[0909] The server uses a generative AI model to split requests into simple functions based on the analyzed sentiment data and the request text, for example, splitting a request to create a blog post into simple functions such as "create introduction," "create body," and "insert image."

[0910] Input: User request text and emotion data

[0911] Output: A simple split feature list

[0912] Specific actions

[0913] The server uses a generative AI model (e.g., GPT-3) to parse the request text and break it down into simple features.

[0914] Step 4: Generate test code

[0915] The server uses a generative AI model to generate test code for each simple function, for example, generating test code for grammar checks for "creating an introduction."

[0916] Input: A simple, split list of features

[0917] Output: Generated test code

[0918] Specific actions

[0919] The server automatically generates test code for each simple function.

[0920] Step 5: Run the test code

[0921] The server runs the generated test code to verify its accuracy, for example by running grammar check test code to verify that the introduction is generated correctly.

[0922] Input: Generated test code

[0923] Output: Test result (success / failure)

[0924] Specific actions

[0925] The server runs the generated test code, records the results, and if it's not successful, goes through the generation process again to fix the problem.

[0926] Step 6: Generate implementation code

[0927] The server generates the corresponding implementation code based on the test code whose accuracy has been confirmed, for example, generating auto-generated code for the introduction section.

[0928] Input: Test code that has been verified for accuracy

[0929] Output: Implementation code

[0930] Specific actions

[0931] The server generates implementation code with actual functionality based on the verified test code.

[0932] Step 7: Integrating the Code

[0933] The server integrates the generated code into a single coherent program, ensuring that each simple function works together.

[0934] Input: Multiple implementation codes

[0935] Output: Integrated program

[0936] Specific actions

[0937] The server integrates each implementation code and compiles it into a single complete program.

[0938] Step 8: Program Delivery

[0939] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[0940] Input: Integrated Program

[0941] Output: Provide the program to the user's terminal

[0942] Specific actions

[0943] The server transmits the final program to the user's terminal for download by the user.

[0944] In this way, specific data processing and calculations are performed based on the input data at each step, and the output is used in the next step, making it possible to generate optimal code and content.

[0945] 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.

[0946] 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.

[0947] 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.

[0948] [Third embodiment]

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

[0950] 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.

[0951] 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).

[0952] 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.

[0953] 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.

[0954] 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).

[0955] 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.

[0956] 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.

[0957] 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.

[0958] 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.

[0959] 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.

[0960] 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."

[0961] This invention relates to a test-driven development (TDD) tool system that uses generative AI models, which can improve the reliability of generated code and generate accurate programs that meet user requirements.

[0962] Overall system configuration

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

[0964] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[0965] 2. Server: A central processing unit on which the generative AI model and TDD tools are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[0966] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[0967] 4. TDD tools: Tools to run the generated test code and check its correctness.

[0968] Program processing

[0969] Entering and splitting requests

[0970] Subject: User

[0971] A user inputs the desired function in natural language via a terminal. For example, the user inputs a request such as "I want to create a system with a user authentication function."

[0972] Subject: Server

[0973] The server uses a generative AI model to analyze the user's request and divide it into simple functions, such as "user registration function," "login function," and "authority check function."

[0974] Test code generation

[0975] Subject: Server

[0976] The server uses a generative AI model to generate test code for each simple function. For example, for a "user registration function," test code for "validating user data" and "saving data to the database" is generated.

[0977] Run and check the test code

[0978] Subject: Server

[0979] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[0980] Generating implementation code

[0981] Subject: Server

[0982] The server generates the corresponding implementation code based on the test code. For example, it generates code for "validating user data" and code for "saving to database".

[0983] Code Integration

[0984] Subject: Server

[0985] The server then combines the generated implementation code into a single coherent program, resulting in a complete program where each simple function works together.

[0986] Program Offering

[0987] Subject: Server

[0988] The server provides the final program to the user's terminal, where the user can download and use the program.

[0989] Specific examples

[0990] For example, the requirement to "create a system with user authentication functionality" can be broken down into the following simple functions:

[0991] 1. User registration function: Enters and validates user data and saves the data in the database.

[0992] 2. Login function: Uses registered user data to verify the correct user.

[0993] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[0994] In this way, a series of processes produces highly reliable code and provides an accurate program that meets the user's requirements.

[0995] The above is an embodiment of the present invention. This system can significantly improve the reliability of code generation using a generative AI model.

[0996] The processing flow will be explained below.

[0997] Step 1:

[0998] Subject: User

[0999] The user inputs the desired function to the system in natural language via a terminal, for example, "I want to create a system with a user authentication function."

[1000] Step 2:

[1001] Subject: Server

[1002] The server uses a generative AI model to analyze the user's request and divide it into simple functions. For example, it divides the user authentication function into simple functions such as "user registration function," "login function," and "authority check function."

[1003] Step 3:

[1004] Subject: Server

[1005] The server generates appropriate test code for each simple function. Using a generative AI model, it creates test code to verify each simple function. For example, it generates test code for "validating user data" and "saving to a database."

[1006] Step 4:

[1007] Subject: Server

[1008] The server runs the generated test code to verify its accuracy. If the test results are not as expected, a feedback process is used to regenerate the code, ensuring the reliability of the test code.

[1009] Step 5:

[1010] Subject: Server

[1011] The server generates implementation code based on the test code, such as code for validating user data and saving it to a database, using a generative AI model.

[1012] Step 6:

[1013] Subject: Server

[1014] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1015] Step 7:

[1016] Subject: Server

[1017] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1018] Example 1

[1019] 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."

[1020] Conventional test-driven development has the problem that developers manually write test code and then modify the implementation code based on the test results, which is a cumbersome and time-consuming process. Furthermore, there is a lack of technology to directly convert requirements input in natural language into programs, which reduces development efficiency. The purpose of this invention is to solve these problems and improve development efficiency and code reliability by automating the process from requirements to implementation.

[1021] 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.

[1022] In this invention, the server includes means for inputting a request expressed in natural language, means for analyzing the generated request and dividing it into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing the final program, means for analyzing the request using a generative AI model and dividing it into simple functions, means for using prompt statements to generate test code and implementation code, and means for automatically correcting problems and re-executing if the test code fails. This makes it possible to seamlessly generate high-quality programs from natural language.

[1023] "Requirements expressed in natural language" are specifications or functional requirements written by a user in a language-based format.

[1024] The "generated requirements" refer to specific functions and specifications obtained by analyzing the requirements input by the user in natural language.

[1025] "Simple functions" refer to the individual basic functions that are obtained when complex requirements are broken down.

[1026] A "generative AI model" is an artificial intelligence system that uses machine learning algorithms to analyze requirements and generate test code and implementation code.

[1027] "Test code" is verification code that is automatically generated to check whether the functions to be implemented work correctly.

[1028] "Implementation code" refers to the code of an actual program that is generated based on test code.

[1029] "Integration" is the process of combining multiple separate implementations into a single coherent program.

[1030] The "final program" is the complete program that satisfies the user's requirements, obtained after all implementation code has been integrated.

[1031] A "prompt sentence" is an instruction or example sentence that is input into a generative AI model, and test code and implementation code are generated based on this.

[1032] "Feedback" is the process of providing information for next steps and further improvements based on the analysis and test results generated.

[1033] "Test-driven development" is a method of first creating test code and then developing implementation code that passes the tests.

[1034] This invention relates to a test-driven development (TDD) tool system that uses generative AI models. This system aims to improve development efficiency and code reliability by analyzing requirements entered by a user in natural language and automatically generating test code and implementation code.

[1035] System configuration

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

[1037] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program. For example, a PC or smartphone.

[1038] 2. Server: A central processing unit on which the generative AI model and TDD tools are installed. It analyzes user requirements, breaks them down into simple functions, and generates test code and implementation code.

[1039] 3. Generative AI model: Using machine learning algorithms, it analyzes user requirements, breaks them down into simple functions, and automatically generates corresponding test code and implementation code.

[1040] 4. TDD Tools: Tools to run the generated test code and check its accuracy, providing feedback based on test-driven development techniques.

[1041] Detailed program processing

[1042] The user inputs the desired function in natural language via the terminal. For example, they might input, "I want to create a system with user authentication functionality." The server then uses a generative AI model to analyze the input natural language request and divide it into simple functions. For example, it may be divided into "user registration function," "login function," "authority check function," etc.

[1043] The server uses a generative AI model to generate test code for each simple function. For example, for the "user registration function," it generates test code for "validating user data" and "saving to the database." The generated test code is run in a test environment within the server to verify its accuracy. If a test fails, details of the error are recorded in a log file, and the test code generation process is run again. This cycle continues until all tests pass.

[1044] After all tests pass, the server generates the corresponding implementation code. The generative AI model generates implementation code based on the contents of the test code. For example, it may include "validating user data" and "saving to a database." The server integrates the multiple generated implementation codes into a single, consistent program. A version control system (e.g., Git) is often used during the integration process.

[1045] Once the final program is integrated, the server provides it to the user's device, where the user can download and run the program through a dedicated interface. The server also provides documentation of the generated code and test result reports for easy understanding by the user.

[1046] Examples of prompt statements

[1047] Example prompt for breaking down into simple functions:

[1048] "Please create a system with user authentication functions. Specific functions include user registration, login, and authorization check."

[1049] Example prompt for generating test code:

[1050] "Generate test code for the user registration functionality, including tests for validation and saving to the database."

[1051] Example prompt for generating implementation code:

[1052] "Generate the implementation code for the user registration function, including validation and saving to the database."

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

[1054] Step 1:

[1055] User request input

[1056] The user uses the terminal to input the desired function in natural language. This input is done through a text box or voice input. For example, the user might input "I want to create a system with user authentication function." This request (input) is sent from the terminal to the server.

[1057] Step 2:

[1058] Requirement analysis and functional division

[1059] The server uses a generative AI model to analyze the natural language requests sent by the user. This analysis uses NLP (natural language processing) technology to break down the requests into simple functions. For example, the requests are broken down into basic functions such as "user registration function," "login function," and "authority check function." These divided functions (output) are then incorporated into a data structure within the server.

[1060] Step 3:

[1061] Test code generation

[1062] The server uses a generative AI model to generate test code for simple functions obtained through analysis. For example, for a "user registration function," test code is generated for "validating user data" and "saving data to the database." The generated test code (output) is stored in the server's internal storage.

[1063] Step 4:

[1064] Execute test code and check results

[1065] The server executes the saved test code in its own execution environment. During this process, it checks whether each test passes. The test execution results (output) are generated in report format and recorded on the server. If a test fails, error details are written to a log file and the test code generation process is automatically executed again.

[1066] Step 5:

[1067] Generating implementation code

[1068] After all tests pass, the server proceeds to generate the corresponding implementation code. The generative AI model generates implementation code based on the contents of the test code. For example, this includes code for "validating user data" and "saving to the database." The generated implementation code (output) is saved in the server's storage.

[1069] Step 6:

[1070] Integration of implementation code

[1071] The server then integrates the generated implementation code into a single code. To create a coherent program, the code is merged so that each feature works together. This process often uses a version control system (e.g., Git). The integrated program (output) is stored in a repository.

[1072] Step 7:

[1073] Final program delivery

[1074] The server provides the final program to the user's terminal. This program runs completely based on the user's requests. The user can download and run the program through a dedicated interface on the terminal. This final program (output) is sent from the server to the terminal.

[1075] At each step, we clarify how the input data is processed and what output is obtained, and explain the specific operations based on that. This allows you to understand the process of generating the final program from the user's requirements as a series of steps.

[1076] (Application example 1)

[1077] 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."

[1078] With conventional technology, generating an operating program for an industrial robot required a great deal of time and effort. Furthermore, to ensure the reliability and accuracy of the generated program, extensive testing and debugging work was required, resulting in a decline in production efficiency. Furthermore, the need for specialized knowledge made it difficult for ordinary factory workers to use.

[1079] 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.

[1080] In this invention, the server includes means for analyzing generated requests and dividing them into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing a final program, means for inputting requests in natural language and generating an operation program for an industrial robot, and means for supplying the final program to a control unit of the robot. This makes it possible to generate an operation program for an industrial robot based on request input in natural language and provide the program quickly and efficiently while maintaining high reliability and accuracy.

[1081] A "generated request" is a specific need or instruction that the system extracts by analyzing the desired operation or function input by the user in natural language.

[1082] "Simple functions" are specific, single tasks or operations that are generated by analyzing the generated requirements and breaking down complex requirements.

[1083] "Test code" is a test program code generated to verify that simple functions work correctly.

[1084] "Implementation code" is program code that is generated based on test code and actually executes simple functions.

[1085] A "program" is software that integrates multiple implementation codes to realize consistent operations and functions that meet user requirements.

[1086] "Input in natural language" means inputting requests or instructions to a system using a language that humans use on a daily basis (for example, Japanese or English).

[1087] An "industrial robot" is a mechanical device used in production sites such as factories to perform various automated tasks.

[1088] A "control unit" is a computer or electronic device that controls the operation of an industrial robot.

[1089] A "generative AI model" is an algorithm that uses artificial intelligence to analyze natural language requirements, break them down into simple functions, and generate test code and implementation code.

[1090] To implement this invention, we need to build a system using a generative AI model. This system consists of the following main components:

[1091] 1. System Components

[1092] 1.1 Terminal

[1093] A terminal is a device that provides an interface for a user to input requests in natural language. Examples include tablets, smartphones, and personal computers.

[1094] 1.2 Server

[1095] The server is a central processing unit on which generative AI models and test-driven development (TDD) tools are installed. It analyzes user requirements, breaks them down into simple functions, generates test code and implementation code based on them, and also executes tests and modifies programs based on the results.

[1096] 1.3 Generative AI Models

[1097] The generative AI model includes algorithms for analyzing user requirements and breaking them down into simple functions, and is capable of generating test code and implementation code for the simple functions.

[1098] 1.4 TDD Tools

[1099] TDD tools are used to run the generated test code and check its accuracy, and if the test fails, the generative AI model uses the results to fix the problem.

[1100] 2. Program Processing

[1101] 2.1 Entering and dividing requirements

[1102] The user inputs the desired function in natural language via the terminal. For example, the user inputs a request such as "I want to pick and inspect products."

[1103] The server uses the generative AI model to analyze the user's request and break it down into simple functions, such as "pick the product from the shelf," "inspect the picked product," and "prepare the inspected product for shipment."

[1104] 2.2 Test Code Generation

[1105] The server uses a generative AI model to generate test code for each simple function. For example, for the task of "picking products from shelves," the server generates test code for "picking the correct product in the correct quantity."

[1106] 2.3 Executing and checking test code

[1107] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[1108] 2.4 Generating Implementation Code

[1109] The server generates implementation code based on the test code, such as control code for a robot arm used for picking and code for processing inspection data obtained from sensors.

[1110] 2.5 Code Integration

[1111] The server then combines the generated implementation code into a single coherent program, resulting in a complete program where each simple function works together.

[1112] 2.6 Program Offering

[1113] The server provides the final program to the robot's control unit, which allows the industrial robot to initiate actions based on user requests.

[1114] 3. Specific Examples

[1115] For example, a requirement to "pick and inspect products" can be broken down into the following simple functions:

[1116] 1. Picking the right product from the shelf: The robot arm's movements are subdivided to pick the correct product from the shelf.

[1117] 2. Inspection of picked products: Sensors are used to check whether the products are correct, and the weight, barcode, etc. are inspected.

[1118] 3. Prepare inspected products for shipment: Move the products to the shipping preparation station and prepare them for shipment.

[1119] An example of a prompt for a generative AI model is:

[1120] "I want to pick and inspect products."

[1121] Request: Please generate specific procedures for picking and inspecting goods.

[1122] 1. Picking products from shelves

[1123] 2. Inspection of picked products

[1124] 3. Inspect the products and prepare them for shipment

[1125] This makes it possible to generate operating programs for industrial robots based on request input in natural language, and to provide programs quickly and efficiently while maintaining high reliability and accuracy.

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

[1127] Step 1:

[1128] The user inputs the desired function in natural language via the terminal. For example, the user inputs a request such as "I want to pick and inspect products." The input data includes the operation details desired by the user. The input request is sent to the server as output.

[1129] Step 2:

[1130] The server analyzes the received user request using a generative AI model and breaks it down into simple functions, such as "picking products," "inspecting the picked products," and "preparing inspected products for shipment." The input data is the user's natural language request, and the output is a list of the broken down simple functions.

[1131] Step 3:

[1132] The server uses a generative AI model to generate test code for each divided simple function. For example, for "picking products," test code is generated to "pick the correct product in the correct quantity." The input data is a list of simple functions, and the generated test code is obtained as the output.

[1133] Step 4:

[1134] The server executes the generated test code and checks its accuracy. Specifically, it runs the test code in a virtual or simulated environment and compares the expected results with the actual results. The input data is the generated test code, and the output is the test results.

[1135] Step 5:

[1136] If the test results are successful, the server generates implementation code based on the test code. For example, it generates operation control code for a robot arm that performs picking, or code to process inspection data obtained from a sensor. The input data is the successful test code, and the output is the implementation code.

[1137] Step 6:

[1138] The server integrates the generated implementation codes into a single coherent program, resulting in a complete program in which each simple function works together. The input data is the implementation code for each simple function, and the output is the integrated program.

[1139] Step 7:

[1140] The server provides the final program to the robot's control unit. The program is then sent to the robot via the network to control its movements. The input data is the integrated program, and the output is the robot's desired behavior.

[1141] 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.

[1142] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. This system enables the generative AI model to consider the user's emotional state and perform optimal, simple function division and code generation in response to requests. As a result, the reliability of the generated code is further improved, enabling it to flexibly and accurately respond to user requests.

[1143] Overall system configuration

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

[1145] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1146] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tool are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[1147] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[1148] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[1149] 5. TDD tools: Tools to run the generated test code and check its correctness.

[1150] Program processing

[1151] Request input and emotion recognition

[1152] Subject: User

[1153] A user inputs the desired function to the system in natural language via a terminal. For example, the user inputs a request such as "I want to create a system with a user authentication function."

[1154] Subject: Server

[1155] The server uses an emotion engine to analyze the emotions contained in the user's input. The emotion engine optimizes the generated request based on the user's emotional state. For example, if the user is expressing impatience, it converts the request into a simpler, more intuitive form.

[1156] Parsing and Decomposing Requirements

[1157] Subject: Server

[1158] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, such as a user authentication function divided into a "user registration function," a "login function," and an "authority check function."

[1159] Test code generation

[1160] Subject: Server

[1161] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," test code is generated for "validating user data" and "saving it to the database."

[1162] Run and check the test code

[1163] Subject: Server

[1164] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[1165] Generating implementation code

[1166] Subject: Server

[1167] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database, using a generative AI model.

[1168] Code Integration

[1169] Subject: Server

[1170] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1171] Program Offering

[1172] Subject: Server

[1173] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1174] Specific examples

[1175] For example, if the emotion engine detects a sense of impatience in the user's input for a request to "create a system with a user authentication function," the request will be optimized into a simpler and more intuitive form. Specifically, the request will be divided into simple functions such as "user registration function," "login function," and "authority check function."

[1176] 1. User registration function: Enters and validates user data and saves the data in the database.

[1177] 2. Login function: Uses registered user data to verify the correct user.

[1178] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[1179] In this way, by combining emotion engines, it becomes possible to respond flexibly while taking into account the user's emotional state, and more appropriate and accurate programs can be generated.

[1180] The above is an embodiment of the present invention. This system further improves the reliability of code generation by the generative AI model, and can provide optimal code that meets user requirements.

[1181] The processing flow will be explained below.

[1182] Step 1:

[1183] Subject: User

[1184] A user inputs the desired function to the system in natural language via a terminal. For example, a user may input a request such as "I want to create a system with a user authentication function."

[1185] Step 2:

[1186] Subject: Server

[1187] The server uses an emotion engine to analyze the emotion from the user's input. The emotion engine analyzes the emotional nuances of the input text and recognizes whether the user is in an emotional state, such as impatience, excitement, satisfaction, or doubt. For example, if the user's input contains impatience, the system will adjust the request accordingly.

[1188] Step 3:

[1189] Subject: Server

[1190] The server uses a generative AI model to analyze the user's request and break it down into simple functions, such as dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[1191] Step 4:

[1192] Subject: Server

[1193] The server generates appropriate test code for each simple function. Using a generative AI model, it creates test code to verify each simple function. For example, as test code for a "user registration function," it generates test code for "validating user data" and "saving to the database."

[1194] Step 5:

[1195] Subject: Server

[1196] The server runs the generated test code and checks its accuracy. If the test results are not as expected, the generative AI model is used again to fix the issues and generate new test code. This feedback process results in highly accurate test code.

[1197] Step 6:

[1198] Subject: Server

[1199] The server generates implementation code based on the test code. For each simple function, it generates code for, for example, "validating user data" or "saving to database".

[1200] Step 7:

[1201] Subject: Server

[1202] The server integrates the generated implementation code into a single, consistent program. For example, to implement a "user authentication function," it integrates the implementation code for a "user registration function," a "login function," and a "authority check function."

[1203] Step 8:

[1204] Subject: Server

[1205] The server then provides the final program to the user's device, where the user can download the program and use it in a real environment. In this way, the system of the present invention can generate accurate code that meets the user's requirements while taking into account the user's emotional state.

[1206] Example 2

[1207] 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."

[1208] Conventional test-driven development (TDD) tools do not take the user's emotional state into account when analyzing user requirements, breaking them down into simple functions, and generating test code and implementation code. As a result, if the requirements entered by the user are vague or influenced by emotions, the accuracy of the analysis and the reliability of the generated code may be reduced. Furthermore, there are insufficient means for properly analyzing requirements entered in natural language and providing optimal feedback. The present invention aims to solve these problems and provide a system that generates more flexible and accurate code by taking the user's emotional state into account.

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

[1210] In this invention, the server includes: means for a user to input requests in natural language; means for recognizing the user's emotional state and optimizing the requests; means for analyzing the generated requests and dividing them into simple functions; means for generating test code for the divided simple functions using a generative AI model; means for executing the generated test code and checking its accuracy; means for executing a regeneration process based on the feedback; means for generating implementation code based on the test code; means for integrating multiple implementation codes into a single program; and means for providing the final program. This enables request analysis and code generation that take the user's emotional state into consideration, improving the reliability and adaptability of the generated code.

[1211] A "requirement" refers to a function or operation that a user wants to achieve from a system, expressed in natural language.

[1212] "Emotional state" refers to the psychological state analyzed from the user's input and behavior, and includes, for example, feelings of impatience and anticipation.

[1213] A "generative AI model" refers to an artificial intelligence algorithm that analyzes user requirements, breaks them down into simple functions, and generates test code and implementation code for each function.

[1214] "Natural language" refers to a language used in everyday conversation, such as Japanese or English, rather than a programming language.

[1215] "Optimization" refers to converting the content of a request into a more appropriate and specific form, taking into account the user's emotional state and the specific content of the request.

[1216] "Test code" refers to code used to check whether the generated functions work correctly.

[1217] "Implementation code" refers to code for building functions that actually work based on user requests.

[1218] "Feedback" refers to information that allows a system or generative AI model to improve or adjust based on test results or analysis results.

[1219] "Simple functionality" refers to specific subtasks or subfunctions that result from analyzing and breaking down requirements.

[1220] A "program" refers to a consistent set of code that integrates multiple generated implementation codes to achieve the intended function as a whole.

[1221] The "server" refers to the central processing unit on which the generative AI model, emotion engine, and TDD tool are installed, and which is responsible for processing requests from users.

[1222] A "terminal" is a device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1223] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. This system enables the generative AI model to consider the user's emotional state and perform optimal, simple function division and code generation in response to requests. As a result, the reliability of the generated code is further improved, enabling it to flexibly and accurately respond to user requests.

[1224] Overall system configuration

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

[1226] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1227] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tool are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[1228] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[1229] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[1230] 5. TDD tools: Tools to run the generated test code and check its correctness.

[1231] Program processing

[1232] Request input and emotion recognition

[1233] Subject: User

[1234] A user inputs the desired function to the system in natural language via a terminal. For example, a request such as "I want to create a system with a user authentication function" is input into the text input field of the terminal.

[1235] Emotion analysis

[1236] Subject: Server

[1237] The server receives the user's input and analyzes the user's emotional state using an emotion engine. Based on the analysis, the server optimizes the request.

[1238] Parsing and Decomposing Requirements

[1239] Subject: Server

[1240] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, for example, dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[1241] Test code generation

[1242] Subject: Server

[1243] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," it generates test code for "validating user data" and "saving it to the database."

[1244] Run and check the test code

[1245] Subject: Server

[1246] The server runs the generated test code to verify its accuracy. If the test fails during this process, it goes through the generation process again to fix the problem.

[1247] Generating implementation code

[1248] Subject: Server

[1249] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database, using a generative AI model.

[1250] Code Integration

[1251] Subject: Server

[1252] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1253] Program Offering

[1254] Subject: Server

[1255] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1256] Specific examples

[1257] For example, if the emotion engine detects a sense of impatience in the user's input for a request to "create a system with a user authentication function," the request will be optimized into a simpler and more intuitive form. Specifically, the request will be divided into simple functions such as "user registration function," "login function," and "authority check function."

[1258] 1. User registration function: Enters and validates user data and saves the data in the database.

[1259] 2. Login function: Uses registered user data to verify the correct user.

[1260] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[1261] Prompt Sentence Examples

[1262] The following is an example of a prompt sentence that can be input to a generative AI model to express a request such as "I want to create a system with user authentication functionality."

[1263] We want to create a system with user authentication functions, including user registration, login, and authorization check functions, and optimize these requirements based on the analysis of the user's emotional state.

[1264] This concludes the detailed description of the "Mode for Carrying Out the Invention." This system further improves the reliability of code generation by generative AI models, enabling the provision of optimal code that meets user requirements.

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

[1266] Step 1: User Request Input

[1267] Subject: User

[1268] The user operates the terminal and inputs the functions they want to realize into the system in natural language. The input is in text format and is sent to the server by pressing the send button.

[1269] Input: A user's request written in natural language (e.g., "I want to create a system with user authentication functionality.")

[1270] Output: Request data sent to the server in text format

[1271] Specific operation: The user uses the terminal keyboard to type "I would like to create a system with user authentication function" and clicks the send button.

[1272] Step 2: Sentiment Analysis

[1273] Subject: Server

[1274] The server receives the user's input and analyzes the user's emotional state using an emotion engine that analyzes the user's input text to identify the emotional state and optimize the request.

[1275] Input: User's text request

[1276] Output: Analyzed emotional state and optimized request

[1277] Specific operation: The server sends the received text to the emotion engine, which analyzes the user's impatience and expectations and optimizes the request.

[1278] Step 3: Parsing and splitting the request

[1279] Subject: Server

[1280] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, for example, dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[1281] Input: Optimized request

[1282] Output: Requirements broken down into simple functions

[1283] Specific operation: The generative AI model analyzes the input request and divides the "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[1284] Step 4: Generate test code

[1285] Subject: Server

[1286] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," it generates test code for "validating user data" and "saving it to the database."

[1287] Input: Requirements broken down into simple features

[1288] Output: Generated test code

[1289] Specific operation: The generative AI model generates test code for the "user registration function" using pytest, a Python unit testing framework.

[1290] Step 5: Run and check the test code

[1291] Subject: Server

[1292] The server runs the generated test code to verify its accuracy. If the test fails during this process, it goes through the generation process again to fix the problem.

[1293] Input: Generated test code

[1294] Output: Test execution result (success / failure)

[1295] How it works: The server runs the generated test code, evaluates the results, and if any tests fail, sends feedback to the generative AI model, which then regenerates the corrected test code.

[1296] Step 6: Generate implementation code

[1297] Subject: Server

[1298] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database.

[1299] Input: Test code

[1300] Output: Generated implementation code

[1301] Specific operation: Based on the test code, the generative AI model generates implementation code to process user data using Python's Flask framework.

[1302] Step 7: Integrating the Code

[1303] Subject: Server

[1304] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1305] Input: Implementation code

[1306] Output: Integrated program

[1307] What it does: The server aggregates each endpoint of your Flask application and creates a code file with the overall application structure.

[1308] Step 8: Program Delivery

[1309] Subject: Server

[1310] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1311] Input: Integrated Program

[1312] Output: The program file that is delivered to the user's device.

[1313] Specific operation: The server compresses the generated program into a ZIP file and provides a download link to the user. The user clicks the link to download the file.

[1314] (Application example 2)

[1315] 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."

[1316] Conventional code generation systems using generative AI models do not take into account the user's emotional state when generating code, resulting in a poor user experience. In particular, content creation support tools often have problems where the generated content does not match the user's emotional state, necessitating frequent revisions and regeneration. This increases the user's psychological burden and makes it difficult to work efficiently.

[1317] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for analyzing the generated request and dividing it into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing the final program, means for analyzing the user's emotional state regarding the generated request in real time, and means for optimizing the dividing means and generating means based on the analyzed emotional state. This makes it possible to generate optimal code and content according to the user's emotional state, thereby improving the user experience and work efficiency.

[1318] "Means for analyzing generated requirements and breaking them down into simple functions" refers to a device or program that analyzes the requirements entered by the user and executes the process of breaking them down into the basic functions required to realize those requirements.

[1319] The "means for generating test code for the divided simple functions" is a device or program that automatically generates test code corresponding to each divided basic function.

[1320] "Means for executing the generated test code and verifying its accuracy" refers to a device or program that actually executes the generated test code and verifies whether its behavior is as expected.

[1321] The "means for generating implementation code based on test code" refers to a device or program that creates code for implementing the corresponding actual function based on test code whose accuracy has been confirmed.

[1322] "Means for integrating multiple implementation codes into a single program" refers to a device or program that integrates multiple implementation codes that were created individually into a single integrated program, allowing them to work together.

[1323] The "means for providing the final program" refers to a device or program that provides the completed program to the user.

[1324] The "means for analyzing the user's emotional state in response to the generated request in real time" refers to a device or program that detects and analyzes the user's emotions in response to the request input by the user in real time.

[1325] The "means for optimizing the splitting means and generation means based on the analyzed emotional state" refers to a device or program that optimizes the request splitting method and code generation method according to the detected and analyzed user emotions.

[1326] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. Specific embodiments for realizing this system are described below.

[1327] System configuration

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

[1329] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1330] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tools are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[1331] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[1332] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[1333] 5. TDD tools: Tools to run the generated test code and check its correctness.

[1334] System Operation

[1335] 1. Request input and emotion recognition

[1336] A user inputs the desired function to the system in natural language via a terminal. For example, in a content distribution service, a user inputs a request such as "I want to create a blog post about a new lifestyle." The server uses an emotion engine to analyze the emotion contained in the user's input. The emotion engine optimizes the generated request based on the user's emotional state. For example, if the user expresses happiness, the request will be converted to more positive content.

[1337] 2. Analyzing and Decomposing Requirements

[1338] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, such as breaking down a blog post function into simple functions like "create introduction," "create body," and "insert image."

[1339] 3. Test Code Generation

[1340] The server generates test code for each simple function using a generative AI model. For example, for "creating an introduction," it generates "grammar check for the introduction" and "test code for the flow of the introduction."

[1341] 4. Run and check the test code

[1342] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[1343] 5. Generating the implementation code

[1344] The server generates the corresponding implementation code based on the test code, for example, the implementation code corresponding to the automatic generation of the introduction and main text. This code generation is also performed using a generative AI model.

[1345] 6. Code Integration

[1346] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1347] 7. Program Offering

[1348] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1349] Hardware and software used

[1350] Hardware: Smartphone (user device), server

[1351] Software: NLTK (sentiment analysis), OpenAI GPT-3 (generative AI model), test-driven development tools

[1352] Examples and prompts

[1353] For example, if the emotion engine detects a feeling of happiness in response to a request to "create a blog post about a new lifestyle," the specific prompt might look like this:

[1354] Prompt statement:

[1355] "I want to create a fun blog post about a new lifestyle."

[1356] This system can provide optimal content according to the user's emotional state, improving the user experience and increasing work efficiency.

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

[1358] Step 1: Entering the request

[1359] Users input the desired functions to the system in natural language via a terminal. For example, they can input a request such as "I want to create a blog post about a new lifestyle."

[1360] Input: User's natural language request

[1361] Output: The requested text entered

[1362] Specific actions

[1363] The terminal receives text input from the user and transmits it to the server.

[1364] Step 2: Emotion Recognition

[1365] The server inputs the received request text into the emotion engine and analyzes the user's emotional state in real time, for example, detecting whether the user is expressing happiness from the request text.

[1366] Input: User requested text

[1367] Output: User's emotional data (e.g., happiness)

[1368] Specific actions

[1369] The server uses NLTK (a sentiment analysis library) to analyze the sentiment contained in the request text.

[1370] Step 3: Parsing and splitting the request

[1371] The server uses a generative AI model to split requests into simple functions based on the analyzed sentiment data and the request text, for example, splitting a request to create a blog post into simple functions such as "create introduction," "create body," and "insert image."

[1372] Input: User request text and emotion data

[1373] Output: A simple split feature list

[1374] Specific actions

[1375] The server uses a generative AI model (e.g., GPT-3) to parse the request text and break it down into simple features.

[1376] Step 4: Generate test code

[1377] The server uses a generative AI model to generate test code for each simple function, for example, generating test code for grammar checks for "creating an introduction."

[1378] Input: A simple, split list of features

[1379] Output: Generated test code

[1380] Specific actions

[1381] The server automatically generates test code for each simple function.

[1382] Step 5: Run the test code

[1383] The server runs the generated test code to verify its accuracy, for example by running grammar check test code to verify that the introduction is generated correctly.

[1384] Input: Generated test code

[1385] Output: Test result (success / failure)

[1386] Specific actions

[1387] The server runs the generated test code, records the results, and if it's not successful, goes through the generation process again to fix the problem.

[1388] Step 6: Generate implementation code

[1389] The server generates the corresponding implementation code based on the test code whose accuracy has been confirmed, for example, generating auto-generated code for the introduction section.

[1390] Input: Test code that has been verified for accuracy

[1391] Output: Implementation code

[1392] Specific actions

[1393] The server generates implementation code with actual functionality based on the verified test code.

[1394] Step 7: Integrating the Code

[1395] The server integrates the generated code into a single coherent program, ensuring that each simple function works together.

[1396] Input: Multiple implementation codes

[1397] Output: Integrated program

[1398] Specific actions

[1399] The server integrates each implementation code and compiles it into a single complete program.

[1400] Step 8: Program Delivery

[1401] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1402] Input: Integrated Program

[1403] Output: Provide the program to the user's terminal

[1404] Specific actions

[1405] The server transmits the final program to the user's terminal for download by the user.

[1406] In this way, specific data processing and calculations are performed based on the input data at each step, and the output is used in the next step, making it possible to generate optimal code and content.

[1407] 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.

[1408] 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.

[1409] 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.

[1410] [Fourth embodiment]

[1411] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.

[1412] 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.

[1413] 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).

[1414] 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.

[1415] 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.

[1416] 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).

[1417] 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.

[1418] 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.

[1419] 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.

[1420] 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.

[1421] 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.

[1422] 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.

[1423] 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."

[1424] This invention relates to a test-driven development (TDD) tool system that uses generative AI models, which can improve the reliability of generated code and generate accurate programs that meet user requirements.

[1425] Overall system configuration

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

[1427] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1428] 2. Server: A central processing unit on which the generative AI model and TDD tools are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[1429] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[1430] 4. TDD tools: Tools to run the generated test code and check its correctness.

[1431] Program processing

[1432] Entering and splitting requests

[1433] Subject: User

[1434] A user inputs the desired function in natural language via a terminal. For example, the user inputs a request such as "I want to create a system with a user authentication function."

[1435] Subject: Server

[1436] The server uses a generative AI model to analyze the user's request and divide it into simple functions, such as "user registration function," "login function," and "authority check function."

[1437] Test code generation

[1438] Subject: Server

[1439] The server uses a generative AI model to generate test code for each simple function. For example, for a "user registration function," test code for "validating user data" and "saving data to the database" is generated.

[1440] Run and check the test code

[1441] Subject: Server

[1442] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[1443] Generating implementation code

[1444] Subject: Server

[1445] The server generates the corresponding implementation code based on the test code. For example, it generates code for "validating user data" and code for "saving to database".

[1446] Code Integration

[1447] Subject: Server

[1448] The server then combines the generated implementation code into a single coherent program, resulting in a complete program where each simple function works together.

[1449] Program Offering

[1450] Subject: Server

[1451] The server provides the final program to the user's terminal, where the user can download and use the program.

[1452] Specific examples

[1453] For example, the requirement to "create a system with user authentication functionality" can be broken down into the following simple functions:

[1454] 1. User registration function: Enters and validates user data and saves the data in the database.

[1455] 2. Login function: Uses registered user data to verify the correct user.

[1456] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[1457] In this way, a series of processes produces highly reliable code and provides an accurate program that meets the user's requirements.

[1458] The above is an embodiment of the present invention. This system can significantly improve the reliability of code generation using a generative AI model.

[1459] The processing flow will be explained below.

[1460] Step 1:

[1461] Subject: User

[1462] The user inputs the desired function to the system in natural language via a terminal, for example, "I want to create a system with a user authentication function."

[1463] Step 2:

[1464] Subject: Server

[1465] The server uses a generative AI model to analyze the user's request and divide it into simple functions. For example, it divides the user authentication function into simple functions such as "user registration function," "login function," and "authority check function."

[1466] Step 3:

[1467] Subject: Server

[1468] The server generates appropriate test code for each simple function. Using a generative AI model, it creates test code to verify each simple function. For example, it generates test code for "validating user data" and "saving to a database."

[1469] Step 4:

[1470] Subject: Server

[1471] The server runs the generated test code to verify its accuracy. If the test results are not as expected, a feedback process is used to regenerate the code, ensuring the reliability of the test code.

[1472] Step 5:

[1473] Subject: Server

[1474] The server generates implementation code based on the test code, such as code for validating user data and saving it to a database, using a generative AI model.

[1475] Step 6:

[1476] Subject: Server

[1477] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1478] Step 7:

[1479] Subject: Server

[1480] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1481] Example 1

[1482] 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."

[1483] Conventional test-driven development has the problem that developers manually write test code and then modify the implementation code based on the test results, which is a cumbersome and time-consuming process. Furthermore, there is a lack of technology to directly convert requirements input in natural language into programs, which reduces development efficiency. The purpose of this invention is to solve these problems and improve development efficiency and code reliability by automating the process from requirements to implementation.

[1484] 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.

[1485] In this invention, the server includes means for inputting a request expressed in natural language, means for analyzing the generated request and dividing it into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing the final program, means for analyzing the request using a generative AI model and dividing it into simple functions, means for using prompt statements to generate test code and implementation code, and means for automatically correcting problems and re-executing if the test code fails. This makes it possible to seamlessly generate high-quality programs from natural language.

[1486] "Requirements expressed in natural language" are specifications or functional requirements written by a user in a language-based format.

[1487] The "generated requirements" refer to specific functions and specifications obtained by analyzing the requirements input by the user in natural language.

[1488] "Simple functions" refer to the individual basic functions that are obtained when complex requirements are broken down.

[1489] A "generative AI model" is an artificial intelligence system that uses machine learning algorithms to analyze requirements and generate test code and implementation code.

[1490] "Test code" is verification code that is automatically generated to check whether the functions to be implemented work correctly.

[1491] "Implementation code" refers to the code of an actual program that is generated based on test code.

[1492] "Integration" is the process of combining multiple separate implementations into a single coherent program.

[1493] The "final program" is the complete program that satisfies the user's requirements, obtained after all implementation code has been integrated.

[1494] A "prompt sentence" is an instruction or example sentence that is input into a generative AI model, and test code and implementation code are generated based on this.

[1495] "Feedback" is the process of providing information for next steps and further improvements based on the analysis and test results generated.

[1496] "Test-driven development" is a method of first creating test code and then developing implementation code that passes the tests.

[1497] This invention relates to a test-driven development (TDD) tool system that uses generative AI models. This system aims to improve development efficiency and code reliability by analyzing requirements entered by a user in natural language and automatically generating test code and implementation code.

[1498] System configuration

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

[1500] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program. For example, a PC or smartphone.

[1501] 2. Server: A central processing unit on which the generative AI model and TDD tools are installed. It analyzes user requirements, breaks them down into simple functions, and generates test code and implementation code.

[1502] 3. Generative AI model: Using machine learning algorithms, it analyzes user requirements, breaks them down into simple functions, and automatically generates corresponding test code and implementation code.

[1503] 4. TDD Tools: Tools to run the generated test code and check its accuracy, providing feedback based on test-driven development techniques.

[1504] Detailed program processing

[1505] The user inputs the desired function in natural language via the terminal. For example, they might input, "I want to create a system with user authentication functionality." The server then uses a generative AI model to analyze the input natural language request and divide it into simple functions. For example, it may be divided into "user registration function," "login function," "authority check function," etc.

[1506] The server uses a generative AI model to generate test code for each simple function. For example, for the "user registration function," it generates test code for "validating user data" and "saving to the database." The generated test code is run in a test environment within the server to verify its accuracy. If a test fails, details of the error are recorded in a log file, and the test code generation process is run again. This cycle continues until all tests pass.

[1507] After all tests pass, the server generates the corresponding implementation code. The generative AI model generates implementation code based on the contents of the test code. For example, it may include "validating user data" and "saving to a database." The server integrates the multiple generated implementation codes into a single, consistent program. A version control system (e.g., Git) is often used during the integration process.

[1508] Once the final program is integrated, the server provides it to the user's device, where the user can download and run the program through a dedicated interface. The server also provides documentation of the generated code and test result reports for easy understanding by the user.

[1509] Examples of prompt statements

[1510] Example prompt for breaking down into simple functions:

[1511] "Please create a system with user authentication functions. Specific functions include user registration, login, and authorization check."

[1512] Example prompt for generating test code:

[1513] "Generate test code for the user registration functionality, including tests for validation and saving to the database."

[1514] Example prompt for generating implementation code:

[1515] "Generate the implementation code for the user registration function, including validation and saving to the database."

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

[1517] Step 1:

[1518] User request input

[1519] The user uses the terminal to input the desired function in natural language. This input is done through a text box or voice input. For example, the user might input "I want to create a system with user authentication function." This request (input) is sent from the terminal to the server.

[1520] Step 2:

[1521] Requirement analysis and functional division

[1522] The server uses a generative AI model to analyze the natural language requests sent by the user. This analysis uses NLP (natural language processing) technology to break down the requests into simple functions. For example, the requests are broken down into basic functions such as "user registration function," "login function," and "authority check function." These divided functions (output) are then incorporated into a data structure within the server.

[1523] Step 3:

[1524] Test code generation

[1525] The server uses a generative AI model to generate test code for simple functions obtained through analysis. For example, for a "user registration function," test code is generated for "validating user data" and "saving data to the database." The generated test code (output) is stored in the server's internal storage.

[1526] Step 4:

[1527] Execute test code and check results

[1528] The server executes the saved test code in its own execution environment. During this process, it checks whether each test passes. The test execution results (output) are generated in report format and recorded on the server. If a test fails, error details are written to a log file and the test code generation process is automatically executed again.

[1529] Step 5:

[1530] Generating implementation code

[1531] After all tests pass, the server proceeds to generate the corresponding implementation code. The generative AI model generates implementation code based on the contents of the test code. For example, this includes code for "validating user data" and "saving to the database." The generated implementation code (output) is saved in the server's storage.

[1532] Step 6:

[1533] Integration of implementation code

[1534] The server then integrates the generated implementation code into a single code. To create a coherent program, the code is merged so that each feature works together. This process often uses a version control system (e.g., Git). The integrated program (output) is stored in a repository.

[1535] Step 7:

[1536] Final program delivery

[1537] The server provides the final program to the user's terminal. This program runs completely based on the user's requests. The user can download and run the program through a dedicated interface on the terminal. This final program (output) is sent from the server to the terminal.

[1538] At each step, we clarify how the input data is processed and what output is obtained, and explain the specific operations based on that. This allows you to understand the process of generating the final program from the user's requirements as a series of steps.

[1539] (Application example 1)

[1540] 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."

[1541] With conventional technology, generating an operating program for an industrial robot required a great deal of time and effort. Furthermore, to ensure the reliability and accuracy of the generated program, extensive testing and debugging work was required, resulting in a decline in production efficiency. Furthermore, the need for specialized knowledge made it difficult for ordinary factory workers to use.

[1542] 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.

[1543] In this invention, the server includes means for analyzing generated requests and dividing them into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing a final program, means for inputting requests in natural language and generating an operation program for an industrial robot, and means for supplying the final program to a control unit of the robot. This makes it possible to generate an operation program for an industrial robot based on request input in natural language and provide the program quickly and efficiently while maintaining high reliability and accuracy.

[1544] A "generated request" is a specific need or instruction that the system extracts by analyzing the desired operation or function input by the user in natural language.

[1545] "Simple functions" are specific, single tasks or operations that are generated by analyzing the generated requirements and breaking down complex requirements.

[1546] "Test code" is a test program code generated to verify that simple functions work correctly.

[1547] "Implementation code" is program code that is generated based on test code and actually executes simple functions.

[1548] A "program" is software that integrates multiple implementation codes to realize consistent operations and functions that meet user requirements.

[1549] "Input in natural language" means inputting requests or instructions to a system using a language that humans use on a daily basis (for example, Japanese or English).

[1550] An "industrial robot" is a mechanical device used in production sites such as factories to perform various automated tasks.

[1551] A "control unit" is a computer or electronic device that controls the operation of an industrial robot.

[1552] A "generative AI model" is an algorithm that uses artificial intelligence to analyze natural language requirements, break them down into simple functions, and generate test code and implementation code.

[1553] To implement this invention, we need to build a system using a generative AI model. This system consists of the following main components:

[1554] 1. System Components

[1555] 1.1 Terminal

[1556] A terminal is a device that provides an interface for a user to input requests in natural language. Examples include tablets, smartphones, and personal computers.

[1557] 1.2 Server

[1558] The server is a central processing unit on which generative AI models and test-driven development (TDD) tools are installed. It analyzes user requirements, breaks them down into simple functions, generates test code and implementation code based on them, and also executes tests and modifies programs based on the results.

[1559] 1.3 Generative AI Models

[1560] The generative AI model includes algorithms for analyzing user requirements and breaking them down into simple functions, and is capable of generating test code and implementation code for the simple functions.

[1561] 1.4 TDD Tools

[1562] TDD tools are used to run the generated test code and check its accuracy, and if the test fails, the generative AI model uses the results to fix the problem.

[1563] 2. Program Processing

[1564] 2.1 Entering and dividing requirements

[1565] The user inputs the desired function in natural language via the terminal. For example, the user inputs a request such as "I want to pick and inspect products."

[1566] The server uses the generative AI model to analyze the user's request and break it down into simple functions, such as "pick the product from the shelf," "inspect the picked product," and "prepare the inspected product for shipment."

[1567] 2.2 Test Code Generation

[1568] The server uses a generative AI model to generate test code for each simple function. For example, for the task of "picking products from shelves," the server generates test code for "picking the correct product in the correct quantity."

[1569] 2.3 Executing and checking test code

[1570] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[1571] 2.4 Generating Implementation Code

[1572] The server generates implementation code based on the test code, such as control code for a robot arm used for picking and code for processing inspection data obtained from sensors.

[1573] 2.5 Code Integration

[1574] The server then combines the generated implementation code into a single coherent program, resulting in a complete program where each simple function works together.

[1575] 2.6 Program Offering

[1576] The server provides the final program to the robot's control unit, which allows the industrial robot to initiate actions based on user requests.

[1577] 3. Specific Examples

[1578] For example, a requirement to "pick and inspect products" can be broken down into the following simple functions:

[1579] 1. Picking the right product from the shelf: The robot arm's movements are subdivided to pick the correct product from the shelf.

[1580] 2. Inspection of picked products: Sensors are used to check whether the products are correct, and the weight, barcode, etc. are inspected.

[1581] 3. Prepare inspected products for shipment: Move the products to the shipping preparation station and prepare them for shipment.

[1582] An example of a prompt for a generative AI model is:

[1583] "I want to pick and inspect products."

[1584] Request: Please generate specific procedures for picking and inspecting goods.

[1585] 1. Picking products from shelves

[1586] 2. Inspection of picked products

[1587] 3. Inspect the products and prepare them for shipment

[1588] This makes it possible to generate operating programs for industrial robots based on request input in natural language, and to provide programs quickly and efficiently while maintaining high reliability and accuracy.

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

[1590] Step 1:

[1591] The user inputs the desired function in natural language via the terminal. For example, the user inputs a request such as "I want to pick and inspect products." The input data includes the operation details desired by the user. The input request is sent to the server as output.

[1592] Step 2:

[1593] The server analyzes the received user request using a generative AI model and breaks it down into simple functions, such as "picking products," "inspecting the picked products," and "preparing inspected products for shipment." The input data is the user's natural language request, and the output is a list of the broken down simple functions.

[1594] Step 3:

[1595] The server uses a generative AI model to generate test code for each divided simple function. For example, for "picking products," test code is generated to "pick the correct product in the correct quantity." The input data is a list of simple functions, and the generated test code is obtained as the output.

[1596] Step 4:

[1597] The server executes the generated test code and checks its accuracy. Specifically, it runs the test code in a virtual or simulated environment and compares the expected results with the actual results. The input data is the generated test code, and the output is the test results.

[1598] Step 5:

[1599] If the test results are successful, the server generates implementation code based on the test code. For example, it generates operation control code for a robot arm that performs picking, or code to process inspection data obtained from a sensor. The input data is the successful test code, and the output is the implementation code.

[1600] Step 6:

[1601] The server integrates the generated implementation codes into a single coherent program, resulting in a complete program in which each simple function works together. The input data is the implementation code for each simple function, and the output is the integrated program.

[1602] Step 7:

[1603] The server provides the final program to the robot's control unit. The program is then sent to the robot via the network to control its movements. The input data is the integrated program, and the output is the robot's desired behavior.

[1604] 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.

[1605] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. This system enables the generative AI model to consider the user's emotional state and perform optimal, simple function division and code generation in response to requests. As a result, the reliability of the generated code is further improved, enabling it to flexibly and accurately respond to user requests.

[1606] Overall system configuration

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

[1608] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1609] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tool are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[1610] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[1611] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[1612] 5. TDD tools: Tools to run the generated test code and check its correctness.

[1613] Program processing

[1614] Request input and emotion recognition

[1615] Subject: User

[1616] A user inputs the desired function to the system in natural language via a terminal. For example, the user inputs a request such as "I want to create a system with a user authentication function."

[1617] Subject: Server

[1618] The server uses an emotion engine to analyze the emotions contained in the user's input. The emotion engine optimizes the generated request based on the user's emotional state. For example, if the user is expressing impatience, it converts the request into a simpler, more intuitive form.

[1619] Parsing and Decomposing Requirements

[1620] Subject: Server

[1621] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, such as a user authentication function divided into a "user registration function," a "login function," and an "authority check function."

[1622] Test code generation

[1623] Subject: Server

[1624] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," test code is generated for "validating user data" and "saving it to the database."

[1625] Run and check the test code

[1626] Subject: Server

[1627] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[1628] Generating implementation code

[1629] Subject: Server

[1630] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database, using a generative AI model.

[1631] Code Integration

[1632] Subject: Server

[1633] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1634] Program Offering

[1635] Subject: Server

[1636] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1637] Specific examples

[1638] For example, if the emotion engine detects a sense of impatience in the user's input for a request to "create a system with a user authentication function," the request will be optimized into a simpler and more intuitive form. Specifically, the request will be divided into simple functions such as "user registration function," "login function," and "authority check function."

[1639] 1. User registration function: Enters and validates user data and saves the data in the database.

[1640] 2. Login function: Uses registered user data to verify the correct user.

[1641] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[1642] In this way, by combining emotion engines, it becomes possible to respond flexibly while taking into account the user's emotional state, and more appropriate and accurate programs can be generated.

[1643] The above is an embodiment of the present invention. This system further improves the reliability of code generation by the generative AI model, and can provide optimal code that meets user requirements.

[1644] The processing flow will be explained below.

[1645] Step 1:

[1646] Subject: User

[1647] A user inputs the desired function to the system in natural language via a terminal. For example, a user may input a request such as "I want to create a system with a user authentication function."

[1648] Step 2:

[1649] Subject: Server

[1650] The server uses an emotion engine to analyze the emotion from the user's input. The emotion engine analyzes the emotional nuances of the input text and recognizes whether the user is in an emotional state, such as impatience, excitement, satisfaction, or doubt. For example, if the user's input contains impatience, the system will adjust the request accordingly.

[1651] Step 3:

[1652] Subject: Server

[1653] The server uses a generative AI model to analyze the user's request and break it down into simple functions, such as dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[1654] Step 4:

[1655] Subject: Server

[1656] The server generates appropriate test code for each simple function. Using a generative AI model, it creates test code to verify each simple function. For example, as test code for a "user registration function," it generates test code for "validating user data" and "saving to the database."

[1657] Step 5:

[1658] Subject: Server

[1659] The server runs the generated test code and checks its accuracy. If the test results are not as expected, the generative AI model is used again to fix the issues and generate new test code. This feedback process results in highly accurate test code.

[1660] Step 6:

[1661] Subject: Server

[1662] The server generates implementation code based on the test code. For each simple function, it generates code for, for example, "validating user data" or "saving to database".

[1663] Step 7:

[1664] Subject: Server

[1665] The server integrates the generated implementation code into a single, consistent program. For example, to implement a "user authentication function," it integrates the implementation code for a "user registration function," a "login function," and a "authority check function."

[1666] Step 8:

[1667] Subject: Server

[1668] The server then provides the final program to the user's device, where the user can download the program and use it in a real environment. In this way, the system of the present invention can generate accurate code that meets the user's requirements while taking into account the user's emotional state.

[1669] Example 2

[1670] 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."

[1671] Conventional test-driven development (TDD) tools do not take the user's emotional state into account when analyzing user requirements, breaking them down into simple functions, and generating test code and implementation code. As a result, if the requirements entered by the user are vague or influenced by emotions, the accuracy of the analysis and the reliability of the generated code may be reduced. Furthermore, there are insufficient means for properly analyzing requirements entered in natural language and providing optimal feedback. The present invention aims to solve these problems and provide a system that generates more flexible and accurate code by taking the user's emotional state into account.

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

[1673] In this invention, the server includes: means for a user to input requests in natural language; means for recognizing the user's emotional state and optimizing the requests; means for analyzing the generated requests and dividing them into simple functions; means for generating test code for the divided simple functions using a generative AI model; means for executing the generated test code and checking its accuracy; means for executing a regeneration process based on the feedback; means for generating implementation code based on the test code; means for integrating multiple implementation codes into a single program; and means for providing the final program. This enables request analysis and code generation that take the user's emotional state into consideration, improving the reliability and adaptability of the generated code.

[1674] A "requirement" refers to a function or operation that a user wants to achieve from a system, expressed in natural language.

[1675] "Emotional state" refers to the psychological state analyzed from the user's input and behavior, and includes, for example, feelings of impatience and anticipation.

[1676] A "generative AI model" refers to an artificial intelligence algorithm that analyzes user requirements, breaks them down into simple functions, and generates test code and implementation code for each function.

[1677] "Natural language" refers to a language used in everyday conversation, such as Japanese or English, rather than a programming language.

[1678] "Optimization" refers to converting the content of a request into a more appropriate and specific form, taking into account the user's emotional state and the specific content of the request.

[1679] "Test code" refers to code used to check whether the generated functions work correctly.

[1680] "Implementation code" refers to code for building functions that actually work based on user requests.

[1681] "Feedback" refers to information that allows a system or generative AI model to improve or adjust based on test results or analysis results.

[1682] "Simple functionality" refers to specific subtasks or subfunctions that result from analyzing and breaking down requirements.

[1683] A "program" refers to a consistent set of code that integrates multiple generated implementation codes to achieve the intended function as a whole.

[1684] The "server" refers to the central processing unit on which the generative AI model, emotion engine, and TDD tool are installed, and which is responsible for processing requests from users.

[1685] A "terminal" is a device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1686] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. This system enables the generative AI model to consider the user's emotional state and perform optimal, simple function division and code generation in response to requests. As a result, the reliability of the generated code is further improved, enabling it to flexibly and accurately respond to user requests.

[1687] Overall system configuration

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

[1689] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1690] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tool are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[1691] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[1692] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[1693] 5. TDD tools: Tools to run the generated test code and check its correctness.

[1694] Program processing

[1695] Request input and emotion recognition

[1696] Subject: User

[1697] A user inputs the desired function to the system in natural language via a terminal. For example, a request such as "I want to create a system with a user authentication function" is input into the text input field of the terminal.

[1698] Emotion analysis

[1699] Subject: Server

[1700] The server receives the user's input and analyzes the user's emotional state using an emotion engine. Based on the analysis, the server optimizes the request.

[1701] Parsing and Decomposing Requirements

[1702] Subject: Server

[1703] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, for example, dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[1704] Test code generation

[1705] Subject: Server

[1706] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," it generates test code for "validating user data" and "saving it to the database."

[1707] Run and check the test code

[1708] Subject: Server

[1709] The server runs the generated test code to verify its accuracy. If the test fails during this process, it goes through the generation process again to fix the problem.

[1710] Generating implementation code

[1711] Subject: Server

[1712] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database, using a generative AI model.

[1713] Code Integration

[1714] Subject: Server

[1715] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1716] Program Offering

[1717] Subject: Server

[1718] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1719] Specific examples

[1720] For example, if the emotion engine detects a sense of impatience in the user's input for a request to "create a system with a user authentication function," the request will be optimized into a simpler and more intuitive form. Specifically, the request will be divided into simple functions such as "user registration function," "login function," and "authority check function."

[1721] 1. User registration function: Enters and validates user data and saves the data in the database.

[1722] 2. Login function: Uses registered user data to verify the correct user.

[1723] 3. Authority check function: When performing a specific operation, it checks whether the user has the necessary authority.

[1724] Prompt Sentence Examples

[1725] The following is an example of a prompt sentence that can be input to a generative AI model to express a request such as "I want to create a system with user authentication functionality."

[1726] We want to create a system with user authentication functions, including user registration, login, and authorization check functions, and optimize these requirements based on the analysis of the user's emotional state.

[1727] This concludes the detailed description of the "Mode for Carrying Out the Invention." This system further improves the reliability of code generation by generative AI models, enabling the provision of optimal code that meets user requirements.

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

[1729] Step 1: User Request Input

[1730] Subject: User

[1731] The user operates the terminal and inputs the functions they want to realize into the system in natural language. The input is in text format and is sent to the server by pressing the send button.

[1732] Input: A user's request written in natural language (e.g., "I want to create a system with user authentication functionality.")

[1733] Output: Request data sent to the server in text format

[1734] Specific operation: The user uses the terminal keyboard to type "I would like to create a system with user authentication function" and clicks the send button.

[1735] Step 2: Sentiment Analysis

[1736] Subject: Server

[1737] The server receives the user's input and analyzes the user's emotional state using an emotion engine that analyzes the user's input text to identify the emotional state and optimize the request.

[1738] Input: User's text request

[1739] Output: Analyzed emotional state and optimized request

[1740] Specific operation: The server sends the received text to the emotion engine, which analyzes the user's impatience and expectations and optimizes the request.

[1741] Step 3: Parsing and splitting the request

[1742] Subject: Server

[1743] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, for example, dividing a "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[1744] Input: Optimized request

[1745] Output: Requirements broken down into simple functions

[1746] Specific operation: The generative AI model analyzes the input request and divides the "user authentication function" into a "user registration function," a "login function," and an "authority check function."

[1747] Step 4: Generate test code

[1748] Subject: Server

[1749] The server generates test code for each simple function using a generative AI model. For example, for a "user registration function," it generates test code for "validating user data" and "saving it to the database."

[1750] Input: Requirements broken down into simple features

[1751] Output: Generated test code

[1752] Specific operation: The generative AI model generates test code for the "user registration function" using pytest, a Python unit testing framework.

[1753] Step 5: Run and check the test code

[1754] Subject: Server

[1755] The server runs the generated test code to verify its accuracy. If the test fails during this process, it goes through the generation process again to fix the problem.

[1756] Input: Generated test code

[1757] Output: Test execution result (success / failure)

[1758] How it works: The server runs the generated test code, evaluates the results, and if any tests fail, sends feedback to the generative AI model, which then regenerates the corrected test code.

[1759] Step 6: Generate implementation code

[1760] Subject: Server

[1761] The server generates the corresponding implementation code based on the test code, for example, the code for validating user data and saving it to a database.

[1762] Input: Test code

[1763] Output: Generated implementation code

[1764] Specific operation: Based on the test code, the generative AI model generates implementation code to process user data using Python's Flask framework.

[1765] Step 7: Integrating the Code

[1766] Subject: Server

[1767] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1768] Input: Implementation code

[1769] Output: Integrated program

[1770] What it does: The server aggregates each endpoint of your Flask application and creates a code file with the overall application structure.

[1771] Step 8: Program Delivery

[1772] Subject: Server

[1773] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1774] Input: Integrated Program

[1775] Output: The program file that is delivered to the user's device.

[1776] Specific operation: The server compresses the generated program into a ZIP file and provides a download link to the user. The user clicks the link to download the file.

[1777] (Application example 2)

[1778] 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."

[1779] Conventional code generation systems using generative AI models do not take into account the user's emotional state when generating code, resulting in a poor user experience. In particular, content creation support tools often have problems where the generated content does not match the user's emotional state, necessitating frequent revisions and regeneration. This increases the user's psychological burden and makes it difficult to work efficiently.

[1780] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for analyzing the generated request and dividing it into simple functions, means for generating test code for the divided simple functions, means for executing the generated test code and checking its accuracy, means for generating implementation code based on the test code, means for integrating multiple implementation codes into a single program, means for providing the final program, means for analyzing the user's emotional state regarding the generated request in real time, and means for optimizing the dividing means and generating means based on the analyzed emotional state. This makes it possible to generate optimal code and content according to the user's emotional state, thereby improving the user experience and work efficiency.

[1781] "Means for analyzing generated requirements and breaking them down into simple functions" refers to a device or program that analyzes the requirements entered by the user and executes the process of breaking them down into the basic functions required to realize those requirements.

[1782] The "means for generating test code for the divided simple functions" is a device or program that automatically generates test code corresponding to each divided basic function.

[1783] "Means for executing the generated test code and verifying its accuracy" refers to a device or program that actually executes the generated test code and verifies whether its behavior is as expected.

[1784] The "means for generating implementation code based on test code" refers to a device or program that creates code for implementing the corresponding actual function based on test code whose accuracy has been confirmed.

[1785] "Means for integrating multiple implementation codes into a single program" refers to a device or program that integrates multiple implementation codes that were created individually into a single integrated program, allowing them to work together.

[1786] The "means for providing the final program" refers to a device or program that provides the completed program to the user.

[1787] The "means for analyzing the user's emotional state in response to the generated request in real time" refers to a device or program that detects and analyzes the user's emotions in response to the request input by the user in real time.

[1788] The "means for optimizing the splitting means and generation means based on the analyzed emotional state" refers to a device or program that optimizes the request splitting method and code generation method according to the detected and analyzed user emotions.

[1789] This invention relates to a system that combines a test-driven development (TDD) tool using a generative AI model with an emotion engine that recognizes user emotions. Specific embodiments for realizing this system are described below.

[1790] System configuration

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

[1792] 1. Terminal: A device operated by a user that provides an interface for inputting requests to the system and receiving the final program.

[1793] 2. Server: A central processing unit on which the generative AI model, emotion engine, and TDD tools are installed. It analyzes user requirements, divides them into simple functions, and generates test code and implementation code based on them.

[1794] 3. Generative AI model: It includes algorithms that analyze user requirements and break them down into simple functions, and has the ability to generate test code and implementation code for these simple functions.

[1795] 4. Emotion engine: Analyzes user input and real-time emotional state, and uses that data to improve the accuracy of request analysis.

[1796] 5. TDD tools: Tools to run the generated test code and check its correctness.

[1797] System Operation

[1798] 1. Request input and emotion recognition

[1799] A user inputs the desired function to the system in natural language via a terminal. For example, in a content distribution service, a user inputs a request such as "I want to create a blog post about a new lifestyle." The server uses an emotion engine to analyze the emotion contained in the user's input. The emotion engine optimizes the generated request based on the user's emotional state. For example, if the user expresses happiness, the request will be converted to more positive content.

[1800] 2. Analyzing and Decomposing Requirements

[1801] The server uses a generative AI model to analyze the optimized request and break it down into simple functions, such as breaking down a blog post function into simple functions like "create introduction," "create body," and "insert image."

[1802] 3. Test Code Generation

[1803] The server generates test code for each simple function using a generative AI model. For example, for "creating an introduction," it generates "grammar check for the introduction" and "test code for the flow of the introduction."

[1804] 4. Run and check the test code

[1805] The server runs the generated test code to verify its accuracy, and if the test fails during this process, it goes through the generation process again to fix the problem.

[1806] 5. Generating the implementation code

[1807] The server generates the corresponding implementation code based on the test code, for example, the implementation code corresponding to the automatic generation of the introduction and main text. This code generation is also performed using a generative AI model.

[1808] 6. Code Integration

[1809] The server integrates the generated code into a single coherent program, coordinating and integrating the code so that each simple function works together.

[1810] 7. Program Offering

[1811] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1812] Hardware and software used

[1813] Hardware: Smartphone (user device), server

[1814] Software: NLTK (sentiment analysis), OpenAI GPT-3 (generative AI model), test-driven development tools

[1815] Examples and prompts

[1816] For example, if the emotion engine detects a feeling of happiness in response to a request to "create a blog post about a new lifestyle," the specific prompt might look like this:

[1817] Prompt statement:

[1818] "I want to create a fun blog post about a new lifestyle."

[1819] This system can provide optimal content according to the user's emotional state, improving the user experience and increasing work efficiency.

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

[1821] Step 1: Entering the request

[1822] Users input the desired functions to the system in natural language via a terminal. For example, they can input a request such as "I want to create a blog post about a new lifestyle."

[1823] Input: User's natural language request

[1824] Output: The requested text entered

[1825] Specific actions

[1826] The terminal receives text input from the user and transmits it to the server.

[1827] Step 2: Emotion Recognition

[1828] The server inputs the received request text into the emotion engine and analyzes the user's emotional state in real time, for example, detecting whether the user is expressing happiness from the request text.

[1829] Input: User requested text

[1830] Output: User's emotional data (e.g., happiness)

[1831] Specific actions

[1832] The server uses NLTK (a sentiment analysis library) to analyze the sentiment contained in the request text.

[1833] Step 3: Parsing and splitting the request

[1834] The server uses a generative AI model to split requests into simple functions based on the analyzed sentiment data and the request text, for example, splitting a request to create a blog post into simple functions such as "create introduction," "create body," and "insert image."

[1835] Input: User request text and emotion data

[1836] Output: A simple split feature list

[1837] Specific actions

[1838] The server uses a generative AI model (e.g., GPT-3) to parse the request text and break it down into simple features.

[1839] Step 4: Generate test code

[1840] The server uses a generative AI model to generate test code for each simple function, for example, generating test code for grammar checks for "creating an introduction."

[1841] Input: A simple, split list of features

[1842] Output: Generated test code

[1843] Specific actions

[1844] The server automatically generates test code for each simple function.

[1845] Step 5: Run the test code

[1846] The server runs the generated test code to verify its accuracy, for example by running grammar check test code to verify that the introduction is generated correctly.

[1847] Input: Generated test code

[1848] Output: Test result (success / failure)

[1849] Specific actions

[1850] The server runs the generated test code, records the results, and if it's not successful, goes through the generation process again to fix the problem.

[1851] Step 6: Generate implementation code

[1852] The server generates the corresponding implementation code based on the test code whose accuracy has been confirmed, for example, generating auto-generated code for the introduction section.

[1853] Input: Test code that has been verified for accuracy

[1854] Output: Implementation code

[1855] Specific actions

[1856] The server generates implementation code with actual functionality based on the verified test code.

[1857] Step 7: Integrating the Code

[1858] The server integrates the generated code into a single coherent program, ensuring that each simple function works together.

[1859] Input: Multiple implementation codes

[1860] Output: Integrated program

[1861] Specific actions

[1862] The server integrates each implementation code and compiles it into a single complete program.

[1863] Step 8: Program Delivery

[1864] The server then provides the completed program to the user's terminal, where the user can download and use the program.

[1865] Input: Integrated Program

[1866] Output: Provide the program to the user's terminal

[1867] Specific actions

[1868] The server transmits the final program to the user's terminal for download by the user.

[1869] In this way, specific data processing and calculations are performed based on the input data at each step, and the output is used in the next step, making it possible to generate optimal code and content.

[1870] 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.

[1871] 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.

[1872] 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.

[1873] 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.

[1874] FIG. 9 illustrates an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and behaviors arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.

[1875] 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.

[1876] 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).

[1877] 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.

[1878] 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."

[1879] 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.

[1880] 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).

[1881] 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.

[1882] 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.

[1883] 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.

[1884] 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.

[1885] 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.

[1886] 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.

[1887] 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.

[1888] 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.

[1889] 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.

[1890] 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.

[1891] The following is further disclosed regarding the above embodiment.

[1892] (Claim 1)

[1893] A means of analyzing the generated requirements and breaking them down into simple functions;

[1894] A means of generating test code for the separated simple functions,

[1895] a means for executing the generated test code and verifying its correctness;

[1896] A means for generating implementation code based on the test code;

[1897] A way to integrate multiple implementations into a single program,

[1898] a means of delivering the final program;

[1899] A system including:

[1900] (Claim 2)

[1901] 2. The system according to claim 1, wherein the analysis results of the generated requirements are fed back based on a test-driven development methodology.

[1902] (Claim 3)

[1903] 10. The system of claim 1, further comprising means for allowing a request to be entered in natural language.

[1904] "Example 1"

[1905] (Claim 1)

[1906] means for inputting a request expressed in natural language;

[1907] A means of analyzing the generated requirements and breaking them down into simple functions;

[1908] A means of generating test code for the separated simple functions,

[1909] a means for executing the generated test code and verifying its correctness;

[1910] A means for generating implementation code based on the test code;

[1911] A way to integrate multiple implementations into a single program,

[1912] a means of delivering the final program;

[1913] A system including:

[1914] (Claim 2)

[1915] 2. The system according to claim 1, wherein the analysis results of the generated requirements are fed back based on a test-driven development methodology.

[1916] (Claim 3)

[1917] 10. The system of claim 1, further comprising means for allowing a request to be entered in natural language.

[1918] (Claim 4)

[1919] 10. The system of claim 1, further comprising means for analyzing requirements using a generative AI model and breaking them down into simple functions.

[1920] (Claim 5)

[1921] 10. The system of claim 1, further comprising means for using prompt statements to generate test code and implementation code.

[1922] (Claim 6)

[1923] 10. The system of claim 1, further comprising means for automatically correcting and re-executing the test code if the test code fails.

[1924] "Application Example 1"

[1925] (Claim 1)

[1926] A means of analyzing the generated requirements and breaking them down into simple functions;

[1927] A means of generating test code for the separated simple functions,

[1928] a means for executing the generated test code and verifying its correctness;

[1929] A means for generating implementation code based on the test code;

[1930] A means of integrating multiple implementation codes into a single program,

[1931] a means of delivering the final program;

[1932] a means for inputting a request in a natural language and generating an operation program for an industrial robot;

[1933] A system including:

[1934] (Claim 2)

[1935] 2. The system according to claim 1, wherein the analysis results of the generated requirements are fed back based on a test-driven development methodology.

[1936] (Claim 3)

[1937] 10. The system of claim 1, further comprising means for providing the final program to a control unit of the robot.

[1938] "Example 2: Combining Emotion Engines"

[1939] (Claim 1)

[1940] a means for a user to input a request in natural language;

[1941] means for recognizing the emotional state of the user and optimizing the request;

[1942] A means of analyzing the generated requirements and breaking them down into simple functions;

[1943] A means of generating test code for the divided simple functions using a generative AI model;

[1944] a means for executing the generated test code and verifying its correctness;

[1945] means for performing a regeneration process based on the feedback;

[1946] A means for generating implementation code based on the test code;

[1947] A way to integrate multiple implementations into a single program,

[1948] a means of delivering the final program;

[1949] A system including:

[1950] (Claim 2)

[1951] 2. The system according to claim 1, wherein the analysis results of the generated requirements are fed back based on a test-driven development methodology.

[1952] (Claim 3)

[1953] 10. The system according to claim 1, further comprising means for analyzing the emotional state of the user and reflecting the result in improving the accuracy of the request analysis.

[1954] "Application example 2 when combining emotion engines"

[1955] (Claim 1)

[1956] A means of analyzing the generated requirements and breaking them down into simple functions;

[1957] A means of generating test code for the separated simple functions,

[1958] a means for executing the generated test code and verifying its correctness;

[1959] A means for generating implementation code based on the test code;

[1960] A way to integrate multiple implementations into a single program,

[1961] a means of delivering the final program;

[1962] means for analyzing the user's emotional state in response to the generated request in real time;

[1963] a means for optimizing the segmentation means and / or generation means based on the analyzed emotional state;

[1964] A system including:

[1965] (Claim 2)

[1966] 2. The system according to claim 1, wherein the analysis results of the generated requirements are fed back based on a test-driven development methodology.

[1967] (Claim 3)

[1968] 2. The system according to claim 1, further comprising means for inputting a request in natural language and analyzing the user's emotions at that time. [Explanation of symbols]

[1969] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url:> < / url:> < / url:>

Claims

1. A means of analyzing the generated requirements and breaking them down into simple functions; A means of generating test code for the separated simple functions, a means of executing the generated test code and verifying its correctness; A means for generating implementation code based on the test code; A way to integrate multiple implementations into a single program, a means of delivering the final program; A system including:

2. 2. The system according to claim 1, wherein the analysis results of the generated requirements are fed back based on a test-driven development methodology.

3. 10. The system of claim 1, further comprising means for allowing a request to be entered in natural language.

Citation Information

Patent Citations

  • Persona chatbot control method and system

    JP2022180282A