system

The system automatically optimizes SQL queries by analyzing database tables and columns, generating tuning candidates, and selecting optimal plans, addressing inefficiencies that cause excessive resource consumption and high cloud costs.

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

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
SOFTBANK GROUP CORP
Filing Date
2024-10-01
Publication Date
2026-04-13

AI Technical Summary

Technical Problem

Inefficient SQL queries in data warehouses lead to excessive database resource consumption and increased cloud usage fees, necessitating manual and labor-intensive optimization methods.

Method used

A system that automatically analyzes and optimizes SQL queries by identifying database tables and columns, generating tuning candidates, evaluating them using a generative model, and selecting the optimal tuning plan, thereby reducing resource consumption and costs.

Benefits of technology

Enables efficient execution of SQL queries, improving database performance and lowering cloud usage fees through automated optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026063764000001_ABST
    Figure 2026063764000001_ABST
Patent Text Reader

Abstract

We provide the system. [Solution] A means of receiving database queries entered from the user terminal, A means for analyzing the aforementioned database query and identifying the database tables and columns to be used, A means for generating multiple tuning candidates based on the analysis results, A means for evaluating the aforementioned tuning candidates using a generative model and selecting the optimal tuning plan, A means of returning the aforementioned optimal tuning proposal to the user, A system that includes this.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0005]

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

Background Art

[0002] Patent Document 1 discloses a method for controlling a persona chatbot, which is performed by at least one processor, including steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to an explanation of a character of the chatbot, 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

Summary of the Invention

Problems to be Solved by the Invention

[0004] In a data warehouse (DWH), inefficient SQL queries created by users or SQL queries that impose an excessive load on the database cause wasteful consumption of database resources, resulting in an increase in cloud usage fees. To solve this problem, means for tuning and optimizing SQL queries before execution are necessary. However, conventional SQL tuning methods are often performed manually and require specialized knowledge, which poses a problem in terms of time and effort.

Means for Solving the Problems

[0005] The present invention provides a system that solves the above problems by receiving database queries entered from a user terminal and automatically analyzing and optimizing them. This system includes the following means: (1) means for receiving database queries entered from a user terminal; (2) means for analyzing the received database queries and identifying the database tables and columns to be used; (3) means for generating multiple tuning candidates based on the analysis results; (4) means for evaluating the generated tuning candidates using a generative model and selecting the optimal tuning plan; and (5) means for returning the optimal tuning plan to the user. Furthermore, the tuning candidates include the addition of database indexes, and a machine learning model is used for the generative model. This enables efficient execution of SQL queries, resulting in improved database performance and reduced cloud usage fees.

[0006] A "user terminal" is an electronic device used to enter SQL queries into a database.

[0007] A "database query" is an SQL statement that a user enters to access data within a database.

[0008] "Analysis" is the process of syntactically analyzing an input database query to identify its structure and the tables and columns it uses.

[0009] A "database table" is the basic unit of a database, consisting of rows and columns, used to systematically store data.

[0010] A "column" is a field in a database table that holds values ​​related to a specific attribute.

[0011] A "tuning suggestion" is a set of proposed changes or improvements to optimize database queries.

[0012] A "generative model" is an algorithm or machine learning model used to generate and evaluate optimal tuning candidates based on the results of analyzing database queries.

[0013] An "index" is a data structure created for a specific column to speed up database searches.

[0014] A "machine learning model" is an algorithm that learns from data and is used to perform specific tasks or make predictions. [Brief explanation of the drawing]

[0015] [Figure 1] This is a conceptual diagram showing an example of the configuration of a data processing system according to the first embodiment. [Figure 2] This is a conceptual diagram showing an example of the essential functions of a data processing device and a smart device according to the first embodiment. [Figure 3] This is a conceptual diagram showing an example of the configuration of a data processing system according to the second embodiment. [Figure 4] This is a conceptual diagram showing an example of the main functions of a data processing device and smart glasses according to the second embodiment. [Figure 5] This is a conceptual diagram showing an example of the configuration of a data processing system according to the third embodiment. [Figure 6] This is a conceptual diagram showing an example of the main functions of a data processing device and a headset-type terminal according to the third embodiment. [Figure 7] This is a conceptual diagram showing an example of the configuration of a data processing system according to the fourth embodiment. [Figure 8] This is a conceptual diagram showing an example of the main functions of a data processing device and a robot according to the fourth embodiment. [Figure 9] This shows an emotion map where multiple emotions are mapped. [Figure 10] This shows an emotion map where multiple emotions are mapped. [Figure 11] This is a sequence diagram showing the processing flow of the data processing system in Example 1. [Figure 12] It is a sequence diagram showing the processing flow of the data processing system in Application Example 1. [Figure 13] It is a sequence diagram showing the processing flow of the data processing system in Example 2 when the emotion engine is combined. [Figure 14] It is a sequence diagram showing the processing flow of the data processing system in Application Example 2 when the emotion engine is combined.

Embodiments for Carrying Out the Invention

[0016] Hereinafter, an example of an embodiment of a system according to the technology of the present disclosure will be described with reference to the accompanying drawings.

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

[0018] In the following embodiments, the labeled processor (hereinafter simply referred to as "processor") may be one arithmetic unit or a combination of multiple arithmetic units. Also, the processor may be one type of arithmetic unit or a combination of multiple types of arithmetic units. Examples of arithmetic units include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), an APU (Accelerated Processing Unit), and the like.

[0019] In the following embodiments, the labeled RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a work memory by the processor.

[0020] In the following embodiments, the signed storage is one or more non-volatile storage devices that store various programs and various parameters. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), or magnetic tapes.

[0021] In the following embodiments, the signed communication interface (I / F) is an interface that includes a communication processor and an antenna, etc. The communication interface manages communication between multiple computers. Examples of communication standards applicable to the communication interface include wireless communication standards such as 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), or Bluetooth (registered trademark).

[0022] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." That is, "A and / or B" means that it may be A alone, or B alone, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" applies when expressing three or more things linked by "and / or."

[0023] [First Embodiment]

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

[0025] As shown in Figure 1, the 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 comprises a computer 22, a database 24, and a communication interface 26. The computer 22 is an example of a "computer" related to the technology of this disclosure. The computer 22 comprises a processor 28, RAM 30, and storage 32. The processor 28, RAM 30, and storage 32 are connected to a bus 34. The database 24 and the communication interface 26 are also connected to the bus 34. The communication interface 26 is connected to a network 54. An example of the network 54 is a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0027] The smart device 14 comprises a computer 36, a reception device 38, an output device 40, a camera 42, and a communication interface 44. The computer 36 comprises a processor 46, RAM 48, and storage 50. The processor 46, RAM 48, and storage 50 are connected to a bus 52. The reception device 38, output device 40, and camera 42 are also connected to the bus 52.

[0028] The reception device 38 is equipped with a touch panel 38A and a microphone 38B, etc., and receives user input. The touch panel 38A receives user input by detecting contact with an object (e.g., a pen or finger). The microphone 38B receives user input by detecting the user's voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and 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 perceptible to the user 20 (e.g., audio and / or text). The display 40A displays visible information such as text and images according to instructions from the processor 46. The speaker 40B outputs audio according to instructions from the processor 46. The camera 42 is a small digital camera equipped with an optical system such as a lens, aperture, and shutter, and an image sensor such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.

[0030] Communication interface 44 is connected to network 54. Communication interfaces 44 and 26 are responsible for the exchange of various types of information between processor 46 and processor 28 via network 54.

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

[0032] As shown in Figure 2, in the data processing device 12, a specific processing 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" related to the technology of this 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 according to the specific processing program 56 executed on the RAM 30.

[0033] The storage 32 stores the data generation model 58 and the 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 processing. The storage 50 stores the reception output program 60. The reception output program 60 is used in conjunction with a 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 processing is realized by the processor 46 operating as a control unit 46A according to the reception output program 60 executed on the RAM 48.

[0035] Next, the specific processing performed by the specific processing unit 290 of the data processing device 12 will be described. In the following description, the data processing device 12 will be referred to as the "server" and the smart device 14 as the "terminal".

[0036] The system of this invention optimizes inefficient SQL queries and SQL queries that place an excessive load on the database using generative AI before execution. This reduces the consumption of unnecessary database resources and lowers cloud usage fees.

[0037] System program processing

[0038] SQL analysis

[0039] The user terminal enters an SQL query against the data warehouse. The server receives this query and passes it to the SQL parsing module. The SQL parsing module parses the query and identifies the tables and columns used. Based on these parsing results, the next step is initiated.

[0040] Generation of tuning candidates

[0041] The server generates tuning candidates using a tuning candidate generation module based on the analysis results. This module references existing indexes and table statistics to generate proposed changes necessary for performance improvement. These may include adding indexes or restructuring queries.

[0042] Evaluation using AI models

[0043] The server passes the generated tuning candidates to the AI ​​model calling module, which evaluates them using generative AI. This evaluation predicts the execution cost (CPU, memory, I / O, etc.) of each tuning candidate and selects the optimal candidate. The AI ​​model determines which optimization is best based on pre-trained data.

[0044] Optimized query return

[0045] The server returns optimized SQL queries to the user's terminal. This enables users to execute queries efficiently, resulting in improved DWH performance and reduced cloud usage costs.

[0046] Specific example

[0047] Suppose a user enters the following SQL query into the data warehouse:

[0048] sql

[0049] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0050] Operation description

[0051] 1. SQL parsing:

[0052] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0053] 2. Generating tuning candidates:

[0054] The server uses a tuning candidate generation module to generate suggestions for adding indexes. For example, it might generate suggestions for adding an index to the `region` column.

[0055] 3. Evaluation using AI models:

[0056] The server passes tuning candidates to the AI ​​model, which then evaluates each candidate. The AI ​​model determines that adding an index to the region column will improve query performance.

[0057] 4. Optimized query return:

[0058] The server returns an optimized SQL query to the user's terminal. The optimized SQL query looks like this:

[0059] sql

[0060] CREATE INDEX idx_region ON sales(region);

[0061] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0062] In this way, the system automatically analyzes and optimizes user-entered queries, enabling efficient query execution. As a result, improved database performance and reduced cloud usage fees can be expected.

[0063] The following describes the processing flow.

[0064] Step 1:

[0065] The user enters a database query from their terminal. The user enters the query they want to execute against the data warehouse (DWH) and presses the submit button.

[0066] Step 2:

[0067] The server receives database queries sent by the user. The received queries are passed to the server's SQL parsing module.

[0068] Step 3:

[0069] The server's SQL parsing module analyzes the database query. Specifically, it parses the query and identifies the tables, columns, and filter conditions used.

[0070] Step 4:

[0071] Based on the analysis results, the server uses a tuning candidate generation module to generate multiple tuning candidates. These may include suggestions such as adding indexes or restructuring queries.

[0072] Step 5:

[0073] The server passes the generated tuning candidates to the AI ​​model calling module. The AI ​​model calling module uses a pre-trained AI model to evaluate the execution cost of each tuning candidate and select the optimal tuning option.

[0074] Step 6:

[0075] After the server selects the optimal tuning plan, it generates optimized database queries. These optimized queries include adding indexes and refactoring existing queries.

[0076] Step 7:

[0077] The server returns database queries optimized for the user's terminal. The user can then use these optimized queries to execute queries efficiently on the database.

[0078] Specific examples of operation

[0079] The user enters the following SQL query:

[0080] sql

[0081] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0082] operation

[0083] 1. Step 1:

[0084] The user enters the above SQL query from their terminal and presses the submit button.

[0085] 2. Step 2:

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

[0087] 3. Step 3:

[0088] The server's SQL parsing module parses the query and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0089] 4. Step 4:

[0090] The server uses a tuning candidate generation module to generate tuning candidates, for example, one that adds an index to the region column.

[0091] 5. Step 5:

[0092] The server passes the generated tuning candidates to the AI ​​model calling module, which then evaluates each candidate. The AI ​​model selects adding an index to the region column as the optimal candidate.

[0093] 6. Step 6:

[0094] The server generates an optimized database query. The optimized query will look like this:

[0095] sql

[0096] CREATE INDEX idx_region ON sales(region);

[0097] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0098] 7. Step 7:

[0099] The server returns an optimized SQL query to the user's terminal. The user executes the returned query to achieve efficient query processing.

[0100] In this way, this system automatically analyzes and optimizes the queries entered by the user, enabling efficient query execution.

[0101] (Example 1)

[0102] Next, we will describe Example 1. In the following description, the data processing device 12 will be referred to as the "server," and the smart device 14 will be referred to as the "terminal."

[0103] Traditional database management systems suffered from inefficient SQL queries and SQL queries that placed excessive load on the database, resulting in wasted database resources. Furthermore, this led to increased cloud usage fees, raising operational costs. Conventional technologies required manual optimization of these inefficient queries, which was time-consuming and labor-intensive.

[0104] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 1 is realized by the following means.

[0105] In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database tables and columns to be used, means for generating a plurality of tuning candidates based on the analysis results, means for evaluating the tuning candidates using a generation AI model, predicting the execution cost of each candidate and selecting the optimal tuning plan, and means for returning the optimal tuning plan to the user. This enables automatic optimization of database queries, resulting in improved database performance and reduced cloud usage fees.

[0106] A "user terminal" is a device used by a user to enter database queries.

[0107] A "database query" is a set of instructions used to perform a specific operation on a database.

[0108] A "server" is a device or system that receives database queries from user terminals and performs analysis, evaluation, and optimization.

[0109] A "SQL parsing module" is a software module used to analyze database queries and identify the database tables and columns being used.

[0110] The "Tuning Candidate Generation Module" is a software module that generates multiple tuning candidates to improve the performance of database queries based on analysis results.

[0111] A "generative AI model" is an artificial intelligence model used to select the optimal tuning candidate based on data that has been trained on it in advance.

[0112] The "optimal tuning plan" refers to a specific method for optimizing the performance of database queries, selected based on an evaluation of the generative AI model.

[0113] A "database index" is a data structure used to improve the speed of searching for data within a database.

[0114] A "machine learning model" is a model constructed using algorithms that learn patterns and rules based on large amounts of data.

[0115] "Execution cost" refers to the amount of resources (CPU, memory, I / O, etc.) consumed when executing a database query.

[0116] The system of this invention comprises a user terminal, a server, an SQL analysis module, a tuning candidate generation module, and a generation AI model. The purpose of this system is to improve database performance and reduce cloud usage fees by automatically analyzing and optimizing database queries entered by the user.

[0117] First, the user uses a terminal to enter an SQL query against the data warehouse (DWH). For example, they would enter a query like this:

[0118] sql

[0119] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0120] This SQL query is sent from the user's terminal to the server.

[0121] Next, the server passes the received SQL query to the SQL parsing module. The SQL parsing module parses the query and identifies the tables and columns used. This parsing identifies the table (in this case, sales), columns (region and amount), and filter conditions (region = 'East' and amount > 1000) used in the query.

[0122] Next, the server uses a tuning candidate generation module based on the analysis results to generate tuning candidates. This module references existing indexes and table statistics to generate proposed changes necessary for performance improvement. Examples include proposals for adding database indexes and restructuring queries. In this specific example, a proposal to add an index to the region column is generated.

[0123] The server then passes the generated tuning candidates to the AI ​​model calling module, which uses the generating AI model to evaluate each candidate. In this evaluation process, the generating AI model predicts the execution cost (CPU, memory, I / O, etc.) of each tuning candidate and selects the optimal tuning candidate. The generating AI model is a machine learning model that operates based on pre-trained data, and in this specific example, it determines that adding an index to the region column is the optimal solution.

[0124] Finally, the server generates an optimized query and returns it to the user's terminal. A concrete example of an optimized SQL query is shown below:

[0125] sql

[0126] CREATE INDEX idx_region ON sales(region);

[0127] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0128] This allows users to execute queries efficiently, resulting in improved database performance and reduced cloud usage costs.

[0129] As this specific example illustrates, the novelty of the invention lies in its ability to automatically perform everything from parsing to optimizing SQL queries, and in its use of a generative AI model to select the optimal tuning candidate. An example of a prompt statement is the following:

[0130] Analyze the given SQL query, generate optimal tuning candidates, select the most effective optimization, and return the optimized query. For example, evaluate whether to add an index to the following query:

[0131] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0132] The flow of the specific processing in Example 1 will be explained using Figure 11.

[0133] Program processing flow

[0134] Step 1:

[0135] The user enters a database query using a terminal. The entered query is sent from the terminal to the server. For example, the following query is entered:

[0136] sql

[0137] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0138] Input: User's SQL query

[0139] Output: Raw queries sent to the server

[0140] Step 2:

[0141] The server receives a database query sent by the user. The server then passes this query to the SQL parsing module.

[0142] Specifically, the server receives the query string and provides it to the SQL parsing module in the appropriate format.

[0143] Input: SQL query sent from the user terminal

[0144] Output: Query input to the SQL parsing module

[0145] Step 3:

[0146] The SQL parsing module analyzes the query and identifies the tables and columns used. The analysis results include filter conditions.

[0147] Specific actions include parsing the query syntax, extracting table names, and identifying the columns and conditions to be used.

[0148] Input: SQL query passed to the SQL parsing module

[0149] Output: Identified tables, columns, and filter conditions

[0150] Step 4:

[0151] The server uses a tuning candidate generation module based on the analysis results to generate multiple tuning candidates.

[0152] Specifically, it refers to existing index information and table statistics to generate tuning suggestions such as adding indexes and restructuring queries.

[0153] Input: Analysis results from the SQL analysis module (tables, columns, filter conditions)

[0154] Output: Multiple tuning candidates

[0155] Step 5:

[0156] The server passes the generated tuning candidates to the AI ​​model calling module, which then uses the generated AI model to evaluate each candidate.

[0157] The evaluation process predicts the execution cost (CPU, memory, I / O, etc.) for each tuning candidate and selects the optimal one.

[0158] Input: Tuning candidates

[0159] Output: Evaluated tuning candidates and their estimated execution costs

[0160] Step 6:

[0161] The generative AI model selects the optimal tuning candidates. It chooses the most effective tuning based on execution cost and performance improvement.

[0162] In terms of specific operations, the AI ​​model evaluates based on data it has previously learned and selects the optimal solution.

[0163] Input: Evaluated tuning candidates and estimated execution costs

[0164] Output: Optimal tuning candidates

[0165] Step 7:

[0166] The server optimizes the SQL query based on the selected optimal tuning candidates and returns it to the user terminal.

[0167] As a concrete example, the following index addition optimization is returned:

[0168] sql

[0169] CREATE INDEX idx_region ON sales(region);

[0170] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0171] Input: Optimal tuning candidates

[0172] Output: Optimized SQL query

[0173] Through these steps, improved database performance and reduced cloud usage costs will be achieved.

[0174] (Application Example 1)

[0175] Next, we will explain Application Example 1. In the following explanation, the data processing device 12 will be referred to as the "server," and the smart device 14 will be referred to as the "terminal."

[0176] In logistics centers, a large volume of database queries are processed in real time. This leads to frequent occurrences of inefficient SQL queries and queries that overload the database, resulting in a decrease in system response speed. Furthermore, rising cloud usage costs are a significant challenge. To address this, efficient query execution is required.

[0177] The specific processing performed by the specific processing unit 290 of the data processing device 12 in Application Example 1 is realized by the following means.

[0178] In this invention, the server includes means for receiving database queries entered from a user terminal, means for analyzing the database queries and identifying the database tables and columns to be used, and means for generating a plurality of tuning candidates based on the analysis results. This improves the response speed of real-time database queries from smartphones in logistics centers and enables efficient query execution. As a result, database performance is improved and a reduction in cloud usage fees can be expected.

[0179] A "user terminal" is a device used to enter database queries, and includes smartphones, personal computers, and other similar devices.

[0180] A "database query" is a set of commands issued to retrieve, update, or delete information from a database.

[0181] A "database table" is a tabular data structure in which information within a database is stored.

[0182] A "column" refers to each column in a database table, where a specific type of data is stored.

[0183] "Tuning suggestions" are proposals or changes to improve the performance of database queries, and may include adding indexes or restructuring queries.

[0184] A "generative model" is an algorithm that uses machine learning to evaluate the optimal tuning candidates.

[0185] A "logistics center" is a facility where goods and items are stored, shipped, received, and inventory managed.

[0186] "Real-time" means responding instantly to user input.

[0187] A "database index" is a data structure that provides fast access to specific columns within a database table.

[0188] A "machine learning model" is an algorithm or method used to learn patterns from data and perform predictions or classifications.

[0189] This invention relates to a system for data processing in a logistics center and aims to achieve efficient query execution. The system of this invention includes a server that receives database queries input from a user terminal, an analysis module that analyzes the database queries and identifies the database tables and columns to be used, a candidate generation module that generates multiple tuning candidates based on the analysis results, an evaluation module that evaluates the tuning candidates using a generation AI model and selects the optimal tuning plan, and a return module that returns the optimal tuning plan to the user.

[0190] System Configuration

[0191] 1. User terminal

[0192] You enter database queries using devices such as smartphones and computers. Specifically, you issue SQL queries to retrieve real-time data such as inventory information and shipping information.

