Time series processing method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202311738570.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-12-15
AI Technical Summary
[0004]由此可见,在以上示出的实施例中,因为在性能监控过程中各控制器相互独立,各控制器的性能统计数据采集时间具有先后顺序特征,很难做到同一时刻收集到所有控制器上的指标数据,存在不同控制器的指标数据无法在同一时刻对齐的问题
[0037]通过以上方式,在获取到多个数据源针对各自待检测指标的多组时间序列后,针对多组时间序列中的各组时间序列,可以根据各组时间序列的第一类起始时刻和采样间隔确定出各组时间序列的第二类起始时刻和各个时间序列分段处理后对齐的时刻;各组时间序列的第一类起始时刻为各组时间序列初始的起始时刻,各组时间序列的第二类起始时刻为各组时间序列经处理方法优化对齐后的起始时刻,多组时间序列的第二类起始时刻相同;然后,计算所述多组时间序列对应于所述第二类起始时刻和各个时间序列分段处理后对齐的时刻上的指标数据,得到在时刻上对齐的多组包含指标数据的时间序列。据此,在对多个数据源的指标数据进行监控的场景中,可以将多个数据源针对各自待检测指标的多组时间序列在时间上进行对齐,满足技术人员在同一时刻观察不同数据源的同一检测指标的指标数据的要求,方便技术人员基于在时刻上对齐的多组包含指标数据的时间序列进行统计与分析。
Smart Images

