system

The system automates SQL query validation by using generative models to evaluate and provide feedback on query validity and risk, addressing inefficiencies in current methods and enhancing database performance and security.

JP2026035262APending Publication Date: 2026-03-04SOFTBANK GROUP CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024138105
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2026-03-04

AI Technical Summary

Technical Problem

Current SQL query validation relies heavily on visual inspection by experts, leading to inefficiencies such as wasted human resources, decreased database performance, and increased security risks.

Method used

A system that automates SQL query validation by receiving user queries, retrieving statistical and resource information from databases, using a generative model to evaluate query validity and risk, and providing feedback to users.

Benefits of technology

This system improves business efficiency and ensures database performance and security by quickly and accurately evaluating SQL queries and providing actionable feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026035262000001_ABST
    Figure 2026035262000001_ABST
Patent Text Reader

Abstract

Provide a system. A method for receiving a query input from a user; means for connecting to the database and retrieving statistical and resource information; a means for providing the obtained statistical information and resource information as input to a generative model and using the generative model to evaluate the validity and risk of the query; A means for feeding back the evaluation results to the user; A system including:
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] Currently, validation of SQL queries often relies on visual inspection by experts. This results in issues such as wasted human resources, decreased database performance due to queries, and increased security risks. The purpose of this invention is to improve this situation and automate the query checking process, thereby improving business efficiency and ensuring database performance and security. [Means for solving the problem]

[0005] The present invention provides a system including: means for receiving a query input from a user; means for connecting to a database to acquire statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and using the generative model to evaluate the validity and risk of the query; and means for feeding back the evaluation results to the user. This system automates query validity check, thereby reducing human resources and improving database performance and security.

[0006] "User" refers to an individual or organization that inputs and submits a query to the system.

[0007] A "query" is a command statement to retrieve, manipulate, or change information in a database.

[0008] "Means" refers to a set of functions or devices used to achieve a particular purpose.

[0009] A "database" refers to a system for efficiently managing large amounts of data.

[0010] "Statistical Information" refers to numerical data and indicators relating to the Database.

[0011] "Resource information" refers to data regarding the utilization and performance of the database's operational status.

[0012] A "generative model" is an artificial intelligence that learns patterns and meaning from large amounts of data and assesses the validity and risk of queries.

[0013] "Feedback" refers to information that returns the results of query evaluation to the user.

[0014] A "system" refers to a collection of multiple components (hardware and software) that work together to process data. [Brief explanation of the drawings]

[0015] [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

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

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

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

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

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

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

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

[0023] [First embodiment]

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

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

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

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

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

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

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

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

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

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

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

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

[0036] The present invention relates to a system for automatically assessing the validity and risk of SQL queries submitted by users. The system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from databases, evaluating the queries using generative models, and providing feedback of the evaluation results to the users.

[0037] System Operation Overview

[0038] 1. Receiving a query

[0039] Terminal: The user submits an SQL query via a web interface or API, for example "SELECT FROM users WHERE age > 30" to the server.

[0040] Server: The server receives the query from the user and passes it on to the next processing step.

[0041] 2. Retrieving information from the database

[0042] Server: The server connects to the database and obtains the necessary statistical and resource information, such as the amount of data in the target table, index information, CPU usage and memory usage of the database, etc.

[0043] 3. Evaluation using generative models

[0044] Server: The server inputs the acquired statistical and resource information and the user's query into the generative model, which then uses this data to evaluate the validity and risk of the query.

[0045] Specifically, the generative model evaluates whether a query is likely to result in a large table scan, and generates recommendations such as whether to add an index to improve performance.

[0046] 4. Feedback of evaluation results

[0047] Terminal: The server provides feedback to the user based on the results of the generative model, including a risk assessment of the query and recommendations for improving performance.

[0048] For example, the feedback might say something like, "Risk assessment: High. Performance recommendation: Consider adding an index on the 'age' column."

[0049] Specific examples

[0050] Step 1: The user submits the following SQL query to the server: SELECT FROM users WHERE age > 30.

[0051] Step 2: The server connects to the database and finds that the table has 100,000 rows, there is no index on the 'age' column, and the CPU usage is 70% and the memory usage is 65%.

[0052] Step 3: The server passes this information to the generative model to evaluate the query. The generative model evaluates the "risk of high table scans" and recommends "adding an index to the 'age' column."

[0053] Step 4: The server returns the evaluation results to the user and provides feedback including the risk of the query and suggestions for improvement.

[0054] In this way, the system can efficiently evaluate SQL queries submitted by users, improving business efficiency while ensuring database performance and security.

[0055] The processing flow will be explained below.

[0056] Step 1:

[0057] A user enters an SQL query through a web interface or API, for example submitting a query such as "SELECT FROM users WHERE age > 30".

[0058] Step 2:

[0059] The terminal sends the SQL query received from the user to the server, which passes the user's query to the system.

[0060] Step 3:

[0061] The server temporarily stores the SQL query received from the user and prepares it for the next process, then opens a connection to the database.

[0062] Step 4:

[0063] The server sends a query to the database to get statistics on the table in question, for example, it issues an SQL query to get the number of rows and index information for the "users" table.

[0064] Step 5:

[0065] The server collects the statistics returned from the database and then retrieves resource information, including CPU and memory usage for the database.

[0066] Step 6:

[0067] The server collects these statistics and resource information and prepares a prompt to input to the generative model (AI model), which includes the user's query, database statistics, and resource information.

[0068] Step 7:

[0069] The server inputs the prepared prompts into the generative model and instructs it to evaluate the validity and risk of the query. The generative model evaluates the query based on the given data.

[0070] Step 8:

[0071] The server receives and analyzes the results from the generative model, which include a risk assessment of the query and recommendations for improving performance.

[0072] Step 9:

[0073] The server generates feedback based on the evaluation results, which includes detailed information about the risks and suggestions for improvement.

[0074] Step 10:

[0075] The terminal displays the feedback received from the server to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0076] Through this series of steps, a system is created that ensures database performance and security by evaluating the validity and risk of SQL queries submitted by users and providing feedback to the users.

[0077] Example 1

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

[0079] Conventional SQL query evaluation systems often have difficulty accurately and quickly evaluating the validity and risk of queries submitted by users. Furthermore, few systems offer an integrated process for acquiring resource and statistical information and providing feedback on evaluation results. As a result, database performance and security are often not adequately ensured. Furthermore, there is a lack of a convenient way for users to seamlessly complete the entire process, from submitting queries to receiving evaluation results.

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

[0081] In this invention, the server includes: means for receiving a query input from a user; means for connecting to a database and acquiring statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model; means for feeding back the evaluation results to the user; means for submitting an SQL query via a terminal; means for performing evaluation by inputting a prompt sentence to the generative model; and means for formatting the evaluation results and returning them to the user. This allows the user to perform a consistent process from submitting a query to receiving the evaluation results, making it possible to quickly and accurately evaluate the validity and risk of an SQL query and ensure database performance and security.

[0082] A "user" is a person or entity that submits SQL queries to the system.

[0083] A "query" is a command statement that requests a database to perform data manipulation or retrieve data.

[0084] A "server" is a computer system that receives queries from users, obtains statistical and resource information through communication with a database, and evaluates the queries using a generative model.

[0085] A "database" is a system that stores data in an organized manner and allows data to be searched and manipulated based on queries.

[0086] "Statistics" refers to numerical and quantitative data about tables in a database and their structure, such as the number of rows in a table and index information.

[0087] "Resource information" refers to information related to the performance of a database system, including, for example, CPU usage and memory usage.

[0088] A "generative model" is a computational model that uses machine learning and artificial intelligence techniques to evaluate the validity and risk of an input query.

[0089] "Validity" is a characteristic that indicates whether a query is suitable for its intended purpose and does not interfere with the operation of the database.

[0090] "Risk" is the likelihood of a query potentially having a negative impact or problem on the database system.

[0091] "Feedback" refers to information returned to the user based on the evaluation results of the generative model, including a risk assessment of the query and recommendations for performance improvement.

[0092] A "terminal" is a device through which a user accesses the system and submits SQL queries, such as a computer or smartphone.

[0093] A "prompt sentence" is text that is provided as input to a generative model and includes a query and related information.

[0094] The present invention relates to a system for automatically assessing the validity and risk of SQL queries submitted by users. The system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from databases, evaluating the queries using generative models, and providing feedback of the evaluation results to the users.

[0095] First, a user submits an SQL query via a web interface or API using a terminal. For example, they open a browser, access a specific URL, and enter and submit the query "SELECT FROM users WHERE age > 30." At this time, the server receives the HTTP request and analyzes the query content. This analyzed query is then passed to the database evaluation module.

[0096] The server connects to the database and obtains the necessary statistical and resource information. Specifically, the server executes the following SQL statement to collect the number of rows in the table, index information, current CPU usage, and memory usage. For example, it obtains information such as the target table has 100,000 rows, there is no index on the "age" column, CPU usage is 70%, and memory usage is 65%.

[0097] Next, the server inputs the acquired statistical and resource information and the user's query into a generative model. This generative model uses machine learning models such as GPT or BERT. Based on this information, the generative model evaluates the validity and risk of the query. For example, the generative model might evaluate "This query is likely to cause a large table scan" and generate a recommendation that "Adding an index should be considered to improve performance."

[0098] As a specific example, the following text is used as a prompt for the generative AI model:

[0099] User input: "SELECT FROM users WHERE age > 30"

[0100] Database Statistics:

[0101] Table: users

[0102] Number of rows: 100000

[0103] Index: no 'age' column

[0104] CPU usage: 70%

[0105] Memory usage: 65%

[0106] The generative model uses this information to assess the validity and risk of the query and recommend necessary improvements.

[0107] Finally, the server provides feedback from the generative model to the user, for example, via a web interface or API response, such as "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0108] This system allows users to perform a complete process from submitting a query to receiving the evaluation results, enabling them to quickly and accurately evaluate the validity and risk of SQL queries and ensure database performance and security.

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

[0110] Step 1:

[0111] Receiving queries

[0112] Input: SQL queries submitted by the user through the web interface or API

[0113] Output: Query information received by the server

[0114] Specific behavior:

[0115] User: Enters an SQL query into the web interface and clicks the "Submit" button, or sends a POST request to an API endpoint.

[0116] For example, enter the query "SELECT FROM users WHERE age > 30" and submit it.

[0117] Server: Receives the HTTP request, parses the query content, stores it in an intermediate data structure, and passes the query on to the next processing step.

[0118] Step 2:

[0119] Retrieving information from a database

[0120] Input: Query received by the server, database connection information

[0121] Output: Statistical and resource information obtained.

[0122] Specific behavior:

[0123] Server: Connect to the database and retrieve the necessary statistics and resource information by executing SQL statements such as the following:

[0124] sql

[0125] SELECT COUNT() FROM users;

[0126] SHOW INDEXES FROM users;

[0127] Server: Store information retrieved from the database in variables and data structures. For example, check that the table "users" has 100,000 rows, that there is no index on the "age" column, that CPU usage is 70%, and that memory usage is 65%.

[0128] Step 3:

[0129] Evaluation using generative models

[0130] Input: Retrieved statistics and resource information, user queries

[0131] Output: The query evaluation results by the generative model

[0132] Specific behavior:

[0133] Server: The server inputs the acquired statistical information, resource information, and user queries into a generative AI model, which uses machine learning models such as GPT and BERT.

[0134] How a generative AI model works: The model analyzes input data and assesses its validity and risk.

[0135] Example: The generative model determines that "this query is likely to result in a large table scan" and recommends "add an index to the 'age' column."

[0136] Enter the following as an example prompt statement:

[0137] Prompt statement:

[0138] User input: "SELECT FROM users WHERE age > 30"

[0139] Database Statistics:

[0140] Table: users

[0141] Number of rows: 100000

[0142] Index: no 'age' column

[0143] CPU usage: 70%

[0144] Memory usage: 65%

[0145] Server: Receives the output of the generative model, parses it, and formats it into a human-readable format.

[0146] Step 4:

[0147] Feedback of evaluation results

[0148] Input: Evaluation results formatted by the generative model

[0149] Output: Feedback information to the user

[0150] Specific behavior:

[0151] Server: Formats the evaluation results from the generative model and provides feedback to the user.

[0152] On the device: Feedback results are displayed via the web interface or API response, such as "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0153] User: Review the feedback and revise the query as needed.

[0154] This continuous processing step allows users to go from submitting an SQL query to receiving the evaluation results in a consistent manner, enabling them to quickly and accurately evaluate the validity and risk of the query.

[0155] (Application example 1)

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

[0157] Conventional systems faced the challenge of providing real-time feedback when evaluating the validity and risk of SQL queries. Users could not quickly receive evaluation results and improvement suggestions on their own communication devices, which meant that database performance and security could not be adequately ensured. Furthermore, remote management was difficult, and there was a lack of means to monitor the database status in real time. To solve these issues, a new system was needed.

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

[0159] In this invention, the server includes means for receiving a query input from a user, means for connecting to a database and acquiring statistical information and resource information, means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model, means for feeding back the evaluation result to the user, and means for displaying the evaluation result and improvement suggestions on the user's communication terminal in real time. This allows the user to check the SQL query evaluation result and improvement suggestions in real time on their own communication terminal, making it possible to improve the performance and security of the database.

[0160] The "means for receiving a query input by a user" is a means for receiving an SQL query input by a user through a communication terminal and transmitting it to a server.

[0161] "Means for connecting to a database and obtaining statistical information and resource information" refers to means for accessing a database and collecting statistical information (e.g., table data volume and index information) and resource usage (central processing unit usage rate, memory usage rate, etc.).

[0162] "Means for providing acquired statistical information and resource information as input to a generative model and using the generative model to assess the validity and risk of a query" refers to means for inputting collected statistical information and resource information into a generative AI model and using the model to automatically assess the validity and execution risk of an SQL query.

[0163] "Means for providing feedback of evaluation results to users" refers to means for communicating the results of evaluation by the generative AI model to users, and the evaluation results include a risk assessment of the query and suggestions for improvement.

[0164] "Means for displaying evaluation results and improvement suggestions on the user's communication terminal in real time" refers to means for displaying evaluation results and improvement suggestions on the user's communication terminal without delay, allowing the user to take appropriate action immediately.

[0165] The system that realizes this application example is composed of the following components: a user's communication terminal, a server, and a database. The specific operation of each component will now be described.

[0166] Overall system configuration

