Method, system, device and medium for realizing cross-report based on time-series data

By establishing a standard label library and constructing a label measurement algorithm, the problem of multi-dimensional cross-analysis of time-series data in real-time databases was solved, enabling the rapid generation of two-dimensional cross-reports and improving the efficiency of statistical analysis in the industrial field.

CN117251454BActive Publication Date: 2026-06-16XIAN THERMAL POWER RES INST CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN THERMAL POWER RES INST CO LTD
Filing Date
2023-10-18
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing technologies lack methods for multi-dimensional cross-analysis of time-series data in real-time databases, especially in the industrial sector where there is an urgent need for cross-reporting functionality to display time-series data.

Method used

By establishing a standard label library, constructing label measurement algorithms and time dimension encoding, and configuring label measurement algorithms, data elements and time dimension encodings are automatically written into the cross-cells, thereby realizing the generation and loading of cross-report data.

Benefits of technology

It provides multi-dimensional query analysis, allows for quick switching of device tags for statistical analysis, reduces the time engineers spend searching for tag points, improves work efficiency, and enables the generation of real-time two-dimensional cross-tab reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117251454B_ABST
    Figure CN117251454B_ABST
Patent Text Reader

Abstract

The application provides a method, system, device and medium for realizing cross report based on time series data, relates to the technical field of data processing, and comprises the following steps: establishing a standard label library; constructing a label measurement algorithm for time series data and establishing a label measurement library; creating a time dimension code; constructing a data element set and defining a key code for the data element set; constructing a time dimension data set and defining a key code for the time dimension data set; after extending cross-row parameters in a row direction and extending cross-column parameters in a vertical direction, automatically writing the label measurement algorithm corresponding to an abstract label, report parameters and the time dimension code group into a cross cell to obtain cross report data; and loading the cross report data into a two-dimensional table, so as to realize cross report based on time series data. The method provided by the application is simple and easy to use, and after the data element set and the time dimension data set are expanded in a row direction or a column direction, a two-dimensional real-time data statistical cross report can be automatically produced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and specifically to methods, systems, devices, and media for generating cross-reports based on time-series data. Background Technology

[0002] Currently, many BI product vendors offer cross-tabulation methods, but the technical tools they provide are basically designed to perform multi-dimensional cross-analysis of two-dimensional data from relational databases. They lack multi-dimensional cross-analysis of time-series data from real-time databases. In particular, there is an urgent need for cross-tabulation functionality to display time-series data in the industrial sector. Summary of the Invention

[0003] This invention provides a method, system, device, and medium for generating cross-reports based on time-series data, in order to solve the problem that existing technologies lack multi-dimensional cross-analysis of time-series data in real-time databases, thereby enabling the conversion of time-series data in real-time databases into cross-reports for analysis.

[0004] To achieve the above objectives, the present invention adopts the following technical solution:

[0005] A method for implementing cross-tabulation based on time-series data includes the following steps:

[0006] Establish a standard tag library;

[0007] A label metric algorithm was developed for time-series data, and a label metric library was established.

[0008] Create time-dimensional encoding;

[0009] Select abstracted tags from the standard tag library, configure the tag measurement algorithm for the abstracted tags to form a data element set, and define a key for the data element set; at the same time, select the time dimension encoding group from the time dimension encoding to form a time dimension dataset, and define a key for the time dimension dataset;

[0010] The rules of the standard tag library are used as report parameters, the keys of the data element set are used as cross row parameters or cross column parameters, and the keys of the time dimension dataset are used as cross column parameters or cross row parameters. The keys of the data element set and the keys of the time dimension dataset cannot be used as cross row parameters or cross column parameters at the same time. After the cross row parameters are expanded in the row direction and the cross column parameters are expanded in the vertical direction, the tag measurement algorithm corresponding to the abstract tag, the report parameters, and the time dimension code group are automatically written into the cross cell to obtain cross report data.

[0011] The cross-report data is loaded into a two-dimensional table, thereby realizing cross-reports based on time-series data.

[0012] Furthermore, the establishment of the standard tag library includes the following steps:

[0013] Collect tags from the real-time database and use wildcards for abstract encoding to create rules;

[0014] According to the rules, the tags are replaced with abstract tags containing wildcards, thereby establishing a standard tag library.

[0015] Furthermore, the time dimension encoding includes: dynamic time encoding, dynamic moment encoding, and dynamic time period encoding.

[0016] Furthermore, the creation of the time dimension encoding specifically includes the following steps:

