A sequence matching method based on adaptive data digest

CN117633211BActive Publication Date: 2026-10-27HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311583866.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2026-10-27
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

[0006]本发明的目的是为解决采用现有方法计算出的摘要有效性差以及计算出的摘要难以应用于序列匹配的问题,而提出了一种基于自适应数据摘要的序列匹配方法

Benefits of technology

[0054]本发明提出的摘要计算方法为UCR Archive上包含至少200个序列且序列长度大于等于128的83个真实数据集生成摘要,应用本发明的摘要方法,在数据集都已经进行z-score标准化的基础上,通过TLB测量的下界平均改进率为20.4%,证明了采用本发明方法计算出的摘要的强有效性。其中,自适应元素重排列方法仅耗时3.36~9.34s就可对UCRArchive中的所有数据集进行列置换。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117633211B_ABST
    Figure CN117633211B_ABST
Patent Text Reader

Abstract

The application discloses a sequence matching method based on adaptive data abstract, and belongs to the technical field of time sequence data matching. The application solves the problems of poor abstract effectiveness and difficulty in application to sequence matching caused by the existing method. The method comprises the following steps: step one, reading a time sequence data set, and initializing a segmentation scheme and a root node; step two, inserting a time sequence into a leaf node; step three, generating a new segmentation scheme according to the initial segmentation scheme and the time sequence data inserted into the leaf node; step four, generating an abstract of the time sequence corresponding to the leaf node according to the segmentation result of the new scheme and discretizing the abstract; step five, judging whether there is a leaf node with the number of inserted time sequences exceeding a threshold value, if yes, executing step six, and if not, executing step seven; step six, splitting the leaf node; and step seven, performing recursive search from the root node of the index binary tree to complete sequence matching. The application can be applied to time sequence matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of time series data matching technology, specifically relating to a sequence matching method based on adaptive data summarization. Background Technology

[0002] Time series data (hereinafter referred to as time series data) is a collection of data arranged in a certain chronological order, typically used to analyze time-related phenomena and trends. It can be one-dimensional or multi-dimensional data. Analyzing time series data can help us reveal patterns, trends, and periodicities within the data. Through the analysis and modeling of time series data, we can extract useful information, make reasonable decisions and predictions, and provide better solutions and decision support for various industries.

[0003] Sequence matching algorithms have wide applications in pattern discovery, anomaly detection, and financial analysis (Cai Z, He Z. Trading Private Range Counting over Big IoT Data [C] / / 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS). IEEE, 2019. DOI:10.1109 / ICDCS.2019.00023.). Sequence matching can identify similar data sets, allowing for further analysis and research. Time series data summarization methods are also widely used in sequence matching problems. Since sequences are often too long to be effectively indexed directly using traditional data structures, all state-of-the-art algorithms utilize summarization methods to compress sequences and rely on the lower bound property of the summarization to perform queries.