Figure CN117784751B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of application technology, and in particular to a time series processing method, apparatus, electronic device and storage medium. Background Technology
[0002] Performance monitoring systems help operations and maintenance (O&M) personnel promptly perceive the operational status of business systems. O&M personnel can typically analyze various monitoring metrics included in the monitoring data to determine whether the business system is operating normally and which business processes within the corresponding system are experiencing problems. For example, monitoring metrics may include, but are not limited to, device IOPS, throughput, and average latency.
[0003] In scenarios where multiple controllers monitor performance data, the performance data acquired by each controller for a specific detection metric constitutes a time series. Each time series contains performance data for that metric at several consecutive points in time. By simultaneously observing multiple time series of a specific detection metric collected from multiple controllers, customers can analyze and adjust their business operations.
[0004] Therefore, in the embodiments shown above, because each controller is independent during the performance monitoring process and the performance statistics data of each controller are collected in a sequential manner, it is difficult to collect the indicator data of all controllers at the same time, resulting in the problem that the indicator data of different controllers cannot be aligned at the same time. Summary of the Invention
[0005] This application provides a time series processing method, the method comprising:
[0006] Multiple time series data from multiple data sources are acquired for each target indicator; wherein the time series data includes indicator data of the target indicator at several consecutive time points.
[0007] For each of the multiple time series, a second type of start time and a time of alignment after segmentation are determined based on the first type of start time and sampling interval of each time series; wherein, the first type of start time is the initial start time of each time series, and the second type of start time is the start time of each time series after processing and optimization alignment, and the second type of start time of the multiple time series is the same.
[0008] The index data corresponding to the second type of start time and the time aligned after segmentation of each time series are calculated to obtain multiple time series containing index data that are aligned in time.
[0009] Optionally, for each of the multiple time series, a second type of start time and the aligned time after segmentation of each time series are determined based on the first type of start time and sampling interval of each time series, including:
[0010] Divide the first type of start time of any time series in the multiple sets of time series by the sampling interval to obtain the remainder;
[0011] Subtracting the remainder from the first type of start time yields the second type of start time for the multiple sets of time series;
[0012] The second type of start time is added to the sampling interval in sequence to obtain the aligned time after the segmentation of each time series.
[0013] Optionally, the indicator data corresponding to the second type of start time and the aligned time after segmentation of each time series in the multiple sets of time series are calculated to obtain multiple sets of time series containing indicator data aligned in time, including:
[0014] Based on the second type of start time and the time aligned after segmentation of each time series, determine the data between each two adjacent times in each of the multiple sets of time series corresponding to the second type of start time and the time aligned after segmentation of each time series;
[0015] By taking the third type of start time of the two adjacent times as the time on the determined data corresponding segment interval, multiple time series containing index data are obtained that are aligned in time.
[0016] Optionally, based on the second type of start time and the aligned times after segmentation of each time series, the data between every two adjacent times in each of the multiple sets of time series corresponding to the second type of start time and the aligned times after segmentation of each time series is determined, including:
[0017] Based on the second type of start time and the time after segmentation and alignment of each time series, determine the average value of the data between each two adjacent times corresponding to the second type of start time and the time after segmentation and alignment of each time series in each of the multiple time series.
[0018] Optionally, the method further includes:
[0019] In response to a data request from the display platform, determine two adjacent moments between the second type of start time corresponding to the request time of the data request and the aligned time after the segmentation of each time series.
[0020] The average value of the data between two adjacent moments determined for each of the multiple time series is returned to the display platform so that the display platform can cache the average value. When the cache reaches the upper limit, the average value of the earliest cached index data is discarded first and then cached again.
[0021] The display platform is used to display multiple time series containing indicator data that are aligned in time.
[0022] Optionally, the method further includes:
[0023] In response to a data request from the display platform, determine the second type of start time corresponding to the request time of the data request and two adjacent times among the various alignment times;
[0024] The sum is obtained by summing the average values of the index data between two adjacent moments corresponding to each of the multiple time series;
[0025] The sum is returned to the display platform so that the display platform can cache the sum. When the cache reaches the limit, the sum of the earliest cached index data is discarded before caching.
[0026] The display platform is used to display multiple time series containing indicator data that are aligned in time.
[0027] Optionally, after determining the data between each pair of adjacent times in the second type of start time and each of the alignment times for each of the multiple sets of time series, the method further includes:
[0028] In response to a data request from the display platform, the request time of the data request is determined to correspond to two adjacent times among the second type of start time and the times after the various time series segments are processed and aligned.
[0029] The data between two adjacent moments corresponding to each of the multiple time series are returned to the display platform so that the display platform will not cache the same data as the same indicator to be detected from the same data source in the cached time series at the same moment.
[0030] This application also provides a time series processing apparatus, the apparatus comprising:
[0031] The acquisition unit is used to acquire multiple sets of time series from multiple data sources for their respective indicators to be detected; wherein, the time series includes indicator data of the indicator to be detected at several consecutive time points;
[0032] The determining unit is configured to, for each of the multiple time series, determine a second type of start time and a time of alignment after segmentation processing for each time series based on a first type of start time and a sampling interval for each time series; wherein, the first type of start time is the initial start time of each time series, the second type of start time is the start time of each time series after optimization and alignment by the processing method, and the second type of start time of the multiple time series is the same;
[0033] The calculation unit is used to calculate the index data of the multiple sets of time series corresponding to the second type of start time and the time aligned after segmentation of each time series, so as to obtain multiple sets of time series containing index data aligned in time.
[0034] This application also provides an electronic device, including a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus;
[0035] The memory stores machine-readable instructions, and the processor executes the above method by invoking the machine-readable instructions.
[0036] This application also provides a machine-readable storage medium storing machine-readable instructions, which, when called and executed by a processor, implement the above-described method.
[0037] By employing the above method, after obtaining multiple time series from various data sources for their respective indicators, the second type of start time and the aligned time after segmentation processing can be determined for each time series based on the first type of start time and sampling interval of each time series. The first type of start time of each time series is the initial start time of each time series, and the second type of start time of each time series is the start time after optimization and alignment using the processing method. The second type of start time is the same for multiple time series. Then, the indicator data corresponding to the second type of start time and the aligned time after segmentation processing of each time series is calculated, resulting in multiple time series containing indicator data that are aligned in time. Accordingly, in scenarios where indicator data from multiple data sources are monitored, multiple time series from multiple data sources for their respective indicators can be aligned in time, meeting the requirement for technicians to observe the same indicator data from different data sources at the same time, and facilitating statistical analysis based on multiple time series containing indicator data that are aligned in time. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is an exemplary embodiment illustrating multiple time series data collected from multiple data sources for their respective indicators to be detected.
[0040] Figure 2 This is an exemplary embodiment illustrating another set of time series collected from multiple data sources for their respective indicators to be detected;
[0041] Figure 3 This is a schematic diagram illustrating a time series processing method as an exemplary embodiment;
[0042] Figure 4 This is an exemplary embodiment illustrating the hardware structure of an electronic device containing a time series processing apparatus;
[0043] Figure 5 This is a block diagram illustrating a time series processing apparatus as an exemplary embodiment. Detailed Implementation
[0044] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0045] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0046] Performance monitoring systems help operations and maintenance (O&M) personnel promptly perceive the operational status of business systems. O&M personnel can typically analyze various monitoring metrics included in the monitoring data to determine whether the business system is operating normally and which business processes within the corresponding system are experiencing problems. For example, monitoring metrics may include, but are not limited to, device IOPS, throughput, and average latency.
[0047] In scenarios where multiple controllers monitor performance data, the performance data acquired by each controller for a specific detection metric constitutes a time series. Each time series contains performance data for that metric at several consecutive points in time. By simultaneously observing multiple time series of a specific detection metric collected from multiple controllers, customers can analyze and adjust their business operations.
[0048] For example, see Figure 1 , Figure 1 This is an exemplary embodiment illustrating multiple time series data collected from multiple data sources for their respective indicators. For example... Figure 1 As shown, the black horizontal solid lines represent the four time series collected by controllers 1, 2, 3, and 4 for the target indicator (such as IOPS). Each time series contains indicator data for the target indicator at several consecutive moments from start time 00 to end time 45. The first type of start time (i.e., the initial start time of the time series) is different for each time series. For example, the first type of start time of controller 4 is the earliest, and the first type of start time of controller 2 is the latest.
[0049] For example, see Figure 2 , Figure 2 This is an exemplary embodiment illustrating another diagram of multiple time series data collected from multiple data sources for their respective indicators to be detected. For example... Figure 2 As shown, due to packet loss and network delay during the transmission of time series data, the data collected at a certain moment may be missing, causing a continuous time series to become a discrete time series.
[0050] As can be seen from the embodiments shown above, because each controller is independent during the performance monitoring process, the performance statistics data of each controller are collected in a sequential order, and there is a problem of data loss during data transmission, it is difficult to collect the indicator data on all controllers at the same time. There is a problem that the indicator data of different controllers cannot be aligned at the same time, and some time series data are lost.
[0051] In view of this, this specification aims to propose a technical solution that can perform time alignment of multiple time series collected from multiple data sources for their respective indicators and solve the problem of inaccurate indicator data caused by data loss.
[0052] In implementation, multiple time series data from multiple data sources can be acquired for each target metric. Each time series contains metric data at several consecutive moments. Then, for each of the multiple time series, a second type of start time and the aligned time after segmentation are determined based on the first type of start time and sampling interval of each time series. The first type of start time is the initial start time of each time series, and the second type of start time is the start time after processing and optimization. The second type of start time is the same for all time series. Further, the metric data corresponding to the second type of start time and the aligned time after segmentation are calculated, resulting in multiple time series containing metric data aligned in time.
[0053] For example, such as Figure 1 As shown, the black horizontal solid lines represent the four time series collected by data sources K1, K2, K3, and K4 for the target metric (e.g., IOPS). For each of the four time series, the second type of start time and the aligned time after segmentation processing are determined based on the first type of start time (02 for data source K1, 04 for data source K2, 03 for data source K3, and 01 for data source K4) and the sampling interval (e.g., 5). The second type of start time is the start time after the four time series have been processed and optimized for alignment. The second type of start time is the same for all four time series, for example, the second type of start time is 00, and the aligned times are 05, 10, 15, 20, etc. Further, the metric data corresponding to the second type of start time 00 and the aligned times 05, 10, 15, 20, etc., are calculated for the four time series, resulting in multiple time series containing metric data that are aligned in time.
[0054] It should be noted that the data source K can be a controller or other objects that need to be analyzed, such as memory or disk. This manual does not limit what the specific data source K represents.
[0055] Therefore, in the technical solution described in this specification, in scenarios where indicator data from multiple data sources are monitored, multiple time series of each data source for their respective indicators to be detected can be aligned in time. This satisfies the requirement for technicians to observe the same indicator data from different data sources at the same time, and facilitates technicians to perform statistics and analysis based on multiple time series containing indicator data that are aligned in time.
[0056] The present application will now be described through specific embodiments and in conjunction with specific application scenarios.
[0057] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating an exemplary embodiment of a time series processing method. The method may perform the following steps:
[0058] Step 302: Obtain multiple time series data from multiple data sources for their respective indicators to be detected; wherein the time series data includes indicator data of the indicator to be detected at several consecutive time points.
[0059] For example, there are four controllers. Controller 1 collects time series Y1 for the target metric (e.g., IOPS), controller 2 collects time series Y2 for the target metric (e.g., IOPS), controller 3 collects time series Y3 for the target metric (e.g., IOPS), and controller 4 collects time series Y4 for the target metric (e.g., IOPS). Each time series Y1, Y2, Y3, and Y4 contains data on the metric to be detected (such as IOPS) at several consecutive time points. For example, time series Y4 contains metric data at several consecutive time points t = t1, t2, t3, t4, t5... The IOPS metric of controller 4 at time t = t1 corresponds to the data of time series Y4 at time t = t1.
[0060] The metrics collected by the controller include CPU utilization, IOPS (Input / Output Operations Per Second), throughput, and average latency. This manual does not limit the specific content of these metrics. A time series is a collection of data arranged chronologically, typically sampled at equal time intervals. The time series collected by the controller for a given metric reflects the metric data at several consecutive moments. Different controllers collect different time series for different metrics.
[0061] Step 304: For each group of time series in the multiple groups of time series, determine the second type of start time of each group of time series and the time of alignment after segmentation processing of each group of time series according to the first type of start time and sampling interval of each group of time series; wherein, the first type of start time is the initial start time of each group of time series, and the second type of start time is the start time of each group of time series after processing, optimization and alignment, and the second type of start time of the multiple groups of time series is the same.
[0062] For example, there are four controllers, and four time series data are obtained by collecting performance data for the target indicator from the four controllers. In the diagram, the first type of start time for time series Y1, Y2, Y3, and Y4 is the timestamp corresponding to the first performance data of each series before subsequent alignment processing. For example, the first type of start time for time series Y1 is t2, for time series Y2 it is t4, for time series Y3 it is t3, and for time series Y4 it is t1. Based on the first type of start time for each of time series Y1, Y2, Y3, and Y4, the second type of start time for each of time series Y1, Y2, Y3, and Y4 is determined. The second type of start time for time series Y1, Y2, Y3, and Y4 is the same.
[0063] The first type of start time for the time series of performance data collected from the controller can be obtained in several ways. For example, it can be obtained by querying the controller's records to get the earliest timestamp as the start time, by using the data acquisition program, by searching the system logs, or by viewing the controller configuration information. This manual does not restrict the method for obtaining the first type of start time for the time series. The second type of start time for the time series is the start time of each time series after time alignment, and the second type of start time is the same for each time series.
[0064] Step 306: Calculate the index data corresponding to the second type of start time and the time aligned after segmentation of each time series in the multiple sets of time series, to obtain multiple sets of time series containing index data aligned in time.
[0065] For example, such as Figure 1 As shown, the four controllers K1, K2, K3, and K4 respectively collected four different time series Y1, Y2, Y3, and Y4 for the index to be detected, each of which is... Taking the second type of start time of multiple time series as 00, and the aligned times of each segment as 05, 10, 15, 20... as an example, calculate the index data of the four time series Y1, Y2, Y3, Y4 corresponding to the second type of start time 00 and the aligned times of each time series after segmentation processing as 05, 10, 15, 20..., to obtain multiple time series Y1', Y2', Y3', Y4' that contain index data aligned in time.
[0066] The multiple time series containing indicator data, aligned in time, share several consecutive moments, facilitating technicians to observe data from multiple controllers on the indicator at the same time for comparison or analysis. This manual does not limit the specific form and method of data comparison.
[0067] In one embodiment shown, for each group of time series in the plurality of time series, determining the second type of start time and the aligned time after segmentation of each group of time series based on the first type of start time and sampling interval of each group of time series includes:
[0068] Divide the first type of start time of any time series in the multiple sets of time series by the sampling interval to obtain the remainder;
[0069] Subtract the remainder from the first type of start time to obtain the second type of start time for the multiple sets of time series;
[0070] The second type of start time is added to the sampling interval in sequence to obtain the aligned time after the segmentation of each time series.
[0071] For example, divide the first type of start time 01 (i.e., the start time of the time series without alignment) of time series Y4 in the four time series Y1, Y2, Y3, and Y4 by the sampling interval (e.g., 5) to obtain a remainder of 1; then subtract the remainder of 1 from the first type of start time 01 of time series Y4 to obtain the second type of start time 00 for the four time series Y1, Y2, Y3, and Y4; further, add the second type of start time 00 to the sampling interval 5 in sequence to obtain the various alignment times 05, 10, 15, 20, ... The same applies to other time series. For example, the first type of start time 02 of time series Y1 (i.e., the start time of the time series without alignment) is divided by the sampling interval (e.g., 5) to obtain a remainder of 2. Then, the first type of start time 02 of time series Y1 is subtracted from the remainder of 2 to obtain the second type of start time 00 for the four time series Y1, Y2, Y3, and Y4. Further, the second type of start time 00 is added to the sampling interval 5 in sequence to obtain the various alignment times 05, 10, 15, 20, ...
[0072] It should be noted that the start times of the first type, the second type, and the aligned times after processing each time series segment are all represented in the form of timestamps. The sampling interval refers to the time interval between recording and collecting performance data. Shorter sampling intervals provide more detailed and accurate data, but may increase system overhead and storage requirements. Longer sampling intervals can reduce overhead, but may lose some details and short-term variations. The sampling interval should be set according to the actual needs of balancing real-time performance, resource consumption, and data accuracy. Different controllers collect time series data for different monitored indicators, corresponding to the same sampling interval.
[0073] In one embodiment shown, the index data corresponding to the second type of start time and the time aligned after segmentation of each time series in the multiple sets of time series are calculated to obtain multiple sets of time series containing index data aligned in time, including:
[0074] Based on the second type of start time and the time aligned after segmentation of each time series, determine the data between each two adjacent times in each of the multiple sets of time series corresponding to the second type of start time and the time aligned after segmentation of each time series;
[0075] By taking the third type of start time of the two adjacent times as the time on the determined data corresponding segment interval, multiple time series containing index data are obtained that are aligned in time.
[0076] For example, the second type of start time is 00, and the various alignment times are 05, 10, 15, 20, ..., determine the data between each two adjacent times in the second type of start time 00 and the various alignment times 05, 10, 15, 20 for the four time series Y1, Y2, Y3, Y4 respectively. That is, the time series Y1, Y2, Y3, Y4 respectively correspond to the data between the second type of start time 00 and alignment time 05, the data between alignment time 05 and alignment time 10, the data between alignment time 10 and alignment time 15, and the data between alignment time 15 and alignment time 20. The third type of start time 00, which corresponds to the second type of start time 00 and alignment time 05, is taken as the time corresponding to the data between the second type of start time 00 and alignment time 05. The third type of start time 05, which corresponds to the alignment time 05 and alignment time 10, is taken as the time corresponding to the data between alignment time 05 and alignment time 10. And so on, to obtain multiple time series containing index data that are aligned in time.
[0077] The third type of starting time refers to the smallest of two adjacent times (i.e., the embodiment shown above), or the middle time of two adjacent times, or other determination methods. This specification does not limit this.
[0078] In one embodiment shown, based on the second type of start time and the aligned times after segmentation of each time series, the data between every two adjacent times in each of the multiple sets of time series corresponding to the second type of start time and the aligned times after segmentation of each time series is determined, including:
[0079] Based on the second type of start time and the time after segmentation and alignment of each time series, determine the average value of the data between each two adjacent times corresponding to the second type of start time and the time after segmentation and alignment of each time series in each of the multiple time series.
[0080] For example, if the second type of starting time is 00, and the alignment times are 05, 10, 15, 20, etc., then we need the average value of the data between each two adjacent times in the second type of starting time 00 and each alignment time 05, 10, 15, 20 for four time series Y1, Y2, Y3, and Y4. Taking time series Y1 as an example, assuming that the index data of time series Y1 between the second type of starting time 00 and alignment time 05 are 7%, 8%, 10%, 8%, and 7%, then the average value of the index data of time series Y1 between the second type of starting time 00 and alignment time 05 is 8%. We will use 8% as the index data of time series Y1 within the time interval between the second type of starting time 00 and alignment time 05.
[0081] In one embodiment shown, the method further includes:
[0082] In response to a data request from the display platform, determine two adjacent moments between the second type of start time corresponding to the request time of the data request and the aligned time after the segmentation of each time series.
[0083] The average value of the data between two adjacent moments determined for each of the multiple time series is returned to the display platform so that the display platform can cache the average value. When the cache reaches the upper limit, the average value of the earliest cached index data is discarded first and then cached again.
[0084] The display platform is used to display multiple time series containing indicator data that are aligned in time.
[0085] For example, when a data request is received from the display platform, assuming the request time is 03, the two adjacent times corresponding to the second type of start time and each of the alignment times can be determined as: second type of start time 00 and alignment time 05. Then, the average values of the data corresponding to the second type of start time 00 and alignment time 05 for each of the four time series Y1, Y2, Y3, and Y4 are returned to the display platform. For example, the average values of the indicator data corresponding to the second type of start time 00 and alignment time 05 for time series Y1, Y2, Y3, and Y4 are 8%, 8%, 8%, and 9%, respectively. The four average values are returned to the display platform so that the display platform can cache the average values. When the display platform's cache reaches its limit, the display platform will first discard the earliest average value it has already cached, and then cache subsequent new indicator data.
[0086] It should be noted that, assuming the data request from the display platform is made once per second, the above method will transform the actual values of the index data sent per second for the four time series Y1, Y2, Y3, and Y4 that are aligned in time into the data values sent in response to the data request from the display platform. Then, the average value of the data from time 00 to 05, which corresponds to time 03, will be sent every second. For example, existing technology sends the actual value of indicator data every second within a time period from 00 to 05. For instance, at times 00, 01, 02, 03, and 04, the actual values of indicator data (45%, 42%, 43%, 45%, and 46%) are sent to the display platform. If the indicator data received by the display platform at time 04 is lost, there will be a discrepancy between the average value (43.75%) calculated by the display platform for the time period from 00 to 05 and the average value (44.2%) calculated if the indicator data at time 04 were not lost. This embodiment can send the average value of indicator data (44.2%) to the display platform at times 00, 01, 02, 03, and 04, a total of 5 times. Even if there is one instance of data average value loss, because the lost data is already calculated and is the same as the average value of adjacent data, the data accuracy will not be affected by packet loss during data transmission. In other words, in this embodiment, after responding to the data request from the display platform, the average value for the time period is returned multiple times, thereby solving the problem of missing time series data affecting data accuracy.
[0087] The display platform can store and display multiple time series aligned in time. It sends data requests to the data receiving platform at preset data acquisition intervals. The data receiving platform then obtains the indicator data collected from the data source regarding the indicator to be monitored through the data acquisition platform. By observing the time series on the display platform, administrators can promptly identify the load on the monitored object and implement measures such as load balancing or resource allocation adjustments to optimize its performance and stability.
[0088] In one embodiment shown, the method further includes:
[0089] In response to a data request from the display platform, determine the second type of start time corresponding to the request time of the data request and two adjacent times among the various alignment times;
[0090] The sum is obtained by summing the average values of the index data between two adjacent moments corresponding to each of the multiple time series;
[0091] The sum is returned to the display platform so that the display platform can cache the sum. When the cache reaches the limit, the sum of the earliest cached index data is discarded before caching.
[0092] The display platform is used to display multiple time series containing indicator data that are aligned in time.
[0093] For example, when a data request is received from the display platform, assuming the request time is 03, the two adjacent times corresponding to the second type of start time and each of the alignment times can be determined as: second type of start time 00 and alignment time 05. Then, the average values of the data between the second type of start time 00 and alignment time 05 for each of the four time series Y1, Y2, Y3, and Y4 are summed. For example, if the average values of the data between the second type of start time 00 and alignment time 05 for the time series Y1, Y2, Y3, and Y4 are 8%, 8%, 8%, and 9% respectively, the sum of the four average values is 33%. The sum is returned to the display platform so that the display platform can cache the sum. When the display platform's cache reaches its limit, it first discards the earliest cached sum and then caches subsequent new data.
[0094] By averaging and summing the data over a period of time, the problem of packet loss during data transmission, which may affect data accuracy, can be solved. The resulting total time series can also reflect the overall level of a certain indicator under test in the entire system or control process that includes multiple statistical objects (such as controllers). This allows technicians to understand the overall load of the controllers and take measures such as load balancing or adjusting resource allocation to help the business operate smoothly.
[0095] In one embodiment shown, after determining the data between each pair of adjacent moments in the second type of start time and each of the respective alignment times for each of the multiple time series, the method further includes:
[0096] In response to a data request from the display platform, the request time of the data request is determined to correspond to two adjacent times among the second type of start time and the times after the various time series segments are processed and aligned.
[0097] The data between two adjacent moments corresponding to each of the multiple time series are returned to the display platform so that the display platform will not cache the same data as the same indicator to be detected from the same data source in the cached time series at the same moment.
[0098] For example, when a data request is received from the display platform, assuming the request time is 03, the two adjacent times corresponding to the second type of start time and each of the alignment times can be determined as: second type of start time 00 and alignment time 05. With a controller indicator data collection frequency of 1 time / second, the display platform acquires the collected controller indicator data at a sampling interval of 5. The data 8%, 8%, 8%, and 9% corresponding to the time series Y1, Y2, Y3, and Y4 between the second type of start time 00 and alignment time 05 are returned to the display platform at sampling intervals of 5. Time series Y1 collects the CPU utilization rate of controller K1. If the display platform already caches a time series containing 8% of the CPU utilization rate of controller K1 between the second type of start time 00 and alignment time 05, then the 8% of the time series Y1 between the second type of start time 00 and alignment time 05 will not be repeatedly cached by the display platform. This reduces the cache usage on the display platform while ensuring data accuracy and preventing data loss, thus improving cache efficiency.
[0099] Corresponding to the embodiments of the time series processing method described above, this specification also provides an embodiment of a time series processing apparatus.
[0100] Please see Figure 4 , Figure 4This is an exemplary embodiment illustrating the hardware structure of an electronic device containing a time-series processing apparatus. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, memory 408, and non-volatile memory 410, and may also include other necessary hardware. One or more embodiments of this specification can be implemented in software, for example, the processor 402 reads the corresponding computer program from the non-volatile memory 410 into memory 408 and then runs it. Of course, besides software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0101] Please see Figure 5 , Figure 5 This is a block diagram illustrating an exemplary embodiment of a time series processing apparatus. This time series processing apparatus can be applied to, for example... Figure 4 The electronic device shown implements the technical solution of this specification. The time series processing device 500 may include:
[0102] The acquisition unit 502 is used to acquire multiple sets of time series from multiple data sources for their respective indicators to be detected; wherein, the time series includes indicator data of the indicator to be detected at several consecutive time points;
[0103] The determining unit 504 is used to determine, for each of the multiple time series, a second type of start time and a time when each time series is aligned after segmentation processing, based on a first type of start time and a sampling interval of each time series; wherein, the first type of start time is the initial start time of each time series, and the second type of start time is the start time of each time series after processing, optimization, and alignment, and the second type of start time of the multiple time series is the same;
[0104] The calculation unit 506 is used to calculate the index data of the multiple sets of time series corresponding to the second type of start time and the time aligned after segmentation of each time series, so as to obtain multiple sets of time series containing index data aligned in time.
[0105] In this embodiment, the determining unit includes:
[0106] The remainder subunit is used to divide the first type of start time of any time series in the multiple time series by the sampling interval to obtain the remainder;
[0107] The difference subunit is used to subtract the remainder from the first type of start time to obtain the second type of start time for the multiple sets of time series;
[0108] The summation subunit is used to add the second type of start time to the sampling interval in sequence to obtain the aligned time after the segmentation of each time series.
[0109] In this embodiment, the computing unit includes:
[0110] The first determining subunit is used to determine the data between every two adjacent moments in each of the multiple sets of time series, based on the second type of start time and the moments aligned after segmentation of each time series;
[0111] The second determining subunit is used to take the third type of start time of the two adjacent times as the time on the determined data corresponding segment interval, so as to obtain multiple sets of time series containing index data that are aligned in time.
[0112] In this embodiment, the first determining subunit is specifically used for:
[0113] Based on the second type of start time and the time after segmentation and alignment of each time series, determine the average value of the data between each two adjacent times corresponding to the second type of start time and the time after segmentation and alignment of each time series in each of the multiple time series.
[0114] In this embodiment, the device further includes:
[0115] The second determining unit, in response to a data request from the display platform, determines two adjacent moments among the second type of start time corresponding to the request time of the data request and the aligned times after the segmentation of each time series.
[0116] The first return unit is used to return the average value of the data between two adjacent moments corresponding to each of the multiple time series to the display platform, so that the display platform can cache the average value, and when the cache reaches the upper limit, it first discards the average value of the earliest cached indicator data and then caches it again; wherein, the display platform is used to display the multiple time series containing indicator data that are aligned in time.
[0117] In this embodiment, the device further includes:
[0118] The third determining unit is used to respond to the data request from the display platform and determine the second type of start time corresponding to the request time of the data request and two adjacent times among the various alignment times.
[0119] The summation unit is used to sum the average values of the index data between two adjacent time points determined for each of the multiple time series to obtain a sum value;
[0120] The second return unit is used to return the sum value to the display platform so that the display platform can cache the sum value, and when the cache reaches the upper limit, it first discards the sum value of the earliest cached time indicator data and then caches it again; wherein, the display platform is used to display the multiple sets of time series containing indicator data that are aligned in time.
[0121] In this embodiment, after determining the data between each pair of adjacent times in the second type of start time and each of the alignment times according to the second type of start time and each of the alignment times, the apparatus further includes:
[0122] The fourth determining unit is used to respond to the data request from the display platform and determine that the request time of the data request corresponds to two adjacent times among the second type of start time and the times after the various time series are segmented and aligned.
[0123] The third return unit is used to return the data between two adjacent moments determined for each of the multiple time series to the display platform multiple times, so that the display platform will not cache the same data as the same indicator to be detected from the same data source in the cached time series at the same moment.
[0124] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0125] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0126] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0127] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0128] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0129] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0130] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0131] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0132] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0133] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0134] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of one or more embodiments of this specification, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "in response to a determination," or "when," or "in the event of a determination."
[0135] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.
Claims
1. A time series processing method, characterized in that, The method includes: Multiple time series data from multiple data sources are obtained for the same indicator to be detected; wherein the time series data include indicator data of the indicator to be detected at several consecutive time points. For each of the multiple time series, a second type of start time and a time of alignment after segmentation are determined based on the first type of start time and sampling interval of each time series; wherein, the first type of start time is the initial start time of each time series, and the second type of start time is the start time of each time series after processing and optimization alignment, and the second type of start time of the multiple time series is the same. Based on the second type of start time and the time aligned after segmentation of each time series, determine the data between each two adjacent times in each of the multiple sets of time series corresponding to the second type of start time and the time aligned after segmentation of each time series; By taking the third type of start time of the two adjacent times as the time on the determined data corresponding segment interval, multiple time series containing index data are obtained that are aligned in time.
2. The method according to claim 1, characterized in that, For each of the multiple time series, the second type of start time and the aligned time after segmentation of each time series are determined based on the first type of start time and sampling interval of each time series, including: Divide the first type of start time of any time series in the multiple sets of time series by the sampling interval to obtain the remainder; Subtracting the remainder from the first type of start time yields the second type of start time for the multiple sets of time series; The second type of start time is added to the sampling interval in sequence to obtain the aligned time after the segmentation of each time series.
3. The method according to claim 1, characterized in that, Based on the second type of start time and the aligned times after segmentation of each time series, determine the data between every two adjacent times in each of the multiple sets of time series corresponding to the second type of start time and the aligned times after segmentation of each time series, including: Based on the second type of start time and the time after segmentation and alignment of each time series, determine the average value of the data between each two adjacent times corresponding to the second type of start time and the time after segmentation and alignment of each time series in each of the multiple time series.
4. The method according to claim 3, characterized in that, The method further includes: In response to a data request from the display platform, determine two adjacent moments between the second type of start time corresponding to the request time of the data request and the aligned time after the segmentation of each time series. The average value of the data between two adjacent moments determined for each of the multiple time series is returned to the display platform so that the display platform can cache the average value. When the cache reaches the upper limit, the average value of the earliest cached index data is discarded first and then cached again. The display platform is used to display multiple time series containing indicator data that are aligned in time.
5. The method according to claim 3, characterized in that, The method further includes: In response to a data request from the display platform, determine the second type of start time corresponding to the request time of the data request and two adjacent times among each alignment time; The sum is obtained by summing the average values of the index data between two adjacent moments corresponding to each of the multiple time series; The sum is returned to the display platform so that the display platform can cache the sum. When the cache reaches its limit, the sum of the earliest cached index data is discarded before caching. The display platform is used to display multiple time series containing indicator data that are aligned in time.
6. The method according to claim 1, characterized in that, After determining the data between each pair of adjacent moments in the second type of start time and each alignment time according to the second type of start time and each alignment time, the method further includes: In response to a data request from the display platform, the request time of the data request is determined to correspond to two adjacent times among the second type of start time and the times after the various time series segments are processed and aligned. The data between two adjacent moments corresponding to each of the multiple time series are returned to the display platform so that the display platform will not cache the same data as the same indicator to be detected from the same data source in the cached time series at the same moment.
7. A time series processing apparatus, characterized in that, The device includes: The acquisition unit is used to acquire multiple time series data from multiple data sources for the same indicator to be detected; wherein the time series data includes indicator data of the indicator to be detected at several consecutive time points. The determining unit is configured to, for each of the multiple time series, determine a second type of start time and a time when each time series is aligned after segmentation processing, based on a first type of start time and a sampling interval of each time series; wherein, the first type of start time is the initial start time of each time series, and the second type of start time is the start time of each time series after processing, optimization, and alignment, and the second type of start time of the multiple time series is the same; The calculation unit is used to determine the data between every two adjacent moments in each of the multiple sets of time series, based on the second type of start time and the moments aligned after segmentation of each time series; By taking the third type of start time of the two adjacent times as the time on the determined data corresponding segment interval, multiple time series containing index data are obtained that are aligned in time.
8. An electronic device, comprising a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the method according to any one of claims 1 to 6 by invoking the machine-readable instructions.
9. A machine-readable storage medium storing machine-readable instructions that, when invoked and executed by a processor, implement the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Time axis self-normalizing method for multi-telemetry parameter joint analysis
CN112541162A
Front-end caching method of low-code platform and related equipment
CN116860862A