Data query method, device, equipment, storage medium and program product

By leveraging large language models and the Doris data lake warehouse in business marketing scenarios, the system automates the processing of natural language problem texts, generates data query statements, and produces diagnostic reports. This solves the problem of low data acquisition efficiency in traditional models and enables fast and low-cost data acquisition and analysis.

CN122285696APending Publication Date: 2026-06-26SF TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SF TECH CO LTD
Filing Date
2026-03-09
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies in marketing scenarios suffer from low data acquisition efficiency, long development cycles, high manpower investment, and slow response speed due to data fragmentation, personalized needs, and large data volumes.

Method used

By acquiring the user's input natural language question text, using a large language model for intent recognition, extracting key parameters and matching the query statement of the target business scenario to generate a template, generating a data query statement, and performing data query in the Doris data lake warehouse to generate a structured diagnostic report.

Benefits of technology

It enables automated data querying, shortens development cycles, reduces labor costs, quickly responds to diverse data needs, improves data acquisition efficiency, and adapts to complex, high-concurrency business and marketing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122285696A_ABST
    Figure CN122285696A_ABST
Patent Text Reader

Abstract

This application relates to a data query method, apparatus, device, storage medium, and program product, belonging to the field of computer technology. The method includes: acquiring natural language question text input by a user; performing intent recognition on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs; acquiring a target query statement generation template corresponding to the target business scenario; filling the key parameters into the target query statement generation template to obtain a data query statement; and performing a data query based on the data query statement to obtain the target data. This method can improve data acquisition efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data query method, apparatus, device, storage medium, and program product. Background Technology

[0002] In business scenario marketing, it is often necessary to obtain relevant data from multiple unconnected business systems, various reports, and data sources. Marketing strategies are then optimized based on this data to achieve precise marketing and ultimately increase revenue for the business scenario. Currently, business parties generally use a traditional analysis model that relies on decentralized data integration and manual judgment to obtain the necessary data. However, current business scenarios are diverse, business needs are highly personalized, and data volumes are large and complex. The traditional model, which relies on customized code development and in-depth manual analysis, has long development cycles, high manpower investment, and slow response times, resulting in low data acquisition efficiency. Summary of the Invention

[0003] Therefore, it is necessary to provide a data query method, apparatus, device, storage medium, and program product that can improve the efficiency of data acquisition in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a data query method, the method comprising:

[0005] Obtain the user's input in natural language;

[0006] Intent recognition is performed on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs;

[0007] Obtain the target query statement generation template corresponding to the target business scenario;

[0008] The key parameters are filled into the target query statement generation template to obtain the data query statement;

[0009] Perform a data query based on the stated data query statement to obtain the target data.

[0010] In one embodiment, the step of performing intent recognition on the natural language question text to extract key parameters from the natural language question text and determine the target business scenario to which the natural language question text belongs includes:

[0011] Based on the aforementioned natural language question text, construct prompt words for a large language model;

[0012] The prompt words are input into the large language model to perform intent recognition on the natural language question text, so as to extract key parameters from the natural language question text and determine the target business scenario to which the natural language question text belongs.

[0013] In one embodiment, the method further includes:

[0014] For each candidate business scenario among multiple candidate business scenarios, a candidate query statement generation template corresponding to the candidate business scenario is generated using a template generation model trained for the candidate business scenario.

[0015] The target business scenario is included in the plurality of candidate business scenarios; the template generation model is a lightweight model.

[0016] In one embodiment, the plurality of candidate business scenarios includes at least one of trend diagnosis, anomaly attribution, potential discovery, and free-response questioning.

[0017] In one embodiment, the method further includes:

[0018] Obtain a diagnostic report template that matches the natural language question text;

[0019] The target data is populated into the diagnostic report template to generate a structured diagnostic report that is tailored to the target business scenario and includes data, charts, attributions, and recommendations.

[0020] In one embodiment, the step of performing a data query based on the data query statement to obtain the target data includes:

[0021] The data query statement is sent to the Doris cluster so that the Doris cluster can perform a data query in the Doris data lake warehouse based on the data query statement to obtain the target data;

[0022] The Doris data lake warehouse integrates data from multiple heterogeneous business systems.

[0023] Secondly, this application provides a data query device, the device comprising:

[0024] The acquisition module is used to acquire the natural language question text input by the user;

