Wavelet analysis method, system and storage medium based on wavelet change point detection
Through the wavelet analysis method based on wavelet change point detection, the optimal number of decomposition layers and the optimal wavelet function are optimized, which solves the problems of large calculation amount and low efficiency in the existing technology, and improves the accuracy and efficiency of wavelet transform analysis.
Patent Information
- Application Number
- CN202311661213.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2043-12-05
AI Technical Summary
When filtering wavelet functions and decomposition layers, existing wavelet analysis methods need to enumerate various combinations and calculate information entropy and signal-to-noise ratio, resulting in large calculation amounts, low efficiency, and doubts about the reliability and accuracy of the analysis results.
A wavelet analysis method based on wavelet change point detection is proposed. By obtaining the sequence to be analyzed and multiple candidate wavelet functions, wavelet change point detection and consistency testing are performed, and the optimal number of decomposition layers and optimal wavelet functions are selected to reduce screening. steps and calculations.
It improves the level of wavelet transform analysis, reduces calculation steps and time, improves efficiency, and can quickly screen out wavelet functions and decomposition layers that conform to the characteristics of the sequence itself, enhancing the reliability and accuracy of the analysis results.
Smart Images

Figure CN117851734B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wavelet analysis technology, and in particular to a wavelet analysis method, system and storage medium based on wavelet change point detection. Background Art
[0002] Since it was proposed in the 1980s, wavelet transform (also known as wavelet analysis) has become one of the important tools for studying the evolution laws of sequence cycles, trends, mutations, etc., as well as realizing sequence prediction through decomposition and reconstruction in natural science and engineering technology fields such as medicine, physics, economics, and telecommunications information science. The essence of wavelet transform is to reveal the similarity between the sequence to be analyzed and the selected wavelet function (Mother Wavelet, also known as Lingbo function, wavelet basis function, wavelet mother function). The number of wavelet decomposition levels (Wavelet Decomposition Level, also known as wavelet decomposition level) determines the precision of the wavelet transform processing sequence. Therefore, wavelet function and wavelet decomposition level are two key parameters that affect the accuracy and reliability of wavelet transform analysis results. However, there are 16 commonly used wavelet systems (about 95 wavelet functions) and the number of wavelet decomposition levels is between 2 and 20.
[0003] The single wavelet function or wavelet decomposition layer screening method requires fixing another parameter and can only screen out the optimal parameters for a certain scenario. It does not necessarily match the characteristics of the sequence to be analyzed, and the reliability and accuracy of the analysis results are questionable.
[0004] However, the existing wavelet function comprehensive optimization methods often need to enumerate various combinations of wavelet functions and wavelet decomposition layers. On this basis, it is necessary to further extract the information entropy of the characteristic parameters of the analysis results (wavelet coefficients, approximate coefficients or decomposition coefficients, etc.). The signal-to-noise ratio calculation is large, the screening efficiency is low, and the workload is large. Summary of the invention
[0005] In order to solve at least one technical problem existing in the above-mentioned related technologies, the embodiments of the present application propose a wavelet analysis method, system and storage medium based on wavelet change point detection, aiming to improve the level of wavelet transform analysis, reduce the steps of screening wavelet functions, reduce the amount of calculation and improve efficiency.
[0006] The first aspect of the embodiment of the present application proposes a wavelet analysis method based on wavelet change point detection, comprising:
[0007] Obtaining a sequence to be analyzed and a plurality of first candidate wavelet functions;
[0008] One of the first candidate wavelet functions is selected as a preliminary wavelet function, and according to the preliminary decomposition number and the sequence to be analyzed, the preliminary wavelet function is used to perform wavelet change point detection to determine the optimal decomposition number and the corresponding multiple first sequence change points; the preliminary decomposition number is the decomposition number of the preliminary wavelet function;
[0009] Using a change point detection method, according to the sequence to be analyzed, using the change point detection method to determine a plurality of second sequence change points;
[0010] According to the sequence to be analyzed and the optimal decomposition level, using a plurality of the first candidate wavelet functions to perform wavelet change point detection, and determining a first candidate sequence change point set corresponding to each of the first candidate wavelet functions;
[0011] Performing a wavelet change point consistency check according to the plurality of second sequence change points and the first candidate sequence change point sets corresponding to the first candidate wavelet functions to determine a sequence change point set and a consistent sequence change point set;
[0012] Determine a change point recognition result of each of the first candidate wavelet functions according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each of the first candidate wavelet functions;
[0013] According to the change point recognition results of each of the first candidate wavelet functions, an optimal wavelet function is determined from a plurality of the first candidate wavelet functions, and wavelet analysis is performed using the optimal wavelet function and the optimal number of decomposition levels.
[0014] In some embodiments, the change point detection method includes a graphical method, a parametric method, and a non-parametric method. The step of performing a wavelet change point consistency check based on the plurality of second sequence change points and the first candidate sequence change point set corresponding to each of the first candidate wavelet functions to determine the sequence change point set and the consistent sequence change point set specifically includes:
[0015] Constructing a first change point set according to the first candidate sequence change point sets corresponding to the first candidate wavelet functions; the first change point set is the union of the first candidate sequence change point sets corresponding to the first candidate wavelet functions;
[0016] Constructing a second change point set according to the plurality of change points of the second sequence;
[0017] Deduplication of change points is performed according to the first change point set and the second change point set to obtain the serialized change point set;
[0018] According to the serialized change point set, a sequence consistency verification method is used to calculate the consistency of the sequences before and after the change points in the serialized change point set, identify multiple sequence consistency change points, and construct the consistent sequence change point set based on the multiple sequence consistency change points.
[0019] In some embodiments, the step of selecting one of the first candidate wavelet functions as a preliminary wavelet function, performing wavelet change point detection using the preliminary wavelet function according to the preliminary decomposition level and the sequence to be analyzed, and determining the optimal decomposition level and the corresponding multiple first sequence change points specifically includes:
[0020] Initially selecting the number of primary decomposition levels as a given threshold, and increasing the number of primary decomposition levels;
[0021] For the adjacent first decomposition level and second decomposition level, based on the first decomposition level and the sequence to be analyzed, the preliminary wavelet function is used to perform wavelet change point detection to determine a plurality of first preliminary sequence change points, and based on the second decomposition level and the sequence to be analyzed, the preliminary wavelet function is used to perform wavelet change point detection to determine a plurality of second preliminary sequence change points; the first decomposition level is the preliminary decomposition level before each increment; the second decomposition level is the preliminary decomposition level after the first decomposition level is incremented;
[0022] Determine a first set of preliminary selected change points according to the first preliminary selected sequence change points, and determine a second set of preliminary selected change points according to the second preliminary selected sequence change points;
[0023] Check the first preliminary change point set and the second preliminary change point set. When the first preliminary change point set is the same as the second preliminary change point set, determine the first decomposition level as the optimal decomposition level, determine multiple first preliminary sequence change points as the first sequence change points, and stop increasing the preliminary decomposition level. Otherwise, continue to increase the preliminary decomposition level.
[0024] In some embodiments, the step of determining the change point recognition result of each of the first candidate wavelet functions according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each of the first candidate wavelet functions specifically includes:
[0025] Perform change point identification on the first candidate sequence change point set corresponding to each of the first candidate wavelet functions and the sequence change point set, screen out multiple first sequence consistent change points of each of the first candidate wavelet functions, and construct a second candidate sequence change point set corresponding to each of the first candidate wavelet functions; the first sequence consistent change point is the same change point in the first candidate sequence change point set corresponding to each of the first candidate wavelet functions and the sequence change point set;
[0026] According to the second candidate sequence change point set corresponding to each of the first candidate wavelet functions and the consistent sequence change point set, the second sequence consistent change points are marked to determine the change point recognition results of each of the first candidate wavelet functions; the second sequence consistent change points are the same change points in the second candidate sequence change point set corresponding to each of the first candidate wavelet functions and the consistent sequence change point set.
[0027] In some embodiments, the step of determining an optimal wavelet function from a plurality of the first candidate wavelet functions according to the change point recognition results of each of the first candidate wavelet functions, and performing wavelet analysis using the optimal wavelet function and the optimal number of decomposition levels specifically includes:
[0028] When the change point recognition result is that all the change points in the second candidate sequence change point set are marked as the second sequence consistency change points, determining the first candidate wavelet function corresponding to the change point recognition result as the second candidate wavelet function, and determining the number of the second candidate wavelet functions;
[0029] When the number of the second candidate wavelet function is one, determining the second candidate wavelet function as the optimal wavelet function;
[0030] When the number of the second candidate wavelet functions is greater than one, wavelet change point detection is performed using multiple second candidate wavelet functions according to the optimal decomposition level, the sequence to be analyzed and the sequence change point set, and the change point test results of each second candidate wavelet function are obtained. According to the change point test results of each second candidate wavelet function, the optimal wavelet function is determined from the multiple second candidate wavelet functions.
[0031] In some embodiments, when the number of the second candidate wavelet functions is greater than one, performing wavelet change point detection using multiple second candidate wavelet functions according to the optimal decomposition level, the sequence to be analyzed and the sequence change point set, obtaining change point test results of each second candidate wavelet function, and determining the optimal wavelet function from multiple second candidate wavelet functions according to the change point test results of each second candidate wavelet function specifically includes:
[0032] According to the optimal decomposition level, the sequence to be analyzed and the sequence change point set, using a plurality of the second candidate wavelet functions to perform wavelet change point detection, and obtaining change point test results of each of the second candidate wavelet functions;
[0033] Calculating the change point detection stability rate of each of the second candidate wavelet functions according to the change point test results of each of the second candidate wavelet functions;
[0034] According to the change point detection stability rate of each of the second candidate wavelet functions, the optimal wavelet function is determined from multiple second candidate wavelet functions, and wavelet analysis is performed using the optimal wavelet function and the optimal decomposition level.
[0035] In some embodiments, the step of performing wavelet change point detection using a plurality of second candidate wavelet functions according to the optimal decomposition level, the sequence to be analyzed and the sequence change point set to obtain a change point test result of each second candidate wavelet function specifically includes:
[0036] Get the given adjustment layer range;
[0037] Adjust the optimal decomposition number of layers within the adjustment number of layers range to obtain multiple adjusted decomposition numbers of layers; the adjusted decomposition number of layers is the decomposition number of layers obtained after adjusting the optimal decomposition number of layers;
[0038] According to the plurality of the adjusted decomposition levels, the sequence to be analyzed and the sequence change point set, a plurality of the second candidate wavelet functions are used to perform wavelet change point detection, and a plurality of change point test sets corresponding to the respective adjusted decomposition levels of the second candidate wavelet functions are obtained;
[0039] The change point test result of each of the second candidate wavelet functions is determined according to the multiple change point test sets of each of the second candidate wavelet functions.
[0040] In some embodiments, the wavelet change point detection is performed using the primary selected wavelet function, which is specifically expressed by the following formula:
[0041]
[0042]
[0043] Among them, X is the sequence to be analyzed, is the J-th order maximum overlapping detail, is the J-th order maximum overlap smoothing; and They are high frequency filter and low frequency filter respectively, and F is the j Circularly shift a unit T×T matrix, is the first decomposition column vector for decomposition level j, matrix F, dimension k, is the second decomposition column vector with respect to decomposition level j, matrix F, and dimension k. “*” represents a conjugate complex number. The sequence X to be analyzed is decomposed into a T-dimensional column vector and Decomposition level j represents the currently selected decomposition level, J is the maximum value that j can take, and represents the maximum decomposition level. is the third decomposition column vector about decomposition level j, which is calculated by the maximum overlap discrete wavelet transform MODWT wavelet coefficients. is the fourth decomposition column vector about decomposition level j, given by τ j+1 Δt and higher dimensional maximum overlap discrete wavelet transform MODWT scaling coefficients, τ j+1 Δt is the decomposition scale closed space, when ‖X‖ 2 When the value of changes, ‖X‖ 2 The sequence points where the value of changes are recorded as change points.
[0044] A second aspect of the embodiment of the present application proposes a wavelet analysis system based on wavelet change point detection, comprising:
[0045] The first module is used to obtain a sequence to be analyzed and a plurality of first candidate wavelet functions;
[0046] The second module is used to select one of the first candidate wavelet functions as a preliminary wavelet function, and perform wavelet change point detection using the preliminary wavelet function according to the preliminary decomposition layer number and the sequence to be analyzed, to determine the optimal decomposition layer number and the corresponding multiple first sequence change points; the preliminary decomposition layer number is the decomposition layer number of the preliminary wavelet function;
[0047] The third module is used to use a change point detection method to determine a plurality of second sequence change points according to the sequence to be analyzed by using the change point detection method;
[0048] A fourth module is used to perform wavelet change point detection using a plurality of the first candidate wavelet functions according to the sequence to be analyzed and the optimal decomposition level, and determine a first candidate sequence change point set corresponding to each of the first candidate wavelet functions;
[0049] A fifth module is used to perform a wavelet change point consistency check based on a plurality of the second sequence change points and the first candidate sequence change point sets corresponding to the first candidate wavelet functions, and determine a sequence change point set and a consistent sequence change point set;
[0050] A sixth module, configured to determine a change point recognition result of each of the first candidate wavelet functions according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each of the first candidate wavelet functions;
[0051] The seventh module is used to determine the optimal wavelet function from multiple first candidate wavelet functions according to the change point recognition results of each of the first candidate wavelet functions, and perform wavelet analysis using the optimal wavelet function and the optimal decomposition level.
[0052] A third aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the wavelet analysis method described in the first aspect is implemented.
[0053] The present application provides a wavelet analysis method, system and storage medium based on wavelet change point detection, which selects a preliminary wavelet function, selects the optimal decomposition layer according to the sequence to be analyzed and the preliminary decomposition layer, selects the optimal wavelet function from multiple candidate wavelet functions according to the sequence to be analyzed through a sequence consistency test method, and uses the optimal decomposition layer and the optimal wavelet function to perform wavelet analysis. The present application is simple and easy to implement, and with the advantages of wavelet change point detection combined with wavelet function and decomposition layer, it can quickly screen out the key parameters that determine the accuracy of wavelet transform, avoiding the tedious work of simultaneously enumerating wavelet function and decomposition layer combination, or synchronously analyzing other characteristic parameters of the sequence to screen out the optimal wavelet function, with fewer calculation steps and high calculation efficiency, and has the ability to screen out wavelet functions and decomposition layers that meet the characteristics of the sequence itself, effectively improving the level of wavelet transform analysis, and providing a good foundation for applying wavelet transform to different fields to carry out sequence evolution law analysis, as well as sequence decomposition, reconstruction and prediction simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of a wavelet analysis method based on wavelet change point detection provided in an embodiment of the present application;
[0055] Figure 2 Schematic diagram of sequence consistency test in the embodiment of the present application;
[0056] Figure 3 It is a schematic diagram of the analysis of the evolution law of the annual average runoff time series of Station A in the embodiment of the present application;
[0057] Figure 4 It is a schematic diagram of the analysis of the evolution law of the annual average runoff time series of Station B in the embodiment of the present application;
[0058] Figure 5 It is a module schematic diagram of a wavelet analysis system based on wavelet change point detection provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0062] Since the wavelet transform (Wavelet Transform, also known as wavelet analysis) was proposed in the 1980s, it has become one of the important tools for studying the evolution laws of sequence cycles, trends, mutations, etc. in natural sciences and engineering technology such as medicine, physics, economics, and telecommunications information science, as well as for realizing sequence prediction through decomposition and reconstruction. The essence of wavelet transform is to reveal the similarity between the sequence to be analyzed and the selected wavelet function (Mother Wavelet, also known as Lingbo function, wavelet basis function, wavelet mother function). The number of wavelet decomposition levels (Wavelet Decomposition Level, also known as wavelet decomposition level) determines the precision of the wavelet transform processing sequence to be analyzed. Therefore, the wavelet function and the number of wavelet decomposition levels are two key parameters that affect the accuracy and reliability of the wavelet transform analysis results. However, there are 16 commonly used wavelet systems (about 95 wavelet functions) and the number of wavelet decomposition levels is between 2 and 20. How to select the wavelet function and the number of decomposition levels that meet the characteristics of the sequence to be analyzed is the key to the accurate and reasonable application of wavelet transform.
[0063] The single wavelet function or wavelet decomposition layer screening method requires fixing another parameter and can only screen out the optimal parameters for a certain scenario. It does not necessarily match the characteristics of the sequence to be analyzed, and the reliability and accuracy of the analysis results are questionable.
[0064] However, the existing wavelet function comprehensive optimization methods often need to enumerate various combinations of wavelet functions and wavelet decomposition layers. On this basis, it is necessary to further extract the information entropy of the characteristic parameters of the analysis results (wavelet coefficients, approximate coefficients or decomposition coefficients, etc.). The signal-to-noise ratio calculation is large, the screening efficiency is low, and the workload is large.
[0065] Based on this, the embodiment of the present application proposes a wavelet analysis method, system and storage medium based on wavelet change point detection, aiming to improve the level of wavelet transform analysis, reduce the steps of screening wavelet functions, reduce the amount of calculation and improve efficiency.
[0066] Reference Figure 1 , Figure 1 This is an optional flow chart of a wavelet analysis method based on wavelet change point detection provided by an embodiment of the present application. The method may include but is not limited to steps S101 to S109:
[0067] Step S101, obtaining a sequence to be analyzed and a plurality of first candidate wavelet functions;
[0068] Step S102, selecting one of the first candidate wavelet functions as the preliminary wavelet function, and performing wavelet change point detection using the preliminary wavelet function according to the preliminary decomposition layer number and the sequence to be analyzed, to determine the optimal decomposition layer number and the corresponding multiple first sequence change points; the preliminary decomposition layer number is the decomposition layer number of the preliminary wavelet function;
[0069] Step S103, using a change point detection method, and determining a plurality of second sequence change points according to the sequence to be analyzed by using the change point detection method;
[0070] Step S104, performing wavelet change point detection using a plurality of first candidate wavelet functions according to the sequence to be analyzed and the optimal decomposition level, and determining a first candidate sequence change point set corresponding to each first candidate wavelet function;
[0071] Step S105, performing a wavelet change point consistency check according to the plurality of second sequence change points and the first candidate sequence change point sets corresponding to the first candidate wavelet functions, and determining a sequence change point set and a consistent sequence change point set;
[0072] Step S106, determining the change point recognition result of each first candidate wavelet function according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each first candidate wavelet function;
[0073] Step S107, determining an optimal wavelet function from a plurality of first candidate wavelet functions according to the change point recognition results of each first candidate wavelet function, and performing wavelet analysis using the optimal wavelet function and the optimal number of decomposition levels.
[0074] In some embodiments, the wavelet function is a wave with a finite length and an average value of 0, which tends to be irregular and asymmetric. There are currently 16 commonly used wavelet functions, and their properties and application ranges are shown in Table 1 below:
[0075] Table 1 Commonly used wavelet functions and their properties and application scope
[0076]
[0077]
[0078] In step S101 of some embodiments, the wavelet function used for wavelet change point detection needs to have biorthogonality, therefore, a wavelet function with biorthogonality is selected from a plurality of commonly used wavelet functions and determined as the first candidate wavelet function. Optionally, the sequence to be analyzed is a time series X(t) of length T.
[0079] In step S102 of some embodiments, a preliminary wavelet function may be selected from a plurality of first candidate wavelet functions according to an empirical or trial-and-error method. The empirical or trial-and-error method is specifically as follows:
[0080] ① Empirical type: directly use the research object or the wavelet function that has a physical formation mechanism similar to the research object and has good results after testing and analysis.
[0081] ② Trial and error type: Based on the line type, mathematical statistics characteristics or discriminant function, the wavelet function that meets the conditions is selected. It can be divided into three types: self-similarity method, mathematical statistics method and discriminant function method.
[0082] a. Self-similarity method, that is, optimization is performed based on the similarity between the sequence waveform to be analyzed and the wavelet function.
[0083] b. Mathematical statistics method, that is, by comparing the mathematical and statistical properties of the sequence to be analyzed with the wavelet function, such as compact support, orthogonality, symmetry, regularity, vanishing moment, etc., the wavelet function is optimized.
[0084] c. Discriminant function method, that is, by constructing specific discriminant conditions or criteria, the wavelet function is optimized; the discriminant conditions or criteria include wavelet coefficients, Euclidean\Mahalanobis\cosine distance, baseband signal, Davidson-Bouldin Index (Davies-Bouldin Index), detrending error index, etc.
[0085] In some embodiments, step S102 may include, but is not limited to, steps S201 to S204:
[0086] Step S201, initially selecting the number of decomposition levels of the primary selection as a given threshold, and increasing the number of decomposition levels of the primary selection;
[0087] Step S202, for the adjacent first decomposition level and second decomposition level, based on the first decomposition level and the sequence to be analyzed, using the preliminary wavelet function to perform wavelet change point detection, to determine a plurality of first preliminary sequence change points, and, based on the second decomposition level and the sequence to be analyzed, using the preliminary wavelet function to perform wavelet change point detection, to determine a plurality of second preliminary sequence change points; the first decomposition level is the preliminary decomposition level before each increment; the second decomposition level is the preliminary decomposition level after the first decomposition level is incremented;
[0088] Step S203, determining a first preliminary selection change point set according to the plurality of first preliminary selection sequence change points, and determining a second preliminary selection change point set according to the plurality of second preliminary selection sequence change points;
[0089] Step S204, check the first preliminary change point set and the second preliminary change point set. When the first preliminary change point set is the same as the second preliminary change point set, determine the first decomposition level as the optimal decomposition level, determine multiple first preliminary sequence change points as first sequence change points, and stop increasing the preliminary decomposition level. Otherwise, continue to increase the preliminary decomposition level.
[0090] In step S201 of some embodiments, the given threshold can be set in combination with the actual preliminary wavelet function. Exemplarily, the given threshold is 1, and the number of preliminary decomposition layers increases from the beginning until the optimal decomposition number is determined, and then the increase of the preliminary decomposition number stops.
[0091] In some embodiments, wavelet transform can be divided into continuous wavelet transform (CWT) and discrete wavelet transform (DWT), as follows:
[0092] ①Continuous wavelet transform
[0093] Let L 2 (R) represents the real axis measurable square integrable function space, and the time series X(t) with length T is L 2 The continuous wavelet transform in (R) can be expressed as:
[0094]
[0095] Among them, W X (a, b) are continuous wavelet transform coefficients; t (t = 1, 2, 3, ..., T) is the time period; a is the time scale factor, reflecting the period length of the wavelet basis function; b is the time position factor, reflecting the temporal translation of the wavelet basis function. is a function of the time scale factor a, the time position factor b and the time t; for The complex conjugate function of .
[0096] ② Discrete wavelet transform
[0097] Since the measured hydrological and meteorological data are usually discrete, discrete wavelet transform is required. Specifically, the above formula (1) is discretized to obtain:
[0098]
[0099]
[0100] Among them, W X (j,b) are discrete wavelet coefficients; a0 and b0 are constants; j (j=1,2,...,J) is the decomposition level; is a discrete function of constants a0 and b0, decomposition level j and time t.
[0101] W X (j, b) is the discrete wavelet coefficient, specifically the calculated value of the sequence X(t) through the unit impulse response filter, which can simultaneously reflect the change law of the sequence in the time domain and the frequency domain. In actual analysis, the binary discrete wavelet transform (DDWT) is often used for decomposition, that is, a0 = 2 and b0 = 1, then the above formula (4) can be expressed as:
[0102]
[0103] in, is a discrete function of constants a0 and b0, decomposition level j and time t, and k is the position offset.
[0104] According to the binary discrete wavelet transform, the theoretical maximum value J of the decomposition level j can be expressed as:
[0105]
[0106] Where [·] represents the rounding operation; T X(t) Represents the length of the sequence X(t).
[0107] In step S202 of some embodiments, variance is one of the important parameters for determining whether a sequence has undergone a fundamental change. Wavelet Change Point Detection is a change point identification method based on the Maximum Overlap Discrete Wavelet Transform. By calculating the variance of the wavelet coefficients of the sequence to be analyzed, the number and position of sequence change points of a certain confidence level are determined. The change point determines the start and end of the sequence cycle and trend, and is the key to analyzing the law of sequence evolution. The advantage of wavelet change point detection is that it organically combines wavelet transform and decomposition layers, explores from the perspective of variance, can better reflect the characteristics of the sequence to be analyzed, and has a variety of rapid implementation methods.
[0108] Wavelet change point detection calculates the variance of the wavelet coefficients of the sequence X(t) one by one to determine the number and position of the change points under a certain confidence level (usually 95% or 99%). The steps and principles of wavelet change point detection using the primary wavelet function are as follows:
[0109] ①MODWT multi-resolution analysis, decomposing the sequence X(t) into T-dimensional column vectors and in, By X(t) at τ j The MODWT wavelet coefficients within Δt are calculated; By τ j+1 Δt and higher dimensional MODWT scaling coefficients.
[0110] At this time, the sequence X(t) can be expressed as:
[0111]
[0112] Among them, X is the sequence to be analyzed, is the J-th order maximum overlapping detail, is the J-th order maximum overlap smoothing; and They are high frequency filter and low frequency filter respectively, and F is the j Circularly shift a unit T×T matrix, is the first decomposition column vector for decomposition level j, matrix F, dimension k, is the second decomposition column vector with respect to decomposition level j, matrix F, and dimension k, and “*” represents a conjugate complex number.
[0113] ②MODWT variance decomposition
[0114] The variance decomposition based on MODWT is a series of decompositions of the variance of the sequence X(t) (such as the sequence to be analyzed in the embodiment of the present application) part by part and period by period. Under the premise that the wavelet coefficients are stable, it can be expressed as:
[0115]
[0116] Among them, X is the sequence to be analyzed, and the sequence to be analyzed X is decomposed into T-dimensional column vectors and Decomposition level j represents the currently selected decomposition level, J is the maximum value that j can take, and represents the maximum decomposition level. is the third decomposition column vector about decomposition level j, which is calculated by the maximum overlap discrete wavelet transform MODWT wavelet coefficients. is the fourth decomposition column vector about decomposition level j, given by τ j+1 Δt and higher dimensional maximum overlap discrete wavelet transform MODWT scaling coefficients, τ j+1 Δt is the decomposition scale closed space, when ‖X‖ 2 When the value of changes, ‖X‖ 2The sequence points where the value of changes are recorded as change points.
[0117] Based on the above decomposition, we can derive the variation of the variance of the wavelet coefficients of the sequence X(t) over time in different periods, and the points where the variance of the sequence X(t) changes can be recorded as change points.
[0118] In steps S203 to S204 of some embodiments, by increasing the number of preliminary decomposition levels, change point detection is performed using the preliminary wavelet function at different preliminary decomposition levels to obtain change points at different preliminary decomposition levels, and the consistency of the change points is tested. When the change points no longer change, that is, when the first preliminary change point set and the second preliminary change point set correspond to each other, the optimal number of decomposition levels can be determined.
[0119] Exemplarily, a threshold is given as 1, that is, the preliminary decomposition level is 1, and the change point set one of the preliminary wavelet function at decomposition level 1 is A, B, C, D, and E. The preliminary decomposition level is increased, and the preliminary decomposition level is 2. The change point set two of the preliminary wavelet function at decomposition level 2 is A, D, E, and F. The change point set one is inconsistent with the change point set two. The preliminary decomposition level continues to be increased, and the preliminary decomposition level is 3. The change point set three of the preliminary wavelet function at decomposition level 3 is A, D, F, and G. The change point set two is inconsistent with the change point set three. The preliminary decomposition level continues to be increased, and the preliminary decomposition level is 4. The change point set four of the preliminary wavelet function at decomposition level 4 is A, D, F, and G. At this time, the change point set three corresponds to the change point set four, and the preliminary decomposition level before this increase is determined to be the optimal decomposition level, that is, the optimal decomposition level is decomposition level 3, and the preliminary decomposition level is stopped from being increased.
[0120] In step S103 of some embodiments, the change point detection method includes a graphical method, a parametric method, and a non-parametric method, which are specifically as follows:
[0121] ①Graphical method
[0122] a. Moving average method
[0123] A method of analyzing the development trend of a sequence by sequentially increasing or decreasing new and old data and eliminating accidental change factors. For a sequence X(t) with a sample size of N, its sliding average sequence is expressed as:
[0124]
[0125] Where i is the sliding step, i = 1, 2, ..., I; X i (t) is the sequence value corresponding to step size i.
[0126] b. Cumulative Anomaly Method
[0127] The cumulative deviation method is one of the methods to determine the change points and trends of the sequence X(t) based on graphical analysis. The cumulative deviation value at a certain moment can be expressed as:
[0128]
[0129] Where JP[·] is the cumulative deviation of the sequence X(t); T is are the length and mean of the sequence X(t) respectively.
[0130] By plotting the cumulative deviation values of the sequence X(t) in the same graph in chronological order, the cumulative deviation curve can be obtained. According to the fluctuation of the curve, the change points and local change trends of the sequence X(t) can be identified. If the cumulative deviation value is greater than 0, it indicates an upward trend; otherwise, it indicates a downward trend; the point that changes the trend of the sequence X(t) can be regarded as a change point.
[0131] ② Parameter method
[0132] a. Sliding t-test
[0133] Assume that before and after the sliding point, F1(x) and F2(x) are the distribution functions of the two sequences before and after, respectively. Two samples with capacity n1 and n2 are drawn from the population F1(x) and F2(x), respectively. It is required to test the original hypothesis: F1(x) = F2(x). The statistic HDT is expressed as:
[0134]
[0135] Among them, x t is the tth sample value of the sequence;
[0136] HDT follows the t(n1+n2-2) distribution, and the critical value t α / 2 It can be obtained by looking up the t distribution table. α / 2 If , reject the null hypothesis; otherwise, accept the null hypothesis.
[0137] b. ANOVA analysis of variance
[0138] ANOVA determines whether the categorical independent variable has a significant effect on the numerical dependent variable by testing whether the means of each population are equal. The sequence to be tested X(t) is a factor, represented by A; the different levels of the factor are k, represented by A1, A2, ..., A k ; The sample data obtained at each factor level is the observed value, expressed as x ij (i=1,2,...,k,j=1,2,...,n j). When performing variance analysis, it is necessary to examine the source of data errors and use the sum of squares. The sum of squares that reflects the size of all data errors is called the total sum of squares (SST), the sum of squares for Factor A (SSA) that reflects the degree of difference between the means of each sample is the sum of squares between groups (SSA), and the sum of squares for Error (SSE) that reflects the discrete state of each observation value of each sample is the sum of squares within the group (SSE). It is divided into four steps: proposing hypotheses, constructing statistics, calculating statistics, and making statistical decisions.
[0139] ③Non-parametric method
[0140] aM-K test
[0141] The MK test is performed by setting the confidence level α and calculating the statistic. and Determine the number, location, significance and trend of potential change points in the sequence X(t). Statistics The calculation formula is as follows:
[0142]
[0143] in, is the statistic vector of the sequence X(t) calculated sequentially; is the rank sum of the sequence X(t) at time k, which is the cumulative value of the number of values at time k that are greater than time i (1≤k≤i); and They are The mean and variance of .
[0144] when When , the sequence X(t) shows an upward trend; otherwise, it shows a downward trend. According to the reverse repetition formula (10) of the sequence X(t), the statistic can be obtained Will and Plotted in the same graph, both are within the confidence interval U 0.05 The intersection point within is the change point of the sequence X(t).
[0145] bK-S test method
[0146] The KS test method can determine whether the distributions of two sequences are the same based on the maximum vertical distance between the two empirical distribution functions, and can also be used to determine the fit between a sequence and a known distribution. Therefore, the KS test is also a commonly used sequence consistency test method.
[0147] Let the empirical distribution function of the sequence X(t) be:
[0148]
[0149] Among them, F n [X(t)] is the empirical distribution function of the sequence X(t); is the indicator function of the sequence X(t); T is the sequence length, and t = 1, 2, …, T.
[0150] The null hypothesis H0 of the K-S test: F1[X(t)] = F2[X(t)], that is, the empirical distributions of the two sequences are the same; the alternative hypothesis H1: F1[X(t)] ≠ F2[X(t)], that is, the empirical distributions of the two sequences are different. To quantify the difference between the empirical distributions of the two sequences, the maximum difference D is defined, and the calculation formula is as follows:
[0151]
[0152] Among them, sup represents the least upper bound of the set, and D is used T,α represents the rejection region of the sequence X(t) with a capacity of T at the confidence level α. When D ≥ D T,α , reject H0; otherwise, accept H0. To further quantify the significance of the difference between the two sequences, the p-value is introduced to specify the confidence level α. The value of the confidence level α is usually 95% or 99%, and the corresponding p-values are 0.05 and 0.01 respectively. If p < 0.01, it indicates that the determination result is strong, and H0 should be rejected, that is, the two sequences follow different distributions and do not have consistency; if 0.01 < p < 0.05, it indicates that the determination result is weak. In this case, the p-value is considered to have a certain marginality, and usually H0 is also rejected; if p > 0.05, then H0 can be accepted.
[0153] In some embodiments, step S105 may include but is not limited to steps S301 to S304:
[0154] Step S301, construct a first change point set according to the first candidate sequence change point sets corresponding to each first candidate wavelet function;
[0155] Step S302, construct a second change point set according to multiple second sequence change points;
[0156] Step S303, perform change point deduplication according to the first change point set and the second change point set to obtain a serialized change point set;
[0157] Step S304, according to the serialized change point set, adopt a sequence consistency test method to calculate the consistency of the sequences before and after the change points in the serialized change point set, identify multiple sequence consistency change points, and construct a consistency sequence change point set according to the multiple sequence consistency change points.
[0158] In some embodiments, the first change point set is the union of the first candidate sequence change point sets corresponding to the first candidate wavelet functions.
[0159] In step S303 of some embodiments, the serialization change point set is the union of the first change point set and the second change point set. Assuming that the first change point set is 1, 2, 3, 4, 5 and the second change point set is 1, 3, 5, 7, 9, the consistency sequence change point set is 1, 2, 3, 4, 5, 7, 9.
[0160] In step S304 of some embodiments, a sequence consistency verification method is used to calculate the consistency of the sequences before and after the change point in the serialized change point set one by one, and identify multiple sequence consistency change points. The sequence consistency change point is a node where the sequence consistency in the serialized change point set undergoes a fundamental change. Optionally, the sequence consistency verification method is the above-mentioned KS verification method.
[0161] In some embodiments, step S106 may include but is not limited to steps S401 to S402:
[0162] Step S401, performing change point identification on the first candidate sequence change point set and the sequence change point set corresponding to each first candidate wavelet function, screening out multiple first sequence consistent change points of each first candidate wavelet function, and constructing the second candidate sequence change point set corresponding to each first candidate wavelet function; the first sequence consistent change point is the same change point in the first candidate sequence change point set and the sequence change point set corresponding to each first candidate wavelet function;
[0163] Step S402, marking the second sequence consistency change points according to the second candidate sequence change point set and the consistency sequence change point set corresponding to each first candidate wavelet function, and determining the change point recognition results of each first candidate wavelet function; the second sequence consistency change points are the same change points in the second candidate sequence change point set and the consistency sequence change point set corresponding to each first candidate wavelet function.
[0164] In steps S401 to S402 of some embodiments, reference is made to Figure 2 , Figure 2 It is a schematic diagram of the sequence consistency test in the embodiment of the present application. The second candidate sequence change point set is the intersection of the above-mentioned first candidate sequence change point set and the above-mentioned sequence change point set. Then, it is detected whether the second candidate sequence change point set has an intersection with the above-mentioned consistency sequence change point set, and each change point existing in the intersection is marked.
[0165] In some embodiments, step S107 may include but is not limited to steps S501 to S503:
[0166] Step S501, when the change point recognition result is that all the change points in the second candidate sequence change point set are marked as second sequence consistency change points, determining the first candidate wavelet function corresponding to the change point recognition result as the second candidate wavelet function, and determining the number of the second candidate wavelet functions;
[0167] Step S502, when the number of the second candidate wavelet function is one, determining the second candidate wavelet function as the optimal wavelet function;
[0168] Step S503, when the number of second candidate wavelet functions is greater than one, wavelet change point detection is performed using multiple second candidate wavelet functions according to the optimal decomposition level, the sequence to be analyzed and the sequence change point set, and the change point test results of each second candidate wavelet function are obtained. According to the change point test results of each second candidate wavelet function, the optimal wavelet function is determined from the multiple second candidate wavelet functions.
[0169] In some embodiments, optionally, when the change point recognition results of all first candidate wavelet functions are not: all change points in the second candidate sequence change point set are marked as second sequence consistent change points, the second candidate wavelet function is determined according to the change point recognition accuracy. If there is only one first candidate wavelet function with the highest change point recognition accuracy, it is directly determined as the optimal wavelet function. Otherwise, multiple first candidate wavelet functions with the highest change point recognition accuracy are determined as multiple second candidate wavelet functions. The change point recognition accuracy is the probability of a change point being marked in the second candidate sequence change point set. Assuming that there are 5 change points in the second candidate sequence change point set, and 3 of them are marked, the change point recognition accuracy is 3 / 5.
[0170] In some embodiments, step S503 may include but is not limited to steps S601 to S603:
[0171] Step S601, performing wavelet change point detection using multiple second candidate wavelet functions according to the optimal decomposition level, the sequence to be analyzed and the sequence change point set, and obtaining the change point test results of each second candidate wavelet function;
[0172] Step S602, calculating the change point detection stability rate of each second candidate wavelet function according to the change point test result of each second candidate wavelet function;
[0173] Step S603, determining an optimal wavelet function from multiple second candidate wavelet functions according to the change point detection stability rate of each second candidate wavelet function, and performing wavelet analysis using the optimal wavelet function and the optimal decomposition level.
[0174] In some embodiments, step S601 may include but is not limited to steps S701 to S704:
[0175] Step S701, obtaining a given adjustment layer number range;
[0176] Step S702, adjusting the optimal decomposition number of layers within the adjustment number range to obtain a plurality of adjusted decomposition numbers of layers; the adjusted decomposition number of layers is the decomposition number of layers obtained after adjusting the optimal decomposition number of layers;
[0177] Step S703, performing wavelet change point detection using multiple second candidate wavelet functions according to multiple adjusted decomposition levels, the sequence to be analyzed and the sequence change point set, to obtain multiple change point test sets corresponding to each adjusted decomposition level of each second candidate wavelet function;
[0178] Step S704: determining a change point test result of each second candidate wavelet function according to a plurality of change point test sets of each second candidate wavelet function.
[0179] In some embodiments, when there are multiple second candidate wavelet functions, the optimal wavelet function is determined by adjusting the optimal decomposition level and checking the change point detection stability of each second candidate wavelet function.
[0180] In steps S701 to S704 of some embodiments, the range of adjusting the number of layers can be set according to the current number of layers of the optimal decomposition layer or actual needs without limitation.
[0181] Exemplarily, the range of the adjusted number of layers is set to two adjacent layers of the optimal decomposition number, that is, [-1,1]. Assuming that the optimal decomposition number is 5, the adjusted number of decomposition layers is [5-1,5+1], so there are 3 adjusted decomposition layers, namely 4 layers, 5 layers, and 6 layers.
[0182] Then, each second candidate wavelet function performs wavelet change point detection according to each adjusted decomposition level and the sequence to be analyzed, and obtains a change point test set 1 with a decomposition level of 4, a change point test set 2 with a decomposition level of 5, and a change point test set 3 with a decomposition level of 6.
[0183] Each second candidate wavelet function determines a change point test result, ie, change point detection stability, according to its own multiple change point test sets, and the second candidate wavelet function with the highest change point detection stability is determined as the optimal wavelet function.
[0184] In steps S601 to S603 of some embodiments, assuming that there are three second candidate wavelet functions A, B and C, the optimal decomposition level is 5, and the adjustment level range is [-1, 1], the decomposition levels are adjusted to 4, 5 and 6.
[0185] Assuming that the change point test results of the second candidate wavelet function A are the same in three change point test sets, the change point test results of the second candidate wavelet function B are the same in two change point test sets, and one change point test set has two more change points than other change point test sets, and the change point test results of the second candidate wavelet function C are the same in two change point test sets, and one change point test set has four more change points than other change point test sets, then the change point detection stability rate can be calculated by setting weights or calculating scores. For example, the initial score of each change point test set is the same, and the initial score is 100. For one change point test set, the change point test set is compared with the change point test set of the optimal decomposition layer. 5 points are deducted for one more change point and 4 points are deducted for one less change point. Then, weights are set for all change point test sets of the same second candidate wavelet function. Assuming that the weight of the change point test set of the optimal decomposition layer is 40%, the remaining 60% is scored on average. Assign the remaining change point test sets, and finally calculate the scores of each change point test set of the same second candidate wavelet function. The scores of each change point test set are weighted calculated according to the set weights and then converted into percentages to obtain the change point detection stability rate of the second candidate wavelet function. By analogy, the change point detection stability rates of each second candidate wavelet function are obtained. The second candidate wavelet function with the highest change point detection stability rate is determined as the optimal wavelet function. After relevant calculations, the change point detection stability rate of the above-mentioned second candidate wavelet function A is 100%, the above-mentioned second candidate wavelet function B is (100*40%+100*30%+90*30%)%=97%, and the above-mentioned second candidate wavelet function C is (100*40%+100*30%+80*30%)%=94%. Therefore, the second candidate wavelet function A is determined as the optimal wavelet function, and wavelet analysis is performed using the optimal wavelet function and the above-mentioned optimal decomposition layer number.
[0186] In some embodiments, a wavelet analysis method based on wavelet change point detection provided in an embodiment of the present application can be applied in natural science and engineering technology fields such as medicine, physics, economics, and telecommunications information science to study the evolution laws of sequence cycles, trends, mutations, etc., and to achieve sequence prediction through decomposition and reconstruction.
[0187] In some embodiments, taking the annual average measured runoff time series of hydrological station A in the middle and upper reaches of the Yangtze River from 1950 to 2021 (referred to as Station A) and the annual average measured runoff time series of hydrological station B from 1950 to 2021 (referred to as Station B) as examples, the wavelet analysis method based on wavelet change point detection provided in the embodiments of the present application is used to perform wavelet analysis on the annual average measured runoff time series of the hydrological stations.
[0188] First, in the first step, db8 (Daubechies wavelet system) is used as the primary wavelet function, and the primary decomposition layer test range is set to 2 to 7. The Matlab software toolbox is used to carry out wavelet change point detection. The decomposition layer and change point test results of hydrological stations A and B are shown in Table 2, which is as follows:
[0189] Table 2 Decomposition level and wavelet change point detection results
[0190]
[0191] Among them, it can be seen from Table 2 that the optimal decomposition level of the annual average measured runoff time series of station A is 5, and the optimal decomposition level of the annual average measured runoff time series of station B is 6.
[0192] In the second step, a change point detection method is used to obtain multiple second sequence change points, as follows:
[0193] The two series change point sets constructed by the graphical method (cumulative deviation method), the parametric method (sliding t test) and the non-parametric method (MK test) are:
[0194]
[0195] in, is the second change point set composed of multiple second sequence change points of station A, It is a second change point set composed of multiple second sequence change points of station B.
[0196] The third step is to use multiple first candidate wavelet functions to perform wavelet change point detection, obtain the first candidate sequence change point set of each first candidate wavelet function, and obtain the first change point set, as shown in Table 3 below:
[0197] Table 3 Results of the first change point set
[0198]
[0199] in, is the first change point set of station A, This is the first set of change points for Station B.
[0200] The fourth step is to determine the sequence change point set and the consistency sequence change point set according to the first change point set and the second change point set. Specifically, the first change point set and the second change point set are deduplicated to determine the sequence change point set. The sequence change point set is shown in Table 4 below:
[0201] Table 4 Sequence change point set results
[0202]
[0203] Then, through the sequence consistency test method (KS test method), the consistency of the sequence before and after the change point in the set is calculated one by one, so as to identify the nodes where the sequence consistency has fundamentally changed, and obtain the sequence consistency test results, as shown in Table 5 below:
[0204] Table 5 Results of the sequence consistency test of the annual average measured runoff time between Station A and Station B
[0205]
[0206] Among them, after the KS consistency test, the change points of the annual average measured runoff time series of station A are 1998 and 2002, and the change point of the annual average measured runoff time series of station B is 2001. If the consistency test is carried out over the years, the series from 1950 to 2021 (a total of 72 years) needs to be carried out. After constructing the sequence change point set, station A needs to calculate Station B needs to calculate The amount of computation was reduced by 94.02% and 96.77% respectively, effectively improving the computing efficiency.
[0207] By comparing the analysis results of each wavelet function in the wavelet change point detection, the wavelet function that meets the characteristics of the sequence itself can be screened out with the highest accuracy of consistent change point identification as the standard. Since the sequence change node can be the end point of the previous sequence or the starting point of the next sequence, the adjacent points before and after the consistency test result are also used as change points. Therefore, the consistent sequence change point set of station A is The set of consistency sequence change points of station B is
[0208] The fifth step is to determine the change point recognition results of each first candidate wavelet function according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each first candidate wavelet function, as shown in Table 6 below:
[0209] Table 6 Wavelet function change point identification results of the annual average measured runoff time series at station A and station B
[0210]
[0211] Table 6 Wavelet function change point identification results of the annual average measured runoff time series at Station A and Station B
[0212]
[0213]
[0214] It can be seen from Table 6 that haar, coif5 and fk14 are the second candidate wavelet functions that meet the characteristics of the annual average measured runoff time series of station A, and sym4 is the optimal wavelet function of the annual average measured runoff time series of station B.
[0215] In the sixth step, in order to determine the optimal wavelet function of the annual average measured runoff time series of station A, it is necessary to further adjust the optimal decomposition layer number to test the stability of change point detection. The optimal decomposition layer number is 5, and the layer number range is adjusted to [-1,1]. When the wavelet functions are haar, coif5 and fk14 respectively, the change point test results of the annual average measured runoff time series of station A are shown in Table 7. Table 7 is as follows:
[0216] Table 7 Optimization results of wavelet function for the annual average measured runoff time series at station A
[0217]
[0218] It can be seen from Table 7 that the optimal wavelet function of the annual average measured runoff time series at station A is fk14.
[0219] Finally, the optimal decomposition layer number and optimal wavelet function determined above were used to analyze the evolution of the annual average runoff time series of Station A and Station B. Figure 3 and Figure 4 , Figure 3 is a schematic diagram of the analysis of the evolution law of the annual average runoff time series of Station A in the embodiment of the present application, Figure 4 It is a schematic diagram of the analysis of the evolution law of the annual average runoff time series of Station B in the embodiment of the present application.
[0220] like Figure 3 As shown in the figure, the main periods of the annual average measured runoff time series of Station A are 10 years and 28 years. The pattern of wet and dry changes from 1950 to 2021 is "wet-dry-wet-dry-wet". Station A has entered the dry season since 2020, which is consistent with the actual drought situation in the Jinsha River. Figure 4 As shown, the main cycle of the annual average measured runoff time series at Station B is 10 years. The pattern of changes in flood and drought from 1950 to 2021 is the same as "flood-drought-flood-drought-flood". In 2020, Station B was in a transition stage from flood to drought, which is consistent with the timing of the middle and upper reaches of the Yangtze River.
[0221] Reference Figure 5 , Figure 5 This is an optional module diagram of a wavelet analysis system based on wavelet change point detection provided in an embodiment of the present application, including:
[0222] The first module is used to obtain a sequence to be analyzed and a plurality of first candidate wavelet functions;
[0223] The second module is used to select one of the first candidate wavelet functions as a preliminary wavelet function, and perform wavelet change point detection using the preliminary wavelet function according to the preliminary decomposition layer number and the sequence to be analyzed, to determine the optimal decomposition layer number and the corresponding multiple first sequence change points; the preliminary decomposition layer number is the decomposition layer number of the preliminary wavelet function;
[0224] The third module is used to use a change point detection method to determine a plurality of second sequence change points according to the sequence to be analyzed;
[0225] The fourth module is used to perform wavelet change point detection using multiple first candidate wavelet functions according to the sequence to be analyzed and the optimal decomposition layer number, and determine the first candidate sequence change point set corresponding to each first candidate wavelet function;
[0226] A fifth module is used to perform a wavelet change point consistency check based on the plurality of second sequence change points and the first candidate sequence change point sets corresponding to the first candidate wavelet functions, and determine a sequence change point set and a consistent sequence change point set;
[0227] A sixth module, for determining a change point recognition result of each first candidate wavelet function according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each first candidate wavelet function;
[0228] The seventh module is used to determine the optimal wavelet function from multiple first candidate wavelet functions according to the change point recognition results of each first candidate wavelet function, and perform wavelet analysis using the optimal wavelet function and the optimal decomposition layer number.
[0229] The specific implementation of the wavelet analysis system based on wavelet change point detection is substantially the same as the specific implementation of the wavelet analysis method based on wavelet change point detection described above, and will not be described in detail herein.
[0230] The embodiment of the present application provides a wavelet analysis method, system and storage medium based on wavelet change point detection, which selects a preliminary wavelet function, selects the optimal decomposition layer number according to the sequence to be analyzed and the preliminary decomposition layer number, selects the optimal wavelet function from multiple candidate wavelet functions according to the sequence to be analyzed through a sequence consistency test method, and uses the optimal decomposition layer number and the optimal wavelet function to perform wavelet analysis. The present application is simple and easy to implement, and with the advantages of wavelet change point detection combined with wavelet function and decomposition layer number, it can quickly screen out the key parameters that determine the accuracy of wavelet transform, avoiding the tedious work of simultaneously enumerating wavelet function and decomposition layer number combinations, or synchronously analyzing other characteristic parameters of the sequence to screen out the optimal wavelet function, with fewer calculation steps and high calculation efficiency, and has the ability to screen out wavelet functions and decomposition layers that meet the characteristics of the sequence itself, effectively improving the level of wavelet transform analysis, and providing a good foundation for applying wavelet transform to different fields to carry out sequence evolution law analysis, as well as sequence decomposition, reconstruction and prediction simulation.
[0231] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned wavelet analysis method based on wavelet change point detection is implemented.
[0232] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0233] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0234] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0235] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A wavelet analysis method based on wavelet change point detection, characterized in that: include: Obtaining a sequence to be analyzed and a plurality of first candidate wavelet functions; the sequence to be analyzed is an annual average measured runoff time series of a hydrological station; One of the first candidate wavelet functions is selected as a preliminary wavelet function, and according to the preliminary decomposition number and the sequence to be analyzed, the preliminary wavelet function is used to perform wavelet change point detection to determine the optimal decomposition number and the corresponding multiple first sequence change points; the preliminary decomposition number is the decomposition number of the preliminary wavelet function; Using a change point detection method, according to the sequence to be analyzed, using the change point detection method to determine a plurality of second sequence change points; According to the sequence to be analyzed and the optimal decomposition level, using a plurality of the first candidate wavelet functions to perform wavelet change point detection, and determining a first candidate sequence change point set corresponding to each of the first candidate wavelet functions; Performing a wavelet change point consistency check according to the plurality of second sequence change points and the first candidate sequence change point sets corresponding to the first candidate wavelet functions to determine a sequence change point set and a consistent sequence change point set; Determine a change point recognition result of each of the first candidate wavelet functions according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each of the first candidate wavelet functions; Determine an optimal wavelet function from a plurality of the first candidate wavelet functions according to the change point recognition results of each of the first candidate wavelet functions, and perform wavelet analysis using the optimal wavelet function and the optimal number of decomposition levels; The wavelet change point detection is performed using the primary wavelet function, which is specifically expressed by the following formula: Among them, X is the sequence to be analyzed, is the J-th order maximum overlapping detail, is the J-th order maximum overlap smoothing; and They are high frequency filter and low frequency filter respectively, and F is the j Circularly shift a unit T×T matrix, is the first decomposition column vector for decomposition level j, matrix F, dimension t, is the second decomposition column vector with respect to decomposition level j, matrix F, and dimension t. "*" represents a conjugate complex number. The sequence X to be analyzed is decomposed into a T-dimensional column vector and Decomposition level j represents the currently selected decomposition level, J is the maximum value that j can take, and represents the maximum decomposition level. is the third decomposition column vector about decomposition level j, which is calculated by the maximum overlap discrete wavelet transform MODWT wavelet coefficients. is the fourth decomposition column vector about decomposition level j, given by τ j+1 Δt and higher dimensional maximum overlap discrete wavelet transform MODWT scaling coefficients, τ j+1 Δt is the decomposition scale closed space, when ||X|| 2 When the value of changes, ||X|| 2 The sequence points where the value of changes are recorded as change points.
2. The wavelet analysis method according to claim 1, characterized in that: The change point detection method includes a graphical method, a parametric method and a non-parametric method. The step of performing a wavelet change point consistency check based on the plurality of second sequence change points and the first candidate sequence change point set corresponding to each of the first candidate wavelet functions to determine a sequence change point set and a consistent sequence change point set specifically includes: Constructing a first change point set according to the first candidate sequence change point sets corresponding to the first candidate wavelet functions; the first change point set is the union of the first candidate sequence change point sets corresponding to the first candidate wavelet functions; Constructing a second change point set according to the plurality of change points of the second sequence; Deduplication of change points is performed according to the first change point set and the second change point set to obtain the sequence change point set; According to the sequence change point set, a sequence consistency test method is used to calculate the consistency of the sequences before and after the change points in the sequence change point set, identify multiple sequence consistency change points, and construct the consistency sequence change point set based on the multiple sequence consistency change points.
3. The wavelet analysis method according to claim 1, characterized in that: The step of selecting one of the first candidate wavelet functions as a preliminary wavelet function, performing wavelet change point detection using the preliminary wavelet function according to the preliminary decomposition level and the sequence to be analyzed, and determining the optimal decomposition level and the corresponding multiple first sequence change points specifically includes: initially selecting the preliminary decomposition level as a given threshold, and incrementing the preliminary decomposition level; For the adjacent first decomposition level and second decomposition level, based on the first decomposition level and the sequence to be analyzed, the preliminary wavelet function is used to perform wavelet change point detection to determine a plurality of first preliminary sequence change points, and based on the second decomposition level and the sequence to be analyzed, the preliminary wavelet function is used to perform wavelet change point detection to determine a plurality of second preliminary sequence change points; the first decomposition level is the preliminary decomposition level before each increment; the second decomposition level is the preliminary decomposition level after the first decomposition level is incremented; Determine a first set of preliminary selected change points according to the first preliminary selected sequence change points, and determine a second set of preliminary selected change points according to the second preliminary selected sequence change points; Check the first preliminary change point set and the second preliminary change point set. When the first preliminary change point set is the same as the second preliminary change point set, determine the first decomposition level as the optimal decomposition level, determine multiple first preliminary sequence change points as the first sequence change points, and stop increasing the preliminary decomposition level. Otherwise, continue to increase the preliminary decomposition level.
4. The wavelet analysis method according to claim 1, characterized in that: The step of determining the change point recognition result of each of the first candidate wavelet functions according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each of the first candidate wavelet functions specifically includes: Perform change point identification on the first candidate sequence change point set corresponding to each of the first candidate wavelet functions and the sequence change point set, screen out multiple first sequence consistent change points of each of the first candidate wavelet functions, and construct a second candidate sequence change point set corresponding to each of the first candidate wavelet functions; the first sequence consistent change point is the same change point in the first candidate sequence change point set corresponding to each of the first candidate wavelet functions and the sequence change point set; According to the second candidate sequence change point set corresponding to each of the first candidate wavelet functions and the consistent sequence change point set, the second sequence consistent change points are marked to determine the change point recognition results of each of the first candidate wavelet functions; the second sequence consistent change points are the same change points in the second candidate sequence change point set corresponding to each of the first candidate wavelet functions and the consistent sequence change point set.
5. The wavelet analysis method according to claim 4, characterized in that: The step of determining an optimal wavelet function from a plurality of the first candidate wavelet functions according to the change point recognition results of each of the first candidate wavelet functions, and performing wavelet analysis using the optimal wavelet function and the optimal number of decomposition levels specifically includes: When the change point recognition result is that all the change points in the second candidate sequence change point set are marked as the second sequence consistency change points, determining the first candidate wavelet function corresponding to the change point recognition result as the second candidate wavelet function, and determining the number of the second candidate wavelet functions; When the number of the second candidate wavelet function is one, determining the second candidate wavelet function as the optimal wavelet function; When the number of the second candidate wavelet functions is greater than one, wavelet change point detection is performed using multiple second candidate wavelet functions according to the optimal decomposition level, the sequence to be analyzed and the sequence change point set, and the change point test results of each second candidate wavelet function are obtained. According to the change point test results of each second candidate wavelet function, the optimal wavelet function is determined from the multiple second candidate wavelet functions.
6. The wavelet analysis method according to claim 5, characterized in that: The step of performing wavelet change point detection using a plurality of second candidate wavelet functions according to the optimal decomposition level, the sequence to be analyzed and the sequence change point set when the number of the second candidate wavelet functions is greater than one, obtaining change point test results of each of the second candidate wavelet functions, and determining the optimal wavelet function from the plurality of second candidate wavelet functions according to the change point test results of each of the second candidate wavelet functions specifically includes: According to the optimal decomposition level, the sequence to be analyzed and the sequence change point set, using a plurality of the second candidate wavelet functions to perform wavelet change point detection, and obtaining change point test results of each of the second candidate wavelet functions; Calculating the change point detection stability rate of each of the second candidate wavelet functions according to the change point test results of each of the second candidate wavelet functions; According to the change point detection stability rate of each of the second candidate wavelet functions, the optimal wavelet function is determined from multiple second candidate wavelet functions, and wavelet analysis is performed using the optimal wavelet function and the optimal decomposition level.
7. The wavelet analysis method according to claim 6, characterized in that: The step of performing wavelet change point detection using a plurality of the second candidate wavelet functions according to the optimal decomposition level, the sequence to be analyzed and the sequence change point set to obtain a change point test result of each of the second candidate wavelet functions specifically includes: Get the given adjustment layer range; Adjust the optimal decomposition number of layers within the adjustment number of layers range to obtain multiple adjusted decomposition numbers of layers; the adjusted decomposition number of layers is the decomposition number of layers obtained after adjusting the optimal decomposition number of layers; According to the plurality of the adjusted decomposition levels, the sequence to be analyzed and the sequence change point set, a plurality of the second candidate wavelet functions are used to perform wavelet change point detection, and a plurality of change point test sets corresponding to the respective adjusted decomposition levels of the second candidate wavelet functions are obtained; The change point test result of each of the second candidate wavelet functions is determined according to the multiple change point test sets of each of the second candidate wavelet functions.
8. A wavelet analysis system based on wavelet change point detection, characterized in that: include: The first module is used to obtain a sequence to be analyzed and a plurality of first candidate wavelet functions; the sequence to be analyzed is an annual average measured runoff time series of a hydrological station; The second module is used to select one of the first candidate wavelet functions as a preliminary wavelet function, and perform wavelet change point detection using the preliminary wavelet function according to the preliminary decomposition layer number and the sequence to be analyzed, to determine the optimal decomposition layer number and the corresponding multiple first sequence change points; the preliminary decomposition layer number is the decomposition layer number of the preliminary wavelet function; the wavelet change point detection using the preliminary wavelet function is specifically expressed by the following formula: Among them, X is the sequence to be analyzed, is the J-th order maximum overlapping detail, is the J-th order maximum overlap smoothing; and They are high frequency filter and low frequency filter respectively, and F is the j Circularly shift a unit T×T matrix, is the first decomposition column vector for decomposition level j, matrix F, dimension t, is the second decomposition column vector with respect to decomposition level j, matrix F, and dimension t. "*" represents a conjugate complex number. The sequence X to be analyzed is decomposed into a T-dimensional column vector and Decomposition level j represents the currently selected decomposition level, J is the maximum value that j can take, and represents the maximum decomposition level. is the third decomposition column vector about decomposition level j, which is calculated by the maximum overlap discrete wavelet transform MODWT wavelet coefficients. is the fourth decomposition column vector about decomposition level j, given by τ j+1 Δt and higher dimensional maximum overlap discrete wavelet transform MODWT scaling coefficients, τ j+1 Δt is the decomposition scale closed space, when ||X|| 2 When the value of changes, ||X|| 2 The sequence points where the value of changes are recorded as change points; The third module is used to use a change point detection method to determine a plurality of second sequence change points according to the sequence to be analyzed by using the change point detection method; A fourth module is used to perform wavelet change point detection using a plurality of the first candidate wavelet functions according to the sequence to be analyzed and the optimal decomposition level, and determine a first candidate sequence change point set corresponding to each of the first candidate wavelet functions; A fifth module is used to perform a wavelet change point consistency check based on a plurality of second sequence change points and a first candidate sequence change point set corresponding to each of the first candidate wavelet functions, and determine a sequence change point set and a consistent sequence change point set; A sixth module, configured to determine a change point recognition result of each of the first candidate wavelet functions according to the sequence change point set, the consistency sequence change point set and the first candidate sequence change point set corresponding to each of the first candidate wavelet functions; The seventh module is used to determine the optimal wavelet function from multiple first candidate wavelet functions according to the change point recognition results of each of the first candidate wavelet functions, and perform wavelet analysis using the optimal wavelet function and the optimal decomposition level.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the wavelet analysis method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Landslide displacement sudden change identification method based on wavelet analysis
CN104484572A
Method for identifying hydrologic time sequence nonlinear trend
CN105069309A