CN113986711A - Time series data peak value detection method, device and equipment - Google Patents

Time series data peak value detection method, device and equipment Download PDF

Info

Publication number
CN113986711A
CN113986711A CN202111614786.2A CN202111614786A CN113986711A CN 113986711 A CN113986711 A CN 113986711A CN 202111614786 A CN202111614786 A CN 202111614786A CN 113986711 A CN113986711 A CN 113986711A
Authority
CN
China
Prior art keywords
peak
candidate
value
list
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111614786.2A
Other languages
Chinese (zh)
Inventor
徐昕军
严川
张博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloudwise Beijing Technology Co Ltd
Original Assignee
Cloudwise Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloudwise Beijing Technology Co Ltd filed Critical Cloudwise Beijing Technology Co Ltd
Priority to CN202111614786.2A priority Critical patent/CN113986711A/en
Publication of CN113986711A publication Critical patent/CN113986711A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis

Abstract

The embodiment of the invention provides a method, a device and equipment for detecting a peak value of time series data, wherein the method comprises the following steps: acquiring time sequence data; carrying out differential operation processing on data points in the time sequence data to obtain a differential sequence of the time sequence data; acquiring a candidate peak list of the time sequence data according to the difference sequence; screening candidate peaks in the candidate peak list to obtain a first target peak candidate list; and obtaining a second target peak list of the time sequence data according to the peak factor of the candidate peak in the first target peak candidate list and a preset threshold value. The embodiment of the invention solves the problems that narrow step peak values in the operation and maintenance time sequence data are missed to be judged and local small-amplitude fluctuation is mistaken to be judged as the peak values, greatly improves the accuracy rate and can improve the troubleshooting efficiency of users.

Description