[0193] 2. Server

[0194] It receives database queries and passes them to the analysis module. The server is connected to the database and has computing resources to support efficient query execution.

[0195] 3. Analysis Module

[0196] The system parses the database query received by the server and identifies the database tables and columns used. For example, it explicitly indicates which table and which column the query references.

[0197] 4. Candidate generation module

[0198] Based on the analysis results, several tuning options are generated to improve query efficiency. These include, for example, adding indexes or redesigning the query structure.

[0199] 5. Evaluation Module

[0200] Tuning candidates are evaluated using a generative AI model. Based on pre-trained data, the generative AI model predicts the effect of each tuning candidate and selects the optimal solution.

[0201] 6. Return Module

[0202] The system returns optimized tuning suggestions to the user's terminal. The user then uses these suggestions to re-execute database queries and achieve improved performance.

[0203] Specific example

[0204] For example, suppose a user enters the following SQL query:

[0205] sql

[0206] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[0207] The server first uses an analysis module to analyze this query and identify the table inventory and the columns location and stock. Next, a candidate generation module generates candidates for adding an index to the location column based on the analysis results. Then, an evaluation module uses a generated AI model to evaluate these tuning candidates and determine if they are optimal. Finally, the server returns the following optimized SQL query to the user terminal:

[0208] sql

[0209] CREATE INDEX idx_location ON inventory(location);

[0210] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[0211] Example of a prompt

[0212] The following are examples of prompts used when performing evaluation with a generative AI model:

[0213] plain text

[0214] Please evaluate the following SQL tuning candidates:

[0215] CREATE INDEX idx_location ON inventory(location);

[0216] The flow of a specific process in Application Example 1 will be explained using Figure 12.

[0217] Step 1:

[0218] Query input from user terminal

[0219] Users enter database queries on their smartphones or other user devices. The entered queries are then sent directly to the server.

[0220] Input: SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[0221] Output: A data stream in which queries are sent from the user terminal to the server.

[0222] Step 2:

[0223] Database query received

[0224] The server receives database queries sent from the user terminal. The received queries are then passed to the next analysis module.

[0225] Input: Database query sent from the user's terminal.

[0226] Output: Passing of database queries to the analysis module.

[0227] Step 3:

[0228] Query analysis

[0229] The analysis module on the server parses the database query. It parses the query statement and extracts the necessary information to identify the tables and columns being used.

[0230] Input: Database query received by the server.

[0231] Output: Table inventory and information for the columns location and stock.

[0232] Specific operation: Performs grammatical analysis of the SELECT statement to identify the table name and the columns used in the condition.

[0233] Step 4:

[0234] Generation of tuning candidates

[0235] The server's candidate generation module generates multiple tuning candidates based on the analysis results. These may include, for example, adding an index to a specific column.

[0236] Input: Table and column information identified by the analysis module.

[0237] Output: Multiple tuning candidates.

[0238] Specific operation: Create a list of candidate indexes to add, and generate it by referencing existing indexes and table statistics.

[0239] Step 5:

[0240] Evaluation of tuning candidates

[0241] The server evaluation module uses a generative model to evaluate tuning candidates. The generative AI model predicts the performance improvement effect of each candidate and selects the optimal tuning plan from among them.

[0242] Input: Multiple tuning candidates generated by the candidate generation module.

[0243] Output: Optimal tuning suggestion.

[0244] Specific operation: The following prompt statements are passed to the generating AI model for evaluation:

[0245] plain text

[0246] Please evaluate the following SQL tuning candidates:

[0247] CREATE INDEX idx_location ON inventory(location);

[0248] Step 6:

[0249] Optimized query return

[0250] The server's return module sends optimized tuning suggestions back to the user's terminal. This allows the user to execute queries efficiently.

[0251] Input: The optimal tuning plan selected by the evaluation module.

[0252] Output: Optimization queries sent to the user's terminal.

[0253] Specific operation: Formats and returns an optimized query for the user. For example, the following query is returned:

[0254] sql

[0255] CREATE INDEX idx_location ON inventory(location);

[0256] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[0257] Furthermore, an emotion engine that estimates the user's emotions may be incorporated. That is, the identification processing unit 290 may use the emotion identification model 59 to estimate the user's emotions and perform identification processing using the user's emotions.

[0258] This invention combines a system that automatically analyzes and optimizes database queries entered from user terminals with an emotion engine to achieve optimization that takes user emotions into account. The aim of this system is to reduce unnecessary consumption of database resources, lower cloud usage fees, and improve the user experience.

[0259] System program processing

[0260] SQL analysis and sentiment recognition

[0261] When a user enters a database query from their device, the server receives it. Simultaneously, an emotion engine built into the device recognizes the user's emotions and sends that data to the server.

[0262] Generation of tuning candidates

[0263] The server parses the received SQL query and identifies the tables and columns to be used. Based on the analysis results and the user's sentiment information obtained from the sentiment engine, it generates multiple tuning candidates. Here, adjustments are made according to the user's emotions; for example, if the user is stressed, tuning candidates with lower loads are prioritized.

[0264] Evaluation using AI models

[0265] The generated tuning candidates are passed to the server's AI model invocation module. The AI ​​model invocation module uses a machine learning model to evaluate the execution cost of each candidate. Here again, the user's sentiment score influences the evaluation.

[0266] Optimized query return

[0267] Once the optimal tuning plan is selected, the server generates an optimized database query and returns it to the user's terminal. The user can then use the returned optimized query to perform efficient query execution.

[0268] Specific example

[0269] If the user enters the following SQL query:

[0270] sql

[0271] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0272] Simultaneously, the device's emotion engine recognizes that the user's stress level is high. Based on this information, the following actions are taken:

[0273] operation

[0274] 1. SQL parsing:

[0275] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0276] The emotion engine determines that the user's stress level is "high" and sends that information to the server.

[0277] 2. Generating tuning candidates:

[0278] The server generates tuning candidates based on the analysis results and user sentiment information.

[0279] For example, a proposal to add an index to the region column is generated, but if this is too stressful for users, other options that reduce execution time will also be considered.

[0280] 3. Evaluation using AI models:

[0281] The server evaluates each tuning candidate using the AI ​​model calling module.

[0282] The AI model also takes into account the user's stress level and selects the optimal tuning plan.

[0283] 4. Return of the optimized query:

[0284] The server returns the optimized SQL query to the user terminal. The optimized query is as follows:

[0285] sql

[0286] CREATE INDEX idx_region ON sales(region);

[0287] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0288] As a result, the user can execute the query efficiently and minimize the consumption of database resources.

[0289] In this way, by optimizing the SQL query while considering the user's feelings, this system provides efficient database operations and a good user experience.

[0290] The following explains the process flow.

[0291] Step 1:

[0292] The user inputs a database query from the terminal and presses the send button. The emotion engine recognizes the user's emotion and obtains emotion data such as stress and satisfaction.

[0293] Step 2:

[0294] The terminal sends the input database query and the obtained emotion data to the server.

[0295] Step 3:

[0296] The server passes the received database query to the SQL parsing module, which then parses the query. Specifically, it performs syntax analysis of the query to identify the tables, columns, and filter conditions used.

[0297] Step 4:

[0298] The server retrieves the analysis results and passes them to the tuning candidate generation module. This module generates multiple tuning candidates based on the analysis results and sentiment data sent from the terminal. If the user's sentiment is stressful, it prioritizes generating tuning candidates with less processing load.

[0299] Step 5:

[0300] The server passes the generated tuning candidates to the AI ​​model calling module. The AI ​​model calling module uses a pre-trained machine learning model to evaluate each tuning candidate. The user's sentiment score is also taken into consideration here.

[0301] Step 6:

[0302] The server selects the optimal tuning plan based on the evaluation results of the AI ​​model. The selection criteria include execution costs (CPU, memory, I / O, etc.) and the user's sentiment score.

[0303] Step 7:

[0304] The server generates optimized database queries based on the selected optimal tuning plan. These optimized queries include features such as adding indexes and refactoring queries.

[0305] Step 8:

[0306] The server returns an optimized database query to the user terminal. The user can execute the returned query to provide an optimal experience for the user along with efficient query processing.

[0307] Specific operation example

[0308] The user inputs an SQL query as follows:

[0309] sql

[0310] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0311] The emotion engine recognizes that the user's stress level is high.

[0312] Operation

[0313] 1. Step 1:

[0314] The user inputs an SQL query from the terminal and presses the send button. The emotion engine senses the user's stress level.

[0315] 2. Step 2:

[0316] The terminal sends the SQL query and emotion data (e.g., high stress) to the server.

[0317] 3. Step 3:

[0318] The server analyzes the query with the SQL analysis module and identifies the table sales, the filter conditions region = 'East' and amount > 1000.

[0319] 4. Step 4:

[0320] Based on the analysis results and sentiment data, the server generates multiple options, including suggestions for adding indexes, using a tuning candidate generation module. Because user stress levels are high, lighter options are prioritized.

[0321] 5. Step 5:

[0322] The server evaluates the tuning candidates generated by the AI ​​model calling module. The machine learning model evaluates the model considering its execution cost and the user's sentiment score.

[0323] 6. Step 6:

[0324] The server selects the optimal tuning plan based on the evaluation results. Evaluation criteria include CPU usage, memory usage, and user sentiment.

[0325] 7. Step 7:

[0326] The server generates optimized database queries based on the optimal tuning suggestions. The optimized queries will look like this:

[0327] sql

[0328] CREATE INDEX idx_region ON sales(region);

[0329] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0330] 8. Step 8:

[0331] The server returns optimized SQL queries to the user's terminal. The user executes the optimized queries and experiences efficient and user-friendly query processing.

[0332] In this way, the system optimizes SQL queries while taking user emotions into consideration, providing efficient database operations and a good user experience.

[0333] (Example 2)

[0334] Next, we will describe Example 2. In the following description, the data processing device 12 will be referred to as the "server" and the smart device 14 as the "terminal".

[0335] Database query optimization is often performed without considering user emotions, which can lead to stressful situations for users. Furthermore, wasted resource consumption and long execution times are problematic. Additionally, the lack of standardization in optimization methods means they may not be sufficiently effective in specific situations.

[0336] The identification processing performed by the identification processing unit 290 of the data processing device 12 in Example 2 is realized by the following means. In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database structure and fields to be used, means for generating a plurality of tuning candidates based on the analysis results and user sentiment information, means for evaluating the tuning candidates using a machine learning model and selecting the optimal tuning plan considering sentiment information, and means for returning the optimal tuning plan to the user terminal. This enables efficient query optimization that takes user sentiment into account, making it possible to improve the user experience while suppressing the wasteful consumption of database resources.

[0337] A "user terminal" is an electronic device that a user operates to input database queries.

[0338] A "database query" is a set of commands that a user sends to a database to ask a question.

[0339] "Database structure" is a concept that describes how data is organized within a database.

[0340] A "field" refers to an individual data item in a database table.

[0341] "Emotional information" refers to data that indicates the user's emotional state and is obtained using an emotion engine.

[0342] "Tuning candidates" are multiple optimization suggestions for improving the execution efficiency of database queries.

[0343] A "machine learning model" is an algorithm that learns patterns and rules from data and experience, and uses that knowledge to make predictions and classifications.

[0344] The "optimal tuning plan" is the optimization plan selected from the aforementioned tuning candidates that is evaluated as having the highest execution efficiency.

[0345] This invention provides a system that optimizes database queries while considering the user's emotional state by combining an emotion engine with database query optimization. This system includes a user terminal, a server, and their respective modules.

[0346] The user enters a database query using a terminal. This terminal is equipped with an emotion engine that retrieves the user's emotion information in real time. The retrieved emotion information is sent to the server along with the database query.

[0347] The server first parses the received database query. For this parsing, the server uses an SQL parsing module (for example, Apache® Calcite). This parsing module identifies the database structure and fields.

[0348] Next, the server processes the emotional information sent from the emotion engine (for example, Microsoft® Azure® Emotion API). Based on this emotional information, it determines the user's emotional state (for example, if their stress level is high) and uses that information in the next step.

[0349] The server generates multiple tuning options based on SQL analysis results and sentiment information. The user's emotional state is taken into consideration during this process. For example, if the user is under high stress, tuning options that reduce execution time will be prioritized.

[0350] The generated tuning candidates are evaluated using a machine learning model on the server. This machine learning model selects the optimal tuning option from among the multiple candidates. In this process, user sentiment information influences the evaluation process.

[0351] After the optimal tuning plan is selected, the server generates an optimized database query based on it and sends it back to the user's terminal. The user can then use this optimized query to perform efficient query execution.

[0352] As a concrete example, consider a case where a user enters the following SQL query:

[0353] sql

[0354] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0355] Simultaneously, the device's emotion engine recognizes that the user's stress level is high. Based on this information, the server performs the following specific actions:

[0356] 1. The SQL parsing module parses the query and identifies the table sales, columns region and amount, and the filter conditions region = 'East' and amount > 1000.

[0357] 2. The emotion engine determines that the user's stress level is high and sends that information to the server.

[0358] 3. Based on the analysis results and sentiment information, the server generates tuning candidates, such as adding an index to the region column.

[0359] 4. The server uses a machine learning model to evaluate each tuning candidate and select the optimal tuning option. Due to the high user stress level, the tuning option that reduces execution time is selected.

[0360] 5. An optimized SQL query is generated and sent back to the user terminal:

[0361] sql

[0362] CREATE INDEX idx_region ON sales(region);

[0363] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0364] Example of a prompt:

[0365] Create a program that generates tuning suggestions to shorten execution time based on SQL queries that users have previously found frustrating, thereby supporting efficient query execution. Example: Optimize the SQL query `SELECT FROM sales WHERE region = 'East' AND amount > 1000;`.

[0366] The flow of the specific processing in Example 2 will be explained using Figure 13.

[0367] Step 1:

[0368] The user uses a terminal to enter database queries and sends them to the server.

[0369] Input: The database query entered by the user (e.g., SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[0370] Output: Sending database query data from the terminal to the server

[0371] Step 2:

[0372] The device uses its built-in emotion engine to acquire user emotion information and sends that information to the server.

[0373] Input: User's emotional information (e.g., "high stress level" as recognized by the emotion engine)

[0374] Output: Sending emotion data from the terminal to the server

[0375] Step 3:

[0376] The server parses the received database query using an SQL parsing module to identify the database structure and fields used.

[0377] Input: Database query received by the server (e.g., SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[0378] Data processing: An SQL parsing module (e.g., Apache Calcite) parses the query and extracts table names, column names, and conditional expressions.

[0379] Output: Analyzed database structure and field information (e.g., table sales, columns region and amount, filter conditions region = 'East' and amount > 1000)

[0380] Step 4:

[0381] The server processes the received emotional information and determines the user's emotional state.

[0382] Input: Emotional information (e.g., high stress level)

[0383] Data processing: Evaluate the user's emotional state based on emotional information.

[0384] Output: Evaluated emotional state

[0385] Step 5:

[0386] The server generates multiple tuning candidates based on the SQL analysis results and emotional state.

[0387] Input: SQL parsing results (e.g., table sales, columns region and amount), and emotional state (e.g., high stress level).

[0388] Data processing: Based on the analysis results and emotional state, the candidate generation algorithm generates multiple tuning options.

[0389] Output: Tuning suggestions (e.g., suggestion to add an index to the region column)

[0390] Step 6:

[0391] The server evaluates the generated tuning candidates using a machine learning model and selects the optimal tuning option.

[0392] Input: Tuning candidates (e.g., multiple tuning options) and emotional state

[0393] Data processing: The machine learning model evaluates each tuning candidate and selects the optimal tuning option, taking into account execution cost and emotional state.

[0394] Output: Optimal tuning suggestions (e.g., suggestions with shorter execution times)

[0395] Step 7:

[0396] The server generates optimized database queries based on the best tuning suggestions and sends them back to the user's terminal.

[0397] Input: Optimal tuning proposal (e.g., optimization proposal for adding indexes)

[0398] Data processing: Generating optimized SQL queries

[0399] Output: Optimized database query returned to the user terminal (Example: CREATE INDEX idx_region ON sales(region); SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[0400] Step 8:

[0401] The system executes the optimized queries returned by the user into the database to efficiently retrieve data.

[0402] Input: Optimized database query

[0403] Output: Efficiently retrieved search results

[0404] (Application Example 2)

[0405] Next, we will explain application example 2. In the following explanation, the data processing device 12 will be referred to as a "server" and the smart device 14 as a "terminal".

[0406] Traditional database query optimization systems perform their operations without considering user emotions, resulting in a uniform user experience and an inability to provide optimal performance for individual users. Furthermore, particularly in content delivery services, there is a need to appropriately present relevant content that responds to user emotions, but achieving this has been a challenge.

[0407] In Application Example 2, the specific processing performed by the specific processing unit 290 of the data processing device 12 is realized by the following means. In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database tables and columns to be used, means for recognizing the user's emotions, means for generating a plurality of tuning candidates based on the analysis results and emotion information, means for evaluating the tuning candidates using a machine learning model and selecting the optimal tuning plan, and means for returning the optimal tuning plan to the user. This makes it possible to provide optimal performance in accordance with the user's emotions and improve the user experience.

[0408] A "user terminal" is a computing device operated by a user, and it is a device that has an interface for entering database queries.

[0409] A "database query" is a set of instructions used to extract necessary data from a database.

[0410] A "database table" is a representation of a collection of data stored in a database, consisting of rows and columns.

[0411] A "column" refers to each column in a database table, and is a field that contains a specific type of data.

[0412] "Emotional information" refers to data that represents the emotional state obtained from the user's facial expressions, tone of voice, and other similar information.

[0413] "Tuning candidates" are several proposed improvements to enhance the execution efficiency of database queries.

[0414] A "machine learning model" is an algorithm that learns patterns and regularities from data and uses those results to make predictions and decisions.

[0415] An "optimal tuning proposal" is a query that has been improved to extract data most efficiently, taking into account the characteristics of user sentiment information and database queries.

[0416] A "video device" is a device, such as a camera, used to acquire visual information.

[0417] An "audio device" is a device used to acquire audio information, such as a microphone.

[0418] The system of this invention uses a user terminal, a server, and a machine learning model. The system is configured as follows:

[0419] User terminal

[0420] A user terminal is a device with an interface for entering database queries. This terminal is equipped with video and audio devices such as a camera and microphone, which capture emotional information from the user's facial expressions and tone of voice. When a user enters a database query, that query is sent to the server.

[0421] server

[0422] The server performs the following operations.

[0423] 1. Reception and Analysis:

[0424] The server receives database queries sent from the user terminal and parses them. Through this parsing, it identifies the database tables and columns to be used.

[0425] 2. Emotion recognition:

[0426] The emotion engine analyzes emotional information sent from the user's device. This emotional information reflects the user's real-time emotional state.

[0427] 3. Generating tuning candidates:

[0428] Based on the analysis results and sentiment information, the server generates several tuning options. These include adding database indexes and rewriting queries.

[0429] 4. Evaluation and Selection:

[0430] The generated tuning candidates are evaluated using a machine learning model. User sentiment information is reflected in the evaluation.

[0431] 5. Optimized query return:

[0432] Once the optimal tuning plan is selected, the server generates optimized database queries and returns them to the user terminal.

[0433] Machine learning models

[0434] Machine learning models are used to evaluate and optimize the execution efficiency of database queries. This generates optimal queries that take user sentiment into account.

[0435] Specific example

[0436] The user uses smart glasses to acquire data from the video and audio devices. The user searches for "popular comedy movies," and simultaneously, the emotion engine recognizes the user's emotion of "joy." Based on this information, the server operates as follows:

[0437] 1. Receive and parse the database query "SELECT FROM movies WHERE genre = 'comedy' AND rating > 4".

[0438] 2. Receive emotional information, "joy," from the emotional engine.

[0439] 3. Based on the analysis results and emotional information, generate multiple tuning candidates.

[0440] 4. Use a generative AI model to evaluate each tuning candidate and select the optimal query for "joy".

[0441] 5. Return the optimized query to the user's terminal.

[0442] Example of a prompt

[0443] User emotion: happy. Suggestion based on search query: popular comedy movies.

[0444] In this way, it becomes possible to provide optimal performance tailored to the user's emotions and improve the user experience.

[0445] The flow of a specific process in Application Example 2 will be explained using Figure 14.

[0446] Step 1:

[0447] The user enters a database query from a terminal. The terminal sends this query to the server. At this time, the terminal is equipped with video and audio devices, which are used to capture the user's facial expressions and tone of voice, and collect emotional information. The entered database query and emotional information are sent to the server.

[0448] Step 2:

[0449] The server receives and parses database queries sent from the user terminal. This parsing identifies the database tables and columns used within the query. Specifically, it parses the SQL statement and compares it with the database metadata to identify the tables and columns. The results of this parsing are then used for the following processes.

[0450] Step 3:

[0451] The server receives emotional information transmitted from the terminal. This emotional information is obtained by analyzing the user's facial expressions and voice tone acquired from video and audio equipment. Hugging Face's emotional analysis pipeline is used as the software for emotion recognition, identifying emotions from text data. This emotional information reflects the user's real-time emotional state.

[0452] Step 4:

[0453] The server generates multiple tuning options based on the analysis results and sentiment information. These options may include adding indexes to the database or rewriting the query structure. These options are given different priorities depending on the user's emotional state. For example, if the user is stressed, tuning options that reduce the processing load will be prioritized.

[0454] Step 5:

[0455] The server evaluates the generated tuning candidates using a machine learning model. The machine learning model predicts the execution cost of each candidate and selects the optimal tuning plan based on the evaluation results. User sentiment information is also considered during this process, ensuring that the most appropriate query is selected according to the user's emotional state. Examples of machine learning models used here include random forests and neural networks.

[0456] Step 6:

[0457] The server generates optimized database queries and returns them to the user terminal. The user terminal uses these optimized queries to perform efficient database operations. This allows the user to achieve optimal performance tailored to their emotional state. As a specific example, the following prompt is generated:

[0458] "User emotion: happy. Suggestion based on search query: popular comedy movies."

[0459] 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 user input for the result of the specific processing. The control unit 46A transmits the audio data indicating 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.

[0460] Data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of data generation model 58 is ChatGPT (registered trademark) (Internet search).<URL: https: / / openai.com / blog / chatgpt> ), Gemini (registered trademark) (Internet search) <url: https: gemini.google.com ?hl="ja">Examples of generative AI include the following. The data generation model 58 is obtained by performing deep learning on a neural network. The data generation model 58 is input with prompts containing instructions, and with inference data such as audio data representing speech, text data representing text, and image data representing images. The data generation model 58 infers from the input inference data according to the instructions indicated by the prompts, and outputs the inference results in data formats such as audio data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[0461] In the above embodiment, an example was given in which specific processing is performed by the data processing device 12, but the technology of this disclosure is not limited thereto, and the specific processing may also be performed by the smart device 14.

[0462] [Second Embodiment]

[0463] Figure 3 shows an example of the configuration of the data processing system 210 according to the second embodiment.

[0464] As shown in Figure 3, the data processing system 210 includes a data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.

[0465] The data processing device 12 comprises a computer 22, a database 24, and a communication interface 26. The computer 22 is an example of a "computer" related to the technology of this disclosure. The computer 22 comprises a processor 28, RAM 30, and storage 32. The processor 28, RAM 30, and storage 32 are connected to a bus 34. The database 24 and the communication interface 26 are also connected to the bus 34. The communication interface 26 is connected to a network 54. An example of the network 54 is a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0466] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication interface 44. The computer 36 includes a processor 46, RAM 48, and storage 50. The processor 46, RAM 48, and storage 50 are connected to a bus 52. The microphone 238, speaker 240, and camera 42 are also connected to the bus 52.

[0467] The microphone 238 receives voice signals from the user 20 and receives instructions from the user 20. The microphone 238 captures the voice signals from the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio according to the instructions from the processor 46.

[0468] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an image sensor such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the area around the user 20 (for example, an imaging range defined by a field of view equivalent to the width of a typical healthy person's field of vision).

[0469] Communication interface 44 is connected to network 54. Communication interfaces 44 and 26 are responsible for the exchange of various information between processor 46 and processor 28 via network 54. The exchange of various information between processor 46 and processor 28 using communication interfaces 44 and 26 is performed in a secure manner.

[0470] Figure 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Figure 4, the data processing device 12 performs specific processing using the processor 28. The storage 32 stores the specific processing program 56.

[0471] The specific processing program 56 is an example of a "program" relating to the technology of this 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.

[0472] The storage 32 stores the data generation model 58 and the emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0473] In the smart glasses 214, the processor 46 performs the reception output processing. The storage 50 stores the reception output program 60. 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 processing is realized by the processor 46 operating as a control unit 46A according to the reception output program 60 executed on the RAM 48.

[0474] Next, the identification processing performed by the identification processing unit 290 of the data processing device 12 will be described. 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".

[0475] The system of this invention optimizes inefficient SQL queries and SQL queries that place an excessive load on the database using generative AI before execution. This reduces the consumption of unnecessary database resources and lowers cloud usage fees.

[0476] System program processing

[0477] SQL analysis

[0478] The user terminal enters an SQL query against the data warehouse. The server receives this query and passes it to the SQL parsing module. The SQL parsing module parses the query and identifies the tables and columns used. Based on these parsing results, the next step is initiated.

[0479] Generation of tuning candidates

[0480] The server generates tuning candidates using a tuning candidate generation module based on the analysis results. This module references existing indexes and table statistics to generate proposed changes necessary for performance improvement. These may include adding indexes or restructuring queries.

[0481] Evaluation using AI models

[0482] The server passes the generated tuning candidates to the AI ​​model calling module, which evaluates them using generative AI. This evaluation predicts the execution cost (CPU, memory, I / O, etc.) of each tuning candidate and selects the optimal candidate. The AI ​​model determines which optimization is best based on pre-trained data.

[0483] Optimized query return

[0484] The server returns optimized SQL queries to the user's terminal. This enables users to execute queries efficiently, resulting in improved DWH performance and reduced cloud usage costs.

[0485] Specific example

[0486] Suppose a user enters the following SQL query into the data warehouse:

[0487] sql

[0488] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0489] Operation description