[0004] Several sequence data summarization methods exist, including Discrete Fourier Transform (Chan K, FuW. Efficient time series matching by wavelets[C] / / Proceedings 15th International Conference on Data Engineering(Cat.No.99CB36337).IEEE,1999.DOI:10.1109 / ICDE.1999.754915.), Piecewise Aggregation Approximation (Keogh E, Chakrabarti K, Pazzani M, et al. Dimensionality Reduction for Fast Similarity Search in Large Time Series Databases[J].Knowledge and Information Systems,2001,3(3):263-286.DOI:10.1007 / PL00011669.), Discrete Cosine Transform (Korn F, Jagadish HV, Faloutsos C. Efficiently supporting ad hoc queries in large datasets of time sequences[J].ACM SIGMODRecord, 1997.DOI:10.1145 / 253262.253332.), Extended segmentation constant approximation (Wang Y, Wang P, Pei J, et al. A data-adaptive and dynamic segmentation index for whole matching ontime series[J]. Proceedings of the Vldb Endowment, 2013, 6(10):793-804.DOI:10.14778 / 2536206.2536208.), Segmentation constant approximation (Keogh E, Chakrabarti K, Pazzani M, et al. Locally Adaptive Dimensionality Reduction for Indexing Large Time Series Databases[J]. Proc.ofAcmSigmod Intl Conf.on Management of Data, 2001.DOI:10.1145 / 375663.375680.), etc.Experimental results show that the effectiveness of these summarizing methods did not exhibit significant differences. Among them, the summarizing calculation process of the Discrete Fourier Transform, Piecewise Aggregation Approximation, and Discrete Cosine Transform methods is completely independent of the data distribution of the sequence set. For example, the traditional Piecewise Aggregation Approximation method uniformly divides the sequence into equal-length segments and uses the mean of these segments as the summarizing result. In this partitioning process, the Piecewise Aggregation Approximation method does not fully consider the characteristics of the time-series data itself, leading to low data summarizing effectiveness in some cases. While the Extended Piecewise Constant Approximation method considers the data distribution during index construction, this does not improve the effectiveness of the data summarizing itself. Although the Piecewise Constant Approximation method attempts to utilize the characteristics of the sequence data, it requires providing a different segmentation scheme for each sequence; that is, for each sequence in the dataset, the Piecewise Constant Approximation method uses a different data dimensionality reduction method. This leads to two problems: First, the piecewise constant approximation method requires a large amount of additional information to record the unique summary calculation method for each sequence, which seriously affects the summary effectiveness of the piecewise constant approximation method. In fact, the effectiveness of the piecewise constant approximation method as a summary method is almost the same as that of methods that do not consider data features at all. Second, the data summary generated by the piecewise constant approximation method cannot effectively provide a low-dimensional space that can be used for searching, so it is difficult to apply it to sequence matching.

[0005] In summary, the summaries calculated using existing methods have poor effectiveness and are difficult to apply to sequence matching. Therefore, it is essential to propose a new summary calculation method. Summary of the Invention

[0006] The purpose of this invention is to solve the problems of poor effectiveness of summaries calculated using existing methods and the difficulty in applying the calculated summaries to sequence matching, and to propose a sequence matching method based on adaptive data summarization.

[0007] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0008] A sequence matching method based on adaptive data summarization, the method specifically includes the following steps:

[0009] Step 1: Read the time series dataset Where n is the number of time series, and m is the length of each time series. It is a real number;

[0010] Set the number of segments to be divided for each sequence of data to K, and initialize the segmentation scheme and the root node of the index binary tree;

[0011] Step 2: Insert the time series data in the time series dataset TS into the corresponding leaf nodes in sequence, and store the inserted time series data into the disk block corresponding to the leaf node;

[0012] Step 3: Generate a new segmentation scheme based on the initial segmentation scheme and all time series data with inserted leaf nodes; then segment all time series data with inserted leaf nodes according to the new segmentation scheme.

[0013] Step 4: Generate a summary for each time series corresponding to the leaf nodes based on the segmentation results in Step 3, then discretize the generated summaries; and place the discretized summaries in the summary table.

[0014] Step 5: Determine if there are any leaf nodes where the number of inserted time series exceeds the threshold. If so, proceed to Step 6; otherwise, proceed to Step 7.

[0015] Step 6: For a leaf node whose number of inserted time series exceeds the threshold, split the leaf node into a left node and a right node, and evenly distribute the time series inserted into the leaf node into the left node and the right node. Use the left node and the right node obtained after the split as the new leaf node.

[0016] Then return to step three for the new leaf node;

[0017] Step 7: Perform a recursive search from the root node of the indexed binary tree. During the search, calculate the lower bound of the distance between the subtree rooted at each intermediate node and the query sequence based on the digest.

[0018] The query sequence is time-series data measured by a motion sensor;

[0019] If the lower bound of the distance between the subtree rooted at a certain intermediate node and the query sequence is greater than the threshold, then the subtree rooted at that intermediate node is pruned.

[0020] If the lower bound of the distance between the subtree rooted at a certain intermediate node and the query sequence is less than or equal to the threshold, then the time series stored at that intermediate node is read, and then the read time series and the query sequence are matched to obtain the sequence that matches the query sequence.

[0021] Furthermore, the leaf nodes in step two are obtained by performing a preorder traversal of the indexed binary tree.

