A calculation method and device based on time series data calculation point

By designing a distributed processing architecture and dynamic resource scheduling mechanism in the time series database, the problems of missing functions, insufficient performance and low resource utilization in the calculation point field of the time series database are solved, achieving efficient data processing and high reliability, and reducing computation and storage costs.

CN118550920BActive Publication Date: 2024-10-01浙江浙能数字科技有限公司
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202410992896.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-01
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

The existing time series database has problems such as missing functions, insufficient performance, insufficient expansion capabilities and low resource utilization in the field of calculation points, which limits the statistical analysis of measurement point dimensional data and the efficient processing capabilities of the system.

Method used

A computing method based on time series data is designed to realize time series data through a distributed processing architecture of user end, data receiving gateway, rule receiving gateway, data manager, calculation manager, time series data object storage OSS and computing point service node. Dynamic allocation of processing and computing tasks, using columnar storage and compression technology, real-time monitoring of storage and computing resources, and automatic expansion and contraction.

Benefits of technology

Significantly improves data processing speed and system stability, improves resource usage efficiency, reduces computing and storage costs, and achieves high concurrent request processing capabilities and high reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550920B_ABST
    Figure CN118550920B_ABST
Patent Text Reader

Abstract

The present invention relates to a calculation method and device based on time series data calculation points, including: a user terminal sends time series data to a data manager through a data receiving gateway, and sends calculation rules to a calculation manager through a rule receiving gateway; the data manager processes the time series data, and stores the processed time series data in a time series data object storage OSS; the calculation manager converts the calculation rules into calculation tasks, and publishes the calculation tasks to calculation point service nodes; the calculation point service nodes execute the calculation tasks, and feed back the calculation results to the time series data storage nodes. The beneficial effects of the present invention are: the present invention significantly improves the data processing speed and system stability by optimizing the data receiving, processing, storage and calculation task allocation execution process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and more specifically, to a calculation method and device based on time series data calculation points. Background Art

[0002] Existing open source time series databases include openTSDB, influxDB, and apache IOTDB. They all have good storage and query performance in data storage and have been widely used in many application scenarios. The calculation point is obtained by performing logical operations on the values ​​of one or more original measurement points at a certain time, and the calculation result is assigned to a specific point. Such a point is called a calculation point. The process of realizing the calculation point includes querying the original point data, defining the calculation formula, executing the calculation task, and outputting the calculation result.

[0003] However, the current mainstream time series databases have the following defects:

[0004] 1. Lack of functions. Open source time series database products have significant functional deficiencies in the field of calculation points. This deficiency makes it impossible to perform statistical analysis on data in the measurement point dimension.

[0005] 2. Insufficient performance: Commercial products including OSIsoft's PI system, as a leader in the field, still have much room for improvement in data calculation model, number of calculation points and performance.

[0006] 3. Insufficient expansion capability: The current time series database computing point function is bundled with the database body as a functional module of the time series database, which greatly limits the expansion function of the calculation. It is impossible to achieve horizontal expansion, which becomes the bottleneck of the time series database.

[0007] 4. Low resource utilization: The industry's computing point implementation method is usually one process per computing point. When the computing task is not triggered, the process enters a blocked state, resulting in a waste of computing resources. Summary of the invention

[0008] The purpose of the present invention is to address the deficiencies of the prior art and to propose a calculation method and device based on time series data calculation points.

[0009] In a first aspect, a calculation method based on a time series data calculation point is provided, which is executed by a time series data calculation device, wherein the time series data calculation device includes a user terminal, a data receiving gateway, a rule receiving gateway, a data manager, a calculation manager, a time series data object storage OSS and a calculation point service node, and the method includes:

[0010] S1. The user sends time series data to the data manager through the data receiving gateway, and sends calculation rules to the calculation manager through the rule receiving gateway;

[0011] S2. The data manager processes the time series data and stores the processed time series data in the time series data object storage OSS;

