Trend chart generation method and device based on time pane
By dividing the total time span into multiple equal-long time panes, generating data record tables and filtering data points, the problems of insufficient data processing capabilities and low storage efficiency in the prior art are solved, and efficient trend chart generation and storage are achieved.
Patent Information
- Application Number
- CN202411991235.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
AI Technical Summary
When the prior art displays trend charts of multiple dynamic curves, data processing capabilities are insufficient, resulting in poor performance, and the data storage method has problems such as duplicate storage and performance impact.
Using the trend chart generation method based on the time pane, the total time span is divided into multiple time panes of equal length, the data record table is generated, the data points are collected and filtered, the statistical data is recorded, and the trend chart is generated in the order of the time pane.
It effectively improves the speed of data query, saves storage space, realizes smooth scaling of trend charts, and avoids jumping when scaling at different time spans.
Smart Images

Figure CN119917563A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for generating a trend chart based on a time pane. Background Art
[0002] A trend chart, also known as a transition chart, is a statistical chart that uses time as the horizontal axis and the observed variable as the vertical axis to reflect the relationship between time and quantity, and to observe the trend and deviation of the variable changes. Trend charts are used in many software. For example, in the software of discrete control systems DCS, the data of trend charts are obtained from historical data or real-time data. Through sampling and filtering, the sampled data cache is obtained. According to the start time and end time set for the trend chart, the data within the time span is obtained for trend chart display.
[0003] However, industrial production sites usually require that several dynamic curves be displayed simultaneously on the same interactive interface, with a time span of several minutes to several months. Calculated based on a time span of one week, for example, one data point per second, 32 curves need to be refreshed at a time to process tens of millions of data points, which far exceeds the processing capacity of a single operating station computer. Therefore, most systems use the method of storing data according to different spans, such as storing one copy of data with a span of 1 hour and one copy of data with a span of one day. However, this data storage method also has many problems, such as causing duplicate data storage and wasting disk space; these data may be stored in different files, and when scaling the trend chart, the data may need to be retrieved from different databases, thus affecting performance; at the same time, it cannot support continuous scaling very well, and when scaling different time spans, the curve may show obvious jumps. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a method for generating a trend graph based on a time pane, comprising the following steps:
[0005] According to the total time span and data resolution in the trend chart configuration information, the total time span is divided into a plurality of time panes of equal length, the time pane span of each time pane, and the start time and end time of each time pane are calculated, and a data record table containing information of each time pane is generated;
[0006] Collecting sampling point data within the total time span, filtering and processing multiple sampling point data within the start time and end time of each time window according to preset window window data filtering rules, obtaining statistical data corresponding to each time window, and recording them in the corresponding time window of the data recording table;
[0007] Select the statistical data of each time pane on the data record table and connect them on the chart in the order of the time panes to generate the required trend chart.
[0008] Preferably, generating a data record table containing information of each time pane specifically includes: calculating the time pane span d of each time pane, and the start time and end time of each time pane, d=D / n, t i1 =t0+(i-1)*d,t i2 =t i1 +d, where D is the total time span, n is the number of sampling points, i.e., data resolution, t0 is the total start time, and t i1 is the start time of the i-th time window, t i2 is the end time of the i-th time pane.
[0009] Preferably, the pane data filtering rule is configured to retain the data point with the smallest sampling time among multiple sampling point data within the start time and end time of each time pane as the statistical data of the time pane, and filter out other sampling point data in the pane.
[0010] Preferably, the method for generating a trend graph based on a time pane further includes a step of updating the time pane in the data record table, specifically including:
[0011] If the trend chart needs to present the real-time data change trend within the total time span, the total start time and total end time of the data record table are updated according to the total time span and the current time. If the end time of the current header time pane is less than the total start time, the header time pane and the corresponding statistical data are deleted from the data record table.
[0012] If the end time of the current tail time pane is less than the total end time, a new time pane is added to the end of the data record table, the sampling point data in the new time pane is collected, and the statistical data corresponding to the new time pane is obtained and recorded according to the preset pane data filtering rules.
[0013] Preferably, the selecting statistical data of each time window on the data record table and connecting them on a chart in the order of the time windows to generate a desired trend chart specifically includes:
[0014] Parsing a trend chart generation request for generating a plurality of different trend charts, wherein the trend chart generation request includes a time period where data of the plurality of trend charts to be generated are located;
[0015] According to the time period of the data of each trend chart, the corresponding candidate time pane group is selected in the data recording table, and according to the data resolution of each trend chart, the statistical data of some time panes are selected in the candidate time pane group, and the corresponding trend chart is generated on the chart interface in the order of the time panes.
[0016] Preferably, the step of selecting statistical data of each time window on the data record table and connecting them on a chart in the order of the time windows to generate a desired trend chart further includes:
[0017] After receiving an instruction to reduce the time span of a trend chart, the corresponding candidate time pane group is selected in the data recording table according to the total time span to be reduced, as well as the total start time and the total end time, and statistical data of some time panes are selected in the candidate time pane group according to the data resolution of the reduced trend chart, and the corresponding trend chart is generated on the chart interface in the order of the time panes.
[0018] The present invention also discloses a trend graph generating device, comprising: a time pane configuration module, which is used to divide the total time span into multiple time panes of equal length according to the total time span and data resolution in the trend graph configuration information, calculate the time pane span of each time pane, and the start time and end time of each time pane, and generate a data record table containing information of each time pane; a data acquisition module, which is used to acquire sampling point data within the total time span, filter and process multiple sampling point data within the start time and end time of each time pane according to preset pane data filtering rules, obtain statistical data corresponding to each time pane, and record them to the corresponding time pane of the data record table; a trend graph generating module, which is used to select the statistical data of each time pane on the data record table and connect them on a chart in the order of the time panes to generate the required trend graph.
[0019] Preferably, the time pane configuration module is specifically configured to calculate the time pane span d of each time pane, and the start time and end time of each time pane, d=D / n, t i1 =t0+(i-1)*d,t i2 =t i1 +d, where D is the total time span, n is the number of sampling points, i.e., data resolution, t0 is the total start time, and t i1 is the start time of the i-th time window, t i2 is the end time of the i-th time pane.
[0020] The present invention also discloses a monitoring system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the computer program.
[0021] The present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0022] The method and device for generating a trend chart based on a time pane disclosed in the present invention divide the total time span into a plurality of time panes of equal length according to the total time span and data resolution in the trend chart configuration information, then calculate the time pane span of each time pane and the start time and end time of each time pane, and generate a data record table containing information of each time pane. Then, the sampling point data located in the total time span is collected, and the multiple sampling point data located in the start time and end time of each time pane are screened and processed according to the preset pane data filtering rules, and the statistical data corresponding to each time pane is obtained, and recorded in the corresponding time pane of the data record table; finally, the statistical data of each time pane on the data record table is selected and connected on the chart in the order of the time panes to generate the required trend chart. Thus, it is realized that only data needs to be stored in one data record table for query, and there is no need to query multiple databases or data tables according to different time spans, which effectively improves the data query speed and saves storage space, and also realizes smooth scaling of the trend chart, avoiding the jump phenomenon that occurs when the trend chart is scaled with different time spans.
[0023] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 A schematic diagram of the steps of a method for generating a trend graph based on a time pane disclosed in an embodiment of the present invention.
[0026] Figure 2 The figure is a schematic diagram of the structure of a data recording table disclosed in one embodiment of the present invention.
[0027] Figure 3 This is a schematic diagram of the contents of step S2 disclosed in another embodiment of the present invention.
[0028] Figure 4 It is a schematic structural diagram of a trend graph generating device disclosed in another embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] Unless otherwise defined, the technical or scientific terms used herein shall have the common meanings understood by persons with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the patent application specification and claims of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but indicate the existence of at least one.
[0031] At present, in industrial production sites using industrial control systems, it is often necessary to display several dynamic curves at the same time on the same interactive interface, and the time span of each dynamic curve ranges from a few minutes to a few months. If calculated based on a time span of one week, such as one data point per second, 32 curves need to be refreshed at a time to process tens of millions of data points for drawing, which far exceeds the processing capacity of a single operation station computer. Therefore, the method adopted by most industrial control systems is to store data according to different spans, such as storing one copy of data with a span of 1 hour and one copy of data with a span of one day, and grouping and storing data according to different time spans. When it is necessary to view the trend chart of a certain time period, the system will query the corresponding data according to the time span selected by the user, such as 1 hour or 1 day. Since the data has been grouped and stored according to different time spans, the system only needs to query and process the data within the time span required by the user, rather than all the data within the entire time period. In this way, the amount of data for a single query and processing is greatly reduced, thereby reducing the processing capacity requirements for the operation station computer. In addition, during the storage of data with different time spans, the system can also aggregate and preprocess the data. For example, for data spanning one day, the system can calculate the average, maximum or minimum values per hour and store these statistics as representative data points within the time period. In this way, when drawing trend charts, the system can directly use these preprocessed data points, further reducing the complexity of data processing and drawing. Through the storage and preprocessing of data with different time spans, the system can respond to user query requests more quickly. Finally, according to the display requirements of trend charts with different spans, data is retrieved from the corresponding time span data storage library, effectively reducing the processing pressure of the operation station computer. However, there are many problems with storing data in this way, such as causing repeated storage of data and wasting disk space; because data may be stored in different files, the scaling operation of the trend chart may require data to be retrieved from different databases, affecting performance; it cannot support continuous scaling well, and the curve may show obvious jumps when scaling the time span.
[0032] In order to solve the above problems, this embodiment discloses a method for generating a trend chart based on a time pane, as shown in the attached Figure 1 As shown, the trend graph generating method may specifically include the following contents.
[0033] Step S1, according to the total time span and data resolution in the trend chart configuration information, divide the total time span into multiple time panes of equal length, calculate the time pane span of each time pane, as well as the start time and end time of each time pane, and generate a data record table containing information of each time pane.
[0034] In this embodiment, in the adoption and filtering stage, the time span is divided into time windows of equal length, and the number of time windows is the number of sampling points. The time span of each time window is first calculated by the number of sampling points and the time span, and then the start time and end time of each time window are obtained. Specifically, for example, the time window span d of each time window and the start time and end time of each time window are calculated, d = D / n, t i1 =t0+(i-1)*d,t i2 =t i1 +d, as attached Figure 2 As shown, D is the total time span, n is the number of sampling points, i.e., data resolution, t0 is the total start time StartTime, t i1 is the start time startTime of the i-th time window, t i2 is the end time endTime of the i-th time pane. After the time span is divided into n time panes of equal length in the above manner, the data can be stuffed into the time panes.
[0035] The total time span in the trend chart configuration information can select the maximum time span among multiple trend charts that can be presented as the total time span corresponding to the generated data record table; at the same time, the maximum data resolution among multiple trend charts that can be presented is selected as the data resolution corresponding to the generated data record table.
[0036] Step S2, collect the sampling point data within the total time span, filter and process the multiple sampling point data within the start time and end time of each time window according to the preset window window data filtering rules, obtain the statistical data corresponding to each time window, and record it in the corresponding time window of the data recording table. After the sampling point data in each time window is aggregated according to the preset window window data filtering rules, only one data value, that is, the statistical data, is retained, thereby ensuring that there is only one data point in each time window, reducing the pressure of data storage.
[0037] In this embodiment, the pane data filtering rule can be configured to retain the data point with the smallest sampling time among the multiple sampling point data within the start time and end time of each time pane as the statistical data of the time pane, and filter out the other sampling point data in the pane. That is, the method of taking the leftmost data is adopted, that is, only the data point with the smallest time in the pane is retained, and the other points in the pane are filtered out, so that there is at most one data point in a time pane, and the data is filtered to n data points. In other embodiments, of course, the method of taking the rightmost data or the method of taking the middle data can also be selected, or other preset aggregation algorithms such as the method of taking the average value of the data points can be used, which can realize the aggregation processing of the data in the time pane.
[0038] If the trend chart needs to display real-time data within a certain time span, it is necessary to dynamically update and adjust each time pane in the data record table. Figure 3 As shown, step S2 may also specifically include the following contents.
[0039] Step S101, if the trend graph needs to present the real-time data change trend within the total time span, then the total start time and the total end time of the data record table are updated according to the total time span and the current time. If the end time of the current header time pane is less than the total start time, then the header time pane and the corresponding statistical data are deleted from the data record table;
[0040] Step S102, if the end time of the current tail time window is less than the total end time, a time window is added to the tail of the data record table, the sampling point data in the added time window is collected, and the statistical data corresponding to the added time window is obtained and recorded according to the preset window data filtering rules.
[0041] Specifically, when the trend chart shows real-time data trends, all time panes will move to the attached Figure 2 The left side of the data record table composed of various time panes is moved. When the end time of the leftmost time pane is less than the total start time, the time pane is eliminated, and the data in it will also be eliminated, then the time pane and the data point can be removed; when the end time of the rightmost time pane is less than the total end time, it is necessary to add a new time pane on the rightmost side to receive the data points within this time period, and the method of taking the leftmost data can also be used to filter a data point in the time pane.
[0042] Step S3, selecting the statistical data of each time window on the data record table and connecting them on the chart in the order of the time windows to generate the required trend chart.
[0043] In this embodiment, if the interactive interface needs to simultaneously display dynamic curve trend graphs of a certain monitoring data in multiple different time spans, the trend graphs of different time spans only need to retrieve the same data record table that is being dynamically updated. Specifically, step S3 may include the following content.
[0044] Step S201 , parsing a trend chart generation request for generating a plurality of different trend charts, wherein the trend chart generation request includes a time period in which data of the plurality of trend charts to be generated are located.
[0045] Step S202, select corresponding candidate time pane groups in the data record table according to the time period of the data of each trend chart, and select statistical data of some time panes in the candidate time pane group according to the data resolution of each trend chart, and generate the corresponding trend chart on the chart interface in the order of the time panes.
[0046] Specifically, according to the corresponding total time span of each required trend graph in the trend graph generation request, all time panes within the corresponding total time span are queried in the data record table to form a corresponding candidate time pane group, and then the corresponding part of the time pane is selected from the candidate time pane group according to the corresponding data resolution preset for the trend graph, and the data points in this part of the time pane and the time corresponding to the time pane are used to generate the corresponding trend graphs. In this way, the data only needs to be stored in one data record table, and there is no need to query multiple databases or data tables according to different time spans, which effectively improves the data query speed and saves disk space and disk write load.
[0047] In another embodiment, the representative data points or statistical data in each time window in the same data record table may be multiple different parameter values at the same acquisition time. If the trend chart generation request includes generating trend charts of multiple different parameter values, the data record table where each parameter value is located may be queried first. If multiple parameters are stored and recorded in the same data record table, the multiple parameters may be generated by calling the same data record table with reference to the above-mentioned method for generating multiple trend charts of different time spans for the same parameter.
[0048] In this embodiment, step S3 also includes a scaling operation on the trend chart, which may specifically include: after receiving an instruction to reduce the time span of a trend chart, selecting a corresponding candidate time pane group in the data recording table according to the total time span to be reduced, as well as the total start time and the total end time, and selecting statistical data of some time panes in the candidate time pane group according to the data resolution of the reduced trend chart, and generating a corresponding trend chart on the chart interface in the order of the time panes.
[0049] Specifically, after receiving a zoom-out instruction for a trend graph being displayed, the total time span to be displayed after the zoom-out, as well as the total start time and the total end time, are predicted, and then the corresponding candidate time pane group is selected on the data record table according to the total time span to be zoomed out, as well as the total start time and the total end time. The trend graph configuration information is queried to obtain the corresponding data resolution according to the total time span to be zoomed out, and then some time panes are selected from the candidate time pane group according to the data resolution of the trend graph after the zoom-out, and the data points or statistical data of the selected time panes and the corresponding display time are collected, and the corresponding trend graph is generated on the chart interface according to the sequence of the time panes.
[0050] Preferably, the selected time pane corresponding to the data displayed in the current trend chart can also be obtained. When selecting a time pane in the candidate time pane group according to the resolution of the reduced trend chart data, if the selected time pane of the current trend chart exists in the candidate time pane group, it will continue to be selected into the partial time pane selected after the subsequent reduction. This allows the trend chart curve to scale smoothly when the trend chart is zoomed, and the curve shape changes continuously without jumps.
[0051] In this embodiment, after receiving a zoom instruction for a trend graph being displayed, the total time span to be displayed after zooming in, as well as the total start time and the total end time, are predicted, and then the corresponding candidate time pane group is selected on the data record table according to the total time span to be zoomed in, as well as the total start time and the total end time. The trend graph configuration information is queried according to the total time span to be zoomed in to obtain the corresponding data resolution, and then some time panes are selected from the candidate time pane group according to the data resolution of the trend graph after zooming in, and the data points or statistical data of the selected time panes and the corresponding display time are collected, and the corresponding trend graph is generated on the chart interface according to the sequence of the time panes.
[0052] After receiving the trend chart zoom instruction, the above-mentioned system forms a scaled and adjusted trend chart by using the corresponding data obtained from the data recording table with the same data source as the current trend chart, so that the trend chart can be smoothly scaled in the continuous time span change operation, and the trend chart curve shape changes continuously without jumps.
[0053] The trend chart generation method based on time pane disclosed in the above embodiment divides the total time span into multiple time panes of equal length according to the total time span and data resolution in the trend chart configuration information, then calculates the time pane span of each time pane, and the start time and end time of each time pane, and generates a data record table containing information of each time pane. Then, the sampling point data located in the total time span is collected, and the multiple sampling point data located in the start time and end time of each time pane are screened and processed according to the preset pane data filtering rules to obtain the statistical data corresponding to each time pane, and record them in the corresponding time pane of the data record table; finally, the statistical data of each time pane on the data record table is selected and connected on the chart in the order of the time panes to generate the required trend chart. Thus, it is realized that only data needs to be stored in one data record table for query, and there is no need to query multiple databases or data tables according to different time spans, which effectively improves the data query speed and saves storage space, and also realizes smooth scaling of the trend chart, avoiding the jump phenomenon when the trend chart is scaled with different time spans.
[0054] In another embodiment, a trend graph generating device is also disclosed, as shown in the attached Figure 4As shown, it includes a time pane configuration module 1, a data acquisition module 2 and a trend chart generation module 3. The time pane configuration module 1 is used to divide the total time span into multiple time panes of equal length according to the total time span and data resolution in the trend chart configuration information, calculate the time pane span of each time pane, and the start time and end time of each time pane, and generate a data record table containing information of each time pane. The data acquisition module 2 is used to collect sampling point data within the total time span, filter and process multiple sampling point data within the start time and end time of each time pane according to the preset pane data filtering rules, obtain statistical data corresponding to each time pane, and record it to the corresponding time pane of the data record table. The trend chart generation module 3 is used to select the statistical data of each time pane on the data record table and connect them on the chart in the order of the time panes to generate the required trend chart.
[0055] In this embodiment, the time pane configuration module is specifically configured to calculate the time pane span d of each time pane, and the start time and end time of each time pane, d=D / n, t i1 =t0+(i-1)*d,t i2 =t i1 +d, where D is the total time span, n is the number of sampling points, i.e., data resolution, t0 is the total start time, and t i1 is the start time of the i-th time window, t i2 is the end time of the i-th time pane.
[0056] The functions of the above-mentioned trend graph generating device basically correspond to the steps of the trend graph generating method based on the time pane disclosed in the previous embodiment, so it will not be described in detail here. For details, please refer to the various embodiments of the trend graph generating method based on the time pane disclosed in the previous embodiment. It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.
[0057] In other embodiments, a monitoring system is also disclosed, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the various steps of the time pane-based trend chart generation method described in the above embodiments are implemented.
[0058] Those skilled in the art will appreciate that the schematic diagram is merely an example of a control system and does not constitute a limitation on the control system device, and may include more or fewer components than shown in the diagram, or a combination of certain components, or different components.
[0059] The processor may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the server device, and uses various interfaces and lines to connect various parts of the entire server device.
[0060] The memory can be used to store the computer program and / or module, and the processor implements various functions of the server device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, etc.
[0061] If the time pane-based trend chart generation method is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by a processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, etc.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0063] In conclusion, the above is only a preferred embodiment of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the patent of the present invention.
Claims
1. A method for generating a trend chart based on a time pane, characterized in that: The steps include: According to the total time span and data resolution in the trend chart configuration information, the total time span is divided into a plurality of time panes of equal length, the time pane span of each time pane, and the start time and end time of each time pane are calculated, and a data record table containing information of each time pane is generated; Collecting sampling point data within the total time span, filtering and processing multiple sampling point data within the start time and end time of each time window according to preset window window data filtering rules, obtaining statistical data corresponding to each time window, and recording them in the corresponding time window of the data recording table; Select the statistical data of each time pane on the data record table and connect them on the chart in the order of the time panes to generate the required trend chart.
2. The method for generating a trend graph based on a time pane according to claim 1, characterized in that: Generating a data record table containing information of each time pane specifically includes: Calculate the time span d of each time window, as well as the start and end time of each time window, d = D / n, t i1 =t0+(i-1)*d,t i2 =t i1 +d, where D is the total time span, n is the number of sampling points, i.e., data resolution, t0 is the total start time, and t i1 is the start time of the i-th time window, t i2 is the end time of the i-th time pane.
3. The method for generating a trend graph based on a time pane according to claim 2, characterized in that: The pane data filtering rule is configured to retain the data point with the smallest sampling time among the multiple sampling point data within the start time and the end time of each time pane as the statistical data of the time pane, and filter out other sampling point data in the pane.
4. The method for generating a trend graph based on a time pane according to claim 3, characterized in that: The step of updating the time pane in the data record table is also included, including: If the trend chart needs to present the real-time data change trend within the total time span, the total start time and total end time of the data record table are updated according to the total time span and the current time. If the end time of the current header time pane is less than the total start time, the header time pane and the corresponding statistical data are deleted from the data record table. If the end time of the current tail time pane is less than the total end time, a new time pane is added to the end of the data record table, the sampling point data in the new time pane is collected, and the statistical data corresponding to the new time pane is obtained and recorded according to the preset pane data filtering rules.
5. The method for generating a trend graph based on a time pane according to claim 4, characterized in that: The step of selecting statistical data of each time window on the data record table and connecting the statistical data of each time window on the chart in the order of the time windows to generate a desired trend chart specifically includes: Parsing a trend chart generation request for generating a plurality of different trend charts, wherein the trend chart generation request includes a time period where data of the plurality of trend charts to be generated are located; According to the time period of the data of each trend chart, the corresponding candidate time pane group is selected in the data recording table, and according to the data resolution of each trend chart, the statistical data of some time panes are selected in the candidate time pane group, and the corresponding trend chart is generated on the chart interface in the order of the time panes.
6. The method for generating a trend graph based on a time pane according to claim 5, characterized in that: The method of selecting the statistical data of each time window on the data record table and connecting them on the chart in the order of the time windows to generate the required trend chart also includes: After receiving an instruction to reduce the time span of a trend chart, the corresponding candidate time pane group is selected in the data recording table according to the total time span to be reduced, as well as the total start time and the total end time, and statistical data of some time panes are selected in the candidate time pane group according to the data resolution of the reduced trend chart, and the corresponding trend chart is generated on the chart interface in the order of the time panes.
7. A trend graph generating device, characterized in that: include: A time pane configuration module, for dividing the total time span into a plurality of time panes of equal length according to the total time span and data resolution in the trend chart configuration information, calculating the time pane span of each time pane, and the start time and end time of each time pane, and generating a data record table containing information of each time pane; A data collection module, used to collect sampling point data within the total time span, filter and process multiple sampling point data within the start time and end time of each time window according to a preset window window data filtering rule, obtain statistical data corresponding to each time window, and record it in the corresponding time window of the data recording table; The trend chart generation module is used to select the statistical data of each time window on the data record table and connect them on the chart in the order of the time window to generate the required trend chart.
8. The trend graph generating device according to claim 7, characterized in that: The time pane configuration module is specifically configured to calculate the time pane span d of each time pane, and the start time and end time of each time pane, d=D / n, t i1 =t0+(i-1)*d,t i2 =t i1 +d, where D is the total time span, n is the number of sampling points, i.e., data resolution, t0 is the total start time, and t i1 is the start time of the i-th time window, t i2 is the end time of the i-th time pane.
9. A monitoring system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.