[0022] Furthermore, the specific process of step three is as follows:

[0023] Step 3: 1. Generate a preliminary segmentation scheme based on the initial segmentation scheme and the dynamic programming method;

[0024] Step 3.2: Divide the time series data inserted into the leaf nodes according to the preliminary segmentation scheme to obtain the initial segmentation results; then adjust the initial segmentation results using the column permutation method.

[0025] The adjustment of the initial partitioning result specifically involves: performing column permutation on the data in different segments of the initial partitioning result;

[0026] The process continues until no column replacement scheme meets the conditions, at which point the final segmentation result is obtained.

[0027] Furthermore, the preliminary segmentation scheme in step three-one is as follows:

[0028] Using dynamic programming, the segmentation scheme with the smallest total variance weighted sum is selected from all the segmentation schemes in the dynamic programming method, and the selected scheme is then used as the initial segmentation scheme.

[0029] Furthermore, the condition in step three is: the difference between the validity function value of the current leaf node after column permutation and the validity function value of the current leaf node before column permutation is greater than 0.

[0030] Furthermore, the validity function is:

[0031]

[0032]

[0033] Where I(TS′,seg) is the validity function value of the current leaf node, TS′ is the set of time series inserted into the current leaf node, and I(X,seg) is the validity function value of time series X. i It is the length of the i-th segment of the time series, 1≤i≤K;

[0034] intermediate variable σ X and for:

[0035]

[0036]

[0037] Where, x k It is the k-th element in the time series X. It is the mean of the elements in the time series X, x ij It is the j-th element in the i-th segment of time series X. It is the mean of the elements in the i-th segment, 1≤k≤m, 1≤j≤l i .

[0038] Furthermore, the difference between the validity function value of the current leaf node after the column permutation and the validity function value of the current leaf node before the column permutation is:

[0039]

[0040] Among them, I(π (j) (TS), seg (j) )-I(π (j-1) (TS), seg (j-1) ) is the difference in the validity function value of the current leaf node before and after the column permutation, l i′ Let v[j][i] represent the length of the i-th segment, v[j][i] be the sum of squares of the differences between each time series data point in the i-th segment and the segment mean, and v[j][i′] be the sum of squares of the differences between each time series data point in the i′-th segment and the segment mean.

[0041] Furthermore, in step four, the FPAA method is used to generate the digest, specifically as follows:

[0042]

[0043] Where FPAA(X,seg) represents the summary generated for time series X using the FPAA method, and t is a constant. σ′ is the mean of the i-th segment in the time series X. i σ′ represents the standard deviation of the i-th segment in a time series X. i The specific calculation formula is as follows:

[0044]

[0045] Where, σ j′ It is the standard deviation of the j′-th segment, l j′ It is the length of the j′-th segment, a i The specific formula is:

[0046] For 1≤i≤t:

[0047] a i =i*[K / t]

[0048] [] indicates rounding down.

[0049] Furthermore, the discretization of the generated summary specifically involves:

[0050] By introducing a character table and setting a corresponding data value field for each character, the generated summary can be replaced with different characters.

[0051] Furthermore, the step of evenly distributing the time series inserted into the leaf node to the left and right nodes specifically involves:

[0052] For any given segment, calculate the mean of each time series in that segment for all time series inserted into that leaf node. Then sort the calculated means in ascending order and assign the time series corresponding to the top 50% of the means to the left node, and assign the remaining time series to the right node.

[0053] The beneficial effects of this invention are:

[0054] The proposed abstract calculation method generates abstracts from 83 real datasets on the UCR Archive containing at least 200 sequences with a sequence length greater than or equal to 128. Applying this method, and assuming all datasets have undergone z-score normalization, the average improvement rate measured by TLB is 20.4%, demonstrating the strong effectiveness of the abstracts calculated using this method. Furthermore, the adaptive element rearrangement method can perform column permutations on all datasets in UCRArchive in just 3.36–9.34 seconds.