[0012] S3. The computing manager converts the computing rules into computing tasks and publishes the computing tasks to the computing point service nodes;

[0013] S4. The computing point service node executes the computing task and feeds back the computing result to the time series data object storage OSS.

[0014] Preferably, in S1, the time series data consists of a timestamp, a measuring point name and a measuring point value.

[0015] Preferably, S2 comprises:

[0016] S201, pushing the time series data to the time series data queue to buffer the data;

[0017] S202, segmenting the time series data according to the timestamp and the measurement point name;

[0018] S203: The segmented time series data blocks are processed by column storage and compression, and uploaded to the time series data object storage OSS.

[0019] Preferably, in S2, the data manager monitors the space utilization of the time series data object storage OSS. If the space utilization is greater than a first utilization threshold, the time series data object storage OSS is expanded; if the space utilization is less than a second utilization threshold, the time series data object storage OSS is reduced; the first utilization threshold is greater than the second utilization threshold.

[0020] Preferably, in S1, the calculation rule includes a calculation point name, a calculation task expression and a triggering method; the triggering method includes a periodic trigger and an event trigger; wherein the calculation task expression includes the measurement point name and the reference time of the original measurement point.

[0021] Preferably, S3 includes:

[0022] S301, the computing manager determines the corresponding event-triggered task and periodic-triggered task according to the computing rule, and submits the event-triggered task to the event task trigger, and submits the periodic-triggered task to the periodic-task trigger;

[0023] S302, the event task trigger monitors the time series data queue, and generates a computing task and submits it to the computing task demand queue;

[0024] S303, the periodic task trigger generates a computing task and submits it to the computing task demand queue according to the agreed original measuring point, reference time and trigger period. The computing process includes: querying the data of the original measuring point at the reference time within the trigger period, and obtaining the result of the computing point through calculation;

[0025] S304: The computing point service node receives the computing task demand queue.

[0026] Preferably, S4 includes:

[0027] S401, the computing point service node pulls the computing task from the computing task demand queue and performs verification;

[0028] S402, performing syntax analysis on the computing task expression to generate an abstract syntax tree for decomposing the computing task into minimum computing units;

[0029] S403, querying the value corresponding to the measuring point at a certain moment according to the relationship between the minimum calculation unit and the measuring point mapping table;

[0030] S404, converting the measurement point names in the abstract syntax tree into corresponding values;

[0031] S405: Execute an abstract syntax tree traversal operation and calculate a final result.

[0032] Preferably, the computing manager monitors the computing task demand queue. If the ratio of the length of uncompleted tasks to the length of the computing task demand queue is greater than a first length threshold, the computing point service node is expanded; if the ratio of the length of uncompleted tasks to the length of the computing task demand queue is less than a second length threshold, the computing point service node is reduced in capacity.

[0033] In the second aspect, a time series data computing device is provided for executing any of the methods described in the first aspect, including a user terminal, a data receiving gateway, a rule receiving gateway, a data manager, a computing manager, a time series data object storage OSS and a computing point service node.

[0034] The beneficial effects of the present invention are:

[0035] 1. The present invention significantly improves the data processing speed and system stability by optimizing the data receiving, processing, storage and computing task allocation and execution process. Time series data is first transmitted to the data manager through the data receiving gateway for preprocessing, and then stored in the specially designed time series data object storage OSS; at the same time, the computing tasks are dynamically allocated by the computing manager to the computing point service nodes for execution. This distributed processing and task dynamic allocation mechanism not only speeds up the data processing speed, but also improves the system's ability to handle high-concurrency requests, ensuring the high reliability and stability of data processing.

[0036] 2. The present invention monitors the space utilization of storage nodes in real time through the data manager, and automatically expands or shrinks the capacity according to the set threshold. This intelligent resource scheduling system effectively prevents resource waste and improves resource utilization efficiency. At the same time, the computing point service node can dynamically expand and shrink the capacity according to actual computing needs, reduce idle resources, and thus save computing and storage costs for users.

