Timing sequence database intelligent query system based on natural language description

The intelligent query system for time-series databases based on natural language description solves the high-barrier query problem for non-technical users, and realizes efficient, secure and real-time data access. It is suitable for rapid data analysis in fields such as industrial IoT, finance, energy and utilities, healthcare, intelligent transportation and environmental monitoring.

CN121365077APending Publication Date: 2026-01-20成都虚谷伟业科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411768865.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Existing time-series database query systems are not user-friendly enough for non-technical users, have high learning costs, and are unable to quickly respond to dynamic query needs, resulting in low data insight efficiency and impacting business decisions and resource allocation.

Method used

Design an intelligent query system for time-series databases based on natural language description, including a user interface module, a natural language understanding module, a query generation module, a query optimization module, an execution and data acquisition module, a result display and analysis module, a user feedback and system improvement module, and a security and access control module, to achieve full-process optimization from natural language to time-series database query.

Benefits of technology

It lowers the technical threshold, improves data query efficiency and accuracy, supports multi-platform compatibility, enables real-time and flexible data access, enhances data security, and is suitable for the rapid decision-making needs of multiple industries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365077A_ABST
    Figure CN121365077A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence database intelligent query system based on natural language description, and the system comprises a user interface module which is used for providing a user interface and supporting a user to input natural language query; the natural language understanding module is used for converting a natural language input by a user into intermediate representation which can be understood by the system; the query generation module is used for converting the intermediate representation into a specific time sequence database query statement; the query optimization module is used for optimizing the generated query statement to improve the query efficiency; the execution and data acquisition module is used for interacting with the time sequence database, executing query and acquiring a result; and the result display and analysis module is used for displaying the query result to the user in a visual form. According to the method, the whole process from natural language description to time sequence database query can be realized, the technical threshold is greatly reduced, and the efficiency and effect of data analysis are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of time series database, and particularly relates to a time series database intelligent query system based on natural language description. BACKGROUND

[0002] Time series databases (TSDB) have been widely used in the fields of Internet of Things, finance, industrial monitoring, etc. Such databases are specially optimized for the characteristics of time series data (such as high-frequency insertion, time dimension query optimization, etc.). Common time series databases include InfluxDB, TimescaleDB and TDengine. Time series databases usually operate data based on extended SQL or custom query languages, such as InfluxQL and SQL extensions of TimescaleDB. These languages are friendly to technical users, but have high learning costs for non-technical users, especially the writing of complex queries (such as aggregation, multi-condition filtering, cross-time window analysis, etc.) requires certain professional knowledge.

[0003] NLP technology has made significant progress in recent years. Large models (such as the GPT series) perform well in language understanding, context analysis, etc., and have been widely used in text generation, translation, voice assistants, etc. However, the application of NLP technology in database query is still in its early stages, and most of it is focused on general database queries.

[0004] There have been some preliminary attempts to convert natural language into query statements, such as Google's natural language SQL query tool. However, these tools are mainly aimed at traditional relational databases, and lack targeted optimization for time series data processing (such as support for time series aggregation, sliding window, periodic analysis, etc.).

[0005] In existing systems, non-technical users need to rely on technical teams to write query statements. For example, when a business user needs to generate a device runtime series graph, they usually need to clearly express the query requirements, which are then translated into SQL or other query languages by technical personnel. This mode is inefficient, increases communication costs, and can lead to inaccurate results due to demand understanding bias.

[0006] In dynamic data analysis scenarios (such as market trend prediction, real-time monitoring and early warning, etc.), it is crucial to quickly obtain data results. However, the current query method increases the time cost of data insight, directly affecting the speed of business response. For example, the abnormal detection of factory equipment may be delayed, leading to production interruption.

[0007] The lack of natural language query tools prevents many potential users (such as operations, management) from directly analyzing data, hindering the popularization of data-driven decision-making. The "last mile" of data analysis is blocked by the complexity of query language, and many valuable data insights are not discovered in time.

[0008] Technical teams need to constantly adjust query statements to meet business needs, leading to uneven resource allocation. Especially in enterprise environments with large data demands, the burden on technical personnel will increase significantly, which may affect the progress of other important tasks.

[0009] Users' query needs are often temporary and dynamic, but existing systems are difficult to respond quickly. This limits users' exploration capabilities and data utilization efficiency. For example, users may need to quickly define key indicators for different time periods based on historical data, but traditional query modes limit this flexibility.

[0010] In summary, a natural language-based time series database query system will greatly improve the data access experience, providing non-technical users with convenient and efficient query methods, while reducing the burden on technical teams and promoting the widespread application of data-driven decision-making. SUMMARY

[0011] To solve the above technical problems, the present application provides a time series database intelligent query system based on natural language description.