Time series data peak value detection method, device and equipment
Technical Field
The present invention relates to the field of operation and maintenance technologies, and in particular, to a method, an apparatus, and a device for detecting a peak value of time series data.
Background
Along with technical innovations such as artificial intelligence, cloud computing, big data and the internet of things, the operation and maintenance industry gradually evolves from traditional operation and maintenance process management to intellectualization, and nowadays, intelligent operation and maintenance is widely applied to multiple fields. In the mass operation and maintenance data in the intelligent operation and maintenance field, time series data consisting of a series of time stamps and corresponding numerical values is one of the most important data types. The peak value judgment of the time series refers to judging whether a data point in the one-dimensional time series is a peak value by using an algorithm, and can be widely applied to various operation and maintenance scenes such as periodic extraction of the time series, outlier judgment in time series preprocessing, abnormal point judgment in abnormal detection and the like. Time series peak determination methods can be divided into two categories: time domain decision methods and frequency domain decision methods.
The frequency domain method generally converts a time sequence into a frequency domain for processing by utilizing algorithms such as Fourier transform and the like, has high requirements on computer power, is difficult to adapt to the processing requirements of mass data in the operation and maintenance field, and has a time shift problem in peak value judgment, so the method is less applied in the actual service environment and is more suitable for academic research.
The time domain judgment method utilizes the characteristic that the amplitude value at the peak value of the time sequence is higher to judge the peak value, and the method can only identify the single-point peak value and cannot identify the narrow step peak value in the actual operation and maintenance scene; in addition, the method is easy to falsely identify local small-amplitude fluctuation in the operation and maintenance scene as a peak value.
Disclosure of Invention
The invention provides a method, a device and equipment for detecting a peak value of time series data. The problem that narrow step peak values in the operation and maintenance time sequence data are misjudged as peak values by missing judgment and local small-amplitude fluctuation is solved, the accuracy is greatly improved, and the troubleshooting efficiency of users can be improved.
To solve the above technical problem, an embodiment of the present invention provides the following solutions:
a method of peak detection of time series data, comprising:
acquiring time sequence data;
carrying out differential operation processing on data points in the time sequence data to obtain a differential sequence of the time sequence data;
acquiring a candidate peak list of the time sequence data according to the difference sequence;
screening candidate peaks in the candidate peak list to obtain a first target peak candidate list;
and obtaining a second target peak list of the time sequence data according to the peak factor of the candidate peak in the first target peak candidate list and a preset threshold value.
Optionally, the difference sequence DIFF _ X = DIFF (X);
x is time-series data, X = (X)1,x2,…,xm);
diff(xi)=xi+1-xiWherein i =1,2, …, m-1, m is the number of data points in the time series data;
wherein x isiIs the current data point with index i; x is the number ofi+1The data point that is subsequent to the current data point.
Optionally, obtaining a candidate peak list of the time series data according to the difference sequence includes:
taking a list formed by peaks of which the differential value of the previous value point is greater than zero and the differential value of the next value point is less than zero in the differential sequence as a candidate peak list of the time sequence data; and/or
And forming a list of peaks, in which at least one continuous zero-value pair with a difference value of zero is formed between adjacent value points in the differential sequence, the difference value of a previous value point of the zero-value pair with the at least one continuous difference value of zero is greater than zero, and the difference value of a next value point of the zero-value pair with the at least one continuous difference value of zero is less than zero, as the candidate peak list of the time sequence data.
Optionally, the screening the candidate peaks in the candidate peak list to obtain a first target peak candidate list includes:
selecting a preset time window by taking any one of the candidate peaks in the candidate peak list as a center;
and judging whether the candidate peak value is the maximum value in the preset time window, if not, deleting the candidate peak value from the candidate peak value list to obtain a first target peak value candidate list.
Optionally, the maximum value in the preset time window is calculated by the following formula:
Figure 214825DEST_PATH_IMAGE001
wherein x ismaxIs the maximum value in the preset time window; i.e. icenterSubscript to current peak; win is the length of the preset time window.
Optionally, obtaining a second target peak list of the time series data according to a peak factor of a candidate peak in the first target peak candidate list and a preset threshold, where the obtaining includes:
adding all target candidate peaks in the first target peak candidate list whose peak factors of the target candidate peaks are greater than a preset threshold to a second target peak list of the time series data.
Optionally, the peak factor is given by the formula
Figure 459861DEST_PATH_IMAGE002
Obtaining; wherein, the Crest is a Crest factor;
Figure 770757DEST_PATH_IMAGE003
the absolute value of the candidate peak in the first target peak candidate list is obtained; x is the number ofrmsIs the valid value of the time series data within a window centered on the candidate peak;
the effective value is represented by the formula:
Figure 431545DEST_PATH_IMAGE004
calculating; wherein x isiIs the ith point in the time series data; and N is the length of time sequence data participating in calculation.
The present invention also provides a peak detection device for time series data, comprising:
the acquisition module is used for acquiring the time sequence data;
the processing module is used for carrying out differential operation processing on data points in the time series data to obtain a differential sequence of the time series data; acquiring a candidate peak list of the time sequence data according to the difference sequence; screening candidate peaks in the candidate peak list to obtain a first target peak candidate list; and obtaining a second target peak list of the time sequence data according to the peak factor of the candidate peak in the first target peak candidate list and a preset threshold value.
The present invention provides a computing device comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the corresponding operation of the method.
The present invention also provides a computer-readable storage medium storing instructions which, when executed on a computer, cause the computer to perform the method as described above.
The scheme of the invention at least comprises the following beneficial effects:
according to the scheme, time sequence data are acquired; carrying out differential operation processing on data points in the time sequence data to obtain a differential sequence of the time sequence data; acquiring a candidate peak list of the time sequence data according to the difference sequence; screening candidate peaks in the candidate peak list to obtain a first target peak candidate list; obtaining a second target peak list of the time sequence data according to a peak factor of a candidate peak in the first target peak candidate list and a preset threshold; the problem that narrow step peak values in the operation and maintenance time sequence data are misjudged as peak values by missing judgment and local small-amplitude fluctuation is solved, the accuracy is greatly improved, and the troubleshooting efficiency of users can be improved.
Drawings
FIG. 1 is a flowchart illustrating a method for peak detection of time series data according to an embodiment of the present invention;
fig. 2 is a schematic diagram of time series data in an actual scene of the operation and maintenance field according to a specific embodiment 1 provided in the present invention;
FIG. 3 is a diagram illustrating the detection result of the peak detection method for failing to pass time series data in example 3 according to the present invention;
fig. 4 is a schematic diagram of a detection result of a peak detection method by time series data in specific example 3 provided by the present invention;
FIG. 5 is a flowchart illustrating a method for peak detection of time series data according to an embodiment of the present invention;
fig. 6 is a schematic flow chart illustrating a process of obtaining a list of candidate peak subscripts in embodiment 4 of the present invention;
FIG. 7 is a schematic flow chart of a subscript list for screening candidate peaks as maximum values in a window according to specific embodiment 4 of the present invention;
fig. 8 is a schematic flow chart of obtaining a final output result in embodiment 4 of the present invention;
fig. 9 is a block diagram of a peak detection apparatus for time series data according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
As shown in fig. 1, the present invention provides a method for detecting a peak of time-series data, including:
step 11, acquiring time series data;
step 12, performing difference operation processing on data points in the time series data to obtain a difference sequence of the time series data;
step 13, obtaining a candidate peak list of the time sequence data according to the difference sequence;
step 14, screening candidate peaks in the candidate peak list to obtain a first target peak candidate list;
and step 15, obtaining a second target peak list of the time sequence data according to the peak factor of the candidate peak in the first target peak candidate list and a preset threshold.
In this embodiment, time-series data is acquired from a data source, and the time-series data is preferably X = (X)1,x2,…,xm) The time sequence data are subjected to differential operation processing to generate a differential sequence of the time sequence data, a candidate peak list of the time sequence data is obtained according to the differential sequence, the candidate peak list is screened to obtain a first target peak candidate list, and a second target peak list of the time sequence data is obtained by combining a preset threshold value.
In a specific embodiment 1, as shown in fig. 2, fig. 2 shows time series data from an actual scene in the operation and maintenance field.
In an optional embodiment of the present invention, the difference sequence DIFF _ X = DIFF (X) in step 12;
x is time-series data, X = (X)1,x2,…,xm);
diff(xi)=xi+1-xiWherein i =1,2, …, m-1, m is the number of data points in the time series data;
wherein x isiIs the current data point with index i; x is the number ofi+1The data point that is subsequent to the current data point.
In this embodiment, the time series data X = (X)1,x2,…,xm) Generating a difference sequence DIFF _ X by performing difference operation on the time sequence data to subtract the current point from the next point, namely, when the current point is XiAt the current point xiThe latter point of (a) is xi+1Then, the difference operation is performed on the current point to obtain the difference value diff (x)i)=xi+1-xiWhere i =1,2, …, m-1, traverse time series data X = (X)1,x2,…,xm) Get the difference sequence DIFF _ X = DIFF (X).
In an alternative embodiment of the present invention, step 13 includes:
step 131, using a list formed by peaks in the differential sequence, in which the differential value of the previous value point is greater than zero and the differential value of the next value point is less than zero, as a candidate peak list of the time series data; and/or
Step 132, forming a list of peaks, in which at least one consecutive zero value pair with a difference value of zero is formed between adjacent value points in the difference sequence, the difference value of the previous value point of the zero value pair with the at least one consecutive zero value pair is greater than zero, and the difference value of the next value point of the zero value pair with the at least one consecutive zero value pair is less than zero, as the candidate peak list of the time sequence data.
In this embodiment, at least one continuous zero value pair with a difference value of zero is formed between adjacent value points in the difference sequence, the difference value of the previous value point of the zero value pair with the at least one continuous difference value of zero is greater than zero, a peak value with a difference value of the next value point of the zero value pair with the at least one continuous difference value of zero less than zero may be referred to as a peak value in the narrow step mode, and the peak value in the narrow step mode may be referred to as a pair value in the narrow step mode, where:
(1) time series data corresponding to the peak value under the narrow step shape are equal to adjacent time series data;
(2) the difference values between the time-series data corresponding to the peak value in the narrow-step mode and the adjacent time-series data are both 0;
(3) a zero value pair composed of adjacent time sequence data with peak value and difference value both being 0 under the narrow step form, wherein the difference value of the former value point is larger than zero, and the difference value of the latter value point is smaller than zero;
specifically, step 13 can be defined by the conditions in the following equation:
Figure DEST_PATH_IMAGE005
screening to obtain the product;
wherein x ispeakIs a candidate peak in the candidate peak list, xnegIs a value point with a differential value less than zeroIndex (x) is the index corresponding to the value point x; limit is a set narrow step length limit parameter that can be set according to actual conditions.
In a specific example 2, the time-series data X = (X)1,x2,…,xm) The first peak is x7First peak value x7The previous value point of (a) is x6The latter value point is x8,diff(x6) > 0, and diff (x)5) If < 0, the first peak value can be determined as a candidate peak value;
the second peak value is x14The first several value points of the second peak are x in sequence10、x11、x12、x13The last several value points are x in sequence15、x16、x17Specifically, the method comprises the following steps:
diff(x10)>0;diff(x11)=0;diff(x12)=0;diff(x13)=0;diff(x14)=0;diff(x15)=0;diff(x16)=0;diff(x17)<0;
then, according to the above value point x10To x17The corresponding differential value shows the second peak value x14With x in the first few value points11、x12、x13All have a differential value of 0, and simultaneously with x in the latter value points15、x16Are all 0, the second peak value x14And value point x11、x12、x13、x15、x16At least one zero value pair with zero successive difference value is formed, and the previous value point of the zero value pair with zero successive difference value is x10Its corresponding differential value diff (x)10) Greater than 0, the subsequent value point of the zero value pair with the at least one continuous differential value being zero is x17Its corresponding differential value diff (x)17) < 0, therefore, the second peak x can be set14And determining the peak as a candidate peak.
In an alternative embodiment of the present invention, step 14 includes:
step 141, selecting a preset time window by taking any one of the candidate peaks in the candidate peak list as a center;
and 142, judging whether the candidate peak is the maximum value in the preset time window, if not, deleting the candidate peak from the candidate peak list to obtain a first target peak candidate list.
In this embodiment, because the candidate peak should be a local maximum, a preset time window is selected with a peak in the candidate peaks as a center, a value point of the maximum in the preset time window is screened out, if the value point of the maximum in the preset time window is a peak in the candidate peaks, the peak of the candidate peak is taken as a candidate peak in the candidate peak list, and if the value point of the maximum in the preset time window is not a peak in the candidate peaks, the peak of the candidate peak is deleted, and all candidate peaks are traversed to obtain the first target peak candidate list.
Wherein, the maximum value in the preset time window in the step 1412 is calculated by the following formula:
Figure 308235DEST_PATH_IMAGE006
wherein x ismaxIs the maximum value in the preset time window; i.e. icenterSubscript to current peak; win is the length of the preset time window.
In this embodiment, the preset time window is win, and the subscript i of the current peak is usedcenterCentered on the corresponding peak, from subscript icenterFinding the maximum value x in the front win/2 value points and in the back win/2 value points of the corresponding peak valuemaxWill determine that xmaxWhether or not it is a subscript icenterCorresponding peak value, if yes, subscript icenterThe corresponding peak value is taken as a first target candidate peak value, if not, the index i is taken ascenterThe corresponding peak is removed.
In an alternative embodiment of the present invention, step 15 includes:
adding all target candidate peaks of which the peak factors of the target candidate peaks in the first target peak candidate list are larger than a preset threshold valueAnd entering a second target peak list of the time series data. Optionally, the peak factor is given by the formula
Figure 458593DEST_PATH_IMAGE007
Obtaining; wherein, the Crest is a Crest factor;
Figure 256785DEST_PATH_IMAGE008
the absolute value of the candidate peak in the first target peak candidate list is obtained; x is the number ofrmsIs the valid value of the time series data within a window centered on the candidate peak;
the effective value is represented by the formula:
Figure 721264DEST_PATH_IMAGE009
calculating; wherein x isiIs the ith point in the time series; and N is the length of time sequence data participating in calculation.
In the embodiment, peak factors of all target candidate peaks are calculated, the peak factors are used for measuring fluctuation amplitude of the time series, and the peak factors are calculated by the ratio of the peak value of the time series data to the effective value RMS and used for representing the extreme degree of fluctuation of the peak value in the time series data; by the formula
Figure 921302DEST_PATH_IMAGE007
Calculated, wherein the effective value RMS may also be called the root mean square, by the formula
Figure 242561DEST_PATH_IMAGE009
The squares of all target candidate peak values are summed, the mean value is calculated, and finally, the root mean square (effective value RMS) is obtained through evolution operation.
Since small fluctuation in the time series data should not be identified as a peak in an actual operation and maintenance scene, the peak with weak fluctuation amplitude is called a pseudo peak, the pseudo peak in the time series data can be filtered by comparing the peak factor of the target candidate peak with a preset threshold through the above steps, and all target candidate peaks with the peak factor of the target candidate peak in the first target peak candidate list larger than the preset threshold are added into the second target peak list.
As shown in fig. 3 and fig. 4, in a specific embodiment 3, fig. 3 is a diagram illustrating that the peak value determination is not performed on the time series data in fig. 2 by the above method, and fig. 4 is a diagram illustrating that the peak value determination is performed on the time series data in fig. 2 by the above method, it can be seen that, in fig. 3, the local small-amplitude fluctuation is identified as a peak value, and a narrow step peak value in the data is missed, and in fig. 4, the narrow step is accurately determined as a peak value, and at the same time, the local small-amplitude fluctuation in the data is filtered out, which is more suitable for practical application requirements.
As shown in fig. 5, in a specific embodiment 4, in an actual operation and maintenance scenario, original time series data X = (X) is obtained by the operation and maintenance system1,x2,…,xm) Taking the input time sequence as an input time sequence, performing first-order difference operation on the input time sequence to obtain a difference sequence, selecting a preset time window win by taking a peak value in each candidate peak value as a center, calculating a maximum value in the preset time window win, comparing the maximum value with a peak value in the candidate peak values, screening peak values with the maximum value being the same as the peak value in the candidate peak values, calculating peak value factors of all the candidate peak values, and screening the peak value with the peak value factor of the candidate peak value being larger than a threshold value as a target candidate peak value (final output result).
As shown in fig. 6, step a1, initializes the parameters: the current subscript cur = 0; candidate peak index = -1; valid indicator flag = 0; candidate peak list peak _ list = null; the length limit threshold limit = L, where the limit parameter is an adjustable parameter, and the preferred custom range is [2,3,4 ];
step a2, traversing the differential sequence diff _ X, judging whether the current subscript exceeds the length of the differential sequence, if so, ending the process, if not, judging the differential value of the current subscript;
step a3, obtaining a difference value diff _ X [ cur ] at the current subscript cur, and entering the following different flows according to different values:
step a31, if diff _ X [ cur ] is 0, entering the following step a 4;
step a32, if diff _ X [ cur ] is 1, setting the effective indicator flag to 1, and assigning the current index cur to the candidate peak value index peak _ index;
step a33, if diff _ X [ cur ] is-1, further judging whether the indicator flag is 1, if not, directly entering step a 34; if the peak value length is 1, judging whether the peak value length exceeds a threshold limit; calculating the difference value between the current subscript cur and the candidate peak value subscript peak _ index, and judging whether the difference value is smaller than the length limit threshold value limit;
step a331, if the flag is greater than or equal to limit, setting the flag to 0, and entering the following step a 4;
step a332, if the index is smaller than the limit, adding the peak _ index candidate into the peak _ list candidate, setting the flag to 0, and entering the following step b 1;
step a4, adding 1 to the current index cur, judging whether the current index cur exceeds the boundary of the differential sequence, and entering the next cycle.
Based on specific embodiment 4, as shown in fig. 7, a window is set with the candidate peak as the center, and a subscript list with the candidate peak as the maximum value in the window is screened:
step b1, reading in the output result candidate peak subscript list peak _ list and the original input sequence X in FIG. 6;
step b2, initializing parameters: the current subscript cur = 0; the maximum list max _ list is set to null; the window length win, wherein the parameter of the window length is an adjustable parameter, and the value range is preferably set to [5,20 ];
step b3, traversing the candidate peak list peak _ list, judging whether the current subscript cur exceeds the list boundary, if so, directly ending the flow, and if not, entering step b 4;
step b4, taking the current subscript as the center and win as the window length, calculating the left and right boundaries of the window, wherein the left boundary l is the maximum value of cur-win/2 and 0, and the right boundary is the minimum value of cur + win/2 and the list length;
step b5, calculating the maximum value max (X [ l: r ]) in the window, and judging whether the current value X [ cur ] is the maximum value;
step b51, if the current value X [ cur ] is larger than or equal to the maximum value, adding the current candidate peak value subscript into the maximum value list max _ list, and entering step b 6;
step b52, if the current value is less than the maximum value, directly entering step b 6;
and step b6, adding 1 to the current subscript cur, judging whether the current subscript cur exceeds the boundary of the candidate peak list, and entering the next cycle.
Based on the specific embodiment 4, as shown in fig. 8, the peak factors in all the maximum value lists are calculated, and the peak subscripts with the peak factors larger than the threshold are screened as the final output result:
step c1, reading in the output result maximum value list max _ list and the original input sequence X in FIG. 7;
step c2, initializing parameters: the current subscript cur = 0; window length win; the result output list output _ list; the peak factor threshold value is an adjustable parameter, and the value range is preferably [ 1: 3 ];
step c3, traversing the maximum list max _ list, judging whether the current subscript exceeds the list boundary, if so, directly ending the flow, otherwise, entering step c 4;
step c4, taking the current subscript as the center and win as the window length, calculating the window boundary, and obtaining the sequence X [ l: r ] in the window;
step c5, calculating the effective value RMS of the window sequence by taking the square of each value in the window sequence X [ l: r ], then calculating the mean value of the square result, and finally performing the evolution operation to obtain the root mean square value (RMS value);
step C6, calculating the peak value factor C of the current point, and dividing the current point value X [ cur ] by the effective value RMS to obtain the peak value factor of the current point;
step c7, judging whether the peak value factor of the current point is larger than or equal to the threshold value threshold; if so, adding the current subscript cur into the result output list output _ list, adding 1 into the current subscript, and entering the next cycle; if not, directly adding 1 to the current subscript, and entering the next cycle;
in step c8, output _ list is the final determined peak output result.
Embodiments of the invention provide for generating a time series data; carrying out differential operation processing on data points in the time sequence data to obtain a differential sequence of the time sequence data; acquiring a candidate peak list of the time sequence data according to the difference sequence; screening candidate peaks in the candidate peak list to obtain a first target peak candidate list; obtaining a second target peak list of the time sequence data according to a peak factor of a candidate peak in the first target peak candidate list and a preset threshold; the problem that narrow step peak values in operation and maintenance time sequence data are missed to be judged is solved, accuracy is greatly improved, and troubleshooting efficiency of users can be improved.
As shown in fig. 9, an embodiment of the present invention further provides a peak detection apparatus 90 for time-series data, the apparatus 90 comprising:
an obtaining module 91, configured to obtain time series data;
a processing module 92, configured to perform differential operation processing on data points in the time-series data to obtain a differential sequence of the time-series data; acquiring a candidate peak list of the time sequence data according to the difference sequence; screening candidate peaks in the candidate peak list to obtain a first target peak candidate list; and obtaining a second target peak list of the time sequence data according to the peak factor of the candidate peak in the first target peak candidate list and a preset threshold value.
Optionally, the difference sequence DIFF _ X = DIFF (X);
x is time-series data, X = (X)1,x2,…,xm);
diff(xi)=xi+1-xiWherein i =1,2, …, m-1, m is the number of data points in the time series data;
wherein x isiIs the current data point with index i; x is the number ofi+1The data point that is subsequent to the current data point.
Optionally, obtaining all candidate peaks of the time series data according to the difference sequence includes:
taking a list formed by peaks of which the differential value of the previous value point is greater than zero and the differential value of the next value point is less than zero in the differential sequence as a candidate peak list of the time sequence data; and/or
And forming a list of peaks, in which at least one continuous zero-value pair with a difference value of zero is formed between adjacent value points in the differential sequence, the difference value of a previous value point of the zero-value pair with the at least one continuous difference value of zero is greater than zero, and the difference value of a next value point of the zero-value pair with the at least one continuous difference value of zero is less than zero, as the candidate peak list of the time sequence data.
Optionally, the screening the candidate peaks in the candidate peak list to obtain a first target peak candidate list includes:
selecting a preset time window by taking any one of the candidate peaks in the candidate peak list as a center;
and judging whether the candidate peak value is the maximum value in the preset time window, if not, deleting the candidate peak value from the candidate peak value list to obtain a first target peak value candidate list.
Optionally, the maximum value in the preset time window is calculated by the following formula:
Figure 262470DEST_PATH_IMAGE006
wherein x ismaxIs the maximum value in the preset time window; i.e. icenterSubscript to current peak; win is the length of the preset time window.
Optionally, obtaining a second target peak list of the time series data according to a peak factor of a candidate peak in the first target peak candidate list and a preset threshold, where the obtaining includes:
adding all target candidate peaks in the first target peak candidate list whose peak factors of the target candidate peaks are greater than a preset threshold to a second target peak list of the time series data.
Optionally, the peak factor is given by the formula
Figure 339097DEST_PATH_IMAGE007
Obtaining; wherein, the Crest is a Crest factor;
Figure 128061DEST_PATH_IMAGE008
the absolute value of the candidate peak in the first target peak candidate list is obtained; x is the number ofrmsIs the valid value of the time series data within a window centered on the candidate peak;
the effective value is represented by the formula:
Figure 89064DEST_PATH_IMAGE009
calculating; wherein x isiIs the ith point in the time series data; and N is the length of time sequence data participating in calculation.
It should be noted that the apparatus is an apparatus corresponding to the above method, and all the implementations in the above method embodiment are applicable to the embodiment of the apparatus, and the same technical effects can be achieved.
Embodiments of the present invention also provide a computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the corresponding operation of the method.
Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method as described above.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
Furthermore, it is to be noted that in the device and method of the invention, it is obvious that the individual components or steps can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of performing the series of processes described above may naturally be performed chronologically in the order described, but need not necessarily be performed chronologically, and some steps may be performed in parallel or independently of each other. It will be understood by those skilled in the art that all or any of the steps or elements of the method and apparatus of the present invention may be implemented in any computing device (including processors, storage media, etc.) or network of computing devices, in hardware, firmware, software, or any combination thereof, which can be implemented by those skilled in the art using their basic programming skills after reading the description of the present invention.
Thus, the objects of the invention may also be achieved by running a program or a set of programs on any computing device. The computing device may be a general purpose device as is well known. The object of the invention is thus also achieved solely by providing a program product comprising program code for implementing the method or the apparatus. That is, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. It is to be understood that the storage medium may be any known storage medium or any storage medium developed in the future. It is further noted that in the apparatus and method of the present invention, it is apparent that each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of executing the series of processes described above may naturally be executed chronologically in the order described, but need not necessarily be executed chronologically. Some steps may be performed in parallel or independently of each other.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A method for peak detection of time series data, comprising:
acquiring time sequence data;
carrying out differential operation processing on data points in the time sequence data to obtain a differential sequence of the time sequence data;
acquiring a candidate peak list of the time sequence data according to the difference sequence;
screening candidate peaks in the candidate peak list to obtain a first target peak candidate list;
and obtaining a second target peak list of the time sequence data according to the peak factor of the candidate peak in the first target peak candidate list and a preset threshold value.
2. The peak detection method for time-series data according to claim 1, wherein the difference sequence DIFF _ X = DIFF (X); x is time-series data, X = (X)1,x2,…,xm);diff(xi)=xi+1-xiWherein i =1,2, …, m-1, m is the number of data points in the time series data; wherein x isiIs the current data point with index i; x is the number ofi+1The data point that is subsequent to the current data point.
3. The method according to claim 1, wherein obtaining the candidate peak list of the time series data according to the difference sequence comprises:
taking a list formed by peaks of which the differential value of the previous value point is greater than zero and the differential value of the next value point is less than zero in the differential sequence as a candidate peak list of the time sequence data; and/or
And forming a list of peaks, in which at least one continuous zero-value pair with a difference value of zero is formed between adjacent value points in the differential sequence, the difference value of a previous value point of the zero-value pair with the at least one continuous difference value of zero is greater than zero, and the difference value of a next value point of the zero-value pair with the at least one continuous difference value of zero is less than zero, as the candidate peak list of the time sequence data.
4. The method of claim 1, wherein the step of screening candidate peaks in the candidate peak list to obtain a first target peak candidate list comprises:
selecting a preset time window by taking any one of the candidate peaks in the candidate peak list as a center;
and judging whether the candidate peak value is the maximum value in the preset time window, if not, deleting the candidate peak value from the candidate peak value list to obtain a first target peak value candidate list.
5. The peak detection method of time series data according to claim 4, wherein the maximum value in the preset time window is calculated by the following formula:
Figure DEST_PATH_IMAGE002
wherein x ismaxIs the maximum value in the preset time window; i.e. icenterSubscript to current peak; win is the length of the preset time window.
6. The method of claim 1, wherein obtaining a second target peak list of the time series data according to a peak factor of a candidate peak in the first target peak candidate list and a preset threshold comprises:
adding all target candidate peaks in the first target peak candidate list whose peak factors of the target candidate peaks are greater than a preset threshold to a second target peak list of the time series data.
7. The method of claim 1 or 6, wherein the peak factor is determined by a formula
Figure DEST_PATH_IMAGE004
Obtaining; wherein, the Crest is a Crest factor;
Figure DEST_PATH_IMAGE006
the absolute value of the candidate peak in the first target peak candidate list is obtained; x is the number ofrmsIs the valid value of the time series data within a window centered on the candidate peak;
the effective value is represented by the formula:
Figure DEST_PATH_IMAGE008
calculating; wherein x isiIs the ith point in the time series data; and N is the length of time sequence data participating in calculation.
8. A peak detection device for time-series data, comprising:
the acquisition module is used for acquiring the time sequence data;
the processing module is used for carrying out differential operation processing on data points in the time series data to obtain a differential sequence of the time series data; acquiring a candidate peak list of the time sequence data according to the difference sequence; screening candidate peaks in the candidate peak list to obtain a first target peak candidate list; and obtaining a second target peak list of the time sequence data according to the peak factor of the candidate peak in the first target peak candidate list and a preset threshold value.
9. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction which causes the processor to execute the corresponding operation of the method according to any one of claims 1-7.
10. A computer-readable storage medium having stored thereon instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN202111614786.2A 2021-12-28 2021-12-28 Time series data peak value detection method, device and equipment Pending CN113986711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111614786.2A CN113986711A (en) 2021-12-28 2021-12-28 Time series data peak value detection method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111614786.2A CN113986711A (en) 2021-12-28 2021-12-28 Time series data peak value detection method, device and equipment