[0490] 1. SQL parsing:

[0491] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0492] 2. Generating tuning candidates:

[0493] The server uses a tuning candidate generation module to generate suggestions for adding indexes. For example, it might generate suggestions for adding an index to the `region` column.

[0494] 3. Evaluation using AI models:

[0495] The server passes tuning candidates to the AI ​​model, which then evaluates each candidate. The AI ​​model determines that adding an index to the region column will improve query performance.

[0496] 4. Optimized query return:

[0497] The server returns an optimized SQL query to the user's terminal. The optimized SQL query looks like this:

[0498] sql

[0499] CREATE INDEX idx_region ON sales(region);

[0500] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0501] In this way, the system automatically analyzes and optimizes user-entered queries, enabling efficient query execution. As a result, improved database performance and reduced cloud usage fees can be expected.

[0502] The following describes the processing flow.

[0503] Step 1:

[0504] The user enters a database query from their terminal. The user enters the query they want to execute against the data warehouse (DWH) and presses the submit button.

[0505] Step 2:

[0506] The server receives database queries sent by the user. The received queries are passed to the server's SQL parsing module.

[0507] Step 3:

[0508] The server's SQL parsing module analyzes the database query. Specifically, it parses the query and identifies the tables, columns, and filter conditions used.

[0509] Step 4:

[0510] Based on the analysis results, the server uses a tuning candidate generation module to generate multiple tuning candidates. These may include suggestions such as adding indexes or restructuring queries.

[0511] Step 5:

[0512] The server passes the generated tuning candidates to the AI ​​model calling module. The AI ​​model calling module uses a pre-trained AI model to evaluate the execution cost of each tuning candidate and select the optimal tuning option.

[0513] Step 6:

[0514] After the server selects the optimal tuning plan, it generates optimized database queries. These optimized queries include adding indexes and refactoring existing queries.

[0515] Step 7:

[0516] The server returns database queries optimized for the user's terminal. The user can then use these optimized queries to execute queries efficiently on the database.

[0517] Specific examples of operation

[0518] The user enters the following SQL query:

[0519] sql

[0520] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0521] operation

[0522] 1. Step 1:

[0523] The user enters the above SQL query from their terminal and presses the submit button.

[0524] 2. Step 2:

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

[0526] 3. Step 3:

[0527] The server's SQL parsing module parses the query and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0528] 4. Step 4:

[0529] The server uses a tuning candidate generation module to generate tuning candidates, for example, one that adds an index to the region column.

[0530] 5. Step 5:

[0531] The server passes the generated tuning candidates to the AI ​​model calling module, which then evaluates each candidate. The AI ​​model selects adding an index to the region column as the optimal candidate.

[0532] 6. Step 6:

[0533] The server generates an optimized database query. The optimized query will look like this:

[0534] sql

[0535] CREATE INDEX idx_region ON sales(region);

[0536] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0537] 7. Step 7:

[0538] The server returns an optimized SQL query to the user's terminal. The user executes the returned query to achieve efficient query processing.

[0539] In this way, this system automatically analyzes and optimizes the queries entered by the user, enabling efficient query execution.

[0540] (Example 1)

[0541] Next, we will describe Example 1. 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."

[0542] Traditional database management systems suffered from inefficient SQL queries and SQL queries that placed excessive load on the database, resulting in wasted database resources. Furthermore, this led to increased cloud usage fees, raising operational costs. Conventional technologies required manual optimization of these inefficient queries, which was time-consuming and labor-intensive.

[0543] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 1 is realized by the following means.

[0544] In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database tables and columns to be used, means for generating a plurality of tuning candidates based on the analysis results, means for evaluating the tuning candidates using a generation AI model, predicting the execution cost of each candidate and selecting the optimal tuning plan, and means for returning the optimal tuning plan to the user. This enables automatic optimization of database queries, resulting in improved database performance and reduced cloud usage fees.

[0545] A "user terminal" is a device used by a user to enter database queries.

[0546] A "database query" is a set of instructions used to perform a specific operation on a database.

[0547] A "server" is a device or system that receives database queries from user terminals and performs analysis, evaluation, and optimization.

[0548] A "SQL parsing module" is a software module used to analyze database queries and identify the database tables and columns being used.

[0549] The "Tuning Candidate Generation Module" is a software module that generates multiple tuning candidates to improve the performance of database queries based on analysis results.

[0550] A "generative AI model" is an artificial intelligence model used to select the optimal tuning candidate based on data that has been trained on it in advance.

[0551] The "optimal tuning plan" refers to a specific method for optimizing the performance of database queries, selected based on an evaluation of the generative AI model.

[0552] A "database index" is a data structure used to improve the speed of searching for data within a database.

[0553] A "machine learning model" is a model constructed using algorithms that learn patterns and rules based on large amounts of data.

[0554] "Execution cost" refers to the amount of resources (CPU, memory, I / O, etc.) consumed when executing a database query.

[0555] The system of this invention comprises a user terminal, a server, an SQL analysis module, a tuning candidate generation module, and a generation AI model. The purpose of this system is to improve database performance and reduce cloud usage fees by automatically analyzing and optimizing database queries entered by the user.

[0556] First, the user uses a terminal to enter an SQL query against the data warehouse (DWH). For example, they would enter a query like this:

[0557] sql

[0558] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0559] This SQL query is sent from the user's terminal to the server.

[0560] Next, the server passes the received SQL query to the SQL parsing module. The SQL parsing module parses the query and identifies the tables and columns used. This parsing identifies the table (in this case, sales), columns (region and amount), and filter conditions (region = 'East' and amount > 1000) used in the query.

[0561] Next, the server uses a tuning candidate generation module based on the analysis results to generate tuning candidates. This module references existing indexes and table statistics to generate proposed changes necessary for performance improvement. Examples include proposals for adding database indexes and restructuring queries. In this specific example, a proposal to add an index to the region column is generated.

[0562] The server then passes the generated tuning candidates to the AI ​​model calling module, which uses the generating AI model to evaluate each candidate. In this evaluation process, the generating AI model predicts the execution cost (CPU, memory, I / O, etc.) of each tuning candidate and selects the optimal tuning candidate. The generating AI model is a machine learning model that operates based on pre-trained data, and in this specific example, it determines that adding an index to the region column is the optimal solution.

[0563] Finally, the server generates an optimized query and returns it to the user's terminal. A concrete example of an optimized SQL query is shown below:

[0564] sql

[0565] CREATE INDEX idx_region ON sales(region);

[0566] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0567] This allows users to execute queries efficiently, resulting in improved database performance and reduced cloud usage costs.

[0568] As this specific example illustrates, the novelty of the invention lies in its ability to automatically perform everything from parsing to optimizing SQL queries, and in its use of a generative AI model to select the optimal tuning candidate. An example of a prompt statement is the following:

[0569] Analyze the given SQL query, generate optimal tuning candidates, select the most effective optimization, and return the optimized query. For example, evaluate whether to add an index to the following query:

[0570] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0571] The flow of the specific processing in Example 1 will be explained using Figure 11.

[0572] Program processing flow

[0573] Step 1:

[0574] The user enters a database query using a terminal. The entered query is sent from the terminal to the server. For example, the following query is entered:

[0575] sql

[0576] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0577] Input: User's SQL query

[0578] Output: Raw queries sent to the server

[0579] Step 2:

[0580] The server receives a database query sent by the user. The server then passes this query to the SQL parsing module.

[0581] Specifically, the server receives the query string and provides it to the SQL parsing module in the appropriate format.

[0582] Input: SQL query sent from the user terminal

[0583] Output: Query input to the SQL parsing module

[0584] Step 3:

[0585] The SQL parsing module analyzes the query and identifies the tables and columns used. The analysis results include filter conditions.

[0586] Specific actions include parsing the query syntax, extracting table names, and identifying the columns and conditions to be used.

[0587] Input: SQL query passed to the SQL parsing module

[0588] Output: Identified tables, columns, and filter conditions

[0589] Step 4:

[0590] The server uses a tuning candidate generation module based on the analysis results to generate multiple tuning candidates.

[0591] Specifically, it refers to existing index information and table statistics to generate tuning suggestions such as adding indexes and restructuring queries.

[0592] Input: Analysis results from the SQL analysis module (tables, columns, filter conditions)

[0593] Output: Multiple tuning candidates

[0594] Step 5:

[0595] The server passes the generated tuning candidates to the AI ​​model calling module, which then uses the generated AI model to evaluate each candidate.

[0596] The evaluation process predicts the execution cost (CPU, memory, I / O, etc.) for each tuning candidate and selects the optimal one.

[0597] Input: Tuning candidates

[0598] Output: Evaluated tuning candidates and their estimated execution costs

[0599] Step 6:

[0600] The generative AI model selects the optimal tuning candidates. It chooses the most effective tuning based on execution cost and performance improvement.

[0601] In terms of specific operations, the AI ​​model evaluates based on data it has previously learned and selects the optimal solution.

[0602] Input: Evaluated tuning candidates and estimated execution costs

[0603] Output: Optimal tuning candidates

[0604] Step 7:

[0605] The server optimizes the SQL query based on the selected optimal tuning candidates and returns it to the user terminal.

[0606] As a concrete example, the following index addition optimization is returned:

[0607] sql

[0608] CREATE INDEX idx_region ON sales(region);

[0609] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0610] Input: Optimal tuning candidates

[0611] Output: Optimized SQL query

[0612] Through these steps, improved database performance and reduced cloud usage costs will be achieved.

[0613] (Application Example 1)

[0614] Next, we will explain Application Example 1. In the following explanation, the data processing device 12 will be referred to as the "server," and the smart glasses 214 will be referred to as the "terminal."

[0615] In logistics centers, a large volume of database queries are processed in real time. This leads to frequent occurrences of inefficient SQL queries and queries that overload the database, resulting in a decrease in system response speed. Furthermore, rising cloud usage costs are a significant challenge. To address this, efficient query execution is required.

[0616] The specific processing performed by the specific processing unit 290 of the data processing device 12 in Application Example 1 is realized by the following means.

[0617] In this invention, the server includes means for receiving database queries entered from a user terminal, means for analyzing the database queries and identifying the database tables and columns to be used, and means for generating a plurality of tuning candidates based on the analysis results. This improves the response speed of real-time database queries from smartphones in logistics centers and enables efficient query execution. As a result, database performance is improved and a reduction in cloud usage fees can be expected.

[0618] A "user terminal" is a device used to enter database queries, and includes smartphones, personal computers, and other similar devices.

[0619] A "database query" is a set of commands issued to retrieve, update, or delete information from a database.

[0620] A "database table" is a tabular data structure in which information within a database is stored.

[0621] A "column" refers to each column in a database table, where a specific type of data is stored.

[0622] "Tuning suggestions" are proposals or changes to improve the performance of database queries, and may include adding indexes or restructuring queries.

[0623] A "generative model" is an algorithm that uses machine learning to evaluate the optimal tuning candidates.

[0624] A "logistics center" is a facility where goods and items are stored, shipped, received, and inventory managed.

[0625] "Real-time" means responding instantly to user input.

[0626] A "database index" is a data structure that provides fast access to specific columns within a database table.

[0627] A "machine learning model" is an algorithm or method used to learn patterns from data and perform predictions or classifications.

[0628] This invention relates to a system for data processing in a logistics center and aims to achieve efficient query execution. The system of this invention includes a server that receives database queries input from a user terminal, an analysis module that analyzes the database queries and identifies the database tables and columns to be used, a candidate generation module that generates multiple tuning candidates based on the analysis results, an evaluation module that evaluates the tuning candidates using a generation AI model and selects the optimal tuning plan, and a return module that returns the optimal tuning plan to the user.

[0629] System Configuration

[0630] 1. User terminal

[0631] You enter database queries using devices such as smartphones and computers. Specifically, you issue SQL queries to retrieve real-time data such as inventory information and shipping information.

[0632] 2. Server

[0633] It receives database queries and passes them to the analysis module. The server is connected to the database and has computing resources to support efficient query execution.

[0634] 3. Analysis Module

[0635] The system parses the database query received by the server and identifies the database tables and columns used. For example, it explicitly indicates which table and which column the query references.

[0636] 4. Candidate generation module

[0637] Based on the analysis results, several tuning options are generated to improve query efficiency. These include, for example, adding indexes or redesigning the query structure.

[0638] 5. Evaluation Module

[0639] Tuning candidates are evaluated using a generative AI model. Based on pre-trained data, the generative AI model predicts the effect of each tuning candidate and selects the optimal solution.

[0640] 6. Return Module

[0641] The system returns optimized tuning suggestions to the user's terminal. The user then uses these suggestions to re-execute database queries and achieve improved performance.

[0642] Specific example

[0643] For example, suppose a user enters the following SQL query:

[0644] sql

[0645] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[0646] The server first uses an analysis module to analyze this query and identify the table inventory and the columns location and stock. Next, a candidate generation module generates candidates for adding an index to the location column based on the analysis results. Then, an evaluation module uses a generated AI model to evaluate these tuning candidates and determine if they are optimal. Finally, the server returns the following optimized SQL query to the user terminal:

[0647] sql

[0648] CREATE INDEX idx_location ON inventory(location);

[0649] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[0650] Example of a prompt

[0651] The following are examples of prompts used when performing evaluation with a generative AI model:

[0652] plain text

[0653] Please evaluate the following SQL tuning candidates:

[0654] CREATE INDEX idx_location ON inventory(location);

[0655] The flow of a specific process in Application Example 1 will be explained using Figure 12.

[0656] Step 1:

[0657] Query input from user terminal

[0658] Users enter database queries on their smartphones or other user devices. The entered queries are then sent directly to the server.

[0659] Input: SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[0660] Output: A data stream in which queries are sent from the user terminal to the server.

[0661] Step 2:

[0662] Database query received

[0663] The server receives database queries sent from the user terminal. The received queries are then passed to the next analysis module.

[0664] Input: Database query sent from the user's terminal.

[0665] Output: Passing of database queries to the analysis module.

[0666] Step 3:

[0667] Query analysis

[0668] The analysis module on the server parses the database query. It parses the query statement and extracts the necessary information to identify the tables and columns being used.

[0669] Input: Database query received by the server.

[0670] Output: Table inventory and information for the columns location and stock.

[0671] Specific operation: Performs grammatical analysis of the SELECT statement to identify the table name and the columns used in the condition.

[0672] Step 4:

[0673] Generation of tuning candidates

[0674] The server's candidate generation module generates multiple tuning candidates based on the analysis results. These may include, for example, adding an index to a specific column.

[0675] Input: Table and column information identified by the analysis module.

[0676] Output: Multiple tuning candidates.

[0677] Specific operation: Create a list of candidate indexes to add, and generate it by referencing existing indexes and table statistics.

[0678] Step 5:

[0679] Evaluation of tuning candidates

[0680] The server evaluation module uses a generative model to evaluate tuning candidates. The generative AI model predicts the performance improvement effect of each candidate and selects the optimal tuning plan from among them.

[0681] Input: Multiple tuning candidates generated by the candidate generation module.

[0682] Output: Optimal tuning suggestion.

[0683] Specific operation: The following prompt statements are passed to the generating AI model for evaluation:

[0684] plain text

[0685] Please evaluate the following SQL tuning candidates:

[0686] CREATE INDEX idx_location ON inventory(location);

[0687] Step 6:

[0688] Optimized query return

[0689] The server's return module sends optimized tuning suggestions back to the user's terminal. This allows the user to execute queries efficiently.

[0690] Input: The optimal tuning plan selected by the evaluation module.

[0691] Output: Optimization queries sent to the user's terminal.

[0692] Specific operation: Formats and returns an optimized query for the user. For example, the following query is returned:

[0693] sql

[0694] CREATE INDEX idx_location ON inventory(location);

[0695] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[0696] Furthermore, an emotion engine that estimates the user's emotions may be incorporated. That is, the identification processing unit 290 may use the emotion identification model 59 to estimate the user's emotions and perform identification processing using the user's emotions.

[0697] This invention combines a system that automatically analyzes and optimizes database queries entered from user terminals with an emotion engine to achieve optimization that takes user emotions into account. The aim of this system is to reduce unnecessary consumption of database resources, lower cloud usage fees, and improve the user experience.

