Data query method and device, computer device, and storage medium
By receiving user query requests and converting them into specified statements in a unified data analysis language, and using a syntax translator to break down the intent and generate the target query statement of the underlying data source, the problem of low efficiency in multi-data source queries in traditional BI tools is solved, and efficient and accurate data querying is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PING AN PROPERTY INSURANCE CO LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional BI tools suffer from low query efficiency and high technical barriers in cross-database queries in multi-database scenarios. This is especially true in insurance product query scenarios in the financial and insurance field, where users need to write SQL statements in various database dialects, resulting in high query complexity and a high susceptibility to errors, which affects data accuracy.
This paper provides a data query method that receives user query requests, converts them into specified statements in a unified data analysis language, uses a syntax translator to deconstruct the intent, generates the target query statement corresponding to the underlying data source, and executes the query processing using query optimization strategies, thus shielding the differences in the underlying database language.
It reduces the complexity of user data query processing, improves query efficiency and the accuracy of results, and allows users to complete data query processing by focusing only on the visual interface.
Smart Images

Figure CN122152856A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology and can be applied to the financial technology field, particularly to data query methods, devices, computer equipment, and storage media. Background Technology
[0002] In traditional BI tools, cross-database queries in multi-database scenarios rely on SQL statements adapted to different database dialects, significantly increasing technical complexity. Specifically, different database systems (such as Oracle, MySQL, and Hive) have different SQL syntaxes, requiring users to write queries in specific dialects for each data source and understand the differences in the underlying data models. This multi-dialect adaptation requirement significantly raises the technical barrier for users, especially in complex analysis scenarios (such as cross-database joins and aggregation calculations). Users need to repeatedly debug SQL statements to ensure compatibility with different dialects, leading to inefficient and error-prone queries.
[0003] Taking insurance product query scenarios in the financial insurance field as an example, if it is necessary to analyze the sales performance of a certain type of insurance product (such as critical illness insurance) in different data sources, the traditional method requires writing SQL statements adapted to Oracle (core system), MySQL (financial system), and Hive (behavioral system) respectively, and then integrating the results through ETL tools. If cross-database join queries are involved, the distributed transaction and data consistency issues of different databases need to be handled, further increasing the query complexity. In such scenarios, users need to invest a lot of time in learning dialect grammar and data models, and the query results may be biased due to dialect adaptation errors, affecting the accuracy of business decisions.
[0004] Therefore, there is an urgent need to provide a unified method for querying multiple data sources to reduce the technical threshold, improve query efficiency, and ensure the consistency and accuracy of cross-database data. Summary of the Invention
[0005] The purpose of this application is to provide a data query method, apparatus, computer device, and storage medium to solve the technical problem of low query efficiency in the existing traditional BI tools' data query processing mode.
[0006] Firstly, a data query method is provided, including: Receive data query requests from users; wherein the data query requests carry query condition information; Extract the query condition information from the data query request and convert the query condition information into a specified statement corresponding to a preset unified data analysis language; The specified statement is decomposed based on a preset syntax translator to obtain the corresponding query intent; Based on the query intent, a target query statement corresponding to the preset underlying data source information is generated; Based on a preset query optimization strategy, the query engine is used to perform query processing on the target query statement in order to retrieve the corresponding target data from the corresponding database. The target data is sent to the user.
[0007] Secondly, a data query device is provided, comprising: A receiving module is used to receive data query requests sent by users; wherein the data query request carries query condition information; The processing module is used to extract the query condition information from the data query request and convert the query condition information into a specified statement corresponding to a preset unified data analysis language. The decomposition module is used to decompose the specified statement based on a preset syntax translator to obtain the corresponding query intent; The generation module is used to generate a target query statement corresponding to the preset underlying data source information based on the query intent; The query module is used to perform query processing on the target query statement using a query engine based on a preset query optimization strategy, so as to retrieve the corresponding target data from the corresponding database. The sending module is used to send the target data to the user.
[0008] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described data query method.
[0009] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described data query method.
[0010] In the above-described data query method, apparatus, computer equipment, and storage medium, the following steps are taken: First, a data query request from a user is received; the data query request carries query condition information. Then, the query condition information is extracted from the data query request and converted into a specified statement corresponding to a preset unified data analysis language. Next, the specified statement is decomposed based on a preset syntax translator to obtain the corresponding query intent. Subsequently, based on the query intent, a target query statement corresponding to preset underlying data source information is generated. Further, based on a preset query optimization strategy, a query engine is used to perform query processing on the target query statement to retrieve the corresponding target data from the corresponding database. Finally, the target data is sent to the user. Based on the above automated processing flow, this application extracts query condition information from a user-initiated data query request, converts the query condition information into a specified statement corresponding to a unified data analysis language, then decomposes the specified statement using a syntax translator to obtain the query intent, then generates a target query statement corresponding to the underlying data source information based on the query intent, and then, based on a query optimization strategy, uses a query engine to perform query processing on the target query statement to retrieve the target data from the database, and finally sends the target data to the user. Thus, based on the standardized and automated data query processing method proposed in this application, by shielding the differences in underlying database languages, users only need to focus on the visual interface operation or query language to complete the data query processing, which can significantly reduce the processing complexity of user data queries, effectively improve the processing efficiency of data queries, and effectively ensure the accuracy of the generated query results. Attached Figure Description
[0011] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is an exemplary system architecture diagram to which this application can be applied; Figure 2 This is a flowchart of an embodiment of the data query method according to this application; Figure 3 This is a schematic diagram of the structure of one embodiment of the data query device according to this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0014] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0015] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0016] like Figure 1 As shown, system architecture 100 may include terminal device 101, network 102, and server 103. Terminal device 101 may be a laptop 1011, tablet 1012, or mobile phone 1013. Network 102 is used as a medium to provide a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0017] Users can use terminal device 101 to interact with server 103 via network 102 to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0018] Terminal device 101 can be various electronic devices with a display screen and support web browsing. In addition to laptops 1011, tablets 1012, or mobile phones 1013, terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, and a desktop computer, etc.
[0019] Server 103 can be a server that provides various services, such as a backend server that provides support for the pages displayed on terminal device 101.
[0020] It should be noted that the data query method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the data query device is generally set in the server / terminal device.
[0021] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0022] Continue to refer to Figure 2 The flowchart illustrates an embodiment of the data query method according to this application. Depending on different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted. The data query method provided in this application embodiment can be applied to any scenario requiring data querying, and therefore can be applied to products in these scenarios, such as data query products in the financial and insurance fields. The data query method includes the following steps: Step S201: Receive a data query request from a user; wherein the data query request carries query condition information.
[0023] In this embodiment, the data query method runs on an electronic device (e.g., Figure 1The server / terminal device shown can receive data query requests from users via wired or wireless connections. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future wireless connection methods. The implementing entity of this application is specifically a data query system based on BI tools (Business Intelligence software), which can be simply referred to as the system. Users can, according to their own business needs, select preset query conditions (such as drop-down menus for region, time range, product category, etc.) or manually input specific query parameters / conditions (such as custom date ranges, product name keywords, etc.) on the system's visual interface to specify the data information they want to obtain. This application can be applied to data query scenarios in the fintech field. For example, if a sales manager wants to understand the sales of various insurance products in East China in the second quarter of 2024, he will select "East China" as the "Region" in the system's BI tool interface, "Time Range" from "2024-04-01" to "2024-06-30", and "Insurance Products" as the "Product Category".
[0024] Step S202: Extract the query condition information from the data query request and convert the query condition information into a specified statement corresponding to a preset unified data analysis language.
[0025] In this embodiment, the system monitors user operations in real time based on the interface layer. When it detects that the user has completed the input of query conditions and submitted a data query request, the interface layer quickly receives these request information and can extract the query condition information carried in the data query request by performing information extraction. Then, the internal conversion module of the system will convert the natural language query conditions or simple selection operations input by the user into standardized PG-SQL statements (specified statements) corresponding to the unified data analysis language according to pre-set rules. For example, the conditions selected by the user, such as "Region = East China, Time range from 2024-04-01 to 2024-06-30, Product category includes insurance products", will be converted into a PG-SQL statement like "SELECT Product Name, Sales Quantity, Sales Amount FROM Sales Table WHERE Region = 'East China' AND Time BETWEEN '2024-04-01' AND '2024-06-30' AND Product Category LIKE '%Insurance Products%'".
[0026] Specifically, PG-SQL can be used as the unified data analysis language based on actual needs. A standardized PG-SQL interface is exposed to users at the BI tool level, requiring only that users master the operation logic of a single data source and the SQL dialect specification. This forms the foundation of the entire data analysis process, providing unified language support for subsequent integration with indicator cloud services and indicator management systems. This allows users to process data using a unified language in subsequent operations, avoiding confusion caused by differences in database dialects. Furthermore, it transforms users' natural language or simple operations into standardized PG-SQL statements, enabling subsequent data processing within a unified framework. This improves system compatibility and operability, and lays the foundation for integration with indicator cloud services.
[0027] Step S203: Based on a preset syntax translator, the specified statement is decomposed to obtain the corresponding query intent.
[0028] In this embodiment, the specific implementation process of deconstructing the specified statement based on a preset syntax translator to obtain the corresponding query intent will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0029] Step S204: Based on the query intent, generate a target query statement corresponding to the preset underlying data source information.
[0030] In this embodiment, the specific implementation process of generating a target query statement corresponding to the preset underlying data source information based on the query intent will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0031] Step S205: Based on a preset query optimization strategy, the query engine is used to perform query processing on the target query statement in order to retrieve the corresponding target data from the corresponding database.
[0032] In this embodiment, the specific implementation process of using a query engine to perform query processing on the target query statement based on the preset query optimization strategy to retrieve the corresponding target data from the corresponding database will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0033] Step S206: Send the target data to the user.
[0034] In this embodiment, the specific implementation process of sending the target data to the user will be described in more detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0035] This application first receives a data query request from a user, wherein the data query request carries query condition information; then, it extracts the query condition information from the data query request and converts the query condition information into a specified statement corresponding to a preset unified data analysis language; then, it performs intent decomposition on the specified statement based on a preset syntax translator to obtain the corresponding query intent; subsequently, based on the query intent, it generates a target query statement corresponding to preset underlying data source information; further, based on a preset query optimization strategy, it uses a query engine to perform query processing on the target query statement to retrieve the corresponding target data from the corresponding database; finally, it sends the target data to the user. Based on the above automated processing flow, this application extracts query condition information from a user-initiated data query request, converts the query condition information into a specified statement corresponding to a unified data analysis language, then performs intent decomposition on the specified statement using a syntax translator to obtain the query intent, then generates a target query statement corresponding to the underlying data source information based on the query intent, then performs query processing on the target query statement using a query optimization strategy to retrieve the target data from the database, and finally sends the target data to the user. Thus, based on the standardized and automated data query processing method proposed in this application, by shielding the differences in underlying database languages, users only need to focus on the visual interface operation or query language to complete the data query processing, which can significantly reduce the processing complexity of user data queries, effectively improve the processing efficiency of data queries, and effectively ensure the accuracy of the generated query results.
[0036] In some alternative implementations, step S203 includes the following steps: The grammar translator performs grammatical analysis on the specified statement to obtain the corresponding analysis results.
[0037] In this embodiment, the aforementioned syntax translator refers to a pre-built SQL translation and intent decomposition module. The syntax translator can be used to perform syntax analysis on the specified statement, such as a PG-SQL statement, to identify the various components of the statement, such as column names in the SELECT clause, table names in the FROM clause, and conditional expressions in the WHERE clause, in order to obtain the corresponding analysis results.
[0038] A corresponding execution plan is generated based on the analysis results.
[0039] In this embodiment, an execution plan can be generated based on the obtained analysis results to clarify the execution steps and order of the query.
[0040] Based on the execution plan, the specified statement is decomposed into intents to obtain the corresponding intent results.
[0041] In this embodiment, the intent of the specified statement is broken down step by step according to the obtained execution plan and transformed into a query intent that the indicator cloud interface can understand, i.e., the intent result. For example, for the above PG-SQL statement, it will be broken down to obtain indicators such as "insurance product name", "sales quantity" and "sales amount", and the data with the region "East China", the time within the specified range and the product category including "insurance product" will be filtered from the "sales table".
[0042] The intent result is taken as the query intent.
[0043] In this embodiment, by translating PG-SQL statements into query intents corresponding to the indicator cloud interface, semantic conversion between different systems is achieved. This enables the indicator cloud service to understand the user's query needs and obtain the corresponding data from the underlying data source based on these needs, providing accurate direction for subsequent data querying and processing.
[0044] This application performs syntactic analysis on the specified statement using the syntactic translator to obtain the corresponding analysis results; then generates a corresponding execution plan based on the analysis results; subsequently, it decomposes the specified statement into intents based on the execution plan to obtain the corresponding intent results; and finally, it uses the intent results as the query intent. Based on the above processing flow, this application achieves efficient and accurate intent decomposition of the specified statement by using a syntactic translator to obtain analysis results, generates an execution plan based on the analysis results, decomposes the specified statement into intents based on the execution plan, and uses the obtained intent results as the corresponding query intent. This ensures the accuracy of the generated query intent.
[0045] In some optional implementations of this embodiment, step S204 includes the following steps: Call the preset indicator cloud service.
[0046] In this embodiment, the aforementioned indicator cloud service is a pre-built server capable of understanding user query needs and retrieving corresponding data from the underlying data source based on these needs, providing accurate direction for subsequent data queries and processing. Specifically, a syntax translator from PG-SQL to indicator cloud API parameters enables semantic integration between the BI tool and the indicator cloud service. This is akin to building a translation bridge between two different languages, allowing them to understand and communicate with each other.
[0047] In addition, the system has constructed an indicator management system, including: Standardized Configuration: Establishing a standardized configuration system for indicators / dimensions, generating business indicators through visual drag-and-drop. For example, users can combine different data fields into the required business indicators, such as sales revenue and profit margin, through simple drag-and-drop operations. Logical Mapping: Implementing a standardized mapping between indicator calculation logic and data table fields, automatically shielding differences in underlying fields. Regardless of how the fields in the underlying data table are named and stored, the indicator value can be accurately calculated through standardized mapping relationships. Unified Management: Unifying the indicator processing standards, effectively avoiding the problem of duplicate calculations. Furthermore, adopting a "one-stop definition, multiple-use" approach, uniformly defining indicator standards and data sources in the indicator cloud, and synchronizing them in real time to various BI tools, ensuring consistent standards and unified data source management. For example, if the calculation standard and data source for "monthly sales revenue" are defined in one place, all BI tools using this indicator can obtain consistent information.
[0048] In addition, the system provides registration and discovery functions, including: metrics and physical tables defined by users in the Metrics Cloud can be sent to the Semantic Layer Engine in real time via message queue (MQ), enabling them to be used immediately upon definition. Simultaneously, the metadata of metrics and tables is stored in the Metrics Cloud system, and the Semantic Layer Engine directly connects to the API when querying table metadata; modifications are also in real time. This ensures data timeliness and consistency, allowing users to quickly obtain the latest defined metric and table information.
[0049] Obtain pre-configured underlying data source information.
[0050] In this embodiment, the aforementioned underlying data source information is pre-configured based on actual business query requirements, such as data source type MySQL, DRUID, etc., as well as data source connection address, username, password, etc.
[0051] Obtain the metrics and conditions from the query intent.
[0052] In this embodiment, information can be extracted from the obtained query intent to obtain corresponding indicators and conditions.
[0053] Based on the aforementioned indicator cloud service, a specified query statement corresponding to the underlying data source information is generated according to the indicators and conditions in the query intent.
[0054] In this embodiment, by using the Metrics Cloud Service and combining the metrics and conditions in the query intent, an SQL query statement suitable for the underlying data source is generated, i.e., a specified query statement. For example, if the underlying data source is MySQL, the Metrics Cloud Service will generate a MySQL statement similar to "SELECT Product Name, Sales Quantity, Sales Amount FROM Sales Table WHERE Region = 'East China' AND Time BETWEEN '2024-04-01' AND '2024-06-30' AND Product Category LIKE '%Insurance Products%'" based on the query intent; in addition, if the underlying data source is Druid, a query statement conforming to Druid query syntax rules will be generated.
[0055] Use the specified query statement as the target query statement.
[0056] In this embodiment, the indicator cloud service plays a role in adapting to different underlying data sources. Since different database systems have their own syntax rules and characteristics, the indicator cloud service can generate corresponding SQL query statements based on the type of the underlying data source, ensuring that the query can be executed on the correct data source, thereby obtaining accurate data and improving the system's flexibility and compatibility.
[0057] This application calls a preset indicator cloud service; then obtains pre-configured underlying data source information; and obtains the indicators and conditions in the query intent; subsequently, based on the indicator cloud service, it generates a specified query statement corresponding to the underlying data source information according to the indicators and conditions in the query intent; and then uses the specified query statement as the target query statement. Based on the above processing flow, this application obtains pre-configured underlying data source information, and then, based on the invoked indicator cloud service, generates a specified query statement corresponding to the underlying data source information according to the indicators and conditions in the obtained query intent, and uses it as the required target query statement. This enables intelligent and accurate generation of target query statements that conform to the syntax rules of the underlying data source, ensuring the accuracy and standardization of the target query statement.
[0058] In some alternative implementations, step S205 includes the following steps: Based on preset slicing rules, the query task corresponding to the target query statement is sliced to obtain multiple corresponding query subtasks.
[0059] In this embodiment, the selection of the above-mentioned slicing rules is not specifically limited; either time-dimensional slicing rules or spatial-dimensional slicing rules can be used. Specifically, time-dimensional slicing rules include: when querying annual sales data for a certain region, the query task is divided into 12 slices according to the months. For example, the sales data for each month from January to December is queried separately, with each slice independently retrieving the data for the corresponding month from the database. Finally, the data for the 12 months are aggregated and merged to obtain the annual sales data. This method can avoid the performance pressure caused by querying a large amount of data at once and improve query efficiency. Spatial-dimensional slicing rules include: for a large chain enterprise's sales data query, if the sales situation of all stores nationwide is to be queried, the query task can be sliced according to the region (such as province or city). For example, the query task can be divided into slices targeting different regions such as Beijing, Shanghai, and Guangdong. Each slice queries the sales data of stores in the corresponding region, and finally, the data is merged to obtain the national sales data. In this way, the query task corresponding to the above target query statement can be sliced according to the selected slicing rules, thereby splitting the query task into multiple relatively independent and smaller query sub-tasks (slices), and each slice can perform query operations independently.
[0060] Based on a pre-defined parallel computing framework, multiple query engines are used to perform parallel query processing on each of the query subtasks in order to retrieve multiple corresponding query result data from the database.
[0061] In this embodiment, by leveraging a parallel computing framework, multiple query subtasks can be simultaneously assigned to different query engines (such as computing nodes) for processing. This means that each query subtask is executed in parallel from the database corresponding to the query task, thereby shortening the overall query processing time. For example, consider querying sales data for multiple insurance products: when querying the sales data of multiple insurance products, such as simultaneously querying the sales quantities of insurance product A, insurance product B, and insurance product C, a parallel computing framework can be used to simultaneously launch three computing tasks, each calculating the sales quantity of each insurance product. Each computing task runs independently without interference, and finally, the sales quantities of the three insurance products are aggregated and returned. Compared to serial computing (calculating the sales quantity of each product sequentially), parallel computing can significantly shorten the query time.
[0062] For example, for complex data analysis queries: Queries involving multiple metrics and dimensions, such as simultaneously analyzing sales and profits across different regions, time periods, and product categories, can be broken down into multiple sub-tasks. These tasks can be performed in parallel, and the results can be integrated to improve query efficiency.
[0063] The multiple query results are integrated to obtain the corresponding integrated data.
[0064] In this embodiment, the query results data of each slice (query subtask) can be merged and integrated, and the resulting integrated data can be used as the final complete query result, i.e., the target data.
[0065] The integrated data is used as the target data.
[0066] This application slices the query task corresponding to the target query statement based on preset slicing rules to obtain multiple corresponding query subtasks. Then, based on a preset parallel computing framework, multiple query engines are used to perform parallel query processing on each of the query subtasks to retrieve multiple query result data from the database. The multiple query result data are then integrated to obtain corresponding integrated data. This integrated data is subsequently used as the target data. Based on the above processing flow, this application, by slicing the query task and decomposing the query task corresponding to the target query statement into smaller tasks for parallel execution, can fully utilize the system's computing resources and improve query efficiency. Furthermore, by using a parallel computing framework to execute multiple query subtasks simultaneously, the computation speed can be greatly accelerated, further improving query efficiency.
[0067] In some alternative implementations, step S206 includes the following steps: The target data is organized and packaged according to a preset format to obtain the corresponding first response data.
[0068] In this embodiment, query results (i.e., target data) can be encapsulated according to a predefined data model (such as a star schema or wide table) and supplemented with metadata (such as field meanings, units, and data sources). For example, insurance sales data may include contextual information such as "currency type" and "statistical period." If data anomalies are detected (such as null values or type mismatches), an error log is recorded, and some valid data or default values are returned. Simultaneously, the abnormal status is reported to the indicator semantic layer (such as an HTTP 500 error with an error code). High-frequency query results can be cached (e.g., using Redis) or compressed (e.g., using Gzip) to reduce network transmission overhead.
[0069] The first response data is processed based on a preset semantic layer of indicators to obtain the corresponding second response data.
[0070] In this embodiment, the above processing includes: Semantic parsing and mapping: Mapping the data fields of the second response data to business semantics (e.g., mapping the "revenue" field to "revenue"), and applying business rules (e.g., currency conversion, unit conversion). For example, converting "sales_amount" in the database to the currency of the user's region according to the exchange rate. Data consistency verification: Ensuring data accuracy through predefined verification rules (e.g., summation verification, uniqueness constraints). For example, verifying whether "total sales" in the same report equals the sum of sales of each category. Aggregation and calculation: Performing secondary calculations (year-on-year, month-on-month, percentage) according to user needs. For example, calculating the growth rate of "insurance sales this month" and "insurance sales last month". Dimension expansion: Supplementing derived dimensions (e.g., expanding the timestamp to a multi-level dimension of "year-month-day") to facilitate drill-down analysis by BI tools.
[0071] Get the preset display method.
[0072] In this embodiment, the above display method can be determined according to the user's query needs, such as intuitive charts (e.g., bar charts, line charts, pie charts, etc.) and reports (e.g., tabular sales reports, profit reports, etc.).
[0073] The second response data is displayed and processed based on the aforementioned display method.
[0074] In this embodiment, the obtained second response data can be displayed to the user in a selected display method. For example, the sales volume of different insurance products in a certain region and time period can be displayed in the form of a bar chart in the BI tool interface. Users can intuitively compare the sales of different insurance products through the chart.
[0075] This application obtains first response data by organizing and encapsulating the target data according to a preset format; then, it processes the first response data based on a preset indicator semantic layer to obtain second response data; subsequently, it obtains a preset display method; and then displays the second response data based on the display method. Based on the above processing flow, this application ensures the accuracy and consistency of the obtained second response data by organizing and encapsulating the target data according to a preset format, and then processing the first response data based on an indicator semantic layer. Furthermore, by displaying the second response data based on the obtained display method, the application intelligently presents the target data in a form that is easy for users to understand and analyze, enabling users to quickly obtain the information they need for business analysis and decision-making. This realizes the value of data querying, improves the intelligence of data querying, and enhances the user experience.
[0076] In some optional implementations of this embodiment, before step S205, the electronic device may further perform the following steps: Analyze the pre-stored query logs to identify specified data tables that meet preset access optimization criteria.
[0077] In this embodiment, the system can use the indicator cloud service to continuously monitor query performance. By analyzing query logs and performance indicators, it can identify data tables that are frequently accessed but have slow query speeds, i.e., specified data tables that meet the access optimization conditions.
[0078] Obtain various preset data source acceleration strategies.
[0079] In this embodiment, the aforementioned data source acceleration strategy includes at least an offline OLAP engine ingestion acceleration strategy and a materialized view pre-computation acceleration strategy. Specifically, the principle of the offline OLAP engine ingestion acceleration strategy is to directly ingest frequently accessed and slow-querying table data offline into an OLAP (Online Analytical Processing) engine, such as Druid or Doris, in the background. OLAP engines are specifically designed for fast querying and analysis of large-scale data, featuring efficient storage structures and query algorithms. Application: For example, in an e-commerce business system, the order table contains a large amount of data and is frequently used for various analytical queries, such as calculating order quantity and sales by time, region, and product category. If the native database responds slowly to these queries, the indicator cloud will ingest the order table data offline into the Doris engine. During queries, data is directly retrieved from the Doris engine, leveraging its optimized query performance to quickly return results, significantly shortening query time.
[0080] The principle behind the materialized view pre-computation acceleration strategy is as follows: a materialized view is a pre-computation and storage of query results. By defining specific query conditions, the query results are stored in the database in the form of a view. When subsequent identical or similar query requests occur, the results are directly retrieved from the materialized view, avoiding redundant calculations and thus improving query speed. Application example: In a financial business system, it is often necessary to query the total transaction amount of different accounts within a certain time period. A materialized view can be created to aggregate and calculate transaction data according to time range and account dimension, and then store the data. When a user initiates a query request, the system directly retrieves the corresponding data from the materialized view, without needing to perform complex aggregation calculations on the original transaction data again, thus quickly returning the query results.
[0081] Select the target data source acceleration strategy from all the described data source acceleration strategies.
[0082] In this embodiment, a strategy can be randomly selected from the above-mentioned data source acceleration strategies according to actual business needs, and used as the target data source acceleration strategy.
[0083] The query optimization process for the specified data table is performed based on the target data source acceleration strategy.
[0084] In this embodiment, the query optimization process for the specified data table can be performed according to the acceleration processing steps corresponding to the selected target data source acceleration strategy.
[0085] This application analyzes pre-stored query logs to identify specified data tables that meet preset access optimization conditions; then it obtains multiple preset data source acceleration strategies; subsequently, it selects a target data source acceleration strategy from all the data source acceleration strategies; and finally, it performs query optimization processing on the specified data tables based on the target data source acceleration strategy. Based on the above processing flow, this application analyzes pre-stored query logs to identify specified data tables that meet access optimization conditions, then selects a target data source acceleration strategy from multiple data source acceleration strategies, and performs query optimization processing on the specified data tables based on the selected target data source acceleration strategy. This enables automatic and intelligent query optimization of frequently accessed but poorly performing data tables, reducing data reading and computation during queries, improving query response speed, and enhancing user experience.
[0086] In some optional implementations of this embodiment, before step S205, the electronic device may further perform the following steps: Monitor and query the specified performance data corresponding to the target metrics.
[0087] In this embodiment, the system monitors the P95 performance data of the metric query in real time (i.e., the time spent by 95% of the query requests), which is the specified performance data mentioned above.
[0088] Determine whether the specified performance data is greater than a preset performance threshold.
[0089] In this embodiment, the value of the above performance threshold is not specifically limited, and can be determined according to the actual performance evaluation requirements. For example, it can be set to 2 seconds.
[0090] If so, retrieve the target data table corresponding to the target indicator query.
[0091] In this embodiment, the aforementioned target data table refers to the data table involved in the query of the aforementioned target indicators.
[0092] The target data table is optimized for query processing based on a preset materialization acceleration strategy.
[0093] In this embodiment, when real-time monitoring detects that the P95 performance of an indicator query has dropped to a certain level, the system automatically triggers a materialization acceleration strategy. For example, if the original P95 response time for a certain indicator query was 1 second, and it is detected to have increased to 3 seconds, the system determines that the performance has significantly degraded and automatically decides to create a materialized view for the relevant table or update and optimize an existing materialized view to improve the efficiency of subsequent queries and bring the query response time back to an acceptable range.
[0094] This application monitors and queries specified performance data corresponding to target metrics; then determines whether the specified performance data exceeds a preset performance threshold; if so, it obtains the target data table corresponding to the target metric query; subsequently, it optimizes the query of the target data table based on a preset materialized acceleration strategy. Based on this process, this application monitors and queries specified performance data corresponding to target metrics, and when the specified performance data is detected to exceed a preset performance threshold, it optimizes the query of the target data table based on a materialized acceleration strategy, thereby automatically adjusting the acceleration strategy according to real-time query performance. When query performance declines, timely optimization measures are taken to ensure that the system's query performance remains at a good level, avoiding disruption to normal user experience due to performance degradation, and ensuring the stability and intelligence of data query processing.
[0095] In some optional implementations, the system also features optimization of the data query process based on hot data processing. Hot data refers to frequently accessed data in a data query. The query performance of this data significantly impacts the overall system's query efficiency. The Indicator Cloud Service monitors hot data in real time, categorizes it, and processes it centrally. Hot data categorization: By analyzing query logs, access frequency, and other data, hot data is identified. For example, on a social media platform, celebrity updates and posts under trending topics are often hot data because many users frequently access this content. Centralized processing: The categorized hot data is centrally stored on higher-performance storage media or dedicated storage areas, or a special index structure is created for it. For example, storing hot data on SSDs (Solid State Drives) offers faster read and write speeds compared to traditional HDDs (Hard Disk Drives), significantly improving query speed. Simultaneously, appropriate indexes, such as full-text indexes and composite indexes, are created to accelerate data retrieval based on the query characteristics of hot data. When a user queries hot data, the system can quickly locate and return results, improving the user experience. Hotspot data processing involves optimizations targeting data accessed frequently. Because hotspot data is frequently queried, special processing of it can significantly improve query efficiency, reduce user waiting time, and enhance overall system performance.
[0096] In some alternative implementations, the system can also optimize the data query process by using techniques such as compute-storage separation, multi-level caching mechanisms, and preloading of hot data, including: 1. Compute-Storage Separation. Principle: This architecture separates data storage and computation functions. Data is stored in a distributed file system (such as HDFS), while computation tasks are performed in the memory of a dedicated computing engine. This architecture fully leverages the advantages of both storage and computation, improving resource utilization efficiency. Application Scenarios and Methods: Large-Scale Data Queries: When handling large-scale data queries, data is stored in HDFS. HDFS offers high fault tolerance and scalability, capable of storing massive amounts of data. Computing engines (such as Spark and Flink) read the required data from HDFS into memory for computation. For example, when querying user behavior data from a large e-commerce platform, the data is stored in HDFS, and the computing engine reads relevant data into memory based on the query conditions for aggregation and analysis, avoiding complex computations on storage nodes and reducing latency in data reading and computation. Elastic Resource Allocation: The compute-storage separation architecture can dynamically allocate computing resources based on the needs of query tasks. When there are many query tasks and high computational pressure, the memory and number of computing nodes in the computing engine can be increased; when there are fewer query tasks, computing resources can be reduced, improving resource utilization efficiency.
[0097] 2. Multi-level caching mechanism. Principle: A multi-level caching strategy combining local and distributed caching is employed. The local cache resides on the query client or compute node, offering fast access speeds; the distributed cache is deployed across multiple nodes, providing large capacity and shareability. The system first searches for the required data in the local cache. If not found there, it searches in the distributed cache. Finally, if still not found in the distributed cache, the data is retrieved from the database and the cache is updated. Application scenarios and methods: For frequently queried data: For frequently queried data, such as basic product information and trending news on e-commerce platforms, it is cached in both local and distributed caches. When a user initiates a query, the system first searches in the local cache. If found, the result is returned directly without accessing the distributed cache or database, significantly improving query speed. If not found in the local cache, it searches in the distributed cache, reducing database access pressure. For scenarios with infrequent data updates: In scenarios with infrequent data updates, the multi-level caching strategy effectively reduces redundant calculations. For example, in a statistical reporting system, daily statistical data can be cached. When a user queries the same statistical report multiple times, the data is retrieved directly from the cache, avoiding the need to perform complex statistical calculations again for each query.
[0098] 3. Hot Data Preloading. Principle: By automatically identifying popular queries, the system preloads hot data into the cache when system resources are abundant (e.g., during off-peak hours). This allows users to retrieve data directly from the cache when a user initiates a hot query, eliminating the need for real-time database access and improving query response speed. Application Scenarios and Methods: Popular Product Queries: In e-commerce systems, sales data and reviews of popular products are frequently queried by users. The system can automatically identify these popular products and preload relevant data into the cache during off-peak hours (e.g., early morning). When users query popular product information during peak daytime hours, data can be quickly retrieved from the cache, improving user experience. Hot News Queries: For news and information applications, details and comments of hot news stories are accessed by a large number of users. The system can identify hot news based on metrics such as click-through rates and popularity, and preload hot news data into the cache when resources are abundant, ensuring a fast response when users query.
[0099] In some alternative implementations, the user information obtained is subject to user consent and complies with relevant laws and policies.
[0100] Furthermore, any software tools or components not belonging to our company that appear in the embodiments of this application are merely illustrative examples and do not represent actual use.
[0101] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0102] It should be emphasized that, to further ensure the privacy and security of the aforementioned target data, the target data can also be stored in a node of a blockchain.
[0103] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0104] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0105] 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 instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0106] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly 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 steps in the flowcharts of the accompanying figures 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, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0107] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a data query device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0108] like Figure 3As shown, the data query device 300 described in this embodiment includes: a receiving module 301, a processing module 302, a disassembly module 303, a generation module 304, a query module 305, and a sending module 306. Wherein: The receiving module 301 is used to receive a data query request sent by a user; wherein the data query request carries query condition information. Processing module 302 is used to extract the query condition information from the data query request and convert the query condition information into a specified statement corresponding to a preset unified data analysis language; The decomposition module 303 is used to decompose the specified statement based on a preset syntax translator to obtain the corresponding query intent; The generation module 304 is used to generate a target query statement corresponding to the preset underlying data source information based on the query intent; The query module 305 is used to perform query processing on the target query statement using a query engine based on a preset query optimization strategy, so as to retrieve the corresponding target data from the corresponding database. The sending module 306 is used to send the target data to the user.
[0109] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the data query method in the aforementioned embodiments, and will not be repeated here.
[0110] In some optional implementations of this embodiment, the disassembly module 303 includes: The analysis submodule is used to perform syntactic analysis on the specified statement based on the syntactic translator and obtain the corresponding analysis results. The first generation submodule is used to generate a corresponding execution plan based on the analysis results; The decomposition submodule is used to decompose the specified statement based on the execution plan to obtain the corresponding intent result; The first determining submodule is used to take the intent result as the query intent.
[0111] In some optional implementations of this embodiment, the generation module 304 includes: Calling submodules is used to call preset indicator cloud services; The first acquisition submodule is used to acquire pre-configured underlying data source information; The second acquisition submodule is used to acquire the indicators and conditions in the query intent; The second generation submodule is used to generate a specified query statement corresponding to the underlying data source information based on the indicator cloud service and the indicators and conditions in the query intent. The second determining submodule is used to use the specified query statement as the target query statement.
[0112] In some optional implementations of this embodiment, the query module 305 includes: The slicing submodule is used to slice the query task corresponding to the target query statement based on preset slicing rules to obtain multiple corresponding query subtasks. The query submodule is used to perform parallel query processing on each of the query subtasks using multiple query engines based on a preset parallel computing framework, so as to retrieve the corresponding multiple query result data from the database. The integration submodule is used to integrate the multiple query result data to obtain the corresponding integrated data; The third determining submodule is used to use the integrated data as the target data.
[0113] In some optional implementations of this embodiment, the sending module 306 includes: The processing submodule is used to organize and encapsulate the target data based on a preset format to obtain the corresponding first response data; The processing submodule is used to process the first response data based on a preset indicator semantic layer to obtain the corresponding second response data; The third submodule is used to obtain the preset display method; The display submodule is used to display the second response data based on the display method.
[0114] In some optional implementations of this embodiment, the data query device further includes: The identification module is used to analyze the pre-stored query logs to identify specified data tables that meet preset access optimization conditions. The first acquisition module is used to acquire various preset data source acceleration strategies; The filtering module is used to filter out the target data source acceleration strategy from all the data source acceleration strategies. The first optimization module is used to perform query optimization processing on the specified data table based on the target data source acceleration strategy.
[0115] In some optional implementations of this embodiment, the data query device further includes: The monitoring module is used to monitor and query specified performance data corresponding to target metrics; The judgment module is used to determine whether the specified performance data is greater than a preset performance threshold; The second acquisition module is used to acquire the target data table corresponding to the target indicator query if the target indicator query is true; The second optimization module is used to perform query optimization processing on the target data table based on a preset materialization acceleration strategy.
[0116] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the data query method in the aforementioned embodiments, and will not be repeated here.
[0117] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0118] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0119] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0120] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for data querying methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.
[0121] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the data query method.
[0122] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.
[0123] Compared with the prior art, the embodiments of this application have the following beneficial effects: In this embodiment, based on the standardized and automated data query processing method proposed in this application, by shielding the differences in underlying database languages, users only need to focus on the visual interface operation or query language to complete the data query processing. This can significantly reduce the processing complexity of user data queries, effectively improve the processing efficiency of data queries, and effectively ensure the accuracy of the generated query results.
[0124] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the data query method described above.
[0125] Compared with the prior art, the embodiments of this application have the following main advantages: In this embodiment, based on the standardized and automated data query processing method proposed in this application, by shielding the differences in underlying database languages, users only need to focus on the visual interface operation or query language to complete the data query processing. This can significantly reduce the processing complexity of user data queries, effectively improve the processing efficiency of data queries, and effectively ensure the accuracy of the generated query results.
[0126] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0127] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A data query method, characterized in that, Includes the following steps: Receive data query requests from users; wherein the data query requests carry query condition information; Extract the query condition information from the data query request and convert the query condition information into a specified statement corresponding to a preset unified data analysis language; The specified statement is decomposed based on a preset syntax translator to obtain the corresponding query intent; Based on the query intent, a target query statement corresponding to the preset underlying data source information is generated; Based on a preset query optimization strategy, the query engine is used to perform query processing on the target query statement in order to retrieve the corresponding target data from the corresponding database. The target data is sent to the user.
2. The data query method according to claim 1, characterized in that, The step of deconstructing the specified statement based on a preset syntax translator to obtain the corresponding query intent specifically includes: The specified statement is analyzed using the grammar translator to obtain the corresponding analysis results. A corresponding execution plan is generated based on the analysis results; Based on the execution plan, the specified statement is decomposed to obtain the corresponding intent result; The intent result is taken as the query intent.
3. The data query method according to claim 1, characterized in that, The step of generating a target query statement corresponding to the preset underlying data source information based on the query intent specifically includes: Call the preset indicator cloud service; Obtain pre-configured underlying data source information; Obtain the metrics and conditions from the query intent; Based on the aforementioned indicator cloud service, a specified query statement corresponding to the underlying data source information is generated according to the indicators and conditions in the query intent. Use the specified query statement as the target query statement.
4. The data query method according to claim 1, characterized in that, The step of using a query engine to perform query processing on the target query statement based on a preset query optimization strategy to retrieve the corresponding target data from the corresponding database specifically includes: Based on preset slicing rules, the query task corresponding to the target query statement is sliced to obtain multiple corresponding query subtasks; Based on a pre-defined parallel computing framework, multiple query engines are used to perform parallel query processing on each of the query subtasks in order to retrieve the corresponding multiple query result data from the database. The multiple query results are integrated to obtain the corresponding integrated data; The integrated data is used as the target data.
5. The data query method according to claim 1, characterized in that, The step of sending the target data to the user specifically includes: The target data is organized and packaged according to a preset format to obtain the corresponding first response data. The first response data is processed based on a preset indicator semantic layer to obtain the corresponding second response data; Get the preset display method; The second response data is displayed and processed based on the aforementioned display method.
6. The data query method according to claim 1, characterized in that, Before the step of using a query engine to perform query processing on the target query statement based on a preset query optimization strategy to retrieve the corresponding target data from the corresponding database, the method further includes: Analyze the pre-stored query logs to identify specified data tables that meet preset access optimization criteria; Obtain various preset data source acceleration strategies; Select the target data source acceleration strategy from all the described data source acceleration strategies; The query optimization process for the specified data table is performed based on the target data source acceleration strategy.
7. The data query method according to claim 1, characterized in that, Before the step of using a query engine to perform query processing on the target query statement based on a preset query optimization strategy to retrieve the corresponding target data from the corresponding database, the method further includes: Monitor and query the specified performance data corresponding to the target metrics; Determine whether the specified performance data is greater than a preset performance threshold; If so, retrieve the target data table corresponding to the target indicator query; The target data table is optimized for query processing based on a preset materialization acceleration strategy.
8. A data query device, characterized in that, include: A receiving module is used to receive data query requests sent by users; wherein the data query request carries query condition information; The processing module is used to extract the query condition information from the data query request and convert the query condition information into a specified statement corresponding to a preset unified data analysis language. The decomposition module is used to decompose the specified statement based on a preset syntax translator to obtain the corresponding query intent; The generation module is used to generate a target query statement corresponding to the preset underlying data source information based on the query intent; The query module is used to perform query processing on the target query statement using a query engine based on a preset query optimization strategy, so as to retrieve the corresponding target data from the corresponding database. The sending module is used to send the target data to the user.
9. A computer device, characterized in that, The system includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the data query method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the data query method as described in any one of claims 1 to 7.