[0055] In addition, the method of this invention generates summaries for the IRIS, KITSUNE, ANN, and RANDOM WALK datasets, and performs sequence matching queries based on the generated summaries. This reduces the leaf node reading by an average of 23.1% compared to applying the original Hercules sequence matching algorithm, thereby saving I / O time and CPU time, and reducing the overall time consumption by an average of 21.2%. Attached Figure Description

[0056] Figure 1 This is a flowchart of the method of the present invention;

[0057] Figure 2 A flowchart of the adaptive sequence segmentation algorithm;

[0058] Figure 3 A flowchart for an adaptive element rearrangement method;

[0059] Figure 4 The flowchart shows the adaptive summarization algorithm for leaf nodes. Detailed Implementation

[0060] Specific implementation method one: Combining Figure 1 and Figure 4 This embodiment describes a sequence matching method based on adaptive data digests, which specifically includes the following steps:

[0061] Step 1: Read the time series dataset Where n is the number of time series, and m is the length of each time series. It is a real number;

[0062] Set the number of segments to be divided for each sequence of data to K, and initialize the segmentation scheme and the root node of the index binary tree;

[0063] Step 2: Insert the time series data in the time series dataset TS into the corresponding leaf nodes in sequence (at this time, the leaf node is the root node, and all the time series data in the time series dataset TS is inserted into the root node), and store the inserted time series data in the disk block corresponding to the leaf node.

[0064] Step 3: Generate a new segmentation scheme based on the initial segmentation scheme and all time series data with inserted leaf nodes; then segment all time series data with inserted leaf nodes according to the new segmentation scheme.

[0065] Step 4: Generate a summary for each time series corresponding to the leaf node based on the segmentation results in Step 3, and then discretize the generated summary; place the discretized summary in the summary table (the summary generated based on the mean is placed in memory address from high to low, and the summary generated based on the standard deviation is placed in memory address from low to high, and the summary table is initialized to empty before placement).

[0066] Step 5: Determine if there are any leaf nodes where the number of inserted time series exceeds the threshold. If so, proceed to Step 6; otherwise, proceed to Step 7.

[0067] Step 6: For a leaf node whose number of inserted time series exceeds the threshold (twice the expected value), split the leaf node into a left node and a right node, and distribute the time series inserted into the leaf node evenly into the left and right nodes. The left and right nodes obtained after the split are used as new leaf nodes.

[0068] Then return to step three for the new leaf node;

[0069] Step 7: Perform a recursive search from the root node of the indexed binary tree. During the search, calculate the lower bound of the distance between the subtree rooted at each intermediate node and the query sequence based on the digest.

[0070] That is, for an intermediate node, calculate the lower bound of the distance between the subtree rooted at the intermediate node and the query sequence based on the summary of the time series inserted into the intermediate node;

[0071] The query sequence is time-series data measured by a motion sensor, which can be data on acceleration changes over time.

[0072] If the lower bound of the distance between the subtree rooted at a certain intermediate node and the query sequence is greater than the threshold, then the subtree rooted at that intermediate node is pruned.

[0073] If the lower bound of the distance between the subtree rooted at a certain intermediate node and the query sequence is less than or equal to the threshold, then the time series stored at that intermediate node is read, and then the read time series and the query sequence are matched to obtain the sequence that matches the query sequence.

[0074] This invention employs an adaptive data summarization algorithm applied to a sequence matching algorithm, preserving the binary tree index structure to achieve accurate and efficient sequence matching of time series datasets. The sequence matching method of this invention can extract motion sensor-measured data from the original time series dataset TS, and then analyze and study the query sequence and the obtained matching sequence together.

[0075] Traditional data indexing algorithms use binary tree structures to organize sequences in a dataset, where each sequence is inserted into a leaf node containing at most φ sequences according to a certain strategy. A summary is calculated for each sequence under each node. To ensure the data structure supports dynamic insertion, space must be reserved for unfilled leaf nodes, resulting in wasted storage space. However, by using the data adaptive summarization algorithm, FPAA method, and summary placement method proposed in this invention to replace the traditional method, the utilization rate of free space can be improved.