[0025] The recognition module is used to perform intent recognition on the natural language question text in order to extract key parameters from the natural language question text and determine the target business scenario to which the natural language question text belongs;

[0026] The acquisition module is also used to acquire the target query statement generation template corresponding to the target business scenario; fill the key parameters into the target query statement generation template to obtain the data query statement;

[0027] The query module is used to perform data queries based on the data query statement to obtain the target data.

[0028] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the various method embodiments of this application.

[0029] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various method embodiments of this application.

[0030] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the various method embodiments of this application.

[0031] The aforementioned data query method, apparatus, device, storage medium, and program product acquire natural language question text input by the user; perform intent recognition on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs; acquire a target query statement generation template corresponding to the target business scenario; fill the key parameters into the target query statement generation template to obtain a data query statement; and perform a data query based on the data query statement to obtain the target data. Compared to the traditional model that relies on customized code development and manual analysis, this application achieves automated query generation through natural language interaction, transforming the traditional model that relies on manual code development and in-depth analysis into an intelligent path based on intent recognition and template matching. It automatically extracts key parameters and matches them with business scenarios, directly generating standardized query statements, thereby significantly shortening the development cycle, reducing labor costs, and enabling rapid response to diverse data needs, improving data acquisition efficiency, and better adapting to complex, high-concurrency business and marketing scenarios. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a diagram illustrating the application environment of a data query method in one embodiment.

[0034] Figure 2 This is a flowchart illustrating a data query method in one embodiment;

[0035] Figure 3 This is a flowchart illustrating the data query method in another embodiment;

[0036] Figure 4 This is a structural block diagram of a data query device in one embodiment;

[0037] Figure 5 This is an internal structural diagram of a computer device in one embodiment;

[0038] Figure 6 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0040] The data query method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. The data storage system can be set up separately and can store the data that server 104 needs to process. The data storage system can be integrated into server 104 or placed in the cloud or on other servers. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, vehicle terminals, etc. Server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, cloud security, host security and other network security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. Terminal 102 and server 104 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0041] Server 104 can obtain the natural language question text input by the user in terminal 102; perform intent recognition on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs; obtain the target query statement generation template corresponding to the target business scenario; fill in the key parameters into the target query statement generation template to obtain the data query statement; and perform data query based on the data query statement to obtain the target data.

[0042] It is understood that this embodiment does not limit this aspect. Figure 1 The application scenarios shown are for illustrative purposes only and are not limited to these.

[0043] In one embodiment, such as Figure 2 As shown, a data query method is provided. This method can be applied to computer devices, which can be terminals or servers. That is, the method can be executed independently by the terminal or the server, or it can be implemented through interaction between the terminal and the server. This embodiment uses the application of this method to a computer device as an example for illustration, including the following steps:

[0044] Step 202: Obtain the natural language question text input by the user.

[0045] Among them, natural language question text is data query text described in natural language.

[0046] Specifically, users can input natural language question text in the dialogue interface, and the computer device can obtain the natural language question text input by the user in the dialogue interface.

[0047] For example, a user could be a salesperson who could enter the following natural language question text into the dialog box: "What were the main reasons for the decline in sales of product A in region A last month?" to query the relevant target data.

[0048] Step 204: Perform intent recognition on the natural language question text to extract key parameters from the natural language question text and determine the target business scenario to which the natural language question text belongs.

[0049] Among them, the key parameters are the core data and conditional elements extracted from the natural language question text and used to fill the query statement generation template to generate data query statements.

[0050] In one embodiment, the pre-defined candidate business scenarios include at least one of the following: trend diagnosis, anomaly attribution, potential discovery, and free data querying. Trend diagnosis refers to identifying and analyzing the long-term trends, patterns, and phased characteristics of core business indicators (such as sales revenue and user activity) based on time-series data to determine whether business development is healthy or meets expectations. Anomaly attribution refers to quickly locating and explaining the core influencing factors or root causes of significant fluctuations or deviations from normal ranges in key business indicators through multi-dimensional and correlation analysis. Potential discovery refers to identifying underdeveloped high-value user groups, product opportunities, market space, or growth points from massive amounts of data to guide optimal resource allocation. Free data querying allows business personnel to submit personalized, non-pre-defined data query and analysis requests at any time using natural language or flexible combinations, and quickly obtain accurate data results to meet immediate and exploratory analysis needs.