Publications (1)

Publication Number Publication Date
CN113986711A true CN113986711A (en) 2022-01-28

Family

ID=79734568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111614786.2A Pending CN113986711A (en) 2021-12-28 2021-12-28 Time series data peak value detection method, device and equipment

Country Status (1)

Country Link
CN (1) CN113986711A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105488772A (en) * 2016-01-26 2016-04-13 北京市环境保护监测中心 Sensor signal peak value detection method
CN105962920A (en) * 2016-04-20 2016-09-28 广州视源电子科技股份有限公司 Blood pressure and pulse rate detection method and system thereof
US20170363072A1 (en) * 2016-06-21 2017-12-21 Doosan Heavy Industries & Construction Co., Ltd. Vibration monitoring and diagnosing system for wind power generator
CN108151869A (en) * 2017-11-27 2018-06-12 广州航新航空科技股份有限公司 A kind of mechanical oscillation characteristic index extracting method, system and device
CN111929074A (en) * 2020-08-19 2020-11-13 北京经纬恒润科技有限公司 Vehicle mechanical rotating part fault diagnosis method and device
CN112364069A (en) * 2020-09-14 2021-02-12 光大环境科技(中国)有限公司 Thermocouple fault early warning method and system based on time sequence and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105488772A (en) * 2016-01-26 2016-04-13 北京市环境保护监测中心 Sensor signal peak value detection method
CN105962920A (en) * 2016-04-20 2016-09-28 广州视源电子科技股份有限公司 Blood pressure and pulse rate detection method and system thereof
US20170363072A1 (en) * 2016-06-21 2017-12-21 Doosan Heavy Industries & Construction Co., Ltd. Vibration monitoring and diagnosing system for wind power generator
CN108151869A (en) * 2017-11-27 2018-06-12 广州航新航空科技股份有限公司 A kind of mechanical oscillation characteristic index extracting method, system and device
CN111929074A (en) * 2020-08-19 2020-11-13 北京经纬恒润科技有限公司 Vehicle mechanical rotating part fault diagnosis method and device
CN112364069A (en) * 2020-09-14 2021-02-12 光大环境科技(中国)有限公司 Thermocouple fault early warning method and system based on time sequence and storage medium