[0076] Specific Implementation Method Two: This implementation method differs from Specific Implementation Method One in that the leaf nodes in step two are obtained by performing a preorder traversal of the indexed binary tree.

[0077] The other steps and parameters are the same as in Specific Implementation Method 1.

[0078] Specific implementation method three: Combining Figure 2 and Figure 3 This embodiment is described below. The difference between this embodiment and specific embodiments one or two is that the specific process of step three is as follows:

[0079] Step 3: 1. Generate a preliminary segmentation scheme based on the initial segmentation scheme and the dynamic programming method;

[0080] Step 3.2: Divide the time series data inserted into the leaf nodes according to the preliminary segmentation scheme to obtain the initial segmentation results; then adjust the initial segmentation results using the column permutation method.

[0081] The adjustment of the initial partitioning result specifically involves: performing column permutation on the data in different segments of the initial partitioning result;

[0082] The process continues until no column replacement scheme meets the conditions, at which point the final segmentation result is obtained.

[0083] Other steps and parameters are the same as in specific implementation method one or two.

[0084] The method in step 31 of this embodiment is called the adaptive sequence segmentation algorithm. The method in step 32 of this embodiment is called the adaptive element rearrangement method.

[0085] Specific Implementation Method Four: This implementation method differs from Specific Implementation Methods One to Three in that the preliminary segmentation scheme in step three-one is as follows:

[0086] Using dynamic programming, we select the piecewise scheme with the smallest total variance weighted sum from all possible piecewise schemes (that is, the piecewise scheme that optimizes the objective function), and then use the selected scheme as the initial piecewise scheme.

[0087] The other steps and parameters are the same as those in one of the specific implementation methods one to three.

[0088] For any segmentation scheme, the weighted sum of the total variance is calculated as follows:

[0089] According to this segmentation scheme, a time series data is segmented, and the obtained segments are respectively denoted as segment 1, segment 2, ..., segment K;

[0090] Let the mean of the data in the first segment be x1. Calculate the variance of each data point in the first segment based on x1. Then, perform a weighted summation of the variances of each data point in the first segment (the weights can be set according to the actual situation) to obtain the weighted sum of the variances of the first segment.

[0091] Similarly, the variance-weighted sums for the 2nd, 3rd, ..., Kth segments are obtained respectively;

[0092] Then, sum the weighted variances of each segment of the entire time series data to obtain the total weighted variance.

[0093] Specific Implementation Method 5: This implementation method differs from Specific Implementation Methods 1 to 4 in that the condition in step 32 is: the difference between the validity function value of the current leaf node after column permutation and the validity function value of the current leaf node before column permutation is greater than 0.

[0094] The other steps and parameters are the same as those in one of the specific implementation methods one to four.

[0095] Specific Implementation Method Six: This implementation method differs from Specific Implementation Methods One to Five in that the effectiveness function is (that is, the original variance of the sequence minus the aforementioned weighted sum of total variances):

[0096]

[0097]

[0098] Where I(TS′,seg) is the validity function value of the current leaf node, TS′ is the set of time series inserted into the current leaf node, and I(X,seg) is the validity function value of time series X. i It is the length of the i-th segment of the time series, 1≤i≤K;

[0099] intermediate variable σ X and for:

[0100]

[0101]

[0102] Where, x k It is the k-th element in the time series X. It is the mean of the elements in the time series X, x ij It is the j-th element in the i-th segment of time series X. It is the mean of the elements in the i-th segment, 1≤k≤m, 1≤j≤l i .

[0103] The other steps and parameters are the same as those in one of the specific implementation methods one to five.

[0104] Specific Implementation Method Seven: This implementation method differs from Specific Implementation Methods One through Six in that the difference between the validity function value of the current leaf node after the column permutation and the validity function value of the current leaf node before the column permutation is:

[0105]

[0106] Among them, I(π (j) (TS), seg (j) )-I(π (j-1) (TS), seg (j-1) ) is the difference in the validity function value of the current leaf node before and after the column permutation, l i′ Let v[j][i] represent the length of the i-th segment, v[j][i] be the sum of squares of the differences between each time series data point in the i-th segment and the segment mean, and v[j][i′] be the sum of squares of the differences between each time series data point in the i′-th segment and the segment mean.