[0051] For example, the natural language question text "What were the main reasons for the decline in sales of product A in region A last month?" can be identified as belonging to the target business scenario of "attribution of abnormalities". Furthermore, the key parameters "Time: Last month; Region: Region A; Metric: Sales of product A" can be extracted from this natural language question text.

[0052] Step 206: Obtain the target query statement generation template corresponding to the target business scenario.

[0053] Among them, the target query statement generation template is a query statement generation template for the target business scenario.

[0054] Specifically, the computer device can set corresponding query statement generation templates for multiple candidate business scenarios. After determining the target business scenario to which the natural language question text belongs, the computer device can obtain the target query statement generation template corresponding to that target business scenario.

[0055] For example, computer equipment can set corresponding query statement generation templates for several candidate business scenarios, including "trend diagnosis, anomaly attribution, potential mining, and free querying." After determining that the natural language question text "What is the main reason for the decline in sales of product A in region A last month?" belongs to the target business scenario of "anomaly attribution," the computer equipment can obtain the target query statement generation template corresponding to the target business scenario of "anomaly attribution."

[0056] Step 208: Fill in the key parameters into the target query statement generation template to obtain the data query statement.

[0057] Among them, a data query statement is computer code used for data querying. For example, a data query statement can be an SQL statement.

[0058] For example, for the natural language question text "What is the main reason for the decline in sales of product A in region A last month?", the computer device can extract the key parameters "time: last month; region: region A; indicator: sales of product A" from the natural language question text and fill them into the target query statement generation template corresponding to the target business scenario "attribution of abnormalities" to which the natural language question text belongs, so as to generate the data query statement corresponding to the natural language question text.

[0059] Step 210: Perform a data query based on the data query statement to obtain the target data.

[0060] In one embodiment, a computer device can query target data that matches the data query statement from the database of a business system.

[0061] The aforementioned data query method involves: acquiring the user-input natural language question text; performing intent recognition on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs; acquiring a target query statement generation template corresponding to the target business scenario; filling the key parameters into the target query statement generation template to obtain the data query statement; and performing a data query based on the data query statement to obtain the target data. Compared to the traditional model that relies on customized code development and manual analysis, this application achieves automated query generation through natural language interaction, transforming the traditional model that relies on manual code development and in-depth analysis into an intelligent path based on intent recognition and template matching. It automatically extracts key parameters and matches them with business scenarios, directly generating standardized query statements, thereby significantly shortening the development cycle, reducing labor costs, and enabling rapid response to diverse data needs, improving data acquisition efficiency, and better adapting to complex, high-concurrency business and marketing scenarios.

[0062] In one embodiment, intent recognition is performed on natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs. This includes: constructing prompt words for a large language model based on the natural language question text; inputting the prompt words into the large language model to perform intent recognition on the natural language question text through the large language model, so as to extract key parameters and determine the target business scenario to which the natural language question text belongs.

[0063] It is understandable that computer devices can use personalized prompts to guide large language models to accurately understand the business intent behind the user's input query text (i.e., natural language question text), in order to extract key parameters from the user's input query text and determine the target business scenario to which the query text belongs.

[0064] In the above embodiments, compared to traditional rule-based or template-based matching methods, this application leverages the powerful semantic understanding and contextual reasoning capabilities of large language models to more accurately parse complex, colloquial, and even ambiguous natural language queries, automatically identifying business scenarios and extracting structured key parameters. This reduces reliance on preset templates and manual rule bases, improves the system's generalization ability, accuracy, and intelligence level, and can flexibly adapt to rapidly changing business needs and highly personalized data query scenarios.

[0065] In one embodiment, the method further includes: for each of the multiple candidate business scenarios, generating a candidate query statement generation template corresponding to the candidate business scenario using a template generation model trained for the candidate business scenario; wherein the multiple candidate business scenarios include a target business scenario; and the template generation model is a lightweight model.

[0066] The lightweight model is a model that achieves smaller size, faster speed, and lower resource consumption by simplifying the structure, compressing the scale, or optimizing the computing method while keeping the core functions available.

[0067] The fundamental difference between lightweight models and large language models is as follows: Lightweight models aim to achieve efficient and low-cost deployment and inference on specific, limited tasks. Large language models, on the other hand, aim to achieve general language understanding and generation capabilities covering a wide range of tasks through massive parameters and general training, incurring enormous computational overhead. Lightweight models optimize efficiency and scenario adaptability, while large language models extend general intelligent capabilities.