[0037] 3. The present invention designs a flexible rule configuration method, and users can define calculation rules, including various triggering methods such as periodic triggering and event triggering, which greatly increases the flexibility and application scope of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flow chart of a method for calculating points based on time series data;

[0039] Figure 2 It is a structural schematic diagram of a time series data calculation device;

[0040] Figure 3 It is a schematic diagram of the internal structure of the data manager;

[0041] Figure 4 Schematic diagram of the process of scaling up and down cloud storage nodes;

[0042] Figure 5 Processing architecture diagram for computing points;

[0043] Figure 6 It is a schematic diagram of the computing node processing flow;

[0044] Figure 7 The figure is a schematic diagram of the scaling process of computing nodes. DETAILED DESCRIPTION

[0045] The present invention is further described below in conjunction with embodiments. The description of the following embodiments is only used to help understand the present invention. It should be noted that for ordinary persons in the art, without departing from the principle of the present invention, the present invention can also be modified in some ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

[0046] Embodiment 1:

[0047] Before introducing the technical solution of the present application, the embodiments of the present application explain the relevant terms as follows:

[0048] Measurement point: A measurement indicator value generated by a data source at a certain time is called a measurement point. For example, the temperature of the CPU, memory usage, and power in the meter can be called measurement points. The measurement value corresponding to the indicator at a specific time is called the time series data measurement value, which can be called the original point or measurement point here. Taking wind turbines as an example, each wind turbine contains tens of thousands of measurement points. A wind farm has more than 50 wind turbines, and the number of measurement points reaches 500,000, generating more than 100 million time series data every day.

[0049] Calculation point: One or more original points are calculated according to business requirements using mathematical expressions to obtain the calculation results, which are assigned to the measurement points. This type of measurement point is called a calculation point. For example, the value of measurement point 3 is equal to the value of measurement point 1 plus the value of measurement point 2. Here, measurement point 3 is the calculation point in the expression.

[0050] Periodic trigger calculation point: Triggered according to a timing cycle, such as every 10 seconds, every 1 minute, every hour, every day, etc.

[0051] Real-time trigger calculation point: The calculation point mathematical expression contains the original measurement point. When the original measurement point data changes or new data appears, the calculation task is triggered to obtain the calculation result output. For example, if the real-time power of the entire wind farm is required, the required calculation process is to add the real-time power of all wind turbines, assign the calculated result value to the wind farm total power calculation point, and land it in the time series database or push it to the business system for use.

[0052] To solve the problems of the prior art, the present application embodiment 1 provides a calculation method based on time series data calculation points, which is executed by a time series data calculation device, such as Figure 2 As shown, the time series data calculation point device includes a user end, a data receiving gateway, a rule receiving gateway, a data manager, a calculation manager, a time series data object storage OSS and a calculation point service node.

[0053] Specifically, Figure 1 As shown, the method includes:

[0054] S1. The user sends time series data to the data manager through the data receiving gateway, and sends calculation rules to the calculation manager through the rule receiving gateway.

[0055] In S1, after the user registers for the service, the user end reports the time series data generated by the industrial equipment through the data receiving gateway of the cloud service, including the measurement point name (tagName), timestamp (time), measurement point value (tagValue) and other information.

[0056] In addition, the calculation rules include the calculation point name, calculation task expression and trigger mode; the trigger mode includes periodic trigger and event trigger. The user uses the rule receiving gateway to submit the calculation point calculation task, including the calculation point type (periodic or real-time), define the calculation expression, and the calculation time range. The calculation task expression includes the measurement point name and base time of the original measurement point.

[0057] S2. The data manager processes the time series data and stores the processed time series data in the time series data object storage OSS.

[0058] like Figure 3 As shown, the entire data manager consists of a time series data queue, data segmentation routing, and data storage node management services.