[0107] The other steps and parameters are the same as those in one of the specific implementation methods one to six.

[0108] The specific formula for the sum of squares of the differences between each time series data point and the segment mean is as follows:

[0109]

[0110] Where v[j][i] represents the sum of squares of the differences between the j-th time series data in the i-th segment and the segment mean in all sequences of dataset TS, μ[q][i] represents the mean of the i-th segment in the q-th sequence of dataset TS, TS[q][j] represents the value of the j-th time series data in the i-th segment of the q-th sequence, 1≤i≤K, 1≤q≤n.

[0111] Specific Implementation Method Eight: This implementation method differs from Specific Implementation Methods One through Seven in that, in step four, the summary generation uses the FPAA (flexible piecewise aggregate approximation) method, specifically as follows:

[0112]

[0113] Wherein, FPAA(X,seg) represents the summary generated for the time series X using the FPAA method, seg represents the final segmentation scheme obtained in step three, and t is a constant value, t∈{1,2,…,K}. σ′ is the mean of the i-th segment in the time series X. i σ′ represents the standard deviation of the i-th segment in a time series X. i The specific calculation formula is as follows:

[0114]

[0115] Where, σ j′ It is the standard deviation of the j′-th segment, l j′ It is the length of the j′-th segment, a i The specific formula is:

[0116] For 1≤i≤t:

[0117] a i =i*[K / t]

[0118] Here, [] represents rounding down. Specifically, a0 = 0, a t =K;

[0119] K coefficients are used to record the mean of each time series after column permutation, and t coefficients are used to record the standard deviation of the series.

[0120] The other steps and parameters are the same as those in any of the specific implementation methods one to seven.

[0121] Placing the summary in the data summary table means that the K coefficients representing the mean are placed in the data summary table in descending order of memory address, and the t coefficients representing the standard deviation are placed at the other end of the data summary table in ascending order of memory address. If the amount of sequence data stored in the leaf node is small, all K+t coefficients of the sequences contained in the leaf node can be stored in the data summary table of the leaf node. If the amount of sequence data stored is large, only the K coefficients representing the mean are inserted into the summary table, while the t coefficients representing the standard deviation are overwritten and become invalid.

[0122] Specific Implementation Method Nine: This implementation method differs from Specific Implementation Methods One through Eight in that the discretization of the generated summary is specifically as follows:

[0123] By introducing a character table and setting a corresponding data value field for each character, the generated summary can be replaced with different characters.

[0124] The other steps and parameters are the same as those in one of the specific implementation methods one to eight.

[0125] Specific Implementation Method Ten: This implementation method differs from Specific Implementation Methods One to Nine in that the time series inserted into the leaf node is evenly distributed between the left and right nodes, specifically as follows:

[0126] For any given segment, calculate the mean of each time series in that segment for all time series inserted into that leaf node. Then sort the calculated means in ascending order and assign the time series corresponding to the top 50% of the means to the left node, and assign the remaining time series to the right node.

[0127] The other steps and parameters are the same as those in any of the specific implementation methods one to nine.

[0128] The above examples of the present invention are merely illustrative of the computational model and process of the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A sequence matching method based on adaptive data summarization, characterized in that, The method specifically includes the following steps: Step 1: Read the time series dataset ,in, It is the number of time series. It is the length of each time series. It is a real number; Set the number of segments to be divided for each sequence of data to K, and initialize the segmentation scheme and the root node of the index binary tree; Step 2: Insert the time series data in the time series dataset TS into the corresponding leaf nodes in sequence, and store the inserted time series data into the disk block corresponding to the leaf node; Step 3: Generate a new segmentation scheme based on the initial segmentation scheme and all time series data with inserted leaf nodes; then segment all time series data with inserted leaf nodes according to the new segmentation scheme. The specific process of step three is as follows: Step 3:

1. Generate a preliminary segmentation scheme based on the initial segmentation scheme and the dynamic programming method; Step 3.2: Divide the time series data inserted into the leaf nodes according to the preliminary segmentation scheme to obtain the initial segmentation results; then adjust the initial segmentation results using the column permutation method. The adjustment of the initial partitioning result specifically involves: performing column permutation on the data in different segments of the initial partitioning result; The process continues until no column replacement scheme meets the conditions, at which point the final segmentation result is obtained. The conditions are: the difference between the validity function value of the current leaf node after column replacement and the validity function value of the current leaf node before column replacement is greater than 0. The validity function is: in, It is the validity function value of the current leaf node. It is the collection of time series inserted into the current leaf node. It is a time series The validity function value, It is the length of the i-th segment of the time series, 1≤i≤K; intermediate variables and for: in, It is a time series The k-th element in It is the mean of the elements in the time series X. It is the j-th element in the i-th segment of time series X. It is the mean of the elements in the i-th segment, 1≤k≤m, 1≤j≤ ; The difference between the validity function value of the current leaf node after the column permutation and the validity function value of the current leaf node before the column permutation is: in, It is the difference in the validity function value of the current leaf node before and after the column permutation. Indicates the first The length of each segment It is the sum of squares of the differences between each time series data point in the i-th segment and the segment mean. It is the first The sum of squares of the differences between each time series data point on each segment and the segment mean; Step 4: Generate a summary for each time series corresponding to the leaf nodes based on the segmentation results in Step 3, then discretize the generated summaries; and place the discretized summaries in the summary table. The abstract generation uses the FPAA method, specifically: in, This represents the summary generated for time series X using the FPAA method, where t is a constant. It is the mean of the i-th segment in the time series X. This represents information about the standard deviation of the i-th segment in a time series X. The specific calculation formula is as follows: in, It is the first The standard deviation of each segment It is the first The length of each segment The specific formula is: for : in, It rounds down; Step 5: Determine if there are any leaf nodes where the number of inserted time series exceeds the threshold. If so, proceed to Step 6; otherwise, proceed to Step 7. Step 6: For a leaf node whose number of inserted time series exceeds the threshold, split the leaf node into a left node and a right node, and evenly distribute the time series inserted into the leaf node into the left node and the right node. Use the left node and the right node obtained after the split as the new leaf node. Then return to step three for the new leaf node; Step 7: Perform a recursive search from the root node of the indexed binary tree. During the search, calculate the lower bound of the distance between the subtree rooted at each intermediate node and the query sequence based on the digest. The query sequence is time-series data measured by a motion sensor; If the lower bound of the distance between the subtree rooted at a certain intermediate node and the query sequence is greater than the threshold, then the subtree rooted at that intermediate node is pruned. If the lower bound of the distance between the subtree rooted at a certain intermediate node and the query sequence is less than or equal to the threshold, then the time series stored at that intermediate node is read, and then the read time series and the query sequence are matched to obtain the sequence that matches the query sequence.

2. The sequence matching method based on adaptive data digest according to claim 1, characterized in that, The leaf nodes in step two are obtained by performing a preorder traversal of the indexed binary tree.

3. The sequence matching method based on adaptive data summarization according to claim 2, characterized in that, The preliminary segmentation scheme in step 31 is as follows: Using dynamic programming, the segmentation scheme with the smallest total variance weighted sum is selected from all the segmentation schemes in the dynamic programming method, and the selected scheme is then used as the initial segmentation scheme.

4. The sequence matching method based on adaptive data summarization according to claim 3, characterized in that, The discretization of the generated summary is specifically as follows: By introducing a character table and setting a corresponding data value field for each character, the generated summary can be replaced with different characters.

5. The sequence matching method based on adaptive data summarization according to claim 4, characterized in that, The step of evenly distributing the time series inserted into the leaf node to the left and right nodes is as follows: For any given segment, calculate the mean of each time series in that segment for all time series inserted into that leaf node. Then sort the calculated means in ascending order. Assign the time series corresponding to the top 50% of the means to the left node and the remaining time series to the right node.

Citation Information

Patent Citations

  • Fast indexing method and system based on position top-k keyword in sliding window

    CN107633068A

  • A system for real time near-duplicate video detection

    WO2010078629A1