[0068] In one embodiment, the computer device can perform customized training of lightweight models for four high-frequency core business scenarios: trend diagnosis, anomaly attribution, potential mining, and free querying, so as to generate structured and interpretable candidate query statement templates for these four business scenarios.

[0069] In the above embodiments, replacing a single complex model with a distributed, scenario-based lightweight model reduces computational resource consumption and training costs, while ensuring that each business scenario can obtain a highly adapted, dedicated query template, improving template accuracy and generation speed. This design gives the system excellent scalability, enabling it to quickly respond to and cover diverse business needs.

[0070] In one embodiment, the method further includes: obtaining a diagnostic report template that matches the natural language problem text; and populating the diagnostic report template with target data to generate a structured diagnostic report that is tailored to the target business scenario and includes data, charts, attributions, and recommendations.

[0071] In one embodiment, a computer device can populate target data into a diagnostic report template to generate a structured diagnostic report that includes specific data, the main reasons (e.g., a sharp drop in contribution from a certain channel), supporting charts, and specific action recommendations (e.g., checking the channel's inventory and policies) to optimize marketing strategies for the target business scenario and ultimately increase revenue.

[0072] In the above embodiments, the raw target data obtained from the query is automatically transformed into a standardized diagnostic report that can be directly used for decision-making. By automatically matching templates and populating data, rapid generation from data to business insights is achieved. This not only ensures the professionalism and consistency of the report content, format, and analytical dimensions, but also greatly saves the time and effort of manual report preparation, analysis, and writing. It enables business personnel to quickly and accurately obtain complete diagnostic conclusions that include visualization charts, root cause analysis, and action recommendations, directly guiding the optimization of marketing strategies.

[0073] In one embodiment, performing a data query based on a data query statement to obtain target data includes: sending the data query statement to the Doris cluster so that the Doris cluster can perform a data query in the Doris data lake warehouse based on the data query statement to obtain the target data; wherein, the Doris data lake warehouse integrates data from multiple heterogeneous business systems.

[0074] In the above embodiments, the high-performance query capabilities of the Doris lakeware architecture enable rapid analysis of massive amounts of integrated heterogeneous data. It supports high-concurrency queries, incremental data processing, and real-time updates, ensuring the real-time performance and stability of data queries. Simultaneously, it achieves unified access and correlation analysis of data from multiple business systems, completely breaking down data silos and providing real-time and comprehensive data support for precision marketing.

[0075] In one embodiment, such as Figure 3As shown, the computer device can acquire natural language question text input by the user; perform intent recognition on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs. The target business scenario can be any one of trend diagnosis, anomaly attribution, potential mining, or free-form questioning. A target query statement generation template corresponding to the target business scenario is obtained. Key parameters are filled into the target query statement generation template to obtain a data query statement, which is then evaluated. The evaluated data query statement is sent to the Doris cluster, which performs data querying in the Doris data lake warehouse based on the data query statement to obtain and store the target data. The Doris data lake warehouse integrates data from multiple heterogeneous business systems. A diagnostic report template matching the natural language question text is obtained. The target data is filled into the diagnostic report template to generate a structured diagnostic report for the target business scenario, containing data, charts, attributions, and recommendations. The structured diagnostic report is then displayed on the front end.

[0076] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially, these steps are not necessarily executed in that order. Unless otherwise expressly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the above embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0077] Based on the same inventive concept, this application also provides a data query apparatus for implementing the data query method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data query apparatus embodiments provided below can be found in the limitations of the data query method described above, and will not be repeated here.

[0078] In one embodiment, such as Figure 4 As shown, a data query device 400 is provided, which specifically includes:

[0079] The acquisition module 402 is used to acquire the natural language question text input by the user;

[0080] The recognition module 404 is used to perform intent recognition on natural language question text in order to extract key parameters from the natural language question text and determine the target business scenario to which the natural language question text belongs.

[0081] The acquisition module 402 is also used to acquire the target query statement generation template corresponding to the target business scenario; and to fill the key parameters into the target query statement generation template to obtain the data query statement.

[0082] The query module 406 is used to perform data queries based on data query statements to obtain target data.