[0017] Based on the time types of day, week, month, ten-day period, quarter, and year, generate daily dynamic data, weekly dynamic data, monthly dynamic data, ten-day period dynamic data, quarterly dynamic data, and annual dynamic data;

[0018] The dynamic time code generates a 24-hour code based on daily dynamic data, the dynamic time code generates a daily time code based on weekly and monthly dynamic data, and the dynamic time code generates a monthly time code based on ten-day, quarterly, and annual dynamic data.

[0019] The dynamic time encoding represents any given moment based on the time type;

[0020] The dynamic time period code represents any time period based on the time type.

[0021] Furthermore, the time dimension encoding group includes: the dynamic time encoding group in the dynamic time encoding, the dynamic time encoding group in the dynamic moment encoding, or the dynamic time period encoding group in the dynamic time period encoding.

[0022] Furthermore, in the abstracted label configuration of the label measurement algorithm, different abstracted labels can be configured with different label measurement algorithms.

[0023] Furthermore, the automatic writing of the abstract label into the cross cells includes the label measurement algorithm, the report parameters, and the time dimension encoding group corresponding to the abstract label, wherein the parameters in the label measurement algorithm corresponding to the abstract label are the report parameters and the time dimension encoding group.

[0024] A system for generating cross-tab reports based on time-series data includes:

[0025] The standard tag library creation module is used to create a standard tag library;

[0026] The label metric library creation module is used to build label metric algorithms for time-series data and create a label metric library;

[0027] The time dimension encoding creation module is used to create time dimension encodings;

[0028] The dataset creation module is used to select abstracted tags from the standard tag library, configure the tag measurement algorithm for the abstracted tags, form a data element set, and define a key for the data element set; at the same time, it selects the time dimension encoding group from the time dimension encoding to form a time dimension dataset and defines a key for the time dimension dataset.

[0029] The data expansion module is used to take the rules of the standard tag library as report parameters, the key codes of the data element set as cross row parameters or cross column parameters, and the key codes of the time dimension dataset as cross column parameters or cross row parameters. The key codes of the data element set and the key codes of the time dimension dataset cannot be used as cross row parameters or cross column parameters at the same time. After expanding the cross row parameters in the row direction and the cross column parameters in the vertical direction, the module automatically writes the tag measurement algorithm corresponding to the abstract tag, the report parameters, and the time dimension code group into the cross cell to obtain cross report data.

[0030] The data loading module is used to load the cross-report data into a two-dimensional table, thereby realizing the cross-report based on time-series data.

[0031] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable in the processor, wherein the processor executes the computer program to implement the steps of the method for generating cross-reports based on time-series data.

[0032] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method for generating cross-reports based on time-series data.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] This invention provides a method for generating cross-tab reports based on time-series data. By establishing a standard tag library, it enables multi-dimensional query analysis and allows for quick switching between device tags at different locations for statistical analysis, significantly reducing the time engineers spend searching for and verifying tag points. Furthermore, by constructing a tag metric library and time dimension encoding, this invention configures tag metric algorithms for abstracted tags, enabling statistical analysis of device tags at different locations with a single configuration, thus improving work efficiency. The method provided by this invention is simple and easy to use; simply drag and drop the data element set and time dimension dataset to rows or columns, and after row or column expansion, it automatically generates two-dimensional real-time data statistical cross-tab reports. Attached Figure Description

[0035] Figure 1 This refers to the rule data of the standard tag library in this embodiment of the invention;

[0036] Figure 2 This is the data element set in this embodiment of the invention;

[0037] Figure 3 This is the time dimension dataset of an embodiment of the present invention;

[0038] Figure 4 This is a cross-tab report template for an embodiment of the present invention;

[0039] Figure 5 The system architecture diagram for implementing cross-reports based on time-series data provided by this invention;

[0040] Figure 6 The flowchart of the method for implementing cross-reports based on time-series data provided by the present invention;

[0041] Figure 7 This is a structural diagram of the electronic device used in this invention. Detailed Implementation

[0042] The following is a detailed description of the solution of the present invention:

[0043] A method for implementing cross-tabulation based on time-series data includes the following steps:

[0044] Step 1: For the tags of the same device in different locations in the real-time database, abstract and encode them according to rules to establish a standard tag library;

[0045] Step 2: Construct label measurement algorithms based on the characteristics of time series data, including: integral mean, arithmetic mean, cumulative value, maximum value, minimum value, duration, over-limit duration, number of actions, instantaneous value, and rate of change, and establish a label measurement library;