[0059] S2 includes:

[0060] S201. When the data receiving gateway receives the time series data, it will be pushed into the data queue for data buffering.

[0061] S202, data segmentation routing pulls data from the time series data queue, segments the files according to the measurement point name + time (such as one file per day), and uploads the segmented data blocks to the object storage of the cloud service, taking Alibaba Cloud OSS service as an example.

[0062] S203: The segmented time series data blocks are processed by column storage and compression, and uploaded to the time series data object storage OSS. This ensures a high compression ratio and greatly reduces the storage space compared to traditional file storage.

[0063] In addition, the present application performs object storage mapping by connecting the data objects of the time series data to provide services for data queries in subsequent computing links.

[0064] S3. The computing manager converts the computing rules into computing tasks and publishes the computing tasks to the computing point service nodes.

[0065] like Figure 5 As shown, S3 includes:

[0066] S301. The computing manager determines the corresponding event-triggered task and periodic-triggered task according to the computing rule, and submits the event-triggered task to the event task trigger, and submits the periodic-triggered task to the periodic-task trigger.

[0067] S302, the event task trigger monitors the data in the time series data queue submitted by the user through the time series data listener. When the listener matches the rule, it will trigger the generation of a computing task and submit it to the computing task queue for subsequent calculation.

[0068] S303, the periodic task trigger generates a computing task according to the agreed original measurement point, reference time and trigger period, and submits it to the computing task demand queue for subsequent calculation. The calculation process includes: querying the data of the original measurement point at the reference time within the trigger period, and obtaining the result of the calculation point through calculation.

[0069] S304: The computing point service node receives the computing task demand queue.

[0070] S4. The computing point service node executes the computing task and feeds back the computing result to the time series data object storage OSS for user query.

[0071] like Figure 6 As shown in the figure, when the computing task is pushed to the computing task demand queue, the computing point service node will actively pull the computing task in the computing demand queue. The computing process is as follows:

[0072] S401. The computing point service node pulls computing tasks from the computing task demand queue and verifies the correctness of the tasks.

[0073] S402: Perform syntax analysis on the computation task expression to generate an abstract syntax tree (AST), which is responsible for decomposing the computation point expression task into fine-grained computation units, namely, minimum execution units, and generating a task tree.

[0074] S403, the fine-grained calculation unit searches for the value corresponding to the measuring point at a certain moment through the measuring point mapping table relationship in Table 1, and retrieves the corresponding value.

[0075] Table 1

[0076]

[0077] S404: Convert the measurement point names in the abstract syntax tree into corresponding values.

[0078] S405: Execute an abstract syntax tree traversal operation and calculate a final result.

[0079] Embodiment 2:

[0080] Based on Example 1, Example 2 of the present application provides a more specific calculation method based on time series data calculation points, including:

[0081] S1. The user sends time series data to the data manager through the data receiving gateway, and sends calculation rules to the calculation manager through the rule receiving gateway.

[0082] S2. The data manager processes the time series data and stores the processed time series data in the time series data object storage OSS.

[0083] In S2, the data manager monitors the space utilization of the time series data object storage OSS. If the space utilization is greater than a first utilization threshold, the time series data object storage OSS is expanded. If the space utilization is less than a second utilization threshold, the time series data object storage OSS is reduced. The first utilization threshold is greater than the second utilization threshold. For example, Figure 4 As shown, the first utilization threshold is 80% and the second utilization threshold is 50%.

[0084] Figure 4 The monitoring process of dynamic adjustment of cloud storage resources is explained. When the space utilization rate applied for in cloud resources is greater than 80%, the system will automatically apply for object storage space to ensure sufficient space for data. At the same time, when the space utilization rate is less than 50%, the time series storage resource monitoring will automatically apply to reduce the storage space requirements, which ensures its economy. This flexible and dynamically adjustable storage space strategy is not possible with traditional time series databases. This application monitors cloud object storage resources and timely expands and shrinks object storage resources, which can accurately control storage capacity and save storage resources.