[0083] In one embodiment, the recognition module 404 is further configured to construct prompt words for a large language model based on the natural language question text; input the prompt words into the large language model to perform intent recognition on the natural language question text through the large language model, so as to extract key parameters from the natural language question text and determine the target business scenario to which the natural language question text belongs.

[0084] In one embodiment, the data query device 400 further includes:

[0085] The generation module is used to generate candidate query statement templates for each of the multiple candidate business scenarios by using a template generation model trained on the candidate business scenarios; wherein the multiple candidate business scenarios include the target business scenario; the template generation model is a lightweight model.

[0086] In one embodiment, the multiple candidate business scenarios include at least one of trend diagnosis, anomaly attribution, potential discovery, and free-response questioning.

[0087] In one embodiment, the data query device 400 further includes:

[0088] The generation module is used to obtain a diagnostic report template that matches the natural language problem text; the target data is then populated into the diagnostic report template to generate a structured diagnostic report that is tailored to the target business scenario and includes data, charts, attributions, and recommendations.

[0089] In one embodiment, the query module 406 is further configured to send a data query statement to the Doris cluster, so that the Doris cluster can perform a data query in the Doris data lake warehouse based on the data query statement to obtain the target data; wherein, the Doris data lake warehouse integrates data from multiple heterogeneous business systems.

[0090] The aforementioned data query device acquires natural language question text input by the user; performs intent recognition on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs; acquires a target query statement generation template corresponding to the target business scenario; fills the key parameters into the target query statement generation template to obtain a data query statement; and performs a data query based on the data query statement to obtain the target data. Compared to the traditional model that relies on customized code development and manual analysis, this application achieves automated query generation through natural language interaction, transforming the traditional model that relies on manual code development and in-depth analysis into an intelligent path based on intent recognition and template matching. It automatically extracts key parameters and matches them with business scenarios, directly generating standardized query statements, thereby significantly shortening the development cycle, reducing labor costs, and enabling rapid response to diverse data needs, improving data acquisition efficiency, and better adapting to complex, high-concurrency business and marketing scenarios.

[0091] Each module in the aforementioned data query device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0092] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data query method.

[0093] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a data query method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0094] Those skilled in the art will understand that Figure 5 and Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0095] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0096] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0097] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0098] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0101] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data query method, characterized in that, The method includes: Obtain the user's input in natural language; Intent recognition is performed on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs; Obtain the target query statement generation template corresponding to the target business scenario; The key parameters are filled into the target query statement generation template to obtain the data query statement; Perform a data query based on the stated data query statement to obtain the target data.

2. The method according to claim 1, characterized in that, The process of performing intent recognition on the natural language question text to extract key parameters and determine the target business scenario to which the natural language question text belongs includes: Based on the aforementioned natural language question text, construct prompt words for a large language model; The prompt words are input into the large language model to perform intent recognition on the natural language question text, so as to extract key parameters from the natural language question text and determine the target business scenario to which the natural language question text belongs.

3. The method according to claim 1, characterized in that, The method further includes: For each candidate business scenario among multiple candidate business scenarios, a candidate query statement generation template corresponding to the candidate business scenario is generated using a template generation model trained for the candidate business scenario. The target business scenario is included in the plurality of candidate business scenarios; the template generation model is a lightweight model.

4. The method according to claim 3, characterized in that, The multiple candidate business scenarios include at least one of the following: trend diagnosis, anomaly attribution, potential mining, and free questioning.

5. The method according to claim 1, characterized in that, The method further includes: Obtain a diagnostic report template that matches the natural language question text; The target data is populated into the diagnostic report template to generate a structured diagnostic report that is tailored to the target business scenario and includes data, charts, attributions, and recommendations.

6. The method according to claim 1, characterized in that, The step of querying data according to the data query statement to obtain the target data includes: The data query statement is sent to the Doris cluster so that the Doris cluster can perform a data query in the Doris data lake warehouse based on the data query statement to obtain the target data; The Doris data lake warehouse integrates data from multiple heterogeneous business systems.

7. A data query device, characterized in that, The device includes: The acquisition module is used to acquire the natural language question text input by the user; The recognition module is used to perform intent recognition on the natural language question text in order to extract key parameters from the natural language question text and determine the target business scenario to which the natural language question text belongs; The acquisition module is also used to acquire the target query statement generation template corresponding to the target business scenario; fill the key parameters into the target query statement generation template to obtain the data query statement; The query module is used to perform data queries based on the data query statement to obtain the target data.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.