Similar Documents

Publication Publication Date Title
CN110839016B (en) Abnormal flow monitoring method, device, equipment and storage medium
CN108763346B (en) Abnormal point processing method for sliding window box type graph median filtering
CN107563433B (en) Infrared small target detection method based on convolutional neural network
CN111177505A (en) Training method, recommendation method and device of index anomaly detection model
WO2014198052A1 (en) Fast grouping of time series
CN112416643A (en) Unsupervised anomaly detection method and unsupervised anomaly detection device
CN108549078B (en) Cross-channel combination and detection method for radar pulse signals
CN113325277A (en) Partial discharge processing method
CN112416662A (en) Multi-time series data anomaly detection method and device
CN112821559A (en) Non-invasive household appliance load depth re-identification method
CN111445108A (en) Data-driven power distribution network line variation relation diagnosis method, device and system
CN114978956A (en) Method and device for detecting abnormal performance mutation points of network equipment in smart city
Ferreira et al. Exploiting principal curves for power quality monitoring
CN117290788B (en) Power distribution network fault identification method and system based on improved wavelet transformation algorithm
JP6148229B2 (en) Dynamic clustering of transition signals
CN107392948B (en) Image registration method of amplitude-division real-time polarization imaging system
CN113986711A (en) Time series data peak value detection method, device and equipment
CN117290679A (en) Running state detection method and device of current transformer and electronic equipment
CN110632563A (en) Intra-pulse frequency coding signal parameter measuring method based on short-time Fourier transform
CN115510998A (en) Transaction abnormal value detection method and device
CN114397569A (en) Circuit breaker fault arc detection method based on VMD parameter optimization and sample entropy
Ruchay et al. Removal of impulsive noise from color images with cascade switching algorithm
CN110728665B (en) SAR image change detection method based on parallel probabilistic neural network
CN113740671A (en) Fault arc identification method based on VMD and ELM
Zhang et al. Nature scene statistics approach based on ICA for no-reference image quality assessment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220128