[0698] System program processing

[0699] SQL analysis and sentiment recognition

[0700] When a user enters a database query from their device, the server receives it. Simultaneously, an emotion engine built into the device recognizes the user's emotions and sends that data to the server.

[0701] Generation of tuning candidates

[0702] The server parses the received SQL query and identifies the tables and columns to be used. Based on the analysis results and the user's sentiment information obtained from the sentiment engine, it generates multiple tuning candidates. Here, adjustments are made according to the user's emotions; for example, if the user is stressed, tuning candidates with lower loads are prioritized.

[0703] Evaluation using AI models

[0704] The generated tuning candidates are passed to the server's AI model invocation module. The AI ​​model invocation module uses a machine learning model to evaluate the execution cost of each candidate. Here again, the user's sentiment score influences the evaluation.

[0705] Optimized query return

[0706] Once the optimal tuning plan is selected, the server generates an optimized database query and returns it to the user's terminal. The user can then use the returned optimized query to perform efficient query execution.

[0707] Specific example

[0708] If the user enters the following SQL query:

[0709] sql

[0710] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0711] Simultaneously, the device's emotion engine recognizes that the user's stress level is high. Based on this information, the following actions are taken:

[0712] operation

[0713] 1. SQL parsing:

[0714] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0715] The emotion engine determines that the user's stress level is "high" and sends that information to the server.

[0716] 2. Generating tuning candidates:

[0717] The server generates tuning candidates based on the analysis results and user sentiment information.

[0718] For example, a proposal to add an index to the region column is generated, but if this is too stressful for users, other options that reduce execution time will also be considered.

[0719] 3. Evaluation using AI models:

[0720] The server evaluates each tuning candidate using the AI ​​model calling module.

[0721] The AI ​​model also takes the user's stress level into consideration when selecting the optimal tuning solution.

[0722] 4. Optimized query return:

[0723] The server returns an optimized SQL query to the user's terminal. The optimized query looks like this:

[0724] sql

[0725] CREATE INDEX idx_region ON sales(region);

[0726] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0727] This allows users to execute queries efficiently and minimize the consumption of database resources.

[0728] In this way, this system optimizes SQL queries while taking user emotions into consideration, providing efficient database operations and a good user experience.

[0729] The following describes the processing flow.

[0730] Step 1:

[0731] The user enters a database query from their device and presses the submit button. The emotion engine recognizes the user's emotions and retrieves emotional data such as stress levels and satisfaction levels.

[0732] Step 2:

[0733] The terminal sends the entered database query and retrieved sentiment data to the server.

[0734] Step 3:

[0735] The server passes the received database query to the SQL parsing module, which then parses the query. Specifically, it performs syntax analysis of the query to identify the tables, columns, and filter conditions used.

[0736] Step 4:

[0737] The server retrieves the analysis results and passes them to the tuning candidate generation module. This module generates multiple tuning candidates based on the analysis results and sentiment data sent from the terminal. If the user's sentiment is stressful, it prioritizes generating tuning candidates with less processing load.

[0738] Step 5:

[0739] The server passes the generated tuning candidates to the AI ​​model calling module. The AI ​​model calling module uses a pre-trained machine learning model to evaluate each tuning candidate. The user's sentiment score is also taken into consideration here.

[0740] Step 6:

[0741] The server selects the optimal tuning plan based on the evaluation results of the AI ​​model. The selection criteria include execution costs (CPU, memory, I / O, etc.) and the user's sentiment score.

[0742] Step 7:

[0743] The server generates optimized database queries based on the selected optimal tuning plan. These optimized queries include features such as adding indexes and refactoring queries.

[0744] Step 8:

[0745] The server returns optimized database queries to the user's terminal. The user can then execute the returned queries, providing efficient query processing and an optimal user experience.

[0746] Specific examples of operation

[0747] The user enters the following SQL query:

[0748] sql

[0749] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0750] The emotion engine recognizes the user's stress level as high.

[0751] operation

[0752] 1. Step 1:

[0753] The user enters an SQL query from their terminal and presses the submit button. The emotion engine senses the user's stress level.

[0754] 2. Step 2:

[0755] The terminal sends SQL queries and sentiment data (e.g., high stress) to the server.

[0756] 3. Step 3:

[0757] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0758] 4. Step 4:

[0759] Based on the analysis results and sentiment data, the server generates multiple options, including suggestions for adding indexes, using a tuning candidate generation module. Because user stress levels are high, lighter options are prioritized.

[0760] 5. Step 5:

[0761] The server evaluates the tuning candidates generated by the AI ​​model calling module. The machine learning model evaluates the model considering its execution cost and the user's sentiment score.

[0762] 6. Step 6:

[0763] The server selects the optimal tuning plan based on the evaluation results. Evaluation criteria include CPU usage, memory usage, and user sentiment.

[0764] 7. Step 7:

[0765] The server generates optimized database queries based on the optimal tuning suggestions. The optimized queries will look like this:

[0766] sql

[0767] CREATE INDEX idx_region ON sales(region);

[0768] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0769] 8. Step 8:

[0770] The server returns optimized SQL queries to the user's terminal. The user executes the optimized queries and experiences efficient and user-friendly query processing.

[0771] In this way, the system optimizes SQL queries while taking user emotions into consideration, providing efficient database operations and a good user experience.

[0772] (Example 2)

[0773] Next, we will describe Example 2. 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".

[0774] Database query optimization is often performed without considering user emotions, which can lead to stressful situations for users. Furthermore, wasted resource consumption and long execution times are problematic. Additionally, the lack of standardization in optimization methods means they may not be sufficiently effective in specific situations.

[0775] The identification processing performed by the identification processing unit 290 of the data processing device 12 in Example 2 is realized by the following means. In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database structure and fields to be used, means for generating a plurality of tuning candidates based on the analysis results and user sentiment information, means for evaluating the tuning candidates using a machine learning model and selecting the optimal tuning plan considering sentiment information, and means for returning the optimal tuning plan to the user terminal. This enables efficient query optimization that takes user sentiment into account, making it possible to improve the user experience while suppressing the wasteful consumption of database resources.

[0776] A "user terminal" is an electronic device that a user operates to input database queries.

[0777] A "database query" is a set of commands that a user sends to a database to ask a question.

[0778] "Database structure" is a concept that describes how data is organized within a database.

[0779] A "field" refers to an individual data item in a database table.

[0780] "Emotional information" refers to data that indicates the user's emotional state and is obtained using an emotion engine.

[0781] "Tuning candidates" are multiple optimization suggestions for improving the execution efficiency of database queries.

[0782] A "machine learning model" is an algorithm that learns patterns and rules from data and experience, and uses that knowledge to make predictions and classifications.

[0783] The "optimal tuning plan" is the optimization plan selected from the aforementioned tuning candidates that is evaluated as having the highest execution efficiency.

[0784] This invention provides a system that optimizes database queries while considering the user's emotional state by combining an emotion engine with database query optimization. This system includes a user terminal, a server, and their respective modules.

[0785] The user enters a database query using a terminal. This terminal is equipped with an emotion engine that retrieves the user's emotion information in real time. The retrieved emotion information is sent to the server along with the database query.

[0786] The server first parses the received database query. For this parsing, the server uses an SQL parsing module (for example, Apache Calcite). This parsing module identifies the database structure and fields.

[0787] Next, the server processes the emotional information sent from the emotion engine (e.g., Microsoft Azure Emotion API). Based on this emotional information, it determines the user's emotional state (e.g., if their stress level is high) and uses that information in the next step.

[0788] The server generates multiple tuning options based on SQL analysis results and sentiment information. The user's emotional state is taken into consideration during this process. For example, if the user is under high stress, tuning options that reduce execution time will be prioritized.

[0789] The generated tuning candidates are evaluated using a machine learning model on the server. This machine learning model selects the optimal tuning option from among the multiple candidates. In this process, user sentiment information influences the evaluation process.

[0790] After the optimal tuning plan is selected, the server generates an optimized database query based on it and sends it back to the user's terminal. The user can then use this optimized query to perform efficient query execution.

[0791] As a concrete example, consider a case where a user enters the following SQL query:

[0792] sql

[0793] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0794] Simultaneously, the device's emotion engine recognizes that the user's stress level is high. Based on this information, the server performs the following specific actions:

[0795] 1. The SQL parsing module parses the query and identifies the table sales, columns region and amount, and the filter conditions region = 'East' and amount > 1000.

[0796] 2. The emotion engine determines that the user's stress level is high and sends that information to the server.

[0797] 3. Based on the analysis results and sentiment information, the server generates tuning candidates, such as adding an index to the region column.

[0798] 4. The server uses a machine learning model to evaluate each tuning candidate and select the optimal tuning option. Due to the high user stress level, the tuning option that reduces execution time is selected.

[0799] 5. An optimized SQL query is generated and sent back to the user terminal:

[0800] sql

[0801] CREATE INDEX idx_region ON sales(region);

[0802] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0803] Example of a prompt:

[0804] Create a program that generates tuning suggestions to shorten execution time based on SQL queries that users have previously found frustrating, thereby supporting efficient query execution. Example: Optimize the SQL query `SELECT FROM sales WHERE region = 'East' AND amount > 1000;`.

[0805] The flow of the specific processing in Example 2 will be explained using Figure 13.

[0806] Step 1:

[0807] The user uses a terminal to enter database queries and sends them to the server.

[0808] Input: The database query entered by the user (e.g., SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[0809] Output: Sending database query data from the terminal to the server

[0810] Step 2:

[0811] The device uses its built-in emotion engine to acquire user emotion information and sends that information to the server.

[0812] Input: User's emotional information (e.g., "high stress level" as recognized by the emotion engine)

[0813] Output: Sending emotion data from the terminal to the server

[0814] Step 3:

[0815] The server parses the received database query using an SQL parsing module to identify the database structure and fields used.

[0816] Input: Database query received by the server (e.g., SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[0817] Data processing: An SQL parsing module (e.g., Apache Calcite) parses the query and extracts table names, column names, and conditional expressions.

[0818] Output: Analyzed database structure and field information (e.g., table sales, columns region and amount, filter conditions region = 'East' and amount > 1000)

[0819] Step 4:

[0820] The server processes the received emotional information and determines the user's emotional state.

[0821] Input: Emotional information (e.g., high stress level)

[0822] Data processing: Evaluate the user's emotional state based on emotional information.

[0823] Output: Evaluated emotional state

[0824] Step 5:

[0825] The server generates multiple tuning candidates based on the SQL analysis results and emotional state.

[0826] Input: SQL parsing results (e.g., table sales, columns region and amount), and emotional state (e.g., high stress level).

[0827] Data processing: Based on the analysis results and emotional state, the candidate generation algorithm generates multiple tuning options.

[0828] Output: Tuning suggestions (e.g., suggestion to add an index to the region column)

[0829] Step 6:

[0830] The server evaluates the generated tuning candidates using a machine learning model and selects the optimal tuning option.

[0831] Input: Tuning candidates (e.g., multiple tuning options) and emotional state

[0832] Data processing: The machine learning model evaluates each tuning candidate and selects the optimal tuning option, taking into account execution cost and emotional state.

[0833] Output: Optimal tuning suggestions (e.g., suggestions with shorter execution times)

[0834] Step 7:

[0835] The server generates optimized database queries based on the best tuning suggestions and sends them back to the user's terminal.

[0836] Input: Optimal tuning proposal (e.g., optimization proposal for adding indexes)

[0837] Data processing: Generating optimized SQL queries

[0838] Output: Optimized database query returned to the user terminal (Example: CREATE INDEX idx_region ON sales(region); SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[0839] Step 8:

[0840] The system executes the optimized queries returned by the user into the database to efficiently retrieve data.

[0841] Input: Optimized database query

[0842] Output: Efficiently retrieved search results

[0843] (Application Example 2)

[0844] Next, we will explain application example 2. In the following explanation, the data processing device 12 will be referred to as the "server," and the smart glasses 214 will be referred to as the "terminal."

[0845] Traditional database query optimization systems perform their operations without considering user emotions, resulting in a uniform user experience and an inability to provide optimal performance for individual users. Furthermore, particularly in content delivery services, there is a need to appropriately present relevant content that responds to user emotions, but achieving this has been a challenge.

[0846] In Application Example 2, the specific processing performed by the specific processing unit 290 of the data processing device 12 is realized by the following means. In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database tables and columns to be used, means for recognizing the user's emotions, means for generating a plurality of tuning candidates based on the analysis results and emotion information, means for evaluating the tuning candidates using a machine learning model and selecting the optimal tuning plan, and means for returning the optimal tuning plan to the user. This makes it possible to provide optimal performance in accordance with the user's emotions and improve the user experience.

[0847] A "user terminal" is a computing device operated by a user, and it is a device that has an interface for entering database queries.

[0848] A "database query" is a set of instructions used to extract necessary data from a database.

[0849] A "database table" is a representation of a collection of data stored in a database, consisting of rows and columns.

[0850] A "column" refers to each column in a database table, and is a field that contains a specific type of data.

[0851] "Emotional information" refers to data that represents the emotional state obtained from the user's facial expressions, tone of voice, and other similar information.

[0852] "Tuning candidates" are several proposed improvements to enhance the execution efficiency of database queries.

[0853] A "machine learning model" is an algorithm that learns patterns and regularities from data and uses those results to make predictions and decisions.

[0854] An "optimal tuning proposal" is a query that has been improved to extract data most efficiently, taking into account the characteristics of user sentiment information and database queries.

[0855] A "video device" is a device, such as a camera, used to acquire visual information.

[0856] An "audio device" is a device used to acquire audio information, such as a microphone.

[0857] The system of this invention uses a user terminal, a server, and a machine learning model. The system is configured as follows:

[0858] User terminal

[0859] A user terminal is a device with an interface for entering database queries. This terminal is equipped with video and audio devices such as a camera and microphone, which capture emotional information from the user's facial expressions and tone of voice. When a user enters a database query, that query is sent to the server.

[0860] server

[0861] The server performs the following operations.

[0862] 1. Reception and Analysis:

[0863] The server receives database queries sent from the user terminal and parses them. Through this parsing, it identifies the database tables and columns to be used.

[0864] 2. Emotion recognition:

[0865] The emotion engine analyzes emotional information sent from the user's device. This emotional information reflects the user's real-time emotional state.

[0866] 3. Generating tuning candidates:

[0867] Based on the analysis results and sentiment information, the server generates several tuning options. These include adding database indexes and rewriting queries.

[0868] 4. Evaluation and Selection:

[0869] The generated tuning candidates are evaluated using a machine learning model. User sentiment information is reflected in the evaluation.

[0870] 5. Optimized query return:

[0871] Once the optimal tuning plan is selected, the server generates optimized database queries and returns them to the user terminal.

[0872] Machine learning models

[0873] Machine learning models are used to evaluate and optimize the execution efficiency of database queries. This generates optimal queries that take user sentiment into account.

[0874] Specific example

[0875] The user uses smart glasses to acquire data from the video and audio devices. The user searches for "popular comedy movies," and simultaneously, the emotion engine recognizes the user's emotion of "joy." Based on this information, the server operates as follows:

[0876] 1. Receive and parse the database query "SELECT FROM movies WHERE genre = 'comedy' AND rating > 4".

[0877] 2. Receive emotional information, "joy," from the emotional engine.

[0878] 3. Based on the analysis results and emotional information, generate multiple tuning candidates.

[0879] 4. Use a generative AI model to evaluate each tuning candidate and select the optimal query for "joy".

[0880] 5. Return the optimized query to the user's terminal.

[0881] Example of a prompt

[0882] User emotion: happy. Suggestion based on search query: popular comedy movies.

[0883] In this way, it becomes possible to provide optimal performance tailored to the user's emotions and improve the user experience.

[0884] The flow of a specific process in Application Example 2 will be explained using Figure 14.

[0885] Step 1:

[0886] The user enters a database query from a terminal. The terminal sends this query to the server. At this time, the terminal is equipped with video and audio devices, which are used to capture the user's facial expressions and tone of voice, and collect emotional information. The entered database query and emotional information are sent to the server.

[0887] Step 2:

[0888] The server receives and parses database queries sent from the user terminal. This parsing identifies the database tables and columns used within the query. Specifically, it parses the SQL statement and compares it with the database metadata to identify the tables and columns. The results of this parsing are then used for the following processes.

[0889] Step 3:

[0890] The server receives emotional information transmitted from the terminal. This emotional information is obtained by analyzing the user's facial expressions and voice tone acquired from video and audio equipment. Hugging Face's emotional analysis pipeline is used as the software for emotion recognition, identifying emotions from text data. This emotional information reflects the user's real-time emotional state.

[0891] Step 4:

[0892] The server generates multiple tuning options based on the analysis results and sentiment information. These options may include adding indexes to the database or rewriting the query structure. These options are given different priorities depending on the user's emotional state. For example, if the user is stressed, tuning options that reduce the processing load will be prioritized.

[0893] Step 5:

[0894] The server evaluates the generated tuning candidates using a machine learning model. The machine learning model predicts the execution cost of each candidate and selects the optimal tuning plan based on the evaluation results. User sentiment information is also considered during this process, ensuring that the most appropriate query is selected according to the user's emotional state. Examples of machine learning models used here include random forests and neural networks.

[0895] Step 6:

[0896] The server generates optimized database queries and returns them to the user terminal. The user terminal uses these optimized queries to perform efficient database operations. This allows the user to achieve optimal performance tailored to their emotional state. As a specific example, the following prompt is generated:

[0897] "User emotion: happy. Suggestion based on search query: popular comedy movies."

[0898] 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 user input for the result of the specific processing. The control unit 46A transmits the audio data indicating user input acquired by the microphone 238 to the data processing unit 12. In the data processing unit 12, the specific processing unit 290 acquires the audio data.

[0899] Data generation model 58 is a type of so-called generative AI (Artificial Intelligence). One example of data generation model 58 is ChatGPT (Internet search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search) <url: https: gemini.google.com ?hl="ja">Examples of generative AI include the following. The data generation model 58 is obtained by performing deep learning on a neural network. The data generation model 58 is input with prompts containing instructions, and with inference data such as audio data representing speech, text data representing text, and image data representing images. The data generation model 58 infers from the input inference data according to the instructions indicated by the prompts, and outputs the inference results in data formats such as audio data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[0900] In the above embodiment, an example was given in which specific processing is performed by the data processing device 12, but the technology of this disclosure is not limited thereto, and the specific processing may also be performed by the smart glasses 214.

[0901] [Third Embodiment]

[0902] Figure 5 shows an example of the configuration of the data processing system 310 according to the third embodiment.

[0903] As shown in Figure 5, the data processing system 310 includes a data processing device 12 and a headset terminal 314. An example of the data processing device 12 is a server.

[0904] The data processing device 12 comprises a computer 22, a database 24, and a communication interface 26. The computer 22 is an example of a "computer" related to the technology of this disclosure. The computer 22 comprises a processor 28, RAM 30, and storage 32. The processor 28, RAM 30, and storage 32 are connected to a bus 34. The database 24 and the communication interface 26 are also connected to the bus 34. The communication interface 26 is connected to a network 54. An example of the network 54 is a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0905] The headset terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication interface 44, and a display 343. The computer 36 includes a processor 46, RAM 48, and storage 50. The processor 46, RAM 48, and storage 50 are connected to a bus 52. The microphone 238, speaker 240, camera 42, and display 343 are also connected to the bus 52.

[0906] The microphone 238 receives voice signals from the user 20 and receives instructions from the user 20. The microphone 238 captures the voice signals from the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio according to the instructions from the processor 46.

[0907] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an image sensor such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the area around the user 20 (for example, an imaging range defined by a field of view equivalent to the width of a typical healthy person's field of vision).

[0908] Communication interface 44 is connected to network 54. Communication interfaces 44 and 26 are responsible for the exchange of various information between processor 46 and processor 28 via network 54. The exchange of various information between processor 46 and processor 28 using communication interfaces 44 and 26 is performed in a secure manner.

[0909] Figure 6 shows an example of the main functions of the data processing device 12 and the headset terminal 314. As shown in Figure 6, the data processing device 12 performs specific processing using the processor 28. The storage 32 stores the specific processing program 56.

[0910] The specific processing program 56 is an example of a "program" relating to the technology of this 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.

[0911] The storage 32 stores the data generation model 58 and the emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0912] In the headset terminal 314, the processor 46 performs the reception output processing. The storage 50 stores the reception output program 60. 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 processing is realized by the processor 46 operating as a control unit 46A according to the reception output program 60 executed on the RAM 48.

[0913] Next, the specific processing performed by the specific processing unit 290 of the data processing device 12 will be described. In the following description, the data processing device 12 will be referred to as the "server" and the headset terminal 314 will be referred to as the "terminal".

[0914] The system of this invention optimizes inefficient SQL queries and SQL queries that place an excessive load on the database using generative AI before execution. This reduces the consumption of unnecessary database resources and lowers cloud usage fees.

[0915] System program processing

[0916] SQL analysis

[0917] The user terminal enters an SQL query against the data warehouse. The server receives this query and passes it to the SQL parsing module. The SQL parsing module parses the query and identifies the tables and columns used. Based on these parsing results, the next step is initiated.

[0918] Generation of tuning candidates

[0919] The server generates tuning candidates using a tuning candidate generation module based on the analysis results. This module references existing indexes and table statistics to generate proposed changes necessary for performance improvement. These may include adding indexes or restructuring queries.

[0920] Evaluation using AI models

[0921] The server passes the generated tuning candidates to the AI ​​model calling module, which evaluates them using generative AI. This evaluation predicts the execution cost (CPU, memory, I / O, etc.) of each tuning candidate and selects the optimal candidate. The AI ​​model determines which optimization is best based on pre-trained data.

[0922] Optimized query return

[0923] The server returns optimized SQL queries to the user's terminal. This enables users to execute queries efficiently, resulting in improved DWH performance and reduced cloud usage costs.

[0924] Specific example

[0925] Suppose a user enters the following SQL query into the data warehouse:

[0926] sql

[0927] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0928] Operation description

[0929] 1. SQL parsing:

[0930] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0931] 2. Generating tuning candidates:

[0932] The server uses a tuning candidate generation module to generate suggestions for adding indexes. For example, it might generate suggestions for adding an index to the `region` column.

[0933] 3. Evaluation using AI models:

[0934] The server passes tuning candidates to the AI ​​model, which then evaluates each candidate. The AI ​​model determines that adding an index to the region column will improve query performance.

[0935] 4. Optimized query return:

[0936] The server returns an optimized SQL query to the user's terminal. The optimized SQL query looks like this:

[0937] sql

[0938] CREATE INDEX idx_region ON sales(region);

[0939] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0940] In this way, the system automatically analyzes and optimizes user-entered queries, enabling efficient query execution. As a result, improved database performance and reduced cloud usage fees can be expected.

[0941] The following describes the processing flow.

[0942] Step 1:

[0943] The user enters a database query from their terminal. The user enters the query they want to execute against the data warehouse (DWH) and presses the submit button.

[0944] Step 2:

[0945] The server receives database queries sent by the user. The received queries are passed to the server's SQL parsing module.

[0946] Step 3:

[0947] The server's SQL parsing module analyzes the database query. Specifically, it parses the query and identifies the tables, columns, and filter conditions used.

[0948] Step 4:

[0949] Based on the analysis results, the server uses a tuning candidate generation module to generate multiple tuning candidates. These may include suggestions such as adding indexes or restructuring queries.

[0950] Step 5:

[0951] The server passes the generated tuning candidates to the AI ​​model calling module. The AI ​​model calling module uses a pre-trained AI model to evaluate the execution cost of each tuning candidate and select the optimal tuning option.

[0952] Step 6:

[0953] After the server selects the optimal tuning plan, it generates optimized database queries. These optimized queries include adding indexes and refactoring existing queries.

[0954] Step 7:

[0955] The server returns database queries optimized for the user's terminal. The user can then use these optimized queries to execute queries efficiently on the database.

[0956] Specific examples of operation

[0957] The user enters the following SQL query:

[0958] sql

[0959] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0960] operation

[0961] 1. Step 1:

[0962] The user enters the above SQL query from their terminal and presses the submit button.

[0963] 2. Step 2:

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

[0965] 3. Step 3:

[0966] The server's SQL parsing module parses the query and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[0967] 4. Step 4:

[0968] The server uses a tuning candidate generation module to generate tuning candidates, for example, one that adds an index to the region column.

[0969] 5. Step 5:

[0970] The server passes the generated tuning candidates to the AI ​​model calling module, which then evaluates each candidate. The AI ​​model selects adding an index to the region column as the optimal candidate.

[0971] 6. Step 6:

[0972] The server generates an optimized database query. The optimized query will look like this:

[0973] sql

[0974] CREATE INDEX idx_region ON sales(region);

[0975] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0976] 7. Step 7:

[0977] The server returns an optimized SQL query to the user's terminal. The user executes the returned query to achieve efficient query processing.

[0978] In this way, this system automatically analyzes and optimizes the queries entered by the user, enabling efficient query execution.

[0979] (Example 1)

[0980] Next, we will describe Example 1. 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."

[0981] Traditional database management systems suffered from inefficient SQL queries and SQL queries that placed excessive load on the database, resulting in wasted database resources. Furthermore, this led to increased cloud usage fees, raising operational costs. Conventional technologies required manual optimization of these inefficient queries, which was time-consuming and labor-intensive.

[0982] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 1 is realized by the following means.

[0983] In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database tables and columns to be used, means for generating a plurality of tuning candidates based on the analysis results, means for evaluating the tuning candidates using a generation AI model, predicting the execution cost of each candidate and selecting the optimal tuning plan, and means for returning the optimal tuning plan to the user. This enables automatic optimization of database queries, resulting in improved database performance and reduced cloud usage fees.

[0984] A "user terminal" is a device used by a user to enter database queries.

[0985] A "database query" is a set of instructions used to perform a specific operation on a database.

[0986] A "server" is a device or system that receives database queries from user terminals and performs analysis, evaluation, and optimization.

[0987] A "SQL parsing module" is a software module used to analyze database queries and identify the database tables and columns being used.

[0988] The "Tuning Candidate Generation Module" is a software module that generates multiple tuning candidates to improve the performance of database queries based on analysis results.

[0989] A "generative AI model" is an artificial intelligence model used to select the optimal tuning candidate based on data that has been trained on it in advance.

[0990] The "optimal tuning plan" refers to a specific method for optimizing the performance of database queries, selected based on an evaluation of the generative AI model.

[0991] A "database index" is a data structure used to improve the speed of searching for data within a database.

[0992] A "machine learning model" is a model constructed using algorithms that learn patterns and rules based on large amounts of data.

[0993] "Execution cost" refers to the amount of resources (CPU, memory, I / O, etc.) consumed when executing a database query.

[0994] The system of this invention comprises a user terminal, a server, an SQL analysis module, a tuning candidate generation module, and a generation AI model. The purpose of this system is to improve database performance and reduce cloud usage fees by automatically analyzing and optimizing database queries entered by the user.

[0995] First, the user uses a terminal to enter an SQL query against the data warehouse (DWH). For example, they would enter a query like this:

[0996] sql

[0997] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[0998] This SQL query is sent from the user's terminal to the server.

[0999] Next, the server passes the received SQL query to the SQL parsing module. The SQL parsing module parses the query and identifies the tables and columns used. This parsing identifies the table (in this case, sales), columns (region and amount), and filter conditions (region = 'East' and amount > 1000) used in the query.

[1000] Next, the server uses a tuning candidate generation module based on the analysis results to generate tuning candidates. This module references existing indexes and table statistics to generate proposed changes necessary for performance improvement. Examples include proposals for adding database indexes and restructuring queries. In this specific example, a proposal to add an index to the region column is generated.

[1001] The server then passes the generated tuning candidates to the AI ​​model calling module, which uses the generating AI model to evaluate each candidate. In this evaluation process, the generating AI model predicts the execution cost (CPU, memory, I / O, etc.) of each tuning candidate and selects the optimal tuning candidate. The generating AI model is a machine learning model that operates based on pre-trained data, and in this specific example, it determines that adding an index to the region column is the optimal solution.

[1002] Finally, the server generates an optimized query and returns it to the user's terminal. A concrete example of an optimized SQL query is shown below:

[1003] sql

[1004] CREATE INDEX idx_region ON sales(region);

[1005] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1006] This allows users to execute queries efficiently, resulting in improved database performance and reduced cloud usage costs.

[1007] As this specific example illustrates, the novelty of the invention lies in its ability to automatically perform everything from parsing to optimizing SQL queries, and in its use of a generative AI model to select the optimal tuning candidate. An example of a prompt statement is the following:

[1008] Analyze the given SQL query, generate optimal tuning candidates, select the most effective optimization, and return the optimized query. For example, evaluate whether to add an index to the following query:

[1009] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1010] The flow of the specific processing in Example 1 will be explained using Figure 11.

[1011] Program processing flow

[1012] Step 1:

[1013] The user enters a database query using a terminal. The entered query is sent from the terminal to the server. For example, the following query is entered:

[1014] sql

[1015] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1016] Input: User's SQL query

[1017] Output: Raw queries sent to the server

[1018] Step 2:

[1019] The server receives a database query sent by the user. The server then passes this query to the SQL parsing module.

[1020] Specifically, the server receives the query string and provides it to the SQL parsing module in the appropriate format.

[1021] Input: SQL query sent from the user terminal

[1022] Output: Query input to the SQL parsing module

[1023] Step 3:

[1024] The SQL parsing module analyzes the query and identifies the tables and columns used. The analysis results include filter conditions.

[1025] Specific actions include parsing the query syntax, extracting table names, and identifying the columns and conditions to be used.

[1026] Input: SQL query passed to the SQL parsing module

[1027] Output: Identified tables, columns, and filter conditions

[1028] Step 4:

[1029] The server uses a tuning candidate generation module based on the analysis results to generate multiple tuning candidates.

[1030] Specifically, it refers to existing index information and table statistics to generate tuning suggestions such as adding indexes and restructuring queries.

[1031] Input: Analysis results from the SQL analysis module (tables, columns, filter conditions)

[1032] Output: Multiple tuning candidates

[1033] Step 5:

[1034] The server passes the generated tuning candidates to the AI ​​model calling module, which then uses the generated AI model to evaluate each candidate.

[1035] The evaluation process predicts the execution cost (CPU, memory, I / O, etc.) for each tuning candidate and selects the optimal one.

[1036] Input: Tuning candidates

[1037] Output: Evaluated tuning candidates and their estimated execution costs

[1038] Step 6:

[1039] The generative AI model selects the optimal tuning candidates. It chooses the most effective tuning based on execution cost and performance improvement.

[1040] In terms of specific operations, the AI ​​model evaluates based on data it has previously learned and selects the optimal solution.

[1041] Input: Evaluated tuning candidates and estimated execution costs

[1042] Output: Optimal tuning candidates

[1043] Step 7:

[1044] The server optimizes the SQL query based on the selected optimal tuning candidates and returns it to the user terminal.

[1045] As a concrete example, the following index addition optimization is returned:

[1046] sql

[1047] CREATE INDEX idx_region ON sales(region);

[1048] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1049] Input: Optimal tuning candidates

[1050] Output: Optimized SQL query

[1051] Through these steps, improved database performance and reduced cloud usage costs will be achieved.

[1052] (Application Example 1)

[1053] Next, we will explain Application Example 1. In the following explanation, 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."

[1054] In logistics centers, a large volume of database queries are processed in real time. This leads to frequent occurrences of inefficient SQL queries and queries that overload the database, resulting in a decrease in system response speed. Furthermore, rising cloud usage costs are a significant challenge. To address this, efficient query execution is required.

[1055] The specific processing performed by the specific processing unit 290 of the data processing device 12 in Application Example 1 is realized by the following means.

[1056] In this invention, the server includes means for receiving database queries entered from a user terminal, means for analyzing the database queries and identifying the database tables and columns to be used, and means for generating a plurality of tuning candidates based on the analysis results. This improves the response speed of real-time database queries from smartphones in logistics centers and enables efficient query execution. As a result, database performance is improved and a reduction in cloud usage fees can be expected.

[1057] A "user terminal" is a device used to enter database queries, and includes smartphones, personal computers, and other similar devices.

[1058] A "database query" is a set of commands issued to retrieve, update, or delete information from a database.

[1059] A "database table" is a tabular data structure in which information within a database is stored.

[1060] A "column" refers to each column in a database table, where a specific type of data is stored.

[1061] "Tuning suggestions" are proposals or changes to improve the performance of database queries, and may include adding indexes or restructuring queries.

[1062] A "generative model" is an algorithm that uses machine learning to evaluate the optimal tuning candidates.

[1063] A "logistics center" is a facility where goods and items are stored, shipped, received, and inventory managed.

[1064] "Real-time" means responding instantly to user input.

[1065] A "database index" is a data structure that provides fast access to specific columns within a database table.

[1066] A "machine learning model" is an algorithm or method used to learn patterns from data and perform predictions or classifications.

[1067] This invention relates to a system for data processing in a logistics center and aims to achieve efficient query execution. The system of this invention includes a server that receives database queries input from a user terminal, an analysis module that analyzes the database queries and identifies the database tables and columns to be used, a candidate generation module that generates multiple tuning candidates based on the analysis results, an evaluation module that evaluates the tuning candidates using a generation AI model and selects the optimal tuning plan, and a return module that returns the optimal tuning plan to the user.

[1068] System Configuration

[1069] 1. User terminal

[1070] You enter database queries using devices such as smartphones and computers. Specifically, you issue SQL queries to retrieve real-time data such as inventory information and shipping information.

[1071] 2. Server

[1072] It receives database queries and passes them to the analysis module. The server is connected to the database and has computing resources to support efficient query execution.

[1073] 3. Analysis Module

[1074] The system parses the database query received by the server and identifies the database tables and columns used. For example, it explicitly indicates which table and which column the query references.

[1075] 4. Candidate generation module

[1076] Based on the analysis results, several tuning options are generated to improve query efficiency. These include, for example, adding indexes or redesigning the query structure.

[1077] 5. Evaluation Module

[1078] Tuning candidates are evaluated using a generative AI model. Based on pre-trained data, the generative AI model predicts the effect of each tuning candidate and selects the optimal solution.

[1079] 6. Return Module

[1080] The system returns optimized tuning suggestions to the user's terminal. The user then uses these suggestions to re-execute database queries and achieve improved performance.

[1081] Specific example

[1082] For example, suppose a user enters the following SQL query:

[1083] sql

[1084] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[1085] The server first uses an analysis module to analyze this query and identify the table inventory and the columns location and stock. Next, a candidate generation module generates candidates for adding an index to the location column based on the analysis results. Then, an evaluation module uses a generated AI model to evaluate these tuning candidates and determine if they are optimal. Finally, the server returns the following optimized SQL query to the user terminal:

[1086] sql

[1087] CREATE INDEX idx_location ON inventory(location);

[1088] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[1089] Example of a prompt

[1090] The following are examples of prompts used when performing evaluation with a generative AI model:

[1091] plain text

[1092] Please evaluate the following SQL tuning candidates:

[1093] CREATE INDEX idx_location ON inventory(location);

[1094] The flow of a specific process in Application Example 1 will be explained using Figure 12.

[1095] Step 1:

[1096] Query input from user terminal

[1097] Users enter database queries on their smartphones or other user devices. The entered queries are then sent directly to the server.

[1098] Input: SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[1099] Output: A data stream in which queries are sent from the user terminal to the server.

[1100] Step 2:

[1101] Database query received

[1102] The server receives database queries sent from the user terminal. The received queries are then passed to the next analysis module.

[1103] Input: Database query sent from the user's terminal.

[1104] Output: Passing of database queries to the analysis module.

[1105] Step 3:

[1106] Query analysis

[1107] The analysis module on the server parses the database query. It parses the query statement and extracts the necessary information to identify the tables and columns being used.

[1108] Input: Database query received by the server.

[1109] Output: Table inventory and information for the columns location and stock.

[1110] Specific operation: Performs grammatical analysis of the SELECT statement to identify the table name and the columns used in the condition.

[1111] Step 4:

[1112] Generation of tuning candidates

[1113] The server's candidate generation module generates multiple tuning candidates based on the analysis results. These may include, for example, adding an index to a specific column.

[1114] Input: Table and column information identified by the analysis module.

[1115] Output: Multiple tuning candidates.

[1116] Specific operation: Create a list of candidate indexes to add, and generate it by referencing existing indexes and table statistics.

[1117] Step 5:

[1118] Evaluation of tuning candidates

[1119] The server evaluation module uses a generative model to evaluate tuning candidates. The generative AI model predicts the performance improvement effect of each candidate and selects the optimal tuning plan from among them.

[1120] Input: Multiple tuning candidates generated by the candidate generation module.

[1121] Output: Optimal tuning suggestion.

[1122] Specific operation: The following prompt statements are passed to the generating AI model for evaluation:

[1123] plain text

[1124] Please evaluate the following SQL tuning candidates:

[1125] CREATE INDEX idx_location ON inventory(location);

[1126] Step 6:

[1127] Optimized query return

[1128] The server's return module sends optimized tuning suggestions back to the user's terminal. This allows the user to execute queries efficiently.

[1129] Input: The optimal tuning plan selected by the evaluation module.

[1130] Output: Optimization queries sent to the user's terminal.

[1131] Specific operation: Formats and returns an optimized query for the user. For example, the following query is returned:

[1132] sql

[1133] CREATE INDEX idx_location ON inventory(location);

[1134] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[1135] Furthermore, an emotion engine that estimates the user's emotions may be incorporated. That is, the identification processing unit 290 may use the emotion identification model 59 to estimate the user's emotions and perform identification processing using the user's emotions.

[1136] This invention combines a system that automatically analyzes and optimizes database queries entered from user terminals with an emotion engine to achieve optimization that takes user emotions into account. The aim of this system is to reduce unnecessary consumption of database resources, lower cloud usage fees, and improve the user experience.

[1137] System program processing

[1138] SQL analysis and sentiment recognition

[1139] When a user enters a database query from their device, the server receives it. Simultaneously, an emotion engine built into the device recognizes the user's emotions and sends that data to the server.

[1140] Generation of tuning candidates

[1141] The server parses the received SQL query and identifies the tables and columns to be used. Based on the analysis results and the user's sentiment information obtained from the sentiment engine, it generates multiple tuning candidates. Here, adjustments are made according to the user's emotions; for example, if the user is stressed, tuning candidates with lower loads are prioritized.

[1142] Evaluation using AI models

[1143] The generated tuning candidates are passed to the server's AI model invocation module. The AI ​​model invocation module uses a machine learning model to evaluate the execution cost of each candidate. Here again, the user's sentiment score influences the evaluation.

[1144] Optimized query return

[1145] Once the optimal tuning plan is selected, the server generates an optimized database query and returns it to the user's terminal. The user can then use the returned optimized query to perform efficient query execution.

[1146] Specific example

[1147] If the user enters the following SQL query:

[1148] sql

[1149] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1150] Simultaneously, the device's emotion engine recognizes that the user's stress level is high. Based on this information, the following actions are taken:

[1151] operation

[1152] 1. SQL parsing:

[1153] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[1154] The emotion engine determines that the user's stress level is "high" and sends that information to the server.

[1155] 2. Generating tuning candidates:

[1156] The server generates tuning candidates based on the analysis results and user sentiment information.

[1157] For example, a proposal to add an index to the region column is generated, but if this is too stressful for users, other options that reduce execution time will also be considered.

[1158] 3. Evaluation using AI models:

[1159] The server evaluates each tuning candidate using the AI ​​model calling module.

[1160] The AI ​​model also takes the user's stress level into consideration when selecting the optimal tuning solution.

[1161] 4. Optimized query return:

[1162] The server returns an optimized SQL query to the user's terminal. The optimized query looks like this:

[1163] sql

[1164] CREATE INDEX idx_region ON sales(region);

[1165] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1166] This allows users to execute queries efficiently and minimize the consumption of database resources.

[1167] In this way, this system optimizes SQL queries while taking user emotions into consideration, providing efficient database operations and a good user experience.

[1168] The following describes the processing flow.

[1169] Step 1:

[1170] The user enters a database query from their device and presses the submit button. The emotion engine recognizes the user's emotions and retrieves emotional data such as stress levels and satisfaction levels.

[1171] Step 2:

[1172] The terminal sends the entered database query and retrieved sentiment data to the server.

[1173] Step 3:

[1174] The server passes the received database query to the SQL parsing module, which then parses the query. Specifically, it performs syntax analysis of the query to identify the tables, columns, and filter conditions used.

[1175] Step 4:

[1176] The server retrieves the analysis results and passes them to the tuning candidate generation module. This module generates multiple tuning candidates based on the analysis results and sentiment data sent from the terminal. If the user's sentiment is stressful, it prioritizes generating tuning candidates with less processing load.

[1177] Step 5:

[1178] The server passes the generated tuning candidates to the AI ​​model calling module. The AI ​​model calling module uses a pre-trained machine learning model to evaluate each tuning candidate. The user's sentiment score is also taken into consideration here.

[1179] Step 6:

[1180] The server selects the optimal tuning plan based on the evaluation results of the AI ​​model. The selection criteria include execution costs (CPU, memory, I / O, etc.) and the user's sentiment score.

[1181] Step 7:

[1182] The server generates optimized database queries based on the selected optimal tuning plan. These optimized queries include features such as adding indexes and refactoring queries.

[1183] Step 8:

[1184] The server returns optimized database queries to the user's terminal. The user can then execute the returned queries, providing efficient query processing and an optimal user experience.

[1185] Specific examples of operation

[1186] The user enters the following SQL query:

[1187] sql

[1188] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1189] The emotion engine recognizes the user's stress level as high.

[1190] operation

[1191] 1. Step 1:

[1192] The user enters an SQL query from their terminal and presses the submit button. The emotion engine senses the user's stress level.

[1193] 2. Step 2:

[1194] The terminal sends SQL queries and sentiment data (e.g., high stress) to the server.