[0046] Step 3: Create time dimension encoding that includes dynamic time, dynamic moment, and dynamic time period;

[0047] Step 4: Select abstracted tags from the standard tag library and configure the tag measurement algorithm for them as the data element set DataMetaSet of the cross-report. Select a set from dynamic time, dynamic moment and dynamic period as the time dimension dataset DimensionDataSet.

[0048] Step 5: Create a cross-tab report module: Use the rules for establishing the standard tag library in Step 1 as report parameters, and select the key of the data element set DataMetaSet as the cross row parameter rowMeta or the cross column parameter colMeta, and the key of the time dimension dataset DimensionDataSet as the cross column parameter colMeta or the cross row parameter rowMeta. After expanding by row or vertical respectively, automatically fill the cross cells. The filled content is the tag measurement algorithm corresponding to the data element in the data element set. The function parameters in the above tag measurement algorithm are the time dimension code and report parameters of the time dimension dataset DimensionDataSet. Finally, a two-dimensional function table is formed by the intersection of data elements and time dimension data.

[0049] Step 6: Send a report data request. The backend data service pushes the function statistical results to the two-dimensional table through the WebSocket communication mechanism, thus providing a method for implementing cross-tabulation based on time series data.

[0050] To enable those skilled in the art to better understand the present invention, the technical solution of the present invention will be further described in detail below with reference to the accompanying drawings. The content described herein is for explanation rather than limitation of the present invention.

[0051] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification and claims of this invention are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, systems, products, or devices.

[0052] Taking the real-time database of industrial power plant enterprise operation as an example, such as Figure 6 As shown, the method for implementing cross-tabulation based on time-series data includes the following steps:

[0053] Step 1: Abstract and encode the tags of the same device in different locations in the real-time database according to the rules to establish a standard tag library;

[0054] Step 1.1: In the real-time database of industrial power plant enterprise operation, create rules by using wildcards to abstractly encode the measurement points of equipment tags under different generator sets;

[0055] Step 1.2: As Figure 1 As shown, wildcards in the rules are used to replace all tag measurement point names containing unit codes in the real-time database, forming new tag names containing wildcards. A tag standard library is then established based on the new tag names.

[0056] Step 2: Construct label measurement algorithms based on the characteristics of time series data, including: integral mean, arithmetic mean, cumulative value, maximum value, minimum value, duration, over-limit duration, number of actions, instantaneous value, and rate of change, and establish a label measurement library;

[0057] Specifically, the function definitions in the label measurement algorithm provided by the backend data service are as follows:

[0058] TagAvgValue(tagname,timecode): This is a function that calculates the integral mean of time series data. TagAvgValue is the name of the integral mean function, tagname is the first function parameter, representing the tag name in the standard tag library established in step 1, and timecode is the second function parameter, representing the time value encoding.

[0059] Similarly, the definition format for other algorithm functions is the same as above.

[0060] Step 3: Create time dimension encoding that includes dynamic time, dynamic moment, and dynamic time period;

[0061] Step 3.1: Define the dynamic time code. Based on the report time type (day, week, month, ten-day period, quarter, year), generate 24-hour codes for daily dynamic data, such as 1h, 2h...24h; generate corresponding daily time codes for weekly and monthly dynamic data, such as 1d, 2d...31d; and generate monthly time codes for ten-day, quarterly, and annual dynamic data, such as 1m, 2m...12m.

[0062] Step 3.2: Definition of dynamic time-time encoding and dynamic time-period encoding. Dynamic time-time encoding uses T to represent 0:00 of the current day, T-1d to represent 0:00 of the previous day, and T+1h to represent 1:00 of the current day. Similarly, other times are represented in the same way. Dynamic time-period encoding uses time(T-1d, T-1s) to represent the period from 0:00 of the previous day to 23:59:59 of the previous day. Similarly, other time periods are represented in the same way.

[0063] Step 4: As Figure 2 and Figure 3As shown, abstracted labels are selected from the standard label library and a label measurement algorithm is configured for them. This is used as the data element set DataMetaSet of the cross-report. A set is selected from dynamic time, dynamic moment, and dynamic period as the time dimension dataset DimensionDataSet.

[0064] Step 4.1: Select tags from the standard tag library and configure the tag measurement algorithm. Different functions can be configured for different tags to bind to the algorithm.