[0085] S3. The computing manager converts the computing rules into computing tasks and publishes the computing tasks to the computing point service nodes.

[0086] The computing manager monitors the computing task demand queue. If the ratio of the length of the unfinished tasks to the length of the computing task demand queue is greater than the first length threshold, the computing point service node is expanded; if the ratio of the length of the unfinished tasks to the length of the computing task demand queue is less than the second length threshold, the computing point service node is reduced.

[0087] For example, Figure 7 As shown, the computing manager uses the resource monitoring module to scale the capacity of the entire computing. The length of the computing task demand queue is defined according to user needs. The default setting is the number of rule tasks submitted by the user, and can be changed according to the number of rules submitted by the user.

[0088] Computing node expansion: When the resource monitoring module finds that the length of unfinished tasks / queues is continuously greater than 0.8 for a period of time, it triggers computing node expansion, applies for new services in cloud computing resources, and starts new computing nodes.

[0089] Compute node scaling: When the resource monitoring module finds that the length of unfinished tasks / queues is continuously less than 0.5 for a period of time, it triggers the expansion of the compute nodes, applies for new services in the cloud computing resources, and starts new compute nodes.

[0090] This expansion and contraction strategy can dynamically adjust computing resources based on the user's computing point habits, greatly saving computing resources and costs.

[0091] S4. The computing point service node executes the computing task and feeds back the computing result to the result queue.

[0092] It should be noted that the parts in this embodiment that are the same or similar to those in Embodiment 1 can be referenced to each other and will not be described in detail in this application.

[0093] Embodiment 3:

[0094] Based on embodiments 1 and 2, embodiment 3 of the present application provides a time series data calculation device, such as Figure 2 As shown, it includes a user end, a data receiving gateway, a rule receiving gateway, a data manager, a computing manager, a time series data object storage OSS and a computing point service node.

[0095] Specifically, the functions of each component are as follows:

[0096] Data receiving gateway: After the user registers for the service, the time series data generated by the industrial equipment is reported through the data receiving gateway of the cloud service, including measurement point name, timestamp, measurement point value and other information.

[0097] Rule receiving gateway: Users use the rule receiving gateway to submit calculation point calculation tasks, including calculation point type (periodic or real-time), definition of calculation expression, and calculation time range (for example, January 1, 2024 to December 31, 2024).

[0098] Data Manager: The main function is to store the time series data received by the data receiving gateway into the cloud storage for query of later computing point tasks. Its functions include indexing of user time series data, life cycle management, and expansion and contraction of cloud storage nodes.

[0099] Computing Manager: Responsible for managing user-defined computing point rules from the rule receiving gateway, and converting the rules into specific execution tasks, and dividing them into event trigger type and periodic trigger mode according to the execution type. At the same time, the computing manager is also responsible for the management of computing point service nodes, including the expansion and contraction of computing point services, and monitoring the operation of computing tasks. When a computing point task is abnormal, the computing manager will re-issue the computing task to the computing service node. When multiple failures occur, the task failure will be reported and the error details will be reported.

[0100] Time series data object storage OSS: responsible for storing the data received by the data manager. The received data is first cached in the service memory and will be input into the object storage of the cloud service when it meets a certain size or period.

[0101] Computation point service node: accepts the scheduling of the computation manager, completes the computation tasks of complex computation points, and feeds the computation results back to the result queue.

[0102] Specifically, the device provided in this embodiment is a device corresponding to the method provided in Embodiments 1 and 2. Therefore, the parts in this embodiment that are the same or similar to Embodiments 1 and 2 can be referenced to each other and will not be repeated in this application.

Claims