[1195] 3. Step 3:

[1196] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[1197] 4. Step 4:

[1198] Based on the analysis results and sentiment data, the server generates multiple options, including suggestions for adding indexes, using a tuning candidate generation module. Because user stress levels are high, lighter options are prioritized.

[1199] 5. Step 5:

[1200] The server evaluates the tuning candidates generated by the AI ​​model calling module. The machine learning model evaluates the model considering its execution cost and the user's sentiment score.

[1201] 6. Step 6:

[1202] The server selects the optimal tuning plan based on the evaluation results. Evaluation criteria include CPU usage, memory usage, and user sentiment.

[1203] 7. Step 7:

[1204] The server generates optimized database queries based on the optimal tuning suggestions. The optimized queries will look like this:

[1205] sql

[1206] CREATE INDEX idx_region ON sales(region);

[1207] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1208] 8. Step 8:

[1209] The server returns optimized SQL queries to the user's terminal. The user executes the optimized queries and experiences efficient and user-friendly query processing.

[1210] In this way, the system optimizes SQL queries while taking user emotions into consideration, providing efficient database operations and a good user experience.

[1211] (Example 2)

[1212] Next, we will describe Example 2. 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."

[1213] Database query optimization is often performed without considering user emotions, which can lead to stressful situations for users. Furthermore, wasted resource consumption and long execution times are problematic. Additionally, the lack of standardization in optimization methods means they may not be sufficiently effective in specific situations.

[1214] The identification processing performed by the identification processing unit 290 of the data processing device 12 in Example 2 is realized by the following means. In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database structure and fields to be used, means for generating a plurality of tuning candidates based on the analysis results and user sentiment information, means for evaluating the tuning candidates using a machine learning model and selecting the optimal tuning plan considering sentiment information, and means for returning the optimal tuning plan to the user terminal. This enables efficient query optimization that takes user sentiment into account, making it possible to improve the user experience while suppressing the wasteful consumption of database resources.

[1215] A "user terminal" is an electronic device that a user operates to input database queries.

[1216] A "database query" is a set of commands that a user sends to a database to ask a question.

[1217] "Database structure" is a concept that describes how data is organized within a database.

[1218] A "field" refers to an individual data item in a database table.

[1219] "Emotional information" refers to data that indicates the user's emotional state and is obtained using an emotion engine.

[1220] "Tuning candidates" are multiple optimization suggestions for improving the execution efficiency of database queries.

[1221] A "machine learning model" is an algorithm that learns patterns and rules from data and experience, and uses that knowledge to make predictions and classifications.

[1222] The "optimal tuning plan" is the optimization plan selected from the aforementioned tuning candidates that is evaluated as having the highest execution efficiency.

[1223] This invention provides a system that optimizes database queries while considering the user's emotional state by combining an emotion engine with database query optimization. This system includes a user terminal, a server, and their respective modules.

[1224] The user enters a database query using a terminal. This terminal is equipped with an emotion engine that retrieves the user's emotion information in real time. The retrieved emotion information is sent to the server along with the database query.

[1225] The server first parses the received database query. For this parsing, the server uses an SQL parsing module (for example, Apache Calcite). This parsing module identifies the database structure and fields.

[1226] Next, the server processes the emotional information sent from the emotion engine (e.g., Microsoft Azure Emotion API). Based on this emotional information, it determines the user's emotional state (e.g., if their stress level is high) and uses that information in the next step.

[1227] The server generates multiple tuning options based on SQL analysis results and sentiment information. The user's emotional state is taken into consideration during this process. For example, if the user is under high stress, tuning options that reduce execution time will be prioritized.

[1228] The generated tuning candidates are evaluated using a machine learning model on the server. This machine learning model selects the optimal tuning option from among the multiple candidates. In this process, user sentiment information influences the evaluation process.

[1229] After the optimal tuning plan is selected, the server generates an optimized database query based on it and sends it back to the user's terminal. The user can then use this optimized query to perform efficient query execution.

[1230] As a concrete example, consider a case where a user enters the following SQL query:

[1231] sql

[1232] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1233] Simultaneously, the device's emotion engine recognizes that the user's stress level is high. Based on this information, the server performs the following specific actions:

[1234] 1. The SQL parsing module parses the query and identifies the table sales, columns region and amount, and the filter conditions region = 'East' and amount > 1000.

[1235] 2. The emotion engine determines that the user's stress level is high and sends that information to the server.

[1236] 3. Based on the analysis results and sentiment information, the server generates tuning candidates, such as adding an index to the region column.

[1237] 4. The server uses a machine learning model to evaluate each tuning candidate and select the optimal tuning option. Due to the high user stress level, the tuning option that reduces execution time is selected.

[1238] 5. An optimized SQL query is generated and sent back to the user terminal:

[1239] sql

[1240] CREATE INDEX idx_region ON sales(region);

[1241] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1242] Example of a prompt:

[1243] Create a program that generates tuning suggestions to shorten execution time based on SQL queries that users have previously found frustrating, thereby supporting efficient query execution. Example: Optimize the SQL query `SELECT FROM sales WHERE region = 'East' AND amount > 1000;`.

[1244] The flow of the specific processing in Example 2 will be explained using Figure 13.

[1245] Step 1:

[1246] The user uses a terminal to enter database queries and sends them to the server.

[1247] Input: The database query entered by the user (e.g., SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[1248] Output: Sending database query data from the terminal to the server

[1249] Step 2:

[1250] The device uses its built-in emotion engine to acquire user emotion information and sends that information to the server.

[1251] Input: User's emotional information (e.g., "high stress level" as recognized by the emotion engine)

[1252] Output: Sending emotion data from the terminal to the server

[1253] Step 3:

[1254] The server parses the received database query using an SQL parsing module to identify the database structure and fields used.

[1255] Input: Database query received by the server (e.g., SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[1256] Data processing: An SQL parsing module (e.g., Apache Calcite) parses the query and extracts table names, column names, and conditional expressions.

[1257] Output: Analyzed database structure and field information (e.g., table sales, columns region and amount, filter conditions region = 'East' and amount > 1000)

[1258] Step 4:

[1259] The server processes the received emotional information and determines the user's emotional state.

[1260] Input: Emotional information (e.g., high stress level)

[1261] Data processing: Evaluate the user's emotional state based on emotional information.

[1262] Output: Evaluated emotional state

[1263] Step 5:

[1264] The server generates multiple tuning candidates based on the SQL analysis results and emotional state.

[1265] Input: SQL parsing results (e.g., table sales, columns region and amount), and emotional state (e.g., high stress level).

[1266] Data processing: Based on the analysis results and emotional state, the candidate generation algorithm generates multiple tuning options.

[1267] Output: Tuning suggestions (e.g., suggestion to add an index to the region column)

[1268] Step 6:

[1269] The server evaluates the generated tuning candidates using a machine learning model and selects the optimal tuning option.

[1270] Input: Tuning candidates (e.g., multiple tuning options) and emotional state

[1271] Data processing: The machine learning model evaluates each tuning candidate and selects the optimal tuning option, taking into account execution cost and emotional state.

[1272] Output: Optimal tuning suggestions (e.g., suggestions with shorter execution times)

[1273] Step 7:

[1274] The server generates optimized database queries based on the best tuning suggestions and sends them back to the user's terminal.

[1275] Input: Optimal tuning proposal (e.g., optimization proposal for adding indexes)

[1276] Data processing: Generating optimized SQL queries

[1277] Output: Optimized database query returned to the user terminal (Example: CREATE INDEX idx_region ON sales(region); SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[1278] Step 8:

[1279] The system executes the optimized queries returned by the user into the database to efficiently retrieve data.

[1280] Input: Optimized database query

[1281] Output: Efficiently retrieved search results

[1282] (Application Example 2)

[1283] Next, we will explain application example 2. In the following explanation, 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."

[1284] Traditional database query optimization systems perform their operations without considering user emotions, resulting in a uniform user experience and an inability to provide optimal performance for individual users. Furthermore, particularly in content delivery services, there is a need to appropriately present relevant content that responds to user emotions, but achieving this has been a challenge.

[1285] In Application Example 2, the specific processing performed by the specific processing unit 290 of the data processing device 12 is realized by the following means. In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database tables and columns to be used, means for recognizing the user's emotions, means for generating a plurality of tuning candidates based on the analysis results and emotion information, means for evaluating the tuning candidates using a machine learning model and selecting the optimal tuning plan, and means for returning the optimal tuning plan to the user. This makes it possible to provide optimal performance in accordance with the user's emotions and improve the user experience.

[1286] A "user terminal" is a computing device operated by a user, and it is a device that has an interface for entering database queries.

[1287] A "database query" is a set of instructions used to extract necessary data from a database.

[1288] A "database table" is a representation of a collection of data stored in a database, consisting of rows and columns.

[1289] A "column" refers to each column in a database table, and is a field that contains a specific type of data.

[1290] "Emotional information" refers to data that represents the emotional state obtained from the user's facial expressions, tone of voice, and other similar information.

[1291] "Tuning candidates" are several proposed improvements to enhance the execution efficiency of database queries.

[1292] A "machine learning model" is an algorithm that learns patterns and regularities from data and uses those results to make predictions and decisions.

[1293] An "optimal tuning proposal" is a query that has been improved to extract data most efficiently, taking into account the characteristics of user sentiment information and database queries.

[1294] A "video device" is a device, such as a camera, used to acquire visual information.

[1295] An "audio device" is a device used to acquire audio information, such as a microphone.

[1296] The system of this invention uses a user terminal, a server, and a machine learning model. The system is configured as follows:

[1297] User terminal

[1298] A user terminal is a device with an interface for entering database queries. This terminal is equipped with video and audio devices such as a camera and microphone, which capture emotional information from the user's facial expressions and tone of voice. When a user enters a database query, that query is sent to the server.

[1299] server

[1300] The server performs the following operations.

[1301] 1. Reception and Analysis:

[1302] The server receives database queries sent from the user terminal and parses them. Through this parsing, it identifies the database tables and columns to be used.

[1303] 2. Emotion recognition:

[1304] The emotion engine analyzes emotional information sent from the user's device. This emotional information reflects the user's real-time emotional state.

[1305] 3. Generating tuning candidates:

[1306] Based on the analysis results and sentiment information, the server generates several tuning options. These include adding database indexes and rewriting queries.

[1307] 4. Evaluation and Selection:

[1308] The generated tuning candidates are evaluated using a machine learning model. User sentiment information is reflected in the evaluation.

[1309] 5. Optimized query return:

[1310] Once the optimal tuning plan is selected, the server generates optimized database queries and returns them to the user terminal.

[1311] Machine learning models

[1312] Machine learning models are used to evaluate and optimize the execution efficiency of database queries. This generates optimal queries that take user sentiment into account.

[1313] Specific example

[1314] The user uses smart glasses to acquire data from the video and audio devices. The user searches for "popular comedy movies," and simultaneously, the emotion engine recognizes the user's emotion of "joy." Based on this information, the server operates as follows:

[1315] 1. Receive and parse the database query "SELECT FROM movies WHERE genre = 'comedy' AND rating > 4".

[1316] 2. Receive emotional information, "joy," from the emotional engine.

[1317] 3. Based on the analysis results and emotional information, generate multiple tuning candidates.

[1318] 4. Use a generative AI model to evaluate each tuning candidate and select the optimal query for "joy".

[1319] 5. Return the optimized query to the user's terminal.

[1320] Example of a prompt

[1321] User emotion: happy. Suggestion based on search query: popular comedy movies.

[1322] In this way, it becomes possible to provide optimal performance tailored to the user's emotions and improve the user experience.

[1323] The flow of a specific process in Application Example 2 will be explained using Figure 14.

[1324] Step 1:

[1325] The user enters a database query from a terminal. The terminal sends this query to the server. At this time, the terminal is equipped with video and audio devices, which are used to capture the user's facial expressions and tone of voice, and collect emotional information. The entered database query and emotional information are sent to the server.

[1326] Step 2:

[1327] The server receives and parses database queries sent from the user terminal. This parsing identifies the database tables and columns used within the query. Specifically, it parses the SQL statement and compares it with the database metadata to identify the tables and columns. The results of this parsing are then used for the following processes.

[1328] Step 3:

[1329] The server receives emotional information transmitted from the terminal. This emotional information is obtained by analyzing the user's facial expressions and voice tone acquired from video and audio equipment. Hugging Face's emotional analysis pipeline is used as the software for emotion recognition, identifying emotions from text data. This emotional information reflects the user's real-time emotional state.

[1330] Step 4:

[1331] The server generates multiple tuning options based on the analysis results and sentiment information. These options may include adding indexes to the database or rewriting the query structure. These options are given different priorities depending on the user's emotional state. For example, if the user is stressed, tuning options that reduce the processing load will be prioritized.

[1332] Step 5:

[1333] The server evaluates the generated tuning candidates using a machine learning model. The machine learning model predicts the execution cost of each candidate and selects the optimal tuning plan based on the evaluation results. User sentiment information is also considered during this process, ensuring that the most appropriate query is selected according to the user's emotional state. Examples of machine learning models used here include random forests and neural networks.

[1334] Step 6:

[1335] The server generates optimized database queries and returns them to the user terminal. The user terminal uses these optimized queries to perform efficient database operations. This allows the user to achieve optimal performance tailored to their emotional state. As a specific example, the following prompt is generated:

[1336] "User emotion: happy. Suggestion based on search query: popular comedy movies."

[1337] The specific processing unit 290 transmits the result of the specific processing to the headset terminal 314. In the headset terminal 314, the control unit 46A causes the speaker 240 and display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating user input for the result of the specific processing. The control unit 46A transmits the audio data indicating user input acquired by the microphone 238 to the data processing unit 12. In the data processing unit 12, the specific processing unit 290 acquires the audio data.

[1338] Data generation model 58 is a type of so-called generative AI (Artificial Intelligence). One example of data generation model 58 is ChatGPT (Internet search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search) <url: https: gemini.google.com ?hl="ja">Examples of generative AI include the following. The data generation model 58 is obtained by performing deep learning on a neural network. The data generation model 58 is input with prompts containing instructions, and with inference data such as audio data representing speech, text data representing text, and image data representing images. The data generation model 58 infers from the input inference data according to the instructions indicated by the prompts, and outputs the inference results in data formats such as audio data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[1339] In the above embodiment, an example was given in which specific processing is performed by the data processing device 12, but the technology of this disclosure is not limited thereto, and specific processing may also be performed by the headset terminal 314.

[1340] [Fourth Embodiment]

[1341] Figure 7 shows an example of the configuration of the data processing system 410 according to the fourth embodiment.

[1342] As shown in Figure 7, the 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.

[1343] The data processing device 12 comprises a computer 22, a database 24, and a communication interface 26. The computer 22 is an example of a "computer" related to the technology of this disclosure. The computer 22 comprises a processor 28, RAM 30, and storage 32. The processor 28, RAM 30, and storage 32 are connected to a bus 34. The database 24 and the communication interface 26 are also connected to the bus 34. The communication interface 26 is connected to a network 54. An example of the network 54 is a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[1344] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication interface 44, and a controlled object 443. The computer 36 includes a processor 46, RAM 48, and storage 50. The processor 46, RAM 48, and storage 50 are connected to a bus 52. The microphone 238, speaker 240, camera 42, and controlled object 443 are also connected to the bus 52.

[1345] The microphone 238 receives voice signals from the user 20 and receives instructions from the user 20. The microphone 238 captures the voice signals from the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio according to the instructions from the processor 46.

[1346] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an image sensor such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the area around the user 20 (for example, an imaging range defined by a field of view equivalent to the width of a typical healthy person's field of vision).

[1347] Communication interface 44 is connected to network 54. Communication interfaces 44 and 26 are responsible for the exchange of various information between processor 46 and processor 28 via network 54. The exchange of various information between processor 46 and processor 28 using communication interfaces 44 and 26 is performed in a secure manner.

[1348] The controlled object 443 includes a display device, LEDs in the eyes, and motors that drive 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 robot 414's emotions can be expressed by controlling these motors. Furthermore, the robot 414's facial expressions can also be expressed by controlling the illumination state of the LEDs in its eyes.

[1349] Figure 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Figure 8, the data processing device 12 performs specific processing using the processor 28. The storage 32 stores the specific processing program 56.

[1350] The specific processing program 56 is an example of a "program" relating to the technology of this 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.

[1351] The storage 32 stores the data generation model 58 and the emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[1352] In robot 414, the processor 46 performs the reception output processing. The storage 50 stores the reception output program 60. 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 processing is realized by the processor 46 operating as a control unit 46A according to the reception output program 60 executed on the RAM 48.

[1353] Next, the specific processing performed by the specific processing unit 290 of the data processing device 12 will be described. In the following description, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".

[1354] The system of this invention optimizes inefficient SQL queries and SQL queries that place an excessive load on the database using generative AI before execution. This reduces the consumption of unnecessary database resources and lowers cloud usage fees.

[1355] System program processing

[1356] SQL analysis

[1357] The user terminal enters an SQL query against the data warehouse. The server receives this query and passes it to the SQL parsing module. The SQL parsing module parses the query and identifies the tables and columns used. Based on these parsing results, the next step is initiated.

[1358] Generation of tuning candidates

[1359] The server generates tuning candidates using a tuning candidate generation module based on the analysis results. This module references existing indexes and table statistics to generate proposed changes necessary for performance improvement. These may include adding indexes or restructuring queries.

[1360] Evaluation using AI models

[1361] The server passes the generated tuning candidates to the AI ​​model calling module, which evaluates them using generative AI. This evaluation predicts the execution cost (CPU, memory, I / O, etc.) of each tuning candidate and selects the optimal candidate. The AI ​​model determines which optimization is best based on pre-trained data.

[1362] Optimized query return

[1363] The server returns optimized SQL queries to the user's terminal. This enables users to execute queries efficiently, resulting in improved DWH performance and reduced cloud usage costs.

[1364] Specific example

[1365] Suppose a user enters the following SQL query into the data warehouse:

[1366] sql

[1367] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1368] Operation description

[1369] 1. SQL parsing:

[1370] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[1371] 2. Generating tuning candidates:

[1372] The server uses a tuning candidate generation module to generate suggestions for adding indexes. For example, it might generate suggestions for adding an index to the `region` column.

[1373] 3. Evaluation using AI models:

[1374] The server passes tuning candidates to the AI ​​model, which then evaluates each candidate. The AI ​​model determines that adding an index to the region column will improve query performance.

[1375] 4. Optimized query return:

[1376] The server returns an optimized SQL query to the user's terminal. The optimized SQL query looks like this:

[1377] sql

[1378] CREATE INDEX idx_region ON sales(region);

[1379] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1380] In this way, the system automatically analyzes and optimizes user-entered queries, enabling efficient query execution. As a result, improved database performance and reduced cloud usage fees can be expected.

[1381] The following describes the processing flow.

[1382] Step 1:

[1383] The user enters a database query from their terminal. The user enters the query they want to execute against the data warehouse (DWH) and presses the submit button.

[1384] Step 2:

[1385] The server receives database queries sent by the user. The received queries are passed to the server's SQL parsing module.

[1386] Step 3:

[1387] The server's SQL parsing module analyzes the database query. Specifically, it parses the query and identifies the tables, columns, and filter conditions used.

[1388] Step 4:

[1389] Based on the analysis results, the server uses a tuning candidate generation module to generate multiple tuning candidates. These may include suggestions such as adding indexes or restructuring queries.

[1390] Step 5:

[1391] The server passes the generated tuning candidates to the AI ​​model calling module. The AI ​​model calling module uses a pre-trained AI model to evaluate the execution cost of each tuning candidate and select the optimal tuning option.

[1392] Step 6:

[1393] After the server selects the optimal tuning plan, it generates optimized database queries. These optimized queries include adding indexes and refactoring existing queries.

[1394] Step 7:

[1395] The server returns database queries optimized for the user's terminal. The user can then use these optimized queries to execute queries efficiently on the database.

[1396] Specific examples of operation

[1397] The user enters the following SQL query:

[1398] sql

[1399] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1400] operation

[1401] 1. Step 1:

[1402] The user enters the above SQL query from their terminal and presses the submit button.

[1403] 2. Step 2:

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

[1405] 3. Step 3:

[1406] The server's SQL parsing module parses the query and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[1407] 4. Step 4:

[1408] The server uses a tuning candidate generation module to generate tuning candidates, for example, one that adds an index to the region column.

[1409] 5. Step 5:

[1410] The server passes the generated tuning candidates to the AI ​​model calling module, which then evaluates each candidate. The AI ​​model selects adding an index to the region column as the optimal candidate.

[1411] 6. Step 6:

[1412] The server generates an optimized database query. The optimized query will look like this:

[1413] sql

[1414] CREATE INDEX idx_region ON sales(region);

[1415] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1416] 7. Step 7:

[1417] The server returns an optimized SQL query to the user's terminal. The user executes the returned query to achieve efficient query processing.

[1418] In this way, this system automatically analyzes and optimizes the queries entered by the user, enabling efficient query execution.

[1419] (Example 1)

[1420] Next, we will describe Example 1. In the following description, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".