[0065] Step 4.2: Add all selected statistical analysis labels to a list, and perform sorting, editing, and deletion operations. Define an encoded key for the data element set DataMetaSet in the list for later use. Similarly, define an encoded key for the time dimension dataset DimensionDataSet using the same method.

[0066] Step 5: As Figure 4 As shown, the cross-tab report module is created as follows: The rules for establishing the standard tag library in step 1 are used as report parameters, and the key of the data element set DataMetaSet is selected as the cross row parameter rowMeta or the cross column parameter colMeta, and the key of the time dimension dataset DimensionDataSet is used as the cross column parameter colMeta or the cross row parameter rowMeta. After expanding by row or vertically respectively, the cross cells are automatically filled. The filled content is the tag measurement algorithm corresponding to the data element in the data element set. The function parameters in the above tag measurement algorithm are the time dimension code and report parameters of the time dimension dataset DimensionDataSet. Finally, a two-dimensional function table is formed by the intersection of data elements and time dimension data.

[0067] Step 5.1: Define the report parameters according to the rules of the current standard tag library. The page display format is a data drop-down list, and the default value is the first item of the drop-down list data.

[0068] Step 5.2: Drag and drop the key of the data element set DataMetaSet and the key of the time dimension dataset DimensionDataSet into the rows or columns of the table in the report template using HTML to form two vertical cells;

[0069] Step 5.3: Click the vertical expansion event on the column parameter colMeta and the row expansion event on the cross row parameter rowMeta. The dataset will automatically expand and fill the data elements in the row or column direction in an orderly manner. At the same time, in the cross cell, a dynamic function will be automatically formed based on the label metric algorithm function corresponding to Meta in the data element set, the default value of the report parameters, and the time dimension encoding of the time dimension dataset, and written into the cross cell.

[0070] Step 6: Send a report data request. The backend data service pushes the function statistical results to the two-dimensional table through the WebSocket communication mechanism, thus providing a method for implementing cross-tabulation based on time series data.

[0071] Step 6.1: In the cross-tab report template, click Query. The front-end template page and the back-end service establish a WebSocket communication mechanism and send a data request message to the back-end report data service. The message body includes the dynamic function body in the cross cell, the report query parameter value, and the cross position.

[0072] Step 6.2: Backend report data service. After receiving the message, the WebSocket service replaces the wildcards in the data elements of the dynamic function body with the values ​​of the report parameters in the message body, parses the time code into the corresponding time or time period, and performs statistical processing for the corresponding function.

[0073] Step 6.3: The statistical processing results of the function are encapsulated into a unified result body, including the location, statistical results and calculation process data, and pushed to the front-end report template.

[0074] Step 6.4: The front-end cross-tab report receives the statistical results returned by the back-end and fills the statistical result data in the corresponding positions to realize the report data display.

[0075] like Figure 5 As shown, the present invention also provides a system for implementing cross-reports based on time-series data, including: a standard label library establishment module, a label metric library establishment module, a time dimension encoding creation module, a dataset creation module, a data expansion module, and a data loading module;

[0076] Specifically, the standard tag library creation module establishes a standard tag library; the tag metric library creation module constructs tag metric algorithms for time-series data and establishes a tag metric library; the time dimension encoding creation module creates time dimension encodings; the dataset creation module selects abstracted tags from the standard tag library, configures the tag metric algorithms for the abstracted tags, forms a data element set, and defines a key for the data element set; simultaneously, it selects time dimension encoding groups from the time dimension encodings to form a time dimension dataset and defines a key for the time dimension dataset; the data expansion module uses the rules of the standard tag library as report parameters and... The key codes of the data element set are used as cross row parameters or cross column parameters, and the key codes of the time dimension dataset are used as cross column parameters or cross row parameters. The key codes of the data element set and the key codes of the time dimension dataset cannot be used as cross row parameters or cross column parameters simultaneously. After the cross row parameters are expanded in the row direction and the cross column parameters are expanded in the vertical direction, the label measurement algorithm corresponding to the abstract label, the report parameters, and the time dimension code group are automatically written into the cross cell to obtain cross report data. The data loading module loads the cross report data into a two-dimensional table, thereby realizing a cross report based on time series data.

[0077] like Figure 7 As shown, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable in the processor, wherein the processor executes the computer program to implement the steps of the method for generating cross-reports based on time-series data.

[0078] The present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for generating cross-reports based on time-series data.

[0079] As is known from common technical knowledge, the present invention can be implemented through other embodiments that do not depart from its spirit or essential characteristics. Therefore, the disclosed embodiments described above are merely illustrative in all respects and are not the only ones; all modifications within the scope of the present invention or equivalent to the scope of the present invention are included in the present invention.