[0012] The present application is implemented by the following technical solutions: a time series database intelligent query system based on natural language description, comprising: A user interface module is provided to provide a user interface to support user input of natural language queries; A natural language understanding module is used to convert user input natural language into an intermediate representation that the system can understand; A query generation module is used to convert the intermediate representation into a specific time series database query statement; A query optimization module is used to optimize the generated query statement to improve query efficiency; An execution and data acquisition module is used to interact with the time series database, execute queries and acquire results; A result display and analysis module is used to present the query results to the user in a visual form.

[0013] Further, it also includes a user feedback and system improvement module and a security and permission management module, wherein, The user feedback and system improvement module is used to collect user feedback and optimize system performance and query accuracy; The security and permission management module is used to ensure the security of data queries and control user access permissions.

[0014] Further, the user interface module supports text input and voice input, provides query suggestions and historical query record result display, and the result display includes one or more of charts, tables and report forms.

[0015] Further, the natural language understanding module is used for text preprocessing, intent recognition, entity recognition and slot filling, wherein the text preprocessing includes word segmentation, stop word removal and spelling correction, the intent recognition includes using a pre-trained language model to recognize the intent of the user query, the entity recognition includes extracting key entities in the time series query, and the slot filling includes mapping the recognized information to specific query parameters.

[0016] Further, the query generation module is used for query template mapping and dynamic parameter filling, wherein the query template mapping includes selecting a suitable query template according to the user intent, and the dynamic parameter filling includes filling variables in the template using the parameters provided by the natural language understanding module.

[0017] Further, the query optimization module is used for optimization according to the characteristics of the time series database, reduces the delay of repeated queries by using query caching and pre-computation techniques, and dynamically adjusts the query strategy according to the data volume and query complexity to select the optimal execution plan.

[0018] Further, the execution and data acquisition module is used for database connection management and data extraction and conversion, wherein the database connection management supports multiple time series databases and dynamically allocates database connections according to the query type and load, and the data extraction and conversion extracts and converts the original data and aggregates the results into the format required by the user.

[0019] Further, the result display and analysis module provides visualization tools, custom analysis and report generation functions, wherein the visualization tools use charts to display time series data, the custom analysis provides interactive tools for users to further filter, filter and analyze data, and the report generation supports automatic generation of data reports, including trend analysis and key indicators.

[0020] Further, the user feedback and system improvement module provides a feedback mechanism and an optimization model, the feedback mechanism provides a feedback channel for users to provide feedback on query results and system understanding, the optimization model updates the natural language understanding model and query generation logic through user feedback, and uses reinforcement learning technology to continuously optimize the system in user interaction.

[0021] Further, the security and permission management module is used for user authentication and authorization, and provides query permission control to ensure that users can only access data within the authorized range.

[0022] The beneficial effects of the present application are: Low threshold data query, natural language friendly: No need to master complex query language, users can directly use daily language to make query requests, reducing the technical use threshold. Seamless interaction: The system quickly responds to user needs through intelligent analysis, optimizing the human-computer interaction experience.

[0023] Efficient query generation and optimization, dynamic query generation: According to the user's natural language input, automatically generate the optimal time series query statement, avoid the time consumption and potential errors of manual query writing. Query optimization: Combined with database optimization techniques (such as time window partitioning, indexing, etc.), improve query efficiency, especially in handling large-scale data.

[0024] Real-time and flexibility, real-time data access: Suitable for scenarios that require quick decision-making, such as industrial monitoring, financial data analysis, etc. Dynamic query adjustment: Users can adjust the query conditions based on the system's recommendations, achieving fast and flexible data analysis.

[0025] Cross-database support, multi-platform compatibility: The system supports multiple time series databases (such as InfluxDB, TimescaleDB, TDengine), adapting to different enterprise data storage environments.

[0026] Continuous self-improvement, user feedback-driven optimization: The system continuously optimizes natural language understanding models through user feedback, improving query accuracy and response speed. Model iteration: Combined with reinforcement learning or transfer learning, the system can adapt to new domain semantics and data requirements.

[0027] Enhanced data security, fine-grained permission control: Ensure that users can only access authorized data within the scope, protect enterprise core data assets. Secure transmission: Data encryption during query process, improve communication security. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from the structures shown in these drawings without creative labor.

[0029] Figure 1 The system block diagram of the present application. DETAILED DESCRIPTION

[0030] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.

[0031] It should be noted that similar reference numerals and letters refer to like items in the following drawings, and thus, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.

[0032] The embodiments of the present application will be described below in detail with reference to the drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.