[1421] Traditional database management systems suffered from inefficient SQL queries and SQL queries that placed excessive load on the database, resulting in wasted database resources. Furthermore, this led to increased cloud usage fees, raising operational costs. Conventional technologies required manual optimization of these inefficient queries, which was time-consuming and labor-intensive.

[1422] The identification process performed by the identification processing unit 290 of the data processing device 12 in Example 1 is realized by the following means.

[1423] In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database tables and columns to be used, means for generating a plurality of tuning candidates based on the analysis results, means for evaluating the tuning candidates using a generation AI model, predicting the execution cost of each candidate and selecting the optimal tuning plan, and means for returning the optimal tuning plan to the user. This enables automatic optimization of database queries, resulting in improved database performance and reduced cloud usage fees.

[1424] A "user terminal" is a device used by a user to enter database queries.

[1425] A "database query" is a set of instructions used to perform a specific operation on a database.

[1426] A "server" is a device or system that receives database queries from user terminals and performs analysis, evaluation, and optimization.

[1427] A "SQL parsing module" is a software module used to analyze database queries and identify the database tables and columns being used.

[1428] The "Tuning Candidate Generation Module" is a software module that generates multiple tuning candidates to improve the performance of database queries based on analysis results.

[1429] A "generative AI model" is an artificial intelligence model used to select the optimal tuning candidate based on data that has been trained on it in advance.

[1430] The "optimal tuning plan" refers to a specific method for optimizing the performance of database queries, selected based on an evaluation of the generative AI model.

[1431] A "database index" is a data structure used to improve the speed of searching for data within a database.

[1432] A "machine learning model" is a model constructed using algorithms that learn patterns and rules based on large amounts of data.

[1433] "Execution cost" refers to the amount of resources (CPU, memory, I / O, etc.) consumed when executing a database query.

[1434] The system of this invention comprises a user terminal, a server, an SQL analysis module, a tuning candidate generation module, and a generation AI model. The purpose of this system is to improve database performance and reduce cloud usage fees by automatically analyzing and optimizing database queries entered by the user.

[1435] First, the user uses a terminal to enter an SQL query against the data warehouse (DWH). For example, they would enter a query like this:

[1436] sql

[1437] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1438] This SQL query is sent from the user's terminal to the server.

[1439] Next, the server passes the received SQL query to the SQL parsing module. The SQL parsing module parses the query and identifies the tables and columns used. This parsing identifies the table (in this case, sales), columns (region and amount), and filter conditions (region = 'East' and amount > 1000) used in the query.

[1440] Next, the server uses a tuning candidate generation module based on the analysis results to generate tuning candidates. This module references existing indexes and table statistics to generate proposed changes necessary for performance improvement. Examples include proposals for adding database indexes and restructuring queries. In this specific example, a proposal to add an index to the region column is generated.

[1441] The server then passes the generated tuning candidates to the AI ​​model calling module, which uses the generating AI model to evaluate each candidate. In this evaluation process, the generating AI model predicts the execution cost (CPU, memory, I / O, etc.) of each tuning candidate and selects the optimal tuning candidate. The generating AI model is a machine learning model that operates based on pre-trained data, and in this specific example, it determines that adding an index to the region column is the optimal solution.

[1442] Finally, the server generates an optimized query and returns it to the user's terminal. A concrete example of an optimized SQL query is shown below:

[1443] sql

[1444] CREATE INDEX idx_region ON sales(region);

[1445] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1446] This allows users to execute queries efficiently, resulting in improved database performance and reduced cloud usage costs.

[1447] As this specific example illustrates, the novelty of the invention lies in its ability to automatically perform everything from parsing to optimizing SQL queries, and in its use of a generative AI model to select the optimal tuning candidate. An example of a prompt statement is the following:

[1448] Analyze the given SQL query, generate optimal tuning candidates, select the most effective optimization, and return the optimized query. For example, evaluate whether to add an index to the following query:

[1449] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1450] The flow of the specific processing in Example 1 will be explained using Figure 11.

[1451] Program processing flow

[1452] Step 1:

[1453] The user enters a database query using a terminal. The entered query is sent from the terminal to the server. For example, the following query is entered:

[1454] sql

[1455] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1456] Input: User's SQL query

[1457] Output: Raw queries sent to the server

[1458] Step 2:

[1459] The server receives a database query sent by the user. The server then passes this query to the SQL parsing module.

[1460] Specifically, the server receives the query string and provides it to the SQL parsing module in the appropriate format.

[1461] Input: SQL query sent from the user terminal

[1462] Output: Query input to the SQL parsing module

[1463] Step 3:

[1464] The SQL parsing module analyzes the query and identifies the tables and columns used. The analysis results include filter conditions.

[1465] Specific actions include parsing the query syntax, extracting table names, and identifying the columns and conditions to be used.

[1466] Input: SQL query passed to the SQL parsing module

[1467] Output: Identified tables, columns, and filter conditions

[1468] Step 4:

[1469] The server uses a tuning candidate generation module based on the analysis results to generate multiple tuning candidates.

[1470] Specifically, it refers to existing index information and table statistics to generate tuning suggestions such as adding indexes and restructuring queries.

[1471] Input: Analysis results from the SQL analysis module (tables, columns, filter conditions)

[1472] Output: Multiple tuning candidates

[1473] Step 5:

[1474] The server passes the generated tuning candidates to the AI ​​model calling module, which then uses the generated AI model to evaluate each candidate.

[1475] The evaluation process predicts the execution cost (CPU, memory, I / O, etc.) for each tuning candidate and selects the optimal one.

[1476] Input: Tuning candidates

[1477] Output: Evaluated tuning candidates and their estimated execution costs

[1478] Step 6:

[1479] The generative AI model selects the optimal tuning candidates. It chooses the most effective tuning based on execution cost and performance improvement.

[1480] In terms of specific operations, the AI ​​model evaluates based on data it has previously learned and selects the optimal solution.

[1481] Input: Evaluated tuning candidates and estimated execution costs

[1482] Output: Optimal tuning candidates

[1483] Step 7:

[1484] The server optimizes the SQL query based on the selected optimal tuning candidates and returns it to the user terminal.

[1485] As a concrete example, the following index addition optimization is returned:

[1486] sql

[1487] CREATE INDEX idx_region ON sales(region);

[1488] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1489] Input: Optimal tuning candidates

[1490] Output: Optimized SQL query

[1491] Through these steps, improved database performance and reduced cloud usage costs will be achieved.

[1492] (Application Example 1)

[1493] Next, we will explain Application Example 1. In the following explanation, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".

[1494] In logistics centers, a large volume of database queries are processed in real time. This leads to frequent occurrences of inefficient SQL queries and queries that overload the database, resulting in a decrease in system response speed. Furthermore, rising cloud usage costs are a significant challenge. To address this, efficient query execution is required.

[1495] The specific processing performed by the specific processing unit 290 of the data processing device 12 in Application Example 1 is realized by the following means.

[1496] In this invention, the server includes means for receiving database queries entered from a user terminal, means for analyzing the database queries and identifying the database tables and columns to be used, and means for generating a plurality of tuning candidates based on the analysis results. This improves the response speed of real-time database queries from smartphones in logistics centers and enables efficient query execution. As a result, database performance is improved and a reduction in cloud usage fees can be expected.

[1497] A "user terminal" is a device used to enter database queries, and includes smartphones, personal computers, and other similar devices.

[1498] A "database query" is a set of commands issued to retrieve, update, or delete information from a database.

[1499] A "database table" is a tabular data structure in which information within a database is stored.

[1500] A "column" refers to each column in a database table, where a specific type of data is stored.

[1501] "Tuning suggestions" are proposals or changes to improve the performance of database queries, and may include adding indexes or restructuring queries.

[1502] A "generative model" is an algorithm that uses machine learning to evaluate the optimal tuning candidates.

[1503] A "logistics center" is a facility where goods and items are stored, shipped, received, and inventory managed.

[1504] "Real-time" means responding instantly to user input.

[1505] A "database index" is a data structure that provides fast access to specific columns within a database table.

[1506] A "machine learning model" is an algorithm or method used to learn patterns from data and perform predictions or classifications.

[1507] This invention relates to a system for data processing in a logistics center and aims to achieve efficient query execution. The system of this invention includes a server that receives database queries input from a user terminal, an analysis module that analyzes the database queries and identifies the database tables and columns to be used, a candidate generation module that generates multiple tuning candidates based on the analysis results, an evaluation module that evaluates the tuning candidates using a generation AI model and selects the optimal tuning plan, and a return module that returns the optimal tuning plan to the user.

[1508] System Configuration

[1509] 1. User terminal

[1510] You enter database queries using devices such as smartphones and computers. Specifically, you issue SQL queries to retrieve real-time data such as inventory information and shipping information.

[1511] 2. Server

[1512] It receives database queries and passes them to the analysis module. The server is connected to the database and has computing resources to support efficient query execution.

[1513] 3. Analysis Module

[1514] The system parses the database query received by the server and identifies the database tables and columns used. For example, it explicitly indicates which table and which column the query references.

[1515] 4. Candidate generation module

[1516] Based on the analysis results, several tuning options are generated to improve query efficiency. These include, for example, adding indexes or redesigning the query structure.

[1517] 5. Evaluation Module

[1518] Tuning candidates are evaluated using a generative AI model. Based on pre-trained data, the generative AI model predicts the effect of each tuning candidate and selects the optimal solution.

[1519] 6. Return Module

[1520] The system returns optimized tuning suggestions to the user's terminal. The user then uses these suggestions to re-execute database queries and achieve improved performance.

[1521] Specific example

[1522] For example, suppose a user enters the following SQL query:

[1523] sql

[1524] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[1525] The server first uses an analysis module to analyze this query and identify the table inventory and the columns location and stock. Next, a candidate generation module generates candidates for adding an index to the location column based on the analysis results. Then, an evaluation module uses a generated AI model to evaluate these tuning candidates and determine if they are optimal. Finally, the server returns the following optimized SQL query to the user terminal:

[1526] sql

[1527] CREATE INDEX idx_location ON inventory(location);

[1528] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[1529] Example of a prompt

[1530] The following are examples of prompts used when performing evaluation with a generative AI model:

[1531] plain text

[1532] Please evaluate the following SQL tuning candidates:

[1533] CREATE INDEX idx_location ON inventory(location);

[1534] The flow of a specific process in Application Example 1 will be explained using Figure 12.

[1535] Step 1:

[1536] Query input from user terminal

[1537] Users enter database queries on their smartphones or other user devices. The entered queries are then sent directly to the server.

[1538] Input: SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[1539] Output: A data stream in which queries are sent from the user terminal to the server.

[1540] Step 2:

[1541] Database query received

[1542] The server receives database queries sent from the user terminal. The received queries are then passed to the next analysis module.

[1543] Input: Database query sent from the user's terminal.

[1544] Output: Passing of database queries to the analysis module.

[1545] Step 3:

[1546] Query analysis

[1547] The analysis module on the server parses the database query. It parses the query statement and extracts the necessary information to identify the tables and columns being used.

[1548] Input: Database query received by the server.

[1549] Output: Table inventory and information for the columns location and stock.

[1550] Specific operation: Performs grammatical analysis of the SELECT statement to identify the table name and the columns used in the condition.

[1551] Step 4:

[1552] Generation of tuning candidates

[1553] The server's candidate generation module generates multiple tuning candidates based on the analysis results. These may include, for example, adding an index to a specific column.

[1554] Input: Table and column information identified by the analysis module.

[1555] Output: Multiple tuning candidates.

[1556] Specific operation: Create a list of candidate indexes to add, and generate it by referencing existing indexes and table statistics.

[1557] Step 5:

[1558] Evaluation of tuning candidates

[1559] The server evaluation module uses a generative model to evaluate tuning candidates. The generative AI model predicts the performance improvement effect of each candidate and selects the optimal tuning plan from among them.

[1560] Input: Multiple tuning candidates generated by the candidate generation module.

[1561] Output: Optimal tuning suggestion.

[1562] Specific operation: The following prompt statements are passed to the generating AI model for evaluation:

[1563] plain text

[1564] Please evaluate the following SQL tuning candidates:

[1565] CREATE INDEX idx_location ON inventory(location);

[1566] Step 6:

[1567] Optimized query return

[1568] The server's return module sends optimized tuning suggestions back to the user's terminal. This allows the user to execute queries efficiently.

[1569] Input: The optimal tuning plan selected by the evaluation module.

[1570] Output: Optimization queries sent to the user's terminal.

[1571] Specific operation: Formats and returns an optimized query for the user. For example, the following query is returned:

[1572] sql

[1573] CREATE INDEX idx_location ON inventory(location);

[1574] SELECT FROM inventory WHERE location = 'East' AND stock > 10;

[1575] Furthermore, an emotion engine that estimates the user's emotions may be incorporated. That is, the identification processing unit 290 may use the emotion identification model 59 to estimate the user's emotions and perform identification processing using the user's emotions.

[1576] This invention combines a system that automatically analyzes and optimizes database queries entered from user terminals with an emotion engine to achieve optimization that takes user emotions into account. The aim of this system is to reduce unnecessary consumption of database resources, lower cloud usage fees, and improve the user experience.

[1577] System program processing

[1578] SQL analysis and sentiment recognition

[1579] When a user enters a database query from their device, the server receives it. Simultaneously, an emotion engine built into the device recognizes the user's emotions and sends that data to the server.

[1580] Generation of tuning candidates

[1581] The server parses the received SQL query and identifies the tables and columns to be used. Based on the analysis results and the user's sentiment information obtained from the sentiment engine, it generates multiple tuning candidates. Here, adjustments are made according to the user's emotions; for example, if the user is stressed, tuning candidates with lower loads are prioritized.

[1582] Evaluation using AI models

[1583] The generated tuning candidates are passed to the server's AI model invocation module. The AI ​​model invocation module uses a machine learning model to evaluate the execution cost of each candidate. Here again, the user's sentiment score influences the evaluation.

[1584] Optimized query return

[1585] Once the optimal tuning plan is selected, the server generates an optimized database query and returns it to the user's terminal. The user can then use the returned optimized query to perform efficient query execution.

[1586] Specific example

[1587] If the user enters the following SQL query:

[1588] sql

[1589] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1590] Simultaneously, the device's emotion engine recognizes that the user's stress level is high. Based on this information, the following actions are taken:

[1591] operation

[1592] 1. SQL parsing:

[1593] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[1594] The emotion engine determines that the user's stress level is "high" and sends that information to the server.

[1595] 2. Generating tuning candidates:

[1596] The server generates tuning candidates based on the analysis results and user sentiment information.

[1597] For example, a proposal to add an index to the region column is generated, but if this is too stressful for users, other options that reduce execution time will also be considered.

[1598] 3. Evaluation using AI models:

[1599] The server evaluates each tuning candidate using the AI ​​model calling module.

[1600] The AI ​​model also takes the user's stress level into consideration when selecting the optimal tuning solution.

[1601] 4. Optimized query return:

[1602] The server returns an optimized SQL query to the user's terminal. The optimized query looks like this:

[1603] sql

[1604] CREATE INDEX idx_region ON sales(region);

[1605] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1606] This allows users to execute queries efficiently and minimize the consumption of database resources.

[1607] In this way, this system optimizes SQL queries while taking user emotions into consideration, providing efficient database operations and a good user experience.

[1608] The following describes the processing flow.

[1609] Step 1:

[1610] The user enters a database query from their device and presses the submit button. The emotion engine recognizes the user's emotions and retrieves emotional data such as stress levels and satisfaction levels.

[1611] Step 2:

[1612] The terminal sends the entered database query and retrieved sentiment data to the server.

[1613] Step 3:

[1614] The server passes the received database query to the SQL parsing module, which then parses the query. Specifically, it performs syntax analysis of the query to identify the tables, columns, and filter conditions used.

[1615] Step 4:

[1616] The server retrieves the analysis results and passes them to the tuning candidate generation module. This module generates multiple tuning candidates based on the analysis results and sentiment data sent from the terminal. If the user's sentiment is stressful, it prioritizes generating tuning candidates with less processing load.

[1617] Step 5:

[1618] The server passes the generated tuning candidates to the AI ​​model calling module. The AI ​​model calling module uses a pre-trained machine learning model to evaluate each tuning candidate. The user's sentiment score is also taken into consideration here.

[1619] Step 6:

[1620] The server selects the optimal tuning plan based on the evaluation results of the AI ​​model. The selection criteria include execution costs (CPU, memory, I / O, etc.) and the user's sentiment score.

[1621] Step 7:

[1622] The server generates optimized database queries based on the selected optimal tuning plan. These optimized queries include features such as adding indexes and refactoring queries.

[1623] Step 8:

[1624] The server returns optimized database queries to the user's terminal. The user can then execute the returned queries, providing efficient query processing and an optimal user experience.

[1625] Specific examples of operation

[1626] The user enters the following SQL query:

[1627] sql

[1628] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1629] The emotion engine recognizes the user's stress level as high.

[1630] operation

[1631] 1. Step 1:

[1632] The user enters an SQL query from their terminal and presses the submit button. The emotion engine senses the user's stress level.

[1633] 2. Step 2:

[1634] The terminal sends SQL queries and sentiment data (e.g., high stress) to the server.

[1635] 3. Step 3:

[1636] The server parses the query with its SQL parsing module and identifies the table `sales`, the filter conditions `region = 'East'`, and `amount > 1000`.

[1637] 4. Step 4:

[1638] Based on the analysis results and sentiment data, the server generates multiple options, including suggestions for adding indexes, using a tuning candidate generation module. Because user stress levels are high, lighter options are prioritized.

[1639] 5. Step 5:

[1640] The server evaluates the tuning candidates generated by the AI ​​model calling module. The machine learning model evaluates the model considering its execution cost and the user's sentiment score.

[1641] 6. Step 6:

[1642] The server selects the optimal tuning plan based on the evaluation results. Evaluation criteria include CPU usage, memory usage, and user sentiment.

[1643] 7. Step 7:

[1644] The server generates optimized database queries based on the optimal tuning suggestions. The optimized queries will look like this:

[1645] sql

[1646] CREATE INDEX idx_region ON sales(region);

[1647] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1648] 8. Step 8:

[1649] The server returns optimized SQL queries to the user's terminal. The user executes the optimized queries and experiences efficient and user-friendly query processing.

[1650] In this way, the system optimizes SQL queries while taking user emotions into consideration, providing efficient database operations and a good user experience.

[1651] (Example 2)

[1652] Next, we will describe Example 2. In the following description, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".

[1653] Database query optimization is often performed without considering user emotions, which can lead to stressful situations for users. Furthermore, wasted resource consumption and long execution times are problematic. Additionally, the lack of standardization in optimization methods means they may not be sufficiently effective in specific situations.

[1654] The identification processing performed by the identification processing unit 290 of the data processing device 12 in Example 2 is realized by the following means. In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database structure and fields to be used, means for generating a plurality of tuning candidates based on the analysis results and user sentiment information, means for evaluating the tuning candidates using a machine learning model and selecting the optimal tuning plan considering sentiment information, and means for returning the optimal tuning plan to the user terminal. This enables efficient query optimization that takes user sentiment into account, making it possible to improve the user experience while suppressing the wasteful consumption of database resources.

[1655] A "user terminal" is an electronic device that a user operates to input database queries.

[1656] A "database query" is a set of commands that a user sends to a database to ask a question.

[1657] "Database structure" is a concept that describes how data is organized within a database.

[1658] A "field" refers to an individual data item in a database table.

[1659] "Emotional information" refers to data that indicates the user's emotional state and is obtained using an emotion engine.

[1660] "Tuning candidates" are multiple optimization suggestions for improving the execution efficiency of database queries.

[1661] A "machine learning model" is an algorithm that learns patterns and rules from data and experience, and uses that knowledge to make predictions and classifications.

[1662] The "optimal tuning plan" is the optimization plan selected from the aforementioned tuning candidates that is evaluated as having the highest execution efficiency.

[1663] This invention provides a system that optimizes database queries while considering the user's emotional state by combining an emotion engine with database query optimization. This system includes a user terminal, a server, and their respective modules.

[1664] The user enters a database query using a terminal. This terminal is equipped with an emotion engine that retrieves the user's emotion information in real time. The retrieved emotion information is sent to the server along with the database query.

[1665] The server first parses the received database query. For this parsing, the server uses an SQL parsing module (for example, Apache Calcite). This parsing module identifies the database structure and fields.

[1666] Next, the server processes the emotional information sent from the emotion engine (e.g., Microsoft Azure Emotion API). Based on this emotional information, it determines the user's emotional state (e.g., if their stress level is high) and uses that information in the next step.

[1667] The server generates multiple tuning options based on SQL analysis results and sentiment information. The user's emotional state is taken into consideration during this process. For example, if the user is under high stress, tuning options that reduce execution time will be prioritized.

[1668] The generated tuning candidates are evaluated using a machine learning model on the server. This machine learning model selects the optimal tuning option from among the multiple candidates. In this process, user sentiment information influences the evaluation process.

[1669] After the optimal tuning plan is selected, the server generates an optimized database query based on it and sends it back to the user's terminal. The user can then use this optimized query to perform efficient query execution.