Claims

1. A method for implementing cross-tabulation based on time-series data, characterized in that, Includes the following steps: Establish a standard tag library; A label metric algorithm was developed for time-series data, and a label metric library was established. Create time-dimensional encoding; Select abstracted tags from the standard tag library, configure the tag measurement algorithm for the abstracted tags to form a data element set, and define a key for the data element set; at the same time, select the time dimension encoding group from the time dimension encoding to form a time dimension dataset, and define a key for the time dimension dataset; The rules of the standard tag library are used as report parameters, the keys of the data element set are used as cross row parameters or cross column parameters, and the keys of the time dimension dataset are used as cross column parameters or cross row parameters. The keys of the data element set and the keys of the time dimension dataset cannot be used as cross row parameters or cross column parameters at the same time. After the cross row parameters are expanded in the row direction and the cross column parameters are expanded in the vertical direction, the tag measurement algorithm corresponding to the abstract tag, the report parameters, and the time dimension code group are automatically written into the cross cell to obtain cross report data. The cross-report data is loaded into a two-dimensional table to realize cross-reports based on time-series data; The establishment of the standard tag library includes the following steps: Collect tags from the real-time database and use wildcards for abstract encoding to create rules; According to the rules, the tags are replaced with abstract tags containing wildcards, thereby establishing a standard tag library; The time dimension encoding includes: dynamic time encoding, dynamic moment encoding, and dynamic time period encoding; The creation time dimension encoding specifically includes the following steps: Based on the time types of day, week, month, ten-day period, quarter, and year, generate daily dynamic data, weekly dynamic data, monthly dynamic data, ten-day period dynamic data, quarterly dynamic data, and annual dynamic data; The dynamic time code generates a 24-hour code based on daily dynamic data, the dynamic time code generates a daily time code based on weekly and monthly dynamic data, and the dynamic time code generates a monthly time code based on ten-day, quarterly, and annual dynamic data. The dynamic time encoding represents any given moment based on the time type; The dynamic time period code represents any time period based on the time type.

2. The method for implementing cross-tabulation based on time-series data according to claim 1, characterized in that, The time dimension encoding group includes: the dynamic time encoding group in the dynamic time encoding, the dynamic moment encoding group in the dynamic moment encoding, or the dynamic time period encoding group in the dynamic time period encoding.

3. The method for implementing cross-tabulation based on time-series data according to claim 1, characterized in that, In the abstracted label configuration of the label measurement algorithm, different abstracted labels can be configured with different label measurement algorithms.

4. The method for implementing cross-tabulation based on time-series data according to claim 1, characterized in that, The automatic writing of the abstract label into the cross cells includes the label measurement algorithm, the report parameters, and the time dimension encoding group corresponding to the abstract label. The parameters in the label measurement algorithm corresponding to the abstract label are the report parameters and the time dimension encoding group.

5. A system for generating cross-tabulations based on time-series data, used to implement the method for generating cross-tabulations based on time-series data as described in any one of claims 1 to 4, characterized in that, include: The standard tag library creation module is used to create a standard tag library; The label metric library creation module is used to build label metric algorithms for time-series data and create a label metric library; The time dimension encoding creation module is used to create time dimension encodings; The dataset creation module is used to select abstracted tags from the standard tag library, configure the tag measurement algorithm for the abstracted tags, form a data element set, and define a key for the data element set; at the same time, it selects the time dimension encoding group from the time dimension encoding to form a time dimension dataset and defines a key for the time dimension dataset. The data expansion module is used to take the rules of the standard tag library as report parameters, the key codes of the data element set as cross row parameters or cross column parameters, and the key codes of the time dimension dataset as cross column parameters or cross row parameters. The key codes of the data element set and the key codes of the time dimension dataset cannot be used as cross row parameters or cross column parameters at the same time. After expanding the cross row parameters in the row direction and the cross column parameters in the vertical direction, the module automatically writes the tag measurement algorithm corresponding to the abstract tag, the report parameters, and the time dimension code group into the cross cell to obtain cross report data. The data loading module is used to load the cross-report data into a two-dimensional table, thereby realizing the cross-report based on time-series data.

6. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable in the processor, wherein the processor executes the computer program to implement the steps of the method for implementing cross-reports based on time-series data as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method for implementing cross-reports based on time-series data as described in any one of claims 1 to 4.