[0033] Referring to Figure 1 A natural language description-based time series database intelligent query system includes: A user interface module is configured to provide a user interface to support user input of natural language queries. A natural language understanding module is configured to convert the user input natural language into an intermediate representation that can be understood by the system. A query generation module is configured to convert the intermediate representation into a specific time series database query statement. A query optimization module is configured to optimize the generated query statement to improve query efficiency. An execution and data acquisition module is configured to interact with the time series database, execute the query, and acquire the results. A result display and analysis module is configured to present the query results to the user in a visualized form. A user feedback and system improvement module is configured to collect user feedback, optimize system performance, and improve query accuracy. A security and permission management module is configured to ensure the security of data queries and control user access permissions.

[0034] In the present embodiment, the user interface module is mainly configured to provide a friendly user interface to support user input of natural language queries. The user interface module supports text input and voice input, provides query suggestions and historical query records, and the result display includes multiple forms such as charts, tables, and reports.

[0035] In this embodiment, the natural language understanding module is mainly to convert the user's natural language input into an intermediate representation that the system can understand. The natural language understanding module is used for text preprocessing: word segmentation, stop word removal, spelling correction; intent recognition: using pre-trained language models (such as BERT, GPT) to identify the intent of the user's query, such as "get the device temperature data for the past week"; entity recognition: extracting key entities in the time series query, such as time range ("the past week"), data type ("temperature"), and object ("device"); slot filling: mapping the identified information to specific query parameters (such as time, measurement, and filtering conditions).

[0036] In this embodiment, the query generation module is mainly used to convert the intermediate representation into a specific time series database query statement. The query generation module provides query template mapping and dynamic parameter filling functions. Dynamic parameter filling: according to the user's intent, select the appropriate query template, which contains pre-defined SQL or other query language frameworks. Dynamic parameter filling: use the parameters provided by the natural language understanding module to fill in the variables in the template, for example, convert "the past week" to a specific time range, and map "device" to a specific table or label in the database.

[0037] In this embodiment, the query optimization module is mainly used to optimize the generated query statement to improve query efficiency. The query optimization module optimizes for time series database characteristics (such as time window, partition index, and aggregation query); uses query caching and pre-computation techniques to reduce the delay of repeated queries; dynamically adjusts the query strategy, and selects the optimal execution plan according to the data volume and query complexity.

[0038] In this embodiment, the execution and data acquisition module is mainly used to interact with the time series database, execute the query and obtain the results. The execution and data acquisition module is used for database connection management and data extraction and conversion. Database connection management: supports multiple time series databases (such as InfluxDB, TimescaleDB, TDengine), dynamically allocates database connections according to query types and loads. Data extraction and conversion: extract raw data and perform necessary conversion and aggregation, and encapsulate the results into a user-friendly format.

[0039] In this embodiment, the result display and analysis module is mainly used to present the query results to the user in a visualized form. The result display and analysis module provides visualization tools: uses charts (line chart, bar chart, heat map, etc.) to display time series data. In addition, the result display and analysis module also provides custom analysis: provides interactive tools for users to further filter, filter and analyze data; and report generation: supports automatic generation of data reports, including trend analysis and key indicators.

[0040] In this embodiment, the user feedback and system improvement module is mainly used to collect user feedback for optimizing system performance and query accuracy. The user feedback and system improvement module provides a feedback mechanism: users can provide feedback on query results and system understanding. An optimization model is also provided to update the natural language understanding model and query generation logic based on user feedback, and reinforcement learning techniques are used to continuously optimize the system in user interactions.

[0041] In this embodiment, the security and permission management module is used to ensure the security of data queries and control user access permissions. The security and permission management module provides user authentication and authorization; query permission control to ensure that users can only access data within the authorized range; encryption processing of data transmission and storage.

[0042] Through the coordinated work of the above modules, the system can realize the whole process from natural language description to time series database query, greatly reduce the technical threshold, and improve the efficiency and effect of data analysis.

[0043] It should be noted that the technical stack and tools that may be used by the present application include: natural language processing: Python (SpaCy, Transformers), TensorFlow, PyTorch; database support: InfluxDB, TimescaleDB, TDengine; front-end technology: React, Vue.js for user interface; back-end technology: Flask, FastAPI or Node.js for API and query services; visualization tools: D3.js, Plotly.

[0044] It should also be noted that the application scope of the present application includes: 1. Industrial Internet of Things (IIoT), real-time device monitoring: analyze device operating status through natural language query and timely detect abnormalities. Predictive maintenance: combine time series data and query results to predict device failure time and optimize maintenance plans.

[0045] 2. Financial field, market trend analysis: users can quickly query time series data of specific assets such as stock prices and trading volumes through natural language. Risk management: based on time series query, analyze risk indicators (such as volatility, VAR, etc.) in real time to improve financial risk control capabilities.

