CN106407395A - A processing method and device for data query - Google Patents
A processing method and device for data query Download PDFInfo
- Publication number
- CN106407395A CN106407395A CN201610833403.3A CN201610833403A CN106407395A CN 106407395 A CN106407395 A CN 106407395A CN 201610833403 A CN201610833403 A CN 201610833403A CN 106407395 A CN106407395 A CN 106407395A
- Authority
- CN
- China
- Prior art keywords
- time
- data
- moment
- data query
- limit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24553—Query execution of query operations
- G06F16/24554—Unary operations; Data partitioning operations
- G06F16/24556—Aggregation; Duplicate elimination
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
- G06F16/244—Grouping and aggregation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2474—Sequence data queries, e.g. querying versioned data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Software Systems (AREA)
- Fuzzy Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供一种数据查询的处理方法及装置。所述方法包括:根据数据过滤条件和数据查询的起始时刻开始,从时序数据库中获取N个数据点,N为预设的软性限制阈值;根据数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及起始时刻,获取限制时刻;当限制时刻位于结束时刻之前,以第N个数据点对应的时刻开始,根据数据过滤条件从时序数据库中继续获取限制时刻之前的剩余数据点;根据各聚合函数对起始时刻至限制时刻之间的所有数据点进行聚合处理,得到第一数据查询结果。通过采用本发明的技术方案,数据查询时所消耗的计算机资源更少,消耗的时间更短,且能够有效地提高数据查询的效率。
The invention provides a data query processing method and device. The method includes: according to the data filtering condition and the starting moment of the data query, acquiring N data points from the time series database, N is a preset soft limit threshold; according to the minimum sampling time of each aggregation function of the data query The public multiple, the time corresponding to the Nth data point, and the start time are used to obtain the limit time; when the limit time is before the end time, start with the time corresponding to the Nth data point, and continue to obtain the limit time from the time series database according to the data filter conditions The previous remaining data points: perform aggregation processing on all data points between the start time and the limit time according to each aggregation function to obtain the first data query result. By adopting the technical scheme of the present invention, less computer resources are consumed during data query, the time consumed is shorter, and the efficiency of data query can be effectively improved.
Description
【技术领域】【Technical field】
本发明涉及数据处理技术领域,尤其涉及一种数据查询的处理方法及装置。The invention relates to the technical field of data processing, in particular to a data query processing method and device.
【背景技术】【Background technique】
随着信息科技的发展,数据成为信息处理中一个非常重要的信息。且为了更加精准地对数据进行研究,对于带有时间戳的数据通常将时间戳与数据一起保存在时序数据库中。With the development of information technology, data has become a very important information in information processing. And in order to study the data more accurately, for data with a time stamp, the time stamp is usually stored together with the data in a time-series database.
传统的时序数据库是基于单机少量用户共同使用的,用户独占了整个时序数据库的资源,因此用户运行一些耗时长久、耗费资源的查询的话,影响并不大。但是随着各种云服务的出现,庞大的数据及对应的时间戳需要存储。基于云的时序数据库则是集群化的、多租户的,多个用户共享时序数据库的集群。如果用户运行了一些耗时、耗资源的查询的话,会对整个集群产生影响,从而对其他用户造成影响。为了有效的控制耗时查询对系统的影响,现有的对时序数据库的查询一定都设置了限制(limit)的功能,能对查询的原始结果(聚合前的)或者最终结果(聚合后的)的数目进行限制。其中,与对查询的原始结果(聚合前的)进行限制相比,对查询的最终结果(聚合后的)进行限制的方案,更能保证聚合结果的正确性。Traditional time-series databases are used by a small number of users on a single machine, and users monopolize the resources of the entire time-series database. Therefore, if users run some time-consuming and resource-consuming queries, the impact will not be great. However, with the emergence of various cloud services, huge data and corresponding timestamps need to be stored. The cloud-based time series database is clustered and multi-tenant, and multiple users share the time series database cluster. If a user runs some time-consuming and resource-consuming queries, it will affect the entire cluster, thereby affecting other users. In order to effectively control the impact of time-consuming queries on the system, the existing queries on time-series databases must have a limit function, which can control the original results (before aggregation) or final results (after aggregation) of queries. The number is limited. Among them, compared with restricting the original result of the query (before aggregation), the scheme of restricting the final result of the query (after aggregation) can better ensure the correctness of the aggregation result.
但是,现有的对查询的最终结果(聚合后的)进行限制的方案不能有效的控制耗时查询对系统的影响。譬如:目前数据库中有1年的数据,总共1亿个数据点,查询的条件是将最终结果限制为1个数据点,并对原始结果每1年进行一次求和,那么得到的结果就是对1亿个数据点的求和,这将消耗系统大量的计算资源,没有起到控制耗时数据查询的作用。However, the existing solutions for restricting the final result of the query (after aggregation) cannot effectively control the impact of the time-consuming query on the system. For example: there is currently 1 year of data in the database, a total of 100 million data points, the query condition is to limit the final result to 1 data point, and sum the original results every 1 year, then the result obtained is The summation of 100 million data points will consume a large amount of computing resources of the system, and will not play a role in controlling time-consuming data queries.
【发明内容】【Content of invention】
本发明提供了一种数据查询的处理方法及装置,用于有效控制数据查询的耗时影响。The invention provides a data query processing method and device, which are used to effectively control the time-consuming influence of data query.
本发明提供一种数据查询的处理方法,所述方法包括:The present invention provides a data query processing method, the method comprising:
根据数据过滤条件和数据查询的起始时刻开始,从时序数据库中获取N个数据点,所述N为预设的软性限制阈值;Acquire N data points from the time-series database according to the data filtering conditions and the starting moment of the data query, where N is a preset soft limit threshold;
根据数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及所述起始时刻,获取限制时刻;According to the least common multiple of the sampling time of each aggregation function of the data query, the time corresponding to the Nth data point and the starting time, obtain the limit time;
当所述限制时刻位于结束时刻之前,以所述第N个数据点对应的时刻开始,根据数据过滤条件从所述时序数据库中继续获取所述限制时刻之前的剩余数据点;When the limited time is before the end time, start from the time corresponding to the Nth data point, and continue to acquire the remaining data points before the limited time from the time series database according to the data filter condition;
根据各所述聚合函数对所述起始时刻至所述限制时刻之间的所有数据点进行聚合处理,得到第一数据查询结果。Aggregating all data points between the start time and the limit time according to each of the aggregation functions to obtain a first data query result.
进一步可选地,如上所述的方法中,根据各所述聚合函数对所述限制时刻之前的所有数据点进行聚合处理,得到数据查询结果之后,所述方法还包括:Further optionally, in the above-mentioned method, according to each of the aggregation functions, all data points before the time limit are aggregated, and after the data query result is obtained, the method further includes:
向用户反馈所述限制时刻以及对应的所述第一数据查询结果。Feedback the limited time and the corresponding first data query result to the user.
进一步可选地,如上所述的方法中,向所述用户反馈所述限制时刻以及对应的所述第一数据查询结果之后,还包括:Further optionally, in the above method, after feeding back the restriction time and the corresponding first data query result to the user, further include:
接收所述用户发送的携带所述限制时刻的继续查询指示消息;receiving a continuation query instruction message carrying the time limit sent by the user;
将所述起始时刻的数值更新为所述限制时刻的数值,以继续进行数据查询处理。The value at the start time is updated to the value at the limit time, so as to continue data query processing.
进一步可选地,如上所述的方法中,根据数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及所述起始时刻,获取限制时刻,具体包括:Further optionally, in the above-mentioned method, the restriction time is obtained according to the least common multiple of the sampling time of each aggregation function of the data query, the time corresponding to the Nth data point, and the starting time, specifically including:
从lcm_sample_time的倍数中,取比(soft_limit_time-start_time)大的最小的一个,然后加上start_time,等于limit_time;From the multiples of lcm_sample_time, take the smallest one larger than (soft_limit_time-start_time), and then add start_time, which is equal to limit_time;
其中,所述lcm_sample_time为数据查询的各所述聚合函数的采样时间的最小公倍数;所述soft_limit_time为所述第N个数据点对应的时刻;所述start_time为所述起始时刻;所述limit_time为所述限制时刻。Wherein, the lcm_sample_time is the least common multiple of the sampling time of each aggregation function of the data query; the soft_limit_time is the moment corresponding to the Nth data point; the start_time is the starting moment; the limit_time is the time limit.
进一步可选地,如上所述的方法中,根据数据过滤条件和数据查询的起始时刻开始,从时序数据库中获取N个数据点之前,还包括:Further optionally, in the method as described above, before acquiring N data points from the time-series database according to the data filter condition and the starting moment of the data query, it also includes:
获取所述用户指定的所述数据过滤条件、数据查询的各所述聚合函数的采样时间、数据查询的所述起始时刻和所述结束时刻。The data filter condition specified by the user, the sampling time of each aggregation function of the data query, the start time and the end time of the data query are obtained.
进一步可选地,如上所述的方法中,根据数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及所述起始时刻,获取限制时刻之前,所述方法包括:Further optionally, in the above-mentioned method, according to the least common multiple of the sampling time of each aggregation function of the data query, the time corresponding to the Nth data point, and the starting time, before obtaining the limit time, the method includes :
从所述时序数据库中获取所述第N个数据点的时间戳;Acquiring the timestamp of the Nth data point from the time series database;
将所述第N个数据点的时间戳作为所述第N个数据点对应的时刻。The time stamp of the Nth data point is used as the time corresponding to the Nth data point.
进一步可选地,如上所述的方法中,当所述限制时刻位于所述结束时刻之后,还包括:Further optionally, in the above method, when the limiting moment is after the end moment, further comprising:
以所述第N个数据点对应的时刻开始,根据所述数据过滤条件从所述时序数据库中继续获取所述结束时刻之前的剩余数据点;Starting from the time corresponding to the Nth data point, continue to acquire the remaining data points before the end time from the time series database according to the data filter condition;
根据各所述聚合函数对所述起始时刻至所述结束时刻之间的所有数据点进行聚合处理,得到第二数据查询结果。Aggregating all data points between the start time and the end time according to each of the aggregation functions to obtain a second data query result.
本发明还提供一种数据查询的处理装置,所述装置包括:The present invention also provides a data query processing device, the device comprising:
数据点获取模块,用于根据数据过滤条件和数据查询的起始时刻开始,从时序数据库中获取N个数据点,所述N为预设的软性限制阈值;The data point acquisition module is used to obtain N data points from the time series database according to the data filtering condition and the starting moment of the data query, and the N is a preset soft limit threshold;
时刻获取模块,用于根据数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及所述起始时刻,获取限制时刻;The time acquisition module is used to obtain the limited time according to the least common multiple of the sampling time of each aggregation function of the data query, the time corresponding to the Nth data point, and the starting time;
所述数据点获取模块,还用于当所述限制时刻位于结束时刻之前,以所述第N个数据点对应的时刻开始,根据数据过滤条件从所述时序数据库中继续获取所述限制时刻之前的剩余数据点;The data point acquisition module is further configured to start from the time corresponding to the Nth data point when the limited time is before the end time, and continue to obtain the data before the limited time from the time series database according to the data filter condition. The remaining data points of ;
聚合处理模块,用于根据各所述聚合函数对所述起始时刻至所述限制时刻之间的所有数据点进行聚合处理,得到第一数据查询结果。An aggregation processing module, configured to perform aggregation processing on all data points between the start time and the limit time according to each of the aggregation functions to obtain a first data query result.
进一步可选地,如上所述的装置中,还包括:Further optionally, the above-mentioned device also includes:
发送模块,用于向用户反馈所述限制时刻以及对应的所述第一数据查询结果。A sending module, configured to feed back the restriction time and the corresponding first data query result to the user.
进一步可选地,如上所述的装置中,还包括:Further optionally, the above-mentioned device also includes:
接收模块,用于接收所述用户发送的携带所述限制时刻的继续查询指示消息;A receiving module, configured to receive a continuation query instruction message carrying the time limit sent by the user;
更新模块,用于将所述起始时刻的数值更新为所述限制时刻的数值,以继续进行数据查询处理。An update module, configured to update the value at the start time to the value at the limit time, so as to continue data query processing.
进一步可选地,如上所述的装置中,所述时刻获取模块,具体用于从lcm_sample_time的倍数中,取比(soft_limit_time-start_time)大的最小的一个,然后加上start_time,等于limit_time;Further optionally, in the device as described above, the time acquisition module is specifically configured to select the smallest one that is greater than (soft_limit_time-start_time) from the multiples of lcm_sample_time, and then add start_time to be equal to limit_time;
其中,所述lcm_sample_time为数据查询的各所述聚合函数的采样时间的最小公倍数;所述soft_limit_time为所述第N个数据点对应的时刻;所述start_time为所述起始时刻;所述limit_time为所述限制时刻。Wherein, the lcm_sample_time is the least common multiple of the sampling time of each aggregation function of the data query; the soft_limit_time is the moment corresponding to the Nth data point; the start_time is the starting moment; the limit_time is the time limit.
进一步可选地,如上所述的装置中,还包括:参数获取模块,用于获取所述用户指定的所述数据过滤条件、数据查询的各所述聚合函数的采样时间、数据查询的所述起始时刻和所述结束时刻。Further optionally, the above-mentioned device further includes: a parameter acquisition module, configured to acquire the data filter condition specified by the user, the sampling time of each aggregation function of the data query, the The start time and the end time.
进一步可选地,如上所述的装置中,所述时刻获取模块,还用于从所述时序数据库中获取所述第N个数据点的时间戳;将所述第N个数据点的时间戳作为所述第N个数据点对应的时刻。Further optionally, in the device as described above, the time obtaining module is further configured to obtain the time stamp of the Nth data point from the time series database; the time stamp of the Nth data point as the time corresponding to the Nth data point.
进一步可选地,如上所述的装置中,所述数据点获取模块,还用于当所述限制时刻位于所述结束时刻之后,以所述第N个数据点对应的时刻开始,根据所述数据过滤条件从所述时序数据库中继续获取所述结束时刻之前的剩余数据点;Further optionally, in the above-mentioned device, the data point acquisition module is further configured to start at the time corresponding to the Nth data point when the limited time is after the end time, according to the The data filter condition continues to obtain the remaining data points before the end time from the time series database;
所述聚合处理模块,还用于根据各所述聚合函数对所述起始时刻至所述结束时刻之间的所有数据点进行聚合处理,得到第二数据查询结果。The aggregation processing module is further configured to perform aggregation processing on all data points between the start time and the end time according to each of the aggregation functions to obtain a second data query result.
本发明的数据查询的处理方法及装置,由于采用限制时刻对数据查询,从而实现了对数据的分页查询,每一页的原始数据点是有限的,与现有技术的对查询的最终结果(聚合后的)进行限制的技术方案相比,相同的计算机资源处理一页数据所消耗的资源更少,消耗的时间更短,从而能够有效地提高数据查询的效率,真正实现控制数据查询对系统的耗时影响,而且还可以提高用户的使用体验。而且,本发明的数据查询的处理方案,还可以有效地保证数据查询结果的准确性;另外,本发明的数据查询的处理方案,还具有较强的适用性,不仅可以适用于对查询的原始结果(聚合前的)进行限制的技术方案,还可以适用于对查询的最终结果(聚合后的)进行限制的技术方案。The processing method and device of data query of the present invention realize the paging query of data due to the use of limited time for data query, and the original data points of each page are limited, which is different from the final result of the query in the prior art ( Aggregated) compared to the restricted technical solution, the same computer resource consumes less resources and takes less time to process a page of data, which can effectively improve the efficiency of data query and truly realize the control of data query to the system Time-consuming impact, but also can improve the user experience. Moreover, the data query processing scheme of the present invention can also effectively ensure the accuracy of the data query results; in addition, the data query processing scheme of the present invention also has strong applicability, not only applicable to the original The technical solution for limiting the result (before aggregation) may also be applicable to the technical solution for limiting the final result of the query (after aggregation).
【附图说明】【Description of drawings】
图1为本发明的数据查询的处理方法实施例的流程图。FIG. 1 is a flowchart of an embodiment of a data query processing method in the present invention.
图2为本发明的数据查询的处理装置实施例一的结构图。FIG. 2 is a structural diagram of Embodiment 1 of the data query processing device of the present invention.
图3为本发明的数据查询的处理装置实施例二的结构图。FIG. 3 is a structural diagram of Embodiment 2 of the data query processing device of the present invention.
【具体实施方式】【detailed description】
为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.
图1为本发明的数据查询的处理方法实施例的流程图。如图1所示,本实施例的数据查询的处理方法,具体可以包括如下步骤:FIG. 1 is a flowchart of an embodiment of a data query processing method in the present invention. As shown in Figure 1, the data query processing method of this embodiment may specifically include the following steps:
100、根据数据过滤条件和数据查询的起始时刻开始,从时序数据库中获取N个数据点;100. Acquiring N data points from the time series database according to the data filtering condition and the starting moment of the data query;
本实施例的N为预设的软性限制阈值,N的数值为正整数。本实施例的N为时序数据库中预先设置的一个软性限制值,即表示根据软性限制值,从数据库中取数据点时,初步取N个数据点。具体地,从数据查询的起始时刻开始,根据数据过滤条件按顺序从时序数据库中获取N个数据点。本实施例中的预设的软性限制阈值N可以根据实际需求来设置,例如可以参考某时序数据库中一段历史数据查询的结果,选择最恰当的一个预设的软性限制阈值。本实施例的数据过滤条件具体可以限定查询的表、哪些字段满足什么条件等等,例如查询所有上海地区的温度、或者查询北京地区的全年的湿度或者全年每次降雨的降雨量等等数据。由于时序数据库中,可能包括一个或者多个地区的多方面的信息,根据数据过滤条件可以从时序数据库中获取符合数据过滤条件的数据点,然后按照数据查询的起始时刻以及N个数据点再次从符合数据过滤条件的数据点中获取N个符合条件的数据点。N in this embodiment is a preset soft limit threshold, and the value of N is a positive integer. N in this embodiment is a soft limit value preset in the time series database, which means that when data points are taken from the database according to the soft limit value, initially N data points are taken. Specifically, starting from the starting moment of the data query, N data points are sequentially obtained from the time series database according to the data filtering conditions. The preset soft limit threshold N in this embodiment can be set according to actual needs, for example, the most appropriate preset soft limit threshold can be selected by referring to a query result of a period of historical data in a time series database. The data filtering conditions of this embodiment can specifically limit the table to be queried, which fields meet what conditions, etc., for example, query the temperature of all Shanghai areas, or query the annual humidity in Beijing area or the rainfall of each rainfall in the whole year, etc. data. Since the time series database may contain various information of one or more regions, according to the data filter conditions, the data points that meet the data filter conditions can be obtained from the time series database, and then according to the starting time of the data query and N data points again Get N eligible data points from the data points that meet the data filter condition.
101、根据数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及起始时刻,获取限制时刻;101. According to the least common multiple of the sampling time of each aggregation function of the data query, the time corresponding to the Nth data point and the starting time, obtain the limit time;
由于时序数据库中的数据量非常大,如果查询数据时直接获取时序数据库中的原始数据,获取的数据量非常大,有时候这些数据也不能真正反应数据的变化趋势。因此,本实施例中也设置有聚合函数对数据查询结果进行处理。具体地,聚合函数是对查询的原始结果进行聚合处理。且一次数据查询中聚合函数可以包括一个,两个或者多个。例如查询每5分钟的平均值;其中5分钟是采样时间范围,平均值是聚合函数;再例如:某次数据查询时的聚合函数可以包括对每五分钟内的数据点取平均,对每一小时的数据点求和;对应的聚合函数的采样时间分别为5分钟和60分钟;取平均和求和分别为聚合函数。Since the amount of data in the time-series database is very large, if you directly obtain the original data in the time-series database when querying data, the amount of data obtained is very large, and sometimes these data cannot really reflect the changing trend of the data. Therefore, an aggregate function is also provided in this embodiment to process the data query results. Specifically, the aggregation function is to aggregate the original results of the query. And the aggregation function in a data query can include one, two or more. For example, query the average value every 5 minutes; where 5 minutes is the sampling time range, and the average value is an aggregation function; another example: the aggregation function for a certain data query can include averaging data points within every five minutes, for each The data points of the hour are summed; the sampling time of the corresponding aggregation function is 5 minutes and 60 minutes respectively; the average and the sum are the aggregation functions respectively.
由于时序数据库中不仅存储有数据点的数值,同时还存储有每个数据点对应的时间戳,该时间戳即表示该数据点的时刻。因此该步骤101之前,还可以包括如下步骤:Since the time series database not only stores the value of the data point, but also stores the time stamp corresponding to each data point, and the time stamp indicates the moment of the data point. Therefore, before this step 101, the following steps may also be included:
(a1)从时序数据库中获取第N个数据点的时间戳;(a1) Obtain the timestamp of the Nth data point from the time series database;
(a2)将第N个数据点的时间戳作为第N个数据点对应的时刻。(a2) The time stamp of the Nth data point is taken as the time corresponding to the Nth data point.
根据数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及起始时刻,According to the least common multiple of the sampling time of each aggregation function of the data query, the time corresponding to the Nth data point and the starting time,
102、当限制时刻位于结束时刻之前,以第N个数据点对应的时刻开始,根据数据过滤条件从时序数据库中继续获取限制时刻之前的剩余数据点;102. When the restricted time is before the end time, start from the time corresponding to the Nth data point, and continue to obtain the remaining data points before the restricted time from the time series database according to the data filtering conditions;
103、根据各聚合函数对起始时刻至限制时刻之间的所有数据点进行聚合处理,得到第一数据查询结果。103. Perform aggregation processing on all data points between the start time and the limit time according to each aggregation function to obtain a first data query result.
本实施例中起始时刻至限制时刻之间的所有数据点包括步骤101获取到的N个数据点、和步骤102中以第N个数据点对应的时刻开始,根据数据过滤条件从时序数据库中继续获取到的限制时刻之前的剩余数据点。In this embodiment, all data points between the start time and the limit time include the N data points obtained in step 101, and the time corresponding to the Nth data point in step 102, from the time series database according to the data filter condition Continue to obtain the remaining data points before the limited time.
本实施例中,获取的限制时刻由于考虑到了数据查询的各聚合函数的采样时间的最小公倍数,所以可以保证在数据查询时,对原始数据点进行聚合处理的完整性,从而保证查询结果的准确性。例如聚合函数的采样时间分别为5分钟和60分钟的时候,可以选取数据查询的各聚合函数的采样时间的最小公倍数为60,这样,根据可以保证限制时刻之前获取的原始数据点均能够进行完整的聚合处理,而不会存在部分数据无法参加聚合处理,导致数据查询结果的错误。In this embodiment, since the acquisition limit time takes into account the least common multiple of the sampling time of each aggregation function of the data query, it can ensure the integrity of the aggregation processing of the original data points during the data query, thereby ensuring the accuracy of the query results sex. For example, when the sampling time of the aggregation function is 5 minutes and 60 minutes respectively, the least common multiple of the sampling time of each aggregation function of the data query can be selected as 60, so that the original data points obtained before the time limit can be guaranteed to be complete Aggregation processing, and there will be no part of the data that cannot participate in the aggregation processing, resulting in errors in data query results.
本实施例中,以起始时刻到结束时刻之间的时间段较长为例,若数据查询时,直接获取起始时刻到结束时刻之间的数据点的话,数据查询过程非常耗时,且非常消耗计算机的资源。本实施例中通过设置限制时刻,该限制时刻位于起始时刻之后、结束时刻之前,在数据查询时,可以分页进行数据查询,例如本次数据查询仅查询该起始时刻至限制时刻之间的所有数据点,并按照各聚合函数对对起始时刻至限制时刻之间的所有数据点进行聚合处理,得到第一数据查询结果。本实施例的数据查询过程可以减少数据查询的耗时,节省计算机资源的消耗。用户在进行数据查询时,可以先为用户查询限制时刻之前的第一数据查询结果。In this embodiment, taking the time period between the start time and the end time as an example, if the data points between the start time and the end time are directly obtained during data query, the data query process is very time-consuming, and Very consuming of computer resources. In this embodiment, by setting the limit time, the limit time is located after the start time and before the end time, and data query can be performed in pages during data query. For example, this data query only queries the data between the start time and the limit time. All data points are aggregated according to each aggregation function for all data points between the start time and the limit time to obtain the first data query result. The data query process in this embodiment can reduce the time consumption of data query and save the consumption of computer resources. When the user performs data query, the first data query result before the time limit can be queried for the user.
进一步可选地,在上述实施例的步骤103“根据各聚合函数对起始时刻至限制时刻之间的所有数据点进行聚合处理,得到第一数据查询结果”之后,本实施例的数据查询的处理方法,具体还可以包括:Further optionally, after step 103 of the above-mentioned embodiment "according to each aggregation function, perform aggregation processing on all data points between the start time and the limit time to obtain the first data query result", the data query in this embodiment Processing methods may also specifically include:
向用户反馈限制时刻以及对应的第一数据查询结果。The time limit and the corresponding first data query result are fed back to the user.
本实施例中的向用户反馈限制时刻以及对应的第一数据查询结果,具体可以通过向用户所使用的设备(如移动终端或者个人计算机等)发送该限制时刻以及对应的第一数据查询结果,以供用户所使用的设备显示该限制时刻以及对应的第一数据查询结果,从而实现向用户反馈限制时刻以及对应的第一数据查询结果。Feedback of the time limit and the corresponding first data query result to the user in this embodiment may specifically be by sending the time limit and the corresponding first data query result to a device (such as a mobile terminal or a personal computer) used by the user, The device used by the user is used to display the restriction time and the corresponding first data query result, so as to realize the feedback of the restriction time and the corresponding first data query result to the user.
本实施例中,通过向用户反馈限制时刻以及对应的第一数据查询结果,以告知用户本次的数据查询结果为限制时刻之前的数据查询结果,如果用户需要继续进行数据查询,还可以继续指示数据查询的处理装置进行数据查询。因此,进一步可选地,步骤“向用户反馈限制时刻以及对应的第一数据查询结果”之后,还可以包括如下步骤:In this embodiment, by feeding back the time limit and the corresponding first data query result to the user, the user is notified that the data query result this time is the data query result before the time limit. If the user needs to continue data query, he can continue to indicate The data query processing means performs data query. Therefore, further optionally, after the step "feedback to the user of the time limit and the corresponding first data query result", the following steps may also be included:
(b1)接收用户发送的携带限制时刻的继续查询指示消息;(b1) receiving the continuation inquiry instruction message of the carrying restriction time sent by the user;
(b2)将起始时刻的数值更新为限制时刻的数值,以继续进行数据查询处理。(b2) Update the value at the start time to the value at the limit time to continue data query processing.
具体地,用户通过所使用的设备接收到限制时刻以及对应的第一数据查询结果之后,还需要进一步的数据查询结果,可以通过所使用的设备向数据查询的处理装置发送携带限制时刻的继续查询指示消息。这样,数据查询的处理装置接收到该继续查询指示消息之后,确定需要进一步进行数据查询,可以先将起始时刻的数值更新为限制时刻的数值,即将限制时刻作为新的起始时刻,继续按照上述实施例的步骤100-103进行下一轮的数据查询,依次类推,直到查询到结束时刻之前的所有数据。Specifically, after receiving the time limit and the corresponding first data query result through the device used, the user needs further data query results, and can send a continuation query carrying the time limit to the data query processing device through the device used. instruction message. In this way, after the data query processing device receives the continuation query instruction message, it determines that further data query needs to be performed, and can first update the value of the start time to the value of the limit time, that is, the limit time is used as a new start time, and continues to follow the Steps 100-103 in the above embodiment perform the next round of data query, and so on, until all the data before the end time is queried.
采用本实施例的技术方案,当用户需要再次查询的时候,可以将该限制时刻作为起始时刻,继续进行数据查询,相当于将数据查询分为多页进行,同时可以避免用户进行一次数据查询,便进入无休止的等待,甚至让用户误以为网络故障,采用本实施例的技术方案,将数据查询分页进行,每一页的数据查询耗时较短,用户不用长时间等待,很快便可以获取到查询结果。且本市实施例的技术方案中,用户可以了解每一页数据查询的情况,当需要再次查询的时候,用户可以通过所使用的设备发送携带限制时刻的继续查询指示消息,便进入下一页的数据查询,用户全程参与数据查询的过程,极大地增强了用户的体验度。With the technical solution of this embodiment, when the user needs to query again, the limited time can be used as the starting time to continue data query, which is equivalent to dividing the data query into multiple pages, and at the same time, it can prevent the user from performing a data query , it enters endless waiting, and even makes the user mistakenly think that the network is faulty. Using the technical solution of this embodiment, the data query is divided into pages. The data query of each page takes a short time, and the user does not need to wait for a long time, and the user can quickly The query results can be obtained. And in the technical solution of the embodiment of this city, the user can understand the situation of data query on each page, and when it needs to query again, the user can send a continuation query instruction message carrying the limited time through the device used, and then enter the next page The data query, the user participates in the whole process of data query, which greatly enhances the user experience.
进一步可选地,上述实施例的技术方案中,步骤101“根据数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及起始时刻,获取限制时刻”,具体可以包括:从lcm_sample_time的倍数中,取比(soft_limit_time-start_time)大的最小的一个,然后加上start_time,等于limit_time;Further optionally, in the technical solution of the above-mentioned embodiment, step 101 "obtain the limited time according to the least common multiple of the sampling time of each aggregation function of the data query, the time corresponding to the Nth data point, and the starting time", which can be specifically Including: from the multiples of lcm_sample_time, take the smallest one larger than (soft_limit_time-start_time), and then add start_time, which is equal to limit_time;
其中,lcm_sample_time为数据查询的各聚合函数的采样时间的最小公倍数;soft_limit_time为第N个数据点对应的时刻;start_time为起始时刻;limit_time为限制时刻。Among them, lcm_sample_time is the least common multiple of the sampling time of each aggregation function of data query; soft_limit_time is the time corresponding to the Nth data point; start_time is the starting time; limit_time is the limit time.
进一步可选地,上述实施例的技术方案中,步骤100“根据数据过滤条件和数据查询的起始时刻开始,从时序数据库中获取N个数据点“之前,还可以包括:获取用户指定的数据过滤条件、数据查询的各聚合函数的采样时间、数据查询的起始时刻、结束时刻。Further optionally, in the technical solution of the above embodiment, before step 100 "obtain N data points from the time series database according to the data filtering conditions and the starting time of the data query", it may also include: obtaining user-specified data Filter conditions, sampling time of each aggregate function of data query, start time and end time of data query.
本实施例中的数据过滤条件、数据查询的各聚合函数的采样时间、数据查询的起始时刻和结束时刻等这些参数信息均是由用户进行数据查询时指定的。具体地,这些信息可以携带在用户通过所使用的设备发送的数据查询请求中。例如数据查询的处理装置可以接收用户通过所使用的设备发送的携带数据过滤条件、数据查询的各聚合函数的采样时间、数据查询的起始时刻和结束时刻的数据查询请求,并从数据查询请求中获取数据过滤条件、数据查询的各聚合函数的采样时间、数据查询的起始时刻和结束时刻。或者用户在进行数据查询请求之前,可以先发送数据查询的这些参数信息,即数据过滤条件、数据查询的各聚合函数的采样时间、数据查询的起始时刻和结束时刻。In this embodiment, the parameter information such as the data filtering condition, the sampling time of each aggregation function of the data query, the start time and the end time of the data query are all specified by the user when performing the data query. Specifically, such information may be carried in the data query request sent by the user through the device used. For example, the processing device for data query can receive the data query request sent by the user through the device used to carry the data filter condition, the sampling time of each aggregation function of the data query, the start time and the end time of the data query, and obtain the data from the data query request Obtain the data filter conditions, the sampling time of each aggregate function of the data query, the start time and end time of the data query. Or before the user makes a data query request, he may first send the parameter information of the data query, that is, the data filter condition, the sampling time of each aggregation function of the data query, the start time and the end time of the data query.
进一步可选地,上述实施例的技术方案均是在限制时刻位于结束时刻之前,当进行分页数据查询至最后一页时,对应的限制时刻位于结束时刻之后,此时,本实施例的数据查询的处理方法,还可以包括如下步骤:Further optionally, in the technical solutions of the above-mentioned embodiments, when the restriction time is before the end time, when the paged data query reaches the last page, the corresponding restriction time is after the end time. At this time, the data query in this embodiment The processing method may also include the following steps:
(c1)以第N个数据点对应的时刻开始,根据数据过滤条件从时序数据库中继续获取结束时刻之前的剩余数据点;(c1) Start at the time corresponding to the Nth data point, and continue to obtain the remaining data points before the end time from the time series database according to the data filter condition;
(c2)根据各聚合函数对起始时刻至结束时刻之间的所有数据点进行聚合处理,得到第二数据查询结果。(c2) Perform aggregation processing on all data points between the start time and the end time according to each aggregation function to obtain a second data query result.
由于限制时刻位于结束时刻之后,此时数据查询时获取的数据点只能获取到结束时刻,此时,以第N个数据点对应的时刻开始,根据数据过滤条件从时序数据库中继续获取结束时刻之前的剩余数据点,然后根据各聚合函数对起始时刻至结束时刻之间的所有数据点进行聚合处理,得到第二数据查询结果。Since the limit time is after the end time, the data points obtained during data query can only be obtained up to the end time. At this time, start from the time corresponding to the Nth data point, and continue to obtain the end time from the time series database according to the data filtering conditions For the previous remaining data points, all data points between the start time and the end time are aggregated according to each aggregation function to obtain the second data query result.
进一步可选地,上述实施例的步骤102“当限制时刻位于结束时刻之前,以第N个数据点对应的时刻开始,根据数据过滤条件从时序数据库中继续获取限制时刻之前的剩余数据点”之前,还可以包括判断限制时刻是否位于结束时刻之前,如果限制时刻位于结束时刻之前,执行步骤102。否则当限制时刻位于结束时刻之后,执行步骤(c1)-(c2)。Further optionally, before the step 102 of the above-mentioned embodiment "when the restriction time is before the end time, start at the time corresponding to the Nth data point, and continue to obtain the remaining data points before the restriction time from the time series database according to the data filtering conditions" , may also include judging whether the restricted time is before the end time, and if the restricted time is before the end time, perform step 102 . Otherwise, when the limited time is after the end time, execute steps (c1)-(c2).
本实施例的数据查询的处理的方案,由于采用限制时刻对数据查询进行分页查询,每一页的原始数据点是有限的,与现有技术的对查询的最终结果(聚合后的)进行限制的技术方案相比,相同的计算机资源处理一页数据所消耗的计算机资源更少,消耗的时间更短,从而能够有效地提高数据查询的效率,真正实现控制数据查询对系统的耗时影响,而且还可以提高用户的使用体验。In the data query processing scheme of this embodiment, since the data query is paginated at a time limit, the original data points of each page are limited, which is different from the prior art that limits the final result (after aggregation) of the query Compared with other technical solutions, the same computer resource consumes less computer resources and takes less time to process one page of data, which can effectively improve the efficiency of data query and truly control the time-consuming impact of data query on the system. And it can also improve the user experience.
另外,现有技术中还提供了对查询的原始结果(聚合前的)进行限制的技术方案,例如具体地可以为:目前时序数据库中有10个数据点,每1秒有一个,查询的条件是,将原始结果限制为5个数据点,并对原始结果每10秒进行一次求和(采用聚合函数求和),那么得到的结果则变成了前5秒的和值,而不是10秒的和值,因此,现有的对查询的原始结果(聚合前的)进行限制的技术方案,容易导致数据查询结果错误。In addition, the prior art also provides a technical solution for restricting the original result of the query (before aggregation). For example, it can be specifically: there are currently 10 data points in the time series database, one every 1 second, and the query condition Yes, limit the original result to 5 data points, and sum the original result every 10 seconds (using an aggregation function to sum), then the result becomes the sum of the previous 5 seconds, not 10 seconds Therefore, the existing technical solutions for restricting the original query results (before aggregation) may easily lead to errors in data query results.
本实施例的数据查询的处理方法,由于采用数据查询的各聚合函数的采样时间的最小公倍数设置限制时刻,可以保证最后一页之前的每一页的数据查询的原始数据点均能够对各个聚合函数进行完整的聚合处理,与现有技术的对原始结果(聚合前的)进行限制的技术方案相比,可以保证数据查询结果的准确性。In the data query processing method of this embodiment, since the least common multiple of the sampling time of each aggregation function of the data query is used to set the limit time, it can be guaranteed that the original data points of the data query of each page before the last page can be used for each aggregation The function performs a complete aggregation process, which can ensure the accuracy of the data query results compared with the technical solution of restricting the original results (before aggregation) in the prior art.
综上所述,本实施例的数据查询的处理方法,不仅可以适用于对查询的原始结果(聚合前的)进行限制的技术方案,还可以适用于对查询的最终结果(聚合后的)进行限制的技术方案,因此,本实施例的数据查询的处理方法,具有较强的适用性,且数据查询耗时非常短、数据查询效率非常高。To sum up, the data query processing method in this embodiment is not only applicable to the technical solution of restricting the original result of the query (before aggregation), but also applicable to the final result of the query (after aggregation). Therefore, the data query processing method of this embodiment has strong applicability, and the data query time is very short and the data query efficiency is very high.
图2为本发明的数据查询的处理装置实施例一的结构图。如图2所示,本实施例的数据查询的处理装置,具体可以包括:数据点获取模块10、时刻获取模块11和聚合处理模块12。FIG. 2 is a structural diagram of Embodiment 1 of the data query processing device of the present invention. As shown in FIG. 2 , the data query processing device in this embodiment may specifically include: a data point acquisition module 10 , a time acquisition module 11 and an aggregation processing module 12 .
其中数据点获取模块10用于根据数据过滤条件和数据查询的起始时刻开始,从时序数据库中获取N个数据点,N为预设的软性限制阈值;时刻获取模块11用于根据数据查询的各聚合函数的采样时间的最小公倍数、数据点获取模块10获取的第N个数据点对应的时刻以及起始时刻,获取限制时刻;数据点获取模块10还用于当时刻获取模块11获取的限制时刻位于结束时刻之前,以第N个数据点对应的时刻开始,根据数据过滤条件从时序数据库中继续获取限制时刻之前的剩余数据点;聚合处理模块12用于根据数据点获取模块10获取的各聚合函数对起始时刻至限制时刻之间的所有数据点进行聚合处理,得到第一数据查询结果。Wherein the data point acquisition module 10 is used to obtain N data points from the time series database according to the initial moment of the data filtering condition and data query, and N is a preset soft limit threshold; the time acquisition module 11 is used to query according to the data The least common multiple of the sampling time of each aggregate function, the time corresponding to the Nth data point obtained by the data point acquisition module 10 and the start time, and the acquisition limit time; The limit time is located before the end time, starting with the time corresponding to the Nth data point, and continuing to obtain the remaining data points before the limit time from the time series database according to the data filter condition; Each aggregation function aggregates all data points between the start time and the limit time to obtain the first data query result.
本实施例的数据查询的处理装置,通过采用上述模块实现数据查询处理的实现原理以及技术效果与上述相关方法实施例的实现相同,详细可以参考上述相关方法实施例的记载,在此不再赘述。In the data query processing device of this embodiment, the implementation principle and technical effect of data query processing by using the above-mentioned modules are the same as those of the above-mentioned related method embodiments. For details, please refer to the records of the above-mentioned related method embodiments, and will not repeat them here. .
图3为本发明的数据查询的处理装置实施例二的结构图。本实施例的数据处理查询装置在上述图2所示实施例的技术方案的基础上,进一步更加详细地介绍本发明的技术方案。FIG. 3 is a structural diagram of Embodiment 2 of the data query processing device of the present invention. The data processing query device of this embodiment further introduces the technical solution of the present invention in more detail on the basis of the technical solution of the above embodiment shown in FIG. 2 .
如图3所示,本实施例的数据处理查询装置中,还包括:发送模块13。发送模块13用于向用户反馈时刻获取模块11限制时刻以及对应的聚合处理模块12处理的第一数据查询结果。As shown in FIG. 3 , the data processing query device of this embodiment further includes: a sending module 13 . The sending module 13 is used to feed back the limited time of the time acquisition module 11 and the first data query result processed by the corresponding aggregation processing module 12 to the user.
进一步可选地,如图3所示,本实施例的数据处理查询装置中,还包括接收模块14和更新模块15。Further optionally, as shown in FIG. 3 , the data processing query device of this embodiment further includes a receiving module 14 and an updating module 15 .
其中接收模块14用于接收用户发送的携带限制时刻的继续查询指示消息;更新模块15用于根据接收模块14接收的继续查询指示消息,将起始时刻的数值更新为限制时刻的数值,以继续进行数据查询处理。即继续执行数据点获取模块10、时刻获取模块11和聚合处理模块12的功能。即更新模块1将起始时刻的数值更新为限制时刻的数值更新完之后,可以触发数据点获取模块10启动,以继续进行数据查询处理。Wherein the receiving module 14 is used to receive the continuation inquiry instruction message of carrying the limited time sent by the user; the update module 15 is used to update the numerical value of the initial moment to the numerical value of the limited time according to the continuation inquiry instruction message received by the receiving module 14, to continue Perform data query processing. That is, continue to execute the functions of the data point acquisition module 10 , the time acquisition module 11 and the aggregation processing module 12 . That is, after the update module 1 updates the value at the start time to the value at the limit time, it can trigger the start of the data point acquisition module 10 to continue data query processing.
进一步可选地,本实施例的数据处理查询装置中,时刻获取模块11具体用于从lcm_sample_time的倍数中,取比(soft_limit_time-start_time)大的最小的一个,然后加上start_time,等于limit_time;Further optionally, in the data processing query device of this embodiment, the time acquisition module 11 is specifically configured to select the smallest one greater than (soft_limit_time-start_time) from the multiples of lcm_sample_time, and then add start_time to equal limit_time;
其中,lcm_sample_time为数据查询的各聚合函数的采样时间的最小公倍数;soft_limit_time为第N个数据点对应的时刻;start_time为起始时刻;limit_time为限制时刻。Among them, lcm_sample_time is the least common multiple of the sampling time of each aggregation function of data query; soft_limit_time is the time corresponding to the Nth data point; start_time is the starting time; limit_time is the limit time.
进一步可选地,如图3所示,本实施例的数据处理查询装置中,还包括参数获取模块16。参数获取模块16用于获取用户指定的数据过滤条件、数据查询的各聚合函数的采样时间、数据查询的起始时刻和结束时刻。Further optionally, as shown in FIG. 3 , the data processing query device of this embodiment further includes a parameter acquisition module 16 . The parameter obtaining module 16 is used to obtain the data filter condition specified by the user, the sampling time of each aggregation function of the data query, the start time and the end time of the data query.
对应地,数据点获取模块10用于根据参数获取模块16获取的数据过滤条件和数据查询的起始时刻开始,从时序数据库中获取N个数据点,N为预设的软性限制阈值。时刻获取模块11用于根据参数获取模块16获取的数据查询的各聚合函数的采样时间的最小公倍数、第N个数据点对应的时刻以及参数获取模块16获取的起始时刻,获取限制时刻。Correspondingly, the data point acquisition module 10 is used to acquire N data points from the time series database according to the data filtering conditions acquired by the parameter acquisition module 16 and the start time of the data query, where N is a preset soft limit threshold. The time acquisition module 11 is used to obtain the limit time according to the least common multiple of the sampling time of each aggregation function of the data query acquired by the parameter acquisition module 16, the time corresponding to the Nth data point, and the start time acquired by the parameter acquisition module 16.
进一步可选地,本实施例的数据处理查询装置中,时刻获取模块11还用于从时序数据库中获取第N个数据点的时间戳;将第N个数据点的时间戳作为第N个数据点对应的时刻。Further optionally, in the data processing query device of this embodiment, the time acquisition module 11 is also used to acquire the timestamp of the Nth data point from the time series database; the timestamp of the Nth data point is used as the Nth data point point at the corresponding moment.
进一步可选地,本实施例的数据处理查询装置中,数据点获取模块10还用于当限制时刻位于结束时刻之后,以第N个数据点对应的时刻开始,根据数据过滤条件从时序数据库中继续获取结束时刻之前的剩余数据点;Further optionally, in the data processing query device of this embodiment, the data point acquisition module 10 is also used to start from the time corresponding to the Nth data point when the restricted time is after the end time, and select from the time series database according to the data filter condition Continue to obtain the remaining data points before the end time;
聚合处理模块12还用于根据各聚合函数对起始时刻至结束时刻之间的所有数据点进行聚合处理,得到第二数据查询结果。The aggregation processing module 12 is also configured to perform aggregation processing on all data points between the start time and the end time according to each aggregation function to obtain the second data query result.
本实施例的数据查询的处理装置,通过采用上述模块实现数据查询处理的实现原理以及技术效果与上述相关方法实施例的实现相同,详细可以参考上述相关方法实施例的记载,在此不再赘述。In the data query processing device of this embodiment, the implementation principle and technical effect of data query processing by using the above-mentioned modules are the same as those of the above-mentioned related method embodiments. For details, please refer to the records of the above-mentioned related method embodiments, and will not repeat them here. .
在本发明所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, and include several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) or a processor (processor) execute the methods described in various embodiments of the present invention. partial steps. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the present invention. within the scope of protection.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610833403.3A CN106407395B (en) | 2016-09-19 | 2016-09-19 | Data query processing method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610833403.3A CN106407395B (en) | 2016-09-19 | 2016-09-19 | Data query processing method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106407395A true CN106407395A (en) | 2017-02-15 |
| CN106407395B CN106407395B (en) | 2019-09-20 |
Family
ID=57997940
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610833403.3A Active CN106407395B (en) | 2016-09-19 | 2016-09-19 | Data query processing method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106407395B (en) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107220283A (en) * | 2017-04-21 | 2017-09-29 | 东软集团股份有限公司 | Data processing method, device, storage medium and electronic equipment |
| CN108268589A (en) * | 2017-12-05 | 2018-07-10 | 北京百度网讯科技有限公司 | Aggregate query method, apparatus, computer equipment and the readable medium of time series data |
| CN109164980A (en) * | 2018-08-03 | 2019-01-08 | 北京涛思数据科技有限公司 | A kind of optimizing polymerization processing method of time series data |
| WO2019114754A1 (en) * | 2017-12-12 | 2019-06-20 | 清华大学 | Join query method and system for multiple time sequences under columnar storage |
| CN110377642A (en) * | 2019-07-24 | 2019-10-25 | 杭州太尼科技有限公司 | A kind of device of quick obtaining ordered sequence data |
| CN111475526A (en) * | 2020-03-10 | 2020-07-31 | 平安科技(深圳)有限公司 | Sequential data conversion method based on oracle data and related equipment thereof |
| CN116899899A (en) * | 2023-06-29 | 2023-10-20 | 广东利元亨智能装备股份有限公司 | A detection and control method and device for X-Ray automatic detection equipment |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130066674A1 (en) * | 2011-09-12 | 2013-03-14 | Microsoft Corporation | Marketplace for timely event data distribution |
| CN103281343A (en) * | 2013-01-07 | 2013-09-04 | 广西电网公司 | Realization method of universal historical data service based on agency mechanism |
| CN103605805A (en) * | 2013-12-09 | 2014-02-26 | 冶金自动化研究设计院 | Storage method of massive time series data |
-
2016
- 2016-09-19 CN CN201610833403.3A patent/CN106407395B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130066674A1 (en) * | 2011-09-12 | 2013-03-14 | Microsoft Corporation | Marketplace for timely event data distribution |
| CN103281343A (en) * | 2013-01-07 | 2013-09-04 | 广西电网公司 | Realization method of universal historical data service based on agency mechanism |
| CN103605805A (en) * | 2013-12-09 | 2014-02-26 | 冶金自动化研究设计院 | Storage method of massive time series data |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107220283B (en) * | 2017-04-21 | 2019-11-08 | 东软集团股份有限公司 | Data processing method, device, storage medium and electronic equipment |
| CN107220283A (en) * | 2017-04-21 | 2017-09-29 | 东软集团股份有限公司 | Data processing method, device, storage medium and electronic equipment |
| CN108268589A (en) * | 2017-12-05 | 2018-07-10 | 北京百度网讯科技有限公司 | Aggregate query method, apparatus, computer equipment and the readable medium of time series data |
| WO2019114754A1 (en) * | 2017-12-12 | 2019-06-20 | 清华大学 | Join query method and system for multiple time sequences under columnar storage |
| WO2020024799A1 (en) * | 2018-08-03 | 2020-02-06 | 北京涛思数据科技有限公司 | Method for aggregation optimization of time series data |
| CN109164980A (en) * | 2018-08-03 | 2019-01-08 | 北京涛思数据科技有限公司 | A kind of optimizing polymerization processing method of time series data |
| US20210333994A1 (en) * | 2018-08-03 | 2021-10-28 | Taos Data | Method for aggregation optimization of time series data |
| US11714554B2 (en) * | 2018-08-03 | 2023-08-01 | Taos Data | Method for aggregation optimization of time series data |
| CN109164980B (en) * | 2018-08-03 | 2024-02-02 | 北京涛思数据科技有限公司 | Aggregation optimization processing method for time sequence data |
| CN110377642A (en) * | 2019-07-24 | 2019-10-25 | 杭州太尼科技有限公司 | A kind of device of quick obtaining ordered sequence data |
| CN111475526A (en) * | 2020-03-10 | 2020-07-31 | 平安科技(深圳)有限公司 | Sequential data conversion method based on oracle data and related equipment thereof |
| CN111475526B (en) * | 2020-03-10 | 2024-05-28 | 平安科技(深圳)有限公司 | Sequential data conversion method based on oracle data and related equipment thereof |
| CN116899899A (en) * | 2023-06-29 | 2023-10-20 | 广东利元亨智能装备股份有限公司 | A detection and control method and device for X-Ray automatic detection equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106407395B (en) | 2019-09-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106407395B (en) | Data query processing method and device | |
| CN113132267B (en) | Distributed system, data aggregation method and computer readable storage medium | |
| US20190034550A1 (en) | Data caching method and apparatus | |
| CN110427386B (en) | Data processing method, device and computer storage medium | |
| CN106383864B (en) | A query request processing method and device for a time series database | |
| CN113849499A (en) | Data query method, device, storage medium and electronic device | |
| CN110765195A (en) | Data analysis method and device, storage medium and electronic equipment | |
| US11146660B2 (en) | Information packet download method for preventing high concurrency, electronic device and storage medium | |
| CN107203437A (en) | The methods, devices and systems for preventing internal storage data from losing | |
| CN113760983A (en) | Data processing method, system and non-transitory computer readable storage medium | |
| US20150199408A1 (en) | Systems and methods for a high speed query infrastructure | |
| CN109359139A (en) | Data synchronization method, system, electronic device and computer readable storage medium | |
| CN109241099B (en) | Data query method and terminal equipment | |
| CN112527900A (en) | Method, device, equipment and medium for database multi-copy reading consistency | |
| CN114116762A (en) | An offline data fuzzy search method, device, device and medium | |
| CN101751429A (en) | Method and device for synchronizing foreground database and background database | |
| CN112231292B (en) | File processing method, device, storage medium and computer equipment | |
| CN113688602A (en) | Task processing method and device | |
| CN108039960B (en) | Configuration information issuing method and server | |
| WO2021057515A1 (en) | Date switching data offloading method, apparatus, device, and medium | |
| WO2023197904A1 (en) | Data processing method and apparatus, computer device and storage medium | |
| EP3107010A1 (en) | Data integration pipeline | |
| CN115481097A (en) | Method and device for realizing real-time data report under mass flow and computer equipment | |
| CN111651466B (en) | Data sampling method and device | |
| CN109739883B (en) | Method and device for improving data query performance and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |