A distributed time series data analysis and processing method and system
By removing noise, extracting multi-scale features and load balancing strategies, adjusting local time windows based on multi-scale features, and constructing correlation graphs for analysis, it solves the problem of processing time series data in a distributed environment and achieves efficient multi-dimensional correlation analysis.
Patent Information
- Application Number
- CN202410947369.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-16
AI Technical Summary
Existing time series data analysis methods are difficult to effectively process massive time series data. Especially in distributed environments, the time dependence and sequence characteristics of time series data are difficult to represent and process, and it is difficult to discover multi-scale and multi-dimensional correlation patterns.
By obtaining original time series data, removing noise and extracting multi-scale features, combining the load balancing strategy to divide data blocks, using multi-scale features to adjust local time windows for incremental aggregation calculations, constructing multi-scale data block association graphs, determining the optimal analysis granularity and Perform fusion analysis to achieve multi-dimensional correlation analysis.
It improves the computing efficiency and throughput of time series data, significantly improves the stability and robustness of analysis results, can effectively process large-scale time series data, discovers multi-dimensional correlation patterns, and supports in-depth understanding and decision-making.
Smart Images

Figure CN118484566B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a distributed time series data analysis and processing method and system. Background Art
[0002] With the rapid development of the Internet of Things, Industrial Internet, Smart City and other fields, time series data presents the characteristics of large data volume, diverse sources and high real-time performance. The demand for analysis and processing of time series data is growing. Traditional time series data analysis methods are mainly based on centralized processing frameworks, which are difficult to effectively cope with the storage and computing challenges of massive time series data, and it is difficult to discover the multi-scale and multi-dimensional correlation patterns and laws contained in time series data.
[0003] With the development of big data technology, distributed computing frameworks have been widely used, providing strong support for the parallel processing of massive data. However, these general distributed computing frameworks do not fully consider the characteristics of time series data, and there are still many challenges in processing time series data. For example, the time dependency and sequence characteristics of time series data are difficult to effectively represent and process in a distributed environment, and the multi-scale characteristics and association patterns of time series data are difficult to be effectively explored through simple data partitioning and aggregation;
[0004] Existing time series data analysis methods usually focus on the analysis of a single dimension or a single scale, which makes it difficult to fully explore the multi-dimensional correlations and cross-scale patterns of time series data. Therefore, there is an urgent need for a solution to solve the problems existing in existing technologies. Summary of the invention
[0005] The embodiments of the present invention provide a distributed time series data analysis and processing method and system, which can at least solve some of the problems existing in the prior art.
[0006] A first aspect of an embodiment of the present invention provides a distributed time series data analysis and processing method, including:
[0007] Acquire original time series data and remove noise from the original time series data to obtain standard time series data, perform outlier detection on the standard time series data and extract multi-scale features through a wavelet transform algorithm, determine data partitioning granularity based on the data format of the standard time series data, and divide the standard time series data in combination with a preset load balancing strategy to obtain multiple standard data blocks;
[0008] Generate a data block allocation scheme based on the multi-scale features and performance parameters of the computing nodes, send the standard data blocks to the computing nodes according to the data block allocation scheme and update the standard data blocks, adjust the corresponding local time windows in combination with the multi-scale features, perform incremental aggregation calculations according to the adjusted local time windows, and obtain local calculation results;
[0009] The summary node receives the local calculation results and the multi-scale features corresponding to the standard data blocks, determines the correlation of the standard data blocks at different scales according to preset association analysis rules and constructs a multi-scale data block association graph, determines the optimal analysis granularity combination based on the multi-scale data block association graph, divides the standard data blocks in the optimal analysis granularity combination into multiple association clusters and performs fusion analysis to obtain a comprehensive analysis result, and adaptively integrates the comprehensive analysis result to obtain a multi-dimensional association analysis result.
[0010] In an optional embodiment,
[0011] The original time series data is obtained and the noise in the original time series data is removed to obtain the standard time series data, anomaly detection is performed on the standard time series data and multi-scale features are extracted through the wavelet transform algorithm, the data division granularity is determined based on the data format of the standard time series data, and the standard time series data is divided in combination with a preset load balancing strategy to obtain multiple standard data blocks including:
[0012] Obtaining original time series data through a data acquisition platform, performing statistical analysis on the original time series data, determining a mean and a standard deviation corresponding to the original time series data, calculating a noise score corresponding to the current original time series data based on the mean and the standard deviation, determining a noise score threshold through a dynamic threshold selection method based on a box plot, comparing the noise score with the noise score threshold, removing data points in the original time series data whose noise scores are greater than the noise score threshold, and obtaining the standard time series data;
[0013] For each data point in the standard time series data, the corresponding outlier score is determined by the outlier score function, the outlier score is compared with the preset adaptive threshold, the number of outliers is determined, the outlier ratio and gradient are determined in combination with the outlier proportion function, and the adaptive threshold is updated, and the update is repeated until the adaptive threshold converges, and the outliers in the standard time series data are judged and removed according to the updated adaptive threshold to obtain the optimal time series data;
[0014] Performing continuous wavelet transform and multi-layer wavelet decomposition on the optimal time series data, obtaining low-frequency trend characteristics and high-frequency detail characteristics of the optimal time series data at different scales by determining low-frequency approximate components and high-frequency detail components, extracting statistical characteristics of each layer of wavelet coefficients, and obtaining multi-scale characteristics corresponding to the optimal time series data;
[0015] By determining the statistical features corresponding to the standard time series data, the optimal time series data is divided into multiple initial blocks, for each initial block, the local mean and standard deviation are calculated, and the similarity between the current initial block and the overall distribution is determined according to the local mean and standard deviation, and the minimum value of the similarity is used as a threshold to adjust the boundary of the initial block to obtain multiple time series data blocks;
[0016] For the time series data blocks, the load balance degree corresponding to each data block is calculated, two adjacent time series data blocks are randomly selected and the dividing point is modified according to the load balance ratio, and the load balance degree is recalculated according to the modified dividing point. If the load balance degree becomes smaller, the current modification is accepted, otherwise it is not accepted, and the iteration is repeated until the maximum number of iterations is reached to obtain multiple standard data blocks.
[0017] In an optional embodiment,
[0018] For the time series data block, the load balancing degree corresponding to each data block is calculated as shown in the following formula:
[0019] ;
[0020] in, σ l Indicates the load balancing degree. w i Indicates i The complexity weight corresponding to each data block, l i Indicates i The size of a time series data block, Indicates the average value of the data block size, m' Indicates the total number of data blocks involved in the calculation.
[0021] In an optional embodiment,
[0022] A data block allocation scheme is generated based on the multi-scale features and the performance parameters of the computing nodes, the standard data blocks are sent to the computing nodes according to the data block allocation scheme and the standard data blocks are updated, the corresponding local time windows are adjusted in combination with the multi-scale features, and incremental aggregation calculation is performed according to the adjusted local time windows to obtain local calculation results including:
[0023] Based on the pre-acquired multi-scale features, determine the multi-scale features corresponding to each data block and calculate the performance index of each computing node, determine the similarity matrix between the data block and the node, and solve the maximum weight matching of the bipartite graph through the Hungarian algorithm to obtain the optimal mapping relationship, and generate a data block allocation plan based on the optimal mapping relationship;
[0024] The standard data block is sent to a corresponding computing node based on the data block allocation scheme, the local time window is adaptively adjusted based on the multi-scale features corresponding to the standard data block, and the standard data block is cut according to the local time window to generate a plurality of sub-data blocks;
[0025] Perform local aggregation calculation on each sub-data block to obtain an aggregation result, splice the aggregation results to obtain a local aggregation vector corresponding to each sub-data block and the local calculation result, and for each new data point, perform incremental update in the current local time window to obtain a global aggregation vector.
[0026] In an optional embodiment,
[0027] Perform local aggregation calculation on each sub-data block, and obtain the aggregation result as shown in the following formula:
[0028] ;
[0029] in, y ij Represents a sub-data block B ij The local aggregation results in λ represents the decay rate, △ t Represents data points x The time difference from the current moment, w x Represents data points x The importance weight of .
[0030] In an optional embodiment,
[0031] The aggregation node receives the local calculation results and the multi-scale features corresponding to the standard data blocks, determines the association of the standard data blocks at different scales according to the preset association analysis rules and constructs a multi-scale data block association graph, determines the optimal analysis granularity combination based on the multi-scale data block association graph, divides the standard data blocks in the optimal analysis granularity combination into multiple association clusters and performs fusion analysis, and obtains a multi-dimensional association analysis result including:
[0032] The local calculation results and the multi-scale features corresponding to the standard data blocks are sent to the summary node, the association strength between the data blocks at different scales is calculated according to the preset association analysis rules, and the multi-scale data block association graph is constructed with the standard data blocks as nodes and the association strength between each data block as edges;
[0033] By using a greedy strategy in the multi-scale data block association graph, with the goal of maximizing the association within the combination and minimizing the information redundancy between the combinations, the optimal analysis granularity combination is solved, and the standard data blocks are divided into association clusters based on the optimal analysis granularity combination;
[0034] A fusion analysis is performed on the local aggregation results corresponding to the standard data blocks in each association cluster, and the correlation between the query vector and the fusion results of each scale is calculated in combination with the attention mechanism to obtain the attention weights of different scales. The fusion analysis results at different scales are integrated based on the attention weights to obtain the multi-dimensional association analysis results.
[0035] In an optional embodiment,
[0036] With the goal of maximizing the correlation within the combination and minimizing the information redundancy between combinations, solving the optimal analysis granularity combination includes:
[0037] ;
[0038] in, C represents the optimal analysis granularity combination, C 0 represents the initial analysis granularity combination, Represents a data block g and data blocks h In scale range C g The strength of association under μ represents the balance factor, M Indicates the total number of standard data blocks, C g Represents a data block g The range of scales to which it belongs, Represents a data block g and data blocks h In scale k The strength of association under .
[0039] A second aspect of an embodiment of the present invention provides a distributed time series data analysis and processing system, including:
[0040] The first unit is used to obtain original time series data and remove noise from the original time series data to obtain standard time series data, perform outlier detection on the standard time series data and extract multi-scale features through a wavelet transform algorithm, determine a data partitioning granularity based on a data format of the standard time series data, and partition the standard time series data in combination with a preset load balancing strategy to obtain a plurality of standard data blocks;
[0041] The second unit is used to generate a data block allocation scheme based on the multi-scale features and the performance parameters of the computing node, send the standard data block to the computing node according to the data block allocation scheme and update the standard data block, adjust the corresponding local time window in combination with the multi-scale features, perform incremental aggregation calculation according to the adjusted local time window, and obtain a local calculation result;
[0042] The third unit is used to summarize the node receiving the local calculation results and the multi-scale features corresponding to the standard data blocks, determine the correlation of the standard data blocks at different scales according to the preset correlation analysis rules and construct a multi-scale data block correlation graph, determine the optimal analysis granularity combination based on the multi-scale data block correlation graph, divide the standard data blocks in the optimal analysis granularity combination into multiple correlation clusters and perform fusion analysis to obtain a comprehensive analysis result, and adaptively integrate the comprehensive analysis result to obtain a multi-dimensional correlation analysis result.
[0043] According to a third aspect of the embodiments of the present invention,
[0044] An electronic device is provided, comprising:
[0045] processor;
[0046] a memory for storing processor-executable instructions;
[0047] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0048] According to a fourth aspect of the embodiments of the present invention,
[0049] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0050] In the present invention, by removing noise and detecting anomalies from the original time series data, standard time series data is obtained, which improves the quality and reliability of the data. The introduction of load balancing strategy can reasonably allocate data blocks according to the performance parameters of the computing nodes and the characteristics of the data blocks, balance the computing load, and improve the overall computing efficiency. The local time window is adjusted in combination with multi-scale features to achieve adaptive analysis of time series data and capture local features and change trends at different scales. The computing speed and throughput can be significantly improved, and efficient processing of large-scale time series data can be achieved. The process of fusion analysis can smooth local anomalies and improve the stability and robustness of the analysis results. In summary, the present invention realizes multi-dimensional correlation analysis of time series data, improves the efficiency, accuracy and comprehensiveness of the analysis, provides strong support for in-depth understanding and decision support of time series data, and has broad application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a process flow of a distributed time series data analysis and processing method according to an embodiment of the present invention;
[0052] Figure 2 The present invention is a structural diagram of a distributed time series data analysis and processing system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments 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.
[0054] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0055] Figure 1 FIG. 1 is a flow chart of a distributed time series data analysis and processing method according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0056] S1. Obtain original time series data and remove noise from the original time series data to obtain standard time series data, perform outlier detection on the standard time series data and extract multi-scale features through a wavelet transform algorithm, determine the data partitioning granularity based on the data format of the standard time series data, and divide the standard time series data in combination with a preset load balancing strategy to obtain multiple standard data blocks;
[0057] The original time series data refers to a collection of observations or data points collected in a time series. The wavelet transform is a signal processing technology used to decompose time series data into different frequency components and analyze each component separately. The load balancing strategy aims to evenly distribute computing tasks to multiple processing units to optimize the use of computing resources, reduce processing time, and improve the overall performance of the system. The partition granularity refers to decomposing time series data into different subsequences or intervals to facilitate more fine-grained analysis.
[0058] In an optional embodiment,
[0059] The original time series data is obtained and the noise in the original time series data is removed to obtain the standard time series data, anomaly detection is performed on the standard time series data and multi-scale features are extracted through the wavelet transform algorithm, the data division granularity is determined based on the data format of the standard time series data, and the standard time series data is divided in combination with a preset load balancing strategy to obtain multiple standard data blocks including:
[0060] Obtaining original time series data through a data acquisition platform, performing statistical analysis on the original time series data, determining a mean and a standard deviation corresponding to the original time series data, calculating a noise score corresponding to the current original time series data based on the mean and the standard deviation, determining a noise score threshold through a dynamic threshold selection method based on a box plot, comparing the noise score with the noise score threshold, removing data points in the original time series data whose noise scores are greater than the noise score threshold, and obtaining the standard time series data;
[0061] For each data point in the standard time series data, the corresponding outlier score is determined by the outlier score function, the outlier score is compared with the preset adaptive threshold, the number of outliers is determined, the outlier ratio and gradient are determined in combination with the outlier proportion function, and the adaptive threshold is updated, and the update is repeated until the adaptive threshold converges, and the outliers in the standard time series data are judged and removed according to the updated adaptive threshold to obtain the optimal time series data;
[0062] Performing continuous wavelet transform and multi-layer wavelet decomposition on the optimal time series data, obtaining low-frequency trend characteristics and high-frequency detail characteristics of the optimal time series data at different scales by determining low-frequency approximate components and high-frequency detail components, extracting statistical characteristics of each layer of wavelet coefficients, and obtaining multi-scale characteristics corresponding to the optimal time series data;
[0063] By determining the statistical features corresponding to the standard time series data, the optimal time series data is divided into multiple initial blocks, for each initial block, the local mean and standard deviation are calculated, and the similarity between the current initial block and the overall distribution is determined according to the local mean and standard deviation, and the minimum value of the similarity is used as a threshold to adjust the boundary of the initial block to obtain multiple time series data blocks;
[0064] For the time series data blocks, the load balance degree corresponding to each data block is calculated, two adjacent time series data blocks are randomly selected and the dividing point is modified according to the load balance ratio, and the load balance degree is recalculated according to the modified dividing point. If the load balance degree becomes smaller, the current modification is accepted, otherwise it is not accepted, and the iteration is repeated until the maximum number of iterations is reached to obtain multiple standard data blocks.
[0065] The statistical analysis is a process of organizing, describing and interpreting data through mathematical methods to reveal the characteristics, laws and trends of the data. The box plot is a chart used to describe data distribution, which can display the five main quartiles of the data set: minimum value, lower quartile, median, upper quartile and maximum value. The dynamic threshold selection method is used to automatically adjust the threshold according to the actual distribution of the data to adapt to different data patterns and changes. The low-frequency approximate component represents the main trend and large-scale changes of the signal and contains most of the energy of the signal. The high-frequency detail component represents the details and local changes of the signal and contains high-frequency information in the signal. The load balancing degree is used to measure the degree of balance of the distribution of computing tasks in the system among the processing units.
[0066] Obtaining original time series data through a data acquisition platform, wherein the original time series data includes monitoring data returned by equipment sensors pre-set in industrial production and data returned by smart meters and power sensors set in the smart grid field, performing statistical analysis on the original time series data, calculating its mean and standard deviation, calculating the noise score of the current original time series data based on the mean and standard deviation, using a dynamic threshold selection method based on a box plot to adaptively determine the noise score threshold, comparing the noise score of each data point with the noise score threshold, marking data points greater than the threshold as noise points and removing them, and obtaining standard time series data after removing the noise points;
[0067] For each data point in the standard time series data, the outlier score is calculated by the outlier scoring function, and the initial adaptive threshold is set. The outlier score is compared with the adaptive threshold to determine the number of outliers. The outlier ratio function is introduced to calculate the outlier ratio and gradient. The outlier ratio reflects the distribution of outliers in the data, and the gradient represents the changing trend of the outlier distribution. The adaptive threshold is dynamically updated according to the outlier ratio and gradient. If the outlier ratio is too high or the gradient is too large, the threshold is increased, otherwise the threshold is lowered. The update is repeated until the adaptive threshold converges to obtain the optimal outlier judgment threshold. The updated adaptive threshold is used to judge the outliers of the standard time series data, and the identified outliers are removed from the data. After the outliers are removed, the optimal time series data is obtained.
[0068] Perform continuous wavelet transform on the optimal time series data to achieve multi-layer wavelet decomposition. Each layer of decomposition can obtain low-frequency approximate components and high-frequency detail components. Extract the low-frequency approximate components after each layer of wavelet decomposition to obtain the low-frequency trend characteristics of the optimal time series data at different scales. Extract the high-frequency detail components after each layer of wavelet decomposition to obtain the high-frequency detail characteristics of the optimal time series data at different scales. Perform statistical feature extraction on each layer of wavelet coefficients to obtain multi-scale feature representation.
[0069] By analyzing the statistical characteristics of standard time series data, such as mean and standard deviation, the optimal time series data is divided into several initial blocks. For each initial block, its local mean and standard deviation are calculated to measure the concentration of data distribution in the current block. The similarity between each initial block and the overall data distribution is calculated. The higher the similarity, the closer the local distribution of the current block is to the global distribution. The minimum value of the similarity is used as the threshold to adjust the boundary of the initial block. If the similarity is lower than the threshold, the range of the block is reduced. If the similarity is higher than the threshold, the range of the block is expanded. Repeat the iteration until the boundaries of all initial blocks are optimized to obtain the adjusted time series data blocks.
[0070] For each time series data block, calculate its load balance, randomly select two adjacent time series data blocks, calculate the load balance ratio, and adjust the demarcation point of the two data blocks according to the load balance ratio. For example, if the ratio is greater than 1, move the demarcation point to the block with heavier load, and if the ratio is less than 1, move the demarcation point to the block with lighter load. Recalculate the load balance of the two data blocks according to the adjusted demarcation point. If the adjusted load balance becomes smaller, accept the modification of the demarcation point. Otherwise, keep the demarcation point unchanged, and repeat the adjustment until the preset maximum number of iterations is reached to obtain a standard data block.
[0071] In this embodiment, through noise removal and outlier detection, invalid or interfering information in the time series data is effectively removed, the signal-to-noise ratio and reliability of the data are improved, and the multi-scale features can more comprehensively and finely characterize the intrinsic patterns and dynamic changes of the time series data, providing a rich information perspective for data mining. Through load balancing evaluation and data block demarcation point optimization, the load distribution problem in a distributed computing environment is significantly improved. In summary, this embodiment can significantly improve the accuracy and efficiency of analysis, and provide high-performance and high-reliability technical support for the mining and application of complex time series data.
[0072] In an optional embodiment,
[0073] For the time series data block, the load balancing degree corresponding to each data block is calculated as shown in the following formula:
[0074] ;
[0075] in, σ l Indicates the load balancing degree. w i Indicates i The complexity weight corresponding to each data block, l i Indicates i The size of a time series data block, Indicates the average value of the data block size, m'Indicates the total number of data blocks involved in the calculation.
[0076] In this embodiment, by calculating the weighted sum of squares of deviations between the data block size and the average size, the load distribution under the current data block partitioning scheme is quantitatively evaluated, providing an intuitive and measurable optimization goal for load balancing optimization. Through complexity weight correction, the load balancing degree can more comprehensively and accurately evaluate the rationality of load distribution, avoiding the risk of load imbalance caused by simple data block size balancing. The data block partitioning optimization driven by load balancing degree can significantly improve the load distribution problem in the parallel computing environment, give full play to the processing power of each computing node, thereby shortening the completion time of the entire parallel task and improving the overall performance and efficiency of parallel computing. In summary, this embodiment provides key metrics and optimization goals for the load balancing optimization of time series data blocks, which is of great significance for the efficient processing and real-time analysis of large-scale time series data.
[0077] S2. Generate a data block allocation scheme based on the multi-scale features and the performance parameters of the computing nodes, send the standard data blocks to the computing nodes according to the data block allocation scheme and update the standard data blocks, adjust the corresponding local time windows in combination with the multi-scale features, perform incremental aggregation calculations according to the adjusted local time windows, and obtain local calculation results;
[0078] The computing node refers to an independent unit that performs data processing and computing tasks in a distributed computing environment. The local time window refers to dividing the data into time intervals (windows) of fixed length in time series data analysis and performing local analysis or calculation in each window. The incremental aggregation calculation is a commonly used computing method in data stream processing and real-time analysis.
[0079] In an optional embodiment,
[0080] A data block allocation scheme is generated based on the multi-scale features and the performance parameters of the computing nodes, the standard data blocks are sent to the computing nodes according to the data block allocation scheme and the standard data blocks are updated, the corresponding local time windows are adjusted in combination with the multi-scale features, and incremental aggregation calculation is performed according to the adjusted local time windows to obtain local calculation results including:
[0081] Based on the pre-acquired multi-scale features, determine the multi-scale features corresponding to each data block and calculate the performance index of each computing node, determine the similarity matrix between the data block and the node, and solve the maximum weight matching of the bipartite graph through the Hungarian algorithm to obtain the optimal mapping relationship, and generate a data block allocation plan based on the optimal mapping relationship;
[0082] The standard data block is sent to a corresponding computing node based on the data block allocation scheme, the local time window is adaptively adjusted based on the multi-scale features corresponding to the standard data block, and the standard data block is cut according to the local time window to generate a plurality of sub-data blocks;
[0083] Perform local aggregation calculation on each sub-data block to obtain an aggregation result, splice the aggregation results to obtain a local aggregation vector corresponding to each sub-data block and the local calculation result, and for each new data point, perform incremental update in the current local time window to obtain a global aggregation vector.
[0084] The maximum weight matching problem of the bipartite graph is to find a matching in a weighted bipartite graph so that the sum of the weights of the matching edges is maximized. The Hungarian algorithm is an algorithm for solving the maximum matching problem of the bipartite graph. The optimal mapping relationship refers to the optimal corresponding relationship of each vertex in the matching, so that the sum of the weights of the matching edges is maximized. The sub-data block refers to dividing the data into smaller parts or blocks when processing large-scale data. The local aggregation vector refers to a vector obtained by performing local statistics or aggregation calculations on the data within a data block or sub-data block. The incremental update refers to updating only the changed part when the data or model partially changes, without reprocessing the entire data set or retraining the entire model.
[0085] Based on the pre-acquired multi-scale features, determine the multi-scale feature representation corresponding to each standard data block, calculate the performance indicators of each computing node, such as computing power, memory size, network bandwidth, etc., calculate the similarity matrix between the data block and the computing node, and use the similarity matrix between the data block and the computing node as the weight matrix of the bipartite graph. Use the Hungarian algorithm to solve the maximum weight matching problem of the bipartite graph. The solution result is the optimal mapping relationship between the data block and the computing node. Based on the optimal mapping relationship, generate a data block to computing node allocation plan to guide the subsequent data block distribution and computing task allocation;
[0086] According to the data block allocation scheme, each standard data block is sent to the corresponding computing node. For each computing node, the size of the local time window is adaptively adjusted according to the multi-scale features of the received standard data block. The standard data block is cut using the adjusted local time window to generate multiple sub-data blocks. Local aggregation calculations are performed on each sub-data block, and the local aggregation results of each sub-data block are spliced to obtain the local aggregation vector corresponding to the standard data block. For the newly arrived data points, incremental updates are performed in the current local time window to update the local aggregation results. After all computing nodes complete the local aggregation calculations, the local aggregation vectors are sent to the global aggregation node.
[0087] The global aggregation node receives the local aggregation vectors from each computing node, concatenates and aggregates the local aggregation vectors to obtain the global aggregation vector, updates the global statistics and model parameters such as the global mean, variance, and trend according to the global aggregation vector, and feeds back the updated global information to each computing node;
[0088] Each computing node receives feedback information from the global aggregation node, adjusts the local computing strategy according to the updated global information, and for newly arrived data points, each computing node performs incremental updates in the current local time window, updates the local aggregation results, and sends the local aggregation results to the global aggregation node regularly or as needed, triggering a new round of global aggregation calculations, repeating updates and calculations to achieve real-time incremental calculation and aggregation of time series data.
[0089] In this embodiment, the Hungarian algorithm is introduced to optimally match data blocks with computing nodes, fully considering the computing characteristics of data blocks and the performance heterogeneity of nodes, avoiding performance bottlenecks caused by load imbalance, and improving the throughput and performance of the entire system. Local computing nodes dynamically adjust computing strategies based on global information, and global aggregation nodes update global states by integrating local results, forming an adaptive feedback optimization closed loop, improving the accuracy and global consistency of computing results, and enhancing the fault tolerance and adaptability of the system. Through the sliding and incremental updates of local time windows, real-time computing and online aggregation of time series data are realized, which can quickly respond to data changes and provide timely and accurate computing results. In summary, this embodiment significantly improves computing resource utilization, computing locality, robustness, and real-time performance, can adapt to a variety of time series data analysis scenarios, and meet the needs of large-scale data processing and real-time computing.
[0090] In an optional embodiment,
[0091] Perform local aggregation calculation on each sub-data block, and obtain the aggregation result as shown in the following formula:
[0092] ;
[0093] in, y ij Represents a sub-data block B ij The local aggregation results in λ represents the decay rate, △ t Represents data points x The time difference from the current moment, w x Represents data points x The importance weight of .
[0094] In this embodiment, a higher weight is given to recent data by introducing a time decay function, highlighting the important impact of recent data on the aggregation results, which is in line with the timeliness characteristics of time series data. Local aggregation calculations are performed at the sub-data block level, and each sub-data block independently calculates the local aggregation results, avoiding unnecessary global communication and synchronization overheads. By adjusting the decay rate, local aggregation calculations can adapt to different time series data analysis tasks and meet diverse application needs. In summary, this embodiment fully considers the timeliness, dynamics and noise characteristics of time series data, and highlights the importance of recent data through time-weighted aggregation, improves the real-time, accuracy and robustness of the aggregation results, and improves computing efficiency and scalability.
[0095] S3. The summary node receives the local calculation results and the multi-scale features corresponding to the standard data blocks, determines the correlation of the standard data blocks at different scales according to the preset correlation analysis rules and constructs a multi-scale data block correlation graph, determines the optimal analysis granularity combination based on the multi-scale data block correlation graph, divides the standard data blocks in the optimal analysis granularity combination into multiple correlation clusters and performs fusion analysis to obtain a comprehensive analysis result, and adaptively integrates the comprehensive analysis result to obtain a multi-dimensional correlation analysis result.
[0096] The summary node is a node in a distributed computing or data processing system that is responsible for collecting and summarizing results from multiple sub-data blocks or computing nodes. The association analysis rule is a technology for discovering relationships or interaction patterns from large-scale data sets. The multi-scale data association graph is a graph structure used to represent the association relationship of data at different scales. The optimal analysis granularity combination refers to selecting the best granularity combination when analyzing multi-scale data so that the analysis results have the highest correlation and the lowest redundancy. The association cluster refers to a set of interrelated data items discovered in a data set through association analysis.
[0097] In an optional embodiment,
[0098] The aggregation node receives the local calculation results and the multi-scale features corresponding to the standard data blocks, determines the association of the standard data blocks at different scales according to the preset association analysis rules and constructs a multi-scale data block association graph, determines the optimal analysis granularity combination based on the multi-scale data block association graph, divides the standard data blocks in the optimal analysis granularity combination into multiple association clusters and performs fusion analysis, and obtains a multi-dimensional association analysis result including:
[0099] The local calculation results and the multi-scale features corresponding to the standard data blocks are sent to the summary node, the association strength between the data blocks at different scales is calculated according to the preset association analysis rules, and the multi-scale data block association graph is constructed with the standard data blocks as nodes and the association strength between each data block as edges;
[0100] By using a greedy strategy in the multi-scale data block association graph, with the goal of maximizing the association within the combination and minimizing the information redundancy between the combinations, the optimal analysis granularity combination is solved, and the standard data blocks are divided into association clusters based on the optimal analysis granularity combination;
[0101] A fusion analysis is performed on the local aggregation results corresponding to the standard data blocks in each association cluster, and the correlation between the query vector and the fusion results of each scale is calculated in combination with the attention mechanism to obtain the attention weights of different scales. The fusion analysis results at different scales are integrated based on the attention weights to obtain the multi-dimensional association analysis results.
[0102] The association strength is an indicator that measures the closeness of the relationship between two or more data items. The information redundancy refers to the presence of repeated or redundant information in a data set, which does not contribute to understanding the data or extracting useful knowledge, but may increase the complexity of data processing. The query vector is a vectorized representation used to represent the query content in information retrieval and search engines. The greedy strategy is an algorithm design method that is mainly used to solve optimization problems.
[0103] After each computing node completes the local aggregation calculation, it sends the local aggregation result to the aggregation node. At the same time, the multi-scale features corresponding to each standard data block are also sent to the aggregation node. The aggregation node receives the local aggregation results and multi-scale feature data from each computing node.
[0104] The aggregation node calculates the association strength between data blocks at different scales according to the pre-set association analysis rules. The association analysis rules can be defined based on factors such as the statistical characteristics of the data blocks, time series similarity, and causal relationships. Each standard data block is used as a node, and the association strength between data blocks is used as the edge connecting the nodes to construct a multi-scale data block association graph. The multi-scale data block association graph reflects the association relationship and strength between data blocks at different scales.
[0105] In the multi-scale data block association graph, a greedy strategy is applied to solve the optimal analysis granularity combination. The edge with the largest association strength is selected from the association graph, and the corresponding data blocks are merged into a combination. The selection is repeated until the preset number of combinations is reached or the association strength converges. The obtained combination is the optimal analysis granularity combination. The data blocks in each combination are regarded as a whole in the analysis.
[0106] Based on the optimal analysis granularity combination, the standard data blocks are divided into several associated clusters. Each associated cluster contains data blocks that belong to the same combination in the optimal analysis granularity combination. For each associated cluster, the summary node collects the local aggregation results corresponding to all standard data blocks in the cluster, performs fusion analysis on the local aggregation results in the cluster, and repeats the aggregation until each associated cluster is fused at different scales.
[0107] The attention mechanism is introduced to calculate the correlation between the query vector and the fusion analysis results at each scale. Based on the attention weight, the fusion analysis results at different scales are weighted integrated. The fusion analysis results of each scale are multiplied by the corresponding attention weight, and then the sum is obtained to obtain the final multi-dimensional correlation analysis result.
[0108] In this embodiment, the introduction of association analysis rules can quantify the association strength between data blocks at different scales based on factors such as the statistical characteristics of the data blocks and the similarity of time series, which is helpful to discover hidden association relationships and trends and improve the accuracy and insight of the analysis. By applying a greedy strategy to solve the optimal analysis granularity combination in the multi-scale data block association graph, adaptive optimization of the analysis granularity is achieved, the fine granularity and coarse granularity of the analysis granularity are balanced, and information loss caused by excessive segmentation or excessive aggregation is avoided. By dividing the association clusters and performing fusion analysis within the clusters, the robustness of the analysis method to data noise and anomalies is improved, and the impact of abnormal data on the analysis results is reduced. By introducing the attention mechanism, the weights of different scales are adaptively adjusted according to the correlation between the query vector and the fusion analysis results of different scales, the flexibility of the analysis method is enhanced, and the analysis focus can be dynamically adjusted according to different query requirements to meet diverse analysis scenarios. In summary, this embodiment provides users with a comprehensive, accurate, and easy-to-understand analysis perspective to support decision analysis and pattern discovery.
[0109] In an optional embodiment,
[0110] With the goal of maximizing the correlation within the combination and minimizing the information redundancy between combinations, solving the optimal analysis granularity combination includes:
[0111] ;
[0112] in, C represents the optimal analysis granularity combination, C 0 represents the initial analysis granularity combination, Represents a data block g and data blocks h In scale range C g The strength of association under μ represents the balance factor, M Indicates the total number of standard data blocks,C g Represents a data block g The range of scales to which it belongs, Represents a data block g and data blocks h In scale k The strength of association under .
[0113] In this embodiment, by maximizing the sum of the correlation strengths between data blocks in the combination under the optimal analysis granularity combination, the intrinsic connection and similarity of the data blocks at this scale are revealed, which helps to discover the common features and patterns between the data blocks and improve the consistency and homogeneity within the combination. By maximizing the correlation within the combination and minimizing the information redundancy between combinations, it helps to obtain more accurate, comprehensive and targeted analysis results. By optimizing the objective function and solving the optimal analysis granularity combination, the optimal analysis granularity can be adaptively determined according to the intrinsic correlation structure of the data. In summary, this embodiment realizes the adaptive selection and combinatorial optimization of analysis granularity, and improves the accuracy, efficiency and interpretability of the analysis.
[0114] Figure 2 FIG. 1 is a schematic diagram of a distributed time series data analysis and processing system according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0115] The first unit is used to obtain original time series data and remove noise from the original time series data to obtain standard time series data, perform outlier detection on the standard time series data and extract multi-scale features through a wavelet transform algorithm, determine a data partitioning granularity based on a data format of the standard time series data, and partition the standard time series data in combination with a preset load balancing strategy to obtain a plurality of standard data blocks;
[0116] The second unit is used to generate a data block allocation scheme based on the multi-scale features and the performance parameters of the computing node, send the standard data block to the computing node according to the data block allocation scheme and update the standard data block, adjust the corresponding local time window in combination with the multi-scale features, perform incremental aggregation calculation according to the adjusted local time window, and obtain a local calculation result;
[0117] The third unit is used to summarize the node receiving the local calculation results and the multi-scale features corresponding to the standard data blocks, determine the correlation of the standard data blocks at different scales according to the preset correlation analysis rules and construct a multi-scale data block correlation graph, determine the optimal analysis granularity combination based on the multi-scale data block correlation graph, divide the standard data blocks in the optimal analysis granularity combination into multiple correlation clusters and perform fusion analysis to obtain a comprehensive analysis result, and adaptively integrate the comprehensive analysis result to obtain a multi-dimensional correlation analysis result.
[0118] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0119] 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 replace some or all of the technical features therein with equivalents. 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.
Claims
1. A distributed time series data analysis and processing method, characterized in that: include: Acquire original time series data and remove noise from the original time series data to obtain standard time series data, perform outlier detection on the standard time series data and extract multi-scale features through a wavelet transform algorithm, determine data partitioning granularity based on the data format of the standard time series data, and divide the standard time series data in combination with a preset load balancing strategy to obtain multiple standard data blocks; Generate a data block allocation scheme based on the multi-scale features and performance parameters of the computing nodes, send the standard data blocks to the computing nodes according to the data block allocation scheme and update the standard data blocks, adjust the corresponding local time windows in combination with the multi-scale features, perform incremental aggregation calculations according to the adjusted local time windows, and obtain local calculation results; The aggregation node receives the local calculation results and the multi-scale features corresponding to the standard data blocks, determines the correlation of the standard data blocks at different scales according to the preset correlation analysis rules and constructs a multi-scale data block correlation graph, determines the optimal analysis granularity combination based on the multi-scale data block correlation graph, divides the standard data blocks in the optimal analysis granularity combination into multiple correlation clusters and performs fusion analysis to obtain a comprehensive analysis result, and adaptively integrates the comprehensive analysis result to obtain a multi-dimensional correlation analysis result; The original time series data is obtained and the noise in the original time series data is removed to obtain the standard time series data, anomaly detection is performed on the standard time series data and multi-scale features are extracted through the wavelet transform algorithm, the data division granularity is determined based on the data format of the standard time series data, and the standard time series data is divided in combination with a preset load balancing strategy to obtain multiple standard data blocks including: Obtaining original time series data through a data acquisition platform, performing statistical analysis on the original time series data, determining a mean and a standard deviation corresponding to the original time series data, calculating a noise score corresponding to the current original time series data based on the mean and the standard deviation, determining a noise score threshold through a dynamic threshold selection method based on a box plot, comparing the noise score with the noise score threshold, removing data points in the original time series data whose noise scores are greater than the noise score threshold, and obtaining the standard time series data; For each data point in the standard time series data, the corresponding outlier score is determined by the outlier score function, the outlier score is compared with the preset adaptive threshold, the number of outliers is determined, the outlier ratio and gradient are determined in combination with the outlier proportion function, and the adaptive threshold is updated, and the update is repeated until the adaptive threshold converges, and the outliers in the standard time series data are judged and removed according to the updated adaptive threshold to obtain the optimal time series data; Performing continuous wavelet transform and multi-layer wavelet decomposition on the optimal time series data, obtaining low-frequency trend characteristics and high-frequency detail characteristics of the optimal time series data at different scales by determining low-frequency approximate components and high-frequency detail components, extracting statistical characteristics of each layer of wavelet coefficients, and obtaining multi-scale characteristics corresponding to the optimal time series data; By determining the statistical features corresponding to the standard time series data, the optimal time series data is divided into multiple initial blocks, for each initial block, the local mean and standard deviation are calculated, and the similarity between the current initial block and the overall distribution is determined according to the local mean and standard deviation, and the minimum value of the similarity is used as a threshold to adjust the boundary of the initial block to obtain multiple time series data blocks; For the time series data blocks, calculate the load balance degree corresponding to each data block, randomly select two adjacent time series data blocks and modify the demarcation point according to the load balance degree ratio, recalculate the load balance degree according to the modified demarcation point, if the load balance degree becomes smaller, accept the current modification, otherwise do not accept, repeat the iteration until the maximum number of iterations is reached, and obtain multiple standard data blocks; A data block allocation scheme is generated based on the multi-scale features and the performance parameters of the computing nodes, the standard data blocks are sent to the computing nodes according to the data block allocation scheme and the standard data blocks are updated, the corresponding local time windows are adjusted in combination with the multi-scale features, and incremental aggregation calculation is performed according to the adjusted local time windows to obtain local calculation results including: Based on the pre-acquired multi-scale features, determine the multi-scale features corresponding to each data block and calculate the performance index of each computing node, determine the similarity matrix between the data block and the node, and solve the maximum weight matching of the bipartite graph through the Hungarian algorithm to obtain the optimal mapping relationship, and generate a data block allocation plan based on the optimal mapping relationship; The standard data block is sent to a corresponding computing node based on the data block allocation scheme, the local time window is adaptively adjusted based on the multi-scale features corresponding to the standard data block, and the standard data block is cut according to the local time window to generate a plurality of sub-data blocks; Perform local aggregation calculation on each sub-data block to obtain an aggregation result, splice the aggregation results to obtain a local aggregation vector corresponding to each sub-data block and the local calculation result, and for each new data point, perform incremental update in the current local time window to obtain a global aggregation vector; The aggregation node receives the local calculation results and the multi-scale features corresponding to the standard data blocks, determines the association of the standard data blocks at different scales according to the preset association analysis rules and constructs a multi-scale data block association graph, determines the optimal analysis granularity combination based on the multi-scale data block association graph, divides the standard data blocks in the optimal analysis granularity combination into multiple association clusters and performs fusion analysis, and obtains a multi-dimensional association analysis result including: The local calculation results and the multi-scale features corresponding to the standard data blocks are sent to the summary node, the association strength between the data blocks at different scales is calculated according to the preset association analysis rules, and the multi-scale data block association graph is constructed with the standard data blocks as nodes and the association strength between each data block as edges; By using a greedy strategy in the multi-scale data block association graph, with the goal of maximizing the association within the combination and minimizing the information redundancy between the combinations, the optimal analysis granularity combination is solved, and the standard data blocks are divided into association clusters based on the optimal analysis granularity combination; A fusion analysis is performed on the local aggregation results corresponding to the standard data blocks in each association cluster, and the correlation between the query vector and the fusion results of each scale is calculated in combination with the attention mechanism to obtain the attention weights of different scales. The fusion analysis results at different scales are integrated based on the attention weights to obtain the multi-dimensional association analysis results.
2. The method according to claim 1, characterized in that For the time series data block, the load balancing degree corresponding to each data block is calculated as shown in the following formula: ; in, σ l Indicates the load balancing degree. w i Indicates i The complexity weight corresponding to each data block, l i Indicates i The size of a time series data block, Indicates the average size of data blocks, m' Indicates the total number of data blocks involved in the calculation.
3. The method according to claim 1, characterized in that Perform local aggregation calculation on each sub-data block, and obtain the aggregation result as shown in the following formula: ; in, y ij Represents a sub-data block B ij The local aggregation results in λ represents the decay rate, △ t Represents data points x The time difference from the current moment, w x Represents data points x The importance weight of .
4. The method according to claim 1, characterized in that: With the goal of maximizing the correlation within the combination and minimizing the information redundancy between combinations, solving the optimal analysis granularity combination includes: ; in, C represents the optimal analysis granularity combination, C 0 represents the initial analysis granularity combination, Represents a data block g and data blocks h In scale range C g The strength of association under μ represents the balance factor, M Indicates the total number of standard data blocks, C g Represents a data block g The range of scales to which it belongs, Represents a data block g and data blocks h In scale k The strength of association under .
5. A distributed time series data analysis and processing system, used to implement the method according to any one of claims 1 to 4, characterized in that: include: The first unit is used to obtain original time series data and remove noise from the original time series data to obtain standard time series data, perform outlier detection on the standard time series data and extract multi-scale features through a wavelet transform algorithm, determine a data partitioning granularity based on a data format of the standard time series data, and partition the standard time series data in combination with a preset load balancing strategy to obtain a plurality of standard data blocks; The second unit is used to generate a data block allocation scheme based on the multi-scale features and the performance parameters of the computing node, send the standard data block to the computing node according to the data block allocation scheme and update the standard data block, adjust the corresponding local time window in combination with the multi-scale features, perform incremental aggregation calculation according to the adjusted local time window, and obtain a local calculation result; The third unit is used to summarize the node receiving the local calculation results and the multi-scale features corresponding to the standard data blocks, determine the correlation of the standard data blocks at different scales according to the preset correlation analysis rules and construct a multi-scale data block correlation graph, determine the optimal analysis granularity combination based on the multi-scale data block correlation graph, divide the standard data blocks in the optimal analysis granularity combination into multiple correlation clusters and perform fusion analysis to obtain a comprehensive analysis result, and adaptively integrate the comprehensive analysis result to obtain a multi-dimensional correlation analysis result.
6. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 4.
7. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.