[1670] As a concrete example, consider a case where a user enters the following SQL query:

[1671] sql

[1672] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1673] Simultaneously, the device's emotion engine recognizes that the user's stress level is high. Based on this information, the server performs the following specific actions:

[1674] 1. The SQL parsing module parses the query and identifies the table sales, columns region and amount, and the filter conditions region = 'East' and amount > 1000.

[1675] 2. The emotion engine determines that the user's stress level is high and sends that information to the server.

[1676] 3. Based on the analysis results and sentiment information, the server generates tuning candidates, such as adding an index to the region column.

[1677] 4. The server uses a machine learning model to evaluate each tuning candidate and select the optimal tuning option. Due to the high user stress level, the tuning option that reduces execution time is selected.

[1678] 5. An optimized SQL query is generated and sent back to the user terminal:

[1679] sql

[1680] CREATE INDEX idx_region ON sales(region);

[1681] SELECT FROM sales WHERE region = 'East' AND amount > 1000;

[1682] Example of a prompt:

[1683] Create a program that generates tuning suggestions to shorten execution time based on SQL queries that users have previously found frustrating, thereby supporting efficient query execution. Example: Optimize the SQL query `SELECT FROM sales WHERE region = 'East' AND amount > 1000;`.

[1684] The flow of the specific processing in Example 2 will be explained using Figure 13.

[1685] Step 1:

[1686] The user uses a terminal to enter database queries and sends them to the server.

[1687] Input: The database query entered by the user (e.g., SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[1688] Output: Sending database query data from the terminal to the server

[1689] Step 2:

[1690] The device uses its built-in emotion engine to acquire user emotion information and sends that information to the server.

[1691] Input: User's emotional information (e.g., "high stress level" as recognized by the emotion engine)

[1692] Output: Sending emotion data from the terminal to the server

[1693] Step 3:

[1694] The server parses the received database query using an SQL parsing module to identify the database structure and fields used.

[1695] Input: Database query received by the server (e.g., SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[1696] Data processing: An SQL parsing module (e.g., Apache Calcite) parses the query and extracts table names, column names, and conditional expressions.

[1697] Output: Analyzed database structure and field information (e.g., table sales, columns region and amount, filter conditions region = 'East' and amount > 1000)

[1698] Step 4:

[1699] The server processes the received emotional information and determines the user's emotional state.

[1700] Input: Emotional information (e.g., high stress level)

[1701] Data processing: Evaluate the user's emotional state based on emotional information.

[1702] Output: Evaluated emotional state

[1703] Step 5:

[1704] The server generates multiple tuning candidates based on the SQL analysis results and emotional state.

[1705] Input: SQL parsing results (e.g., table sales, columns region and amount), and emotional state (e.g., high stress level).

[1706] Data processing: Based on the analysis results and emotional state, the candidate generation algorithm generates multiple tuning options.

[1707] Output: Tuning suggestions (e.g., suggestion to add an index to the region column)

[1708] Step 6:

[1709] The server evaluates the generated tuning candidates using a machine learning model and selects the optimal tuning option.

[1710] Input: Tuning candidates (e.g., multiple tuning options) and emotional state

[1711] Data processing: The machine learning model evaluates each tuning candidate and selects the optimal tuning option, taking into account execution cost and emotional state.

[1712] Output: Optimal tuning suggestions (e.g., suggestions with shorter execution times)

[1713] Step 7:

[1714] The server generates optimized database queries based on the best tuning suggestions and sends them back to the user's terminal.

[1715] Input: Optimal tuning proposal (e.g., optimization proposal for adding indexes)

[1716] Data processing: Generating optimized SQL queries

[1717] Output: Optimized database query returned to the user terminal (Example: CREATE INDEX idx_region ON sales(region); SELECT FROM sales WHERE region = 'East' AND amount > 1000;)

[1718] Step 8:

[1719] The system executes the optimized queries returned by the user into the database to efficiently retrieve data.

[1720] Input: Optimized database query

[1721] Output: Efficiently retrieved search results

[1722] (Application Example 2)

[1723] Next, we will explain application example 2. In the following explanation, the data processing device 12 will be referred to as the "server" and the robot 414 as the "terminal".

[1724] Traditional database query optimization systems perform their operations without considering user emotions, resulting in a uniform user experience and an inability to provide optimal performance for individual users. Furthermore, particularly in content delivery services, there is a need to appropriately present relevant content that responds to user emotions, but achieving this has been a challenge.

[1725] In Application Example 2, the specific processing performed by the specific processing unit 290 of the data processing device 12 is realized by the following means. In this invention, the server includes means for receiving a database query input from a user terminal, means for analyzing the database query and identifying the database tables and columns to be used, means for recognizing the user's emotions, means for generating a plurality of tuning candidates based on the analysis results and emotion information, means for evaluating the tuning candidates using a machine learning model and selecting the optimal tuning plan, and means for returning the optimal tuning plan to the user. This makes it possible to provide optimal performance in accordance with the user's emotions and improve the user experience.

[1726] A "user terminal" is a computing device operated by a user, and it is a device that has an interface for entering database queries.

[1727] A "database query" is a set of instructions used to extract necessary data from a database.

[1728] A "database table" is a representation of a collection of data stored in a database, consisting of rows and columns.

[1729] A "column" refers to each column in a database table, and is a field that contains a specific type of data.

[1730] "Emotional information" refers to data that represents the emotional state obtained from the user's facial expressions, tone of voice, and other similar information.

[1731] "Tuning candidates" are several proposed improvements to enhance the execution efficiency of database queries.

[1732] A "machine learning model" is an algorithm that learns patterns and regularities from data and uses those results to make predictions and decisions.

[1733] An "optimal tuning proposal" is a query that has been improved to extract data most efficiently, taking into account the characteristics of user sentiment information and database queries.

[1734] A "video device" is a device, such as a camera, used to acquire visual information.

[1735] An "audio device" is a device used to acquire audio information, such as a microphone.

[1736] The system of this invention uses a user terminal, a server, and a machine learning model. The system is configured as follows:

[1737] User terminal

[1738] A user terminal is a device with an interface for entering database queries. This terminal is equipped with video and audio devices such as a camera and microphone, which capture emotional information from the user's facial expressions and tone of voice. When a user enters a database query, that query is sent to the server.

[1739] server

[1740] The server performs the following operations.

[1741] 1. Reception and Analysis:

[1742] The server receives database queries sent from the user terminal and parses them. Through this parsing, it identifies the database tables and columns to be used.

[1743] 2. Emotion recognition:

[1744] The emotion engine analyzes emotional information sent from the user's device. This emotional information reflects the user's real-time emotional state.

[1745] 3. Generating tuning candidates:

[1746] Based on the analysis results and sentiment information, the server generates several tuning options. These include adding database indexes and rewriting queries.

[1747] 4. Evaluation and Selection:

[1748] The generated tuning candidates are evaluated using a machine learning model. User sentiment information is reflected in the evaluation.

[1749] 5. Optimized query return:

[1750] Once the optimal tuning plan is selected, the server generates optimized database queries and returns them to the user terminal.

[1751] Machine learning models

[1752] Machine learning models are used to evaluate and optimize the execution efficiency of database queries. This generates optimal queries that take user sentiment into account.

[1753] Specific example

[1754] The user uses smart glasses to acquire data from the video and audio devices. The user searches for "popular comedy movies," and simultaneously, the emotion engine recognizes the user's emotion of "joy." Based on this information, the server operates as follows:

[1755] 1. Receive and parse the database query "SELECT FROM movies WHERE genre = 'comedy' AND rating > 4".

[1756] 2. Receive emotional information, "joy," from the emotional engine.

[1757] 3. Based on the analysis results and emotional information, generate multiple tuning candidates.

[1758] 4. Use a generative AI model to evaluate each tuning candidate and select the optimal query for "joy".

[1759] 5. Return the optimized query to the user's terminal.

[1760] Example of a prompt

[1761] User emotion: happy. Suggestion based on search query: popular comedy movies.

[1762] In this way, it becomes possible to provide optimal performance tailored to the user's emotions and improve the user experience.

[1763] The flow of a specific process in Application Example 2 will be explained using Figure 14.

[1764] Step 1:

[1765] The user enters a database query from a terminal. The terminal sends this query to the server. At this time, the terminal is equipped with video and audio devices, which are used to capture the user's facial expressions and tone of voice, and collect emotional information. The entered database query and emotional information are sent to the server.

[1766] Step 2:

[1767] The server receives and parses database queries sent from the user terminal. This parsing identifies the database tables and columns used within the query. Specifically, it parses the SQL statement and compares it with the database metadata to identify the tables and columns. The results of this parsing are then used for the following processes.

[1768] Step 3:

[1769] The server receives emotional information transmitted from the terminal. This emotional information is obtained by analyzing the user's facial expressions and voice tone acquired from video and audio equipment. Hugging Face's emotional analysis pipeline is used as the software for emotion recognition, identifying emotions from text data. This emotional information reflects the user's real-time emotional state.

[1770] Step 4:

[1771] The server generates multiple tuning options based on the analysis results and sentiment information. These options may include adding indexes to the database or rewriting the query structure. These options are given different priorities depending on the user's emotional state. For example, if the user is stressed, tuning options that reduce the processing load will be prioritized.

[1772] Step 5:

[1773] The server evaluates the generated tuning candidates using a machine learning model. The machine learning model predicts the execution cost of each candidate and selects the optimal tuning plan based on the evaluation results. User sentiment information is also considered during this process, ensuring that the most appropriate query is selected according to the user's emotional state. Examples of machine learning models used here include random forests and neural networks.

[1774] Step 6:

[1775] The server generates optimized database queries and returns them to the user terminal. The user terminal uses these optimized queries to perform efficient database operations. This allows the user to achieve optimal performance tailored to their emotional state. As a specific example, the following prompt is generated:

[1776] "User emotion: happy. Suggestion based on search query: popular comedy movies."

[1777] 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 controlled object 443 to output the result of the specific processing. The microphone 238 acquires audio indicating user input for the result of the specific processing. The control unit 46A transmits the audio data indicating user input acquired by the microphone 238 to the data processing unit 12. In the data processing unit 12, the specific processing unit 290 acquires the audio data.

[1778] Data generation model 58 is a type of so-called generative AI (Artificial Intelligence). One example of data generation model 58 is ChatGPT (Internet search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search) <url: https: gemini.google.com ?hl="ja">Examples of generative AI include the following. The data generation model 58 is obtained by performing deep learning on a neural network. The data generation model 58 is input with prompts containing instructions, and with inference data such as audio data representing speech, text data representing text, and image data representing images. The data generation model 58 infers from the input inference data according to the instructions indicated by the prompts, and outputs the inference results in data formats such as audio data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[1779] In the above embodiment, an example was given in which specific processing is performed by the data processing device 12, but the technology of this disclosure is not limited thereto, and the specific processing may also be performed by the robot 414.

[1780] Furthermore, the emotion identification model 59, acting 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 a specific mapping, which is an emotion map (see Figure 9). Similarly, the emotion identification model 59 may also determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.

[1781] Figure 9 shows an emotion map 400 in which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. The closer to the center of the concentric circles, the more primitive the emotions are located. Further out of the concentric circles, emotions representing states and actions arising from mental states are located. Emotion is a concept that includes feelings and mental states. On the left side of the concentric circles, emotions that are generally generated from reactions occurring in the brain are located. On the right side of the concentric circles, emotions that are generally induced by situational judgment are located. Above and below the concentric circles, emotions that are generally generated from reactions occurring in the brain and induced by situational judgment are located. In addition, the emotion of "pleasure" is located on the upper side of the concentric circles, and the emotion of "displeasure" is located on the lower side. Thus, in the emotion map 400, multiple emotions are mapped based on the structure in which emotions arise, and emotions that are likely to occur simultaneously are mapped close together.

[1782] These emotions are distributed at the 3 o'clock position on the Emotion Map 400, and usually fluctuate between feelings of security and anxiety. In the right half of the Emotion Map 400, situational awareness takes precedence over internal feelings, resulting in a calm impression.

[1783] The inside of the Emotion Map 400 represents inner thoughts, while the outside represents actions. Therefore, the further you go from the outside of the Emotion Map 400, the more visible (expressed in actions) your emotions become.

[1784] Here, human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, it results in discomfort, and when they approach the ideal, it results in pleasure. Similarly, in robots, cars, motorcycles, etc., emotions can be created based on various balances, such as posture and battery level. When these balances deviate from the ideal, it results in discomfort, and when they approach the ideal, it results in pleasure. The emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on a system for analyzing brain physiological signals of speech emotion recognition and emotion, Tokushima University, doctoral dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map contains emotions belonging to a region called "response," where sensation is dominant. The right half of the emotion map contains emotions belonging to a region called "situation," where situational awareness is dominant.

[1785] The emotion map defines two emotions that promote learning. One is the emotion around the middle of the negative "repentance" and "reflection" on the situation side. In other words, it is 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 the emotion around the positive "desire" on the reaction side. In other words, it is when the robot has positive feelings such as "I want more" or "I want to know more."

[1786] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values ​​representing each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple training data sets, which are combinations of user input and emotion values ​​representing each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions located close together have similar values, as shown in the emotion map 900 in Figure 10. Figure 10 shows an example where multiple emotions such as "reassured," "calm," and "confident" have similar emotion values.

[1787] The above description primarily focuses on the functions of the data processing device 12 in relation to this disclosure. However, the system related to this disclosure is not necessarily implemented on a server. The system related to this disclosure may be implemented as a general information processing system. This disclosure may be implemented, for example, as a software program that runs on a personal computer or as an application that runs on a smartphone. The method related to this disclosure may be provided to users in SaaS (Software as a Service) format.

[1788] In the above embodiment, an example was given in which a specific process is performed by a single computer 22. However, the technology of this disclosure is not limited thereto, and a distributed processing of the specific process may be performed by multiple computers, including computer 22. For example, a data generation model 58 may be provided in an external device of the data processing device 12, and the external device may generate data according to the input data.

[1789] In the above embodiment, an example was given in which the specific processing program 56 is stored in the storage 32, but the technology of this disclosure is not limited thereto. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-temporary storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-temporary storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes specific processing according to the specific processing program 56.

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

[1791] Furthermore, it is not necessary to store the entirety 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 the entirety of the specific processing program 56 in the storage 32; it is acceptable to store only a portion of the specific processing program 56.

[1792] The following types of processors can be used as hardware resources to perform specific processing. Examples of processors include a CPU, a general-purpose processor that functions as a hardware resource to perform specific processing by executing software, i.e., a program. Other examples of processors include dedicated electrical circuits, such as FPGAs (Field-Programmable Gate Arrays), PLDs (Programmable Logic Devices), or ASICs (Application Specific Integrated Circuits), which have circuit configurations specifically designed to perform specific processing. All of these processors have built-in or connected memory, and all of them perform specific processing by using memory.

[1793] The hardware resource that performs a specific process may consist of one of these various processors, or it may consist of 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). Alternatively, the hardware resource that performs a specific process may consist of a single processor.

[1794] Examples of configurations using a single processor include, firstly, a configuration in which one or more CPUs and software are combined to form a single processor, and this processor functions as a hardware resource that performs a specific process. Secondly, there is a configuration using a processor that realizes the functions of the entire system, including multiple hardware resources that perform a specific process, on a single IC chip, as exemplified by SoCs (System-on-a-chip). In this way, a specific process is realized using one or more of the above types of processors as hardware resources.

[1795] Furthermore, the hardware structure of these various processors can more specifically utilize electrical circuits that combine circuit elements such as semiconductor devices. Also, the specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps can be deleted, new steps added, or the processing order rearranged, as long as it does not deviate from the main purpose.

[1796] The descriptions and illustrations presented above are detailed explanations of the technical aspects of this disclosure and are merely examples of the technical aspects. For example, the above descriptions of the structure, function, operation, and effect are examples of the structure, function, operation, and effect of the technical aspects of this disclosure. Therefore, it goes without saying that you may delete unnecessary parts, add new elements, or replace elements in the descriptions and illustrations presented above, as long as you do not deviate from the essence of the technical aspects of this disclosure. Furthermore, in order to avoid confusion and facilitate understanding of the technical aspects of this disclosure, explanations of common technical knowledge and the like that do not require special explanation to enable the implementation of the technical aspects of this disclosure have been omitted from the descriptions and illustrations presented above.

[1797] All documents, patent applications, and technical standards described herein are incorporated by reference to the same extent as if each individual document, patent application, and technical standard were specifically and individually noted to be incorporated by reference.

[1798] The following is further disclosed regarding the embodiments described above.

[1799] (Claim 1)

[1800] A means of receiving database queries entered from the user terminal,

[1801] A means for analyzing the aforementioned database query and identifying the database tables and columns to be used,

[1802] A means for generating multiple tuning candidates based on the analysis results,

[1803] A means for evaluating the aforementioned tuning candidates using a generative model and selecting the optimal tuning plan,

[1804] A means of returning the aforementioned optimal tuning proposal to the user,

[1805] A system that includes this.

[1806] (Claim 2)

[1807] The system according to claim 1, wherein the tuning candidates include the addition of a database index.

[1808] (Claim 3)

[1809] The system according to claim 1, wherein the generative model is a machine learning model.

[1810] "Example 1"

[1811] (Claim 1)

[1812] A means of receiving database queries entered from the user terminal,

[1813] A means for analyzing the aforementioned database query and identifying the database tables and columns to be used,

[1814] A means for generating multiple tuning candidates based on the analysis results,

[1815] A means for evaluating the aforementioned tuning candidates using a generative AI model, predicting the execution cost of each candidate, and selecting the optimal tuning plan,

[1816] A means of returning the aforementioned optimal tuning proposal to the user,

[1817] A system that includes this.

[1818] (Claim 2)

[1819] The system according to claim 1, wherein the tuning candidates include adding database indexes and restructuring queries.

[1820] (Claim 3)

[1821] The system according to claim 1, wherein the generating AI model is a machine learning model that operates based on data that has been previously trained.

[1822] "Application Example 1"

[1823] (Claim 1)

[1824] A means of receiving database queries entered from the user terminal,

[1825] A means for analyzing the aforementioned database query and identifying the database tables and columns to be used,

[1826] A means for generating multiple tuning candidates based on the analysis results,

[1827] A means for evaluating the aforementioned tuning candidates using a generative model and selecting the optimal tuning plan,

[1828] A means of returning the aforementioned optimal tuning proposal to the user,

[1829] The aforementioned system targets data processing in a logistics center and includes means for applying real-time database queries from a smartphone.

[1830] A system that includes this.

[1831] (Claim 2)

[1832] The system according to claim 1, wherein the tuning candidates include the addition of a database index.

[1833] (Claim 3)

[1834] The system according to claim 1, wherein the generative model is a machine learning model.

[1835] "Example 2 of combining an emotion engine"

[1836] (Claim 1)

[1837] A means of receiving database queries entered from the user terminal,

[1838] A means for analyzing the aforementioned database query and identifying the database structure and fields used,

[1839] A means for generating multiple tuning candidates based on the aforementioned analysis results and user sentiment information,

[1840] A means for evaluating the aforementioned tuning candidates using a machine learning model and selecting the optimal tuning plan while considering emotional information,

[1841] A means for returning the aforementioned optimal tuning proposal to the user terminal,

[1842] A system that includes this.

[1843] (Claim 2)

[1844] The system according to claim 1, wherein the tuning candidates include the addition of a database index.

[1845] (Claim 3)

[1846] The system according to claim 1, wherein the machine learning model considers the user's emotions as a score used for evaluation.

[1847] "Application example 2 when combining with an emotional engine"

[1848] (Claim 1)

[1849] A means of receiving database queries entered from the user terminal,

[1850] A means for analyzing the aforementioned database query and identifying the database tables and columns to be used,

[1851] A means for recognizing the emotions of the user who entered the aforementioned database query,

[1852] A means for generating multiple tuning candidates based on the aforementioned analysis results and emotional information,

[1853] A means for evaluating the aforementioned tuning candidates using a machine learning model and selecting the optimal tuning plan,

[1854] A means of returning the aforementioned optimal tuning proposal to the user,

[1855] A system that includes this.

[1856] (Claim 2)

[1857] The system according to claim 1, wherein the tuning candidates include the addition of a database index.

[1858] (Claim 3)

[1859] The system according to claim 1, wherein the means for recognizing the user's emotions is to use a video device or an audio device. [Explanation of symbols]

[1860] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Devices 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robots< / url:> < / url:> < / url:> < / url:>

Claims

1. A means of receiving database queries entered from the user terminal, A means for analyzing the aforementioned database query and identifying the database tables and columns to be used, A means for generating multiple tuning candidates based on the analysis results, A means for evaluating the aforementioned tuning candidates using a generative model and selecting the optimal tuning plan, A means of returning the aforementioned optimal tuning proposal to the user, A system that includes this.

2. The system according to claim 1, wherein the tuning candidates include the addition of a database index.

3. The system according to claim 1, wherein the generative model is a machine learning model.

Citation Information

Patent Citations

  • Persona chatbot control method and system

    JP2022180282A