[0046] 3. Energy and utilities, smart grid monitoring: the system supports fast query and analysis of power grid time series data to optimize power dispatch. Energy consumption analysis: users can query energy consumption data in different time periods using natural language to help enterprises optimize energy use.

[0047] 4. Medical health, patient monitoring: Real-time monitoring of patient vital signs data (such as heart rate, blood pressure), assisting doctors to quickly make a diagnosis. Epidemic tracking: Query and analyze epidemic time series data in different regions, help to make public health policy.

[0048] 5. Intelligent transportation, traffic flow monitoring: Support time series analysis of urban traffic flow, optimize traffic signal scheduling. Trajectory analysis: Quickly query and analyze vehicle or personnel trajectory data, improve logistics and public security efficiency.

[0049] 6. Environmental monitoring, weather data analysis: Query historical weather data, analyze climate trends. Pollution monitoring: Quickly locate pollution sources and pollutant concentration changes at specific time periods.

[0050] In summary, through the present application, users can easily perform complex data queries and analysis in various industries, greatly improving data utilization efficiency and decision-making speed. The popularization of this technology will promote the popularization of data-driven business models and create greater value for enterprises.

[0051] For the foregoing embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the order of the described actions, because according to the present application, some steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily required by the present application.

[0052] In the above embodiments, the basic principles and main features of the present application and the advantages of the present application are described. Those skilled in the art should understand that the present application is not limited by the above embodiments, and the above embodiments and descriptions in the specification are only to illustrate the principles of the present application. Any modification and change made by those skilled in the art without departing from the spirit and scope of the present application shall be within the protection scope of the claims of the present application.

Claims

1. A natural language description based intelligent query system for time series database, characterized in that, Comprise: a user interface module to provide a user interface that supports user input of natural language queries; a natural language understanding module to convert user input natural language into an intermediate representation understandable by the system; a query generation module to convert the intermediate representation into specific time-series database query statements; a query optimization module to optimize the generated query statements for improved query efficiency; an execution and data retrieval module to interact with the time-series database, execute queries, and retrieve results; a result presentation and analysis module to present query results to the user in visualized forms.

2. The natural language description based time series database intelligent query system of claim 1, wherein, Also comprise a user feedback and system improvement module and a security and permission management module, wherein, the user feedback and system improvement module collects user feedback to optimize system performance and query accuracy; the security and permission management module ensures the security of data queries and controls user access permissions.

3. The natural language description based time series database intelligent query system of claim 2, wherein, The user interface module supports text input and voice input, provides query suggestions and historical query record result presentation, and the result presentation includes one or more of charts, tables, and report forms.

4. The natural language description based time series database intelligent query system of claim 3, wherein, The natural language understanding module performs text preprocessing, intent recognition, entity recognition, and slot filling, wherein text preprocessing includes word segmentation, stop word removal, and spelling correction, intent recognition includes using a pre-trained language model to identify the intent of user queries, entity recognition includes extracting key entities in time-series queries, and slot filling includes mapping identified information to specific query parameters.

5. The natural language description based time series database intelligent query system of claim 4, wherein, The query generation module performs query template mapping and dynamic parameter filling, wherein query template mapping includes selecting appropriate query templates based on user intent, and dynamic parameter filling includes filling variables in templates using parameters provided by the natural language understanding module.

6. The natural language description based time series database intelligent query system of claim 5, wherein, The query optimization module optimizes for time-series database characteristics, uses query caching and pre-computation techniques to reduce delay for repeated queries, and dynamically adjusts query strategies to select the optimal execution plan based on data volume and query complexity.

7. The natural language description based time series database intelligent query system of claim 6, wherein, The execution and data retrieval module performs database connection management and data extraction and transformation, wherein database connection management supports multiple time-series databases and dynamically allocates database connections based on query type and load, and data extraction and transformation extracts raw data, performs conversion and aggregation, and encapsulates results into formats required by users.

8. The natural language description based time series database intelligent query system of claim 7, wherein, The result presentation and analysis module provides visualization tools, custom analysis, and report generation functions, wherein visualization tools use charts to display time-series data, custom analysis provides interactive tools for users to further filter, filter, and analyze data, and report generation supports automatic generation of data reports, including trend analysis and key indicators.

9. The natural language description based time series database intelligent query system of claim 8, wherein, The user feedback and system improvement module provides a feedback mechanism and an optimization model, the feedback mechanism provides a feedback channel for users to provide feedback on query results and system understanding, the optimization model updates the natural language understanding model and query generation logic based on user feedback, and uses reinforcement learning techniques to continuously optimize the system in user interactions.

10. The natural language description based time series database intelligent query system of claim 9, wherein, The security and permission management module is used to perform user authentication and authorization, and provides query permission control to ensure that the user can only access data within the authorized range.