[0167] Client (user's communication device):

[0168] Device type: Communication devices such as smartphones and tablets.

[0169] Languages ​​and Frameworks: Python, Flask. The communication terminal accesses the server via a web interface or API.

[0170] Function: Users input SQL queries using a communication terminal and receive evaluation results and improvement suggestions in real time.

[0171] server:

[0172] Languages ​​and Frameworks: Python, FastAPI.

[0173] AI Model: A generative AI model using TENSORFLOW® or PyTorch.

[0174] Database: PostgreSQL or MySQL (registered trademark).

[0175] Function: The server receives SQL queries from the communication device, queries the database to obtain the necessary statistical and resource information, inputs the obtained information into a generative AI model, evaluates the validity and risk of the query, and provides feedback on the evaluation results to the communication device.

[0176] Explanation of program processing

[0177] 1. Receiving a query:

[0178] The server receives the SQL query sent from the user's communication terminal.

[0179] Based on the query received by the server, it passes it to the next processing step.

[0180] 2. Retrieving information from the database:

[0181] The server connects to the database and obtains statistical information and resource information such as the amount of data in the target table, index information, central processing unit usage rate, memory usage rate, etc.

[0182] 3. Evaluation using generative models:

[0183] The server inputs the acquired statistical and resource information into a generative AI model to assess the validity and risk of the query.

[0184] The assessment includes the risk of a query causing large table scans and recommendations for adding indexes to improve performance.

[0185] 4. Feedback of evaluation results:

[0186] The server then provides the user with feedback on the results of the generated AI model, including a risk assessment of the query and suggestions for improvement.

[0187] The results are displayed in real time on the user's communication terminal, enabling a quick response.

[0188] Specific examples

[0189] As a concrete example, consider the case where a user inputs the SQL query "SELECT FROM orders WHERE status = 'PENDING'". The server retrieves the data volume (5,000 rows) of the table "orders" from the database, index information, central processing unit utilization (40%), and memory utilization (50%). Based on this information, the generative AI model evaluates the query's risk (e.g., "medium risk") and suggests improvements ("consider adding an index to the status column"). The evaluation results are fed back to the user's communication device in real time.

[0190] Prompt Sentence Examples

[0191] Evaluate the validity and risk of SQL queries submitted by users. Using generative AI models, we evaluate the query's risk and output recommendations for performance improvement, taking into account the amount of data in the target table, index information, database resource utilization, and more.

[0192] Sample query: "SELECT FROM orders WHERE status = 'PENDING'"

[0193] Statistics: Table row count = 5000, status column not indexed, CPU usage = 40%, Memory usage = 50%

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

[0195] Step 1:

[0196] The user uses a communication terminal to enter an SQL query and send it to the server. As input, the user enters an SQL query (e.g., "SELECT FROM orders WHERE status = 'PENDING'"). The server receives the query and passes it to the next processing step. The server stores the received query in the request body. As output, it returns a response indicating that the query was successfully received.

[0197] Step 2:

[0198] The server connects to the database. As input, it requires connection information (database URL, authentication information, etc.) required to execute the received SQL query. Based on the received query, the server obtains the amount of data in the target table "orders". It also runs a query to confirm that no index exists on the target column "status". It also obtains the database's CPU usage (e.g., 40%) and memory usage (e.g., 50%). As output, it obtains data volume, index information, and resource usage data.

[0199] Step 3:

[0200] The server inputs the acquired statistical and resource information into the generative AI model. Numerical data such as the amount of data in the table, index information, CPU usage, and memory usage are required as input. The server passes this information to the generative AI model, which then evaluates the validity and risk of the query. Specific data processing involves converting the input data into an appropriate format and providing it to the model. As output, the generative AI model returns a risk assessment of the query and recommendations for improving performance (e.g., "Consider adding an index to the status column").

[0201] Step 4:

[0202] The server feeds back to the user the evaluation results and recommendations returned by the generative AI model. The output data of the generative AI model is required as input. The server formats and sends the evaluation results and recommendations for display on the user's communication device in real time. As output, the user can check the evaluation results of the SQL query and improvement suggestions on the communication device. The user receives the results in real time and can take appropriate action quickly.

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

[0204] This invention relates to a system that automatically evaluates the validity and risk of SQL queries submitted by users, recognizes the user's emotions, and provides appropriate feedback. This system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from a database, evaluating the queries using a generative model, recognizing the user's emotions using an emotion engine and adjusting the feedback, and providing the evaluation results as feedback to the user.

[0205] System Operation Overview

[0206] 1. Receiving a query

[0207] Terminal: The user enters an SQL query through a web interface or API, for example submitting the query "SELECT FROM users WHERE age > 30".

[0208] Server: The server receives queries from users and temporarily stores them.

[0209] 2. Retrieving information from the database

[0210] Server: The server connects to the database and obtains statistical information (e.g., table size and index information) and resource information (e.g., CPU usage and memory usage) for the target table.

[0211] 3. Evaluation using generative models

[0212] Server: Based on the collected statistics and resource information, the server inputs the user's query into a generative model, which uses this data to assess the validity and risk of the query.

[0213] For example, the generative model may assess that "this query is likely to result in a large table scan" and generate a recommendation that "you should consider adding an index to improve performance."

[0214] 4. Recognition of user emotions using an emotion engine

[0215] Device: As users interact with the web interface, sensor data such as webcams and voice input devices are collected to recognize user emotions in real time.

[0216] Server: The server analyzes these sensor data and identifies the user's emotional state (e.g., stress, satisfaction, dissatisfaction, etc.).

[0217] 5. Feedback of evaluation results

[0218] Server: The server generates feedback based on the evaluation results from the generative model. It adjusts the content and presentation of the feedback based on the user's emotional state. For example, if the user is feeling stressed, it simplifies the feedback and uses more positive language.

[0219] On the device, the feedback received from the server is displayed to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column.", appropriately adjusted according to the user's emotional state.

[0220] Specific examples

[0221] Step 1: The user submits the following SQL query to the server: SELECT FROM users WHERE age > 30.

[0222] Step 2: The server connects to the database and finds that the table has 100,000 rows, there is no index on the 'age' column, and the CPU usage is 70% and the memory usage is 65%.

[0223] Step 3: The server passes this information to the generative model to evaluate the query. The generative model evaluates the "risk of high table scans" and recommends "adding an index to the 'age' column."

[0224] Step 4: Analyze the data collected from the webcam and voice input device to recognize the user's emotional state. For example, it may be determined that the user is feeling stressed.

[0225] Step 5: The server generates feedback based on the assessment and adjusts it to take into account the user's emotional state. It displays a more positive feedback to the user: "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0226] In this way, our system efficiently evaluates SQL queries submitted by users, ensuring database performance and security, while providing feedback that takes into account the user's emotional state, resulting in a better user experience.

[0227] The processing flow will be explained below.

[0228] Step 1:

[0229] A user enters an SQL query through a web interface or API, for example submitting a query such as "SELECT FROM users WHERE age > 30".

[0230] Step 2:

[0231] The terminal sends the SQL query received from the user to the server, which passes the user's query to the system.

[0232] Step 3:

[0233] The server temporarily stores the SQL query received from the user and prepares it for the next process, then opens a connection to the database.

[0234] Step 4:

[0235] The server sends a query to the database to get statistics on the table in question, for example, it issues an SQL query to get the number of rows and index information for the "users" table.

[0236] Step 5:

[0237] The server collects the statistics returned from the database and then retrieves resource information, including CPU and memory usage for the database.

[0238] Step 6:

[0239] The server collects these statistics and resource information and prepares a prompt to input to the generative model (AI model), which includes the user's query, database statistics, and resource information.

[0240] Step 7:

[0241] The server inputs the prepared prompts into the generative model and instructs it to evaluate the validity and risk of the query. The generative model evaluates the query based on the given data.

[0242] Step 8:

[0243] The server receives and analyzes the results from the generative model, which include a risk assessment of the query and recommendations for improving performance.

[0244] Step 9:

[0245] To recognize the user's emotional state, the device collects sensor data from a webcam, voice input device, etc., thereby obtaining real-time emotional information of the user.

[0246] Step 10:

[0247] The server analyzes these sensor data to determine the user's emotional state (e.g., stress, satisfaction, dissatisfaction, etc.) using an emotion engine.

[0248] Step 11:

[0249] The server generates feedback that takes into account the user's emotional state based on the evaluation results from the generative model. If the user is feeling stressed, the server simplifies the feedback and uses more positive expressions.

[0250] Step 12:

[0251] The device displays the feedback received from the server to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column," and adjusts the content appropriately depending on the user's emotional state.

[0252] This series of processes realizes a system that efficiently evaluates the validity and risk of SQL queries submitted by users and provides feedback that takes into account the user's emotional state.

[0253] Example 2

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

[0255] Conventional systems lack the ability to evaluate the validity and risk of SQL queries submitted by users. Furthermore, the feedback of the evaluation results is uniform and does not take into account the user's emotional state, which reduces the effectiveness of the feedback. To address these issues, the present invention provides a system that automatically evaluates the validity and risk of SQL queries and provides feedback based on user emotional recognition.

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

[0257] In this invention, the server includes: means for receiving a query input from a user; means for connecting to a database and acquiring statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model; means for feeding back the evaluation result to the user; and means for recognizing the user's emotional state and adjusting the feedback content. This makes it possible to efficiently evaluate the validity and risk of an SQL query and provide appropriate feedback that takes the user's emotional state into consideration while ensuring database performance and security.

[0258] A "user" is someone who uses the system to submit SQL queries.

[0259] A "query" is an instruction to a database to search for or manipulate data.

[0260] A "database" is a system that manages a collection of data and enables efficient searching and manipulation.

[0261] "Statistical information" refers to meta-information and performance data about tables, columns, etc. in a database.

[0262] "Resource information" is information that indicates the operational status of the database system, and includes CPU usage rate, memory usage rate, and the like.

[0263] A "generative model" is an artificial intelligence model that generates useful information from input data.

[0264] "Validity" refers to the suitability of an SQL query to obtain the intended results accurately and efficiently.

[0265] "Risks" are negative aspects such as performance or security issues that may be caused by SQL queries.

[0266] "Feedback" refers to information about evaluation results and improvement measures that the system provides to the user.

[0267] "Emotional state" refers to the psychological state that a user shows while using the system, and includes stress, satisfaction, dissatisfaction, etc.

[0268] "Emotion recognition" is a technology that identifies a user's emotional state from their facial expressions, voice, etc.

[0269] A "means" is a method or apparatus for performing a particular function or process.

[0270] The present invention is a system that automatically evaluates the validity and risk of SQL queries submitted by users, recognizes the user's emotions, and provides appropriate feedback. This system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from a database, evaluating the queries using a generative model, recognizing the user's emotions using an emotion engine and adjusting the feedback, and providing the evaluation results to the user.

[0271] First, a user enters an SQL query from their device via a web interface or API. For example, they might submit a query like "SELECT FROM users WHERE age > 30." The server receives this query and temporarily stores it. This typically involves using a server framework such as Node.js or Python's Flask.

[0272] Next, the server connects to the database (e.g., PostgreSQL or MySQL) and retrieves statistics and resource information about the query. This is done using the database driver (e.g., psycopg2 for PostgreSQL) to retrieve statistics such as table size and index information, and resource information such as CPU usage and memory usage. Specifically, the server retrieves statistics by executing a query such as "SELECT pg_stat_get_db_tuples_returned(dbid) FROM pg_stat_database WHERE datname='your_database';".

[0273] The server then provides the collected statistical and resource information as input to a generative model (e.g., OpenAI's GPT-4®). The generative model uses this data to evaluate the appropriateness and risk of the SQL query. The evaluation results indicate potential performance issues and resource usage risks that the query may cause. Recommendations for improving performance are also generated. An example of a specific prompt is, "A user has submitted the SQL query 'SELECT FROM users WHERE age > 30'. Please evaluate this query to determine its risk and appropriateness, and if possible, provide recommendations for improving performance."

[0274] Next, while the user is operating the web interface, the device collects sensor data from the webcam, voice input device, etc. to recognize the user's emotional state. The server receives this sensor data and inputs it into an emotion recognition engine. The emotion recognition engine analyzes the user's facial expressions and tone of voice to determine their emotional state (e.g., stress, satisfaction, dissatisfaction, etc.). For example, OpenCV or Microsoft® Azure® emotion recognition APIs can be used.

[0275] Finally, the server generates feedback based on the evaluation results obtained from the generative model and the user's emotional state obtained from the emotion recognition engine. The feedback content is adjusted taking into account the user's emotional state. For example, if the user is feeling stressed, the feedback content is simplified and uses more positive language. The device displays this feedback to the user, specifically, "Risk assessment: High. Performance recommendation: Consider adding an index to the age column."

[0276] In this way, our system can efficiently evaluate the validity and risk of SQL queries, ensure database performance and security, and provide feedback that takes into account the user's emotional state, resulting in a better user experience.

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

[0278] Step 1: Receiving a query from the user

[0279] Terminal: The user enters an SQL query through a web interface or API, for example submitting the query "SELECT FROM users WHERE age > 30".

[0280] Input: The SQL query entered by the user.

[0281] Server: The server receives queries from users and temporarily stores them. This is done using a server framework such as Node.js or Python's Flask.

[0282] Output: A temporarily saved SQL query.

[0283] Step 2: Retrieving information from the database

[0284] Server: The server connects to a database (e.g., PostgreSQL or MySQL) based on the stored query, using a database driver (e.g., psycopg2 for PostgreSQL).

[0285] Input: A temporarily saved SQL query.

[0286] Server: The server obtains statistical information (e.g., table size and index information) and resource information (e.g., CPU usage and memory usage) for the target table from the database. Specifically, it obtains the statistical information by executing a query such as "SELECT pg_stat_get_db_tuples_returned(dbid) FROM pg_stat_database WHERE datname='your_database';".

[0287] Output: Retrieved statistics and resource information.

[0288] Step 3: Evaluation using a generative model

[0289] Server: The server provides the acquired statistical and resource information as input to a generative model (e.g., OpenAI's GPT-4).

[0290] Input: Statistics and resource information.

[0291] Server: The generative model evaluates the appropriateness and risk of the SQL query based on the provided data. The evaluation results indicate the performance issues and resource usage risks that the query may cause. An example of a specific prompt is, "A user has submitted the SQL query 'SELECT FROM users WHERE age > 30'. Please evaluate this query to determine its risks and appropriateness, and if possible, provide recommendations for improving performance."

[0292] Output: A validity and risk assessment of the query, and recommendations for improving performance.

[0293] Step 4: Recognizing user emotions with the emotion engine

[0294] Device: Collect sensor data from webcams, voice input devices, etc. while the user is interacting with the web interface. Use JavaScript® libraries or incorporate emotion recognition APIs (e.g., Microsoft Azure Face API) as microservices.

[0295] Input: Data from the user's webcam and audio input devices.

[0296] Server: The server receives these sensor data and inputs them into an emotion recognition engine, which analyzes the user's facial expressions and tone of voice to determine their emotional state (e.g., stress, satisfaction, dissatisfaction, etc.).

[0297] Output: Data about the user's emotional state.

[0298] Step 5: Feedback of the evaluation results

[0299] Server: The server generates feedback based on the evaluation results obtained from the generative model and the user's emotional state obtained from the emotion recognition engine. Specifically, it adjusts the feedback content taking into account the user's emotional state. For example, if the user is feeling stressed, it simplifies the feedback content and uses more positive expressions.

[0300] Input: query validity assessment and risk assessment, user emotional state.

[0301] Server: Generates feedback content and provides it to the user.

[0302] On the device, the feedback sent by the server is displayed to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the age column.", with appropriate adjustments.

[0303] Output: Feedback provided to the user.

[0304] Through the above processing steps, the system efficiently evaluates SQL queries submitted by users, ensures database performance and security, and provides appropriate feedback that takes into account the user's emotional state.

[0305] (Application example 2)

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

[0307] Conventional autonomous vehicle fleet management systems not only handle queries about operational data and routes inefficiently, but also do not provide feedback that takes into account the emotional state of the fleet manager. This makes the system cumbersome to operate and makes efficient fleet management difficult. Another problem is the lack of insight into real-time operational status and vehicle performance when assessing the validity and risk of queries.

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

[0309] In this invention, the server includes means for receiving a query input from a user, means for connecting to a database and acquiring statistical information and resource information, means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model, means for recognizing the emotional state of the user, and means for feeding back the evaluation result based on the emotional state of the user. This enables the operation manager to grasp the operation status more intuitively and efficiently and receive appropriate feedback.

[0310] A "query" is a request or inquiry made by a user to a database.

[0311] A "database" is a collection of data that is organized so that large amounts of data can be efficiently managed, searched, and updated.

[0312] "Statistical information" is numerical information about data in tables, columns, rows, etc. in a database.

[0313] "Resource information" is information about the status of system resources such as CPU usage and memory usage of a database system.

[0314] A "generative model" is a model that uses machine learning and artificial intelligence techniques to learn specific patterns and features from data and make predictions and classifications.

[0315] "Validity" is a concept that indicates whether an SQL query complies with the rules and requirements of the system.

[0316] A "risk" is a potential negative impact or problem caused by executing an SQL query.

[0317] "Feedback" refers to the evaluation results and advice that the system provides to the user.

[0318] "Emotional state" refers to the psychological state such as stress, satisfaction, or dissatisfaction that a user feels while operating a system.

[0319] The present invention aims to efficiently process queries about operational data and routes in an autonomous vehicle fleet management system, providing insights into operational status and vehicle performance, and improving the efficiency of the fleet management process by recognizing the emotional state of the fleet manager and providing appropriate feedback.

[0320] System configuration

[0321] The system includes the following components:

[0322] 1. User device: A device such as a smartphone or smart glasses that allows the operation manager to input queries and receive feedback.

[0323] 2. Server: This is the central processing unit that receives queries, connects to the database, evaluates them using the generative model, recognizes emotions using the emotion engine, and provides feedback.

[0324] 3. Database: A database system that stores statistical information and resource information about vehicles.

[0325] 4. Generative model: A model that uses machine learning and artificial intelligence techniques to evaluate user queries.

[0326] 5. Emotion engine: This engine analyzes data obtained from cameras and voice input devices to recognize the emotional state of the operations manager.

[0327] Program processing overview

[0328] The program in this system performs the following steps:

[0329] 1. Receiving a query: The server receives a query entered from a user terminal. For example, a query like "What is the battery status of the current vehicle?"

[0330] 2. Retrieving information from the database: The server connects to the database to retrieve statistical and resource information such as the vehicle's battery status, current route information, and operating hours.

[0331] 3. Evaluation using a generative model: The server provides the acquired statistical and resource information as input to a generative model to evaluate the validity and risk of the query. For example, if the battery level is low, the server may recommend using a charging station along the way.

[0332] 4. Recognition of the emotions of the dispatcher using an emotion engine: Data acquired from the camera and voice input device installed on the user's device is analyzed to recognize the emotional state of the dispatcher, determining whether they are feeling stressed, etc.

[0333] 5. Feedback of evaluation results: The server generates feedback based on the evaluation results from the generative model and adjusts the content presented to the dispatcher taking into account their emotional state. For example, if the dispatcher is feeling stressed, the server will make the evaluation results more concise and positive.

[0334] Examples of concrete examples and prompts

[0335] For example, a prompt to be input to a generative AI model might look like this:

[0336] "Evaluate SQL queries regarding the battery status of autonomous vehicles and provide feedback on recommended rerouting when the vehicle's battery capacity is below 50%."

[0337] This allows the AI ​​model to generate specific recommendations and tailor feedback to the user depending on the emotional state of the fleet manager.

[0338] As described above, the present invention is a system that enables operation managers to grasp operation conditions more intuitively and efficiently and receive appropriate feedback.

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

[0340] Step 1:

[0341] Receiving queries

[0342] The user operates a smartphone or smart glasses and inputs a query such as "Please tell me the battery status of the current vehicle in operation." The query sent from the device is received by the server.

[0343] Input: A query from the user

[0344] Output: Query saved on the server

[0345] Specific operation: Form input on the smart device and query submission. The server side receives the HTTP request and temporarily saves the query.

[0346] Step 2:

[0347] Retrieving information from a database

[0348] The server connects to the database to obtain statistical and resource information for the target vehicle, such as battery status, current route information, and operating hours.

[0349] Input: A query saved on the server

[0350] Output: Vehicle information obtained

[0351] Specific operation: The server establishes a database connection, issues an SQL query to retrieve data, and temporarily stores the vehicle information obtained as a response.

[0352] Step 3:

[0353] Evaluation using generative models

[0354] The server provides the acquired statistical and resource information as input to the generative model to evaluate the validity and risk of the query, for example, recommending stopping at a charging station along the way if the battery level is low.

[0355] Input: Vehicle information obtained

[0356] Output: Evaluation results by generative model

[0357] Specific operation: The server inputs the acquired statistical information into the AI ​​model to obtain the assessment result. The AI ​​model processes the input data and generates a risk assessment and recommendations.

[0358] Step 4:

[0359] Recognizing the emotions of dispatchers using an emotion engine

[0360] The server receives data acquired from the camera and voice input device installed on the user's device and analyzes it to recognize emotions, for example, to determine whether the operation manager is feeling stressed.

[0361] Input: Data from cameras and audio input devices

[0362] Output: Perceived emotional state

[0363] How it works: The device collects data using a camera and microphone and sends it to a server, which then uses emotion recognition software to analyze the data and identify the user's emotional state.

[0364] Step 5:

[0365] Feedback of evaluation results

[0366] The server generates feedback based on the evaluation results from the generative model and adjusts the content presented to the driver based on the driver's emotional state. For example, if the driver is feeling stressed, the server will make the evaluation results more concise and positive.

[0367] Input: Evaluation results from the generative model and the perceived emotional state

[0368] Output: Adjusted feedback content

[0369] Specific operation: The server combines the evaluation result and the emotional state to generate a feedback message, which is sent to the user's device and displayed to the operation manager.

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

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

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

[0373] [Second embodiment]

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

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

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

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

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

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

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

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

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

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

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

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

[0386] The present invention relates to a system for automatically assessing the validity and risk of SQL queries submitted by users. The system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from databases, evaluating the queries using generative models, and providing feedback of the evaluation results to the users.

[0387] System Operation Overview

[0388] 1. Receiving a query

[0389] Terminal: The user submits an SQL query via a web interface or API, for example "SELECT FROM users WHERE age > 30" to the server.

[0390] Server: The server receives the query from the user and passes it on to the next processing step.

[0391] 2. Retrieving information from the database

[0392] Server: The server connects to the database and obtains the necessary statistical and resource information, such as the amount of data in the target table, index information, CPU usage and memory usage of the database, etc.

[0393] 3. Evaluation using generative models

[0394] Server: The server inputs the acquired statistical and resource information and the user's query into the generative model, which then uses this data to evaluate the validity and risk of the query.

[0395] Specifically, the generative model evaluates whether a query is likely to result in a large table scan, and generates recommendations such as whether to add an index to improve performance.

[0396] 4. Feedback of evaluation results

[0397] Terminal: The server provides feedback to the user based on the results of the generative model, including a risk assessment of the query and recommendations for improving performance.

[0398] For example, the feedback might say something like, "Risk assessment: High. Performance recommendation: Consider adding an index on the 'age' column."

[0399] Specific examples

[0400] Step 1: The user submits the following SQL query to the server: SELECT FROM users WHERE age > 30.

[0401] Step 2: The server connects to the database and finds that the table has 100,000 rows, there is no index on the 'age' column, and the CPU usage is 70% and the memory usage is 65%.

[0402] Step 3: The server passes this information to the generative model to evaluate the query. The generative model evaluates the "risk of high table scans" and recommends "adding an index to the 'age' column."

[0403] Step 4: The server returns the evaluation results to the user and provides feedback including the risk of the query and suggestions for improvement.

[0404] In this way, the system can efficiently evaluate SQL queries submitted by users, improving business efficiency while ensuring database performance and security.

[0405] The processing flow will be explained below.

[0406] Step 1:

[0407] A user enters an SQL query through a web interface or API, for example submitting a query such as "SELECT FROM users WHERE age > 30".

[0408] Step 2:

[0409] The terminal sends the SQL query received from the user to the server, which passes the user's query to the system.

[0410] Step 3:

[0411] The server temporarily stores the SQL query received from the user and prepares it for the next process, then opens a connection to the database.

[0412] Step 4:

[0413] The server sends a query to the database to get statistics on the table in question, for example, it issues an SQL query to get the number of rows and index information for the "users" table.

[0414] Step 5:

[0415] The server collects the statistics returned from the database and then retrieves resource information, including CPU and memory usage for the database.

[0416] Step 6:

[0417] The server collects these statistics and resource information and prepares a prompt to input to the generative model (AI model), which includes the user's query, database statistics, and resource information.

[0418] Step 7:

[0419] The server inputs the prepared prompts into the generative model and instructs it to evaluate the validity and risk of the query. The generative model evaluates the query based on the given data.

[0420] Step 8:

[0421] The server receives and analyzes the results from the generative model, which include a risk assessment of the query and recommendations for improving performance.

[0422] Step 9:

[0423] The server generates feedback based on the evaluation results, which includes detailed information about the risks and suggestions for improvement.

[0424] Step 10:

[0425] The terminal displays the feedback received from the server to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0426] Through this series of steps, a system is created that ensures database performance and security by evaluating the validity and risk of SQL queries submitted by users and providing feedback to the users.

[0427] Example 1

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

[0429] Conventional SQL query evaluation systems often have difficulty accurately and quickly evaluating the validity and risk of queries submitted by users. Furthermore, few systems offer an integrated process for acquiring resource and statistical information and providing feedback on evaluation results. As a result, database performance and security are often not adequately ensured. Furthermore, there is a lack of a convenient way for users to seamlessly complete the entire process, from submitting queries to receiving evaluation results.

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

[0431] In this invention, the server includes: means for receiving a query input from a user; means for connecting to a database and acquiring statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model; means for feeding back the evaluation results to the user; means for submitting an SQL query via a terminal; means for performing evaluation by inputting a prompt sentence to the generative model; and means for formatting the evaluation results and returning them to the user. This allows the user to perform a consistent process from submitting a query to receiving the evaluation results, making it possible to quickly and accurately evaluate the validity and risk of an SQL query and ensure database performance and security.

[0432] A "user" is a person or entity that submits SQL queries to the system.

[0433] A "query" is a command statement that requests a database to perform data manipulation or retrieve data.

[0434] A "server" is a computer system that receives queries from users, obtains statistical and resource information through communication with a database, and evaluates the queries using a generative model.

[0435] A "database" is a system that stores data in an organized manner and allows data to be searched and manipulated based on queries.

[0436] "Statistics" refers to numerical and quantitative data about tables in a database and their structure, such as the number of rows in a table and index information.

[0437] "Resource information" refers to information related to the performance of a database system, including, for example, CPU usage and memory usage.

[0438] A "generative model" is a computational model that uses machine learning and artificial intelligence techniques to evaluate the validity and risk of an input query.

[0439] "Validity" is a characteristic that indicates whether a query is suitable for its intended purpose and does not interfere with the operation of the database.

[0440] "Risk" is the likelihood of a query potentially having a negative impact or problem on the database system.

[0441] "Feedback" refers to information returned to the user based on the evaluation results of the generative model, including a risk assessment of the query and recommendations for performance improvement.

[0442] A "terminal" is a device through which a user accesses the system and submits SQL queries, such as a computer or smartphone.

[0443] A "prompt sentence" is text that is provided as input to a generative model and includes a query and related information.

[0444] The present invention relates to a system for automatically assessing the validity and risk of SQL queries submitted by users. The system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from databases, evaluating the queries using generative models, and providing feedback of the evaluation results to the users.

[0445] First, a user submits an SQL query via a web interface or API using a terminal. For example, they open a browser, access a specific URL, and enter and submit the query "SELECT FROM users WHERE age > 30." At this time, the server receives the HTTP request and analyzes the query content. This analyzed query is then passed to the database evaluation module.

[0446] The server connects to the database and obtains the necessary statistical and resource information. Specifically, the server executes the following SQL statement to collect the number of rows in the table, index information, current CPU usage, and memory usage. For example, it obtains information such as the target table has 100,000 rows, there is no index on the "age" column, CPU usage is 70%, and memory usage is 65%.

[0447] Next, the server inputs the acquired statistical and resource information and the user's query into a generative model. This generative model uses machine learning models such as GPT or BERT. Based on this information, the generative model evaluates the validity and risk of the query. For example, the generative model might evaluate "This query is likely to cause a large table scan" and generate a recommendation that "Adding an index should be considered to improve performance."

[0448] As a specific example, the following text is used as a prompt for the generative AI model:

[0449] User input: "SELECT FROM users WHERE age > 30"

[0450] Database Statistics:

[0451] Table: users

[0452] Number of rows: 100000

[0453] Index: no 'age' column

[0454] CPU usage: 70%

[0455] Memory usage: 65%

[0456] The generative model uses this information to assess the validity and risk of the query and recommend necessary improvements.

[0457] Finally, the server provides feedback from the generative model to the user, for example, via a web interface or API response, such as "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0458] This system allows users to perform a complete process from submitting a query to receiving the evaluation results, enabling them to quickly and accurately evaluate the validity and risk of SQL queries and ensure database performance and security.

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

[0460] Step 1:

[0461] Receiving queries

[0462] Input: SQL queries submitted by the user through the web interface or API

[0463] Output: Query information received by the server

[0464] Specific behavior:

[0465] User: Enters an SQL query into the web interface and clicks the "Submit" button, or sends a POST request to an API endpoint.

[0466] For example, enter the query "SELECT FROM users WHERE age > 30" and submit it.

[0467] Server: Receives the HTTP request, parses the query content, stores it in an intermediate data structure, and passes the query on to the next processing step.

[0468] Step 2:

[0469] Retrieving information from a database

[0470] Input: Query received by the server, database connection information

[0471] Output: Statistical and resource information obtained.

[0472] Specific behavior:

[0473] Server: Connect to the database and retrieve the necessary statistics and resource information by executing SQL statements such as the following:

[0474] sql

[0475] SELECT COUNT() FROM users;

[0476] SHOW INDEXES FROM users;

[0477] Server: Store information retrieved from the database in variables and data structures. For example, check that the table "users" has 100,000 rows, that there is no index on the "age" column, that CPU usage is 70%, and that memory usage is 65%.

[0478] Step 3:

[0479] Evaluation using generative models

[0480] Input: Retrieved statistics and resource information, user queries

[0481] Output: The query evaluation results by the generative model

[0482] Specific behavior:

[0483] Server: The server inputs the acquired statistical information, resource information, and user queries into a generative AI model, which uses machine learning models such as GPT and BERT.

[0484] How a generative AI model works: The model analyzes input data and assesses its validity and risk.

[0485] Example: The generative model determines that "this query is likely to result in a large table scan" and recommends "add an index to the 'age' column."

[0486] Enter the following as an example prompt statement:

[0487] Prompt statement:

[0488] User input: "SELECT FROM users WHERE age > 30"

[0489] Database Statistics:

[0490] Table: users

[0491] Number of rows: 100000

[0492] Index: no 'age' column

[0493] CPU usage: 70%

[0494] Memory usage: 65%

[0495] Server: Receives the output of the generative model, parses it, and formats it into a human-readable format.

[0496] Step 4:

[0497] Feedback of evaluation results

[0498] Input: Evaluation results formatted by the generative model

[0499] Output: Feedback information to the user

[0500] Specific behavior:

[0501] Server: Formats the evaluation results from the generative model and provides feedback to the user.

[0502] On the device: Feedback results are displayed via the web interface or API response, such as "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0503] User: Review the feedback and revise the query as needed.

[0504] This continuous processing step allows users to go from submitting an SQL query to receiving the evaluation results in a consistent manner, enabling them to quickly and accurately evaluate the validity and risk of the query.

[0505] (Application example 1)

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

[0507] Conventional systems faced the challenge of providing real-time feedback when evaluating the validity and risk of SQL queries. Users could not quickly receive evaluation results and improvement suggestions on their own communication devices, which meant that database performance and security could not be adequately ensured. Furthermore, remote management was difficult, and there was a lack of means to monitor the database status in real time. To solve these issues, a new system was needed.

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

[0509] In this invention, the server includes means for receiving a query input from a user, means for connecting to a database and acquiring statistical information and resource information, means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model, means for feeding back the evaluation result to the user, and means for displaying the evaluation result and improvement suggestions on the user's communication terminal in real time. This allows the user to check the SQL query evaluation result and improvement suggestions in real time on their own communication terminal, making it possible to improve the performance and security of the database.

[0510] The "means for receiving a query input by a user" is a means for receiving an SQL query input by a user through a communication terminal and transmitting it to a server.

[0511] "Means for connecting to a database and obtaining statistical information and resource information" refers to means for accessing a database and collecting statistical information (e.g., table data volume and index information) and resource usage (central processing unit usage rate, memory usage rate, etc.).

[0512] "Means for providing acquired statistical information and resource information as input to a generative model and using the generative model to assess the validity and risk of a query" refers to means for inputting collected statistical information and resource information into a generative AI model and using the model to automatically assess the validity and execution risk of an SQL query.

[0513] "Means for providing feedback of evaluation results to users" refers to means for communicating the results of evaluation by the generative AI model to users, and the evaluation results include a risk assessment of the query and suggestions for improvement.

[0514] "Means for displaying evaluation results and improvement suggestions on the user's communication terminal in real time" refers to means for displaying evaluation results and improvement suggestions on the user's communication terminal without delay, allowing the user to take appropriate action immediately.

[0515] The system that realizes this application example is composed of the following components: a user's communication terminal, a server, and a database. The specific operation of each component will now be described.

[0516] Overall system configuration

[0517] Client (user's communication device):

[0518] Device type: Communication devices such as smartphones and tablets.

[0519] Languages ​​and Frameworks: Python, Flask. The communication terminal accesses the server via a web interface or API.

[0520] Function: Users input SQL queries using a communication terminal and receive evaluation results and improvement suggestions in real time.

[0521] server:

[0522] Languages ​​and Frameworks: Python, FastAPI.

[0523] AI Model: A generative AI model powered by TensorFlow or PyTorch.

[0524] Database: PostgreSQL or MySQL.

[0525] Function: The server receives SQL queries from the communication device, queries the database to obtain the necessary statistical and resource information, inputs the obtained information into a generative AI model, evaluates the validity and risk of the query, and provides feedback on the evaluation results to the communication device.

[0526] Explanation of program processing

[0527] 1. Receiving a query:

[0528] The server receives the SQL query sent from the user's communication terminal.

[0529] Based on the query received by the server, it passes it to the next processing step.

[0530] 2. Retrieving information from the database:

[0531] The server connects to the database and obtains statistical information and resource information such as the amount of data in the target table, index information, central processing unit usage rate, memory usage rate, etc.

[0532] 3. Evaluation using generative models:

[0533] The server inputs the acquired statistical and resource information into a generative AI model to assess the validity and risk of the query.

[0534] The assessment includes the risk of a query causing large table scans and recommendations for adding indexes to improve performance.

[0535] 4. Feedback of evaluation results:

[0536] The server then provides the user with feedback on the results of the generated AI model, including a risk assessment of the query and suggestions for improvement.

[0537] The results are displayed in real time on the user's communication terminal, enabling a quick response.

[0538] Specific examples

[0539] As a concrete example, consider the case where a user inputs the SQL query "SELECT FROM orders WHERE status = 'PENDING'". The server retrieves the data volume (5,000 rows) of the table "orders" from the database, index information, central processing unit utilization (40%), and memory utilization (50%). Based on this information, the generative AI model evaluates the query's risk (e.g., "medium risk") and suggests improvements ("consider adding an index to the status column"). The evaluation results are fed back to the user's communication device in real time.

[0540] Prompt Sentence Examples

[0541] Evaluate the validity and risk of SQL queries submitted by users. Using generative AI models, we evaluate the query's risk and output recommendations for performance improvement, taking into account the amount of data in the target table, index information, database resource utilization, and more.

[0542] Sample query: "SELECT FROM orders WHERE status = 'PENDING'"

[0543] Statistics: Table row count = 5000, status column not indexed, CPU usage = 40%, Memory usage = 50%

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

[0545] Step 1:

[0546] The user uses a communication terminal to enter an SQL query and send it to the server. As input, the user enters an SQL query (e.g., "SELECT FROM orders WHERE status = 'PENDING'"). The server receives the query and passes it to the next processing step. The server stores the received query in the request body. As output, it returns a response indicating that the query was successfully received.

[0547] Step 2:

[0548] The server connects to the database. As input, it requires connection information (database URL, authentication information, etc.) required to execute the received SQL query. Based on the received query, the server obtains the amount of data in the target table "orders". It also runs a query to confirm that no index exists on the target column "status". It also obtains the database's CPU usage (e.g., 40%) and memory usage (e.g., 50%). As output, it obtains data volume, index information, and resource usage data.

[0549] Step 3:

[0550] The server inputs the acquired statistical and resource information into the generative AI model. Numerical data such as the amount of data in the table, index information, CPU usage, and memory usage are required as input. The server passes this information to the generative AI model, which then evaluates the validity and risk of the query. Specific data processing involves converting the input data into an appropriate format and providing it to the model. As output, the generative AI model returns a risk assessment of the query and recommendations for improving performance (e.g., "Consider adding an index to the status column").

[0551] Step 4:

[0552] The server feeds back to the user the evaluation results and recommendations returned by the generative AI model. The output data of the generative AI model is required as input. The server formats and sends the evaluation results and recommendations for display on the user's communication device in real time. As output, the user can check the evaluation results of the SQL query and improvement suggestions on the communication device. The user receives the results in real time and can take appropriate action quickly.

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

[0554] This invention relates to a system that automatically evaluates the validity and risk of SQL queries submitted by users, recognizes the user's emotions, and provides appropriate feedback. This system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from a database, evaluating the queries using a generative model, recognizing the user's emotions using an emotion engine and adjusting the feedback, and providing the evaluation results as feedback to the user.

[0555] System Operation Overview

[0556] 1. Receiving a query

[0557] Terminal: The user enters an SQL query through a web interface or API, for example submitting the query "SELECT FROM users WHERE age > 30".

[0558] Server: The server receives queries from users and temporarily stores them.

[0559] 2. Retrieving information from the database

[0560] Server: The server connects to the database and obtains statistical information (e.g., table size and index information) and resource information (e.g., CPU usage and memory usage) for the target table.

[0561] 3. Evaluation using generative models

[0562] Server: Based on the collected statistics and resource information, the server inputs the user's query into a generative model, which uses this data to assess the validity and risk of the query.

[0563] For example, the generative model may assess that "this query is likely to result in a large table scan" and generate a recommendation that "you should consider adding an index to improve performance."

[0564] 4. Recognition of user emotions using an emotion engine

[0565] Device: As users interact with the web interface, sensor data such as webcams and voice input devices are collected to recognize user emotions in real time.

[0566] Server: The server analyzes these sensor data and identifies the user's emotional state (e.g., stress, satisfaction, dissatisfaction, etc.).

[0567] 5. Feedback of evaluation results

[0568] Server: The server generates feedback based on the evaluation results from the generative model. It adjusts the content and presentation of the feedback based on the user's emotional state. For example, if the user is feeling stressed, it simplifies the feedback and uses more positive language.

[0569] On the device, the feedback received from the server is displayed to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column.", appropriately adjusted according to the user's emotional state.

[0570] Specific examples

[0571] Step 1: The user submits the following SQL query to the server: SELECT FROM users WHERE age > 30.

[0572] Step 2: The server connects to the database and finds that the table has 100,000 rows, there is no index on the 'age' column, and the CPU usage is 70% and the memory usage is 65%.

[0573] Step 3: The server passes this information to the generative model to evaluate the query. The generative model evaluates the "risk of high table scans" and recommends "adding an index to the 'age' column."

[0574] Step 4: Analyze the data collected from the webcam and voice input device to recognize the user's emotional state. For example, it may be determined that the user is feeling stressed.

[0575] Step 5: The server generates feedback based on the assessment and adjusts it to take into account the user's emotional state. It displays a more positive feedback to the user: "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0576] In this way, our system efficiently evaluates SQL queries submitted by users, ensuring database performance and security, while providing feedback that takes into account the user's emotional state, resulting in a better user experience.

[0577] The processing flow will be explained below.

[0578] Step 1:

[0579] A user enters an SQL query through a web interface or API, for example submitting a query such as "SELECT FROM users WHERE age > 30".

[0580] Step 2:

[0581] The terminal sends the SQL query received from the user to the server, which passes the user's query to the system.

[0582] Step 3:

[0583] The server temporarily stores the SQL query received from the user and prepares it for the next process, then opens a connection to the database.

[0584] Step 4:

[0585] The server sends a query to the database to get statistics on the table in question, for example, it issues an SQL query to get the number of rows and index information for the "users" table.

[0586] Step 5:

[0587] The server collects the statistics returned from the database and then retrieves resource information, including CPU and memory usage for the database.

[0588] Step 6:

[0589] The server collects these statistics and resource information and prepares a prompt to input to the generative model (AI model), which includes the user's query, database statistics, and resource information.

[0590] Step 7:

[0591] The server inputs the prepared prompts into the generative model and instructs it to evaluate the validity and risk of the query. The generative model evaluates the query based on the given data.

[0592] Step 8:

[0593] The server receives and analyzes the results from the generative model, which include a risk assessment of the query and recommendations for improving performance.

[0594] Step 9:

[0595] To recognize the user's emotional state, the device collects sensor data from a webcam, voice input device, etc., thereby obtaining real-time emotional information of the user.

[0596] Step 10:

[0597] The server analyzes these sensor data to determine the user's emotional state (e.g., stress, satisfaction, dissatisfaction, etc.) using an emotion engine.

[0598] Step 11:

[0599] The server generates feedback that takes into account the user's emotional state based on the evaluation results from the generative model. If the user is feeling stressed, the server simplifies the feedback and uses more positive expressions.

[0600] Step 12:

[0601] The device displays the feedback received from the server to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column," and adjusts the content appropriately depending on the user's emotional state.

[0602] This series of processes realizes a system that efficiently evaluates the validity and risk of SQL queries submitted by users and provides feedback that takes into account the user's emotional state.

[0603] Example 2

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

[0605] Conventional systems lack the ability to evaluate the validity and risk of SQL queries submitted by users. Furthermore, the feedback of the evaluation results is uniform and does not take into account the user's emotional state, which reduces the effectiveness of the feedback. To address these issues, the present invention provides a system that automatically evaluates the validity and risk of SQL queries and provides feedback based on user emotional recognition.

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

[0607] In this invention, the server includes: means for receiving a query input from a user; means for connecting to a database and acquiring statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model; means for feeding back the evaluation result to the user; and means for recognizing the user's emotional state and adjusting the feedback content. This makes it possible to efficiently evaluate the validity and risk of an SQL query and provide appropriate feedback that takes the user's emotional state into consideration while ensuring database performance and security.

[0608] A "user" is someone who uses the system to submit SQL queries.

[0609] A "query" is an instruction to a database to search for or manipulate data.

[0610] A "database" is a system that manages a collection of data and enables efficient searching and manipulation.

[0611] "Statistical information" refers to meta-information and performance data about tables, columns, etc. in a database.

[0612] "Resource information" is information that indicates the operational status of the database system, and includes CPU usage rate, memory usage rate, and the like.

[0613] A "generative model" is an artificial intelligence model that generates useful information from input data.

[0614] "Validity" refers to the suitability of an SQL query to obtain the intended results accurately and efficiently.

[0615] "Risks" are negative aspects such as performance or security issues that may be caused by SQL queries.

[0616] "Feedback" refers to information about evaluation results and improvement measures that the system provides to the user.

[0617] "Emotional state" refers to the psychological state that a user shows while using the system, and includes stress, satisfaction, dissatisfaction, etc.

[0618] "Emotion recognition" is a technology that identifies a user's emotional state from their facial expressions, voice, etc.

[0619] A "means" is a method or apparatus for performing a particular function or process.

[0620] The present invention is a system that automatically evaluates the validity and risk of SQL queries submitted by users, recognizes the user's emotions, and provides appropriate feedback. This system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from a database, evaluating the queries using a generative model, recognizing the user's emotions using an emotion engine and adjusting the feedback, and providing the evaluation results to the user.

[0621] First, a user enters an SQL query from their device via a web interface or API. For example, they might submit a query like "SELECT FROM users WHERE age > 30." The server receives this query and temporarily stores it. This typically involves using a server framework such as Node.js or Python's Flask.

[0622] Next, the server connects to the database (e.g., PostgreSQL or MySQL) and retrieves statistics and resource information about the query. This is done using the database driver (e.g., psycopg2 for PostgreSQL) to retrieve statistics such as table size and index information, and resource information such as CPU usage and memory usage. Specifically, the server retrieves statistics by executing a query such as "SELECT pg_stat_get_db_tuples_returned(dbid) FROM pg_stat_database WHERE datname='your_database';".

[0623] The server then provides the collected statistical and resource information as input to a generative model (e.g., OpenAI's GPT-4). The generative model uses this data to evaluate the appropriateness and risk of the SQL query. The evaluation results indicate potential performance issues and resource usage risks that the query may cause. Recommendations for improving performance are also generated. An example of a specific prompt is, "A user has submitted the SQL query 'SELECT FROM users WHERE age > 30'. Please evaluate this query to determine its risks and appropriateness, and if possible, provide recommendations for improving performance."

[0624] Next, while the user is operating the web interface, the device collects sensor data from the webcam, voice input device, etc. to recognize the user's emotional state. The server receives this sensor data and inputs it into an emotion recognition engine. The emotion recognition engine analyzes the user's facial expressions and tone of voice to determine their emotional state (e.g., stress, satisfaction, dissatisfaction, etc.). For example, OpenCV or Microsoft Azure's emotion recognition API could be used.

[0625] Finally, the server generates feedback based on the evaluation results obtained from the generative model and the user's emotional state obtained from the emotion recognition engine. The feedback content is adjusted taking into account the user's emotional state. For example, if the user is feeling stressed, the feedback content is simplified and uses more positive language. The device displays this feedback to the user, specifically, "Risk assessment: High. Performance recommendation: Consider adding an index to the age column."

[0626] In this way, our system can efficiently evaluate the validity and risk of SQL queries, ensure database performance and security, and provide feedback that takes into account the user's emotional state, resulting in a better user experience.

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

[0628] Step 1: Receiving a query from the user

[0629] Terminal: The user enters an SQL query through a web interface or API, for example submitting the query "SELECT FROM users WHERE age > 30".

[0630] Input: The SQL query entered by the user.

[0631] Server: The server receives queries from users and temporarily stores them. This is done using a server framework such as Node.js or Python's Flask.

[0632] Output: A temporarily saved SQL query.

[0633] Step 2: Retrieving information from the database

[0634] Server: The server connects to a database (e.g., PostgreSQL or MySQL) based on the stored query, using a database driver (e.g., psycopg2 for PostgreSQL).

[0635] Input: A temporarily saved SQL query.

[0636] Server: The server obtains statistical information (e.g., table size and index information) and resource information (e.g., CPU usage and memory usage) for the target table from the database. Specifically, it obtains the statistical information by executing a query such as "SELECT pg_stat_get_db_tuples_returned(dbid) FROM pg_stat_database WHERE datname='your_database';".

[0637] Output: Retrieved statistics and resource information.

[0638] Step 3: Evaluation using a generative model

[0639] Server: The server provides the acquired statistical and resource information as input to a generative model (e.g., OpenAI's GPT-4).

[0640] Input: Statistics and resource information.

[0641] Server: The generative model evaluates the appropriateness and risk of the SQL query based on the provided data. The evaluation results indicate the performance issues and resource usage risks that the query may cause. An example of a specific prompt is, "A user has submitted the SQL query 'SELECT FROM users WHERE age > 30'. Please evaluate this query to determine its risks and appropriateness, and if possible, provide recommendations for improving performance."

[0642] Output: A validity and risk assessment of the query, and recommendations for improving performance.

[0643] Step 4: Recognizing user emotions with the emotion engine

[0644] Device: Collect sensor data from webcams, voice input devices, etc. while the user interacts with the web interface. Incorporate emotion recognition APIs (e.g., Microsoft Azure Face API) using JavaScript libraries or as microservices.

[0645] Input: Data from the user's webcam and audio input devices.

[0646] Server: The server receives these sensor data and inputs them into an emotion recognition engine, which analyzes the user's facial expressions and tone of voice to determine their emotional state (e.g., stress, satisfaction, dissatisfaction, etc.).

[0647] Output: Data about the user's emotional state.

[0648] Step 5: Feedback of the evaluation results

[0649] Server: The server generates feedback based on the evaluation results obtained from the generative model and the user's emotional state obtained from the emotion recognition engine. Specifically, it adjusts the feedback content taking into account the user's emotional state. For example, if the user is feeling stressed, it simplifies the feedback content and uses more positive expressions.

[0650] Input: query validity assessment and risk assessment, user emotional state.

[0651] Server: Generates feedback content and provides it to the user.

[0652] On the device, the feedback sent by the server is displayed to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the age column.", with appropriate adjustments.

[0653] Output: Feedback provided to the user.

[0654] Through the above processing steps, the system efficiently evaluates SQL queries submitted by users, ensures database performance and security, and provides appropriate feedback that takes into account the user's emotional state.

[0655] (Application example 2)

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

[0657] Conventional autonomous vehicle fleet management systems not only handle queries about operational data and routes inefficiently, but also do not provide feedback that takes into account the emotional state of the fleet manager. This makes the system cumbersome to operate and makes efficient fleet management difficult. Another problem is the lack of insight into real-time operational status and vehicle performance when assessing the validity and risk of queries.

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

[0659] In this invention, the server includes means for receiving a query input from a user, means for connecting to a database and acquiring statistical information and resource information, means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model, means for recognizing the emotional state of the user, and means for feeding back the evaluation result based on the emotional state of the user. This enables the operation manager to grasp the operation status more intuitively and efficiently and receive appropriate feedback.

[0660] A "query" is a request or inquiry made by a user to a database.

[0661] A "database" is a collection of data that is organized so that large amounts of data can be efficiently managed, searched, and updated.

[0662] "Statistical information" is numerical information about data in tables, columns, rows, etc. in a database.

[0663] "Resource information" is information about the status of system resources such as CPU usage and memory usage of a database system.

[0664] A "generative model" is a model that uses machine learning and artificial intelligence techniques to learn specific patterns and features from data and make predictions and classifications.

[0665] "Validity" is a concept that indicates whether an SQL query complies with the rules and requirements of the system.

[0666] A "risk" is a potential negative impact or problem caused by executing an SQL query.

[0667] "Feedback" refers to the evaluation results and advice that the system provides to the user.

[0668] "Emotional state" refers to the psychological state such as stress, satisfaction, or dissatisfaction that a user feels while operating a system.

[0669] The present invention aims to efficiently process queries about operational data and routes in an autonomous vehicle fleet management system, providing insights into operational status and vehicle performance, and improving the efficiency of the fleet management process by recognizing the emotional state of the fleet manager and providing appropriate feedback.

[0670] System configuration

[0671] The system includes the following components:

[0672] 1. User device: A device such as a smartphone or smart glasses that allows the operation manager to input queries and receive feedback.

[0673] 2. Server: This is the central processing unit that receives queries, connects to the database, evaluates them using the generative model, recognizes emotions using the emotion engine, and provides feedback.

[0674] 3. Database: A database system that stores statistical information and resource information about vehicles.

[0675] 4. Generative model: A model that uses machine learning and artificial intelligence techniques to evaluate user queries.

[0676] 5. Emotion engine: This engine analyzes data obtained from cameras and voice input devices to recognize the emotional state of the operations manager.

[0677] Program processing overview

[0678] The program in this system performs the following steps:

[0679] 1. Receiving a query: The server receives a query entered from a user terminal. For example, a query like "What is the battery status of the current vehicle?"

[0680] 2. Retrieving information from the database: The server connects to the database to retrieve statistical and resource information such as the vehicle's battery status, current route information, and operating hours.

[0681] 3. Evaluation using a generative model: The server provides the acquired statistical and resource information as input to a generative model to evaluate the validity and risk of the query. For example, if the battery level is low, the server may recommend using a charging station along the way.

[0682] 4. Recognition of the emotions of the dispatcher using an emotion engine: Data acquired from the camera and voice input device installed on the user's device is analyzed to recognize the emotional state of the dispatcher, determining whether they are feeling stressed, etc.

[0683] 5. Feedback of evaluation results: The server generates feedback based on the evaluation results from the generative model and adjusts the content presented to the dispatcher taking into account their emotional state. For example, if the dispatcher is feeling stressed, the server will make the evaluation results more concise and positive.

[0684] Examples of concrete examples and prompts

[0685] For example, a prompt to be input to a generative AI model might look like this:

[0686] "Evaluate SQL queries regarding the battery status of autonomous vehicles and provide feedback on recommended rerouting when the vehicle's battery capacity is below 50%."

[0687] This allows the AI ​​model to generate specific recommendations and tailor feedback to the user depending on the emotional state of the fleet manager.

[0688] As described above, the present invention is a system that enables operation managers to grasp operation conditions more intuitively and efficiently and receive appropriate feedback.

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

[0690] Step 1:

[0691] Receiving queries

[0692] The user operates a smartphone or smart glasses and inputs a query such as "Please tell me the battery status of the current vehicle in operation." The query sent from the device is received by the server.

[0693] Input: A query from the user

[0694] Output: Query saved on the server

[0695] Specific operation: Form input on the smart device and query submission. The server side receives the HTTP request and temporarily saves the query.

[0696] Step 2:

[0697] Retrieving information from a database

[0698] The server connects to the database to obtain statistical and resource information for the target vehicle, such as battery status, current route information, and operating hours.

[0699] Input: A query saved on the server

[0700] Output: Vehicle information obtained

[0701] Specific operation: The server establishes a database connection, issues an SQL query to retrieve data, and temporarily stores the vehicle information obtained as a response.

[0702] Step 3:

[0703] Evaluation using generative models

[0704] The server provides the acquired statistical and resource information as input to the generative model to evaluate the validity and risk of the query, for example, recommending stopping at a charging station along the way if the battery level is low.

[0705] Input: Vehicle information obtained

[0706] Output: Evaluation results by generative model

[0707] Specific operation: The server inputs the acquired statistical information into the AI ​​model to obtain the assessment result. The AI ​​model processes the input data and generates a risk assessment and recommendations.

[0708] Step 4:

[0709] Recognizing the emotions of dispatchers using an emotion engine

[0710] The server receives data acquired from the camera and voice input device installed on the user's device and analyzes it to recognize emotions, for example, to determine whether the operation manager is feeling stressed.

[0711] Input: Data from cameras and audio input devices

[0712] Output: Perceived emotional state

[0713] How it works: The device collects data using a camera and microphone and sends it to a server, which then uses emotion recognition software to analyze the data and identify the user's emotional state.

[0714] Step 5:

[0715] Feedback of evaluation results

[0716] The server generates feedback based on the evaluation results from the generative model and adjusts the content presented to the driver based on the driver's emotional state. For example, if the driver is feeling stressed, the server will make the evaluation results more concise and positive.

[0717] Input: Evaluation results from the generative model and the perceived emotional state

[0718] Output: Adjusted feedback content

[0719] Specific operation: The server combines the evaluation result and the emotional state to generate a feedback message, which is sent to the user's device and displayed to the operation manager.

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

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

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

[0723] [Third embodiment]

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

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

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

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

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

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

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

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

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

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

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

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

[0736] The present invention relates to a system for automatically assessing the validity and risk of SQL queries submitted by users. The system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from databases, evaluating the queries using generative models, and providing feedback of the evaluation results to the users.

[0737] System Operation Overview

[0738] 1. Receiving a query

[0739] Terminal: The user submits an SQL query via a web interface or API, for example "SELECT FROM users WHERE age > 30" to the server.

[0740] Server: The server receives the query from the user and passes it on to the next processing step.

[0741] 2. Retrieving information from the database

[0742] Server: The server connects to the database and obtains the necessary statistical and resource information, such as the amount of data in the target table, index information, CPU usage and memory usage of the database, etc.

[0743] 3. Evaluation using generative models

[0744] Server: The server inputs the acquired statistical and resource information and the user's query into the generative model, which then uses this data to evaluate the validity and risk of the query.

[0745] Specifically, the generative model evaluates whether a query is likely to result in a large table scan, and generates recommendations such as whether to add an index to improve performance.

[0746] 4. Feedback of evaluation results

[0747] Terminal: The server provides feedback to the user based on the results of the generative model, including a risk assessment of the query and recommendations for improving performance.

[0748] For example, the feedback might say something like, "Risk assessment: High. Performance recommendation: Consider adding an index on the 'age' column."

[0749] Specific examples

[0750] Step 1: The user submits the following SQL query to the server: SELECT FROM users WHERE age > 30.

[0751] Step 2: The server connects to the database and finds that the table has 100,000 rows, there is no index on the 'age' column, and the CPU usage is 70% and the memory usage is 65%.

[0752] Step 3: The server passes this information to the generative model to evaluate the query. The generative model evaluates the "risk of high table scans" and recommends "adding an index to the 'age' column."

[0753] Step 4: The server returns the evaluation results to the user and provides feedback including the risk of the query and suggestions for improvement.

[0754] In this way, the system can efficiently evaluate SQL queries submitted by users, improving business efficiency while ensuring database performance and security.

[0755] The processing flow will be explained below.

[0756] Step 1:

[0757] A user enters an SQL query through a web interface or API, for example submitting a query such as "SELECT FROM users WHERE age > 30".

[0758] Step 2:

[0759] The terminal sends the SQL query received from the user to the server, which passes the user's query to the system.

[0760] Step 3:

[0761] The server temporarily stores the SQL query received from the user and prepares it for the next process, then opens a connection to the database.

[0762] Step 4:

[0763] The server sends a query to the database to get statistics on the table in question, for example, it issues an SQL query to get the number of rows and index information for the "users" table.

[0764] Step 5:

[0765] The server collects the statistics returned from the database and then retrieves resource information, including CPU and memory usage for the database.

[0766] Step 6:

[0767] The server collects these statistics and resource information and prepares a prompt to input to the generative model (AI model), which includes the user's query, database statistics, and resource information.

[0768] Step 7:

[0769] The server inputs the prepared prompts into the generative model and instructs it to evaluate the validity and risk of the query. The generative model evaluates the query based on the given data.

[0770] Step 8:

[0771] The server receives and analyzes the results from the generative model, which include a risk assessment of the query and recommendations for improving performance.

[0772] Step 9:

[0773] The server generates feedback based on the evaluation results, which includes detailed information about the risks and suggestions for improvement.

[0774] Step 10:

[0775] The terminal displays the feedback received from the server to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0776] Through this series of steps, a system is created that ensures database performance and security by evaluating the validity and risk of SQL queries submitted by users and providing feedback to the users.

[0777] Example 1

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

[0779] Conventional SQL query evaluation systems often have difficulty accurately and quickly evaluating the validity and risk of queries submitted by users. Furthermore, few systems offer an integrated process for acquiring resource and statistical information and providing feedback on evaluation results. As a result, database performance and security are often not adequately ensured. Furthermore, there is a lack of a convenient way for users to seamlessly complete the entire process, from submitting queries to receiving evaluation results.

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

[0781] In this invention, the server includes: means for receiving a query input from a user; means for connecting to a database and acquiring statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model; means for feeding back the evaluation results to the user; means for submitting an SQL query via a terminal; means for performing evaluation by inputting a prompt sentence to the generative model; and means for formatting the evaluation results and returning them to the user. This allows the user to perform a consistent process from submitting a query to receiving the evaluation results, making it possible to quickly and accurately evaluate the validity and risk of an SQL query and ensure database performance and security.

[0782] A "user" is a person or entity that submits SQL queries to the system.

[0783] A "query" is a command statement that requests a database to perform data manipulation or retrieve data.

[0784] A "server" is a computer system that receives queries from users, obtains statistical and resource information through communication with a database, and evaluates the queries using a generative model.

[0785] A "database" is a system that stores data in an organized manner and allows data to be searched and manipulated based on queries.

[0786] "Statistics" refers to numerical and quantitative data about tables in a database and their structure, such as the number of rows in a table and index information.

[0787] "Resource information" refers to information related to the performance of a database system, including, for example, CPU usage and memory usage.

[0788] A "generative model" is a computational model that uses machine learning and artificial intelligence techniques to evaluate the validity and risk of an input query.

[0789] "Validity" is a characteristic that indicates whether a query is suitable for its intended purpose and does not interfere with the operation of the database.

[0790] "Risk" is the likelihood of a query potentially having a negative impact or problem on the database system.

[0791] "Feedback" refers to information returned to the user based on the evaluation results of the generative model, including a risk assessment of the query and recommendations for performance improvement.

[0792] A "terminal" is a device through which a user accesses the system and submits SQL queries, such as a computer or smartphone.

[0793] A "prompt sentence" is text that is provided as input to a generative model and includes a query and related information.

[0794] The present invention relates to a system for automatically assessing the validity and risk of SQL queries submitted by users. The system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from databases, evaluating the queries using generative models, and providing feedback of the evaluation results to the users.

[0795] First, a user submits an SQL query via a web interface or API using a terminal. For example, they open a browser, access a specific URL, and enter and submit the query "SELECT FROM users WHERE age > 30." At this time, the server receives the HTTP request and analyzes the query content. This analyzed query is then passed to the database evaluation module.

[0796] The server connects to the database and obtains the necessary statistical and resource information. Specifically, the server executes the following SQL statement to collect the number of rows in the table, index information, current CPU usage, and memory usage. For example, it obtains information such as the target table has 100,000 rows, there is no index on the "age" column, CPU usage is 70%, and memory usage is 65%.

[0797] Next, the server inputs the acquired statistical and resource information and the user's query into a generative model. This generative model uses machine learning models such as GPT or BERT. Based on this information, the generative model evaluates the validity and risk of the query. For example, the generative model might evaluate "This query is likely to cause a large table scan" and generate a recommendation that "Adding an index should be considered to improve performance."

[0798] As a specific example, the following text is used as a prompt for the generative AI model:

[0799] User input: "SELECT FROM users WHERE age > 30"

[0800] Database Statistics:

[0801] Table: users

[0802] Number of rows: 100000

[0803] Index: no 'age' column

[0804] CPU usage: 70%

[0805] Memory usage: 65%

[0806] The generative model uses this information to assess the validity and risk of the query and recommend necessary improvements.

[0807] Finally, the server provides feedback from the generative model to the user, for example, via a web interface or API response, such as "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0808] This system allows users to perform a complete process from submitting a query to receiving the evaluation results, enabling them to quickly and accurately evaluate the validity and risk of SQL queries and ensure database performance and security.

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

[0810] Step 1:

[0811] Receiving queries

[0812] Input: SQL queries submitted by the user through the web interface or API

[0813] Output: Query information received by the server

[0814] Specific behavior:

[0815] User: Enters an SQL query into the web interface and clicks the "Submit" button, or sends a POST request to an API endpoint.

[0816] For example, enter the query "SELECT FROM users WHERE age > 30" and submit it.

[0817] Server: Receives the HTTP request, parses the query content, stores it in an intermediate data structure, and passes the query on to the next processing step.

[0818] Step 2:

[0819] Retrieving information from a database

[0820] Input: Query received by the server, database connection information

[0821] Output: Statistical and resource information obtained.

[0822] Specific behavior:

[0823] Server: Connect to the database and retrieve the necessary statistics and resource information by executing SQL statements such as the following:

[0824] sql

[0825] SELECT COUNT() FROM users;

[0826] SHOW INDEXES FROM users;

[0827] Server: Store information retrieved from the database in variables and data structures. For example, check that the table "users" has 100,000 rows, that there is no index on the "age" column, that CPU usage is 70%, and that memory usage is 65%.

[0828] Step 3:

[0829] Evaluation using generative models

[0830] Input: Retrieved statistics and resource information, user queries

[0831] Output: The query evaluation results by the generative model

[0832] Specific behavior:

[0833] Server: The server inputs the acquired statistical information, resource information, and user queries into a generative AI model, which uses machine learning models such as GPT and BERT.

[0834] How a generative AI model works: The model analyzes input data and assesses its validity and risk.

[0835] Example: The generative model determines that "this query is likely to result in a large table scan" and recommends "add an index to the 'age' column."

[0836] Enter the following as an example prompt statement:

[0837] Prompt statement:

[0838] User input: "SELECT FROM users WHERE age > 30"

[0839] Database Statistics:

[0840] Table: users

[0841] Number of rows: 100000

[0842] Index: no 'age' column

[0843] CPU usage: 70%

[0844] Memory usage: 65%

[0845] Server: Receives the output of the generative model, parses it, and formats it into a human-readable format.

[0846] Step 4:

[0847] Feedback of evaluation results

[0848] Input: Evaluation results formatted by the generative model

[0849] Output: Feedback information to the user

[0850] Specific behavior:

[0851] Server: Formats the evaluation results from the generative model and provides feedback to the user.

[0852] On the device: Feedback results are displayed via the web interface or API response, such as "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0853] User: Review the feedback and revise the query as needed.

[0854] This continuous processing step allows users to go from submitting an SQL query to receiving the evaluation results in a consistent manner, enabling them to quickly and accurately evaluate the validity and risk of the query.

[0855] (Application example 1)

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

[0857] Conventional systems faced the challenge of providing real-time feedback when evaluating the validity and risk of SQL queries. Users could not quickly receive evaluation results and improvement suggestions on their own communication devices, which meant that database performance and security could not be adequately ensured. Furthermore, remote management was difficult, and there was a lack of means to monitor the database status in real time. To solve these issues, a new system was needed.

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

[0859] In this invention, the server includes means for receiving a query input from a user, means for connecting to a database and acquiring statistical information and resource information, means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model, means for feeding back the evaluation result to the user, and means for displaying the evaluation result and improvement suggestions on the user's communication terminal in real time. This allows the user to check the SQL query evaluation result and improvement suggestions in real time on their own communication terminal, making it possible to improve the performance and security of the database.

[0860] The "means for receiving a query input by a user" is a means for receiving an SQL query input by a user through a communication terminal and transmitting it to a server.

[0861] "Means for connecting to a database and obtaining statistical information and resource information" refers to means for accessing a database and collecting statistical information (e.g., table data volume and index information) and resource usage (central processing unit usage rate, memory usage rate, etc.).

[0862] "Means for providing acquired statistical information and resource information as input to a generative model and using the generative model to assess the validity and risk of a query" refers to means for inputting collected statistical information and resource information into a generative AI model and using the model to automatically assess the validity and execution risk of an SQL query.

[0863] "Means for providing feedback of evaluation results to users" refers to means for communicating the results of evaluation by the generative AI model to users, and the evaluation results include a risk assessment of the query and suggestions for improvement.

[0864] "Means for displaying evaluation results and improvement suggestions on the user's communication terminal in real time" refers to means for displaying evaluation results and improvement suggestions on the user's communication terminal without delay, allowing the user to take appropriate action immediately.

[0865] The system that realizes this application example is composed of the following components: a user's communication terminal, a server, and a database. The specific operation of each component will now be described.

[0866] Overall system configuration

[0867] Client (user's communication device):

[0868] Device type: Communication devices such as smartphones and tablets.

[0869] Languages ​​and Frameworks: Python, Flask. The communication terminal accesses the server via a web interface or API.

[0870] Function: Users input SQL queries using a communication terminal and receive evaluation results and improvement suggestions in real time.

[0871] server:

[0872] Languages ​​and Frameworks: Python, FastAPI.

[0873] AI Model: A generative AI model powered by TensorFlow or PyTorch.

[0874] Database: PostgreSQL or MySQL.

[0875] Function: The server receives SQL queries from the communication device, queries the database to obtain the necessary statistical and resource information, inputs the obtained information into a generative AI model, evaluates the validity and risk of the query, and provides feedback on the evaluation results to the communication device.

[0876] Explanation of program processing

[0877] 1. Receiving a query:

[0878] The server receives the SQL query sent from the user's communication terminal.

[0879] Based on the query received by the server, it passes it to the next processing step.

[0880] 2. Retrieving information from the database:

[0881] The server connects to the database and obtains statistical information and resource information such as the amount of data in the target table, index information, central processing unit usage rate, memory usage rate, etc.

[0882] 3. Evaluation using generative models:

[0883] The server inputs the acquired statistical and resource information into a generative AI model to assess the validity and risk of the query.

[0884] The assessment includes the risk of a query causing large table scans and recommendations for adding indexes to improve performance.

[0885] 4. Feedback of evaluation results:

[0886] The server then provides the user with feedback on the results of the generated AI model, including a risk assessment of the query and suggestions for improvement.

[0887] The results are displayed in real time on the user's communication terminal, enabling a quick response.

[0888] Specific examples

[0889] As a concrete example, consider the case where a user inputs the SQL query "SELECT FROM orders WHERE status = 'PENDING'". The server retrieves the data volume (5,000 rows) of the table "orders" from the database, index information, central processing unit utilization (40%), and memory utilization (50%). Based on this information, the generative AI model evaluates the query's risk (e.g., "medium risk") and suggests improvements ("consider adding an index to the status column"). The evaluation results are fed back to the user's communication device in real time.

[0890] Prompt Sentence Examples

[0891] Evaluate the validity and risk of SQL queries submitted by users. Using generative AI models, we evaluate the query's risk and output recommendations for performance improvement, taking into account the amount of data in the target table, index information, database resource utilization, and more.

[0892] Sample query: "SELECT FROM orders WHERE status = 'PENDING'"

[0893] Statistics: Table row count = 5000, status column not indexed, CPU usage = 40%, Memory usage = 50%

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

[0895] Step 1:

[0896] The user uses a communication terminal to enter an SQL query and send it to the server. As input, the user enters an SQL query (e.g., "SELECT FROM orders WHERE status = 'PENDING'"). The server receives the query and passes it to the next processing step. The server stores the received query in the request body. As output, it returns a response indicating that the query was successfully received.

[0897] Step 2:

[0898] The server connects to the database. As input, it requires connection information (database URL, authentication information, etc.) required to execute the received SQL query. Based on the received query, the server obtains the amount of data in the target table "orders". It also runs a query to confirm that no index exists on the target column "status". It also obtains the database's CPU usage (e.g., 40%) and memory usage (e.g., 50%). As output, it obtains data volume, index information, and resource usage data.

[0899] Step 3:

[0900] The server inputs the acquired statistical and resource information into the generative AI model. Numerical data such as the amount of data in the table, index information, CPU usage, and memory usage are required as input. The server passes this information to the generative AI model, which then evaluates the validity and risk of the query. Specific data processing involves converting the input data into an appropriate format and providing it to the model. As output, the generative AI model returns a risk assessment of the query and recommendations for improving performance (e.g., "Consider adding an index to the status column").

[0901] Step 4:

[0902] The server feeds back to the user the evaluation results and recommendations returned by the generative AI model. The output data of the generative AI model is required as input. The server formats and sends the evaluation results and recommendations for display on the user's communication device in real time. As output, the user can check the evaluation results of the SQL query and improvement suggestions on the communication device. The user receives the results in real time and can take appropriate action quickly.

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

[0904] This invention relates to a system that automatically evaluates the validity and risk of SQL queries submitted by users, recognizes the user's emotions, and provides appropriate feedback. This system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from a database, evaluating the queries using a generative model, recognizing the user's emotions using an emotion engine and adjusting the feedback, and providing the evaluation results as feedback to the user.

[0905] System Operation Overview

[0906] 1. Receiving a query

[0907] Terminal: The user enters an SQL query through a web interface or API, for example submitting the query "SELECT FROM users WHERE age > 30".

[0908] Server: The server receives queries from users and temporarily stores them.

[0909] 2. Retrieving information from the database

[0910] Server: The server connects to the database and obtains statistical information (e.g., table size and index information) and resource information (e.g., CPU usage and memory usage) for the target table.

[0911] 3. Evaluation using generative models

[0912] Server: Based on the collected statistics and resource information, the server inputs the user's query into a generative model, which uses this data to assess the validity and risk of the query.

[0913] For example, the generative model may assess that "this query is likely to result in a large table scan" and generate a recommendation that "you should consider adding an index to improve performance."

[0914] 4. Recognition of user emotions using an emotion engine

[0915] Device: As users interact with the web interface, sensor data such as webcams and voice input devices are collected to recognize user emotions in real time.

[0916] Server: The server analyzes these sensor data and identifies the user's emotional state (e.g., stress, satisfaction, dissatisfaction, etc.).

[0917] 5. Feedback of evaluation results

[0918] Server: The server generates feedback based on the evaluation results from the generative model. It adjusts the content and presentation of the feedback based on the user's emotional state. For example, if the user is feeling stressed, it simplifies the feedback and uses more positive language.

[0919] On the device, the feedback received from the server is displayed to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column.", appropriately adjusted according to the user's emotional state.

[0920] Specific examples

[0921] Step 1: The user submits the following SQL query to the server: SELECT FROM users WHERE age > 30.

[0922] Step 2: The server connects to the database and finds that the table has 100,000 rows, there is no index on the 'age' column, and the CPU usage is 70% and the memory usage is 65%.

[0923] Step 3: The server passes this information to the generative model to evaluate the query. The generative model evaluates the "risk of high table scans" and recommends "adding an index to the 'age' column."

[0924] Step 4: Analyze the data collected from the webcam and voice input device to recognize the user's emotional state. For example, it may be determined that the user is feeling stressed.

[0925] Step 5: The server generates feedback based on the assessment and adjusts it to take into account the user's emotional state. It displays a more positive feedback to the user: "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[0926] In this way, our system efficiently evaluates SQL queries submitted by users, ensuring database performance and security, while providing feedback that takes into account the user's emotional state, resulting in a better user experience.

[0927] The processing flow will be explained below.

[0928] Step 1:

[0929] A user enters an SQL query through a web interface or API, for example submitting a query such as "SELECT FROM users WHERE age > 30".

[0930] Step 2:

[0931] The terminal sends the SQL query received from the user to the server, which passes the user's query to the system.

[0932] Step 3:

[0933] The server temporarily stores the SQL query received from the user and prepares it for the next process, then opens a connection to the database.

[0934] Step 4:

[0935] The server sends a query to the database to get statistics on the table in question, for example, it issues an SQL query to get the number of rows and index information for the "users" table.

[0936] Step 5:

[0937] The server collects the statistics returned from the database and then retrieves resource information, including CPU and memory usage for the database.

[0938] Step 6:

[0939] The server collects these statistics and resource information and prepares a prompt to input to the generative model (AI model), which includes the user's query, database statistics, and resource information.

[0940] Step 7:

[0941] The server inputs the prepared prompts into the generative model and instructs it to evaluate the validity and risk of the query. The generative model evaluates the query based on the given data.

[0942] Step 8:

[0943] The server receives and analyzes the results from the generative model, which include a risk assessment of the query and recommendations for improving performance.

[0944] Step 9:

[0945] To recognize the user's emotional state, the device collects sensor data from a webcam, voice input device, etc., thereby obtaining real-time emotional information of the user.

[0946] Step 10:

[0947] The server analyzes these sensor data to determine the user's emotional state (e.g., stress, satisfaction, dissatisfaction, etc.) using an emotion engine.

[0948] Step 11:

[0949] The server generates feedback that takes into account the user's emotional state based on the evaluation results from the generative model. If the user is feeling stressed, the server simplifies the feedback and uses more positive expressions.

[0950] Step 12:

[0951] The device displays the feedback received from the server to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column," and adjusts the content appropriately depending on the user's emotional state.

[0952] This series of processes realizes a system that efficiently evaluates the validity and risk of SQL queries submitted by users and provides feedback that takes into account the user's emotional state.

[0953] Example 2

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

[0955] Conventional systems lack the ability to evaluate the validity and risk of SQL queries submitted by users. Furthermore, the feedback of the evaluation results is uniform and does not take into account the user's emotional state, which reduces the effectiveness of the feedback. To address these issues, the present invention provides a system that automatically evaluates the validity and risk of SQL queries and provides feedback based on user emotional recognition.

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

[0957] In this invention, the server includes: means for receiving a query input from a user; means for connecting to a database and acquiring statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model; means for feeding back the evaluation result to the user; and means for recognizing the user's emotional state and adjusting the feedback content. This makes it possible to efficiently evaluate the validity and risk of an SQL query and provide appropriate feedback that takes the user's emotional state into consideration while ensuring database performance and security.

[0958] A "user" is someone who uses the system to submit SQL queries.

[0959] A "query" is an instruction to a database to search for or manipulate data.

[0960] A "database" is a system that manages a collection of data and enables efficient searching and manipulation.

[0961] "Statistical information" refers to meta-information and performance data about tables, columns, etc. in a database.

[0962] "Resource information" is information that indicates the operational status of the database system, and includes CPU usage rate, memory usage rate, and the like.

[0963] A "generative model" is an artificial intelligence model that generates useful information from input data.

[0964] "Validity" refers to the suitability of an SQL query to obtain the intended results accurately and efficiently.

[0965] "Risks" are negative aspects such as performance or security issues that may be caused by SQL queries.

[0966] "Feedback" refers to information about evaluation results and improvement measures that the system provides to the user.

[0967] "Emotional state" refers to the psychological state that a user shows while using the system, and includes stress, satisfaction, dissatisfaction, etc.

[0968] "Emotion recognition" is a technology that identifies a user's emotional state from their facial expressions, voice, etc.

[0969] A "means" is a method or apparatus for performing a particular function or process.

[0970] The present invention is a system that automatically evaluates the validity and risk of SQL queries submitted by users, recognizes the user's emotions, and provides appropriate feedback. This system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from a database, evaluating the queries using a generative model, recognizing the user's emotions using an emotion engine and adjusting the feedback, and providing the evaluation results to the user.

[0971] First, a user enters an SQL query from their device via a web interface or API. For example, they might submit a query like "SELECT FROM users WHERE age > 30." The server receives this query and temporarily stores it. This typically involves using a server framework such as Node.js or Python's Flask.

[0972] Next, the server connects to the database (e.g., PostgreSQL or MySQL) and retrieves statistics and resource information about the query. This is done using the database driver (e.g., psycopg2 for PostgreSQL) to retrieve statistics such as table size and index information, and resource information such as CPU usage and memory usage. Specifically, the server retrieves statistics by executing a query such as "SELECT pg_stat_get_db_tuples_returned(dbid) FROM pg_stat_database WHERE datname='your_database';".

[0973] The server then provides the collected statistical and resource information as input to a generative model (e.g., OpenAI's GPT-4). The generative model uses this data to evaluate the appropriateness and risk of the SQL query. The evaluation results indicate potential performance issues and resource usage risks that the query may cause. Recommendations for improving performance are also generated. An example of a specific prompt is, "A user has submitted the SQL query 'SELECT FROM users WHERE age > 30'. Please evaluate this query to determine its risks and appropriateness, and if possible, provide recommendations for improving performance."

[0974] Next, while the user is operating the web interface, the device collects sensor data from the webcam, voice input device, etc. to recognize the user's emotional state. The server receives this sensor data and inputs it into an emotion recognition engine. The emotion recognition engine analyzes the user's facial expressions and tone of voice to determine their emotional state (e.g., stress, satisfaction, dissatisfaction, etc.). For example, OpenCV or Microsoft Azure's emotion recognition API could be used.

[0975] Finally, the server generates feedback based on the evaluation results obtained from the generative model and the user's emotional state obtained from the emotion recognition engine. The feedback content is adjusted taking into account the user's emotional state. For example, if the user is feeling stressed, the feedback content is simplified and uses more positive language. The device displays this feedback to the user, specifically, "Risk assessment: High. Performance recommendation: Consider adding an index to the age column."

[0976] In this way, our system can efficiently evaluate the validity and risk of SQL queries, ensure database performance and security, and provide feedback that takes into account the user's emotional state, resulting in a better user experience.

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

[0978] Step 1: Receiving a query from the user

[0979] Terminal: The user enters an SQL query through a web interface or API, for example submitting the query "SELECT FROM users WHERE age > 30".

[0980] Input: The SQL query entered by the user.

[0981] Server: The server receives queries from users and temporarily stores them. This is done using a server framework such as Node.js or Python's Flask.

[0982] Output: A temporarily saved SQL query.

[0983] Step 2: Retrieving information from the database

[0984] Server: The server connects to a database (e.g., PostgreSQL or MySQL) based on the stored query, using a database driver (e.g., psycopg2 for PostgreSQL).

[0985] Input: A temporarily saved SQL query.

[0986] Server: The server obtains statistical information (e.g., table size and index information) and resource information (e.g., CPU usage and memory usage) for the target table from the database. Specifically, it obtains the statistical information by executing a query such as "SELECT pg_stat_get_db_tuples_returned(dbid) FROM pg_stat_database WHERE datname='your_database';".

[0987] Output: Retrieved statistics and resource information.

[0988] Step 3: Evaluation using a generative model

[0989] Server: The server provides the acquired statistical and resource information as input to a generative model (e.g., OpenAI's GPT-4).

[0990] Input: Statistics and resource information.

[0991] Server: The generative model evaluates the appropriateness and risk of the SQL query based on the provided data. The evaluation results indicate the performance issues and resource usage risks that the query may cause. An example of a specific prompt is, "A user has submitted the SQL query 'SELECT FROM users WHERE age > 30'. Please evaluate this query to determine its risks and appropriateness, and if possible, provide recommendations for improving performance."

[0992] Output: A validity and risk assessment of the query, and recommendations for improving performance.

[0993] Step 4: Recognizing user emotions with the emotion engine

[0994] Device: Collect sensor data from webcams, voice input devices, etc. while the user interacts with the web interface. Incorporate emotion recognition APIs (e.g., Microsoft Azure Face API) using JavaScript libraries or as microservices.

[0995] Input: Data from the user's webcam and audio input devices.

[0996] Server: The server receives these sensor data and inputs them into an emotion recognition engine, which analyzes the user's facial expressions and tone of voice to determine their emotional state (e.g., stress, satisfaction, dissatisfaction, etc.).

[0997] Output: Data about the user's emotional state.

[0998] Step 5: Feedback of the evaluation results

[0999] Server: The server generates feedback based on the evaluation results obtained from the generative model and the user's emotional state obtained from the emotion recognition engine. Specifically, it adjusts the feedback content taking into account the user's emotional state. For example, if the user is feeling stressed, it simplifies the feedback content and uses more positive expressions.

[1000] Input: query validity assessment and risk assessment, user emotional state.

[1001] Server: Generates feedback content and provides it to the user.

[1002] On the device, the feedback sent by the server is displayed to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the age column.", with appropriate adjustments.

[1003] Output: Feedback provided to the user.

[1004] Through the above processing steps, the system efficiently evaluates SQL queries submitted by users, ensures database performance and security, and provides appropriate feedback that takes into account the user's emotional state.

[1005] (Application example 2)

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

[1007] Conventional autonomous vehicle fleet management systems not only handle queries about operational data and routes inefficiently, but also do not provide feedback that takes into account the emotional state of the fleet manager. This makes the system cumbersome to operate and makes efficient fleet management difficult. Another problem is the lack of insight into real-time operational status and vehicle performance when assessing the validity and risk of queries.

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

[1009] In this invention, the server includes means for receiving a query input from a user, means for connecting to a database and acquiring statistical information and resource information, means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model, means for recognizing the emotional state of the user, and means for feeding back the evaluation result based on the emotional state of the user. This enables the operation manager to grasp the operation status more intuitively and efficiently and receive appropriate feedback.

[1010] A "query" is a request or inquiry made by a user to a database.

[1011] A "database" is a collection of data that is organized so that large amounts of data can be efficiently managed, searched, and updated.

[1012] "Statistical information" is numerical information about data in tables, columns, rows, etc. in a database.

[1013] "Resource information" is information about the status of system resources such as CPU usage and memory usage of a database system.

[1014] A "generative model" is a model that uses machine learning and artificial intelligence techniques to learn specific patterns and features from data and make predictions and classifications.

[1015] "Validity" is a concept that indicates whether an SQL query complies with the rules and requirements of the system.

[1016] A "risk" is a potential negative impact or problem caused by executing an SQL query.

[1017] "Feedback" refers to the evaluation results and advice that the system provides to the user.

[1018] "Emotional state" refers to the psychological state such as stress, satisfaction, or dissatisfaction that a user feels while operating a system.

[1019] The present invention aims to efficiently process queries about operational data and routes in an autonomous vehicle fleet management system, providing insights into operational status and vehicle performance, and improving the efficiency of the fleet management process by recognizing the emotional state of the fleet manager and providing appropriate feedback.

[1020] System configuration

[1021] The system includes the following components:

[1022] 1. User device: A device such as a smartphone or smart glasses that allows the operation manager to input queries and receive feedback.

[1023] 2. Server: This is the central processing unit that receives queries, connects to the database, evaluates them using the generative model, recognizes emotions using the emotion engine, and provides feedback.

[1024] 3. Database: A database system that stores statistical information and resource information about vehicles.

[1025] 4. Generative model: A model that uses machine learning and artificial intelligence techniques to evaluate user queries.

[1026] 5. Emotion engine: This engine analyzes data obtained from cameras and voice input devices to recognize the emotional state of the operations manager.

[1027] Program processing overview

[1028] The program in this system performs the following steps:

[1029] 1. Receiving a query: The server receives a query entered from a user terminal. For example, a query like "What is the battery status of the current vehicle?"

[1030] 2. Retrieving information from the database: The server connects to the database to retrieve statistical and resource information such as the vehicle's battery status, current route information, and operating hours.

[1031] 3. Evaluation using a generative model: The server provides the acquired statistical and resource information as input to a generative model to evaluate the validity and risk of the query. For example, if the battery level is low, the server may recommend using a charging station along the way.

[1032] 4. Recognition of the emotions of the dispatcher using an emotion engine: Data acquired from the camera and voice input device installed on the user's device is analyzed to recognize the emotional state of the dispatcher, determining whether they are feeling stressed, etc.

[1033] 5. Feedback of evaluation results: The server generates feedback based on the evaluation results from the generative model and adjusts the content presented to the dispatcher taking into account their emotional state. For example, if the dispatcher is feeling stressed, the server will make the evaluation results more concise and positive.

[1034] Examples of concrete examples and prompts

[1035] For example, a prompt to be input to a generative AI model might look like this:

[1036] "Evaluate SQL queries regarding the battery status of autonomous vehicles and provide feedback on recommended rerouting when the vehicle's battery capacity is below 50%."

[1037] This allows the AI ​​model to generate specific recommendations and tailor feedback to the user depending on the emotional state of the fleet manager.

[1038] As described above, the present invention is a system that enables operation managers to grasp operation conditions more intuitively and efficiently and receive appropriate feedback.

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

[1040] Step 1:

[1041] Receiving queries

[1042] The user operates a smartphone or smart glasses and inputs a query such as "Please tell me the battery status of the current vehicle in operation." The query sent from the device is received by the server.

[1043] Input: A query from the user

[1044] Output: Query saved on the server

[1045] Specific operation: Form input on the smart device and query submission. The server side receives the HTTP request and temporarily saves the query.

[1046] Step 2:

[1047] Retrieving information from a database

[1048] The server connects to the database to obtain statistical and resource information for the target vehicle, such as battery status, current route information, and operating hours.

[1049] Input: A query saved on the server

[1050] Output: Vehicle information obtained

[1051] Specific operation: The server establishes a database connection, issues an SQL query to retrieve data, and temporarily stores the vehicle information obtained as a response.

[1052] Step 3:

[1053] Evaluation using generative models

[1054] The server provides the acquired statistical and resource information as input to the generative model to evaluate the validity and risk of the query, for example, recommending stopping at a charging station along the way if the battery level is low.

[1055] Input: Vehicle information obtained

[1056] Output: Evaluation results by generative model

[1057] Specific operation: The server inputs the acquired statistical information into the AI ​​model to obtain the assessment result. The AI ​​model processes the input data and generates a risk assessment and recommendations.

[1058] Step 4:

[1059] Recognizing the emotions of dispatchers using an emotion engine

[1060] The server receives data acquired from the camera and voice input device installed on the user's device and analyzes it to recognize emotions, for example, to determine whether the operation manager is feeling stressed.

[1061] Input: Data from cameras and audio input devices

[1062] Output: Perceived emotional state

[1063] How it works: The device collects data using a camera and microphone and sends it to a server, which then uses emotion recognition software to analyze the data and identify the user's emotional state.

[1064] Step 5:

[1065] Feedback of evaluation results

[1066] The server generates feedback based on the evaluation results from the generative model and adjusts the content presented to the driver based on the driver's emotional state. For example, if the driver is feeling stressed, the server will make the evaluation results more concise and positive.

[1067] Input: Evaluation results from the generative model and the perceived emotional state

[1068] Output: Adjusted feedback content

[1069] Specific operation: The server combines the evaluation result and the emotional state to generate a feedback message, which is sent to the user's device and displayed to the operation manager.

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

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

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

[1073] [Fourth embodiment]

[1074] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.

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

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

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

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

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

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

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

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

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

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

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

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

[1087] The present invention relates to a system for automatically assessing the validity and risk of SQL queries submitted by users. The system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from databases, evaluating the queries using generative models, and providing feedback of the evaluation results to the users.

[1088] System Operation Overview

[1089] 1. Receiving a query

[1090] Terminal: The user submits an SQL query via a web interface or API, for example "SELECT FROM users WHERE age > 30" to the server.

[1091] Server: The server receives the query from the user and passes it on to the next processing step.

[1092] 2. Retrieving information from the database

[1093] Server: The server connects to the database and obtains the necessary statistical and resource information, such as the amount of data in the target table, index information, CPU usage and memory usage of the database, etc.

[1094] 3. Evaluation using generative models

[1095] Server: The server inputs the acquired statistical and resource information and the user's query into the generative model, which then uses this data to evaluate the validity and risk of the query.

[1096] Specifically, the generative model evaluates whether a query is likely to result in a large table scan, and generates recommendations such as whether to add an index to improve performance.

[1097] 4. Feedback of evaluation results

[1098] Terminal: The server provides feedback to the user based on the results of the generative model, including a risk assessment of the query and recommendations for improving performance.

[1099] For example, the feedback might say something like, "Risk assessment: High. Performance recommendation: Consider adding an index on the 'age' column."

[1100] Specific examples

[1101] Step 1: The user submits the following SQL query to the server: SELECT FROM users WHERE age > 30.

[1102] Step 2: The server connects to the database and finds that the table has 100,000 rows, there is no index on the 'age' column, and the CPU usage is 70% and the memory usage is 65%.

[1103] Step 3: The server passes this information to the generative model to evaluate the query. The generative model evaluates the "risk of high table scans" and recommends "adding an index to the 'age' column."

[1104] Step 4: The server returns the evaluation results to the user and provides feedback including the risk of the query and suggestions for improvement.

[1105] In this way, the system can efficiently evaluate SQL queries submitted by users, improving business efficiency while ensuring database performance and security.

[1106] The processing flow will be explained below.

[1107] Step 1:

[1108] A user enters an SQL query through a web interface or API, for example submitting a query such as "SELECT FROM users WHERE age > 30".

[1109] Step 2:

[1110] The terminal sends the SQL query received from the user to the server, which passes the user's query to the system.

[1111] Step 3:

[1112] The server temporarily stores the SQL query received from the user and prepares it for the next process, then opens a connection to the database.

[1113] Step 4:

[1114] The server sends a query to the database to get statistics on the table in question, for example, it issues an SQL query to get the number of rows and index information for the "users" table.

[1115] Step 5:

[1116] The server collects the statistics returned from the database and then retrieves resource information, including CPU and memory usage for the database.

[1117] Step 6:

[1118] The server collects these statistics and resource information and prepares a prompt to input to the generative model (AI model), which includes the user's query, database statistics, and resource information.

[1119] Step 7:

[1120] The server inputs the prepared prompts into the generative model and instructs it to evaluate the validity and risk of the query. The generative model evaluates the query based on the given data.

[1121] Step 8:

[1122] The server receives and analyzes the results from the generative model, which include a risk assessment of the query and recommendations for improving performance.

[1123] Step 9:

[1124] The server generates feedback based on the evaluation results, which includes detailed information about the risks and suggestions for improvement.

[1125] Step 10:

[1126] The terminal displays the feedback received from the server to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[1127] Through this series of steps, a system is created that ensures database performance and security by evaluating the validity and risk of SQL queries submitted by users and providing feedback to the users.

[1128] Example 1

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

[1130] Conventional SQL query evaluation systems often have difficulty accurately and quickly evaluating the validity and risk of queries submitted by users. Furthermore, few systems offer an integrated process for acquiring resource and statistical information and providing feedback on evaluation results. As a result, database performance and security are often not adequately ensured. Furthermore, there is a lack of a convenient way for users to seamlessly complete the entire process, from submitting queries to receiving evaluation results.

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

[1132] In this invention, the server includes: means for receiving a query input from a user; means for connecting to a database and acquiring statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model; means for feeding back the evaluation results to the user; means for submitting an SQL query via a terminal; means for performing evaluation by inputting a prompt sentence to the generative model; and means for formatting the evaluation results and returning them to the user. This allows the user to perform a consistent process from submitting a query to receiving the evaluation results, making it possible to quickly and accurately evaluate the validity and risk of an SQL query and ensure database performance and security.

[1133] A "user" is a person or entity that submits SQL queries to the system.

[1134] A "query" is a command statement that requests a database to perform data manipulation or retrieve data.

[1135] A "server" is a computer system that receives queries from users, obtains statistical and resource information through communication with a database, and evaluates the queries using a generative model.

[1136] A "database" is a system that stores data in an organized manner and allows data to be searched and manipulated based on queries.

[1137] "Statistics" refers to numerical and quantitative data about tables in a database and their structure, such as the number of rows in a table and index information.

[1138] "Resource information" refers to information related to the performance of a database system, including, for example, CPU usage and memory usage.

[1139] A "generative model" is a computational model that uses machine learning and artificial intelligence techniques to evaluate the validity and risk of an input query.

[1140] "Validity" is a characteristic that indicates whether a query is suitable for its intended purpose and does not interfere with the operation of the database.

[1141] "Risk" is the likelihood of a query potentially having a negative impact or problem on the database system.

[1142] "Feedback" refers to information returned to the user based on the evaluation results of the generative model, including a risk assessment of the query and recommendations for performance improvement.

[1143] A "terminal" is a device through which a user accesses the system and submits SQL queries, such as a computer or smartphone.

[1144] A "prompt sentence" is text that is provided as input to a generative model and includes a query and related information.

[1145] The present invention relates to a system for automatically assessing the validity and risk of SQL queries submitted by users. The system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from databases, evaluating the queries using generative models, and providing feedback of the evaluation results to the users.

[1146] First, a user submits an SQL query via a web interface or API using a terminal. For example, they open a browser, access a specific URL, and enter and submit the query "SELECT FROM users WHERE age > 30." At this time, the server receives the HTTP request and analyzes the query content. This analyzed query is then passed to the database evaluation module.

[1147] The server connects to the database and obtains the necessary statistical and resource information. Specifically, the server executes the following SQL statement to collect the number of rows in the table, index information, current CPU usage, and memory usage. For example, it obtains information such as the target table has 100,000 rows, there is no index on the "age" column, CPU usage is 70%, and memory usage is 65%.

[1148] Next, the server inputs the acquired statistical and resource information and the user's query into a generative model. This generative model uses machine learning models such as GPT or BERT. Based on this information, the generative model evaluates the validity and risk of the query. For example, the generative model might evaluate "This query is likely to cause a large table scan" and generate a recommendation that "Adding an index should be considered to improve performance."

[1149] As a specific example, the following text is used as a prompt for the generative AI model:

[1150] User input: "SELECT FROM users WHERE age > 30"

[1151] Database Statistics:

[1152] Table: users

[1153] Number of rows: 100000

[1154] Index: no 'age' column

[1155] CPU usage: 70%

[1156] Memory usage: 65%

[1157] The generative model uses this information to assess the validity and risk of the query and recommend necessary improvements.

[1158] Finally, the server provides feedback from the generative model to the user, for example, via a web interface or API response, such as "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[1159] This system allows users to perform a complete process from submitting a query to receiving the evaluation results, enabling them to quickly and accurately evaluate the validity and risk of SQL queries and ensure database performance and security.

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

[1161] Step 1:

[1162] Receiving queries

[1163] Input: SQL queries submitted by the user through the web interface or API

[1164] Output: Query information received by the server

[1165] Specific behavior:

[1166] User: Enters an SQL query into the web interface and clicks the "Submit" button, or sends a POST request to an API endpoint.

[1167] For example, enter the query "SELECT FROM users WHERE age > 30" and submit it.

[1168] Server: Receives the HTTP request, parses the query content, stores it in an intermediate data structure, and passes the query on to the next processing step.

[1169] Step 2:

[1170] Retrieving information from a database

[1171] Input: Query received by the server, database connection information

[1172] Output: Statistical and resource information obtained.

[1173] Specific behavior:

[1174] Server: Connect to the database and retrieve the necessary statistics and resource information by executing SQL statements such as the following:

[1175] sql

[1176] SELECT COUNT() FROM users;

[1177] SHOW INDEXES FROM users;

[1178] Server: Store information retrieved from the database in variables and data structures. For example, check that the table "users" has 100,000 rows, that there is no index on the "age" column, that CPU usage is 70%, and that memory usage is 65%.

[1179] Step 3:

[1180] Evaluation using generative models

[1181] Input: Retrieved statistics and resource information, user queries

[1182] Output: The query evaluation results by the generative model

[1183] Specific behavior:

[1184] Server: The server inputs the acquired statistical information, resource information, and user queries into a generative AI model, which uses machine learning models such as GPT and BERT.

[1185] How a generative AI model works: The model analyzes input data and assesses its validity and risk.

[1186] Example: The generative model determines that "this query is likely to result in a large table scan" and recommends "add an index to the 'age' column."

[1187] Enter the following as an example prompt statement:

[1188] Prompt statement:

[1189] User input: "SELECT FROM users WHERE age > 30"

[1190] Database Statistics:

[1191] Table: users

[1192] Number of rows: 100000

[1193] Index: no 'age' column

[1194] CPU usage: 70%

[1195] Memory usage: 65%

[1196] Server: Receives the output of the generative model, parses it, and formats it into a human-readable format.

[1197] Step 4:

[1198] Feedback of evaluation results

[1199] Input: Evaluation results formatted by the generative model

[1200] Output: Feedback information to the user

[1201] Specific behavior:

[1202] Server: Formats the evaluation results from the generative model and provides feedback to the user.

[1203] On the device: Feedback results are displayed via the web interface or API response, such as "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[1204] User: Review the feedback and revise the query as needed.

[1205] This continuous processing step allows users to go from submitting an SQL query to receiving the evaluation results in a consistent manner, enabling them to quickly and accurately evaluate the validity and risk of the query.

[1206] (Application example 1)

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

[1208] Conventional systems faced the challenge of providing real-time feedback when evaluating the validity and risk of SQL queries. Users could not quickly receive evaluation results and improvement suggestions on their own communication devices, which meant that database performance and security could not be adequately ensured. Furthermore, remote management was difficult, and there was a lack of means to monitor the database status in real time. To solve these issues, a new system was needed.

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

[1210] In this invention, the server includes means for receiving a query input from a user, means for connecting to a database and acquiring statistical information and resource information, means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model, means for feeding back the evaluation result to the user, and means for displaying the evaluation result and improvement suggestions on the user's communication terminal in real time. This allows the user to check the SQL query evaluation result and improvement suggestions in real time on their own communication terminal, making it possible to improve the performance and security of the database.

[1211] The "means for receiving a query input by a user" is a means for receiving an SQL query input by a user through a communication terminal and transmitting it to a server.

[1212] "Means for connecting to a database and obtaining statistical information and resource information" refers to means for accessing a database and collecting statistical information (e.g., table data volume and index information) and resource usage (central processing unit usage rate, memory usage rate, etc.).

[1213] "Means for providing acquired statistical information and resource information as input to a generative model and using the generative model to assess the validity and risk of a query" refers to means for inputting collected statistical information and resource information into a generative AI model and using the model to automatically assess the validity and execution risk of an SQL query.

[1214] "Means for providing feedback of evaluation results to users" refers to means for communicating the results of evaluation by the generative AI model to users, and the evaluation results include a risk assessment of the query and suggestions for improvement.

[1215] "Means for displaying evaluation results and improvement suggestions on the user's communication terminal in real time" refers to means for displaying evaluation results and improvement suggestions on the user's communication terminal without delay, allowing the user to take appropriate action immediately.

[1216] The system that realizes this application example is composed of the following components: a user's communication terminal, a server, and a database. The specific operation of each component will now be described.

[1217] Overall system configuration

[1218] Client (user's communication device):

[1219] Device type: Communication devices such as smartphones and tablets.

[1220] Languages ​​and Frameworks: Python, Flask. The communication terminal accesses the server via a web interface or API.

[1221] Function: Users input SQL queries using a communication terminal and receive evaluation results and improvement suggestions in real time.

[1222] server:

[1223] Languages ​​and Frameworks: Python, FastAPI.

[1224] AI Model: A generative AI model powered by TensorFlow or PyTorch.

[1225] Database: PostgreSQL or MySQL.

[1226] Function: The server receives SQL queries from the communication device, queries the database to obtain the necessary statistical and resource information, inputs the obtained information into a generative AI model, evaluates the validity and risk of the query, and provides feedback on the evaluation results to the communication device.

[1227] Explanation of program processing

[1228] 1. Receiving a query:

[1229] The server receives the SQL query sent from the user's communication terminal.

[1230] Based on the query received by the server, it passes it to the next processing step.

[1231] 2. Retrieving information from the database:

[1232] The server connects to the database and obtains statistical information and resource information such as the amount of data in the target table, index information, central processing unit usage rate, memory usage rate, etc.

[1233] 3. Evaluation using generative models:

[1234] The server inputs the acquired statistical and resource information into a generative AI model to assess the validity and risk of the query.

[1235] The assessment includes the risk of a query causing large table scans and recommendations for adding indexes to improve performance.

[1236] 4. Feedback of evaluation results:

[1237] The server then provides the user with feedback on the results of the generated AI model, including a risk assessment of the query and suggestions for improvement.

[1238] The results are displayed in real time on the user's communication terminal, enabling a quick response.

[1239] Specific examples

[1240] As a concrete example, consider the case where a user inputs the SQL query "SELECT FROM orders WHERE status = 'PENDING'". The server retrieves the data volume (5,000 rows) of the table "orders" from the database, index information, central processing unit utilization (40%), and memory utilization (50%). Based on this information, the generative AI model evaluates the query's risk (e.g., "medium risk") and suggests improvements ("consider adding an index to the status column"). The evaluation results are fed back to the user's communication device in real time.

[1241] Prompt Sentence Examples

[1242] Evaluate the validity and risk of SQL queries submitted by users. Using generative AI models, we evaluate the query's risk and output recommendations for performance improvement, taking into account the amount of data in the target table, index information, database resource utilization, and more.

[1243] Sample query: "SELECT FROM orders WHERE status = 'PENDING'"

[1244] Statistics: Table row count = 5000, status column not indexed, CPU usage = 40%, Memory usage = 50%

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

[1246] Step 1:

[1247] The user uses a communication terminal to enter an SQL query and send it to the server. As input, the user enters an SQL query (e.g., "SELECT FROM orders WHERE status = 'PENDING'"). The server receives the query and passes it to the next processing step. The server stores the received query in the request body. As output, it returns a response indicating that the query was successfully received.

[1248] Step 2:

[1249] The server connects to the database. As input, it requires connection information (database URL, authentication information, etc.) required to execute the received SQL query. Based on the received query, the server obtains the amount of data in the target table "orders". It also runs a query to confirm that no index exists on the target column "status". It also obtains the database's CPU usage (e.g., 40%) and memory usage (e.g., 50%). As output, it obtains data volume, index information, and resource usage data.

[1250] Step 3:

[1251] The server inputs the acquired statistical and resource information into the generative AI model. Numerical data such as the amount of data in the table, index information, CPU usage, and memory usage are required as input. The server passes this information to the generative AI model, which then evaluates the validity and risk of the query. Specific data processing involves converting the input data into an appropriate format and providing it to the model. As output, the generative AI model returns a risk assessment of the query and recommendations for improving performance (e.g., "Consider adding an index to the status column").

[1252] Step 4:

[1253] The server feeds back to the user the evaluation results and recommendations returned by the generative AI model. The output data of the generative AI model is required as input. The server formats and sends the evaluation results and recommendations for display on the user's communication device in real time. As output, the user can check the evaluation results of the SQL query and improvement suggestions on the communication device. The user receives the results in real time and can take appropriate action quickly.

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

[1255] This invention relates to a system that automatically evaluates the validity and risk of SQL queries submitted by users, recognizes the user's emotions, and provides appropriate feedback. This system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from a database, evaluating the queries using a generative model, recognizing the user's emotions using an emotion engine and adjusting the feedback, and providing the evaluation results as feedback to the user.

[1256] System Operation Overview

[1257] 1. Receiving a query

[1258] Terminal: The user enters an SQL query through a web interface or API, for example submitting the query "SELECT FROM users WHERE age > 30".

[1259] Server: The server receives queries from users and temporarily stores them.

[1260] 2. Retrieving information from the database

[1261] Server: The server connects to the database and obtains statistical information (e.g., table size and index information) and resource information (e.g., CPU usage and memory usage) for the target table.

[1262] 3. Evaluation using generative models

[1263] Server: Based on the collected statistics and resource information, the server inputs the user's query into a generative model, which uses this data to assess the validity and risk of the query.

[1264] For example, the generative model may assess that "this query is likely to result in a large table scan" and generate a recommendation that "you should consider adding an index to improve performance."

[1265] 4. Recognition of user emotions using an emotion engine

[1266] Device: As users interact with the web interface, sensor data such as webcams and voice input devices are collected to recognize user emotions in real time.

[1267] Server: The server analyzes these sensor data and identifies the user's emotional state (e.g., stress, satisfaction, dissatisfaction, etc.).

[1268] 5. Feedback of evaluation results

[1269] Server: The server generates feedback based on the evaluation results from the generative model. It adjusts the content and presentation of the feedback based on the user's emotional state. For example, if the user is feeling stressed, it simplifies the feedback and uses more positive language.

[1270] On the device, the feedback received from the server is displayed to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column.", appropriately adjusted according to the user's emotional state.

[1271] Specific examples

[1272] Step 1: The user submits the following SQL query to the server: SELECT FROM users WHERE age > 30.

[1273] Step 2: The server connects to the database and finds that the table has 100,000 rows, there is no index on the 'age' column, and the CPU usage is 70% and the memory usage is 65%.

[1274] Step 3: The server passes this information to the generative model to evaluate the query. The generative model evaluates the "risk of high table scans" and recommends "adding an index to the 'age' column."

[1275] Step 4: Analyze the data collected from the webcam and voice input device to recognize the user's emotional state. For example, it may be determined that the user is feeling stressed.

[1276] Step 5: The server generates feedback based on the assessment and adjusts it to take into account the user's emotional state. It displays a more positive feedback to the user: "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column."

[1277] In this way, our system efficiently evaluates SQL queries submitted by users, ensuring database performance and security, while providing feedback that takes into account the user's emotional state, resulting in a better user experience.

[1278] The processing flow will be explained below.

[1279] Step 1:

[1280] A user enters an SQL query through a web interface or API, for example submitting a query such as "SELECT FROM users WHERE age > 30".

[1281] Step 2:

[1282] The terminal sends the SQL query received from the user to the server, which passes the user's query to the system.

[1283] Step 3:

[1284] The server temporarily stores the SQL query received from the user and prepares it for the next process, then opens a connection to the database.

[1285] Step 4:

[1286] The server sends a query to the database to get statistics on the table in question, for example, it issues an SQL query to get the number of rows and index information for the "users" table.

[1287] Step 5:

[1288] The server collects the statistics returned from the database and then retrieves resource information, including CPU and memory usage for the database.

[1289] Step 6:

[1290] The server collects these statistics and resource information and prepares a prompt to input to the generative model (AI model), which includes the user's query, database statistics, and resource information.

[1291] Step 7:

[1292] The server inputs the prepared prompts into the generative model and instructs it to evaluate the validity and risk of the query. The generative model evaluates the query based on the given data.

[1293] Step 8:

[1294] The server receives and analyzes the results from the generative model, which include a risk assessment of the query and recommendations for improving performance.

[1295] Step 9:

[1296] To recognize the user's emotional state, the device collects sensor data from a webcam, voice input device, etc., thereby obtaining real-time emotional information of the user.

[1297] Step 10:

[1298] The server analyzes these sensor data to determine the user's emotional state (e.g., stress, satisfaction, dissatisfaction, etc.) using an emotion engine.

[1299] Step 11:

[1300] The server generates feedback that takes into account the user's emotional state based on the evaluation results from the generative model. If the user is feeling stressed, the server simplifies the feedback and uses more positive expressions.

[1301] Step 12:

[1302] The device displays the feedback received from the server to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the 'age' column," and adjusts the content appropriately depending on the user's emotional state.

[1303] This series of processes realizes a system that efficiently evaluates the validity and risk of SQL queries submitted by users and provides feedback that takes into account the user's emotional state.

[1304] Example 2

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

[1306] Conventional systems lack the ability to evaluate the validity and risk of SQL queries submitted by users. Furthermore, the feedback of the evaluation results is uniform and does not take into account the user's emotional state, which reduces the effectiveness of the feedback. To address these issues, the present invention provides a system that automatically evaluates the validity and risk of SQL queries and provides feedback based on user emotional recognition.

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

[1308] In this invention, the server includes: means for receiving a query input from a user; means for connecting to a database and acquiring statistical information and resource information; means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model; means for feeding back the evaluation result to the user; and means for recognizing the user's emotional state and adjusting the feedback content. This makes it possible to efficiently evaluate the validity and risk of an SQL query and provide appropriate feedback that takes the user's emotional state into consideration while ensuring database performance and security.

[1309] A "user" is someone who uses the system to submit SQL queries.

[1310] A "query" is an instruction to a database to search for or manipulate data.

[1311] A "database" is a system that manages a collection of data and enables efficient searching and manipulation.

[1312] "Statistical information" refers to meta-information and performance data about tables, columns, etc. in a database.

[1313] "Resource information" is information that indicates the operational status of the database system, and includes CPU usage rate, memory usage rate, and the like.

[1314] A "generative model" is an artificial intelligence model that generates useful information from input data.

[1315] "Validity" refers to the suitability of an SQL query to obtain the intended results accurately and efficiently.

[1316] "Risks" are negative aspects such as performance or security issues that may be caused by SQL queries.

[1317] "Feedback" refers to information about evaluation results and improvement measures that the system provides to the user.

[1318] "Emotional state" refers to the psychological state that a user shows while using the system, and includes stress, satisfaction, dissatisfaction, etc.

[1319] "Emotion recognition" is a technology that identifies a user's emotional state from their facial expressions, voice, etc.

[1320] A "means" is a method or apparatus for performing a particular function or process.

[1321] The present invention is a system that automatically evaluates the validity and risk of SQL queries submitted by users, recognizes the user's emotions, and provides appropriate feedback. This system performs a series of processes, including receiving queries from users, retrieving statistical and resource information from a database, evaluating the queries using a generative model, recognizing the user's emotions using an emotion engine and adjusting the feedback, and providing the evaluation results to the user.

[1322] First, a user enters an SQL query from their device via a web interface or API. For example, they might submit a query like "SELECT FROM users WHERE age > 30." The server receives this query and temporarily stores it. This typically involves using a server framework such as Node.js or Python's Flask.

[1323] Next, the server connects to the database (e.g., PostgreSQL or MySQL) and retrieves statistics and resource information about the query. This is done using the database driver (e.g., psycopg2 for PostgreSQL) to retrieve statistics such as table size and index information, and resource information such as CPU usage and memory usage. Specifically, the server retrieves statistics by executing a query such as "SELECT pg_stat_get_db_tuples_returned(dbid) FROM pg_stat_database WHERE datname='your_database';".

[1324] The server then provides the collected statistical and resource information as input to a generative model (e.g., OpenAI's GPT-4). The generative model uses this data to evaluate the appropriateness and risk of the SQL query. The evaluation results indicate potential performance issues and resource usage risks that the query may cause. Recommendations for improving performance are also generated. An example of a specific prompt is, "A user has submitted the SQL query 'SELECT FROM users WHERE age > 30'. Please evaluate this query to determine its risks and appropriateness, and if possible, provide recommendations for improving performance."

[1325] Next, while the user is operating the web interface, the device collects sensor data from the webcam, voice input device, etc. to recognize the user's emotional state. The server receives this sensor data and inputs it into an emotion recognition engine. The emotion recognition engine analyzes the user's facial expressions and tone of voice to determine their emotional state (e.g., stress, satisfaction, dissatisfaction, etc.). For example, OpenCV or Microsoft Azure's emotion recognition API could be used.

[1326] Finally, the server generates feedback based on the evaluation results obtained from the generative model and the user's emotional state obtained from the emotion recognition engine. The feedback content is adjusted taking into account the user's emotional state. For example, if the user is feeling stressed, the feedback content is simplified and uses more positive language. The device displays this feedback to the user, specifically, "Risk assessment: High. Performance recommendation: Consider adding an index to the age column."

[1327] In this way, our system can efficiently evaluate the validity and risk of SQL queries, ensure database performance and security, and provide feedback that takes into account the user's emotional state, resulting in a better user experience.

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

[1329] Step 1: Receiving a query from the user

[1330] Terminal: The user enters an SQL query through a web interface or API, for example submitting the query "SELECT FROM users WHERE age > 30".

[1331] Input: The SQL query entered by the user.

[1332] Server: The server receives queries from users and temporarily stores them. This is done using a server framework such as Node.js or Python's Flask.

[1333] Output: A temporarily saved SQL query.

[1334] Step 2: Retrieving information from the database

[1335] Server: The server connects to a database (e.g., PostgreSQL or MySQL) based on the stored query, using a database driver (e.g., psycopg2 for PostgreSQL).

[1336] Input: A temporarily saved SQL query.

[1337] Server: The server obtains statistical information (e.g., table size and index information) and resource information (e.g., CPU usage and memory usage) for the target table from the database. Specifically, it obtains the statistical information by executing a query such as "SELECT pg_stat_get_db_tuples_returned(dbid) FROM pg_stat_database WHERE datname='your_database';".

[1338] Output: Retrieved statistics and resource information.

[1339] Step 3: Evaluation using a generative model

[1340] Server: The server provides the acquired statistical and resource information as input to a generative model (e.g., OpenAI's GPT-4).

[1341] Input: Statistics and resource information.

[1342] Server: The generative model evaluates the appropriateness and risk of the SQL query based on the provided data. The evaluation results indicate the performance issues and resource usage risks that the query may cause. An example of a specific prompt is, "A user has submitted the SQL query 'SELECT FROM users WHERE age > 30'. Please evaluate this query to determine its risks and appropriateness, and if possible, provide recommendations for improving performance."

[1343] Output: A validity and risk assessment of the query, and recommendations for improving performance.

[1344] Step 4: Recognizing user emotions with the emotion engine

[1345] Device: Collect sensor data from webcams, voice input devices, etc. while the user interacts with the web interface. Incorporate emotion recognition APIs (e.g., Microsoft Azure Face API) using JavaScript libraries or as microservices.

[1346] Input: Data from the user's webcam and audio input devices.

[1347] Server: The server receives these sensor data and inputs them into an emotion recognition engine, which analyzes the user's facial expressions and tone of voice to determine their emotional state (e.g., stress, satisfaction, dissatisfaction, etc.).

[1348] Output: Data about the user's emotional state.

[1349] Step 5: Feedback of the evaluation results

[1350] Server: The server generates feedback based on the evaluation results obtained from the generative model and the user's emotional state obtained from the emotion recognition engine. Specifically, it adjusts the feedback content taking into account the user's emotional state. For example, if the user is feeling stressed, it simplifies the feedback content and uses more positive expressions.

[1351] Input: query validity assessment and risk assessment, user emotional state.

[1352] Server: Generates feedback content and provides it to the user.

[1353] On the device, the feedback sent by the server is displayed to the user, for example, "Risk assessment: High. Performance recommendation: Consider adding an index to the age column.", with appropriate adjustments.

[1354] Output: Feedback provided to the user.

[1355] Through the above processing steps, the system efficiently evaluates SQL queries submitted by users, ensures database performance and security, and provides appropriate feedback that takes into account the user's emotional state.

[1356] (Application example 2)

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

[1358] Conventional autonomous vehicle fleet management systems not only handle queries about operational data and routes inefficiently, but also do not provide feedback that takes into account the emotional state of the fleet manager. This makes the system cumbersome to operate and makes efficient fleet management difficult. Another problem is the lack of insight into real-time operational status and vehicle performance when assessing the validity and risk of queries.

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

[1360] In this invention, the server includes means for receiving a query input from a user, means for connecting to a database and acquiring statistical information and resource information, means for providing the acquired statistical information and resource information as input to a generative model and evaluating the validity and risk of the query using the generative model, means for recognizing the emotional state of the user, and means for feeding back the evaluation result based on the emotional state of the user. This enables the operation manager to grasp the operation status more intuitively and efficiently and receive appropriate feedback.

[1361] A "query" is a request or inquiry made by a user to a database.

[1362] A "database" is a collection of data that is organized so that large amounts of data can be efficiently managed, searched, and updated.

[1363] "Statistical information" is numerical information about data in tables, columns, rows, etc. in a database.

[1364] "Resource information" is information about the status of system resources such as CPU usage and memory usage of a database system.

[1365] A "generative model" is a model that uses machine learning and artificial intelligence techniques to learn specific patterns and features from data and make predictions and classifications.

[1366] "Validity" is a concept that indicates whether an SQL query complies with the rules and requirements of the system.

[1367] A "risk" is a potential negative impact or problem caused by executing an SQL query.

[1368] "Feedback" refers to the evaluation results and advice that the system provides to the user.

[1369] "Emotional state" refers to the psychological state such as stress, satisfaction, or dissatisfaction that a user feels while operating a system.

[1370] The present invention aims to efficiently process queries about operational data and routes in an autonomous vehicle fleet management system, providing insights into operational status and vehicle performance, and improving the efficiency of the fleet management process by recognizing the emotional state of the fleet manager and providing appropriate feedback.

[1371] System configuration

[1372] The system includes the following components:

[1373] 1. User device: A device such as a smartphone or smart glasses that allows the operation manager to input queries and receive feedback.

[1374] 2. Server: This is the central processing unit that receives queries, connects to the database, evaluates them using the generative model, recognizes emotions using the emotion engine, and provides feedback.

[1375] 3. Database: A database system that stores statistical information and resource information about vehicles.

[1376] 4. Generative model: A model that uses machine learning and artificial intelligence techniques to evaluate user queries.

[1377] 5. Emotion engine: This engine analyzes data obtained from cameras and voice input devices to recognize the emotional state of the operations manager.

[1378] Program processing overview

[1379] The program in this system performs the following steps:

[1380] 1. Receiving a query: The server receives a query entered from a user terminal. For example, a query like "What is the battery status of the current vehicle?"

[1381] 2. Retrieving information from the database: The server connects to the database to retrieve statistical and resource information such as the vehicle's battery status, current route information, and operating hours.

[1382] 3. Evaluation using a generative model: The server provides the acquired statistical and resource information as input to a generative model to evaluate the validity and risk of the query. For example, if the battery level is low, the server may recommend using a charging station along the way.

[1383] 4. Recognition of the emotions of the dispatcher using an emotion engine: Data acquired from the camera and voice input device installed on the user's device is analyzed to recognize the emotional state of the dispatcher, determining whether they are feeling stressed, etc.

[1384] 5. Feedback of evaluation results: The server generates feedback based on the evaluation results from the generative model and adjusts the content presented to the dispatcher taking into account their emotional state. For example, if the dispatcher is feeling stressed, the server will make the evaluation results more concise and positive.

[1385] Examples of concrete examples and prompts

[1386] For example, a prompt to be input to a generative AI model might look like this:

[1387] "Evaluate SQL queries regarding the battery status of autonomous vehicles and provide feedback on recommended rerouting when the vehicle's battery capacity is below 50%."

[1388] This allows the AI ​​model to generate specific recommendations and tailor feedback to the user depending on the emotional state of the fleet manager.

[1389] As described above, the present invention is a system that enables operation managers to grasp operation conditions more intuitively and efficiently and receive appropriate feedback.

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

[1391] Step 1:

[1392] Receiving queries

[1393] The user operates a smartphone or smart glasses and inputs a query such as "Please tell me the battery status of the current vehicle in operation." The query sent from the device is received by the server.

[1394] Input: A query from the user

[1395] Output: Query saved on the server

[1396] Specific operation: Form input on the smart device and query submission. The server side receives the HTTP request and temporarily saves the query.

[1397] Step 2:

[1398] Retrieving information from a database

[1399] The server connects to the database to obtain statistical and resource information for the target vehicle, such as battery status, current route information, and operating hours.

[1400] Input: A query saved on the server

[1401] Output: Vehicle information obtained

[1402] Specific operation: The server establishes a database connection, issues an SQL query to retrieve data, and temporarily stores the vehicle information obtained as a response.

[1403] Step 3:

[1404] Evaluation using generative models

[1405] The server provides the acquired statistical and resource information as input to the generative model to evaluate the validity and risk of the query, for example, recommending stopping at a charging station along the way if the battery level is low.

[1406] Input: Vehicle information obtained

[1407] Output: Evaluation results by generative model

[1408] Specific operation: The server inputs the acquired statistical information into the AI ​​model to obtain the assessment result. The AI ​​model processes the input data and generates a risk assessment and recommendations.

[1409] Step 4:

[1410] Recognizing the emotions of dispatchers using an emotion engine

[1411] The server receives data acquired from the camera and voice input device installed on the user's device and analyzes it to recognize emotions, for example, to determine whether the operation manager is feeling stressed.

[1412] Input: Data from cameras and audio input devices

[1413] Output: Perceived emotional state

[1414] How it works: The device collects data using a camera and microphone and sends it to a server, which then uses emotion recognition software to analyze the data and identify the user's emotional state.

[1415] Step 5:

[1416] Feedback of evaluation results

[1417] The server generates feedback based on the evaluation results from the generative model and adjusts the content presented to the driver based on the driver's emotional state. For example, if the driver is feeling stressed, the server will make the evaluation results more concise and positive.

[1418] Input: Evaluation results from the generative model and the perceived emotional state

[1419] Output: Adjusted feedback content

[1420] Specific operation: The server combines the evaluation result and the emotional state to generate a feedback message, which is sent to the user's device and displayed to the operation manager.

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

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

[1423] 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 robot 414.

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

[1425] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[1442] The following is further disclosed regarding the above embodiment.

[1443] (Claim 1)

[1444] means for receiving a query input from a user;

[1445] means for connecting to the database and retrieving statistical and resource information;

[1446] a means for providing the obtained statistical information and resource information as input to a generative model and using the generative model to evaluate the validity and risk of the query;

[1447] A means for feeding back the evaluation results to the user;

[1448] A system including:

[1449] (Claim 2)

[1450] 2. The system of claim 1, wherein the statistical information provided as input to the generative model includes the amount of data and index information of the target table.

[1451] (Claim 3)

[1452] 2. The system of claim 1, wherein the resource information provided as input to the generative model includes CPU usage and memory usage of the database.

[1453] "Example 1"

[1454] (Claim 1)

[1455] means for receiving a query input from a user;

[1456] means for connecting to the database and retrieving statistical and resource information;

[1457] a means for providing the obtained statistical information and resource information as input to a generative model and using the generative model to evaluate the validity and risk of the query;

[1458] A means for feeding back the evaluation results to the user;

[1459] a means for submitting SQL queries via a terminal;

[1460] A means for performing evaluation by inputting a prompt sentence into the generative model;

[1461] a means for formatting the evaluation results and returning them to the user;

[1462] A system including:

[1463] (Claim 2)

[1464] 2. The system of claim 1, wherein the statistical information provided as input to the generative model includes the amount of data and index information of the target table.

[1465] (Claim 3)

[1466] 2. The system of claim 1, wherein the resource information provided as input to the generative model includes CPU usage and memory usage of the database.

[1467] "Application Example 1"

[1468] (Claim 1)

[1469] means for receiving a query input from a user;

[1470] means for connecting to the database and retrieving statistical and resource information;

[1471] a means for providing the obtained statistical information and resource information as input to a generative model and using the generative model to evaluate the validity and risk of the query;

[1472] A means for feeding back the evaluation results to the user;

[1473] a means for displaying the evaluation results and improvement suggestions on the user's communication terminal in real time;

[1474] A system including:

[1475] (Claim 2)

[1476] 2. The system of claim 1, wherein the statistical information provided as input to the generative model includes the amount of data and index information of the target table.

[1477] (Claim 3)

[1478] 2. The system of claim 1, wherein the resource information provided as input to the generative model includes central processing unit utilization and memory utilization of the database.

[1479] "Example 2: Combining Emotion Engines"

[1480] (Claim 1)

[1481] means for receiving a query input from a user;

[1482] means for connecting to the database and retrieving statistical and resource information;

[1483] a means for providing the obtained statistical information and resource information as input to a generative model and using the generative model to evaluate the validity and risk of the query;

[1484] A means for feeding back the evaluation results to the user;

[1485] means for recognizing the user's emotional state and adjusting the feedback content;

[1486] A system including:

[1487] (Claim 2)

[1488] 2. The system of claim 1, wherein the statistical information provided as input to the generative model includes the amount of data and index information of the target table.

[1489] (Claim 3)

[1490] 2. The system of claim 1, wherein the resource information provided as input to the generative model includes CPU usage and memory usage of the database.

[1491] "Application example 2 when combining emotion engines"

[1492] (Claim 1)

[1493] means for receiving a query input from a user;

[1494] means for connecting to the database and retrieving statistical and resource information;

[1495] a means for providing the obtained statistical information and resource information as input to a generative model and using the generative model to evaluate the validity and risk of the query;

[1496] means for recognizing the emotional state of a user;

[1497] a means for feeding back the evaluation result based on the user's emotional state;

[1498] A system including:

[1499] (Claim 2)

[1500] 2. The system of claim 1, wherein the statistical information provided as input to the generative model includes the amount of data and index information of the target table.

[1501] (Claim 3)

[1502] 2. The system of claim 1, wherein the resource information provided as input to the generative model includes CPU usage and memory usage of the database. [Explanation of symbols]

[1503] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url:> < / url:> < / url:>

Claims

1. means for receiving a query input from a user; means for connecting to the database and retrieving statistical and resource information; a means for providing the obtained statistical information and resource information as input to a generative model and using the generative model to evaluate the validity and risk of the query; A means for feeding back the evaluation results to the user; A system including:

2. The system according to claim 1 , wherein the statistical information provided as input to the generative model includes the amount of data and index information of the target table.

3. The system of claim 1 , wherein the resource information provided as input to the generative model includes CPU usage and memory usage of the database.

Citation Information

Patent Citations

  • Persona chatbot control method and system

    JP2022180282A