1. A calculation method based on time series data calculation points, It is characterized in that The method is executed by a time series data computing device, the time series data computing device includes a user terminal, a data receiving gateway, a rule receiving gateway, a data manager, a computing manager, a time series data object storage OSS and a computing point service node, and the method includes: S1. The user sends time series data to the data manager through the data receiving gateway, and sends calculation rules to the calculation manager through the rule receiving gateway; S2: The data manager processes the time series data and stores the processed time series data in the time series data object storage OSS. S2 includes: S201, pushing the time series data to the time series data queue to buffer the data; S202, segmenting the time series data according to the timestamp and the measurement point name; S203, processing the segmented time series data blocks by column storage and compression, and uploading them to the time series data object storage OSS; S3. The computing manager converts the computing rules into computing tasks and publishes the computing tasks to the computing point service nodes; S4, the computing point service node executes the computing task and feeds back the computing result to the time series data object storage OSS; S4 includes: S401, the computing point service node pulls the computing task from the computing task demand queue and performs verification; S402, performing syntax analysis on the computing task expression to generate an abstract syntax tree for decomposing the computing task into minimum computing units; S403, querying the value corresponding to the measuring point at a certain moment according to the relationship between the minimum calculation unit and the measuring point mapping table; S404, converting the measurement point names in the abstract syntax tree into corresponding values; S405: Execute an abstract syntax tree traversal operation and calculate a final result.

2. The calculation method based on time series data calculation points according to claim 1, It is characterized in that In S1, the time series data consists of a timestamp, a measuring point name and a measuring point value.

3. The calculation method based on time series data calculation points according to claim 2, It is characterized in that In S2, the data manager monitors the space utilization of the time series data object storage OSS. If the space utilization is greater than a first utilization threshold, the time series data object storage OSS is expanded; if the space utilization is less than a second utilization threshold, the time series data object storage OSS is reduced; The first utilization threshold is greater than the second utilization threshold.

4. The calculation method based on time series data calculation points according to claim 3, It is characterized in that In S1, the calculation rule includes the calculation point name, the calculation task expression and the trigger mode; the trigger mode includes periodic triggering and event triggering; wherein the calculation task expression includes the measurement point name and the reference time of the original measurement point.

5. The calculation method based on time series data calculation points according to claim 4, It is characterized in that S3 includes: S301, the computing manager determines the corresponding event-triggered task and periodic-triggered task according to the computing rule, and submits the event-triggered task to the event task trigger, and submits the periodic-triggered task to the periodic-task trigger; S302, the event task trigger monitors the time series data queue, and generates a computing task and submits it to the computing task demand queue; S303, the periodic task trigger generates a computing task and submits it to the computing task demand queue according to the agreed original measuring point, reference time and trigger period. The computing process includes: querying the data of the original measuring point at the reference time within the trigger period, and obtaining the result of the computing point through calculation; S304: The computing point service node receives the computing task demand queue.

6. The calculation method based on time series data calculation points according to claim 5, It is characterized in that In S3, the computing manager monitors the computing task demand queue, and if the ratio of the length of the uncompleted tasks to the length of the computing task demand queue is greater than a first length threshold, the computing point service node is expanded; If the ratio of the length of the unfinished tasks to the length of the computing task demand queue is less than a second length threshold, the computing point service node is scaled down.

7. A time series data calculation device, It is characterized in that Used to execute the method described in any one of claims 1 to 6, comprising a user terminal, a data receiving gateway, a rule receiving gateway, a data manager, a computing manager, a time series data object storage OSS and a computing point service node.

Citation Information

Patent Citations

  • Flink-based real-time computation method, device, computer apparatus, and storage medium

    CA3150487A1

  • Device and method for big data analysis based on distributed time sequence data service

    CN105427193A

  • Big data analysis platform device and method based on multilayer model iteration

    CN105608144A

  • Big data analysis platform apparatus and method based on algorithm configuration and distributed stream computing

    CN105608758A

  • Device and method for collection and processing of massive time series data based on big data technology

    CN106294644A