system
An AI system automates the generation and execution of SQL queries for data extraction from data warehouses, addressing the inefficiencies and error risks associated with manual processes, and enhancing data extraction efficiency.
Patent Information
- Application Number
- JP2024161805
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-19
- Filing Date
- 2024-09-19
- Publication Date
- 2025-04-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
There is an increasing burden on workers due to the manual creation and execution of SQL queries for data extraction from data warehouses, leading to potential work errors and inefficiencies.
An AI system automatically generates extraction requests from sales departments and generates optimal SQL queries based on these requests, which are then automatically executed against the data warehouse, reducing operator burden and preventing errors.
This solution reduces the workload on operators, minimizes the risk of errors, and optimizes the performance of SQL queries for efficient data extraction.
Smart Images

Figure 2025044222000001_ABST
Abstract
Description
[Technical field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including a description and related instruction sentence regarding the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2022-180282 A Summary of the Invention [Problem to be solved by the invention]
[0004] The sales department has been making more requests to extract data from the data warehouse, and the amount of work required to manually create and execute SQL is increasing every time. This increases the burden on workers and increases the possibility of mistakes. [Means for solving the problem]
[0005] In this invention, an extraction request is automatically generated from the sales department, and an AI system generates SQL based on the extraction request. Furthermore, the generated SQL is automatically executed on the data warehouse. This reduces the burden on workers and prevents work errors. In addition, the AI system generates optimal SQL queries based on the contents of the extraction request and optimizes the performance of the generated SQL queries, thereby achieving efficient data extraction. [Brief description of the drawings]
[0006] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Diagram 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. FIG. [Diagram 3] FIG. 11 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Diagram 5] FIG. 13 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 13 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 13 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 2 is a sequence diagram showing a process flow of the data processing system in the first embodiment of the first form example. [Figure 12] FIG. 11 is a sequence diagram showing a process flow of the data processing system in the application example 1 of the first embodiment. [Figure 13] FIG. 11 is a sequence diagram showing a process flow of the data processing system in the second embodiment of the second embodiment. [Figure 14] FIG. 13 is a sequence diagram showing a process flow of the data processing system in application example 2 of embodiment 2. [Figure 15]FIG. 13 is a sequence diagram showing a process flow of a data processing system in a third embodiment of the present invention. [Figure 16] FIG. 13 is a sequence diagram showing a process flow of the data processing system in the third application example of the third embodiment. [Figure 17] FIG. 11 is a sequence diagram showing the flow of processing in the data processing system in the first embodiment of the first form example when an emotion engine is combined. [Figure 18] FIG. 13 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1 of Form Example 1 when combined with an emotion engine. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0007] 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.
[0008] First, the terms used in the following description will be explained.
[0009] In the following embodiments, a signed processor (hereinafter simply referred to as a "processor") may be one arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be one type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), an APU (Accelerated Processing Unit), or a TPU (TENSOR PROCESSING UNIT (registered trademark)).
[0010] In the following embodiments, a signed RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by the processor.
[0011] In the following embodiments, the storage with the code is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., Examples include hard disks, or magnetic tapes.
[0012] In the following embodiments, a communication I / F (Interface) with a code is an interface including a communication processor and an antenna. The communication I / F controls communication between multiple computers. An example of a communication standard applied to the communication I / F is a wireless communication standard including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.
[0013] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. In addition, in this specification, the same idea as "A and / or B" is also applied when three or more things are expressed by connecting them with "and / or."
[0014] [First embodiment]
[0015] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0016] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.
[0017] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a wide area network (WAN) and / or a local area network (LAN).
[0018] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.
[0019] The reception device 38 includes a touch panel 38A and a microphone 38B, and receives user input. The touch panel 38A detects contact with a pointer (e.g., a pen or a finger) to receive user input by the touch of the pointer. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.
[0020] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (e.g., voice 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 voice according to instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, an aperture, and a shutter, and an imaging element such as a Complementary Metal-Oxide-Semiconductor (CMOS) image sensor or a Charge Coupled Device (CCD) image sensor.
[0021] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for transmitting and receiving various types of information between the processor 46 and the processor 28 via the network 54.
[0022] FIG. 2 shows an example of main functions of the data processing device 12 and the smart device 14.
[0023] As shown in Fig. 2, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32. The specific process program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific process program 56 from the storage 32, and executes the read specific process program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific process program 56 executed on the RAM 30.
[0024] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0025] In the smart device 14, the processor 46 performs the reception output processing. The storage 50 stores a reception output program 60. The reception output program 60 is used together with the specific processing program 56 by the data processing system 10. The processor 46 reads out 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 the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0026] Next, the specific processing by the specific processing unit 290 of the data processing device 12 will be described.
[0027] "Example 1"
[0028] The present invention is a system including a means for automatically generating an extraction request from a sales department, automatic generation of SQL by an AI system, and automatic execution of the generated SQL. Specifically, an extraction request from a sales department includes, for example, the type of data and period required by the sales department.
[0029] The request is entered through a form containing information that is sent to the system and analyzed by the AI system. The AI system generates the optimal SQL query based on the content of the request. The generated SQL query is automatically executed against the data warehouse to extract the required data.
[0030] "Example 2"
[0031] In another aspect of the present invention, the AI system optimizes the performance of the generated SQL queries. Specifically, the AI system analyzes the generated SQL queries and optimizes the execution plan of the queries, for example optimizing the join order of tables and refining the queries to take advantage of indexes, which results in more efficient data extraction from the data warehouse.
[0032] The process flow of each embodiment will be described below.
[0033] "Example 1"
[0034] Step 1: An extraction request from the sales department is entered through a form containing information such as the type of data the sales department requires and the period of time.
[0035] Step 2: This information is sent to the system, where the AI system analyzes it.
[0036] Step 3: The AI system generates the optimal SQL query based on the content of the extraction request.
[0037] Step 4: The generated SQL queries are automatically executed against the data warehouse to extract the required data.
[0038] "Example 2"
[0039] Step 1: The AI system analyzes the generated SQL query.
[0040] Step 2: The AI system optimizes the query execution plan, for example by optimizing the join order of tables and refining the query to take advantage of indexes.
[0041] Step 3: This makes data extraction from the data warehouse more efficient.
[0042] Example 1
[0043] Next, a description will be given of Example 1 of the embodiment 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal".
[0044] Conventional data extraction systems had the problem that extraction requests from the sales department had to be processed manually, which was time-consuming and labor-intensive. In addition, specialized knowledge was required to generate and execute SQL queries, making it difficult for non-experts to easily extract data. Furthermore, if the performance of the generated SQL queries was not optimized, data extraction could take a long time.
[0045] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0046] In this invention, the server includes a means for generating an extraction request from the database from the sales department to the support department, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the database, a means for providing a user interface for inputting the extraction request, a means for using natural language processing technology for analyzing the extraction request, a means for automatically executing the generated SQL query against the database, and a means for providing the extracted data to the user. This makes it possible to automatically process the extraction request from the sales department and to easily extract data even by non-experts. In addition, the performance of the generated SQL query is optimized, improving the efficiency of data extraction.
[0047] A "sales department" is a department within a company or organization responsible for selling products and services.
[0048] A "support department" is a department whose role is to support other departments, such as the sales department.
[0049] A "database" is a system for efficiently storing, managing, and searching data.
[0050] An "extraction request" is a request to retrieve specific data from a database.
[0051] An "artificial intelligence system" is a system that automatically performs tasks using technologies such as machine learning and natural language processing.
[0052] "SQL" is a standard query language for manipulating and searching data in a database.
[0053] A "user interface" is an interface through which a user interacts with a system.
[0054] "Natural language processing technology" is a technology that enables computers to understand, interpret, and generate human language.
[0055] An "SQL query" is a command statement for searching, inserting, updating, or deleting specific data from a database.
[0056] "Performance" refers to the efficiency or speed of a system or query.
[0057] The present invention is a system for automatically processing extraction requests from a sales department and efficiently extracting necessary data from a database. A specific embodiment of this system will be described below.
[0058] System Configuration
[0059] Hardware
[0060] Server: Hosts the Database Management System (DBMS) and generates and executes SQL queries.
[0061] Terminal: The computer or mobile device through which the User enters the extraction request.
[0062] Database: A system for storing data, such as a cloud-based database service.
[0063] software
[0064] User Interface: A web form built using HTML and JavaScript (registered trademark), providing an interface for users to input extraction requests.
[0065] Artificial Intelligence System: Implemented in Python® and uses generative AI models (e.g., GPT-4®) to generate SQL queries.
[0066] Natural Language Processing techniques are used to analyze the extraction request, for example using an NLP library (e.g. spaCy).
[0067] System Operation
[0068] Input extraction request
[0069] The user inputs information such as the type of data required and the period of time into a dedicated form on a web browser. This form is built using HTML and JavaScript. For example, the user inputs the following information:
[0070] Data type: Sales data
[0071] Period: January 1, 2023 to March 31, 2023
[0072] Sending an Extraction Request
[0073] The terminal sends the extraction request information entered by the user to the server using the HTTPS protocol, with the data encoded in JSON format.
[0074] Receiving and parsing extraction requests
[0075] The server parses the received JSON data and passes the contents of the extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the extraction request. For example, it generates a prompt sentence like the following:
[0076] "Generate a SQL query to extract sales data from January 1, 2023 to March 31, 2023."
[0077] Generate SQL queries
[0078] The AI system uses a generative AI model (e.g. GPT-4) to generate optimal SQL queries, such as the following:
[0079] sql
[0080] SELECT FROM sales WHERE sale_date BETWEEN(R) '2023-01-01' AND '2023-03-31';
[0081] Executing SQL Queries
[0082] The server automatically executes the generated SQL queries against a database (we use a cloud-based database service) using Python libraries (e.g. psycopg2).
[0083] Data extraction and provision
[0084] The server receives the extracted data from the database and provides it to the user. The extracted data is exported in CSV format and a download link is generated for the user to click on to download the data.
[0085] In this way, extraction requests from the sales department can be processed automatically, making it easy for non-experts to extract data. In addition, the performance of the generated SQL queries is optimized, improving the efficiency of data extraction.
[0086] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0087] Step 1:
[0088] The user inputs information such as the type of data required and the period into a dedicated form on a web browser. The input information is the type of data (e.g., sales data) and the period (e.g., from January 1, 2023 to March 31, 2023). This completes the input of the extraction request.
[0089] Step 2:
[0090] The terminal converts the information of the extraction request entered by the user into JSON format and sends it to the server using the HTTPS protocol. The input is the type and period of data entered by the user, and the output is data in JSON format. This sends the extraction request to the server.
[0091] Step 3:
[0092] The server analyzes the received JSON data and passes the contents of the extraction request to the AI system. The input is the JSON data sent from the terminal, and the output is the analyzed contents of the extraction request. This completes the analysis of the extraction request.
[0093] Step 4:
[0094] The AI system in the server uses natural language processing technology to analyze the extraction request and generate a prompt sentence. The input is the content of the analyzed extraction request, and the output is the generated prompt sentence. For example, a prompt sentence may be generated that reads, "Please generate an SQL query to extract sales data from January 1, 2023 to March 31, 2023."
[0095] Step 5:
[0096] The AI system uses a generative AI model (e.g., GPT-4) to generate an optimal SQL query based on the prompt sentence. The input is the generated prompt sentence, and the output is the generated SQL query. For example, the SQL query "SELECT FROM sales WHERE sale_date BETWEEN '2023-01-01' AND '2023-03-31';" is generated.
[0097] Step 6:
[0098] The server automatically executes the generated SQL query against the database. The input is the generated SQL query, and the output is the data extracted from the database. The database uses a cloud-based database service. This completes the execution of the SQL query.
[0099] Step 7:
[0100] The server receives the data extracted from the database and converts it into CSV format. The input is the data extracted from the database, and the output is data in CSV format. This completes the data format conversion.
[0101] Step 8:
[0102] The server generates a link to provide the user with CSV format data and notifies the user. The input is the CSV format data, and the output is a download link. The user can click this link to download the data. This completes the data provision.
[0103] (Application example 1)
[0104] Next, a description will be given of Application Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0105] Traditional inventory management at logistics centers requires manual data extraction and analysis, which is time-consuming and labor-intensive. In addition, data extraction requires manual SQL queries, which requires specialized knowledge, making efficient inventory management difficult.
[0106] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means. In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for a staff member to input the necessary inventory information in an inventory management application in the logistics center, a means for generating an optimal SQL query based on the input information and extracting the necessary data from the data warehouse, and a means for displaying the extracted data. This makes inventory management in the logistics center more efficient, and makes it possible to easily extract and display the necessary data even without specialized knowledge.
[0107] A "sales department" is a department within a company or organization that sells products and services.
[0108] A "support department" is a department whose role is to support other departments, such as the sales department.
[0109] A "data warehouse" is a database system that centrally manages large amounts of data from a company or organization and uses it for analysis and reporting.
[0110] An "extract request" is a request to retrieve specific data from the data warehouse.
[0111] An "AI system" is a system that uses artificial intelligence technology to automate certain tasks.
[0112] "SQL" is a standard programming language for manipulating and querying data from database management systems.
[0113] A "logistics center" is a facility that handles logistics operations such as the storage, management, and delivery of goods.
[0114] An "inventory management application" is software for managing inventory status and providing necessary information.
[0115] "Staff" refers to employees or personnel working for a company or organization.
[0116] "Inventory information" is data regarding the quantity and condition of products at a logistics center.
[0117] An "SQL query" is a command statement for retrieving specific data from a database.
[0118] "Data extraction" is the process of retrieving the required data from a data warehouse.
[0119] A "display means" is a method or device for visually presenting the extracted data to a user.
[0120] As an embodiment of the present invention, an inventory management application in a logistics center will be described as an example.
[0121] The server has a means to generate requests for retrieval from the data warehouse from the sales department to the support department. This allows sales department staff to input the necessary inventory information. The input information is sent to the server, where the AI system analyzes it.
[0122] The AI system uses a generative AI model to generate optimal SQL queries based on the input information. These SQL queries are then automatically executed against the data warehouse. Data extracted from the data warehouse is displayed on staff terminals via the server.
[0123] Specifically, staff at the distribution center access the inventory management application using a smartphone or tablet. Staff enter the necessary inventory information (e.g., the number of items in stock for a particular product category or data on incoming and outgoing goods for a particular period) through the application's interface. This information is sent to the server as a prompt text like the following:
[0124] Example prompt:
[0125] Data Type: Inventory
[0126] Period: Last month
[0127] Category: Electronics
[0128] The server receives the prompt sentence and sends it to the AI system, which uses the generative AI model to generate the optimal SQL query based on the prompt sentence, which is then executed against the data warehouse to extract the required data.
[0129] The extracted data is then displayed on the staff's terminals via the server, allowing staff at the distribution center to easily extract and display the inventory data they need, even if they do not have specialized knowledge.
[0130] The following hardware and software are used to realize this system:
[0131] Server: Communicates with the data warehouse and runs the AI system.
[0132] Data Warehouse: Centrally manages large amounts of data and provides the data based on SQL queries.
[0133] AI system: Uses a generative AI model to generate SQL queries based on prompt statements.
[0134] Smartphones and tablets: Devices that allow staff to access the inventory management application and enter the necessary information.
[0135] In this way, inventory management at logistics centers is made more efficient, and necessary data can be easily extracted and displayed even without specialized knowledge.
[0136] The flow of the specific process in the application example 1 will be described with reference to FIG.
[0137] Step 1:
[0138] A user accesses an inventory management application on a smartphone or tablet and inputs the necessary inventory information. The input information includes data type (inventory), period (last month), product category (electronic devices), etc. This input data is structured as a prompt sentence.
[0139] Step 2:
[0140] The terminal sends the input prompt to the server. The server receives the prompt and prepares it to send to the AI system. The input data is converted to an appropriate data format, such as JSON format.
[0141] Step 3:
[0142] The server sends the prompt sentence to the AI system, which uses the generative AI model to generate an optimal SQL query based on the prompt sentence. Specifically, the generative AI model parses the prompt sentence and constructs a SQL query to retrieve the required data.
[0143] Step 4:
[0144] The AI system generates a SQL query and sends it back to the server, which receives it and prepares it to run against the data warehouse, translating the SQL query into a format the data warehouse can understand.
[0145] Step 5:
[0146] The server executes the generated SQL query to the data warehouse. The data warehouse extracts the required data based on the SQL query. Specifically, the data warehouse analyzes the SQL query, searches for and extracts the relevant data.
[0147] Step 6:
[0148] The data warehouse returns the extracted data to the server, which receives it and prepares it for transmission to the user's terminal. The extracted data is converted into a format that is easy for the user to understand.
[0149] Step 7:
[0150] The server transmits the extracted data to the user's terminal. The terminal receives the data and displays it on the interface of the inventory management application. The user can check the displayed data and use it for inventory management.
[0151] In this way, inventory management at logistics centers is made more efficient, and necessary data can be easily extracted and displayed even without specialized knowledge.
[0152] Example 2
[0153] Next, a second embodiment of the second embodiment will be described. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0154] In conventional data extraction systems from data warehouses, SQL queries were often generated and optimized manually, resulting in poor efficiency. In addition, the performance of the generated SQL queries was not optimized, which could result in slow data extraction times. This made it difficult for sales and support departments to quickly obtain the data they needed.
[0155] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0156] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating an SQL query based on the extraction request, a means for analyzing the generated SQL query, generating and optimizing an execution plan, a means for executing the optimized SQL query on the data warehouse, and a means for returning the execution result to the user. This automates the generation and optimization of SQL queries, improves the efficiency of data extraction, and enables the sales department and support department to quickly obtain the data they need.
[0157] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[0158] A "support department" is a department within a company or organization that has the role of supporting the sales department and other business departments.
[0159] A "data warehouse" is a database system that allows companies and organizations to aggregate large amounts of data and use it for analysis and reporting.
[0160] An "extract request" is a request to retrieve specific data from the data warehouse.
[0161] "SQL query" means instructions written in Structured Query Language (SQL) used to retrieve, insert, update, and delete data from a database.
[0162] An "artificial intelligence system" is a system that mimics human intelligence using technologies such as machine learning and natural language processing.
[0163] "Analysis" is the process of examining data or information in detail to understand its structure and meaning.
[0164] An "execution plan" is a plan that describes the specific steps that a database management system takes to execute a SQL query.
[0165] "Optimization" refers to making adjustments or improvements to maximize the performance of a system or process.
[0166] "Execution results" refers to the data or information obtained by executing a SQL query.
[0167] "User" means an individual or organization that uses the system or service.
[0168] This invention is a system for improving the efficiency of data extraction from a data warehouse. The system includes an artificial intelligence system that generates an extraction request from a sales department to a support department and generates an SQL query based on the request. The system further includes a means for analyzing the generated SQL query and generating and optimizing an execution plan. The optimized SQL query is executed against the data warehouse, and the execution result is returned to the user.
[0169] Hardware and Software Used
[0170] The server is equipped with a high-performance processor and a large amount of memory (e.g., 64 GB RAM). In addition, MySQL (registered trademark) or PostgreSQL is used as the database management system (DBMS). The artificial intelligence system generates and optimizes SQL queries using machine learning models and natural language processing techniques.
[0171] Program processing explanation
[0172] The server receives the SQL query submitted by the user and parses it using an SQL parser to check the syntax of the query. The server then generates an execution plan based on the parsed SQL query. An execution plan is a set of detailed instructions on how to execute the query.
[0173] The server optimizes the generated execution plan by optimizing the join order of tables and improving the query to take advantage of indexes, which makes the query run faster and allows data to be retrieved much faster.
[0174] The optimized SQL queries are then executed against the data warehouse, and the server returns the results to the user, who can view them through a terminal interface.
[0175] Examples and prompts
[0176] For example, if a user enters the following SQL query:
[0177] sql
[0178] SELECT FROM orders
[0179] JOIN customers ON orders.customer_id = customers.id
[0180] WHERE orders.order_date > '2023-01-01';
[0181] The server receives this query and performs analysis. As a result of the analysis, the server generates an execution plan for the query and optimizes it as follows:
[0182] Optimize the join order of tables to perform the joins in the most efficient order.
[0183] If an index exists on orders.order_date, refine the query to take advantage of the index.
[0184] The optimized query looks like this:
[0185] sql
[0186] SELECT FROM customers
[0187] JOIN orders ON customers.id = orders.customer_id
[0188] WHERE orders.order_date > '2023-01-01';
[0189] Example of a prompt to be input to a generative AI model:
[0190] "Optimize the performance of the following SQL queries:
[0191] SELECT FROM orders
[0192] JOIN customers ON orders.customer_id = customers.id
[0193] WHERE orders.order_date > '2023-01-01';''
[0194] Using this prompt, the generative AI model optimizes the SQL query to achieve efficient data extraction.
[0195] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0196] Step 1:
[0197] The user enters an SQL query.
[0198] A user enters an SQL query through a terminal interface, for example a query like this:
[0199] sql
[0200] SELECT FROM orders
[0201] JOIN customers ON orders.customer_id = customers.id
[0202] WHERE orders.order_date > '2023-01-01';
[0203] Input: The SQL query entered by the user.
[0204] Output: SQL query sent from terminal to server
[0205] Step 2:
[0206] The server receives the input SQL query.
[0207] The server receives the SQL query sent by the user and temporarily stores it in memory.
[0208] Input: SQL query sent from the terminal
[0209] Output: SQL query stored in server memory
[0210] Step 3:
[0211] The server parses the SQL query.
[0212] The server uses an SQL parser to parse the received SQL query, and during the parsing process it checks the syntax of the query for any syntax errors.
[0213] Input: SQL query stored in the server's memory
[0214] Output: Syntax information of the parsed SQL query.
[0215] Step 4:
[0216] The server generates an execution plan for the query.
[0217] Based on the parsed SQL query, the server generates an execution plan, which is a set of detailed instructions on how to execute the query.
[0218] Input: Syntax information of the parsed SQL query
[0219] Output: Generated execution plan
[0220] Step 5:
[0221] The server optimizes the execution plan.
[0222] The server optimizes the generated execution plan. Specifically, it optimizes the following:
[0223] Optimized table join order: The server optimizes the order in which tables are joined in a query, which can improve the execution speed of the query.
[0224] Use indexes: The server refines queries to take advantage of indexes, which can greatly speed up retrieval of data.
[0225] Input: Generated execution plan
[0226] Output: Optimized execution plan
[0227] Step 6:
[0228] The server generates an optimized SQL query.
[0229] The server generates a new SQL query based on the optimized execution plan, for example optimized to:
[0230] sql
[0231] SELECT FROM customers
[0232] JOIN orders ON customers.id = orders.customer_id
[0233] WHERE orders.order_date > '2023-01-01';
[0234] Input: Optimized execution plan
[0235] Output: Optimized SQL query
[0236] Step 7:
[0237] The server executes the optimized SQL query.
[0238] The server executes optimized SQL queries against a data warehouse using a database management system (DBMS), for example MySQL or PostgreSQL.
[0239] Input: Optimized SQL query
[0240] Output: Results of executing the SQL query
[0241] Step 8:
[0242] The server returns the execution result to the user.
[0243] The server executes the SQL query and returns the results to the user, who displays the results through the terminal interface.
[0244] Input: Result of executing a SQL query
[0245] Output: The execution result displayed on the user's terminal.
[0246] (Application example 2)
[0247] Next, a description will be given of Application Example 2 of Form Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0248] In conventional data extraction systems from data warehouses, SQL queries are often generated and optimized manually, which is inefficient. In addition, real-time data extraction is required for inventory management and shipping plan optimization at logistics centers, but current systems have difficulty in meeting this requirement. This leads to issues such as reduced accuracy of inventory management and shipping plans, and worsening business efficiency.
[0249] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0250] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for extracting data for optimizing inventory management and shipping plans in the logistics center, a means for optimizing the SQL query generated by the AI system, and a means including an application installed on a smartphone. This improves the efficiency of data extraction, and enables real-time optimization of inventory management and shipping plans in the logistics center.
[0251] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[0252] A "support department" is a department within a company or organization that has the role of supporting the sales department and other business departments.
[0253] A "data warehouse" is a database system that enables companies and organizations to manage and analyze large amounts of data in an integrated manner.
[0254] An "extract request" is a request to retrieve specific data from the data warehouse.
[0255] "SQL" stands for Structured Query Language, a programming language used to manipulate and define data in a database management system.
[0256] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[0257] A "logistics center" is a facility that handles logistics operations such as the storage, management, and shipping of goods.
[0258] "Inventory management" is the task of understanding the inventory status of products and managing them appropriately.
[0259] A "shipment plan" is a plan for creating a product shipping schedule and carrying out efficient shipping.
[0260] A "smartphone" is a highly functional mobile phone that can connect to the Internet and use applications.
[0261] An "application" is a software program designed to provide a specific function or service.
[0262] "Optimization" means making something the most efficient for a particular purpose.
[0263] As an embodiment of the present invention, a system for optimizing inventory management and shipping plans in a logistics center will be described. This system includes an AI system that generates an extraction request from a data warehouse from a sales department to a support department and generates SQL based on the extraction request. The system also executes the generated SQL against the data warehouse to extract data for optimizing inventory management and shipping plans in the logistics center. The system also includes an application that optimizes the SQL query generated by the AI system and is installed on a smartphone.
[0264] The server receives extraction requests from the sales department, and the AI system generates optimal SQL queries based on those requests. The generated SQL queries are executed against the data warehouse to extract the required data. The AI system optimizes the performance of the generated SQL queries to improve the efficiency of data extraction. Specifically, it optimizes the table join order and improves the queries to utilize indexes.
[0265] The terminal (smartphone) runs an application for optimizing inventory management and shipping plans in real time at the logistics center. This application receives optimized data sent from the server and displays the inventory status and shipping plans. This allows the user to efficiently manage inventory and make shipping plans.
[0266] The hardware used is the server hosting the data warehouse and / or a smartphone. The software uses Python, SQLite, and the sqlparse library. The AI system generates and optimizes SQL queries using a generative AI model.
[0267] As a concrete example, consider a scenario used in an inventory management system at a logistics center. Assume that a user uses a smartphone application to optimize an SQL query to retrieve products with stock levels greater than or equal to 0 and sort them by product ID. In this case, an example of a prompt sentence to be input to the generative AI model is as follows:
[0268] "Please optimize the SQL query in the inventory management system of the distribution center to get products with stock greater than or equal to 0 and sort them by product ID."
[0269] By inputting this prompt sentence into a generative AI model, an optimized SQL query can be generated, improving the efficiency of data extraction.
[0270] The flow of the specific process in the application example 2 will be described with reference to FIG.
[0271] Step 1:
[0272] The server receives an extraction request from the sales department to the support department from the data warehouse. This extraction request includes the type of data required and conditions. The input is the content of the extraction request, and the output is a prompt statement for generating an SQL query based on the content.
[0273] Step 2:
[0274] The server inputs a prompt sentence to the generative AI model based on the received extraction request. The prompt sentence specifically describes the content of the extraction request. The input is the prompt sentence, and the output is the SQL query generated by the generative AI model.
[0275] Step 3:
[0276] The server receives the SQL query output from the generative AI model and optimizes the query. Specifically, it optimizes the join order of tables and improves the query to make use of indexes. The input is the generated SQL query, and the output is the optimized SQL query.
[0277] Step 4:
[0278] The server runs the optimized SQL queries against the data warehouse to extract the required data. The input is the optimized SQL queries and the output is the extracted data.
[0279] Step 5:
[0280] The server sends the extracted data to the terminal (smartphone). The input is the extracted data, and the output is the data sent to the terminal.
[0281] Step 6:
[0282] The terminal displays the received data through the application. The user performs inventory management and shipping planning based on the displayed data. The input is the data sent from the server, and the output is the data displayed to the user.
[0283] Step 7:
[0284] Users use the application to perform operations to optimize inventory management and shipping plans, thereby improving the operational efficiency of the distribution center. The input is the data displayed through the application, and the output is optimized inventory management and shipping plans.
[0285] Furthermore, an emotion engine that estimates the emotion of the user may be combined. That is, the identification processing unit 290 may estimate the emotion of the user using the emotion identification model 59, and perform identification processing using the emotion of the user.
[0286] "Example 1"
[0287] In one embodiment of the present invention, the AI system includes an emotion engine that recognizes the user's emotions. The emotion engine infers the user's emotions from, for example, the user's tone of voice, facial expression, and choice of words in text input. This emotion engine makes it possible to adjust the priority of extraction requests according to the user's emotions, such as when the user is in a hurry or in a difficult situation.
[0288] "Example 2"
[0289] The emotion engine can also adjust the SQL queries it generates based on the user's emotions. For example, when the user is angry, it generates SQL queries to provide more detailed data. On the other hand, when the user is happy, it generates simple SQL queries to provide summary information. This allows optimal data extraction according to the user's emotions.
[0290] The process flow of each embodiment will be described below.
[0291] "Example 1"
[0292] Step 1: Receive an extraction request from a user.
[0293] Step 2: The emotion engine infers the user's emotions from the user's tone of voice, facial expressions, choice of words in text input, etc.
[0294] Step 3: Adjust the priority of extraction requests according to the user's emotions estimated by the emotion engine.
[0295] Step 4: Process the extraction request based on the adjusted priority.
[0296] "Example 2"
[0297] Step 1: Receive an extraction request from a user.
[0298] Step 2: The emotion engine estimates the user's emotion.
[0299] Step 3: The generated SQL query is adjusted according to the user's emotion estimated by the emotion engine.
[0300] Step 4: Generate tailored SQL queries to perform data extraction.
[0301] Example 1
[0302] Next, a description will be given of Example 1 of the embodiment 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal".
[0303] In the conventional data extraction system, extraction requests from the sales department had to be processed manually, which was time-consuming and labor-intensive. In addition, it was not possible to respond flexibly to user emotions, making it difficult to respond to urgent requests or difficult situations. Furthermore, if the performance of the generated SQL query was not optimized, data extraction could take a long time.
[0304] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0305] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, and an emotion engine for recognizing the user's emotions and adjusting the priority of the extraction request. This enables automation of the extraction request and flexible response according to the user's emotions, making it possible to extract data efficiently and quickly.
[0306] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[0307] A "support department" is a department whose role is to support other departments, such as the sales department.
[0308] A "data warehouse" is a database system that aggregates and manages large amounts of data and is used for analysis and report creation.
[0309] An "extract request" is a request to retrieve specific data from the data warehouse.
[0310] An "artificial intelligence system" is a system that automatically performs specific tasks using technologies such as machine learning and natural language processing.
[0311] "SQL" is a standard programming language for manipulating and defining data in a database management system.
[0312] An "emotion engine" is a technology that recognizes the user's emotions and adjusts the system's operation based on that information.
[0313] "Priority" is an index that indicates the order of execution and importance of a task or process.
[0314] This invention is a system that automatically processes extraction requests from the sales department and efficiently extracts necessary data from a data warehouse. The system includes a means for generating extraction requests from the sales department, automatic generation of SQL by an artificial intelligence system, automatic execution of the generated SQL, and an emotion engine that recognizes the user's emotions and adjusts the priority of the extraction requests.
[0315] Hardware and Software Used
[0316] Terminal: The computer or mobile device through which the User enters the extraction request.
[0317] Server: A server that receives extraction requests and works with the AI system to generate and execute SQL queries.
[0318] Data warehouse: A database system that aggregates and manages data. An example is a cloud-based database service.
[0319] Artificial intelligence system: A system that uses natural language processing (NLP) technology to analyze extraction requests and generate optimal SQL queries.
[0320] Emotion engine: Technology for recognizing user emotions and adjusting the priority of extraction requests. For example, Microsoft® Azure®'s Emotion API and Google® Cloud's Natural Language API are used.
[0321] Specific operation of the system
[0322] 1. Enter your extraction request:
[0323] Using a web form or a dedicated application, users enter information such as the type of data they want and the time period they want -- for example, "Extract sales data from January to March 2023."
[0324] 2. Send your extraction request:
[0325] The terminal sends the extraction request entered by the user to the server, using the HTTPS protocol to transmit the data securely.
[0326] 3. Analysis of the extraction request:
[0327] The server passes the received extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the user's input. For example, the AI system analyzes the sentence "Please extract sales data from January to March 2023" entered by the user and identifies the type and period of data required.
[0328] 4. Generate SQL queries:
[0329] The AI system generates optimal SQL queries based on the analysis results. For example, it generates the SQL query "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'".
[0330] 5. Executing SQL queries:
[0331] The server automatically executes the generated SQL queries against a data warehouse, which may use, for example, a cloud-based database service.
[0332] 6. Data Extraction and Return:
[0333] The data warehouse extracts the required data based on the executed SQL query and sends it back to the server, which then transmits the extracted data to the user's terminal.
[0334] 7. Priority adjustment using emotion engine:
[0335] When a user inputs an extraction request, the emotion engine infers the user's emotions from the user's tone of voice, facial expression, choice of words in text input, etc. For example, if a user inputs "Please extract sales data quickly," the emotion engine determines that the user is in a hurry and sets the priority of the extraction request high.
[0336] Examples
[0337] Example 1: A sales representative extracts sales data
[0338] The user enters "Extract sales data from January to March 2023" into a web form. The device sends this information to the server, which passes it to the AI system. The AI system generates an SQL query: "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'". The server runs this query against the data warehouse and extracts the required data. The extracted data is sent back to the user's device via the server.
[0339] Example 2: When the user is in a hurry
[0340] When a user types "Please extract the sales data quickly," the emotion engine detects the user's sense of urgency. The emotion engine sets the priority of the extraction request high and quickly executes the SQL query generated by the AI system. The server prioritizes processing of high-priority queries and quickly returns the data extracted from the data warehouse to the user's device.
[0341] Examples of prompt statements
[0342] "Extract sales data from January to March 2023."
[0343] "Please extract the sales data quickly."
[0344] This system allows sales staff to quickly and efficiently extract the data they need. The introduction of an emotion engine enables flexible responses based on the user's emotions.
[0345] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0346] Step 1:
[0347] Using a web form or a dedicated application, users input information such as the type of data they need and the period of time. For example, they might input, "Please extract sales data from January to March 2023." The input information is then saved on the device as an extraction request.
[0348] Step 2:
[0349] The terminal sends the extraction request entered by the user to the server. At this time, the data is sent securely using the HTTPS protocol. The input is the extraction request information, and the output is a transmission completion notification to the server.
[0350] Step 3:
[0351] The server passes the received extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the user's input. For example, the AI system analyzes the sentence "Please extract sales data from January to March 2023" entered by the user, and identifies the type and period of data required. The input is the extraction request information, and the output is the analysis result.
[0352] Step 4:
[0353] The AI system generates an optimal SQL query based on the analysis results. For example, it generates the SQL query "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'". The input is the analysis result, and the output is the generated SQL query.
[0354] Step 5:
[0355] The server automatically executes the generated SQL query against a data warehouse, which may use a cloud-based database service, for example. The input is the generated SQL query, and the output is the execution result.
[0356] Step 6:
[0357] The data warehouse extracts the required data based on the executed SQL query and sends it back to the server. The server sends the extracted data to the user's terminal. The input is the execution result, and the output is the extracted data.
[0358] Step 7:
[0359] When a user inputs an extraction request, the emotion engine infers the user's emotions from the user's tone of voice, facial expression, choice of words in the text input, etc. For example, if a user inputs "Please extract the sales data quickly," the emotion engine determines that the user is in a hurry and sets the priority of the extraction request high. The input is the user's emotional information, and the output is the priority setting.
[0360] (Application example 1)
[0361] Next, a description will be given of Application Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0362] With conventional data extraction systems, it was difficult to respond quickly and accurately to data extraction requests from the sales department. In addition, because priority adjustment was not performed taking into account the user's feelings, there was a problem that it was not possible to respond appropriately to requests with high urgency. Furthermore, there was an issue that it was difficult to extract and analyze production data and inventory data from factories in real time, making it difficult to achieve efficient production management.
[0363] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0364] In this invention, the server includes a means for generating an extraction request from the data warehouse from the sales department to the support department, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for adjusting the priority of the extraction request according to the user's emotion, including an emotion engine for recognizing the user's emotion, and a means for extracting and analyzing production data and inventory data in the factory in real time. This makes it possible to quickly and accurately respond to data extraction requests from the sales department and to appropriately respond to requests with high urgency by adjusting the priority according to the user's emotion. In addition, efficient production management can be realized by extracting and analyzing production data and inventory data in the factory in real time.
[0365] A "sales department" is a department within a company or organization that sells products and services.
[0366] A "support department" is a department that performs tasks to support the sales department and other departments.
[0367] A "data warehouse" is a database system for centrally managing and storing large amounts of data collected by companies and organizations.
[0368] An "extract request" is a request to retrieve specific data from the data warehouse.
[0369] "SQL" is an abbreviation for Structured Query Language, and is a language for manipulating and searching data in a database.
[0370] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[0371] An "emotion engine" is a technology for inferring emotions from a user's tone of voice, facial expression, choice of words in text input, etc.
[0372] "Priority adjustment" refers to changing the order of processing or the priority order of tasks or requests depending on their importance or urgency.
[0373] "Production data" is data related to production activities in factories and manufacturing sites.
[0374] "Inventory data" is data regarding the quantity and condition of products or parts held by a company or organization.
[0375] "Real-time" means that data and information are processed and provided immediately.
[0376] A system for implementing this invention includes an AI system that generates extraction requests from a data warehouse from a sales department to a support department and generates SQL based on the extraction requests, a means for executing the generated SQL against the data warehouse, an emotion engine that recognizes user emotions, a means for adjusting the priority of extraction requests according to the user emotions, and a means for extracting and analyzing production data and inventory data within a factory in real time.
[0377] Hardware and Software Used
[0378] Hardware: Factory robots, data warehouse servers
[0379] Software: SQLite (database management system), emotion recognition library, SQL generation library
[0380] Data processing and calculation
[0381] The server first receives a data extraction request from the sales department. The request is entered through a form that includes information such as the type of data and the period. The AI system then analyzes this information and generates the optimal SQL query. The generated SQL query is automatically executed against the data warehouse to extract the required data.
[0382] In addition, the emotion engine estimates the user's emotions from the tone of their voice, facial expressions, and choice of words in text input. This emotion engine makes it possible to adjust the priority of extraction requests according to the user's emotions, such as when the user is in a hurry or in trouble.
[0383] Examples
[0384] For example, if a factory manager requests, "I want to get last week's production data," the server receives this request and the AI system generates the optimal SQL query. At the same time, the emotion engine determines the urgency from the manager's tone of voice and facial expression, and increases the priority if necessary. The generated SQL query is executed against the data warehouse, and last week's production data is extracted and analyzed in real time.
[0385] Examples of prompt statements
[0386] User input: I want to get last week's production data
[0387] User emotion: Tone of voice sounds tense, facial expression looks worried
[0388] By inputting this prompt sentence into the generative AI model, it is possible to create a system that can adjust the priority of data extraction according to the user's emotions and quickly provide the necessary data.
[0389] The flow of the specific process in the application example 1 will be described with reference to FIG.
[0390] Step 1:
[0391] The server receives a data extraction request from the sales department. The request is entered through a form that includes information such as the type of data, the period, etc. The entered information is sent to the server for processing in the next step.
[0392] Step 2:
[0393] The server passes the received extraction request information to the AI system. The AI system analyzes this information and generates the optimal SQL query. Specifically, it automatically creates an SQL statement to extract the required data based on the type of data and the period. The generated SQL query is output.
[0394] Step 3:
[0395] The server executes the generated SQL query against the data warehouse. The data warehouse extracts the required data based on the SQL query and returns the results to the server. The extracted data is output.
[0396] Step 4:
[0397] The server uses an emotion engine to recognize the user's emotion. The emotion is estimated from the user's tone of voice, facial expression, choice of words in text input, etc. The emotion engine calculates a priority according to the user's emotion and returns the result to the server. The priority is output.
[0398] Step 5:
[0399] The server adjusts the priority of the extraction request based on the priority information from the emotion engine. For example, if it is determined that the user is in a hurry, the server increases the priority of the extraction request. The adjusted priority is output.
[0400] Step 6:
[0401] The server extracts and analyzes production data and inventory data from the factory in real time. It uses the generated SQL queries to retrieve the necessary data from the data warehouse and analyzes the data in real time. The analysis results are output.
[0402] Step 7:
[0403] The server provides the analysis results to the user. The user can check the production data and inventory data extracted and analyzed in real time and take necessary measures. The provided data is output.
[0404] Example 2
[0405] Next, a second embodiment of the second embodiment will be described. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0406] In conventional data extraction systems from data warehouses, SQL query generation and optimization are often done manually, which is inefficient. In addition, it is difficult to flexibly respond to user requests because data extraction cannot be done according to user emotions. For this reason, there is a demand for a system that automates SQL query generation and optimization and also realizes data extraction according to user emotions.
[0407] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0408] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, a means for analyzing the generated SQL query and optimizing an execution plan, and a means for adjusting the generated SQL query based on the user's emotions. This automates the generation and optimization of SQL queries, enabling flexible data extraction according to the user's emotions.
[0409] A "sales department" is a department within a company or organization responsible for selling products and services.
[0410] A "support department" is a department within a company or organization whose role is to support the sales department and other departments.
[0411] A "data warehouse" is a database system that allows companies and organizations to aggregate large amounts of data and use it for analysis and reporting.
[0412] An "extract request" is a request to retrieve specific data from the data warehouse.
[0413] "SQL" stands for Structured Query Language, a programming language used to manipulate and define data in a database management system.
[0414] An "artificial intelligence system" is a system that mimics human intelligence using technologies such as machine learning and natural language processing.
[0415] An "execution plan" is a diagram that describes the steps or methods that a database management system will use to execute a SQL query.
[0416] "Optimization" refers to making adjustments or improvements to maximize the performance of a system or process.
[0417] "User emotion" refers to the psychological reaction or state a user has to a particular situation or piece of information.
[0418] "Adaptation" refers to modifying a system or process to suit specific purposes or conditions.
[0419] This invention is a system that efficiently processes requests from the sales department to the support department for data extraction from a data warehouse, automates the generation and optimization of SQL queries, and provides a means for realizing data extraction according to the user's emotions.
[0420] System Configuration
[0421] The system consists of the following main components:
[0422] 1. A means of generating extraction requests from the sales department to the support department
[0423] A user uses a terminal to input a request for data extraction in natural language, for example a prompt such as "Show me all the recent sales data."
[0424] 2. Artificial intelligence system that generates SQL
[0425] The server analyzes the prompt received from the user and generates an appropriate SQL query using the generative AI model. For example, in response to the prompt "Show me all recent sales data," the server generates the SQL query SELECT FROM sales WHERE date >= '2023-01-01';.
[0426] 3. A means to execute the generated SQL against the data warehouse
[0427] The server sends the generated SQL query to the data warehouse and obtains the results of the query execution.
[0428] 4. A means to analyze the generated SQL queries and optimize the execution plan
[0429] The server analyzes the generated SQL query and optimizes the execution plan. Specifically, it optimizes the table join order and uses indexes. For example, for a query such as SELECT FROM sales WHERE date >= '2023-01-01';, it generates an optimized query such as SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;.
[0430] 5. A means to tailor generated SQL queries based on user sentiment
[0431] The server uses an emotion engine to analyze the user's emotions and adjusts the SQL query accordingly: if the user is angry, for example, it generates an SQL query to provide more detailed data, and if the user is happy, it generates a simple SQL query to provide summary information.
[0432] Examples
[0433] Here is a specific scenario:
[0434] Scenario 1: The user is angry
[0435] Input prompt text: The user requests, "Show me all my recent sales data."
[0436] Generated SQL query: SELECT FROM sales WHERE date >= '2023-01-01';
[0437] Optimized SQL query: SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;
[0438] Scenario 2: Happy User
[0439] Input prompt: The user requests, "What are my recent sales totals?"
[0440] Generated SQL query: SELECT SUM(amount) FROM sales WHERE date >= '2023-01-01';
[0441] Optimized SQL query: SELECT SUM(amount) FROM sales WHERE date >= '2023-01-01';
[0442] This system automates the generation and optimization of SQL queries, enabling flexible data extraction based on user sentiment.
[0443] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0444] Step 1:
[0445] The user enters a prompt sentence.
[0446] The user enters a data extraction request in natural language into an input field on the terminal, for example, "Show me all my recent sales data."
[0447] Input: A user's natural language request for data extraction.
[0448] Output: The prompt text typed into the terminal.
[0449] Step 2:
[0450] The terminal sends a prompt to the server.
[0451] The terminal sends the prompt text entered by the user to the server as an HTTP POST request.
[0452] Input: The prompt text typed into the terminal.
[0453] Output: The prompt text sent to the server.
[0454] Step 3:
[0455] The server parses the prompt and generates an SQL query.
[0456] The server inputs the received prompt sentence into the generative AI model and generates an appropriate SQL query. For example, in response to the prompt sentence "Show me all recent sales data," the server generates the SQL query SELECT FROM sales WHERE date >= '2023-01-01';.
[0457] Input: The prompt text sent to the server.
[0458] Output: The generated SQL query.
[0459] Step 4:
[0460] Optimize server-generated SQL queries.
[0461] The server analyzes the generated SQL query and optimizes the execution plan. Specifically, it optimizes the table join order and uses indexes. For example, for a query such as SELECT FROM sales WHERE date >= '2023-01-01';, it generates an optimized query such as SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;.
[0462] Input: The generated SQL query.
[0463] Output: The optimized SQL query.
[0464] Step 5:
[0465] The server sends the optimized SQL query to the database and retrieves the results.
[0466] The server sends the optimized SQL query to the database and gets the results of the query execution, which extracts data based on the query and returns it to the server.
[0467] Input: The optimized SQL query.
[0468] Output: The results of the query execution retrieved from the database.
[0469] Step 6:
[0470] The server transmits the obtained results to the terminal.
[0471] The server sends the results obtained from the database to the terminal as an HTTP response.
[0472] Input: The results of the query execution retrieved from the database.
[0473] Output: The results of the query sent to the terminal.
[0474] Step 7:
[0475] The terminal displays the results to the user.
[0476] The terminal displays the data received from the server to the user, for example, recent sales data in a table format.
[0477] Input: The result of the query sent by the server.
[0478] Output: The data displayed to the user.
[0479] (Application example 2)
[0480] Next, a description will be given of Application Example 2 of Form Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0481] Conventional data extraction systems from data warehouses do not extract data according to user sentiment, making it difficult to provide information that meets user needs. In addition, the performance of the generated SQL queries is not optimized, resulting in poor data extraction efficiency. This leads to issues such as a poor user experience and a deterioration in the performance of the entire system.
[0482] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0483] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, a means for analyzing user emotions, a means for adjusting the SQL query based on the user emotions, and a means for optimizing the performance of the generated SQL query. This enables optimal data extraction according to the user emotions, improves the efficiency of data extraction, and improves the quality of the user experience.
[0484] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[0485] A "support department" is a department within a company or organization that has the role of supporting the sales department and other departments.
[0486] A "data warehouse" is a database system that manages large amounts of data from companies and organizations in an integrated manner and uses it for analysis and reporting.
[0487] An "extract request" is a request to retrieve specific data from the data warehouse.
[0488] "SQL" stands for Structured Query Language, a standard programming language for manipulating and defining data in a database management system.
[0489] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[0490] "User emotion" refers to the feeling or mood state that a user has toward a particular situation or piece of information.
[0491] An "SQL query" is an SQL statement used to search for and manipulate data in a database.
[0492] "Optimizing performance" means making adjustments or improvements to a system or process to maximize its efficiency and speed.
[0493] The following system configuration is used as an embodiment of the present invention.
[0494] The server includes a means for generating requests for retrieval from the data warehouse from the sales department to the support department. Specifically, when a sales department representative needs specific data, he or she inputs the request into the system. This input is made through a user interface.
[0495] Next, the server includes an AI system that generates SQL based on the extraction request. The AI system uses a generative AI model to generate an optimal SQL query from the input extraction request. The generated SQL query is executed against the data warehouse.
[0496] Furthermore, the server includes a means for analyzing the user's emotions. The user's emotions are analyzed in real time using emotion recognition software installed in a device such as a smartphone, smart glasses, or a head-mounted display. The emotion recognition software analyzes data such as the user's facial expressions, voice, and heart rate to identify the user's emotional state.
[0497] The server has the means to adjust the SQL query based on the user's emotions: for example, if the user is stressed, it generates a detailed SQL query to provide relaxing content, whereas if the user is happy, it generates a simple SQL query to provide summary information.
[0498] The server also has the ability to optimize the performance of the generated SQL queries, such as optimizing the join order of tables and refining queries to take advantage of indexes, making data extraction from the data warehouse more efficient.
[0499] For example, if a user is wearing smart glasses and the emotion recognition software determines that the user is stressed, the server will generate SQL queries to provide relaxing music or scenic videos and extract the relevant content from the data warehouse, whereas if the user is excited, it will generate SQL queries to provide action movie trailers or sports highlights.
[0500] An example of a prompt is as follows:
[0501] "Build your application to provide the best content based on the user's emotions. Provide detailed content when the user is angry and summary information when the user is happy. Also, optimize your SQL queries."
[0502] In this way, optimal data extraction according to the user's emotions becomes possible, improving the efficiency of data extraction and the quality of the user experience.
[0503] The flow of the specific process in the application example 2 will be described with reference to FIG.
[0504] Step 1:
[0505] A sales department staff member uses a terminal to input a data extraction request.
[0506] Input: The data requirements for sales personnel (e.g. sales data for a specific period)
[0507] Output: A data extraction request is sent to the system
[0508] Specific operations: Through the terminal's user interface, the person in charge enters the required data conditions and presses the send button.
[0509] Step 2:
[0510] The server receives the data extraction request and the AI system generates an SQL query.
[0511] Input: Data extraction request
[0512] Output: Generated SQL query
[0513] Specific operation: The server analyzes the data extraction request and generates the optimal SQL query using a generative AI model.
[0514] Step 3:
[0515] The device analyzes the user's emotions in real time.
[0516] Input: Emotional data such as user facial expressions, voice, and heart rate
[0517] Output: Analyzed user's emotional state (e.g. stress, satisfaction)
[0518] Specific operation: Emotion recognition software installed on the device collects and analyzes the user's emotional data.
[0519] Step 4:
[0520] The server adjusts the SQL query based on the user's sentiment.
[0521] Input: Generated SQL queries, parsed user emotional state
[0522] Output: Adjusted SQL query
[0523] Specific behavior: The server adjusts the generated SQL query based on the analyzed emotional state, changing it to a query that provides more detailed data or summary information.
[0524] Step 5:
[0525] Server tuned to optimize performance of SQL queries.
[0526] Input: Adjusted SQL query
[0527] Output: Optimized SQL query
[0528] What happens: The server will optimize the join order of tables and refine the query to take advantage of indexes.
[0529] Step 6:
[0530] The server executes the optimized SQL queries against the data warehouse.
[0531] Input: Optimized SQL query
[0532] Output: Data extracted from the data warehouse
[0533] What happens next: The server sends optimized SQL queries to the data warehouse to extract the required data.
[0534] Step 7:
[0535] The server transmits the extracted data to the terminal and displays it to the user.
[0536] Input: Data extracted from the data warehouse
[0537] Output: Data displayed to the user
[0538] Specific operation: The server sends the extracted data to the terminal and displays it to the user through the terminal's user interface.
[0539] In this way, optimal data extraction according to the user's emotions becomes possible, improving the efficiency of data extraction and the quality of the user experience.
[0540] 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 a voice indicating a user input for the result of the specific processing. The control unit 46A transmits the voice data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.
[0541] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (registered trademark) (Internet search<URL: https: / / openai.com / blog / chatgpt> ) and other generation AIs. The data generation model 58 is obtained by making a neural network perform deep learning. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating a voice, text data indicating a text, and image data indicating an image is input. The data generation model 58 performs inference on the input inference data according to the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0542] Another example of generative AI is Gemini (registered trademark) (Internet search <url: https: gemini.google.com ?hl="ja">) are mentioned.
[0543] In the above embodiment, an example was given in which the specific process was performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.
[0544] [Second embodiment]
[0545] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0546] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.
[0547] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a wide area network (WAN) and / or a local area network (LAN).
[0548] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.
[0549] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs the voice according to instructions from the processor 46.
[0550] Camera 42 is a small digital camera equipped with an optical system including a lens, an aperture, and a shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (e.g., an imaging range defined by an angle of view equivalent to the width of the field of vision of an average healthy person).
[0551] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for transmitting and receiving various types of information between the processor 46 and the processor 28 via the network 54. The transmission and reception of various types of information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is performed in a secure state.
[0552] Fig. 4 shows an example of main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0553] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32, and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0554] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0555] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50, and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0556] Next, the specific processing by the specific processing unit 290 of the data processing device 12 will be described.
[0557] "Example 1"
[0558] The present invention is directed to a system including a means for automatically generating an extraction request from a sales department, automatic generation of SQL by an AI system, and automatic execution of the generated SQL. Specifically, an extraction request from a sales department is input through a form including information such as the type and period of data required by the sales department. This information is sent to the system, and the AI system analyzes it. The AI system generates an optimal SQL query based on the content of the extraction request. The generated SQL query is automatically executed against a data warehouse to extract the required data.
[0559] "Example 2"
[0560] In another aspect of the present invention, the AI system optimizes the performance of the generated SQL queries. Specifically, the AI system analyzes the generated SQL queries and optimizes the execution plan of the queries, for example optimizing the join order of tables and refining the queries to take advantage of indexes, which results in more efficient data extraction from the data warehouse.
[0561] The process flow of each embodiment will be described below.
[0562] "Example 1"
[0563] Step 1: An extraction request from the sales department is entered through a form containing information such as the type of data the sales department requires and the period of time.
[0564] Step 2: This information is sent to the system, where the AI system analyzes it.
[0565] Step 3: The AI system generates the optimal SQL query based on the content of the extraction request.
[0566] Step 4: The generated SQL queries are automatically executed against the data warehouse to extract the required data.
[0567] "Example 2"
[0568] Step 1: The AI system analyzes the generated SQL query.
[0569] Step 2: The AI system optimizes the query execution plan, for example by optimizing the join order of tables and refining the query to take advantage of indexes.
[0570] Step 3: This makes data extraction from the data warehouse more efficient.
[0571] Example 1
[0572] Next, a description will be given of Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal".
[0573] Conventional data extraction systems had the problem that extraction requests from the sales department had to be processed manually, which was time-consuming and labor-intensive. In addition, specialized knowledge was required to generate and execute SQL queries, making it difficult for non-experts to easily extract data. Furthermore, if the performance of the generated SQL queries was not optimized, data extraction could take a long time.
[0574] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0575] In this invention, the server includes a means for generating an extraction request from the database from the sales department to the support department, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the database, a means for providing a user interface for inputting the extraction request, a means for using natural language processing technology for analyzing the extraction request, a means for automatically executing the generated SQL query against the database, and a means for providing the extracted data to the user. This makes it possible to automatically process the extraction request from the sales department and to easily extract data even by non-experts. In addition, the performance of the generated SQL query is optimized, improving the efficiency of data extraction.
[0576] A "sales department" is a department within a company or organization responsible for selling products and services.
[0577] A "support department" is a department whose role is to support other departments, such as the sales department.
[0578] A "database" is a system for efficiently storing, managing, and searching data.
[0579] An "extraction request" is a request to retrieve specific data from a database.
[0580] An "artificial intelligence system" is a system that automatically performs tasks using technologies such as machine learning and natural language processing.
[0581] "SQL" is a standard query language for manipulating and searching data in a database.
[0582] A "user interface" is an interface through which a user interacts with a system.
[0583] "Natural language processing technology" is a technology that enables computers to understand, interpret, and generate human language.
[0584] An "SQL query" is a command statement for searching, inserting, updating, or deleting specific data from a database.
[0585] "Performance" refers to the efficiency or speed of a system or query.
[0586] The present invention is a system for automatically processing extraction requests from a sales department and efficiently extracting necessary data from a database. A specific embodiment of this system will be described below.
[0587] System Configuration
[0588] Hardware
[0589] Server: Hosts the Database Management System (DBMS) and generates and executes SQL queries.
[0590] Terminal: The computer or mobile device through which the User enters the extraction request.
[0591] Database: A system for storing data, such as a cloud-based database service.
[0592] software
[0593] User Interface: A web form built using HTML and JavaScript that provides the interface for users to enter extraction requests.
[0594] Artificial Intelligence System: Implemented in Python, it uses a generative AI model (e.g. GPT-4) to generate SQL queries.
[0595] Natural Language Processing techniques are used to analyze the extraction request, for example using an NLP library (e.g. spaCy).
[0596] System Operation
[0597] Input extraction request
[0598] The user inputs information such as the type of data required and the period of time into a dedicated form on a web browser. This form is built using HTML and JavaScript. For example, the user inputs the following information:
[0599] Data type: Sales data
[0600] Period: January 1, 2023 to March 31, 2023
[0601] Sending an Extraction Request
[0602] The terminal sends the extraction request information entered by the user to the server using the HTTPS protocol, with the data encoded in JSON format.
[0603] Receiving and parsing extraction requests
[0604] The server parses the received JSON data and passes the contents of the extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the extraction request. For example, it generates a prompt sentence like the following:
[0605] "Generate a SQL query to extract sales data from January 1, 2023 to March 31, 2023."
[0606] Generate SQL queries
[0607] The AI system uses a generative AI model (e.g. GPT-4) to generate optimal SQL queries, such as the following:
[0608] sql
[0609] SELECT FROM sales WHERE sale_date BETWEEN '2023-01-01' AND '2023-03-31';
[0610] Executing SQL Queries
[0611] The server automatically executes the generated SQL queries against a database (we use a cloud-based database service) using Python libraries (e.g. psycopg2).
[0612] Data extraction and provision
[0613] The server receives the extracted data from the database and provides it to the user. The extracted data is exported in CSV format and a download link is generated for the user to click on to download the data.
[0614] In this way, extraction requests from the sales department can be processed automatically, making it easy for non-experts to extract data. In addition, the performance of the generated SQL queries is optimized, improving the efficiency of data extraction.
[0615] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0616] Step 1:
[0617] The user inputs information such as the type of data required and the period into a dedicated form on a web browser. The input information is the type of data (e.g., sales data) and the period (e.g., from January 1, 2023 to March 31, 2023). This completes the input of the extraction request.
[0618] Step 2:
[0619] The terminal converts the information of the extraction request entered by the user into JSON format and sends it to the server using the HTTPS protocol. The input is the type and period of data entered by the user, and the output is data in JSON format. This sends the extraction request to the server.
[0620] Step 3:
[0621] The server analyzes the received JSON data and passes the contents of the extraction request to the AI system. The input is the JSON data sent from the terminal, and the output is the analyzed contents of the extraction request. This completes the analysis of the extraction request.
[0622] Step 4:
[0623] The AI system in the server uses natural language processing technology to analyze the extraction request and generate a prompt sentence. The input is the content of the analyzed extraction request, and the output is the generated prompt sentence. For example, a prompt sentence may be generated that reads, "Please generate an SQL query to extract sales data from January 1, 2023 to March 31, 2023."
[0624] Step 5:
[0625] The AI system uses a generative AI model (e.g., GPT-4) to generate an optimal SQL query based on the prompt sentence. The input is the generated prompt sentence, and the output is the generated SQL query. For example, the SQL query "SELECT FROM sales WHERE sale_date BETWEEN '2023-01-01' AND '2023-03-31';" is generated.
[0626] Step 6:
[0627] The server automatically executes the generated SQL query against the database. The input is the generated SQL query, and the output is the data extracted from the database. The database uses a cloud-based database service. This completes the execution of the SQL query.
[0628] Step 7:
[0629] The server receives the data extracted from the database and converts it into CSV format. The input is the data extracted from the database, and the output is data in CSV format. This completes the data format conversion.
[0630] Step 8:
[0631] The server generates a link to provide the user with CSV format data and notifies the user. The input is the CSV format data, and the output is a download link. The user can click this link to download the data. This completes the data provision.
[0632] (Application example 1)
[0633] Next, a description will be given of Application Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal".
[0634] Traditional inventory management at logistics centers requires manual data extraction and analysis, which is time-consuming and labor-intensive. In addition, data extraction requires manual SQL queries, which requires specialized knowledge, making efficient inventory management difficult.
[0635] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means. In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for a staff member to input the necessary inventory information in an inventory management application in the logistics center, a means for generating an optimal SQL query based on the input information and extracting the necessary data from the data warehouse, and a means for displaying the extracted data. This makes inventory management in the logistics center more efficient, and makes it possible to easily extract and display the necessary data even without specialized knowledge.
[0636] A "sales department" is a department within a company or organization that sells products and services.
[0637] A "support department" is a department whose role is to support other departments, such as the sales department.
[0638] A "data warehouse" is a database system that centrally manages large amounts of data from a company or organization and uses it for analysis and reporting.
[0639] An "extract request" is a request to retrieve specific data from the data warehouse.
[0640] An "AI system" is a system that uses artificial intelligence technology to automate certain tasks.
[0641] "SQL" is a standard programming language for manipulating and querying data from database management systems.
[0642] A "logistics center" is a facility that handles logistics operations such as the storage, management, and delivery of goods.
[0643] An "inventory management application" is software for managing inventory status and providing necessary information.
[0644] "Staff" refers to employees or personnel working for a company or organization.
[0645] "Inventory information" is data regarding the quantity and condition of products at a logistics center.
[0646] An "SQL query" is a command statement for retrieving specific data from a database.
[0647] "Data extraction" is the process of retrieving the required data from a data warehouse.
[0648] A "display means" is a method or device for visually presenting the extracted data to a user.
[0649] As an embodiment of the present invention, an inventory management application in a logistics center will be described as an example.
[0650] The server has a means to generate requests for extraction from the data warehouse from the sales department to the support department. This allows sales department staff to input the necessary inventory information. The input information is sent to the server, where the AI system analyzes it.
[0651] The AI system uses a generative AI model to generate optimal SQL queries based on the input information. These SQL queries are then automatically executed against the data warehouse. Data extracted from the data warehouse is displayed on staff terminals via the server.
[0652] Specifically, staff at the distribution center access the inventory management application using a smartphone or tablet. Staff enter the necessary inventory information (e.g., the number of items in stock for a particular product category or data on incoming and outgoing goods for a particular period) through the application's interface. This information is sent to the server as a prompt text like the following:
[0653] Example prompt:
[0654] Data Type: Inventory
[0655] Period: Last month
[0656] Category: Electronics
[0657] The server receives the prompt sentence and sends it to the AI system, which uses the generative AI model to generate the optimal SQL query based on the prompt sentence, which is then executed against the data warehouse to extract the required data.
[0658] The extracted data is then displayed on the staff's terminals via the server, allowing staff at the distribution center to easily extract and display the inventory data they need, even if they do not have specialized knowledge.
[0659] The following hardware and software are used to realize this system:
[0660] Server: Communicates with the data warehouse and runs the AI system.
[0661] Data Warehouse: Centrally manages large amounts of data and provides the data based on SQL queries.
[0662] AI system: Uses a generative AI model to generate SQL queries based on prompt statements.
[0663] Smartphones and tablets: Devices that allow staff to access the inventory management application and enter the necessary information.
[0664] In this way, inventory management at logistics centers is made more efficient, and necessary data can be easily extracted and displayed even without specialized knowledge.
[0665] The flow of the specific process in the application example 1 will be described with reference to FIG.
[0666] Step 1:
[0667] A user accesses an inventory management application on a smartphone or tablet and inputs the necessary inventory information. The input information includes data type (inventory), period (last month), product category (electronic devices), etc. This input data is structured as a prompt sentence.
[0668] Step 2:
[0669] The terminal sends the input prompt to the server. The server receives the prompt and prepares it to send to the AI system. The input data is converted to an appropriate data format, such as JSON format.
[0670] Step 3:
[0671] The server sends the prompt sentence to the AI system, which uses the generative AI model to generate an optimal SQL query based on the prompt sentence. Specifically, the generative AI model parses the prompt sentence and constructs a SQL query to retrieve the required data.
[0672] Step 4:
[0673] The AI system generates a SQL query and sends it back to the server, which receives it and prepares it to run against the data warehouse, translating the SQL query into a format the data warehouse can understand.
[0674] Step 5:
[0675] The server executes the generated SQL query to the data warehouse. The data warehouse extracts the required data based on the SQL query. Specifically, the data warehouse analyzes the SQL query, searches for and extracts the relevant data.
[0676] Step 6:
[0677] The data warehouse sends the extracted data back to the server, which receives it and prepares it for transmission to the user's terminal. The extracted data is converted into a format that is easy for the user to understand.
[0678] Step 7:
[0679] The server transmits the extracted data to the user's terminal. The terminal receives the data and displays it on the interface of the inventory management application. The user can check the displayed data and use it for inventory management.
[0680] In this way, inventory management at logistics centers is made more efficient, and necessary data can be easily extracted and displayed even without specialized knowledge.
[0681] Example 2
[0682] Next, a description will be given of Example 2 of the embodiment 2. In the following description, the data processing device 12 is referred to as a "server" and the smart glasses 214 are referred to as a "terminal".
[0683] In conventional data extraction systems from data warehouses, SQL queries were often generated and optimized manually, resulting in poor efficiency. In addition, the performance of the generated SQL queries was not optimized, which could result in slow data extraction times. This made it difficult for sales and support departments to quickly obtain the data they needed.
[0684] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0685] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating an SQL query based on the extraction request, a means for analyzing the generated SQL query, generating and optimizing an execution plan, a means for executing the optimized SQL query on the data warehouse, and a means for returning the execution result to the user. This automates the generation and optimization of SQL queries, improves the efficiency of data extraction, and enables the sales department and support department to quickly obtain the data they need.
[0686] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[0687] A "support department" is a department within a company or organization that has the role of supporting the sales department and other business departments.
[0688] A "data warehouse" is a database system that allows companies and organizations to aggregate large amounts of data and use it for analysis and reporting.
[0689] An "extract request" is a request to retrieve specific data from the data warehouse.
[0690] "SQL query" means instructions written in Structured Query Language (SQL) used to retrieve, insert, update, and delete data from a database.
[0691] An "artificial intelligence system" is a system that mimics human intelligence using technologies such as machine learning and natural language processing.
[0692] "Analysis" is the process of examining data or information in detail to understand its structure and meaning.
[0693] An "execution plan" is a plan that describes the specific steps that a database management system takes to execute a SQL query.
[0694] "Optimization" refers to making adjustments or improvements to maximize the performance of a system or process.
[0695] "Execution results" refers to the data or information obtained by executing a SQL query.
[0696] "User" means an individual or organization that uses the system or service.
[0697] This invention is a system for improving the efficiency of data extraction from a data warehouse. The system includes an artificial intelligence system that generates an extraction request from a sales department to a support department and generates an SQL query based on the request. The system further includes a means for analyzing the generated SQL query and generating and optimizing an execution plan. The optimized SQL query is executed against the data warehouse, and the execution result is returned to the user.
[0698] Hardware and Software Used
[0699] The server is equipped with a powerful processor and a large amount of memory (e.g., 64GB RAM). In addition, MySQL or PostgreSQL is used as the database management system (DBMS). The artificial intelligence system generates and optimizes SQL queries using machine learning models and natural language processing techniques.
[0700] Program processing explanation
[0701] The server receives the SQL query submitted by the user and parses it using an SQL parser to check the syntax of the query. The server then generates an execution plan based on the parsed SQL query. An execution plan is a set of detailed instructions on how to execute the query.
[0702] The server optimizes the generated execution plan by optimizing the join order of tables and improving the query to take advantage of indexes, which makes the query run faster and allows data to be retrieved much faster.
[0703] The optimized SQL queries are then executed against the data warehouse, and the server returns the results to the user, who can view them through a terminal interface.
[0704] Examples and prompts
[0705] For example, if a user enters the following SQL query:
[0706] sql
[0707] SELECT FROM orders
[0708] JOIN customers ON orders.customer_id = customers.id
[0709] WHERE orders.order_date > '2023-01-01';
[0710] The server receives this query and performs analysis. As a result of the analysis, the server generates an execution plan for the query and optimizes it as follows:
[0711] Optimize the join order of tables to perform the joins in the most efficient order.
[0712] If an index exists on orders.order_date, refine the query to take advantage of the index.
[0713] The optimized query looks like this:
[0714] sql
[0715] SELECT FROM customers
[0716] JOIN orders ON customers.id = orders.customer_id
[0717] WHERE orders.order_date > '2023-01-01';
[0718] Example of a prompt to be input to a generative AI model:
[0719] "Optimize the performance of the following SQL queries:
[0720] SELECT FROM orders
[0721] JOIN customers ON orders.customer_id = customers.id
[0722] WHERE orders.order_date > '2023-01-01';''
[0723] Using this prompt, the generative AI model optimizes the SQL query to achieve efficient data extraction.
[0724] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0725] Step 1:
[0726] The user enters an SQL query.
[0727] A user enters an SQL query through a terminal interface, for example a query like this:
[0728] sql
[0729] SELECT FROM orders
[0730] JOIN customers ON orders.customer_id = customers.id
[0731] WHERE orders.order_date > '2023-01-01';
[0732] Input: The SQL query entered by the user.
[0733] Output: SQL query sent from terminal to server
[0734] Step 2:
[0735] The server receives the input SQL query.
[0736] The server receives the SQL query sent by the user and temporarily stores it in memory.
[0737] Input: SQL query sent from the terminal
[0738] Output: SQL query stored in server memory
[0739] Step 3:
[0740] The server parses the SQL query.
[0741] The server uses an SQL parser to parse the received SQL query, and during the parsing process it checks the syntax of the query for any syntax errors.
[0742] Input: SQL query stored in the server's memory
[0743] Output: Syntax information of the parsed SQL query.
[0744] Step 4:
[0745] The server generates an execution plan for the query.
[0746] Based on the parsed SQL query, the server generates an execution plan, which is a set of detailed instructions on how to execute the query.
[0747] Input: Syntax information of the parsed SQL query
[0748] Output: Generated execution plan
[0749] Step 5:
[0750] The server optimizes the execution plan.
[0751] The server optimizes the generated execution plan. Specifically, it optimizes the following:
[0752] Optimized table join order: The server optimizes the order in which tables are joined in a query, which can improve the execution speed of the query.
[0753] Use indexes: The server refines queries to take advantage of indexes, which can greatly speed up retrieval of data.
[0754] Input: Generated execution plan
[0755] Output: Optimized execution plan
[0756] Step 6:
[0757] The server generates an optimized SQL query.
[0758] The server generates a new SQL query based on the optimized execution plan, for example optimized to:
[0759] sql
[0760] SELECT FROM customers
[0761] JOIN orders ON customers.id = orders.customer_id
[0762] WHERE orders.order_date > '2023-01-01';
[0763] Input: Optimized execution plan
[0764] Output: Optimized SQL query
[0765] Step 7:
[0766] The server executes the optimized SQL query.
[0767] The server executes optimized SQL queries against a data warehouse using a database management system (DBMS), for example MySQL or PostgreSQL.
[0768] Input: Optimized SQL query
[0769] Output: Results of executing the SQL query
[0770] Step 8:
[0771] The server returns the execution result to the user.
[0772] The server executes the SQL query and returns the results to the user, who displays the results through the terminal interface.
[0773] Input: Result of executing a SQL query
[0774] Output: The execution result displayed on the user's terminal.
[0775] (Application example 2)
[0776] Next, a description will be given of Application Example 2 of Form Example 2. In the following description, the data processing device 12 will be referred to as a "server", and the smart glasses 214 will be referred to as a "terminal".
[0777] In conventional data extraction systems from data warehouses, SQL queries are often generated and optimized manually, which is inefficient. In addition, real-time data extraction is required for inventory management and shipping plan optimization at logistics centers, but current systems have difficulty in meeting this requirement. This leads to issues such as reduced accuracy of inventory management and shipping plans, and worsening business efficiency.
[0778] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0779] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for extracting data for optimizing inventory management and shipping plans in the logistics center, a means for optimizing the SQL query generated by the AI system, and a means including an application installed on a smartphone. This improves the efficiency of data extraction, and enables real-time optimization of inventory management and shipping plans in the logistics center.
[0780] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[0781] A "support department" is a department within a company or organization that has the role of supporting the sales department and other business departments.
[0782] A "data warehouse" is a database system that enables companies and organizations to manage and analyze large amounts of data in an integrated manner.
[0783] An "extract request" is a request to retrieve specific data from the data warehouse.
[0784] "SQL" stands for Structured Query Language, a programming language used to manipulate and define data in a database management system.
[0785] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[0786] A "logistics center" is a facility that handles logistics operations such as the storage, management, and shipping of goods.
[0787] "Inventory management" is the task of understanding the inventory status of products and managing them appropriately.
[0788] A "shipment plan" is a plan for creating a product shipping schedule and carrying out efficient shipping.
[0789] A "smartphone" is a highly functional mobile phone that can connect to the Internet and use applications.
[0790] An "application" is a software program designed to provide a specific function or service.
[0791] "Optimization" means making something the most efficient for a particular purpose.
[0792] As an embodiment of the present invention, a system for optimizing inventory management and shipping plans in a logistics center will be described. This system includes an AI system that generates an extraction request from a data warehouse from a sales department to a support department and generates SQL based on the extraction request. The system also executes the generated SQL against the data warehouse to extract data for optimizing inventory management and shipping plans in the logistics center. The system also includes an application that optimizes the SQL query generated by the AI system and is installed on a smartphone.
[0793] The server receives extraction requests from the sales department, and the AI system generates optimal SQL queries based on those requests. The generated SQL queries are executed against the data warehouse to extract the required data. The AI system optimizes the performance of the generated SQL queries to improve the efficiency of data extraction. Specifically, it optimizes the table join order and improves the queries to utilize indexes.
[0794] The terminal (smartphone) runs an application for optimizing inventory management and shipping plans in real time at the logistics center. This application receives optimized data sent from the server and displays the inventory status and shipping plans. This allows the user to efficiently manage inventory and make shipping plans.
[0795] The hardware used is the server hosting the data warehouse and / or a smartphone. The software uses Python, SQLite, and the sqlparse library. The AI system generates and optimizes SQL queries using a generative AI model.
[0796] As a concrete example, consider a scenario used in an inventory management system at a logistics center. Assume that a user uses a smartphone application to optimize an SQL query to retrieve products with stock levels greater than or equal to 0 and sort them by product ID. In this case, an example of a prompt sentence to be input to the generative AI model is as follows:
[0797] "Please optimize the SQL query in the inventory management system of the distribution center to get products with stock greater than or equal to 0 and sort them by product ID."
[0798] By inputting this prompt sentence into a generative AI model, an optimized SQL query can be generated, improving the efficiency of data extraction.
[0799] The flow of the specific process in the application example 2 will be described with reference to FIG.
[0800] Step 1:
[0801] The server receives an extraction request from the sales department to the support department from the data warehouse. This extraction request includes the type of data required and conditions. The input is the content of the extraction request, and the output is a prompt statement for generating an SQL query based on the content.
[0802] Step 2:
[0803] The server inputs a prompt sentence to the generative AI model based on the received extraction request. The prompt sentence specifically describes the content of the extraction request. The input is the prompt sentence, and the output is the SQL query generated by the generative AI model.
[0804] Step 3:
[0805] The server receives the SQL query output from the generative AI model and optimizes the query. Specifically, it optimizes the join order of tables and improves the query to make use of indexes. The input is the generated SQL query, and the output is the optimized SQL query.
[0806] Step 4:
[0807] The server runs the optimized SQL queries against the data warehouse to extract the required data. The input is the optimized SQL queries and the output is the extracted data.
[0808] Step 5:
[0809] The server sends the extracted data to the terminal (smartphone). The input is the extracted data, and the output is the data sent to the terminal.
[0810] Step 6:
[0811] The terminal displays the received data through the application. The user performs inventory management and shipping planning based on the displayed data. The input is the data sent from the server, and the output is the data displayed to the user.
[0812] Step 7:
[0813] Users use the application to perform operations to optimize inventory management and shipping plans, thereby improving the operational efficiency of the distribution center. The input is the data displayed through the application, and the output is optimized inventory management and shipping plans.
[0814] In addition, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0815] "Example 1"
[0816] In one embodiment of the present invention, the AI system includes an emotion engine that recognizes the user's emotions. The emotion engine infers the user's emotions from, for example, the user's tone of voice, facial expression, and choice of words in text input. This emotion engine makes it possible to adjust the priority of extraction requests according to the user's emotions, such as when the user is in a hurry or in a difficult situation.
[0817] "Example 2"
[0818] The emotion engine can also adjust the SQL queries it generates based on the user's emotions. For example, when the user is angry, it generates SQL queries to provide more detailed data. On the other hand, when the user is happy, it generates simple SQL queries to provide summary information. This allows optimal data extraction according to the user's emotions.
[0819] The process flow of each embodiment will be described below.
[0820] "Example 1"
[0821] Step 1: Receive an extraction request from a user.
[0822] Step 2: The emotion engine infers the user's emotions from the user's tone of voice, facial expressions, choice of words in text input, etc.
[0823] Step 3: Adjust the priority of extraction requests according to the user's emotions estimated by the emotion engine.
[0824] Step 4: Process the extraction request based on the adjusted priority.
[0825] "Example 2"
[0826] Step 1: Receive an extraction request from a user.
[0827] Step 2: The emotion engine estimates the user's emotion.
[0828] Step 3: The generated SQL query is adjusted according to the user's emotion estimated by the emotion engine.
[0829] Step 4: Generate tailored SQL queries to perform data extraction.
[0830] Example 1
[0831] Next, a description will be given of Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal".
[0832] In the conventional data extraction system, extraction requests from the sales department had to be processed manually, which was time-consuming and labor-intensive. In addition, it was not possible to respond flexibly to user emotions, making it difficult to respond to urgent requests or difficult situations. Furthermore, if the performance of the generated SQL query was not optimized, data extraction could take a long time.
[0833] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0834] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, and an emotion engine for recognizing the user's emotions and adjusting the priority of the extraction request. This enables automation of the extraction request and flexible response according to the user's emotions, making it possible to extract data efficiently and quickly.
[0835] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[0836] A "support department" is a department whose role is to support other departments, such as the sales department.
[0837] A "data warehouse" is a database system that aggregates and manages large amounts of data and is used for analysis and report creation.
[0838] An "extract request" is a request to retrieve specific data from the data warehouse.
[0839] An "artificial intelligence system" is a system that automatically performs specific tasks using technologies such as machine learning and natural language processing.
[0840] "SQL" is a standard programming language for manipulating and defining data in a database management system.
[0841] An "emotion engine" is a technology that recognizes the user's emotions and adjusts the system's operation based on that information.
[0842] "Priority" is an index that indicates the order of execution and importance of a task or process.
[0843] This invention is a system that automatically processes extraction requests from the sales department and efficiently extracts necessary data from a data warehouse. The system includes a means for generating extraction requests from the sales department, automatic generation of SQL by an artificial intelligence system, automatic execution of the generated SQL, and an emotion engine that recognizes the user's emotions and adjusts the priority of the extraction requests.
[0844] Hardware and Software Used
[0845] Terminal: The computer or mobile device through which the User enters the extraction request.
[0846] Server: A server that receives extraction requests and works with the AI system to generate and execute SQL queries.
[0847] Data warehouse: A database system that aggregates and manages data. An example is a cloud-based database service.
[0848] Artificial intelligence system: A system that uses natural language processing (NLP) technology to analyze extraction requests and generate optimal SQL queries.
[0849] Emotion engine: Technology to recognize user emotions and adjust the priority of extraction requests. For example, Microsoft Azure's Emotion API and Google Cloud's Natural Language API are used.
[0850] Specific operation of the system
[0851] 1. Enter your extraction request:
[0852] Using a web form or a dedicated application, users enter information such as the type of data they want and the time period they want -- for example, "Extract sales data from January to March 2023."
[0853] 2. Send your extraction request:
[0854] The terminal sends the extraction request entered by the user to the server, using the HTTPS protocol to transmit the data securely.
[0855] 3. Analysis of the extraction request:
[0856] The server passes the received extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the user's input. For example, the AI system analyzes the sentence "Please extract sales data from January to March 2023" entered by the user and identifies the type and period of data required.
[0857] 4. Generate SQL queries:
[0858] The AI system generates optimal SQL queries based on the analysis results. For example, it generates the SQL query "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'".
[0859] 5. Executing SQL queries:
[0860] The server automatically executes the generated SQL queries against a data warehouse, which may use, for example, a cloud-based database service.
[0861] 6. Data Extraction and Return:
[0862] The data warehouse extracts the required data based on the executed SQL query and sends it back to the server, which then transmits the extracted data to the user's terminal.
[0863] 7. Priority adjustment using emotion engine:
[0864] When a user inputs an extraction request, the emotion engine infers the user's emotions from the user's tone of voice, facial expression, choice of words in text input, etc. For example, if a user inputs "Please extract sales data quickly," the emotion engine determines that the user is in a hurry and sets the priority of the extraction request high.
[0865] Examples
[0866] Example 1: A sales representative extracts sales data
[0867] The user enters "Extract sales data from January to March 2023" into a web form. The device sends this information to the server, which passes it to the AI system. The AI system generates an SQL query: "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'". The server runs this query against the data warehouse and extracts the required data. The extracted data is sent back to the user's device via the server.
[0868] Example 2: When the user is in a hurry
[0869] When a user types "Please extract the sales data quickly," the emotion engine detects the user's sense of urgency. The emotion engine sets the priority of the extraction request high and quickly executes the SQL query generated by the AI system. The server prioritizes processing of high-priority queries and quickly returns the data extracted from the data warehouse to the user's device.
[0870] Examples of prompt statements
[0871] "Extract sales data from January to March 2023."
[0872] "Please extract the sales data quickly."
[0873] This system allows sales staff to quickly and efficiently extract the data they need. The introduction of an emotion engine enables flexible responses based on the user's emotions.
[0874] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0875] Step 1:
[0876] Using a web form or a dedicated application, users input information such as the type of data they need and the period of time. For example, they might input, "Please extract sales data from January to March 2023." The input information is then saved on the device as an extraction request.
[0877] Step 2:
[0878] The terminal sends the extraction request entered by the user to the server. At this time, the data is sent securely using the HTTPS protocol. The input is the extraction request information, and the output is a transmission completion notification to the server.
[0879] Step 3:
[0880] The server passes the received extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the user's input. For example, the AI system analyzes the sentence "Please extract sales data from January to March 2023" entered by the user, and identifies the type and period of data required. The input is the extraction request information, and the output is the analysis result.
[0881] Step 4:
[0882] The AI system generates an optimal SQL query based on the analysis results. For example, it generates the SQL query "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'". The input is the analysis result, and the output is the generated SQL query.
[0883] Step 5:
[0884] The server automatically executes the generated SQL query against a data warehouse, which may use a cloud-based database service, for example. The input is the generated SQL query, and the output is the execution result.
[0885] Step 6:
[0886] The data warehouse extracts the required data based on the executed SQL query and sends it back to the server. The server sends the extracted data to the user's terminal. The input is the execution result, and the output is the extracted data.
[0887] Step 7:
[0888] When a user inputs an extraction request, the emotion engine infers the user's emotions from the user's tone of voice, facial expression, choice of words in the text input, etc. For example, if a user inputs "Please extract the sales data quickly," the emotion engine determines that the user is in a hurry and sets the priority of the extraction request high. The input is the user's emotional information, and the output is the priority setting.
[0889] (Application example 1)
[0890] Next, a description will be given of Application Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal".
[0891] With conventional data extraction systems, it was difficult to respond quickly and accurately to data extraction requests from the sales department. In addition, because priority adjustment was not performed taking into account the user's feelings, there was a problem that it was not possible to respond appropriately to requests with high urgency. Furthermore, there was an issue that it was difficult to extract and analyze production data and inventory data from factories in real time, making it difficult to achieve efficient production management.
[0892] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0893] In this invention, the server includes a means for generating an extraction request from the data warehouse from the sales department to the support department, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for adjusting the priority of the extraction request according to the user's emotion, including an emotion engine for recognizing the user's emotion, and a means for extracting and analyzing production data and inventory data in the factory in real time. This makes it possible to quickly and accurately respond to data extraction requests from the sales department and to appropriately respond to requests with high urgency by adjusting the priority according to the user's emotion. In addition, efficient production management can be realized by extracting and analyzing production data and inventory data in the factory in real time.
[0894] A "sales department" is a department within a company or organization that sells products and services.
[0895] A "support department" is a department that performs tasks to support the sales department and other departments.
[0896] A "data warehouse" is a database system for centrally managing and storing large amounts of data collected by companies and organizations.
[0897] An "extract request" is a request to retrieve specific data from the data warehouse.
[0898] "SQL" is an abbreviation for Structured Query Language, and is a language for manipulating and searching data in a database.
[0899] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[0900] An "emotion engine" is a technology for inferring emotions from a user's tone of voice, facial expression, choice of words in text input, etc.
[0901] "Priority adjustment" refers to changing the order of processing or the priority order of tasks or requests depending on their importance or urgency.
[0902] "Production data" is data related to production activities in factories and manufacturing sites.
[0903] "Inventory data" is data regarding the quantity and condition of products or parts held by a company or organization.
[0904] "Real-time" means that data and information are processed and provided immediately.
[0905] A system for implementing this invention includes an AI system that generates extraction requests from a data warehouse from a sales department to a support department and generates SQL based on the extraction requests, a means for executing the generated SQL against the data warehouse, an emotion engine that recognizes user emotions, a means for adjusting the priority of extraction requests according to the user emotions, and a means for extracting and analyzing production data and inventory data within a factory in real time.
[0906] Hardware and Software Used
[0907] Hardware: Factory robots, data warehouse servers
[0908] Software: SQLite (database management system), emotion recognition library, SQL generation library
[0909] Data processing and calculation
[0910] The server first receives a data extraction request from the sales department. The request is entered through a form that includes information such as the type of data and the period. The AI system then analyzes this information and generates the optimal SQL query. The generated SQL query is automatically executed against the data warehouse to extract the required data.
[0911] In addition, the emotion engine estimates the user's emotions from the tone of their voice, facial expressions, and choice of words in text input. This emotion engine makes it possible to adjust the priority of extraction requests according to the user's emotions, such as when the user is in a hurry or in trouble.
[0912] Examples
[0913] For example, if a factory manager requests, "I want to get last week's production data," the server receives this request and the AI system generates the optimal SQL query. At the same time, the emotion engine determines the urgency from the manager's tone of voice and facial expression, and increases the priority if necessary. The generated SQL query is executed against the data warehouse, and last week's production data is extracted and analyzed in real time.
[0914] Examples of prompt statements
[0915] User input: I want to get last week's production data
[0916] User emotion: Tone of voice sounds tense, facial expression looks worried
[0917] By inputting this prompt sentence into the generative AI model, it is possible to create a system that can adjust the priority of data extraction according to the user's emotions and quickly provide the necessary data.
[0918] The flow of the specific process in the application example 1 will be described with reference to FIG.
[0919] Step 1:
[0920] The server receives a data extraction request from the sales department. The request is entered through a form that includes information such as the type of data, the period, etc. The entered information is sent to the server for processing in the next step.
[0921] Step 2:
[0922] The server passes the received extraction request information to the AI system. The AI system analyzes this information and generates the optimal SQL query. Specifically, it automatically creates an SQL statement to extract the required data based on the type of data and the period. The generated SQL query is output.
[0923] Step 3:
[0924] The server executes the generated SQL query against the data warehouse. The data warehouse extracts the required data based on the SQL query and returns the results to the server. The extracted data is output.
[0925] Step 4:
[0926] The server uses an emotion engine to recognize the user's emotion. The emotion is estimated from the user's tone of voice, facial expression, choice of words in text input, etc. The emotion engine calculates a priority according to the user's emotion and returns the result to the server. The priority is output.
[0927] Step 5:
[0928] The server adjusts the priority of the extraction request based on the priority information from the emotion engine. For example, if it is determined that the user is in a hurry, the server increases the priority of the extraction request. The adjusted priority is output.
[0929] Step 6:
[0930] The server extracts and analyzes production data and inventory data from the factory in real time. It uses the generated SQL queries to retrieve the necessary data from the data warehouse and analyzes the data in real time. The analysis results are output.
[0931] Step 7:
[0932] The server provides the analysis results to the user. The user can check the production data and inventory data extracted and analyzed in real time and take necessary measures. The provided data is output.
[0933] Example 2
[0934] Next, a description will be given of Example 2 of the embodiment 2. In the following description, the data processing device 12 is referred to as a "server" and the smart glasses 214 are referred to as a "terminal".
[0935] In conventional data extraction systems from data warehouses, SQL query generation and optimization are often done manually, which is inefficient. In addition, it is difficult to flexibly respond to user requests because data extraction cannot be done according to user emotions. For this reason, there is a demand for a system that automates SQL query generation and optimization and also realizes data extraction according to user emotions.
[0936] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0937] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, a means for analyzing the generated SQL query and optimizing an execution plan, and a means for adjusting the generated SQL query based on the user's emotions. This automates the generation and optimization of SQL queries, enabling flexible data extraction according to the user's emotions.
[0938] A "sales department" is a department within a company or organization responsible for selling products and services.
[0939] A "support department" is a department within a company or organization whose role is to support the sales department and other departments.
[0940] A "data warehouse" is a database system that allows companies and organizations to aggregate large amounts of data and use it for analysis and reporting.
[0941] An "extract request" is a request to retrieve specific data from the data warehouse.
[0942] "SQL" stands for Structured Query Language, a programming language used to manipulate and define data in a database management system.
[0943] An "artificial intelligence system" is a system that mimics human intelligence using technologies such as machine learning and natural language processing.
[0944] An "execution plan" is a diagram that describes the steps or methods that a database management system will use to execute a SQL query.
[0945] "Optimization" refers to making adjustments or improvements to maximize the performance of a system or process.
[0946] "User emotion" refers to the psychological reaction or state a user has to a particular situation or piece of information.
[0947] "Adaptation" refers to modifying a system or process to suit specific purposes or conditions.
[0948] This invention is a system that efficiently processes requests from the sales department to the support department for data extraction from a data warehouse, automates the generation and optimization of SQL queries, and provides a means for realizing data extraction according to the user's emotions.
[0949] System Configuration
[0950] The system consists of the following main components:
[0951] 1. A means of generating extraction requests from the sales department to the support department
[0952] A user uses a terminal to input a request for data extraction in natural language, for example a prompt such as "Show me all the recent sales data."
[0953] 2. Artificial intelligence system that generates SQL
[0954] The server analyzes the prompt received from the user and generates an appropriate SQL query using the generative AI model. For example, in response to the prompt "Show me all recent sales data," the server generates the SQL query SELECT FROM sales WHERE date >= '2023-01-01';.
[0955] 3. A means to execute the generated SQL against the data warehouse
[0956] The server sends the generated SQL query to the data warehouse and obtains the results of the query execution.
[0957] 4. A means to analyze the generated SQL queries and optimize the execution plan
[0958] The server analyzes the generated SQL query and optimizes the execution plan. Specifically, it optimizes the table join order and uses indexes. For example, for a query such as SELECT FROM sales WHERE date >= '2023-01-01';, it generates an optimized query such as SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;.
[0959] 5. A means to tailor generated SQL queries based on user sentiment
[0960] The server uses an emotion engine to analyze the user's emotions and adjusts the SQL query accordingly: if the user is angry, for example, it generates an SQL query to provide more detailed data, and if the user is happy, it generates a simple SQL query to provide summary information.
[0961] Examples
[0962] Here is a specific scenario:
[0963] Scenario 1: The user is angry
[0964] Input prompt text: The user requests, "Show me all my recent sales data."
[0965] Generated SQL query: SELECT FROM sales WHERE date >= '2023-01-01';
[0966] Optimized SQL query: SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;
[0967] Scenario 2: Happy User
[0968] Input prompt: The user requests, "What are my recent sales totals?"
[0969] Generated SQL query: SELECT SUM(amount) FROM sales WHERE date >= '2023-01-01';
[0970] Optimized SQL query: SELECT SUM(amount) FROM sales WHERE date >= '2023-01-01';
[0971] This system automates the generation and optimization of SQL queries, enabling flexible data extraction based on user sentiment.
[0972] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0973] Step 1:
[0974] The user enters a prompt sentence.
[0975] The user enters a data extraction request in natural language into an input field on the terminal, for example, "Show me all my recent sales data."
[0976] Input: A user's natural language request for data extraction.
[0977] Output: The prompt text typed into the terminal.
[0978] Step 2:
[0979] The terminal sends a prompt to the server.
[0980] The terminal sends the prompt text entered by the user to the server as an HTTP POST request.
[0981] Input: The prompt text typed into the terminal.
[0982] Output: The prompt text sent to the server.
[0983] Step 3:
[0984] The server parses the prompt and generates an SQL query.
[0985] The server inputs the received prompt sentence into the generative AI model and generates an appropriate SQL query. For example, in response to the prompt sentence "Show me all recent sales data," the server generates the SQL query SELECT FROM sales WHERE date >= '2023-01-01';.
[0986] Input: The prompt text sent to the server.
[0987] Output: The generated SQL query.
[0988] Step 4:
[0989] Optimize server-generated SQL queries.
[0990] The server analyzes the generated SQL query and optimizes the execution plan. Specifically, it optimizes the table join order and uses indexes. For example, for a query such as SELECT FROM sales WHERE date >= '2023-01-01';, it generates an optimized query such as SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;.
[0991] Input: The generated SQL query.
[0992] Output: The optimized SQL query.
[0993] Step 5:
[0994] The server sends the optimized SQL query to the database and retrieves the results.
[0995] The server sends the optimized SQL query to the database and gets the results of the query execution, which extracts data based on the query and returns it to the server.
[0996] Input: The optimized SQL query.
[0997] Output: The results of the query execution retrieved from the database.
[0998] Step 6:
[0999] The server transmits the obtained results to the terminal.
[1000] The server sends the results obtained from the database to the terminal as an HTTP response.
[1001] Input: The results of the query execution retrieved from the database.
[1002] Output: The results of the query sent to the terminal.
[1003] Step 7:
[1004] The terminal displays the results to the user.
[1005] The terminal displays the data received from the server to the user, for example, recent sales data in a table format.
[1006] Input: The result of the query sent by the server.
[1007] Output: The data displayed to the user.
[1008] (Application example 2)
[1009] Next, a description will be given of Application Example 2 of Form Example 2. In the following description, the data processing device 12 will be referred to as a "server", and the smart glasses 214 will be referred to as a "terminal".
[1010] Conventional data extraction systems from data warehouses do not extract data according to user sentiment, making it difficult to provide information that meets user needs. In addition, the performance of the generated SQL queries is not optimized, resulting in poor data extraction efficiency. This leads to issues such as a poor user experience and a deterioration in the performance of the entire system.
[1011] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1012] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, a means for analyzing user emotions, a means for adjusting the SQL query based on the user emotions, and a means for optimizing the performance of the generated SQL query. This enables optimal data extraction according to the user emotions, improves the efficiency of data extraction, and improves the quality of the user experience.
[1013] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[1014] A "support department" is a department within a company or organization that has the role of supporting the sales department and other departments.
[1015] A "data warehouse" is a database system that manages large amounts of data from companies and organizations in an integrated manner and uses it for analysis and reporting.
[1016] An "extract request" is a request to retrieve specific data from the data warehouse.
[1017] "SQL" stands for Structured Query Language, a standard programming language for manipulating and defining data in a database management system.
[1018] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[1019] "User emotion" refers to the feeling or mood state that a user has toward a particular situation or piece of information.
[1020] An "SQL query" is an SQL statement used to search for and manipulate data in a database.
[1021] "Optimizing performance" means making adjustments or improvements to a system or process to maximize its efficiency and speed.
[1022] The following system configuration is used as an embodiment of the present invention.
[1023] The server includes a means for generating requests for retrieval from the data warehouse from the sales department to the support department. Specifically, when a sales department representative needs specific data, he or she inputs the request into the system. This input is made through a user interface.
[1024] Next, the server includes an AI system that generates SQL based on the extraction request. The AI system uses a generative AI model to generate an optimal SQL query from the input extraction request. The generated SQL query is executed against the data warehouse.
[1025] Furthermore, the server includes a means for analyzing the user's emotions. The user's emotions are analyzed in real time using emotion recognition software installed in a device such as a smartphone, smart glasses, or a head-mounted display. The emotion recognition software analyzes data such as the user's facial expressions, voice, and heart rate to identify the user's emotional state.
[1026] The server has the means to adjust the SQL query based on the user's emotions: for example, if the user is stressed, it generates a detailed SQL query to provide relaxing content, whereas if the user is happy, it generates a simple SQL query to provide summary information.
[1027] The server also has the ability to optimize the performance of the generated SQL queries, such as optimizing the join order of tables and refining queries to take advantage of indexes, making data extraction from the data warehouse more efficient.
[1028] For example, if a user is wearing smart glasses and the emotion recognition software determines that the user is stressed, the server will generate SQL queries to provide relaxing music or scenic videos and extract the relevant content from the data warehouse, whereas if the user is excited, it will generate SQL queries to provide action movie trailers or sports highlights.
[1029] An example of a prompt is as follows:
[1030] "Build your application to provide the best content based on the user's emotions. Provide detailed content when the user is angry and summary information when the user is happy. Also, optimize your SQL queries."
[1031] In this way, optimal data extraction according to the user's emotions becomes possible, improving the efficiency of data extraction and the quality of the user experience.
[1032] The flow of the specific process in the application example 2 will be described with reference to FIG.
[1033] Step 1:
[1034] A sales department staff member uses a terminal to input a data extraction request.
[1035] Input: The data requirements for sales personnel (e.g. sales data for a specific period)
[1036] Output: A data extraction request is sent to the system
[1037] Specific operations: Through the terminal's user interface, the person in charge enters the required data conditions and presses the send button.
[1038] Step 2:
[1039] The server receives the data extraction request and the AI system generates an SQL query.
[1040] Input: Data extraction request
[1041] Output: Generated SQL query
[1042] Specific operation: The server analyzes the data extraction request and generates the optimal SQL query using a generative AI model.
[1043] Step 3:
[1044] The device analyzes the user's emotions in real time.
[1045] Input: Emotional data such as user facial expressions, voice, and heart rate
[1046] Output: Analyzed user's emotional state (e.g. stress, satisfaction)
[1047] Specific operation: Emotion recognition software installed on the device collects and analyzes the user's emotional data.
[1048] Step 4:
[1049] The server adjusts the SQL query based on the user's sentiment.
[1050] Input: Generated SQL queries, parsed user emotional state
[1051] Output: Adjusted SQL query
[1052] Specific behavior: The server adjusts the generated SQL query based on the analyzed emotional state, changing it to a query that provides more detailed data or summary information.
[1053] Step 5:
[1054] Server tuned to optimize performance of SQL queries.
[1055] Input: Adjusted SQL query
[1056] Output: Optimized SQL query
[1057] What happens: The server will optimize the join order of tables and refine the query to take advantage of indexes.
[1058] Step 6:
[1059] The server executes the optimized SQL queries against the data warehouse.
[1060] Input: Optimized SQL query
[1061] Output: Data extracted from the data warehouse
[1062] What happens next: The server sends optimized SQL queries to the data warehouse to extract the required data.
[1063] Step 7:
[1064] The server transmits the extracted data to the terminal and displays it to the user.
[1065] Input: Data extracted from the data warehouse
[1066] Output: Data displayed to the user
[1067] Specific operation: The server sends the extracted data to the terminal and displays it to the user through the terminal's user interface.
[1068] In this way, optimal data extraction according to the user's emotions becomes possible, improving the efficiency of data extraction and the quality of the user experience.
[1069] 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 a voice indicating a user input for the result of the specific processing. The control unit 46A transmits the voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.
[1070] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet search<URL: https: / / openai.com / blog / chatgpt> ) and other generation AIs. The data generation model 58 is obtained by making a neural network perform deep learning. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating a voice, text data indicating a text, and image data indicating an image is input. The data generation model 58 performs inference on the input inference data according to the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1071] Another example of generative AI is Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) are mentioned.
[1072] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.
[1073] [Third embodiment]
[1074] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[1075] 5, the data processing system 310 includes the data processing device 12 and a headset type terminal 314. An example of the data processing device 12 is a server.
[1076] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a wide area network (WAN) and / or a local area network (LAN).
[1077] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.
[1078] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs the voice according to instructions from the processor 46.
[1079] Camera 42 is a small digital camera equipped with an optical system including a lens, an aperture, and a shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (e.g., an imaging range defined by an angle of view equivalent to the width of the field of vision of an average healthy person).
[1080] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for transmitting and receiving various types of information between the processor 46 and the processor 28 via the network 54. The transmission and reception of various types of information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is performed in a secure state.
[1081] Fig. 6 shows an example of main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[1082] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32, and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[1083] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1084] In the headset type terminal 314, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50, and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[1085] Next, the specific processing by the specific processing unit 290 of the data processing device 12 will be described.
[1086] "Example 1"
[1087] The present invention is directed to a system including a means for automatically generating an extraction request from a sales department, automatic generation of SQL by an AI system, and automatic execution of the generated SQL. Specifically, an extraction request from a sales department is input through a form including information such as the type and period of data required by the sales department. This information is sent to the system, and the AI system analyzes it. The AI system generates an optimal SQL query based on the content of the extraction request. The generated SQL query is automatically executed against a data warehouse to extract the required data.
[1088] "Example 2"
[1089] In another aspect of the present invention, the AI system optimizes the performance of the generated SQL queries. Specifically, the AI system analyzes the generated SQL queries and optimizes the execution plan of the queries, for example optimizing the join order of tables and refining the queries to take advantage of indexes, which results in more efficient data extraction from the data warehouse.
[1090] The process flow of each embodiment will be described below.
[1091] "Example 1"
[1092] Step 1: An extraction request from the sales department is entered through a form containing information such as the type of data the sales department requires and the period of time.
[1093] Step 2: This information is sent to the system, where the AI system analyzes it.
[1094] Step 3: The AI system generates the optimal SQL query based on the content of the extraction request.
[1095] Step 4: The generated SQL queries are automatically executed against the data warehouse to extract the required data.
[1096] "Example 2"
[1097] Step 1: The AI system analyzes the generated SQL query.
[1098] Step 2: The AI system optimizes the query execution plan, for example by optimizing the join order of tables and refining the query to take advantage of indexes.
[1099] Step 3: This makes data extraction from the data warehouse more efficient.
[1100] Example 1
[1101] Next, a description will be given of Example 1 of the embodiment 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal".
[1102] Conventional data extraction systems had the problem that extraction requests from the sales department had to be processed manually, which was time-consuming and labor-intensive. In addition, specialized knowledge was required to generate and execute SQL queries, making it difficult for non-experts to easily extract data. Furthermore, if the performance of the generated SQL queries was not optimized, data extraction could take a long time.
[1103] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1104] In this invention, the server includes a means for generating an extraction request from the database from the sales department to the support department, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the database, a means for providing a user interface for inputting the extraction request, a means for using natural language processing technology for analyzing the extraction request, a means for automatically executing the generated SQL query against the database, and a means for providing the extracted data to the user. This makes it possible to automatically process the extraction request from the sales department and to easily extract data even by non-experts. In addition, the performance of the generated SQL query is optimized, improving the efficiency of data extraction.
[1105] A "sales department" is a department within a company or organization responsible for selling products and services.
[1106] A "support department" is a department whose role is to support other departments, such as the sales department.
[1107] A "database" is a system for efficiently storing, managing, and searching data.
[1108] An "extraction request" is a request to retrieve specific data from a database.
[1109] An "artificial intelligence system" is a system that automatically performs tasks using technologies such as machine learning and natural language processing.
[1110] "SQL" is a standard query language for manipulating and searching data in a database.
[1111] A "user interface" is an interface through which a user interacts with a system.
[1112] "Natural language processing technology" is a technology that enables computers to understand, interpret, and generate human language.
[1113] An "SQL query" is a command statement for searching, inserting, updating, or deleting specific data from a database.
[1114] "Performance" refers to the efficiency or speed of a system or query.
[1115] The present invention is a system for automatically processing extraction requests from a sales department and efficiently extracting necessary data from a database. A specific embodiment of this system will be described below.
[1116] System Configuration
[1117] Hardware
[1118] Server: Hosts the Database Management System (DBMS) and generates and executes SQL queries.
[1119] Terminal: The computer or mobile device through which the User enters the extraction request.
[1120] Database: A system for storing data, such as a cloud-based database service.
[1121] software
[1122] User Interface: A web form built using HTML and JavaScript that provides the interface for users to enter extraction requests.
[1123] Artificial Intelligence System: Implemented in Python, it uses a generative AI model (e.g. GPT-4) to generate SQL queries.
[1124] Natural Language Processing techniques are used to analyze the extraction request, for example using an NLP library (e.g. spaCy).
[1125] System Operation
[1126] Input extraction request
[1127] The user enters information such as the type of data required and the period of time into a dedicated form on a web browser. This form is built using HTML and JavaScript. For example, the user enters the following information:
[1128] Data type: Sales data
[1129] Period: January 1, 2023 to March 31, 2023
[1130] Sending an Extraction Request
[1131] The terminal sends the extraction request information entered by the user to the server using the HTTPS protocol, with the data encoded in JSON format.
[1132] Receiving and parsing extraction requests
[1133] The server parses the received JSON data and passes the contents of the extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the extraction request. For example, it generates a prompt sentence like the following:
[1134] "Generate a SQL query to extract sales data from January 1, 2023 to March 31, 2023."
[1135] Generate SQL queries
[1136] The AI system uses a generative AI model (e.g. GPT-4) to generate optimal SQL queries, such as the following:
[1137] sql
[1138] SELECT FROM sales WHERE sale_date BETWEEN '2023-01-01' AND '2023-03-31';
[1139] Executing SQL Queries
[1140] The server automatically executes the generated SQL queries against a database (we use a cloud-based database service) using Python libraries (e.g. psycopg2).
[1141] Data extraction and provision
[1142] The server receives the extracted data from the database and provides it to the user. The extracted data is exported in CSV format and a download link is generated for the user to click on to download the data.
[1143] In this way, extraction requests from the sales department can be processed automatically, making it easy for non-experts to extract data. In addition, the performance of the generated SQL queries is optimized, improving the efficiency of data extraction.
[1144] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1145] Step 1:
[1146] The user inputs information such as the type of data required and the period into a dedicated form on a web browser. The input information is the type of data (e.g., sales data) and the period (e.g., from January 1, 2023 to March 31, 2023). This completes the input of the extraction request.
[1147] Step 2:
[1148] The terminal converts the information of the extraction request entered by the user into JSON format and sends it to the server using the HTTPS protocol. The input is the type and period of data entered by the user, and the output is data in JSON format. This sends the extraction request to the server.
[1149] Step 3:
[1150] The server analyzes the received JSON data and passes the contents of the extraction request to the AI system. The input is the JSON data sent from the terminal, and the output is the analyzed contents of the extraction request. This completes the analysis of the extraction request.
[1151] Step 4:
[1152] The AI system in the server uses natural language processing technology to analyze the extraction request and generate a prompt sentence. The input is the content of the analyzed extraction request, and the output is the generated prompt sentence. For example, a prompt sentence may be generated that reads, "Please generate an SQL query to extract sales data from January 1, 2023 to March 31, 2023."
[1153] Step 5:
[1154] The AI system uses a generative AI model (e.g., GPT-4) to generate an optimal SQL query based on the prompt sentence. The input is the generated prompt sentence, and the output is the generated SQL query. For example, the SQL query "SELECT FROM sales WHERE sale_date BETWEEN '2023-01-01' AND '2023-03-31';" is generated.
[1155] Step 6:
[1156] The server automatically executes the generated SQL query against the database. The input is the generated SQL query, and the output is the data extracted from the database. The database uses a cloud-based database service. This completes the execution of the SQL query.
[1157] Step 7:
[1158] The server receives the data extracted from the database and converts it into CSV format. The input is the data extracted from the database, and the output is data in CSV format. This completes the data format conversion.
[1159] Step 8:
[1160] The server generates a link to provide the user with CSV format data and notifies the user. The input is the CSV format data, and the output is a download link. The user can click this link to download the data. This completes the data provision.
[1161] (Application example 1)
[1162] Next, a description will be given of Application Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server", and the headset type terminal 314 will be referred to as a "terminal".
[1163] Traditional inventory management at logistics centers requires manual data extraction and analysis, which is time-consuming and labor-intensive. In addition, data extraction requires manual SQL queries, which requires specialized knowledge, making efficient inventory management difficult.
[1164] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means. In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for a staff member to input the necessary inventory information in an inventory management application in the logistics center, a means for generating an optimal SQL query based on the input information and extracting the necessary data from the data warehouse, and a means for displaying the extracted data. This makes inventory management in the logistics center more efficient, and makes it possible to easily extract and display the necessary data even without specialized knowledge.
[1165] A "sales department" is a department within a company or organization that sells products and services.
[1166] A "support department" is a department whose role is to support other departments, such as the sales department.
[1167] A "data warehouse" is a database system that centrally manages large amounts of data from a company or organization and uses it for analysis and reporting.
[1168] An "extract request" is a request to retrieve specific data from the data warehouse.
[1169] An "AI system" is a system that uses artificial intelligence technology to automate certain tasks.
[1170] "SQL" is a standard programming language for manipulating and querying data from database management systems.
[1171] A "logistics center" is a facility that handles logistics operations such as the storage, management, and delivery of goods.
[1172] An "inventory management application" is software for managing inventory status and providing necessary information.
[1173] "Staff" refers to employees or personnel working for a company or organization.
[1174] "Inventory information" is data regarding the quantity and condition of products at a logistics center.
[1175] An "SQL query" is a command statement for retrieving specific data from a database.
[1176] "Data extraction" is the process of retrieving the required data from a data warehouse.
[1177] A "display means" is a method or device for visually presenting the extracted data to a user.
[1178] As an embodiment of the present invention, an inventory management application in a logistics center will be described as an example.
[1179] The server has a means to generate requests for retrieval from the data warehouse from the sales department to the support department. This allows sales department staff to input the necessary inventory information. The input information is sent to the server, where the AI system analyzes it.
[1180] The AI system uses a generative AI model to generate optimal SQL queries based on the input information. These SQL queries are then automatically executed against the data warehouse. Data extracted from the data warehouse is displayed on staff terminals via the server.
[1181] Specifically, staff at the distribution center access the inventory management application using a smartphone or tablet. Staff enter the necessary inventory information (e.g., the number of items in stock for a particular product category or data on incoming and outgoing goods for a particular period) through the application's interface. This information is sent to the server as a prompt text like the following:
[1182] Example prompt:
[1183] Data Type: Inventory
[1184] Period: Last month
[1185] Category: Electronics
[1186] The server receives the prompt sentence and sends it to the AI system, which uses the generative AI model to generate the optimal SQL query based on the prompt sentence, which is then executed against the data warehouse to extract the required data.
[1187] The extracted data is then displayed on the staff's terminals via the server, allowing staff at the distribution center to easily extract and display the inventory data they need, even if they do not have specialized knowledge.
[1188] The following hardware and software are used to realize this system:
[1189] Server: Communicates with the data warehouse and runs the AI system.
[1190] Data Warehouse: Centrally manages large amounts of data and provides the data based on SQL queries.
[1191] AI system: Uses a generative AI model to generate SQL queries based on prompt statements.
[1192] Smartphones and tablets: Devices that allow staff to access the inventory management application and enter the necessary information.
[1193] In this way, inventory management at logistics centers is made more efficient, and necessary data can be easily extracted and displayed even without specialized knowledge.
[1194] The flow of the specific process in the application example 1 will be described with reference to FIG.
[1195] Step 1:
[1196] A user accesses an inventory management application on a smartphone or tablet and inputs the necessary inventory information. The input information includes data type (inventory), period (last month), product category (electronic devices), etc. This input data is structured as a prompt sentence.
[1197] Step 2:
[1198] The terminal sends the input prompt to the server. The server receives the prompt and prepares it to send to the AI system. The input data is converted to an appropriate data format, such as JSON format.
[1199] Step 3:
[1200] The server sends the prompt sentence to the AI system, which uses the generative AI model to generate an optimal SQL query based on the prompt sentence. Specifically, the generative AI model parses the prompt sentence and constructs a SQL query to retrieve the required data.
[1201] Step 4:
[1202] The AI system generates a SQL query and sends it back to the server, which receives it and prepares it to run against the data warehouse, translating the SQL query into a format the data warehouse can understand.
[1203] Step 5:
[1204] The server executes the generated SQL query to the data warehouse. The data warehouse extracts the required data based on the SQL query. Specifically, the data warehouse analyzes the SQL query, searches for and extracts the relevant data.
[1205] Step 6:
[1206] The data warehouse sends the extracted data back to the server, which receives it and prepares it for transmission to the user's terminal. The extracted data is converted into a format that is easy for the user to understand.
[1207] Step 7:
[1208] The server transmits the extracted data to the user's terminal. The terminal receives the data and displays it on the interface of the inventory management application. The user can check the displayed data and use it for inventory management.
[1209] In this way, inventory management at logistics centers is made more efficient, and necessary data can be easily extracted and displayed even without specialized knowledge.
[1210] Example 2
[1211] Next, a second embodiment of the second form will be described. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal".
[1212] In conventional data extraction systems from data warehouses, SQL queries were often generated and optimized manually, resulting in poor efficiency. In addition, the performance of the generated SQL queries was not optimized, which could result in slow data extraction times. This made it difficult for sales and support departments to quickly obtain the data they needed.
[1213] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[1214] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating an SQL query based on the extraction request, a means for analyzing the generated SQL query, generating and optimizing an execution plan, a means for executing the optimized SQL query on the data warehouse, and a means for returning the execution result to the user. This automates the generation and optimization of SQL queries, improves the efficiency of data extraction, and enables the sales department and support department to quickly obtain the data they need.
[1215] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[1216] A "support department" is a department within a company or organization that has the role of supporting the sales department and other business departments.
[1217] A "data warehouse" is a database system that allows companies and organizations to aggregate large amounts of data and use it for analysis and reporting.
[1218] An "extract request" is a request to retrieve specific data from the data warehouse.
[1219] "SQL query" means instructions written in Structured Query Language (SQL) used to retrieve, insert, update, and delete data from a database.
[1220] An "artificial intelligence system" is a system that mimics human intelligence using technologies such as machine learning and natural language processing.
[1221] "Analysis" is the process of examining data or information in detail to understand its structure and meaning.
[1222] An "execution plan" is a plan that describes the specific steps that a database management system takes to execute a SQL query.
[1223] "Optimization" refers to making adjustments or improvements to maximize the performance of a system or process.
[1224] "Execution results" refers to the data or information obtained by executing a SQL query.
[1225] "User" means an individual or organization that uses the system or service.
[1226] This invention is a system for improving the efficiency of data extraction from a data warehouse. The system includes an artificial intelligence system that generates an extraction request from a sales department to a support department and generates an SQL query based on the request. The system further includes a means for analyzing the generated SQL query and generating and optimizing an execution plan. The optimized SQL query is executed against the data warehouse, and the execution result is returned to the user.
[1227] Hardware and Software Used
[1228] The server is equipped with a powerful processor and a large amount of memory (e.g., 64GB RAM). In addition, MySQL or PostgreSQL is used as the database management system (DBMS). The artificial intelligence system generates and optimizes SQL queries using machine learning models and natural language processing techniques.
[1229] Program processing explanation
[1230] The server receives the SQL query submitted by the user and parses it using an SQL parser to check the syntax of the query. The server then generates an execution plan based on the parsed SQL query. An execution plan is a set of detailed instructions on how to execute the query.
[1231] The server optimizes the generated execution plan by optimizing the join order of tables and improving the query to take advantage of indexes, which makes the query run faster and allows data to be retrieved much faster.
[1232] The optimized SQL queries are then executed against the data warehouse, and the server returns the results to the user, who can view them through a terminal interface.
[1233] Examples and prompts
[1234] For example, if a user enters the following SQL query:
[1235] sql
[1236] SELECT FROM orders
[1237] JOIN customers ON orders.customer_id = customers.id
[1238] WHERE orders.order_date > '2023-01-01';
[1239] The server receives this query and performs analysis. As a result of the analysis, the server generates an execution plan for the query and optimizes it as follows:
[1240] Optimize the join order of tables to perform the joins in the most efficient order.
[1241] If an index exists on orders.order_date, refine the query to take advantage of the index.
[1242] The optimized query looks like this:
[1243] sql
[1244] SELECT FROM customers
[1245] JOIN orders ON customers.id = orders.customer_id
[1246] WHERE orders.order_date > '2023-01-01';
[1247] Example of a prompt to be input to a generative AI model:
[1248] "Optimize the performance of the following SQL queries:
[1249] SELECT FROM orders
[1250] JOIN customers ON orders.customer_id = customers.id
[1251] WHERE orders.order_date > '2023-01-01';''
[1252] Using this prompt, the generative AI model optimizes the SQL query to achieve efficient data extraction.
[1253] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1254] Step 1:
[1255] The user enters an SQL query.
[1256] A user enters an SQL query through a terminal interface, for example a query like this:
[1257] sql
[1258] SELECT FROM orders
[1259] JOIN customers ON orders.customer_id = customers.id
[1260] WHERE orders.order_date > '2023-01-01';
[1261] Input: The SQL query entered by the user.
[1262] Output: SQL query sent from terminal to server
[1263] Step 2:
[1264] The server receives the input SQL query.
[1265] The server receives the SQL query sent by the user and temporarily stores it in memory.
[1266] Input: SQL query sent from the terminal
[1267] Output: SQL query stored in server memory
[1268] Step 3:
[1269] The server parses the SQL query.
[1270] The server uses an SQL parser to parse the received SQL query, and during the parsing process it checks the syntax of the query for any syntax errors.
[1271] Input: SQL query stored in the server's memory
[1272] Output: Syntax information of the parsed SQL query.
[1273] Step 4:
[1274] The server generates an execution plan for the query.
[1275] Based on the parsed SQL query, the server generates an execution plan, which is a set of detailed instructions on how to execute the query.
[1276] Input: Syntax information of the parsed SQL query
[1277] Output: Generated execution plan
[1278] Step 5:
[1279] The server optimizes the execution plan.
[1280] The server optimizes the generated execution plan. Specifically, it optimizes the following:
[1281] Optimized table join order: The server optimizes the order in which tables are joined in a query, which can improve the execution speed of the query.
[1282] Use indexes: The server refines queries to take advantage of indexes, which can greatly speed up retrieval of data.
[1283] Input: Generated execution plan
[1284] Output: Optimized execution plan
[1285] Step 6:
[1286] The server generates an optimized SQL query.
[1287] The server generates a new SQL query based on the optimized execution plan, for example optimized to:
[1288] sql
[1289] SELECT FROM customers
[1290] JOIN orders ON customers.id = orders.customer_id
[1291] WHERE orders.order_date > '2023-01-01';
[1292] Input: Optimized execution plan
[1293] Output: Optimized SQL query
[1294] Step 7:
[1295] The server executes the optimized SQL query.
[1296] The server executes optimized SQL queries against a data warehouse using a database management system (DBMS), for example MySQL or PostgreSQL.
[1297] Input: Optimized SQL query
[1298] Output: Results of executing the SQL query
[1299] Step 8:
[1300] The server returns the execution result to the user.
[1301] The server executes the SQL query and returns the results to the user, who displays the results through the terminal interface.
[1302] Input: Result of executing a SQL query
[1303] Output: The execution result displayed on the user's terminal.
[1304] (Application example 2)
[1305] Next, a description will be given of Application Example 2 of Form Example 2. In the following description, the data processing device 12 will be referred to as a "server", and the headset type terminal 314 will be referred to as a "terminal".
[1306] In conventional data extraction systems from data warehouses, SQL queries are often generated and optimized manually, which is inefficient. In addition, real-time data extraction is required for inventory management and shipping plan optimization at logistics centers, but current systems have difficulty in meeting this requirement. This leads to issues such as reduced accuracy of inventory management and shipping plans, and worsening business efficiency.
[1307] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1308] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for extracting data for optimizing inventory management and shipping plans in the logistics center, a means for optimizing the SQL query generated by the AI system, and a means including an application installed on a smartphone. This improves the efficiency of data extraction, and enables real-time optimization of inventory management and shipping plans in the logistics center.
[1309] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[1310] A "support department" is a department within a company or organization that has the role of supporting the sales department and other business departments.
[1311] A "data warehouse" is a database system that enables companies and organizations to manage and analyze large amounts of data in an integrated manner.
[1312] An "extract request" is a request to retrieve specific data from the data warehouse.
[1313] "SQL" stands for Structured Query Language, a programming language used to manipulate and define data in a database management system.
[1314] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[1315] A "logistics center" is a facility that handles logistics operations such as the storage, management, and shipping of goods.
[1316] "Inventory management" is the task of understanding the inventory status of products and managing them appropriately.
[1317] A "shipment plan" is a plan for creating a product shipping schedule and carrying out efficient shipping.
[1318] A "smartphone" is a highly functional mobile phone that can connect to the Internet and use applications.
[1319] An "application" is a software program designed to provide a specific function or service.
[1320] "Optimization" means making something the most efficient for a particular purpose.
[1321] As an embodiment of the present invention, a system for optimizing inventory management and shipping plans in a logistics center will be described. This system includes an AI system that generates an extraction request from a data warehouse from a sales department to a support department and generates SQL based on the extraction request. The system also executes the generated SQL against the data warehouse to extract data for optimizing inventory management and shipping plans in the logistics center. The system also includes an application that optimizes the SQL query generated by the AI system and is installed on a smartphone.
[1322] The server receives extraction requests from the sales department, and the AI system generates optimal SQL queries based on those requests. The generated SQL queries are executed against the data warehouse to extract the required data. The AI system optimizes the performance of the generated SQL queries to improve the efficiency of data extraction. Specifically, it optimizes the table join order and improves the queries to utilize indexes.
[1323] The terminal (smartphone) runs an application for optimizing inventory management and shipping plans in real time at the logistics center. This application receives optimized data sent from the server and displays the inventory status and shipping plans. This allows the user to efficiently manage inventory and make shipping plans.
[1324] The hardware used is the server hosting the data warehouse and / or a smartphone. The software uses Python, SQLite, and the sqlparse library. The AI system generates and optimizes SQL queries using a generative AI model.
[1325] As a concrete example, consider a scenario used in an inventory management system at a logistics center. Assume that a user uses a smartphone application to optimize an SQL query to retrieve products with stock levels greater than or equal to 0 and sort them by product ID. In this case, an example of a prompt sentence to be input to the generative AI model is as follows:
[1326] "Please optimize the SQL query in the inventory management system of the distribution center to get products with stock greater than or equal to 0 and sort them by product ID."
[1327] By inputting this prompt sentence into a generative AI model, an optimized SQL query can be generated, improving the efficiency of data extraction.
[1328] The flow of the specific process in the application example 2 will be described with reference to FIG.
[1329] Step 1:
[1330] The server receives an extraction request from the sales department to the support department from the data warehouse. This extraction request includes the type of data required and conditions. The input is the content of the extraction request, and the output is a prompt statement for generating an SQL query based on the content.
[1331] Step 2:
[1332] The server inputs a prompt sentence to the generative AI model based on the received extraction request. The prompt sentence specifically describes the content of the extraction request. The input is the prompt sentence, and the output is the SQL query generated by the generative AI model.
[1333] Step 3:
[1334] The server receives the SQL query output from the generative AI model and optimizes the query. Specifically, it optimizes the join order of tables and improves the query to make use of indexes. The input is the generated SQL query, and the output is the optimized SQL query.
[1335] Step 4:
[1336] The server runs the optimized SQL queries against the data warehouse to extract the required data. The input is the optimized SQL queries and the output is the extracted data.
[1337] Step 5:
[1338] The server sends the extracted data to the terminal (smartphone). The input is the extracted data, and the output is the data sent to the terminal.
[1339] Step 6:
[1340] The terminal displays the received data through the application. The user performs inventory management and shipping planning based on the displayed data. The input is the data sent from the server, and the output is the data displayed to the user.
[1341] Step 7:
[1342] Users use the application to perform operations to optimize inventory management and shipping plans, thereby improving the operational efficiency of the distribution center. The input is the data displayed through the application, and the output is optimized inventory management and shipping plans.
[1343] In addition, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1344] "Example 1"
[1345] In one embodiment of the present invention, the AI system includes an emotion engine that recognizes the user's emotions. The emotion engine infers the user's emotions from, for example, the user's tone of voice, facial expression, and choice of words in text input. This emotion engine makes it possible to adjust the priority of extraction requests according to the user's emotions, such as when the user is in a hurry or in a difficult situation.
[1346] "Example 2"
[1347] The emotion engine can also adjust the SQL queries it generates based on the user's emotions. For example, when the user is angry, it generates SQL queries to provide more detailed data. On the other hand, when the user is happy, it generates simple SQL queries to provide summary information. This allows optimal data extraction according to the user's emotions.
[1348] The process flow of each embodiment will be described below.
[1349] "Example 1"
[1350] Step 1: Receive an extraction request from a user.
[1351] Step 2: The emotion engine infers the user's emotions from the user's tone of voice, facial expressions, choice of words in text input, etc.
[1352] Step 3: Adjust the priority of extraction requests according to the user's emotions estimated by the emotion engine.
[1353] Step 4: Process the extraction request based on the adjusted priority.
[1354] "Example 2"
[1355] Step 1: Receive an extraction request from a user.
[1356] Step 2: The emotion engine estimates the user's emotion.
[1357] Step 3: The generated SQL query is adjusted according to the user's emotion estimated by the emotion engine.
[1358] Step 4: Generate tailored SQL queries to perform data extraction.
[1359] Example 1
[1360] Next, a description will be given of Example 1 of the embodiment 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal".
[1361] In the conventional data extraction system, extraction requests from the sales department had to be processed manually, which was time-consuming and labor-intensive. In addition, it was not possible to respond flexibly to user emotions, making it difficult to respond to urgent requests or difficult situations. Furthermore, if the performance of the generated SQL query was not optimized, data extraction could take a long time.
[1362] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1363] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, and an emotion engine for recognizing the user's emotions and adjusting the priority of the extraction request. This enables automation of the extraction request and flexible response according to the user's emotions, making it possible to extract data efficiently and quickly.
[1364] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[1365] A "support department" is a department whose role is to support other departments, such as the sales department.
[1366] A "data warehouse" is a database system that aggregates and manages large amounts of data and is used for analysis and report creation.
[1367] An "extract request" is a request to retrieve specific data from the data warehouse.
[1368] An "artificial intelligence system" is a system that automatically performs specific tasks using technologies such as machine learning and natural language processing.
[1369] "SQL" is a standard programming language for manipulating and defining data in a database management system.
[1370] An "emotion engine" is a technology that recognizes the user's emotions and adjusts the system's operation based on that information.
[1371] "Priority" is an index that indicates the order of execution and importance of a task or process.
[1372] This invention is a system that automatically processes extraction requests from the sales department and efficiently extracts necessary data from a data warehouse. The system includes a means for generating extraction requests from the sales department, automatic generation of SQL by an artificial intelligence system, automatic execution of the generated SQL, and an emotion engine that recognizes the user's emotions and adjusts the priority of the extraction requests.
[1373] Hardware and Software Used
[1374] Terminal: The computer or mobile device through which the User enters the extraction request.
[1375] Server: A server that receives extraction requests and works with the AI system to generate and execute SQL queries.
[1376] Data warehouse: A database system that aggregates and manages data. An example is a cloud-based database service.
[1377] Artificial intelligence system: A system that uses natural language processing (NLP) technology to analyze extraction requests and generate optimal SQL queries.
[1378] Emotion engine: Technology to recognize user emotions and adjust the priority of extraction requests. For example, Microsoft Azure's Emotion API and Google Cloud's Natural Language API are used.
[1379] Specific operation of the system
[1380] 1. Enter your extraction request:
[1381] Using a web form or a dedicated application, users enter information such as the type of data they want and the time period they want -- for example, "Extract sales data from January to March 2023."
[1382] 2. Send your extraction request:
[1383] The terminal sends the extraction request entered by the user to the server, using the HTTPS protocol to transmit the data securely.
[1384] 3. Analysis of the extraction request:
[1385] The server passes the received extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the user's input. For example, the AI system analyzes the sentence "Please extract sales data from January to March 2023" entered by the user and identifies the type and period of data required.
[1386] 4. Generate SQL queries:
[1387] The AI system generates optimal SQL queries based on the analysis results. For example, it generates the SQL query "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'".
[1388] 5. Executing SQL queries:
[1389] The server automatically executes the generated SQL queries against a data warehouse, which may use, for example, a cloud-based database service.
[1390] 6. Data Extraction and Return:
[1391] The data warehouse extracts the required data based on the executed SQL query and sends it back to the server, which then transmits the extracted data to the user's terminal.
[1392] 7. Priority adjustment using emotion engine:
[1393] When a user inputs an extraction request, the emotion engine infers the user's emotions from the user's tone of voice, facial expression, choice of words in text input, etc. For example, if a user inputs "Please extract sales data quickly," the emotion engine determines that the user is in a hurry and sets the priority of the extraction request high.
[1394] Examples
[1395] Example 1: A sales representative extracts sales data
[1396] The user enters "Extract sales data from January to March 2023" into a web form. The device sends this information to the server, which passes it to the AI system. The AI system generates an SQL query: "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'". The server runs this query against the data warehouse and extracts the required data. The extracted data is sent back to the user's device via the server.
[1397] Example 2: When the user is in a hurry
[1398] When a user types "Please extract the sales data quickly," the emotion engine detects the user's sense of urgency. The emotion engine sets the priority of the extraction request high and quickly executes the SQL query generated by the AI system. The server prioritizes processing of high-priority queries and quickly returns the data extracted from the data warehouse to the user's device.
[1399] Examples of prompt statements
[1400] "Extract sales data from January to March 2023."
[1401] "Please extract the sales data quickly."
[1402] This system allows sales staff to quickly and efficiently extract the data they need. The introduction of an emotion engine enables flexible responses based on the user's emotions.
[1403] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1404] Step 1:
[1405] Using a web form or a dedicated application, users input information such as the type of data they need and the period of time. For example, they might input, "Please extract sales data from January to March 2023." The input information is then saved on the device as an extraction request.
[1406] Step 2:
[1407] The terminal sends the extraction request entered by the user to the server. At this time, the data is sent securely using the HTTPS protocol. The input is the extraction request information, and the output is a transmission completion notification to the server.
[1408] Step 3:
[1409] The server passes the received extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the user's input. For example, the AI system analyzes the sentence "Please extract sales data from January to March 2023" entered by the user, and identifies the type and period of data required. The input is the extraction request information, and the output is the analysis result.
[1410] Step 4:
[1411] The AI system generates an optimal SQL query based on the analysis results. For example, it generates the SQL query "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'". The input is the analysis result, and the output is the generated SQL query.
[1412] Step 5:
[1413] The server automatically executes the generated SQL query against a data warehouse, which may use a cloud-based database service, for example. The input is the generated SQL query, and the output is the execution result.
[1414] Step 6:
[1415] The data warehouse extracts the required data based on the executed SQL query and sends it back to the server. The server sends the extracted data to the user's terminal. The input is the execution result, and the output is the extracted data.
[1416] Step 7:
[1417] When a user inputs an extraction request, the emotion engine infers the user's emotions from the user's tone of voice, facial expression, choice of words in the text input, etc. For example, if a user inputs "Please extract the sales data quickly," the emotion engine determines that the user is in a hurry and sets the priority of the extraction request high. The input is the user's emotional information, and the output is the priority setting.
[1418] (Application example 1)
[1419] Next, a description will be given of Application Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server", and the headset type terminal 314 will be referred to as a "terminal".
[1420] With conventional data extraction systems, it was difficult to respond quickly and accurately to data extraction requests from the sales department. In addition, because priority adjustment was not performed taking into account the user's feelings, there was a problem that it was not possible to respond appropriately to requests with high urgency. Furthermore, there was an issue that it was difficult to extract and analyze production data and inventory data from factories in real time, making it difficult to achieve efficient production management.
[1421] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1422] In this invention, the server includes a means for generating an extraction request from the data warehouse from the sales department to the support department, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for adjusting the priority of the extraction request according to the user's emotion, including an emotion engine for recognizing the user's emotion, and a means for extracting and analyzing production data and inventory data in the factory in real time. This makes it possible to quickly and accurately respond to data extraction requests from the sales department and to appropriately respond to requests with high urgency by adjusting the priority according to the user's emotion. In addition, efficient production management can be realized by extracting and analyzing production data and inventory data in the factory in real time.
[1423] A "sales department" is a department within a company or organization that sells products and services.
[1424] A "support department" is a department that performs tasks to support the sales department and other departments.
[1425] A "data warehouse" is a database system for centrally managing and storing large amounts of data collected by companies and organizations.
[1426] An "extract request" is a request to retrieve specific data from the data warehouse.
[1427] "SQL" is an abbreviation for Structured Query Language, and is a language for manipulating and searching data in a database.
[1428] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[1429] An "emotion engine" is a technology for inferring emotions from a user's tone of voice, facial expression, choice of words in text input, etc.
[1430] "Priority adjustment" refers to changing the order of processing or the priority order of tasks or requests depending on their importance or urgency.
[1431] "Production data" is data related to production activities in factories and manufacturing sites.
[1432] "Inventory data" is data regarding the quantity and condition of products or parts held by a company or organization.
[1433] "Real-time" means that data and information are processed and provided immediately.
[1434] A system for implementing this invention includes an AI system that generates extraction requests from a data warehouse from a sales department to a support department and generates SQL based on the extraction requests, a means for executing the generated SQL against the data warehouse, an emotion engine that recognizes user emotions, a means for adjusting the priority of extraction requests according to the user emotions, and a means for extracting and analyzing production data and inventory data within a factory in real time.
[1435] Hardware and Software Used
[1436] Hardware: Factory robots, data warehouse servers
[1437] Software: SQLite (database management system), emotion recognition library, SQL generation library
[1438] Data processing and calculation
[1439] The server first receives a data extraction request from the sales department. The request is entered through a form that includes information such as the type of data and the period. The AI system then analyzes this information and generates the optimal SQL query. The generated SQL query is automatically executed against the data warehouse to extract the required data.
[1440] In addition, the emotion engine estimates the user's emotions from the tone of their voice, facial expressions, and choice of words in text input. This emotion engine makes it possible to adjust the priority of extraction requests according to the user's emotions, such as when the user is in a hurry or in trouble.
[1441] Examples
[1442] For example, if a factory manager requests, "I want to get last week's production data," the server receives this request and the AI system generates the optimal SQL query. At the same time, the emotion engine determines the urgency from the manager's tone of voice and facial expression, and increases the priority if necessary. The generated SQL query is executed against the data warehouse, and last week's production data is extracted and analyzed in real time.
[1443] Examples of prompt statements
[1444] User input: I want to get last week's production data
[1445] User emotion: Tone of voice sounds tense, facial expression looks worried
[1446] By inputting this prompt sentence into the generative AI model, it is possible to create a system that can adjust the priority of data extraction according to the user's emotions and quickly provide the necessary data.
[1447] The flow of the specific process in the application example 1 will be described with reference to FIG.
[1448] Step 1:
[1449] The server receives a data extraction request from the sales department. The request is entered through a form that includes information such as the type of data, the period, etc. The entered information is sent to the server for processing in the next step.
[1450] Step 2:
[1451] The server passes the received extraction request information to the AI system. The AI system analyzes this information and generates the optimal SQL query. Specifically, it automatically creates an SQL statement to extract the required data based on the type of data and the period. The generated SQL query is output.
[1452] Step 3:
[1453] The server executes the generated SQL query against the data warehouse. The data warehouse extracts the required data based on the SQL query and returns the results to the server. The extracted data is output.
[1454] Step 4:
[1455] The server uses an emotion engine to recognize the user's emotion. The emotion is estimated from the user's tone of voice, facial expression, choice of words in text input, etc. The emotion engine calculates a priority according to the user's emotion and returns the result to the server. The priority is output.
[1456] Step 5:
[1457] The server adjusts the priority of the extraction request based on the priority information from the emotion engine. For example, if it is determined that the user is in a hurry, the server increases the priority of the extraction request. The adjusted priority is output.
[1458] Step 6:
[1459] The server extracts and analyzes production data and inventory data from the factory in real time. It uses the generated SQL queries to retrieve the necessary data from the data warehouse and analyzes the data in real time. The analysis results are output.
[1460] Step 7:
[1461] The server provides the analysis results to the user. The user can check the production data and inventory data extracted and analyzed in real time and take necessary measures. The provided data is output.
[1462] Example 2
[1463] Next, a second embodiment of the second form will be described. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal".
[1464] In conventional data extraction systems from data warehouses, SQL query generation and optimization are often done manually, which is inefficient. In addition, it is difficult to flexibly respond to user requests because data extraction cannot be done according to user emotions. For this reason, there is a demand for a system that automates SQL query generation and optimization and also realizes data extraction according to user emotions.
[1465] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[1466] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, a means for analyzing the generated SQL query and optimizing an execution plan, and a means for adjusting the generated SQL query based on the user's emotions. This automates the generation and optimization of SQL queries, enabling flexible data extraction according to the user's emotions.
[1467] A "sales department" is a department within a company or organization responsible for selling products and services.
[1468] A "support department" is a department within a company or organization whose role is to support the sales department and other departments.
[1469] A "data warehouse" is a database system that allows companies and organizations to aggregate large amounts of data and use it for analysis and reporting.
[1470] An "extract request" is a request to retrieve specific data from the data warehouse.
[1471] "SQL" stands for Structured Query Language, a programming language used to manipulate and define data in a database management system.
[1472] An "artificial intelligence system" is a system that mimics human intelligence using technologies such as machine learning and natural language processing.
[1473] An "execution plan" is a diagram that describes the steps or methods that a database management system will use to execute a SQL query.
[1474] "Optimization" refers to making adjustments or improvements to maximize the performance of a system or process.
[1475] "User emotion" refers to the psychological reaction or state a user has to a particular situation or piece of information.
[1476] "Adaptation" refers to modifying a system or process to suit specific purposes or conditions.
[1477] This invention is a system that efficiently processes requests from the sales department to the support department for data extraction from a data warehouse, automates the generation and optimization of SQL queries, and provides a means for realizing data extraction according to the user's emotions.
[1478] System Configuration
[1479] The system consists of the following main components:
[1480] 1. A means of generating extraction requests from the sales department to the support department
[1481] A user uses a terminal to input a request for data extraction in natural language, for example a prompt such as "Show me all the recent sales data."
[1482] 2. Artificial intelligence system that generates SQL
[1483] The server analyzes the prompt received from the user and generates an appropriate SQL query using the generative AI model. For example, in response to the prompt "Show me all recent sales data," the server generates the SQL query SELECT FROM sales WHERE date >= '2023-01-01';.
[1484] 3. A means to execute the generated SQL against the data warehouse
[1485] The server sends the generated SQL query to the data warehouse and obtains the results of the query execution.
[1486] 4. A means to analyze the generated SQL queries and optimize the execution plan
[1487] The server analyzes the generated SQL query and optimizes the execution plan. Specifically, it optimizes the table join order and uses indexes. For example, for a query such as SELECT FROM sales WHERE date >= '2023-01-01';, it generates an optimized query such as SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;.
[1488] 5. A means to tailor generated SQL queries based on user sentiment
[1489] The server uses an emotion engine to analyze the user's emotions and adjusts the SQL query accordingly: if the user is angry, for example, it generates an SQL query to provide more detailed data, and if the user is happy, it generates a simple SQL query to provide summary information.
[1490] Examples
[1491] Here is a specific scenario:
[1492] Scenario 1: The user is angry
[1493] Input prompt text: The user requests, "Show me all my recent sales data."
[1494] Generated SQL query: SELECT FROM sales WHERE date >= '2023-01-01';
[1495] Optimized SQL query: SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;
[1496] Scenario 2: Happy User
[1497] Input prompt: The user requests, "What are my recent sales totals?"
[1498] Generated SQL query: SELECT SUM(amount) FROM sales WHERE date >= '2023-01-01';
[1499] Optimized SQL query: SELECT SUM(amount) FROM sales WHERE date >= '2023-01-01';
[1500] This system automates the generation and optimization of SQL queries, enabling flexible data extraction based on user sentiment.
[1501] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1502] Step 1:
[1503] The user enters a prompt sentence.
[1504] The user enters a data extraction request in natural language into an input field on the terminal, for example, "Show me all my recent sales data."
[1505] Input: A user's natural language request for data extraction.
[1506] Output: The prompt text typed into the terminal.
[1507] Step 2:
[1508] The terminal sends a prompt to the server.
[1509] The terminal sends the prompt text entered by the user to the server as an HTTP POST request.
[1510] Input: The prompt text typed into the terminal.
[1511] Output: The prompt text sent to the server.
[1512] Step 3:
[1513] The server parses the prompt and generates an SQL query.
[1514] The server inputs the received prompt sentence into the generative AI model and generates an appropriate SQL query. For example, in response to the prompt sentence "Show me all recent sales data," the server generates the SQL query SELECT FROM sales WHERE date >= '2023-01-01';.
[1515] Input: The prompt text sent to the server.
[1516] Output: The generated SQL query.
[1517] Step 4:
[1518] Optimize server-generated SQL queries.
[1519] The server analyzes the generated SQL query and optimizes the execution plan. Specifically, it optimizes the table join order and uses indexes. For example, for a query such as SELECT FROM sales WHERE date >= '2023-01-01';, it generates an optimized query such as SELECT FROM sales WHERE date >= '2023-01-01' ORDER BY date DESC;.
[1520] Input: The generated SQL query.
[1521] Output: The optimized SQL query.
[1522] Step 5:
[1523] The server sends the optimized SQL query to the database and retrieves the results.
[1524] The server sends the optimized SQL query to the database and gets the results of the query execution, which extracts data based on the query and returns it to the server.
[1525] Input: The optimized SQL query.
[1526] Output: The results of the query execution retrieved from the database.
[1527] Step 6:
[1528] The server transmits the obtained results to the terminal.
[1529] The server sends the results obtained from the database to the terminal as an HTTP response.
[1530] Input: The results of the query execution retrieved from the database.
[1531] Output: The results of the query sent to the terminal.
[1532] Step 7:
[1533] The terminal displays the results to the user.
[1534] The terminal displays the data received from the server to the user, for example, recent sales data in a table format.
[1535] Input: The result of the query sent by the server.
[1536] Output: The data displayed to the user.
[1537] (Application example 2)
[1538] Next, a description will be given of Application Example 2 of Form Example 2. In the following description, the data processing device 12 will be referred to as a "server", and the headset type terminal 314 will be referred to as a "terminal".
[1539] Conventional data extraction systems from data warehouses do not extract data according to user sentiment, making it difficult to provide information that meets user needs. In addition, the performance of the generated SQL queries is not optimized, resulting in poor data extraction efficiency. This leads to issues such as a poor user experience and a deterioration in the performance of the entire system.
[1540] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1541] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, a means for analyzing user emotions, a means for adjusting the SQL query based on the user emotions, and a means for optimizing the performance of the generated SQL query. This enables optimal data extraction according to the user emotions, improves the efficiency of data extraction, and improves the quality of the user experience.
[1542] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[1543] A "support department" is a department within a company or organization that has the role of supporting the sales department and other departments.
[1544] A "data warehouse" is a database system that manages large amounts of data from companies and organizations in an integrated manner and uses it for analysis and reporting.
[1545] An "extract request" is a request to retrieve specific data from the data warehouse.
[1546] "SQL" stands for Structured Query Language, a standard programming language for manipulating and defining data in a database management system.
[1547] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[1548] "User emotion" refers to the feeling or mood state that a user has toward a particular situation or piece of information.
[1549] An "SQL query" is an SQL statement used to search for and manipulate data in a database.
[1550] "Optimizing performance" means making adjustments or improvements to a system or process to maximize its efficiency and speed.
[1551] The following system configuration is used as an embodiment of the present invention.
[1552] The server includes a means for generating requests for retrieval from the data warehouse from the sales department to the support department. Specifically, when a sales department representative needs specific data, he or she inputs the request into the system. This input is made through a user interface.
[1553] Next, the server includes an AI system that generates SQL based on the extraction request. The AI system uses a generative AI model to generate an optimal SQL query from the input extraction request. The generated SQL query is executed against the data warehouse.
[1554] Furthermore, the server includes a means for analyzing the user's emotions. The user's emotions are analyzed in real time using emotion recognition software installed in a device such as a smartphone, smart glasses, or a head-mounted display. The emotion recognition software analyzes data such as the user's facial expressions, voice, and heart rate to identify the user's emotional state.
[1555] The server has the means to adjust the SQL query based on the user's emotions: for example, if the user is stressed, it generates a detailed SQL query to provide relaxing content, whereas if the user is happy, it generates a simple SQL query to provide summary information.
[1556] The server also has the ability to optimize the performance of the generated SQL queries, such as optimizing the join order of tables and refining queries to take advantage of indexes, making data extraction from the data warehouse more efficient.
[1557] For example, if a user is wearing smart glasses and the emotion recognition software determines that the user is stressed, the server will generate SQL queries to provide relaxing music or scenic videos and extract the relevant content from the data warehouse, whereas if the user is excited, it will generate SQL queries to provide action movie trailers or sports highlights.
[1558] An example of a prompt is as follows:
[1559] "Build your application to provide the best content based on the user's emotions. Provide detailed content when the user is angry and summary information when the user is happy. Also, optimize your SQL queries."
[1560] In this way, optimal data extraction according to the user's emotions becomes possible, improving the efficiency of data extraction and the quality of the user experience.
[1561] The flow of the specific process in the application example 2 will be described with reference to FIG.
[1562] Step 1:
[1563] A sales department staff member uses a terminal to input a data extraction request.
[1564] Input: The data requirements for sales personnel (e.g. sales data for a specific period)
[1565] Output: A data extraction request is sent to the system
[1566] Specific operations: Through the terminal's user interface, the person in charge enters the required data conditions and presses the send button.
[1567] Step 2:
[1568] The server receives the data extraction request and the AI system generates an SQL query.
[1569] Input: Data extraction request
[1570] Output: Generated SQL query
[1571] Specific operation: The server analyzes the data extraction request and generates the optimal SQL query using a generative AI model.
[1572] Step 3:
[1573] The device analyzes the user's emotions in real time.
[1574] Input: Emotional data such as user facial expressions, voice, and heart rate
[1575] Output: Analyzed user's emotional state (e.g. stress, satisfaction)
[1576] Specific operation: Emotion recognition software installed on the device collects and analyzes the user's emotional data.
[1577] Step 4:
[1578] The server adjusts the SQL query based on the user's sentiment.
[1579] Input: Generated SQL queries, parsed user emotional state
[1580] Output: Adjusted SQL query
[1581] What it does: The server adjusts the generated SQL query based on the analyzed emotional state, changing it to provide more detailed data or summary information.
[1582] Step 5:
[1583] Server tuned to optimize performance of SQL queries.
[1584] Input: Adjusted SQL query
[1585] Output: Optimized SQL query
[1586] What happens: The server will optimize the join order of tables and refine the query to take advantage of indexes.
[1587] Step 6:
[1588] The server executes the optimized SQL queries against the data warehouse.
[1589] Input: Optimized SQL query
[1590] Output: Data extracted from the data warehouse
[1591] What happens next: The server sends optimized SQL queries to the data warehouse to extract the required data.
[1592] Step 7:
[1593] The server transmits the extracted data to the terminal and displays it to the user.
[1594] Input: Data extracted from the data warehouse
[1595] Output: Data displayed to the user
[1596] Specific operation: The server sends the extracted data to the terminal and displays it to the user through the terminal's user interface.
[1597] In this way, optimal data extraction according to the user's emotions becomes possible, improving the efficiency of data extraction and the quality of the user experience.
[1598] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input for the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.
[1599] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet search<URL: https: / / openai.com / blog / chatgpt> ) and other generation AIs. The data generation model 58 is obtained by making a neural network perform deep learning. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating a voice, text data indicating a text, and image data indicating an image is input. The data generation model 58 performs inference on the input inference data according to the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1600] Another example of generative AI is Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) are mentioned.
[1601] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.
[1602] [Fourth embodiment]
[1603] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1604] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.
[1605] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a wide area network (WAN) and / or a local area network (LAN).
[1606] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. In addition, the microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.
[1607] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs the voice according to instructions from the processor 46.
[1608] Camera 42 is a small digital camera equipped with an optical system including a lens, an aperture, and a shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (e.g., an imaging range defined by an angle of view equivalent to the width of the field of vision of an average healthy person).
[1609] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for transmitting and receiving various types of information between the processor 46 and the processor 28 via the network 54. The transmission and reception of various types of information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is performed in a secure state.
[1610] The control target 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, legs, etc. The posture and behavior of the robot 414 are controlled by controlling the motors of the arms, hands, legs, etc. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.
[1611] Fig. 8 shows an example of main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[1612] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32, and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[1613] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1614] In the robot 414, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50, and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[1615] Next, the specific processing by the specific processing unit 290 of the data processing device 12 will be described.
[1616] "Example 1"
[1617] The present invention is directed to a system including a means for automatically generating an extraction request from a sales department, automatic generation of SQL by an AI system, and automatic execution of the generated SQL. Specifically, an extraction request from a sales department is input through a form including information such as the type and period of data required by the sales department. This information is sent to the system, and the AI system analyzes it. The AI system generates an optimal SQL query based on the content of the extraction request. The generated SQL query is automatically executed against a data warehouse to extract the required data.
[1618] "Example 2"
[1619] In another aspect of the present invention, the AI system optimizes the performance of the generated SQL queries. Specifically, the AI system analyzes the generated SQL queries and optimizes the execution plan of the queries, for example optimizing the join order of tables and refining the queries to take advantage of indexes, which results in more efficient data extraction from the data warehouse.
[1620] The process flow of each embodiment will be described below.
[1621] "Example 1"
[1622] Step 1: An extraction request from the sales department is entered through a form containing information such as the type of data the sales department requires and the period of time.
[1623] Step 2: This information is sent to the system, where the AI system analyzes it.
[1624] Step 3: The AI system generates the optimal SQL query based on the content of the extraction request.
[1625] Step 4: The generated SQL queries are automatically executed against the data warehouse to extract the required data.
[1626] "Example 2"
[1627] Step 1: The AI system analyzes the generated SQL query.
[1628] Step 2: The AI system optimizes the query execution plan, for example by optimizing the join order of tables and refining the query to take advantage of indexes.
[1629] Step 3: This makes data extraction from the data warehouse more efficient.
[1630] Example 1
[1631] Next, a description will be given of Example 1 of the embodiment 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal".
[1632] Conventional data extraction systems had the problem that extraction requests from the sales department had to be processed manually, which was time-consuming and labor-intensive. In addition, specialized knowledge was required to generate and execute SQL queries, making it difficult for non-experts to easily extract data. Furthermore, if the performance of the generated SQL queries was not optimized, data extraction could take a long time.
[1633] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1634] In this invention, the server includes a means for generating an extraction request from the database from the sales department to the support department, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the database, a means for providing a user interface for inputting the extraction request, a means for using natural language processing technology for analyzing the extraction request, a means for automatically executing the generated SQL query against the database, and a means for providing the extracted data to the user. This makes it possible to automatically process the extraction request from the sales department and to easily extract data even by non-experts. In addition, the performance of the generated SQL query is optimized, improving the efficiency of data extraction.
[1635] A "sales department" is a department within a company or organization responsible for selling products and services.
[1636] A "support department" is a department whose role is to support other departments, such as the sales department.
[1637] A "database" is a system for efficiently storing, managing, and searching data.
[1638] An "extract request" is a request to retrieve specific data from a database.
[1639] An "artificial intelligence system" is a system that automatically performs tasks using techniques such as machine learning and natural language processing.
[1640] "SQL" is a standard query language for manipulating and searching data in a database.
[1641] A "user interface" is an interface through which a user interacts with a system.
[1642] "Natural language processing technology" is a technology that enables computers to understand, interpret, and generate human language.
[1643] An "SQL query" is a command statement for searching, inserting, updating, or deleting specific data from a database.
[1644] "Performance" refers to the efficiency or speed of a system or query.
[1645] The present invention is a system for automatically processing extraction requests from a sales department and efficiently extracting necessary data from a database. A specific embodiment of this system will be described below.
[1646] System Configuration
[1647] Hardware
[1648] Server: Hosts the Database Management System (DBMS) and generates and executes SQL queries.
[1649] Terminal: The computer or mobile device through which the User enters the extraction request.
[1650] Database: A system for storing data, such as a cloud-based database service.
[1651] software
[1652] User Interface: A web form built using HTML and JavaScript that provides the interface for users to enter extraction requests.
[1653] Artificial Intelligence System: Implemented in Python, it uses a generative AI model (e.g. GPT-4) to generate SQL queries.
[1654] Natural Language Processing techniques are used to analyze the extraction request, for example using an NLP library (e.g. spaCy).
[1655] System Operation
[1656] Input extraction request
[1657] The user inputs information such as the type of data required and the period of time into a dedicated form on a web browser. This form is built using HTML and JavaScript. For example, the user inputs the following information:
[1658] Data type: Sales data
[1659] Period: January 1, 2023 to March 31, 2023
[1660] Sending an Extraction Request
[1661] The terminal sends the extraction request information entered by the user to the server using the HTTPS protocol, with the data encoded in JSON format.
[1662] Receiving and parsing extraction requests
[1663] The server parses the received JSON data and passes the contents of the extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the extraction request. For example, it generates a prompt sentence like the following:
[1664] "Generate a SQL query to extract sales data from January 1, 2023 to March 31, 2023."
[1665] Generate SQL queries
[1666] The AI system uses a generative AI model (e.g. GPT-4) to generate optimal SQL queries, such as the following:
[1667] sql
[1668] SELECT FROM sales WHERE sale_date BETWEEN '2023-01-01' AND '2023-03-31';
[1669] Executing SQL Queries
[1670] The server automatically executes the generated SQL queries against a database (we use a cloud-based database service) using Python libraries (e.g. psycopg2).
[1671] Data extraction and provision
[1672] The server receives the extracted data from the database and provides it to the user. The extracted data is exported in CSV format and a download link is generated for the user to click on to download the data.
[1673] In this way, extraction requests from the sales department can be processed automatically, making it easy for non-experts to extract data. In addition, the performance of the generated SQL queries is optimized, improving the efficiency of data extraction.
[1674] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1675] Step 1:
[1676] The user inputs information such as the type of data required and the period into a dedicated form on a web browser. The input information is the type of data (e.g., sales data) and the period (e.g., from January 1, 2023 to March 31, 2023). This completes the input of the extraction request.
[1677] Step 2:
[1678] The terminal converts the information of the extraction request entered by the user into JSON format and sends it to the server using the HTTPS protocol. The input is the type and period of data entered by the user, and the output is data in JSON format. This sends the extraction request to the server.
[1679] Step 3:
[1680] The server analyzes the received JSON data and passes the contents of the extraction request to the AI system. The input is the JSON data sent from the terminal, and the output is the analyzed contents of the extraction request. This completes the analysis of the extraction request.
[1681] Step 4:
[1682] The AI system in the server uses natural language processing technology to analyze the extraction request and generate a prompt sentence. The input is the content of the analyzed extraction request, and the output is the generated prompt sentence. For example, a prompt sentence may be generated that reads, "Please generate an SQL query to extract sales data from January 1, 2023 to March 31, 2023."
[1683] Step 5:
[1684] The AI system uses a generative AI model (e.g., GPT-4) to generate an optimal SQL query based on the prompt sentence. The input is the generated prompt sentence, and the output is the generated SQL query. For example, the SQL query "SELECT FROM sales WHERE sale_date BETWEEN '2023-01-01' AND '2023-03-31';" is generated.
[1685] Step 6:
[1686] The server automatically executes the generated SQL query against the database. The input is the generated SQL query, and the output is the data extracted from the database. The database uses a cloud-based database service. This completes the execution of the SQL query.
[1687] Step 7:
[1688] The server receives the data extracted from the database and converts it into CSV format. The input is the data extracted from the database, and the output is data in CSV format. This completes the data format conversion.
[1689] Step 8:
[1690] The server generates a link to provide the user with CSV format data and notifies the user. The input is the CSV format data, and the output is a download link. The user can click this link to download the data. This completes the data provision.
[1691] (Application example 1)
[1692] Next, a description will be given of Application Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal".
[1693] Traditional inventory management at logistics centers requires manual data extraction and analysis, which is time-consuming and labor-intensive. In addition, data extraction requires manual SQL queries, which requires specialized knowledge, making efficient inventory management difficult.
[1694] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means. In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for a staff member to input the necessary inventory information in an inventory management application in the logistics center, a means for generating an optimal SQL query based on the input information and extracting the necessary data from the data warehouse, and a means for displaying the extracted data. This makes inventory management in the logistics center more efficient, and makes it possible to easily extract and display the necessary data even without specialized knowledge.
[1695] A "sales department" is a department within a company or organization that sells products and services.
[1696] A "support department" is a department whose role is to support other departments, such as the sales department.
[1697] A "data warehouse" is a database system that centrally manages large amounts of data from a company or organization and uses it for analysis and reporting.
[1698] An "extract request" is a request to retrieve specific data from the data warehouse.
[1699] An "AI system" is a system that uses artificial intelligence technology to automate certain tasks.
[1700] "SQL" is a standard programming language for manipulating and querying data from database management systems.
[1701] A "logistics center" is a facility that handles logistics operations such as the storage, management, and delivery of goods.
[1702] An "inventory management application" is software for managing inventory status and providing necessary information.
[1703] "Staff" refers to employees or personnel working for a company or organization.
[1704] "Inventory information" is data regarding the quantity and condition of products at a logistics center.
[1705] An "SQL query" is a command statement for retrieving specific data from a database.
[1706] "Data extraction" is the process of retrieving the required data from a data warehouse.
[1707] A "display means" is a method or device for visually presenting the extracted data to a user.
[1708] As an embodiment of the present invention, an inventory management application in a logistics center will be described as an example.
[1709] The server has a means to generate requests for extraction from the data warehouse from the sales department to the support department. This allows sales department staff to input the necessary inventory information. The input information is sent to the server, where the AI system analyzes it.
[1710] The AI system uses a generative AI model to generate optimal SQL queries based on the input information. These SQL queries are then automatically executed against the data warehouse. Data extracted from the data warehouse is displayed on staff terminals via the server.
[1711] Specifically, staff at the distribution center access the inventory management application using smartphones or tablets. Staff enter the necessary inventory information (e.g., the number of items in stock for a particular product category or data on incoming and outgoing goods for a particular period) through the application's interface. This information is sent to the server as a prompt text like the following:
[1712] Example prompt:
[1713] Data Type: Inventory
[1714] Period: Last month
[1715] Category: Electronics
[1716] The server receives the prompt sentence and sends it to the AI system, which uses the generative AI model to generate the optimal SQL query based on the prompt sentence, which is then executed against the data warehouse to extract the required data.
[1717] The extracted data is then displayed on staff's terminals via the server, allowing staff at the distribution center to easily extract and display the inventory data they need, even if they do not have specialized knowledge.
[1718] The following hardware and software are used to realize this system:
[1719] Server: Communicates with the data warehouse and runs the AI system.
[1720] Data Warehouse: Centrally manages large amounts of data and provides the data based on SQL queries.
[1721] AI system: Uses a generative AI model to generate SQL queries based on prompt statements.
[1722] Smartphones and tablets: Devices that allow staff to access the inventory management application and enter the necessary information.
[1723] In this way, inventory management at logistics centers is made more efficient, and necessary data can be easily extracted and displayed even without specialized knowledge.
[1724] The flow of the specific process in the application example 1 will be described with reference to FIG.
[1725] Step 1:
[1726] A user accesses an inventory management application on a smartphone or tablet and inputs the necessary inventory information. The input information includes data type (inventory), period (last month), product category (electronic devices), etc. This input data is structured as a prompt sentence.
[1727] Step 2:
[1728] The terminal sends the input prompt to the server. The server receives the prompt and prepares it to send to the AI system. The input data is converted to an appropriate data format, such as JSON format.
[1729] Step 3:
[1730] The server sends the prompt sentence to the AI system, which uses the generative AI model to generate an optimal SQL query based on the prompt sentence. Specifically, the generative AI model parses the prompt sentence and constructs a SQL query to retrieve the required data.
[1731] Step 4:
[1732] The AI system generates a SQL query and sends it back to the server, which receives it and prepares it to run against the data warehouse, translating the SQL query into a format the data warehouse can understand.
[1733] Step 5:
[1734] The server executes the generated SQL query to the data warehouse. The data warehouse extracts the required data based on the SQL query. Specifically, the data warehouse analyzes the SQL query, searches for and extracts the relevant data.
[1735] Step 6:
[1736] The data warehouse returns the extracted data to the server, which receives it and prepares it for transmission to the user's terminal. The extracted data is converted into a format that is easy for the user to understand.
[1737] Step 7:
[1738] The server transmits the extracted data to the user's terminal. The terminal receives the data and displays it on the interface of the inventory management application. The user can check the displayed data and use it for inventory management.
[1739] In this way, inventory management at logistics centers is made more efficient, and necessary data can be easily extracted and displayed even without specialized knowledge.
[1740] Example 2
[1741] Next, a second embodiment of the second embodiment will be described. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal".
[1742] In conventional data extraction systems from data warehouses, SQL queries were often generated and optimized manually, resulting in poor efficiency. In addition, the performance of the generated SQL queries was not optimized, which could result in slow data extraction times. This made it difficult for sales and support departments to quickly obtain the data they needed.
[1743] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[1744] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating an SQL query based on the extraction request, a means for analyzing the generated SQL query, generating and optimizing an execution plan, a means for executing the optimized SQL query on the data warehouse, and a means for returning the execution result to the user. This automates the generation and optimization of SQL queries, improves the efficiency of data extraction, and enables the sales department and support department to quickly obtain the data they need.
[1745] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[1746] A "support department" is a department within a company or organization that has the role of supporting the sales department and other business departments.
[1747] A "data warehouse" is a database system that allows companies and organizations to aggregate large amounts of data and use it for analysis and reporting.
[1748] An "extract request" is a request to retrieve specific data from the data warehouse.
[1749] "SQL query" means instructions written in Structured Query Language (SQL) used to retrieve, insert, update, and delete data from a database.
[1750] An "artificial intelligence system" is a system that mimics human intelligence using technologies such as machine learning and natural language processing.
[1751] "Analysis" is the process of examining data or information in detail to understand its structure and meaning.
[1752] An "execution plan" is a plan that describes the specific steps that a database management system takes to execute a SQL query.
[1753] "Optimization" refers to making adjustments or improvements to maximize the performance of a system or process.
[1754] "Execution results" are the data or information obtained by executing a SQL query.
[1755] "User" means an individual or organization that uses the system or service.
[1756] This invention is a system for improving the efficiency of data extraction from a data warehouse. The system includes an artificial intelligence system that generates an extraction request from a sales department to a support department and generates an SQL query based on the request. The system further includes a means for analyzing the generated SQL query and generating and optimizing an execution plan. The optimized SQL query is executed against the data warehouse, and the execution result is returned to the user.
[1757] Hardware and Software Used
[1758] The server is equipped with a powerful processor and a large amount of memory (e.g., 64GB RAM). In addition, MySQL or PostgreSQL is used as the database management system (DBMS). The artificial intelligence system generates and optimizes SQL queries using machine learning models and natural language processing techniques.
[1759] Program processing explanation
[1760] The server receives the SQL query submitted by the user and parses it using an SQL parser to check the syntax of the query. The server then generates an execution plan based on the parsed SQL query. An execution plan is a set of detailed instructions on how to execute the query.
[1761] The server optimizes the generated execution plan by optimizing the join order of tables and improving the query to take advantage of indexes, which makes the query run faster and allows data to be retrieved much faster.
[1762] The optimized SQL queries are then executed against the data warehouse, and the server returns the results to the user, who can view them through a terminal interface.
[1763] Examples and prompts
[1764] For example, if a user enters the following SQL query:
[1765] sql
[1766] SELECT FROM orders
[1767] JOIN customers ON orders.customer_id = customers.id
[1768] WHERE orders.order_date > '2023-01-01';
[1769] The server receives this query and performs analysis. As a result of the analysis, the server generates an execution plan for the query and optimizes it as follows:
[1770] Optimize the join order of tables to perform the joins in the most efficient order.
[1771] If an index exists on orders.order_date, refine the query to take advantage of the index.
[1772] The optimized query looks like this:
[1773] sql
[1774] SELECT FROM customers
[1775] JOIN orders ON customers.id = orders.customer_id
[1776] WHERE orders.order_date > '2023-01-01';
[1777] Example of a prompt to be input to a generative AI model:
[1778] "Optimize the performance of the following SQL queries:
[1779] SELECT FROM orders
[1780] JOIN customers ON orders.customer_id = customers.id
[1781] WHERE orders.order_date > '2023-01-01';''
[1782] Using this prompt, the generative AI model optimizes the SQL query to achieve efficient data extraction.
[1783] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1784] Step 1:
[1785] The user enters an SQL query.
[1786] A user enters an SQL query through a terminal interface, for example a query like this:
[1787] sql
[1788] SELECT FROM orders
[1789] JOIN customers ON orders.customer_id = customers.id
[1790] WHERE orders.order_date > '2023-01-01';
[1791] Input: The SQL query entered by the user.
[1792] Output: SQL query sent from terminal to server
[1793] Step 2:
[1794] The server receives the input SQL query.
[1795] The server receives the SQL query sent by the user and temporarily stores it in memory.
[1796] Input: SQL query sent from the terminal
[1797] Output: SQL query stored in server memory
[1798] Step 3:
[1799] The server parses the SQL query.
[1800] The server uses an SQL parser to parse the received SQL query, and during the parsing process it checks the syntax of the query for any syntax errors.
[1801] Input: SQL query stored in the server's memory
[1802] Output: Syntax information of the parsed SQL query.
[1803] Step 4:
[1804] The server generates an execution plan for the query.
[1805] Based on the parsed SQL query, the server generates an execution plan, which is a set of detailed instructions on how to execute the query.
[1806] Input: Syntax information of the parsed SQL query
[1807] Output: Generated execution plan
[1808] Step 5:
[1809] The server optimizes the execution plan.
[1810] The server optimizes the generated execution plan. Specifically, it optimizes the following:
[1811] Optimized table join order: The server optimizes the order in which tables are joined in a query, which can improve the execution speed of the query.
[1812] Use indexes: The server refines queries to take advantage of indexes, which can greatly speed up retrieval of data.
[1813] Input: Generated execution plan
[1814] Output: Optimized execution plan
[1815] Step 6:
[1816] The server generates an optimized SQL query.
[1817] The server generates a new SQL query based on the optimized execution plan, for example optimized to:
[1818] sql
[1819] SELECT FROM customers
[1820] JOIN orders ON customers.id = orders.customer_id
[1821] WHERE orders.order_date > '2023-01-01';
[1822] Input: Optimized execution plan
[1823] Output: Optimized SQL query
[1824] Step 7:
[1825] The server executes the optimized SQL query.
[1826] The server executes optimized SQL queries against a data warehouse using a database management system (DBMS), for example MySQL or PostgreSQL.
[1827] Input: Optimized SQL query
[1828] Output: Results of executing the SQL query
[1829] Step 8:
[1830] The server returns the execution result to the user.
[1831] The server executes the SQL query and returns the results to the user, who displays the results through the terminal interface.
[1832] Input: Result of executing a SQL query
[1833] Output: The execution result displayed on the user's terminal.
[1834] (Application example 2)
[1835] Next, a description will be given of Application Example 2 of Form Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal".
[1836] In conventional data extraction systems from data warehouses, SQL queries are often generated and optimized manually, which is inefficient. In addition, real-time data extraction is required for inventory management and shipping plan optimization at logistics centers, but current systems have difficulty in meeting this requirement. This leads to issues such as reduced accuracy of inventory management and shipping plans, and worsening business efficiency.
[1837] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1838] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for extracting data for optimizing inventory management and shipping plans in the logistics center, a means for optimizing the SQL query generated by the AI system, and a means including an application installed on a smartphone. This improves the efficiency of data extraction, and enables real-time optimization of inventory management and shipping plans in the logistics center.
[1839] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[1840] A "support department" is a department within a company or organization that has the role of supporting the sales department and other business departments.
[1841] A "data warehouse" is a database system that enables companies and organizations to manage and analyze large amounts of data in an integrated manner.
[1842] An "extract request" is a request to retrieve specific data from the data warehouse.
[1843] "SQL" stands for Structured Query Language, a programming language used to manipulate and define data in a database management system.
[1844] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[1845] A "logistics center" is a facility that handles logistics operations such as the storage, management, and shipping of goods.
[1846] "Inventory management" is the task of understanding the inventory status of products and managing them appropriately.
[1847] A "shipment plan" is a plan for creating a product shipping schedule and carrying out efficient shipping.
[1848] A "smartphone" is a highly functional mobile phone that can connect to the Internet and use applications.
[1849] An "application" is a software program designed to provide a specific function or service.
[1850] "Optimization" means making something the most efficient for a particular purpose.
[1851] As an embodiment of the present invention, a system for optimizing inventory management and shipping plans in a logistics center will be described. This system includes an AI system that generates an extraction request from a data warehouse from a sales department to a support department and generates SQL based on the extraction request. The system also executes the generated SQL against the data warehouse to extract data for optimizing inventory management and shipping plans in the logistics center. The system also includes an application that optimizes the SQL query generated by the AI system and is installed on a smartphone.
[1852] The server receives extraction requests from the sales department, and the AI system generates optimal SQL queries based on those requests. The generated SQL queries are executed against the data warehouse to extract the required data. The AI system optimizes the performance of the generated SQL queries to improve the efficiency of data extraction. Specifically, it optimizes the table join order and improves the queries to utilize indexes.
[1853] The terminal (smartphone) runs an application for optimizing inventory management and shipping plans in real time at the logistics center. This application receives optimized data sent from the server and displays the inventory status and shipping plans. This allows the user to efficiently manage inventory and make shipping plans.
[1854] The hardware used is the server hosting the data warehouse and / or a smartphone. The software uses Python, SQLite, and the sqlparse library. The AI system generates and optimizes SQL queries using a generative AI model.
[1855] As a concrete example, consider a scenario used in an inventory management system at a logistics center. Assume that a user uses a smartphone application to optimize an SQL query to retrieve products with stock levels greater than or equal to 0 and sort them by product ID. In this case, an example of a prompt sentence to be input to the generative AI model is as follows:
[1856] "Please optimize the SQL query in the inventory management system of the distribution center to get products with stock greater than or equal to 0 and sort them by product ID."
[1857] By inputting this prompt sentence into a generative AI model, an optimized SQL query can be generated, improving the efficiency of data extraction.
[1858] The flow of the specific process in the application example 2 will be described with reference to FIG.
[1859] Step 1:
[1860] The server receives an extraction request from the sales department to the support department from the data warehouse. This extraction request includes the type of data required and conditions. The input is the content of the extraction request, and the output is a prompt statement for generating an SQL query based on the content.
[1861] Step 2:
[1862] The server inputs a prompt sentence to the generative AI model based on the received extraction request. The prompt sentence specifically describes the content of the extraction request. The input is the prompt sentence, and the output is the SQL query generated by the generative AI model.
[1863] Step 3:
[1864] The server receives the SQL query output from the generative AI model and optimizes the query. Specifically, it optimizes the join order of tables and improves the query to make use of indexes. The input is the generated SQL query, and the output is the optimized SQL query.
[1865] Step 4:
[1866] The server runs the optimized SQL queries against the data warehouse to extract the required data. The input is the optimized SQL queries and the output is the extracted data.
[1867] Step 5:
[1868] The server sends the extracted data to the terminal (smartphone). The input is the extracted data, and the output is the data sent to the terminal.
[1869] Step 6:
[1870] The terminal displays the received data through the application. The user performs inventory management and shipping planning based on the displayed data. The input is the data sent from the server, and the output is the data displayed to the user.
[1871] Step 7:
[1872] Users use the application to perform operations to optimize inventory management and shipping plans, thereby improving the operational efficiency of the distribution center. The input is the data displayed through the application, and the output is optimized inventory management and shipping plans.
[1873] In addition, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1874] "Example 1"
[1875] In one embodiment of the present invention, the AI system includes an emotion engine that recognizes the user's emotions. The emotion engine infers the user's emotions from, for example, the user's tone of voice, facial expression, and choice of words in text input. This emotion engine makes it possible to adjust the priority of extraction requests according to the user's emotions, such as when the user is in a hurry or in a difficult situation.
[1876] "Example 2"
[1877] The emotion engine can also adjust the SQL queries it generates based on the user's emotions. For example, when the user is angry, it generates SQL queries to provide more detailed data. On the other hand, when the user is happy, it generates simple SQL queries to provide summary information. This allows optimal data extraction according to the user's emotions.
[1878] The process flow of each embodiment will be described below.
[1879] "Example 1"
[1880] Step 1: Receive an extraction request from a user.
[1881] Step 2: The emotion engine infers the user's emotions from the user's tone of voice, facial expressions, choice of words in text input, etc.
[1882] Step 3: Adjust the priority of extraction requests according to the user's emotions estimated by the emotion engine.
[1883] Step 4: Process the extraction request based on the adjusted priority.
[1884] "Example 2"
[1885] Step 1: Receive an extraction request from a user.
[1886] Step 2: The emotion engine estimates the user's emotion.
[1887] Step 3: The generated SQL query is adjusted according to the user's emotion estimated by the emotion engine.
[1888] Step 4: Generate tailored SQL queries to perform data extraction.
[1889] Example 1
[1890] Next, a description will be given of Example 1 of the embodiment 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal".
[1891] In the conventional data extraction system, extraction requests from the sales department had to be processed manually, which was time-consuming and labor-intensive. In addition, it was not possible to respond flexibly to user emotions, making it difficult to respond to urgent requests or difficult situations. Furthermore, if the performance of the generated SQL query was not optimized, data extraction could take a long time.
[1892] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1893] In this invention, the server includes a means for generating an extraction request from the sales department to the support department from the data warehouse, an artificial intelligence system for generating SQL based on the extraction request, a means for executing the generated SQL against the data warehouse, and an emotion engine for recognizing the user's emotions and adjusting the priority of the extraction request. This enables automation of the extraction request and flexible response according to the user's emotions, making it possible to extract data efficiently and quickly.
[1894] A "sales department" is a department within a company or organization that is responsible for selling products and services.
[1895] A "support department" is a department whose role is to support other departments, such as the sales department.
[1896] A "data warehouse" is a database system that aggregates and manages large amounts of data and is used for analysis and report creation.
[1897] An "extract request" is a request to retrieve specific data from the data warehouse.
[1898] An "artificial intelligence system" is a system that automatically performs specific tasks using technologies such as machine learning and natural language processing.
[1899] "SQL" is a standard programming language for manipulating and defining data in a database management system.
[1900] An "emotion engine" is a technology that recognizes the user's emotions and adjusts the system's operation based on that information.
[1901] "Priority" is an index that indicates the order of execution and importance of a task or process.
[1902] This invention is a system that automatically processes extraction requests from the sales department and efficiently extracts necessary data from a data warehouse. The system includes a means for generating extraction requests from the sales department, automatic generation of SQL by an artificial intelligence system, automatic execution of the generated SQL, and an emotion engine that recognizes the user's emotions and adjusts the priority of the extraction requests.
[1903] Hardware and Software Used
[1904] Terminal: The computer or mobile device through which the User enters the extraction request.
[1905] Server: A server that receives extraction requests and works with the AI system to generate and execute SQL queries.
[1906] Data warehouse: A database system that aggregates and manages data. An example is a cloud-based database service.
[1907] Artificial intelligence system: A system that uses natural language processing (NLP) technology to analyze extraction requests and generate optimal SQL queries.
[1908] Emotion engine: Technology to recognize user emotions and adjust the priority of extraction requests. For example, Microsoft Azure's Emotion API and Google Cloud's Natural Language API are used.
[1909] Specific operation of the system
[1910] 1. Enter your extraction request:
[1911] Using a web form or a dedicated application, users enter information such as the type of data they want and the time period they want -- for example, "Extract sales data from January to March 2023."
[1912] 2. Send your extraction request:
[1913] The terminal sends the extraction request entered by the user to the server, using the HTTPS protocol to transmit the data securely.
[1914] 3. Analysis of the extraction request:
[1915] The server passes the received extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the user's input. For example, the AI system analyzes the sentence "Please extract sales data from January to March 2023" entered by the user and identifies the type and period of data required.
[1916] 4. Generate SQL queries:
[1917] The AI system generates optimal SQL queries based on the analysis results. For example, it generates the SQL query "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'".
[1918] 5. Executing SQL queries:
[1919] The server automatically executes the generated SQL queries against a data warehouse, which may use, for example, a cloud-based database service.
[1920] 6. Data Extraction and Return:
[1921] The data warehouse extracts the required data based on the executed SQL query and sends it back to the server, which then transmits the extracted data to the user's terminal.
[1922] 7. Priority adjustment using emotion engine:
[1923] When a user inputs an extraction request, the emotion engine infers the user's emotions from the user's tone of voice, facial expression, choice of words in text input, etc. For example, if a user inputs "Please extract sales data quickly," the emotion engine determines that the user is in a hurry and sets the priority of the extraction request high.
[1924] Examples
[1925] Example 1: A sales representative extracts sales data
[1926] The user enters "Extract sales data from January to March 2023" into a web form. The device sends this information to the server, which passes it to the AI system. The AI system generates an SQL query: "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'". The server runs this query against the data warehouse and extracts the required data. The extracted data is sent back to the user's device via the server.
[1927] Example 2: When the user is in a hurry
[1928] When a user types "Please extract the sales data quickly," the emotion engine detects the user's sense of urgency. The emotion engine sets the priority of the extraction request high and quickly executes the SQL query generated by the AI system. The server prioritizes processing of high-priority queries and quickly returns the data extracted from the data warehouse to the user's device.
[1929] Examples of prompt statements
[1930] "Extract sales data from January to March 2023."
[1931] "Please extract the sales data quickly."
[1932] This system allows sales staff to quickly and efficiently extract the data they need. The introduction of an emotion engine enables flexible responses based on the user's emotions.
[1933] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1934] Step 1:
[1935] Using a web form or a dedicated application, users input information such as the type of data they need and the period of time. For example, they might input, "Please extract sales data from January to March 2023." The input information is then saved on the device as an extraction request.
[1936] Step 2:
[1937] The terminal sends the extraction request entered by the user to the server. At this time, the data is sent securely using the HTTPS protocol. The input is the extraction request information, and the output is a transmission completion notification to the server.
[1938] Step 3:
[1939] The server passes the received extraction request to the AI system. The AI system uses natural language processing (NLP) technology to analyze the user's input. For example, the AI system analyzes the sentence "Please extract sales data from January to March 2023" entered by the user, and identifies the type and period of data required. The input is the extraction request information, and the output is the analysis result.
[1940] Step 4:
[1941] The AI system generates an optimal SQL query based on the analysis results. For example, it generates the SQL query "SELECT FROM sales WHERE date BETWEEN '2023-01-01' AND '2023-03-31'". The input is the analysis result, and the output is the generated SQL query.
[1942] Step 5:
[1943] The server automatically executes the generated SQL query against a data warehouse, which may use a cloud-based database service, for example. The input is the generated SQL query, and the output is the execution result.
[1944] Step 6:
[1945] The data warehouse extracts the required data based on the executed SQL query and sends it back to the server. The server sends the extracted data to the user's terminal. The input is the execution result, and the output is the extracted data.
[1946] Step 7:
[1947] When a user inputs an extraction request, the emotion engine infers the user's emotions from the user's tone of voice, facial expression, choice of words in the text input, etc. For example, if a user inputs "Please extract the sales data quickly," the emotion engine determines that the user is in a hurry and sets the priority of the extraction request high. The input is the user's emotional information, and the output is the priority setting.
[1948] (Application example 1)
[1949] Next, a description will be given of Application Example 1 of Form Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal".
[1950] With conventional data extraction systems, it was difficult to respond quickly and accurately to data extraction requests from the sales department. In addition, because priority adjustment was not performed taking into account the user's feelings, there was a problem that it was not possible to respond appropriately to requests with high urgency. Furthermore, there was an issue that it was difficult to extract and analyze production data and inventory data from factories in real time, making it difficult to achieve efficient production management.
[1951] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1952] In this invention, the server includes a means for generating an extraction request from the data warehouse from the sales department to the support department, an AI system for generating SQL based on the extraction request, a means for executing the generated SQL on the data warehouse, a means for adjusting the priority of the extraction request according to the user's emotion, including an emotion engine for recognizing the user's emotion, and a means for extracting and analyzing production data and inventory data in the factory in real time. This makes it possible to quickly and accurately respond to data extraction requests from the sales department and to appropriately respond to requests with high urgency by adjusting the priority according to the user's emotion. In addition, efficient production management can be realized by extracting and analyzing production data and inventory data in the factory in real time.
[1953] A "sales department" is a department within a company or organization that sells products and services.
[1954] A "support department" is a department that performs tasks to support the sales department and other departments.
[1955] A "data warehouse" is a database system for centrally managing and storing large amounts of data collected by companies and organizations.
[1956] An "extract request" is a request to retrieve specific data from the data warehouse.
[1957] "SQL" is an abbreviation for Structured Query Language, and is a language for manipulating and searching data in a database.
[1958] An "AI system" is a system that uses artificial intelligence technology to automatically perform specific tasks.
[1959] An "emotion engine" is a technology for inferring emotions from a user's tone of voice, facial expression, choice of words in text input, etc.
[1960] "Priority adjustment" refers to changing the order of processing or the priority order of tasks or requests depending on their importance or urgency.
[1961] "Production data" is data related to production activities in factories and manufacturing sites.
[1962] "Inventory data" is data regarding the quantity and condition of products or parts held by a company or organization.
[1963] "Real-time" means that data and information are processed and provided immediately.
[1964] A system for implementing this invention includes an AI system that generates extraction requests from a data warehouse from a sales department to a support department and generates SQL based on the extraction requests, a means for executing the generated SQL against the data warehouse, an emotion engine that recognizes user emotions, a means for adjusting the priority of extraction requests according to the user emotions, and a means for extracting and analyzing production data and inventory data within a factory in real time.
[1965] Hardware and Software Used
[1966] Hardware: Factory robots, data warehouse servers
[1967] Software: SQL...
Claims
1. A means for generating an extraction request from the data warehouse from the sales department to the support department; A means for executing an SQL query generated by an AI system based on the extraction request on a data warehouse; a means for adjusting a priority of the extraction request in response to the user's emotion recognized by an emotion engine; A system including:
2. including the means to extract and analyze on-site production and inventory data in real time; The system of claim 1 .
3. The adjusting means adjusts the priority of the extraction request using the AI system based on a prompt sentence corresponding to the user's emotion. The system of claim 1 .
Citation Information
Patent Citations
Machine learning reasoning calls for database query processing
CN114667512A
Method for generating data pair, apparatus, electronic device, and storage medium
JP2022089166A
Selecting and explaining machine learning models for multidimensional datasets
JP2023539225A
Bridge from natural language processing engine to database engine
US20220035799A1
Virtual assistant response generation
US20220310083A1