Continuous aggregation data updating method, device, equipment and storage medium
By introducing external components and message queue mechanisms into the time series database, it can sense data changes and generate update statements, which solves the problem that existing time series database updates are not universal, realizes continuous aggregated updates of multiple time series databases, and improves update performance and accuracy. sex.
Patent Information
- Application Number
- CN202311709003.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-12-13
AI Technical Summary
Existing time series databases lack versatility when updating data. In particular, TimescaleDB's continuous aggregation update relies on the relational database kernel and cannot be migrated to other time series databases. Moreover, some time series databases do not have the ability to automatically update continuous aggregation, resulting in inaccurate continuous aggregation results. .
A continuous aggregation data update method is proposed, which senses data changes through external components, generates data change signals, uses applications and message queues to write time series data into the time series database, and parses and processes the data through the continuous aggregation update program to generate update statements. Realize automatic update of time series database, suitable for various time series databases.
Without relying on specific database kernel functions, it achieves continuous aggregation and update of time series data, improves update performance, provides automatic update capabilities, is suitable for a variety of time series databases, ensures the correctness of continuous aggregation results, and reduces The impact on the normal business of the database has been reduced.
Smart Images

Figure CN117891822B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of time series databases, and in particular to a method, device, equipment and storage medium for continuously updating aggregated data. Background Art
[0002] TimescaleDB is built on a relational database, and it uses triggers in relational databases to achieve automatic updates of continuous aggregation. When new data is written, a new record is inserted into the failure log through a trigger, which triggers continuous aggregation, recalculates, and updates data, thereby achieving automatic updates of continuous aggregation results.
[0003] However, TimescaleDB's continuous aggregation updates rely on triggers provided by the relational database kernel and cannot be migrated to other time series databases, so they are not universal. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a continuous aggregate data update method, which can complete the continuous aggregate update of time series data in the case of being applicable to a variety of time series databases.
[0005] The present invention also provides a continuous aggregation data updating device.
[0006] The present invention also provides a continuous aggregation data updating device.
[0007] The present invention also provides a computer-readable storage medium.
[0008] In a first aspect, an embodiment of the present invention provides a method for continuously updating aggregated data, comprising:
[0009] After receiving the data change signal, the time series data stored in the message queue is parsed to obtain the initial time series data; wherein the data change signal is output after the external component senses the time series data;
[0010] Acquire continuous aggregation information in a time series database according to the initial time series data to obtain target continuous aggregation information;
[0011] According to the target continuous aggregation information, query the continuously aggregated data in the time series database to obtain the continuously aggregated data;
[0012] Feedback a data update statement to the time series database according to the continuous aggregation data, so that the time series database updates the continuous aggregation data according to the data update statement to obtain target continuous aggregation data.
[0013] The continuous aggregation data update method of the embodiment of the present invention has at least the following beneficial effects: the change of data is sensed by an external component. If the data changes, the external component generates a data change signal and transmits the data change signal to the application. The application writes the time series data into the message queue and the time series database. The time series data stored in the message queue is parsed by the continuous aggregation update program to obtain the initial time series data. According to the initial time series data, information query is performed in the time series database to obtain the continuous aggregation information to obtain the target continuous aggregation information. At the current timestamp, data query is performed in the time series database according to the target continuous aggregation information to query each data after continuous aggregation is completed to obtain the continuous aggregation data. According to the continuous aggregation data, a corresponding update statement is generated to obtain the data update statement, and the data update statement is fed back to the time series database so that the time series database updates the stored continuous aggregation data according to the data update statement to obtain the target continuous aggregation data. By sensing the change of data through an external component, generating and outputting a data change signal to the application, the change of data can be sensed without relying on specific database kernel functions. The time series data is written into the message queue and the time series database through the application, and the time series data stored in the message queue is parsed through the continuous aggregation update program to obtain the initial time series data. The continuous aggregation information in the time series database is queried according to the initial time series data to obtain the target continuous aggregation information. The data after continuous aggregation is completed is queried in the time series database according to the target continuous aggregation information to obtain the continuous aggregation data, and a data update statement is generated according to the continuous aggregation data so that the time series database completes the update of the continuous aggregation data according to the data update statement to obtain the target continuous aggregation data. The continuous aggregation update of the time series data can be completed while being applicable to a variety of time series databases.
[0014] According to some other embodiments of the continuous aggregation data update method of the present invention, the initial time series data includes an operation table name, the operation table name includes a name of a table operated in the time series data, and acquiring continuous aggregation information in the time series database according to the initial time series data to obtain target continuous aggregation information includes:
[0015] Filter the time series table in the time series database according to the name of the operation table to obtain the target time series table;
[0016] The target time series table is searched for information on continuous aggregation to obtain target continuous aggregation information.
[0017] According to some other embodiments of the continuous aggregation data updating method of the present invention, after querying the continuously aggregated data in the time series database according to the target continuous aggregation information to obtain the continuously aggregated data, the continuous aggregation data updating method further includes:
[0018] Obtain the timestamp of the time series data currently being written into the time series database to obtain the write timestamp;
[0019] According to the target continuous aggregation information, query the timestamp after the current continuous aggregation is completed to obtain the aggregation timestamp;
[0020] An update judgment is performed according to the write timestamp and the aggregation timestamp to obtain an update judgment result.
[0021] According to some other embodiments of the present invention, the continuous aggregation data update method, performing update judgment according to the write timestamp and the aggregation timestamp to obtain an update judgment result, includes:
[0022] Acquire a continuous aggregation window according to the aggregation timestamp to obtain a target continuous aggregation window;
[0023] Compare the write timestamp with the target continuous aggregation window to obtain the update judgment result;
[0024] If the write timestamp is within the range of the target continuous aggregation window, the update judgment result indicates that data update needs to be performed;
[0025] If the write timestamp is not within the range of the target continuous aggregation window, the update determination result indicates that data update does not need to be performed.
[0026] According to some other embodiments of the continuous aggregation data update method of the present invention, the feeding back a data update statement to the time series database according to the continuous aggregation data includes:
[0027] Recalculate the continuous aggregation result according to the write timestamp, the target continuous aggregation window and the continuous aggregation data to obtain the target continuous aggregation result;
[0028] Generate a corresponding update statement according to the type of the time series database and the target continuous aggregation result to obtain the data update statement;
[0029] The data update statement is sent to the time series database, so that the time series database updates the continuous aggregation data according to the data update statement to obtain the target continuous aggregation data.
[0030] According to some other embodiments of the present invention, the continuous aggregation data update method, recalculating the continuous aggregation result according to the write timestamp, the target continuous aggregation window and the continuous aggregation data to obtain the target continuous aggregation result, includes:
[0031] Determine a window for re-executing continuous aggregation according to the write timestamp and the target continuous aggregation window, and obtain a re-continuous aggregation window;
[0032] Acquire the continuous aggregation data in the time series table according to the re-continuous aggregation window to obtain re-aggregated data;
[0033] The continuous aggregation result is recalculated according to the re-aggregated data to obtain the target continuous aggregation result.
[0034] According to some other embodiments of the present invention, the continuous aggregate data updating method further includes:
[0035] Obtaining the execution cycle preset in the time series database to obtain a target execution cycle; wherein the execution cycle includes a cycle for executing continuous aggregation of the target time series table in the time series database;
[0036] The value of the target execution period is set to the period of continuous aggregation update to obtain a target update period;
[0037] After executing continuous aggregation according to the target execution period, the continuous aggregation data is updated according to the target update period.
[0038] In a second aspect, an embodiment of the present invention provides a continuous aggregation data update device, comprising:
[0039] A time series data parsing module, used to parse the time series data stored in the message queue after receiving the data change signal to obtain the initial time series data; wherein the data change signal is output after the external component senses the time series data;
[0040] An information acquisition module, used to acquire continuous aggregation information in a time series database according to the initial time series data, to obtain target continuous aggregation information;
[0041] A data acquisition module, configured to query the continuously aggregated data in the time series database according to the target continuously aggregated information to obtain the continuously aggregated data;
[0042] The data update module is used to feed back a data update statement to the time series database according to the continuous aggregation data, so that the time series database updates the continuous aggregation data according to the data update statement to obtain target continuous aggregation data.
[0043] The continuous aggregation data update device of the embodiment of the present invention has at least the following beneficial effects: the change of data is sensed by an external component. If the data changes, the external component generates a data change signal and transmits the data change signal to the application. The application writes the time series data into the message queue and the time series database. The time series data parsing module parses the time series data stored in the message queue to obtain the initial time series data. The information acquisition module performs information query in the time series database according to the initial time series data to obtain the continuous aggregation information and obtain the target continuous aggregation information. At the current timestamp, the data acquisition module performs data query in the time series database according to the target continuous aggregation information to query each data after continuous aggregation is completed to obtain continuous aggregation data. The data update module generates a corresponding update statement according to the continuous aggregation data to obtain a data update statement, and feeds back the data update statement to the time series database so that the time series database updates the stored continuous aggregation data according to the data update statement to obtain the target continuous aggregation data. By sensing the change of data through an external component, generating and outputting a data change signal to the application, the change of data can be sensed without relying on a specific database kernel function. The time series data is written into the message queue and the time series database through the application, and the time series data stored in the message queue is parsed through the continuous aggregation update program to obtain the initial time series data. The continuous aggregation information in the time series database is queried according to the initial time series data to obtain the target continuous aggregation information. The data after continuous aggregation is completed is queried in the time series database according to the target continuous aggregation information to obtain the continuous aggregation data, and a data update statement is generated according to the continuous aggregation data so that the time series database completes the update of the continuous aggregation data according to the data update statement to obtain the target continuous aggregation data. The continuous aggregation update of the time series data can be completed while being applicable to a variety of time series databases.
[0044] In a third aspect, an embodiment of the present invention provides a continuous aggregation data update device, including:
[0045] at least one processor, and
[0046] a memory communicatively connected to the at least one processor; wherein,
[0047] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the continuous aggregate data update method as described in the first aspect.
[0048] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the continuous aggregate data update method as described in the first aspect.
[0049] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flowchart of a specific embodiment of the method for continuously updating aggregated data in an embodiment of the present invention;
[0051] Figure 2 yes Figure 1 A schematic flow chart of a specific embodiment of step S102;
[0052] Figure 3 is a flowchart of another specific embodiment of the method for continuously updating aggregated data in an embodiment of the present invention;
[0053] Figure 4 Figure 3 A schematic flow chart of a specific embodiment of step S303;
[0054] Figure 5 Figure 1 A schematic flow chart of a specific embodiment of step S104;
[0055] Figure 6 Figure 5 A schematic flow chart of a specific embodiment of step S501;
[0056] Figure 7 is a flowchart of another specific embodiment of the method for continuously updating aggregated data in an embodiment of the present invention;
[0057] Figure 8 It is a module block diagram of a specific embodiment of a continuous aggregation data updating device in an embodiment of the present invention;
[0058] Fig. 9 is a schematic diagram of a specific embodiment of a component for continuous aggregation and updating in an embodiment of the present invention;
[0059] Fig.10 is a timing diagram of a specific embodiment of performing continuous aggregation update in an embodiment of the present invention;
[0060] Fig.11 It is a schematic diagram of a specific embodiment of continuous aggregation batch update in an embodiment of the present invention;
[0061] Fig.12 It is a flowchart of a specific embodiment of continuous aggregation incremental update in an embodiment of the present invention.
[0062] Description of reference numerals:
[0063] Time series data analysis module 801, information acquisition module 802, data acquisition module 803, data update module 804. DETAILED DESCRIPTION
[0064] The following will be combined with the embodiments to clearly and completely describe the concept of the present invention and the technical effects produced, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative work are all within the scope of protection of the present invention.
[0065] In the description of the present invention, if it involves a description of orientation, for example, the orientation or position relationship indicated by "upper", "lower", "front", "back", "left", "right", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. If a feature is referred to as being "set", "fixed", "connected", or "installed" on another feature, it can be directly set, fixed, or connected to the other feature, or it can be indirectly set, fixed, connected, or installed on the other feature.
[0066] In the description of the embodiments of the present invention, if "several" is involved, it means more than one, if "multiple" is involved, it means more than two, if "greater than", "less than" or "exceed" is involved, it should be understood as not including the number itself, if "above", "below" or "within" is involved, it should be understood as including the number itself. If "first" or "second" is involved, it should be understood as being used to distinguish technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0067] First, some nouns involved in this application are analyzed:
[0068] Time series data is a collection of data organized in chronological order. Time series data generated in a certain period of time in the past is relatively stable. Time series data has many application scenarios, such as operation and maintenance monitoring, environmental monitoring, etc., which often periodically query the data aggregation results within a certain period of time, such as querying the memory usage of the device within a certain period of time, and calculating the average temperature within a certain period of time. Since time series data is rarely updated, the time series data generated within a certain period of time in the past usually does not change. In order to quickly respond to periodic queries of time series data, many mainstream time series databases, such as InfluxDB and TimescaleDB, provide continuous aggregation solutions. Among them, the label in the time series data is an important part of the time series data. The label describes the information of the data source and is used as a condition for data query in the time series scenario. Many time series databases use labels as indexes for time series data.
[0069] Continuous Aggregates, also known as Continuous Queries in some databases, is a mechanism for periodically aggregating time series data. By periodically executing queries in the background and retaining the results, continuous aggregation can quickly respond to user queries and improve database query performance. In addition, executing continuous aggregation and retaining the results of continuous aggregation can achieve data downsampling and reduce the space required to store data.
[0070] TimescaleDB is built on a relational database, and it uses triggers in relational databases to achieve automatic updates of continuous aggregation. When new time series data is written, a new record is inserted into the failure log through a trigger, which triggers continuous aggregation, performs recalculation, and updates data, thereby achieving automatic updates of continuous aggregation results.
[0071] However, TimescaleDB's continuous aggregation updates rely on triggers provided by the relational database kernel and cannot be migrated to other time series databases, so they are not universal.
[0072] In addition, some time series databases, such as InfluxDB, do not provide the function of automatic update of continuous aggregation. When the time series data changes, the existing continuous aggregation data cannot be automatically updated, which will lead to inaccurate continuous aggregation results. Users can only obtain the continuous aggregation results of the updated time series data by deleting the existing continuous aggregation and then creating a new one.
[0073] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a continuous aggregate data update method, which can complete the continuous aggregate update of time series data in the case of being applicable to a variety of time series databases.
[0074] Please refer to Fig. 9 , Fig. 9 A schematic diagram of the components of continuous aggregation update in an embodiment of the present invention is shown. In some embodiments, the overall components include an application, a message queue, a continuous aggregation update program, and a time series database. The application is a producer or consumer of data and is responsible for writing time series data. At the same time, it can be used to query the results of continuous aggregation. In the overall solution, the application writes time series data to the time series database and sends the write request to the message queue. The message queue is used for communication between the application and the continuous aggregation update program, as well as data caching. The continuous aggregation update program is a program that consumes the message queue, completes the work of continuous aggregation update, and adapts to different time series databases. The time series database is the carrier of time series data and the main body of continuous aggregation execution. It responds to read and write requests issued by the application, and is used to process read and write requests from the continuous aggregation update program.
[0075] The present invention is adaptable to a variety of different time series databases without relying on a specific kernel mechanism, and does not affect the correctness of the continuous aggregation results, and does not affect the original continuous aggregation mechanism of the time series database. At the same time, this solution has better update performance and will not affect the normal business of the database.
[0076] Reference Figure 1 , Figure 1 The flowchart of the continuous aggregate data updating method in the embodiment of the present invention is shown. In some embodiments, the continuous aggregate data updating method may include but is not limited to steps S101 to S104.
[0077] Step S101, after receiving the data change signal, parsing the time series data stored in the message queue to obtain initial time series data; wherein the data change signal is output after the external component senses the time series data;
[0078] Step S102, acquiring continuous aggregation information in a time series database according to the initial time series data to obtain target continuous aggregation information;
[0079] Step S103, querying the continuously aggregated data in the time series database according to the target continuous aggregation information to obtain the continuously aggregated data;
[0080] Step S104: Feedback a data update statement to the time series database according to the continuous aggregation data, so that the time series database updates the continuous aggregation data according to the data update statement to obtain target continuous aggregation data.
[0081] In step S101 of some embodiments, when data changes, the external component can sense the data change.
[0082] In addition, when the application writes time series data, it needs to write the time series data to the message queue at the same time, and then transfer the time series data to the continuous aggregation update program, so that the continuous aggregation update program can obtain the time series data from the message queue for parsing and processing. Among them, when the application sends a write request to the time series database, it also sends a write request to the message queue. The message queue has a standard interface, and the application is responsible for writing the time series data to the message queue.
[0083] The continuous aggregation update program processes the time series data from the message queue and parses the specific object and time in the request from the time series data. For example, the specific object is the device temperature, and the write statement for a new time series data in TimescaleDB is "INSERT INTO table1 VALUES('T0-C001', '2023-01-0100:01:00', 30.0)". The continuous aggregation update program needs to parse the name of the table table 1 operated in the message queue, the device information T0-C001, the timestamp '2023-01-01 00:01:00', and the collected data 30.0 to prepare for the subsequent continuous aggregation update.
[0084] It should be noted that the message queue supports multiple data formats, and the content is similar to KV. After obtaining the KV structure, the continuous aggregation update program obtains the value of the corresponding field according to the field name. KV data parsing includes obtaining the field name and value in the corresponding format according to the standard interface.
[0085] Steps S101 to S104 shown in the embodiment of the present application, sense the change of data through external components, if the data changes, the external component generates a data change signal, and transmits the data change signal to the application, the application writes the time series data into the message queue and the time series database, parses the time series data stored in the message queue through the continuous aggregation update program, obtains the initial time series data, performs information query in the time series database according to the initial time series data to obtain the continuously aggregated information, obtains the target continuously aggregated information, performs data query in the time series database according to the target continuously aggregated information at the current timestamp, queries each data after the continuous aggregation is completed, obtains the continuously aggregated data, generates the corresponding update statement according to the continuously aggregated data, obtains the data update statement, and feeds the data update statement back to the time series database, so that the time series database updates the stored continuously aggregated data according to the data update statement, and obtains the target continuously aggregated data. By sensing the change of data through external components, generating and outputting data change signals to the application, it is possible to sense the change of data without relying on specific database kernel functions. The time series data is written into the message queue and the time series database through the application, and the time series data stored in the message queue is parsed through the continuous aggregation update program to obtain the initial time series data. The continuous aggregation information in the time series database is queried according to the initial time series data to obtain the target continuous aggregation information. The data after continuous aggregation is completed is queried in the time series database according to the target continuous aggregation information to obtain the continuous aggregation data, and a data update statement is generated according to the continuous aggregation data so that the time series database completes the update of the continuous aggregation data according to the data update statement to obtain the target continuous aggregation data. The continuous aggregation update of the time series data can be completed while being applicable to a variety of time series databases.
[0086] It should be noted that some time series databases do not have the ability to automatically update and continuously aggregate. The present invention can provide time series databases that do not have the ability to automatically update and continuously aggregate with the ability to automatically update and continuously aggregate.
[0087] Please refer to Figure 2 , Figure 2 A flow chart of a method for updating continuous aggregated data in an embodiment of the present invention is shown. In some embodiments, the initial time series data includes an operation table name, the operation table name includes the name of the table operated in the time series data, and continuous aggregated information is obtained in the time series database according to the initial time series data. Obtaining target continuous aggregated information may include but is not limited to steps S201 to S202.
[0088] Step S201, filtering the time series table in the time series database according to the operation table name to obtain the target time series table;
[0089] Step S202, querying the continuous aggregation information in the target time series table to obtain the target continuous aggregation information.
[0090] In steps S201 to S202 shown in the embodiment of the present application, after parsing the content of the time series data, the continuous aggregation update program can obtain the time series table name of the operation in the initial time series data, obtain the operation table name, filter the time series table in the time series database according to the operation table name, filter the time series table corresponding to the operation table name, obtain the target time series table, perform information query in the target time series table, query all the continuous aggregation information on the target time series table, and obtain the target continuous aggregation information. Filter the time series table in the time series database by the operation table name to obtain the target time series table, query all the continuous aggregation information in the target time series table, and obtain the target continuous aggregation information. It is possible to query all the continuous aggregation information in the time series table, which is convenient for subsequent acquisition of the continuous aggregation data.
[0091] It should be noted that multiple continuous aggregations can be created on the same time series table. For example, continuous aggregation CA1 is the average temperature of the device within 5 minutes, and continuous aggregation CA2 can also be created to count the highest temperature of the device within 5 minutes. By querying the continuous aggregation information on the current time series table, the data of the continuous aggregation that needs to be updated later can be obtained.
[0092] In step S103 of some embodiments, the corresponding time series tables are screened one by one in the time series database according to the target continuous aggregation information, and the continuously aggregated data are obtained one by one in the time series tables until all the continuously aggregated data in the time series tables are obtained to obtain the continuously aggregated data.
[0093] Please refer to Figure 3 , Figure 3 The flowchart of the continuous aggregation data updating method in the embodiment of the present invention is shown. In some embodiments, after querying the continuously aggregated data in the time series database according to the target continuous aggregation information to obtain the continuously aggregated data, the continuous aggregation data updating method may also include but is not limited to steps S301 to S303.
[0094] Step S301, obtaining the timestamp of the time series data currently written into the time series database to obtain the write timestamp;
[0095] Step S302, querying the timestamp after the current continuous aggregation is completed according to the target continuous aggregation information to obtain the aggregation timestamp;
[0096] Step S303: perform update judgment according to the write timestamp and the aggregation timestamp to obtain an update judgment result.
[0097] In the steps S301 to S303 shown in the embodiment of the present application, when writing the time series data into the time series database, the timestamp of the current moment is obtained to obtain the write timestamp, and after completing the latest continuous aggregation, the timestamp after the latest continuous aggregation is completed is queried according to the target continuous aggregation information to obtain the aggregation timestamp, and an update judgment is made according to the write timestamp and the aggregation timestamp to determine whether the continuous aggregation data needs to be updated to obtain an update judgment result. By obtaining the timestamp of the current written time series data to obtain the write timestamp, the timestamp of the latest completion of continuous aggregation is queried according to the target continuous aggregation information to obtain the aggregation timestamp, and whether the data needs to be updated according to the write timestamp and the aggregation timestamp to obtain an update judgment result, it can be determined whether there is any newly written time series data that needs to be continuously aggregated after the continuous aggregation is completed.
[0098] Please refer to Figure 4 , Figure 4 The flowchart of the continuous aggregation data update method in the embodiment of the present invention is shown. In some embodiments, the update judgment is performed according to the write timestamp and the aggregation timestamp, and the update judgment result obtained may include but is not limited to steps S401 to S404.
[0099] Step S401, obtaining a continuous aggregation window according to an aggregation timestamp to obtain a target continuous aggregation window;
[0100] Step S402, comparing the write timestamp with the target continuous aggregation window to obtain an update judgment result;
[0101] Step S403, if the write timestamp is within the range of the target continuous aggregation window, the update judgment result indicates that data update needs to be performed;
[0102] Step S404: if the write timestamp is not within the range of the target continuous aggregation window, the update judgment result indicates that data update does not need to be performed.
[0103] In steps S401 to S404 shown in the embodiment of the present application, a time window after continuous aggregation is completed is obtained according to the aggregation timestamp to obtain a target continuous aggregation window, and the write timestamp is compared with the maximum value of the target continuous aggregation window, and the write timestamp is compared with the minimum value of the target continuous aggregation window to obtain an update judgment result. If the write timestamp is less than the maximum value of the target continuous aggregation window and the write timestamp is greater than the minimum value of the target continuous aggregation window, the write timestamp is within the range of the target continuous aggregation window, and the update judgment result indicates that the continuous aggregation data needs to be updated. If the write timestamp is greater than the maximum value of the target continuous aggregation window, or the write timestamp is less than the minimum value of the target continuous aggregation window, the write timestamp is not within the range of the target continuous aggregation window, and the update judgment result indicates that the continuous aggregation data does not need to be updated. The time window of continuous aggregation is obtained through the aggregation timestamp to obtain the target continuous aggregation window. The write timestamp is compared with the maximum and minimum values of the target continuous aggregation window to obtain the update judgment result. If the write timestamp is within the range of the target continuous aggregation window, the update judgment result indicates that the continuous aggregation data needs to be updated. If the write timestamp is not within the range of the target continuous aggregation window, the update judgment result indicates that the continuous aggregation data does not need to be updated. It can be determined whether there is any newly written time series data that needs to be continuously aggregated after the continuous aggregation is completed.
[0104] It should be noted that determining whether to perform continuous aggregation update includes: querying the latest data of each continuous aggregation on the time series table. Assume that there are two continuous aggregations CA1 and CA2 on the time series table table1, where CA1 is the average temperature of the device within 5 minutes, and CA2 is the highest temperature of the device within 5 minutes. The continuous aggregation update program queries the timestamp of the latest continuous aggregation from the data of CA1 and CA2 respectively, so as to determine the location of the continuous aggregation update according to the timestamp of the latest continuous aggregation. For example, the timestamp of the latest written time series data is '2023-01-01 00:01:00', and the timestamp of the latest continuously aggregated data is '2023-01-01 00:05:00'. Therefore, it can be determined that the time series data written this time falls into an aggregated window, and there is continuously aggregated data in the time series data written this time that needs to be updated. If the timestamp of the time series data written this time is greater than the timestamp of the latest continuously aggregated data, it means that the data in the window has not been aggregated yet, and the update can be triggered after the time series database completes the continuous aggregation.
[0105] Please refer to Figure 5 , Figure 5The flowchart of the continuous aggregation data update method in an embodiment of the present invention is shown. In some embodiments, feeding back a data update statement to a time series database according to the continuous aggregation data may include but is not limited to steps S501 to S503.
[0106] Step S501, recalculating the continuous aggregation result according to the write timestamp, the target continuous aggregation window and the continuous aggregation data to obtain the target continuous aggregation result;
[0107] Step S502, generating a corresponding update statement according to the type of the time series database and the target continuous aggregation result to obtain a data update statement;
[0108] Step S503: Send the data update statement to the time series database, so that the time series database updates the continuous aggregation data according to the data update statement to obtain the target continuous aggregation data.
[0109] Steps S501 to S503 shown in the embodiment of the present application are to obtain corresponding continuous aggregation data according to the write timestamp and the target continuous aggregation window, recalculate the continuous aggregation result according to the latest written data and the continuous aggregation data, obtain the target continuous aggregation result, obtain the type of the time series database, generate an update statement in response to the current type of the time series database according to the type of the time series database and the target continuous aggregation result, obtain the data update statement, send the data update statement to the time series database of the current type, so that the time series database of the current type performs continuous aggregation update on the continuous aggregation data according to the data update statement, and obtain the target continuous aggregation data after the continuous aggregation update is completed. The corresponding continuous aggregation data is filtered by the write timestamp and the target continuous aggregation window, and the continuous aggregation result is recalculated according to the continuous aggregation data and the written data to obtain the target continuous aggregation result, and the data update statement in response to the time series database is generated according to the type of the time series database and the target continuous aggregation result, and the data update statement is sent to the time series database, so that the time series database performs continuous aggregation update according to the data update statement, and obtains the target continuous aggregation data, which can complete the continuous aggregation update of the time series data in the case of being applicable to multiple time series databases.
[0110] Please refer to Figure 6 , Figure 6 The flowchart of the continuous aggregation data updating method in the embodiment of the present invention is shown. In some embodiments, the continuous aggregation result is recalculated according to the write timestamp, the target continuous aggregation window and the continuous aggregation data, and the target continuous aggregation result may include but is not limited to steps S601 to S603.
[0111] Step S601, determining a window for re-executing continuous aggregation according to the write timestamp and the target continuous aggregation window, to obtain a re-continuous aggregation window;
[0112] Step S602, acquiring continuous aggregation data in the time series table according to the re-continuous aggregation window to obtain re-aggregated data;
[0113] Step S603, recalculating the continuous aggregation result according to the re-aggregated data to obtain the target continuous aggregation result.
[0114] In the steps S601 to S603 shown in the embodiment of the present application, the write timestamp is set to the minimum value of the time window for re-executing continuous aggregation, the maximum value of the target continuous aggregation window is set to the maximum value of the time window for re-executing continuous aggregation, and the re-continuous aggregation window is obtained. The continuous aggregation data is filtered in the time series table according to the re-continuous aggregation window to obtain the continuous aggregation data whose timestamp is located in the re-continuous aggregation window to obtain the re-aggregated data, and the result of continuous aggregation is recalculated according to the latest written data and the re-aggregated data to obtain the target continuous aggregation result. The re-continuous aggregation window for re-executing continuous aggregation is determined by the write timestamp and the target continuous aggregation window, and the continuous aggregation data whose timestamp is located in the re-continuous aggregation window is obtained in the time series table to obtain the re-aggregated data. The target continuous aggregation result of continuous aggregation is recalculated according to the re-aggregated data and the latest written data, and the result of continuous aggregation can be recalculated after the new data is written.
[0115] It should be noted that the window for this continuous aggregation update is determined based on the timestamp of the latest written data and the continuous aggregation window, and then the continuous aggregation results of the data within the window range of the continuous aggregation update are calculated. For example, the timestamp of the latest written data is '2023-01-01 00:01:00', and the windows of continuous aggregation CA1 and CA2 are both 5 minutes, then the window for this continuous aggregation update is [2023-01-01 00:01:00, 2023-01-01 00:05:00), query the data within the window for continuous aggregation update in the time series table1, obtain the re-aggregated data, and recalculate the average and maximum temperature values based on the re-aggregated data.
[0116] In some embodiments, a query statement is sent directly to the time series database to obtain the required data. For example, continuous aggregation CA1 is to calculate the average value. If the time series database is TimescaleDB, the following query statement is sent: SELECT SUM(temperature), COUNT(temperature)FROM table1 WHERE time>='2023-01-01 00:00:00'and time<2023-01-01 00:05:00'. According to the query statement, the sum of the temperatures and the number of entries count are obtained, and then the average value is recalculated based on the value of the latest written data: (sum+30.0) / (count+1). Continuous aggregation CA2 is to calculate the maximum value of the temperature. The following query statement is sent directly: select max(temperature)fromtable1 where time>='2023-01-01 00:00:00'and time<2023-01-01 00:05:00'. The historical highest temperature max is obtained according to the query statement. If the temperature value of the latest written data exceeds the historical highest temperature max, the highest dimension needs to be updated to the temperature written this time, otherwise no update is required.
[0117] Generating a continuous aggregation data update statement includes: after recalculating the result of the continuous aggregation window that needs to be updated, the continuous aggregation update program generates a corresponding update statement according to the type of time series database. Many time series databases implemented based on relational databases support update statements, and the generated statements are similar to: UPDA TE CA1 SET avg=33.95WHERE time='2023-01-01 00:00:00'AND device='T0-C001'. However, some NoSQL time series databases do not support update statements, and data updates are implemented by writing a piece of data to overwrite the original data. They can be adapted according to the type of database and generate corresponding data update statements.
[0118] The continuous aggregation update program sends the generated update statement to the time series database, which executes the update of the continuous aggregation data and returns the update result. After receiving the update statement sent by the continuous aggregation update program, the time series database executes the corresponding statement to complete the update of the continuous aggregation.
[0119] Reference Fig.10 , Fig.10A timing diagram of continuous aggregation update in an embodiment of the present invention is shown. In some embodiments, an application writes time series data into a message queue and a time series database at the same time, the message queue and the time series database respectively feedback the writing results, a continuous aggregation update program obtains the time series data in the message queue, the continuous aggregation update program parses the time series data to obtain initial time series data, the time series database continuously aggregates the time series data to obtain continuous aggregation data, the continuous aggregation update program queries the continuous aggregation information in the time series database according to the initial time series data to obtain target continuous aggregation information, the continuous aggregation update program queries the continuous aggregation data according to the target continuous aggregation information, generates a data update statement according to the continuous aggregation data, and feeds back the data update statement to the time series database, so that the time series database performs continuous aggregation update to obtain target continuous aggregation data, and feeds back the result of continuous aggregation update to the continuous aggregation update program.
[0120] Please refer to Figure 7 , Figure 7 The flowchart of the continuous aggregate data updating method in the embodiment of the present invention is shown. In some embodiments, the continuous aggregate data updating method may also include but is not limited to steps S701 to S703.
[0121] Step S701, obtaining the preset execution cycle of the time series database to obtain the target execution cycle; wherein the execution cycle includes the cycle of executing continuous aggregation of the target time series table in the time series database;
[0122] Step S702, setting the value of the target execution period to the period of continuous aggregation update to obtain a target update period;
[0123] Step S703: After executing continuous aggregation according to the target execution period, the continuous aggregation data is updated according to the target update period.
[0124] In steps S701 to S703 shown in the embodiment of the present application, a target timing table is obtained in a timing database, and an execution period preset in the target timing table is obtained to obtain a period for executing continuous aggregation in the target timing table, and a target execution period is obtained. The value of the target execution period is set as the period for continuous aggregation update to obtain a target update period, and continuous aggregation is executed according to the target execution period. After the continuous aggregation is completed, the continuous aggregation data is updated according to the target update period.
[0125] Reference Fig.11 , Fig.11 A schematic diagram of continuous aggregation batch update in an embodiment of the present invention is shown. In some embodiments, continuous aggregation in a time series database usually runs according to a preset execution cycle. For example, if the user defines the execution cycle of continuous aggregation CA1 as 10s, the time series database executes continuous aggregation once every 10s according to the aggregation statement.
[0126] The continuous aggregate update program controls the execution of continuous aggregate updates through two dimensions: time and number of requests. Regardless of the amount of data written in the same batch and the number of write requests, the final actual number of updates is equal to the number of windows for continuous aggregate updates, and has nothing to do with the amount of data written and the number of write requests. Among them, the lowest frequency of continuous aggregate updates is the frequency of continuous aggregation execution of the time series database.
[0127] Reference Fig.12 , Fig.12 A schematic diagram of continuous aggregation incremental update in an embodiment of the present invention is shown. In some embodiments, for some commonly used aggregation operators, such as SUM, COUNT, AVG, MAX, and MIN, the continuous aggregation update program implements incremental update by caching the corresponding aggregation results of each continuous aggregation in memory.
[0128] Taking COUNT as an example, the number of time series data in the time range ['2023-01-01 00:00:00','2023-01-0100:05:00') of device T0-C001 is 3, and the timestamp of the latest time series data written is '2023-01-01 00:01:00'. Therefore, this continuous aggregation update does not need to query the time series database, and the result after continuous aggregation update is directly calculated to be 4. Among them, continuous aggregation incremental update can reduce the network interaction steps of querying the time series database, improve the performance and timeliness of continuous aggregation update, and at the same time, reduce the impact of reading the time series database business.
[0129] In some embodiments, calculating the continuously aggregated updated result includes:
[0130] (1) Calculate incremental data: Calculate the incremental data based on the amount of data, time, and data value written this time. For example, if the query operator is count (number of statistical data items), and two data items are written this time, the incremental data is 2.
[0131] (2) Query existing data: the historical statistical values of a continuous aggregation within a statistical window. For example, if there are three historical data in a window in a time series table, the aggregation results are cached in the continuous aggregation update program, and the three historical data can be obtained through the locally cached aggregation results without having to query the time series database again.
[0132] (3) Recalculate the continuous aggregation results: continuous aggregation results = incremental data + existing data.
[0133] It should be noted that there are certain differences between different query operators. Common operators such as SUM, COUNT, MAX, etc. can be calculated using the current implementation method. However, some complex query operators do not support calculations using the current implementation method, such as calculating percentiles. Complex query operators need to query the time series database to obtain data.
[0134] The present invention has high versatility and portability, does not rely on a specific time series database kernel mechanism, can realize automatic updating of continuous aggregation results, and can supplement the existing continuous aggregation mechanism of the time series database, making up for the fact that some time series databases do not have the ability to automatically perform continuous aggregation updates.
[0135] When performing continuous aggregation updates, the present invention does not need to update all the continuous aggregation data, but finds the continuous aggregation data that needs to be updated based on the written time series data. Compared with the full update method of some time series databases, the present invention implements on-demand updates, which can reduce the cost of continuous aggregation updates and improve the efficiency of continuous aggregation updates.
[0136] For some commonly used aggregation operators, the present invention caches the aggregation results corresponding to each continuous aggregation window in the continuous aggregation update program, and implements incremental updates based on the aggregation results. During the update process, there is no need to re-query the time series database, which reduces the network interaction steps with the time series database, improves the performance of continuous aggregation updates, and reduces the impact on the time series database business.
[0137] The present invention controls the frequency of continuous aggregation updates through two dimensions of batch processing and delayed update, which can reduce the impact of continuous aggregation updates on the normal business of the time series database and achieve imperceptible continuous aggregation updates.
[0138] Set a switch in the continuous aggregation update program. When the time series database does not need continuous aggregation update temporarily, or when a business error occurs, turn off the continuous aggregation update function through the built-in switch. When needed later, turn on the built-in switch and directly obtain the time series data from the message queue to perform continuous aggregation update.
[0139] In addition, the present application also discloses a continuous aggregation data update device, please refer to Figure 8 , Figure 8 The module block diagram of a continuous aggregate data update device is disclosed in an embodiment of the present invention. The continuous aggregate data update device can implement the above-mentioned continuous aggregate data update method, and the continuous aggregate data update device includes: a time series data analysis module 801, an information acquisition module 802, a data acquisition module 803 and a data update module 804, and the time series data analysis module 801, the information acquisition module 802, the data acquisition module 803 and the data update module 804 are all communication connected.
[0140] After receiving the data change signal, the time series data parsing module 801 parses the time series data stored in the message queue to obtain the initial time series data; wherein, the data change signal is output after the external component senses the time series data. The information acquisition module 802 obtains the continuous aggregation information in the time series database according to the initial time series data to obtain the target continuous aggregation information. The data acquisition module 803 queries the continuously aggregated data in the time series database according to the target continuous aggregation information to obtain the continuously aggregated data. The data update module 804 feeds back the data update statement to the time series database according to the continuously aggregated data, so that the time series database updates the continuously aggregated data according to the data update statement to obtain the target continuously aggregated data.
[0141] The change of data is sensed by external components. If the data changes, the external components generate data change signals and transmit the data change signals to the application. The application writes the time series data into the message queue and the time series database. The time series data parsing module 801 parses the time series data stored in the message queue to obtain the initial time series data. The information acquisition module 802 performs information query in the time series database according to the initial time series data to obtain the information of continuous aggregation and obtain the target continuous aggregation information. At the current timestamp, the data acquisition module 803 performs data query in the time series database according to the target continuous aggregation information to query each data after continuous aggregation is completed to obtain continuous aggregation data. The data update module 804 generates corresponding update statements according to the continuous aggregation data to obtain data update statements, and feeds back the data update statements to the time series database so that the time series database updates the stored continuous aggregation data according to the data update statements to obtain the target continuous aggregation data. The change of data is sensed by external components, and data change signals are generated and output to the application. The change of data can be sensed without relying on specific database kernel functions. The time series data is written into the message queue and the time series database through the application, and the time series data stored in the message queue is parsed through the continuous aggregation update program to obtain the initial time series data. The continuous aggregation information in the time series database is queried according to the initial time series data to obtain the target continuous aggregation information. The data after continuous aggregation is completed is queried in the time series database according to the target continuous aggregation information to obtain the continuous aggregation data, and a data update statement is generated according to the continuous aggregation data so that the time series database completes the update of the continuous aggregation data according to the data update statement to obtain the target continuous aggregation data. The continuous aggregation update of the time series data can be completed while being applicable to a variety of time series databases.
[0142] The operation process of the continuous aggregation data updating device of this embodiment is specifically described as above. Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Fig. 9 The continuous aggregation data update method steps S101 to S104, steps S201 and S202, steps S301 to S303, steps S401 to S404, steps S501 to S503, steps S601 to S603 and steps S701 to S703 are not repeated here.
[0143] Another embodiment of the present invention discloses a continuous aggregate data update device, comprising: at least one processor, and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the following Figure 1 The control method steps S101 to S104, Figure 2 The control method steps S201 and S202, Figure 3 The control method steps S301 to S303, Figure 4 The control method steps S401 to S404, Figure 5 The control method steps S501 to S503, Figure 6 The control method steps S601 to S603 and Figure 7 The continuous aggregation data updating method of the control method steps S701 to S703.
[0144] Another embodiment of the present invention discloses a computer-readable storage medium, the storage medium comprising: the storage medium stores computer-executable instructions, the computer-executable instructions are used to enable a computer to execute Figure 1 The control method steps S101 to S104, Figure 2 The control method steps S201 and S202, Figure 3 The control method steps S301 to S303, Figure 4 The control method steps S401 to S404, Figure 5 The control method steps S501 to S503, Figure 6 The control method steps S601 to S603 and Figure 7 The continuous aggregation data updating method of the control method steps S701 to S703.
[0145] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0146] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0147] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the relevant technical field without departing from the purpose of the present invention. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
Claims
1. A method for continuously updating aggregated data, It is characterized in that include: After receiving the data change signal, the time series data stored in the message queue is parsed to obtain initial time series data; wherein the data change signal is output after the external component senses the time series data, and the initial time series data includes an operation table name, and the operation table name includes a name of a table operated in the time series data; Acquiring continuous aggregation information in a time series database according to the initial time series data to obtain target continuous aggregation information, including: filtering a time series table in the time series database according to the name of the operation table to obtain a target time series table, and querying the target time series table for continuous aggregation information to obtain the target continuous aggregation information; According to the target continuous aggregation information, query the continuously aggregated data in the time series database to obtain the continuously aggregated data; Obtain the timestamp of the time series data currently being written into the time series database to obtain the write timestamp; According to the target continuous aggregation information, query the timestamp after the current continuous aggregation is completed to obtain the aggregation timestamp; Acquire a continuous aggregation window according to the aggregation timestamp to obtain a target continuous aggregation window; Compare the write timestamp with the target continuous aggregation window to obtain an update judgment result; If the write timestamp is within the range of the target continuous aggregation window, the update judgment result indicates that data update needs to be performed; If the write timestamp is not within the range of the target continuous aggregation window, the update judgment result indicates that data update does not need to be performed; Feedback a data update statement to the time series database according to the continuous aggregation data, so that the time series database updates the continuous aggregation data according to the data update statement to obtain target continuous aggregation data, including: recalculating the continuous aggregation result according to the write timestamp, the target continuous aggregation window and the continuous aggregation data to obtain the target continuous aggregation result, generating a response update statement according to the type of the time series database and the target continuous aggregation result to obtain the data update statement, and sending the data update statement to the time series database, so that the time series database updates the continuous aggregation data according to the data update statement to obtain the target continuous aggregation data.
2. The continuous aggregation data updating method according to claim 1, It is characterized in that The recalculating the continuous aggregation result according to the write timestamp, the target continuous aggregation window and the continuous aggregation data to obtain the target continuous aggregation result includes: Determine a window for re-executing continuous aggregation according to the write timestamp and the target continuous aggregation window, and obtain a re-continuous aggregation window; Acquire the continuous aggregation data in the time series table according to the re-continuous aggregation window to obtain re-aggregated data; The continuous aggregation result is recalculated according to the re-aggregated data to obtain the target continuous aggregation result.
3. The continuous aggregation data updating method according to any one of claims 1 to 2, It is characterized in that The continuous aggregation data updating method further includes: Obtaining the execution cycle preset in the time series database to obtain a target execution cycle; wherein the execution cycle includes a cycle for executing continuous aggregation of the target time series table in the time series database; The value of the target execution period is set to the period of continuous aggregation update to obtain a target update period; After executing continuous aggregation according to the target execution period, the continuous aggregation data is updated according to the target update period.
4. A continuous aggregation data updating device, It is characterized in that include: A time series data parsing module, configured to parse the time series data stored in the message queue after receiving a data change signal to obtain initial time series data; wherein the data change signal is output after the external component senses the time series data, and the initial time series data includes an operation table name, and the operation table name includes a name of a table operated in the time series data; An information acquisition module is used to acquire continuous aggregation information in a time series database according to the initial time series data to obtain target continuous aggregation information, including: filtering a time series table in the time series database according to the name of the operation table to obtain a target time series table, and querying continuous aggregation information in the target time series table to obtain the target continuous aggregation information; A data acquisition module, configured to query the continuously aggregated data in the time series database according to the target continuously aggregated information to obtain the continuously aggregated data; After querying the continuously aggregated data in the time series database according to the target continuous aggregation information to obtain the continuously aggregated data, the continuously aggregated data updating device is further used to: obtain the timestamp of the time series data currently written into the time series database to obtain the write timestamp, query the timestamp after the current continuous aggregation is completed according to the target continuous aggregation information to obtain the aggregation timestamp, obtain the continuous aggregation window according to the aggregation timestamp to obtain the target continuous aggregation window, compare the write timestamp with the target continuous aggregation window to obtain an update judgment result, if the write timestamp is within the range of the target continuous aggregation window, then the update judgment result indicates that data update needs to be executed, if the write timestamp is not within the range of the target continuous aggregation window, then the update judgment result indicates that data update does not need to be executed; A data update module is used to feed back a data update statement to the time series database based on the continuous aggregation data, so that the time series database updates the continuous aggregation data according to the data update statement to obtain target continuous aggregation data, including: recalculating the continuous aggregation result according to the write timestamp, the target continuous aggregation window and the continuous aggregation data to obtain the target continuous aggregation result; generating a response update statement according to the type of the time series database and the target continuous aggregation result to obtain the data update statement; and sending the data update statement to the time series database, so that the time series database updates the continuous aggregation data according to the data update statement to obtain the target continuous aggregation data.
5. A device for continuously updating aggregated data, It is characterized in that include: at least one processor, and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the continuous aggregate data update method according to any one of claims 1 to 3.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the continuous aggregation data updating method according to any one of claims 1 to 3.
