Periodicity detection and period length estimation in time series

By combining detection methods in the time domain and frequency domain, and using technologies such as trend extraction filters and wavelet transform, the problem of detecting multiple unknown periodic patterns in complex time series is solved, and accuracy and flexibility are improved.

CN112989266BActive Publication Date: 2024-09-17ALIBABA GROUP HOLDING LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202011139156.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-12-02
Filing Date
2020-10-22
Publication Date
2024-09-17
Estimated Expiration
2040-10-22

AI Technical Summary

Technical Problem

Existing periodicity detection methods are difficult to accurately detect multiple unknown periodic patterns when faced with complex time series data, resulting in poor performance and false alarms.

Method used

Through combined detection and estimation in the time domain and frequency domain, we use techniques such as trend extraction filters, maximum overlap discrete wavelet transform, and Huber period diagrams to decompose time series data and detect and verify whether periodic component candidates in the frequency domain are in the time domain. The true periodic component in .

Benefits of technology

It achieves accurate detection and estimation of multiple unknown periodic patterns, reduces the false alarm rate, and improves the flexibility and accuracy of periodic detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112989266B_ABST
    Figure CN112989266B_ABST
Patent Text Reader

Abstract

Input time series data of a specific time length may be received and preprocessed to obtain processed time series data. The processed time series data may then be decomposed into multiple time series data of the specific time length at different levels, and a detection of whether a time series data at a specific level includes a periodic component candidate in the frequency domain may be performed. In response to detecting that the time series data at the specific level includes a periodic component candidate in the frequency domain, a verification may be performed to determine whether the periodic component candidate in the time series data at the specific level is a true periodic component of the input time series data in the time domain.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Periodicity detection is an important task in time series analysis and plays a vital role in many time series tasks, including but not limited to classification, forecasting, anomaly detection, clustering, and compression. However, due to the complexity of time series, accurate and robust periodicity detection is difficult, though not impossible. The difficulty in accurate and robust periodicity detection stems from the non-stationary nature of time series, dynamic and complex periodic patterns in time series (including interlaced patterns), noise and outliers, and the lack of knowledge about the number of periodic patterns in time series.

[0002] For example, the number of users visiting a gaming website or a shopping website may exhibit multiple periodic patterns, which may include a weekly periodic pattern (e.g., a sudden increase in the number of users during each weekend), a monthly periodic pattern (e.g., a sudden increase or decrease in the number of users on certain days of each month), a yearly periodic pattern (e.g., a sudden increase in the number of users during a specific holiday each year), etc. Since the respective time periods and properties of these periodic patterns may or may not be known in advance, this makes periodicity detection more complicated, leading to the development of complex periodicity detection methods, which may require a lot of calculations and cannot adapt to various situations. When the number of basic periodic patterns is unknown and / or more than one, the performance of these existing periodicity detection methods is poor and false alarms may occur. Summary of the invention

[0003] This Summary introduces a simplified concept of a periodicity detection system, which is further described in the Detailed Description below. This Summary is neither intended to identify essential features of the claimed subject matter nor to be used to limit the scope of the claimed subject matter.

[0004] The present invention describes an example implementation of a periodicity detection system. In the implementation, input time series data of a specific time length can be received and preprocessed to obtain processed time series data. In the implementation, the preprocessing can include at least removing trends in the input time series data. Then, the processed time series data can be decomposed into multiple time series data of the specific time length at different levels, and a detection of whether a time series data at a specific level includes a periodic component candidate in the frequency domain can be performed. In response to detecting that the time series data at the specific level includes a periodic component candidate in the frequency domain, a verification can be performed to determine whether the periodic component candidate in the time series data at the specific level is a true periodic component of the input time series data in the time domain. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] The detailed description is based on the accompanying drawings. In the drawings, the leftmost digit(s) of a reference number indicates the drawing in which the reference number first appears. The use of the same reference number in different drawings indicates that the items are similar or identical.

[0006] Figure 1 An example of an environment in which a periodic detection system may be used is shown.

[0007] Figure 2 An example periodicity detection system is shown in more detail.

[0008] Figure 3 An example of a method of periodicity detection is shown.

[0009] Figure 4 Intermediate results of an example method of periodicity detection are shown. DETAILED DESCRIPTION

[0010] Overview

[0011] As mentioned above, periodicity detection is an important task in time series analysis. However, due to the nature of time series, periodicity detection faces many technical obstacles, which has led to the development of many complex periodicity detection algorithms. However, these existing periodicity detection algorithms are either computationally intensive or not flexible enough to adapt to different conditions. For example, when the number of underlying periodic patterns is unknown and / or more than one, existing periodicity detection methods have poor performance and produce false positives.

[0012] The present invention describes an example periodicity detection system. The periodicity detection system can receive a time series with an unknown number of periodic patterns with unknown time periods. The periodicity detection system can detect and estimate the number and time periods of periodic patterns through a combination of detection and estimation in both the time domain and the frequency domain.

[0013] In an implementation, a periodicity detection system may receive input time series data of a specific time length. The periodicity detection system may process the input time series data to obtain processed time series data. In an implementation, the periodicity detection system may process the input time series data by applying a trend extraction filter to the input time series data to extract a trend component from the input sequence data. Examples of trend extraction filters may include, but are not limited to, Hodrick-Prescott (HP) filters. In addition, the periodicity detection system may further process the input time series data by performing normalization on the input time series data and / or removing outliers from the input time series data.

[0014] After processing the input time series data, the periodicity detection system can also decompose the processed time series data into multiple time series data of the specific time length at different levels according to a specific decomposition method. In implementation, the specific decomposition method may include a transformation method for transforming the processed time series data from the time domain (or the first domain) into the time-frequency domain (or the second domain), that is, decomposing the processed time series data into multiple time series data (or multiple time series components) in the time-frequency domain. In implementation, the specific decomposition method may include but is not limited to maximum overlap discrete wavelet transform, wavelet transform, Gabor transform, etc. In implementation, depending on the type of specific decomposition method (or transformation method) used, the transformed components of the time series in the time-frequency domain can be represented differently.

[0015] In implementation, the periodicity detection system may determine or detect whether there is a potential periodic component or periodic component candidate in the frequency domain. By way of example and not limitation, after decomposing the processed time series data into multiple time series data of different levels and specific time lengths, the periodicity detection system may detect whether a time series data of a specific level in the frequency domain (or a specific time series component in the frequency domain) includes a periodic component candidate.

[0016] In implementation, the periodicity detection system can detect whether a piece of time series data at a specific level includes a periodic component candidate by obtaining a periodogram of the piece of time series data at a specific level in the frequency domain and determining whether the periodogram satisfies a predetermined hypothesis test. If the periodogram passes the predetermined hypothesis test, the periodicity detection system can determine that the piece of time series data at the specific level includes a periodic component candidate. In implementation, the periodicity detection system can obtain one or more pieces of time series data at one or more specific levels, which are detected or determined to include periodic component candidates.

[0017] In an implementation, in response to detecting or determining that one or more time series data at one or more specific levels include periodic component candidates in the frequency domain, the periodicity detection system may verify whether the one or more periodic component candidates in the one or more time series data at the one or more specific levels are true periodic components of the input time series data. In an implementation, the periodicity detection system may verify whether the one or more periodic component candidates in the one or more time series data at the one or more specific levels are true periodic components of the input time series data in the time domain.

[0018] As an example and not limitation, the periodicity detection system may perform and obtain an autocorrelation of a piece of time series data including a specific level of a periodic component candidate in the time domain, and calculate the median distance of multiple peaks whose respective heights in the autocorrelation are greater than a predetermined threshold. The periodicity detection system may then verify whether the periodic component is a true periodic component candidate based on whether the median distance is within a predetermined range associated with the specific level of the piece of time series data. For example, the periodicity detection system may verify that the periodic component is a true periodic component candidate whose period length is the median distance of the multiple peaks in response to determining that the median distance is within a predetermined range associated with the specific level of the piece of time series data.

[0019] In implementation, the functions described herein to be performed by the periodicity detection system may be performed by a plurality of separate units or services. For example, a receiving service may receive input time series data, and a preprocessing service may preprocess the time series data to obtain preprocessed time series data. A decomposition service may decompose the preprocessed time series data into multiple time series data of specific time lengths at different levels, and a detection service may determine or detect whether a time series data of a predetermined level in the frequency domain includes a periodic component candidate. In implementation, a verification service may verify whether the periodic component candidate in the time series data of the specific level is a true periodic component of the input time series data in the time domain.

[0020] Furthermore, although in the examples described herein the periodicity detection system may be implemented as a combination of software and hardware installed in a single device, in other examples the periodicity detection system may be implemented and distributed across multiple devices, or as a service provided in one or more computing devices over a network and / or in a cloud computing architecture.

[0021] This application describes a variety of implementations and implementations. The following section describes an example framework suitable for practicing various implementations. Next, this application describes example systems, devices, and processes for implementing a periodicity detection system.

[0022] Example Environment

[0023] Figure 1An example environment 100 is shown that can be used to implement a periodicity detection system. The environment 100 may include a periodicity detection system 102. In this example, the periodicity detection system 102 is described as existing as a single entity or device. In some cases, the periodicity detection system 102 may be included in a computing device, such as a client device 104. In other cases, the periodicity detection system 102 may be included in one or more servers, such as one or more servers 106 in a cloud. For example, some or all of the functionality of the periodicity detection system 102 may be included in or provided by a client device 104 and / or one or more servers 106 connected and communicating via a network 108.

[0024] In implementation, the client device 104 may be implemented as any of a variety of computing devices, including but not limited to a desktop computer, a notebook or portable computer, a handheld device, a netbook, an Internet appliance, a tablet or tablet computer, a mobile device (e.g., a mobile phone, a personal digital assistant, a smart phone, etc.), a server computer, etc., or a combination thereof.

[0025] The network 108 may be a wireless or wired network, or a combination thereof. The network 108 may be a collection of individual networks that are interconnected with each other and function as a single large network (e.g., the Internet or an intranet). Examples of such individual networks include, but are not limited to, telephone networks, cable networks, local area networks (LANs), wide area networks (WANs), and metropolitan area networks (MANs). In addition, the individual networks may be wireless or wired networks, or a combination thereof. A wired network may include an electrical carrier connection (e.g., a communications cable, etc.) and / or an optical carrier or connection (e.g., a fiber optic connection, etc.). A wireless network may include, for example, a WiFi network, other radio frequency networks (e.g., Zigbee, etc.

[0026] In implementation, the periodicity detection system 102 may receive a request for determining or estimating the number of periodicities and respective time periods in the input time series data. After receiving the request, the periodicity detection system 102 may process the input time series data and determine the number of periodicities and respective time periods in the input time series data using the periodicity detection method proposed in the present invention.

[0027] Example Periodicity Detection System

[0028] Figure 2The periodicity detection system 102 is shown in more detail. In implementation, the periodicity detection system 102 may include, but is not limited to, one or more processors 202, memory 204, and program data 206. In implementation, the periodicity detection system 102 may further include an input / output (I / O) interface 208 and / or a network interface 210. In implementation, certain functions of the periodicity detection system 102 may be implemented using hardware, such as an ASIC (i.e., an application specific integrated circuit), an FPGA (i.e., a field programmable gate array), and / or other hardware.

[0029] In an implementation, the processor 202 may be configured to execute instructions stored in the memory 204 and / or received from the input / output interface 208 and / or the network interface 210. In an implementation, the processor 202 may be implemented as one or more hardware processors, including, for example, a microprocessor, a dedicated instruction set processor, a physical processing unit (PPU), a central processing unit (CPU), a graphics processing unit, a digital signal processor, a tensor processing unit, etc. Additionally or alternatively, the functions described herein may be performed at least in part by one or more hardware logic components. For example, but not limitation, illustrative types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), etc.

[0030] Memory 204 may include computer-readable media in the form of volatile memory, such as random access memory (RAM), and / or nonvolatile memory, such as read-only memory (ROM) or flash RAM. Memory 204 is an example of a computer-readable medium.

[0031] Computer readable media may include volatile or non-volatile types, removable or non-removable media, which may use any method or technology to implement the storage of information. Information may include computer readable instructions, data structures, program modules or other data. Examples of computer readable media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electronically erasable programmable read-only memory (EEPROM), flash memory or other internal storage technology, compact disc read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, cassettes, disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include any transient media, such as modulated data signals and carrier waves.

[0032] Although in this example, only hardware components are described in the periodicity detection system 102, in other cases, the periodicity detection system 102 may further include other hardware components and / or other software components, such as program units, to execute instructions for performing various operations stored in the memory 204. For example, the periodicity detection system 102 may further include a time series database 212 storing time series data.

[0033] Method Example

[0034] Figure 3 A schematic diagram depicting an example method of periodicity detection is shown. Figure 3 The method can but does not have to be Figure 1 Implemented and used in the environment Figure 2 For ease of explanation, refer to Figure 1 and Figure 2 Method 300 is described. However, method 300 may alternatively be implemented in other environments and / or using other systems.

[0035] Method 300 is described in the general context of computer executable instructions. Typically, computer executable instructions may include routines, programs, objects, components, data structures, processes, modules, functions, etc. that perform specific functions or implement specific abstract data types. In addition, each example method is shown as a collection of boxes in a logical flow chart, which represents a sequence of operations that can be implemented in hardware, software, firmware, or a combination thereof. The order in which the method is described is not intended to be understood as a limitation, and any number of the described method boxes can be combined in any order to implement the method or an alternative method. Additionally, individual boxes can be omitted from the method without departing from the spirit and scope of the subject matter described herein. In the context of software, a box represents a computer instruction that, when executed by one or more processors, performs the operations listed. In the context of hardware, some or all boxes may represent an application-specific integrated circuit (ASIC) or other physical component that performs the operations listed.

[0036] Return to reference Figure 3 At block 302 , the periodicity detection system 102 may receive input time series data of a specific time length.

[0037] In implementations, the periodicity detection system 102 may receive input time series data (ie, data associated with an input time series).

[0038] The input time series data may include or correspond to observation data obtained or collected for a specific application. Examples of input time series data may include, but are not limited to, the number of users visiting a website per hour or day, the percentage or amount of computing resources consumed per second, every ten seconds, or every minute, etc.

[0039] In implementation, the input time series data may include multiple different components. As an example and not limitation, the input time series data may include, but is not limited to, one or more seasonal / periodic components (hereinafter referred to as periodic components), trend components, noise components, and outlier components. For example, the input time series data may be modeled as follows:

[0040]

[0041] where y t represents the observed data point of the input time series at time t, τ t represents the trend component, The period is T i The sum of one or more seasonal / periodic components i=1,…,m, and r t =a t +n t represents the remaining components, which may include the noise component n t and possible outlier component a t .

[0042] At block 304 , the periodicity detection system 102 may perform data pre-processing on the input time series data to obtain processed time series data.

[0043] In implementation, the periodicity detection system 102 may pre-process the input time series data before determining or estimating the number of periodic components and the respective period lengths in the input time series. In implementation, the periodicity detection system 102 may perform data processing (which may include but is not limited to data standardization, de-trending, outlier removal, etc.) on the input time series data to generate processed time series data. In implementation, the periodicity detection system 102 may apply a noise / outlier removal filter to remove noise and outliers from the input time series data. Examples of noise / outlier filters may include but are not limited to bilateral filters, Kalman filters, Gaussian filters, etc. In addition, after removing the trend component, the noise component, and the outlier component from the input time series data, the periodicity detection system 102 may then standardize the input time series data.

[0044] In implementation, the periodicity detection system 102 may further estimate the trend component in the input time series data and then perform detrending on the input time series data. As an example and not limitation, the periodicity detection system 102 may select an HP (Hodrick-Prescott) trend filter and apply it to the input time series data to obtain the estimated trend component. It is given as follows:

[0045]

[0046] In obtaining the estimated trend component Afterwards, the periodicity detection system 102 may detrend the input time series data by removing the estimated trend component from the input time series data, i.e.

[0047] Although in this example, the HP (Hodrick-Prescott) trend filter is said to be used as a detrending filter and applied to the input time series data, in other cases, other detrending filters can be used to estimate the trend component and remove the trend component from the input time series data. For example, the periodicity detection system 102 can apply a linear regression filter (or linear regression) to the input time series data to estimate the trend component and remove the trend component from the input time series data.

[0048] At block 306 , the periodicity detection system 102 may decompose the processed time series data in the first domain into a plurality of time series data of a specific time length at a plurality of different levels in a second domain different from the first domain.

[0049] In implementation, after preprocessing the input time series data to obtain the processed time series data, the periodicity detection system 102 may decompose the processed time series data into multiple time series data of different levels of specific time lengths according to a specific decomposition method. In implementation, the specific decomposition method may include a transformation method that transforms the processed time series data from the time domain (i.e., the first domain) to the time-frequency domain (i.e., the second domain), and decomposes the processed time series data into multiple time series data (or referred to as multiple time series components) in the time-frequency domain. As an example and not a limitation, the specific decomposition method may include, but is not limited to, maximum overlap discrete wavelet transform (MODWT), wavelet transform, Gabor transform, Fourier transform, etc.

[0050] As an example and not a limitation, this article uses the maximum overlap discrete wavelet transform as an example to illustrate how the periodicity detection system 102 decomposes the processed time series data into multiple time series data of different levels of specific time lengths to facilitate periodicity detection. In implementation, the maximum overlap discrete wavelet transform can isolate multiple periodic components that are intertwined with each other. In implementation, the maximum overlap discrete wavelet transform described herein has the following advantages: it can handle any sample size (i.e., the size or time length of the input time series data), has increased resolution on a coarse scale, and has a more asymptotically effective wavelet variance estimator than other transforms (e.g., discrete wavelet transform).

[0051] In this example, the Daubechies wavelet based on MODWT is used. In the implementation, when MODWT is applied to the processed time series data y t ′, the obtained wavelet coefficient w j,t and the scale factor v j,t Given by:

[0052]

[0053] in and are the j-th level wavelet filter and the scale filter. The filter width is L j =(2 j -1)(L1-1), where L1 is the width of the unit-level Daubechies wavelet coefficient.

[0054] In real-world scenarios, time series (e.g., input time series) are often non-stationary, and the noise therein is often not Gaussian. Therefore, the decomposition method used by the periodicity detection system 102 needs to overcome these disadvantages or at least overcome them to some extent. In this example using MODWT, if y t ′ is a d-order stationary time series, then this means that y t ′ is non-stationary, and its d-order backward difference is stationary. Given a specific wavelet coefficient process definition For t ≥ L j -1 (i.e., non-boundary coefficient), is equal to the wavelet coefficient w in equation (3) j,t In this case, the following properties hold for the Dobesis MODWT:

[0055] In the implementation, if the wavelet filter length L j ≥2d, then is a stationary process and has only short-term correlation with the power spectral density (PSD) given by:

[0056]

[0057] in, yes PSD.

[0058] In addition, if y′ t is a non-Gaussian process, then the wavelet coefficients of the Dobechy MODWT will also be close to Gaussian due to the following properties:

[0059] In the implementation, for certain non-Gaussian processes, w j,tApproximately Gaussian (especially for large levels j), since linear filtering tends to induce Gaussianity.

[0060] Therefore, even if the input time series is a non-Gaussian process with long memory and high correlation, the transform coefficients of the decomposition method (in this case, the wavelet coefficients from MODWT) can be made approximately Gaussian, uncorrelated, and stationary, thereby improving the performance of periodicity detection of the input time series.

[0061] At block 308 , the periodicity detection system 102 may optionally calculate respective attributes of the plurality of time series data at the plurality of different levels in the second domain, and sort the plurality of different levels based on the respective attributes of the plurality of time series data at the plurality of different levels.

[0062] In implementation, the periodicity detection system 102 may calculate or estimate one or more attributes associated with a time series data at each level in the second domain (e.g., the time-frequency domain). In implementation, the one or more attributes associated with a time series data at a certain level may include information that helps to evaluate or estimate the probability or possibility of having a periodic pattern (or periodic component) at that level. In implementation, the one or more attributes associated with a time series data at a certain level in the second domain may include, but are not limited to, the wavelet variance of that level. In implementation, the periodicity detection system 102 may sort multiple time series data of specific time lengths at multiple different levels according to the order of the respective wavelet variances of the multiple time series data at multiple different levels.

[0063] As an example but not a limitation, the above example of MODWT is used in this article for illustration. After decomposing the processed time series data into multiple time series data at multiple different levels, based on the energy conservation of MODWT, for the J0 level, This may lead to a wavelet variance decomposition as in and are the jth level empirical wavelet variance and level J0 empirical scale variance respectively. If y′ is stationary, then In this way, wavelet variance can provide a scale-based analysis of variance (ANOVA) for time series and provide an intuitive explanation of how the time series is constructed.

[0064] In implementation, due to its robust and efficient properties, in this example, the biweight midvariance can be used as a robust estimate of the wavelet variance. In addition, for the purpose of unbiased variance estimation, the first L j -1 wavelet coefficients, because the wavelet transform introduces a period extension as defined in equation (3). In implementation, the following formula can be used for robust unbiased estimation of the wavelet variance:

[0065]

[0066] Where I(x) is the indicator function, u t Calculate or define u t =(w j,t -Med(w j,t )) / (9·MAD(w j,t )), and M j =NL j +1 is the number of non-boundary coefficients at level j. Med(x) and MAD(x) are the median absolute deviation and mean absolute deviation, respectively.

[0067] In implementation, the wavelet variance estimate helps locate the periodic component of the time series in the frequency domain, because the wavelet variance estimate can be considered as a rough estimate of the PSD. In implementation, the j-th level wavelet variance estimate is approximately equal to the nominal octave passband 1 / 2 j+1 ≤|f|≤1 / 2 j The integral of the PSD at

[0068] Furthermore, in this example the wavelet filter h in equation (3) j,l A bandpass filter can be implemented with a nominal passband of 1 / 2 j+1 ≤|f|≤1 / 2 j Therefore, if the processed time series y t The periodic component of ′ is located at 1 / 2 j+1 ≤|f|≤1 / 2 j If the nominal passband is within the range of , this periodic component can be filtered into the jth wavelet coefficients, and a large Table 1 below shows the relationship between possible period lengths and wavelet levels.

[0069] Table 1: Possible period lengths of periodic components at different MODWT levels

[0070] level 1 2 … n … <![CDATA[log2N]]> T 2~4 4~8 … <![CDATA[2 n ~2 n+1 ]]> N~∞

[0071] In implementation, after obtaining the respective wavelet variances (or variances in dual weights) of the plurality of different levels, the periodicity detection system 102 may sort or rank the plurality of different levels according to the descending order of the magnitude of the respective wavelet variances (or variances in dual weights). In implementation, the periodicity detection system 102 may select a predetermined number of different levels from the plurality of different levels based on the ranking of the estimated corresponding wavelet variances (or variances in dual weights).

[0072] By way of example and not limitation, the periodicity detection system 102 may select a predetermined number (e.g., two, five, ten, twenty, etc.) of different levels, wherein the corresponding wavelet variances (or bi-weighted variances) are arranged in the top few (e.g., two, five, ten, twenty, etc.) ranking positions (i.e., the corresponding top two positions, the corresponding top five positions, the corresponding top ten positions, the corresponding top twenty positions, etc.) in descending order of the values ​​of the respective wavelet variances (or bi-weighted variances).

[0073] Alternatively, the periodicity detection system 102 may not perform the selection, and may allow all of the multiple pieces of time series data at the multiple different levels to be examined for periodic component candidates, as described in the next box.

[0074] At block 310 , the periodicity detection system 102 may detect or determine whether a piece of time series data at a particular level includes a periodic component candidate in the second domain.

[0075] In implementation, the periodicity detection system 102 may examine a corresponding piece of time series data at each of a plurality of different levels (or a predetermined number of levels if sorting and selection are performed at block 308) in the second domain and determine whether the corresponding piece of time series data includes a periodic component candidate. In implementation, the periodicity detection system 102 may perform a statistical test on a parameter associated with the corresponding piece of time series data to determine whether the corresponding piece of time series data includes a periodic component candidate. In implementation, the statistical test may include, for example, a Fisher test, and the parameters may include, but are not limited to, a periodogram, a Huber periodogram, and the like.

[0076] For purposes of illustration and not limitation, an example in which the periodicity detection system 102 performs a Fisher test on a Huber periodogram associated with a piece of time series data at a particular level to determine whether the piece of time series data or the particular level includes a periodic component candidate is described below.

[0077] In the implementation, the wavelet coefficients w at each level are j The length of And double, where x j The length of is N′=2N. In implementation, this padding operation is performed for the purpose of subsequently verifying the detected periodicity or periodic component candidates (e.g., obtaining robust indicators such as ACF (autocorrelation) through Huber periodograms). For simplicity and clarity, the level index j is deleted in the following description.

[0078] In implementation, to detect hidden periodic components (or periodicity), Fisher’s test can be used and the g statistic can be defined as follows:

[0079]

[0080] Where P k is a periodogram based on the discrete Fourier transform (DFT) and is defined as:

[0081]

[0082] in

[0083] In practice, the Fisher test in equation (6) sets the null hypothesis H0, that the corresponding time series (i.e., an input time series data) is generated by a Gaussian white noise sequence, against the alternative hypothesis H1, that the data is generated by a Gaussian white noise sequence with a superimposed deterministic periodic component. 2 Under the assumption H0 of Gaussian white noise, the distribution of the periodogram can be obtained as a chi-square distribution with two degrees of freedom, that is, P k ~(1 / 2)σ 2 χ 2 (2). In this way, the distribution of the g statistic under the null hypothesis H0 can be expressed as: It gives a p-value to determine whether the time series is periodic (or whether a piece of time series data at a specific level includes a periodic component). In implementation, if the p-value is less than a predetermined threshold α, the null hypothesis H0 is rejected, and the time series (or the piece of time series data at a specific level) includes a periodic component. In this case, the period length of the periodic component can be calculated as N / k, where k = arg max k P k .

[0084] Since it may not be true that the noise is Gaussian in real-world time series data, in the implementation, the Huber periodogram is introduced here to make the periodogram more robust. In the implementation, the periodogram can be formulated as equivalent to solving the least squares problem, and the more robust Huber loss can be used as the loss function for solving the least squares problem. In the implementation, the Huber loss is a combination of the sum of squares loss and the least absolute deviation (LAD) loss, which is quadratic on small error values ​​and grows linearly for large error values. Therefore, the Huber loss is robust and suitable for different types of data. Specifically, the periodogram of equation (7) can be equivalently calculated by solving the following problem:

[0085]

[0086] in is the least squares (LS) estimate of the harmonic regressor, φ t =[cos(2πkt / N′),sin(2πkt / N′)], φ=[φ0,φ1,…,φ N′-1 ] T , and x=[x0,x,…,x N′-1 ] T .

[0087] In implementation, based on equation (8), the sum-of-squares loss function can be replaced by a family of functions used in the M-estimator, leading to a robust M-periodogram, namely:

[0088] where γ(x) is the robustification objective function and is defined as

[0089] Due to the robustness and adaptability of the Huber loss on different types of data, the developed Huber periodogram can lead to a robust metric for subsequent verification of the detected periodicity (or periodic component candidates), which is very helpful for verifying any periodic component candidates found. In implementation, the γ(x) of the Huber periodogram can be defined as follows:

[0090]

[0091] The Huber periodograms in equations (9) and (10) can be efficiently solved by ADMM (alternating direction method of multipliers) with The number of iterations and the Complexity. First, the optimization problem in the Huber period graph can be reformulated as:

[0092]

[0093] st φβ-x=z (12)

[0094] In implementation, the augmented Lagrangian can be obtained as where v is the dual variable and ρ is the penalty parameter. By following the ADMM process and taking the proximal operator as the Huber function The update steps can be obtained as follows:

[0095] β k+1 =(φ T φ) -1 φ T (z k +xu k ) (13)

[0096]

[0097] u k+1 =u k +φβ k+1 -z k+1 -x (15)

[0098] Where u = (1 / ρ)v is the scaled dual variable used to make the formula more convenient. The soft threshold operation S can be efficiently calculated by ρ (x)n z-minimization step:

[0099]

[0100] For the complexity of ADMM in Huber periodogram, the complexity of each iteration can be obtained based on equations (13)-(15) (φ is an N×2 matrix): Computational complexity. In addition, the equation (13) (φ T φ) -1 φ T to save time, since the value remains constant in each iteration. Given a desired or predetermined number of iterations, we can obtain ∈-optimal solution within an iteration. For example, in this example, for the Huber periodogram, ADMM may converge within a few dozen iterations.

[0101] In the implementation, the Huber periodogram The distribution of is similar to the behavior of the vanilla periodogram as n→∞. Therefore, statistical tests based on the Huber periodogram (such as the Fisher test) can be used to detect periodic components in a piece of time series data at a specific level decomposed from the processed time series data.

[0102] At block 312 , the periodicity detection system 102 may verify whether each periodic component candidate detected is a true periodic component associated with the input time series data.

[0103] In an implementation, after obtaining or detecting one or more periodic component candidates at one or more levels in multiple different levels (or a predetermined number of levels if sorting and selection are performed at box 308) using a statistical test (e.g., Fisher test) for each level (or the wavelet coefficient of each level), the periodic detection system 102 can verify each of the one or more periodic component candidates detected at the one or more levels to improve the accuracy of periodic detection and avoid or reduce false alarms of periodic detection.

[0104] In implementation, the periodicity detection system 102 may verify whether the periodic component candidate included in a piece of time series data at a specific level in the second domain (e.g., the time-frequency domain) is a true periodic component of the input time series based on a predetermined indicator associated with the piece of time series data at a specific level. In implementation, the predetermined indicator associated with the piece of time series data at a specific level may include, but is not limited to, the ACF (autocorrelation function) of the piece of time series data at the specific level calculated in the first domain (e.g., the time domain), etc.

[0105] In implementation, the periodicity detection system 102 may obtain an indicator (e.g., autocorrelation) of the piece of time series data at the specific level in the time domain. The periodicity detection system 102 may then calculate the median distance of multiple peaks whose respective heights in the indicator (i.e., autocorrelation) are greater than a predetermined threshold, and in response to determining that the median distance is within a predetermined range associated with the specific level of the piece of time series data, verify that the periodic component is a true periodic component having a period length of the median distance of the multiple peaks. Alternatively, if the median distance is outside the predetermined range associated with the specific level of the piece of time series data, the periodicity detection system 102 may determine that the periodic component is not a true periodic component of the input time series data.

[0106] As an example and not a limitation, ACF is used as an example of a predetermined indicator in this article to illustrate the process of verifying the periodic component candidate detected at block 310 in the first domain (eg, time domain). In implementation, for the wavelet coefficient w from the jth level j,t (For simplicity, without loss of generality, we will express it as w t ), the standardized estimate can be calculated as:

[0107]

[0108] in Yes w t The sample variance of .

[0109] In implementation, when calculating the ACF of a piece of time series data at a specific level, the periodicity detection system 102 may compare the ACF with a predetermined threshold value and verify whether the periodic component candidate included in the piece of time series data or the specific level is a true periodic component of the input time series data. For example, if the ACF is greater than or equal to the predetermined threshold value, the periodicity detection system 102 may verify or confirm that the periodic component candidate included in the piece of time series data or the specific level is a true periodic component of the input time series data.

[0110] In the implementation, since the above ACF is not robust to outliers and has complexity, so in some cases, the periodicity detection system 102 can use the Huber periodogram to calculate robustness and have A new type of ACF of complexity. In the implementation, assuming that the input time series data is real-valued data, the full range periodogram can be described as follows:

[0111]

[0112] In implementation, a new type of ACF (or called robust ACF) based on the periodogram can be obtained according to the Wiener-Khinchin theorem and can be defined as:

[0113]

[0114] where p t yes The inverse discrete Fourier transform (IDFT) of is defined as:

[0115]

[0116] In implementation, in order to detect periodic components in each of a plurality of different levels (or a predetermined number of levels if sorting and selection are performed at block 308), the periodicity detection system 102 may summarize or locate peaks of the robust ACF by a peak detection method. Examples of peak detection methods may include, but are not limited to, multi-scale based peak detection (AMPD), which is based on calculation and analysis of a local maximum scale map of the robust ACF, using smoothing and then fitting a known function (e.g., a polynomial) to the robust ACF, or matching a known peak shape to the robust ACF, etc.

[0117] In an implementation, after locating the peaks of the robust ACF, the periodicity detection system 102 may then calculate the median distance between every two of the located peaks whose heights are greater than or equal to a predetermined height threshold. In an implementation, based on the resolution of the periodogram (at each level), the peak of the periodogram at index k is Corresponding to the range In implementation, if the median distance between each two positioning peaks whose height is greater than or equal to the predetermined height threshold is within a predetermined range, that is, The periodicity detection system 102 can then verify that the periodic component candidate detected in a piece of time series data at a specific level is a true periodic component of the input time series data. In addition, the period length of such a periodic component candidate (or true periodic component) is the median distance between every two of the positioning peaks whose height is greater than or equal to a predetermined height threshold.

[0118] In implementation, the periodicity detection system 102 can calculate a robust ACF for each of a plurality of different levels (or a predetermined number of levels if sorting and selection are performed at block 308), and determine and verify whether the corresponding periodic component candidate detected at each level is a true periodic component using the verification described above for periodicity detection. Thus, the periodicity detection system 102 can detect or estimate one or more periodic components from the input time series data.

[0119] At block 314 , the periodicity detection system may alternatively or further perform a time series task on the input time series data or a new data point associated with the input time series data.

[0120] In implementations, after detecting or estimating one or more periodic components in input time series data, the periodicity detection system 102 can perform time series tasks such as classification, forecasting, anomaly detection, clustering, and compression, among others.

[0121] By way of example and not limitation, the periodicity detection system 102 may re-estimate the trend component and / or the remaining components (including the noise component and the outlier component) based on one or more detected periodic components. For example, the periodicity detection system 102 may subtract one or more detected periodic components from the input time series data and re-run the trend extraction as described in the previous description to obtain a new or better estimate of the trend component. The periodicity detection system 102 may obtain the remaining components by subtracting one or more periodic components and the trend component from the input time series data.

[0122] In implementation, the periodicity detection system 102 may iteratively perform this process of determining the trend component, one or more periodic components, and the remaining components until a predetermined number of iterations is reached or until the convergence falls within a predetermined threshold or percentage, etc.

[0123] In implementation, the periodicity detection system 102 may perform anomaly detection on the input time series data or new data points for the input time series data. Depending on which type of anomaly is to be determined, the periodicity detection system 102 may perform one or more statistical tests on the trend component, one or more period components, and / or the remaining components.

[0124] Although the above method blocks are described as being performed in a particular order, in some implementations, some or all of the method blocks may be performed in other orders or in parallel.

[0125] Other periodic detection methods

[0126] In order to further illustrate the improvement of the periodicity detection method proposed in the present invention, the comparison with different periodicity detection methods is described below. Table 2 below shows five different periodicity detection methods used for comparison.

[0127] Table 2: Periodicity detection methods for comparison

[0128]

[0129] In order to evaluate the performance of different periodicity detection methods, a test data set of complex patterns with a length of 1024 is generated, which includes three periodic components, multiple outliers, a changing trend component, and noise. Specifically, three sine waves are generated with an amplitude of one unit and period lengths of 20, 50, and 100. A triangular signal with an amplitude of ten units and different variances ( or 2) is further added to the generated sine wave. In addition, different numbers of spikes and troughs with an amplitude of five units representing outliers (outlier ratio η = 1% or 20%) are added to the generated sine wave. Table 3 below summarizes the results in the mild scenario (noise variance Outlier ratio η = 1%) and severe scenarios (noise variance The periodicity detection results from different periodicity detection methods under the condition of abnormal value ratio η = 20%). As can be seen from Table 3,

[0130] Table 3: Comparison between different periodicity detection methods with different levels of noise and outliers

[0131]

[0132] As can be seen from Table 3 above, the periodicity detection method proposed in the present invention accurately detects and estimates the existence and respective period lengths of the three periodic components, while other periodicity detection methods cannot detect the true periodic components, or detect wrong periodic components (i.e., false positives). In addition, these periodicity detection methods cannot accurately estimate the period lengths of the periodic components.

[0133] To further illustrate how the periodicity detection method proposed in the present invention can accurately detect and estimate the periodic components in the test data set, Figure 4 An intermediate result 400 of the proposed periodicity detection method is shown. Figure 4 In , the first, second, and third columns correspond to the wavelet coefficients, Huber periodograms, and robust ACFs obtained for subsets of different levels, respectively, where each row corresponds to a specific level of the subset. Figure 4 It can be seen that the decomposition method proposed in the present invention effectively decouples multiple periodic components that are intertwined with each other, and the Huber periodogram and robust ACF successfully detect and estimate the corresponding levels (i.e., Figure 4 The multiple periodic components of levels 4, 5 and 6 (shown) each have a period length (ie, 20, 50 and 100 in this example).

[0134] in conclusion

[0135] Although the implementation has been described in language specific to structural features and / or methodological actions, it should be understood that the claims are not necessarily limited to the specific features or actions described. Rather, the specific features and actions are disclosed as exemplary forms of implementing the claimed subject matter. Additionally or alternatively, some or all operations may be implemented by one or more ASICS, FPGAs, or other hardware.

[0136] The present invention may be further understood using the following terms.

[0137] Article 1: A method implemented by one or more computing devices, the method comprising: receiving input time series data of a specific time length; preprocessing the input time series data to obtain processed time series data, the preprocessing comprising at least removing trends in the input time series data; decomposing the processed time series data into multiple time series data of different levels of the specific time length; detecting whether a time series data of a specific level includes a periodic component candidate in the frequency domain; and in response to detecting that the time series data of the specific level includes a periodic component candidate in the frequency domain, verifying whether the periodic component candidate in the time series data of the specific level is a true periodic component of the input time series data in the time domain.

[0138] Clause 2: The method of clause 1, wherein preprocessing the time series data comprises applying a Hodrick-Prescott (HP) filter to the time series data to remove any trends in the time series data.

[0139] Clause 3: The method of clause 1, wherein decomposing the processed time series data comprises: decomposing the processed time series data using a maximum overlap discrete wavelet transform.

[0140] Article 4: The method according to Article 1, wherein preprocessing the time series data further comprises: performing standardization on the time series data; and removing outliers from the time series data.

[0141] Article 5: The method according to Article 1, wherein detecting whether the time series data at the specific level includes periodic component candidates in the frequency domain includes: obtaining a periodogram or a Huber periodogram of the time series data at the specific level; and determining whether the periodogram or the Huber periodogram satisfies a predetermined hypothesis test.

[0142] Article 6: The method according to Article 1 also includes: sorting the multiple time series data according to the order of the respective variances of the multiple time series data of the specific time length at different levels.

[0143] Article 7: The method according to Article 1, wherein verifying whether the candidate periodic component in the time series data at the specific level is a true periodic component of the input time series data in the time domain comprises: obtaining the ACF (autocorrelation function) or robust ACF of the time series data at the specific level in the time domain; calculating the median distance of multiple peaks in the ACF or robust ACF whose respective heights are greater than a predetermined threshold; and in response to determining that the median distance is within a predetermined range associated with the specific level of the time series data, verifying that the periodic component is a true periodic component candidate whose period length is the median distance of the multiple peaks.

[0144] Article 8: One or more computer-readable media storing executable instructions, which, when executed by one or more processors, cause the one or more processors to perform actions including: receiving input time series data of a specific time length; preprocessing the input time series data to obtain processed time series data, wherein the preprocessing includes at least removing trends in the input time series data; decomposing the processed time series data into multiple time series data of different levels of the specific time length; detecting whether a time series data of a specific level includes a periodic component candidate in the frequency domain; and in response to detecting that the time series data of the specific level includes a periodic component candidate in the frequency domain, verifying whether the periodic component candidate in the time series data of the specific level is a true periodic component of the input time series data in the time domain.

[0145] Clause 9: One or more computer-readable media according to Clause 8, wherein preprocessing the time series data comprises applying a Hodrick-Prescott (HP) filter to the time series data to remove any trends in the time series data.

[0146] Clause 10: One or more computer-readable media according to clause 8, wherein decomposing the processed time series data comprises: decomposing the processed time series data using a maximum overlap discrete wavelet transform.

[0147] Article 11: One or more computer-readable media according to Article 8, wherein preprocessing the time series data further comprises: performing standardization on the time series data; and removing outliers from the time series data.

[0148] Article 12: One or more computer-readable media according to Article 8, wherein detecting whether the time series data at the specific level includes periodic component candidates in the frequency domain includes: obtaining a periodogram or Huber periodogram of the time series data at the specific level; and determining whether the periodogram or Huber periodogram satisfies a predetermined hypothesis test.

[0149] Article 13: According to one or more computer-readable media described in Article 8, the action also includes: sorting the multiple time series data according to the order of their respective variances of the multiple time series data of the specific time length at different levels.

[0150] Article 14: One or more computer-readable media according to Article 8, wherein verifying whether the periodic component candidate in the time series data at the specific level is a true periodic component of the input time series data in the time domain comprises: obtaining the ACF or robust ACF of the time series data at the specific level in the time domain; calculating the median distance of multiple peaks in the ACF or robust ACF whose respective heights are greater than a predetermined threshold; and in response to determining that the median distance is within a predetermined range associated with the specific level of the time series data, verifying that the periodic component is a true periodic component candidate whose period length is the median distance of the multiple peaks.

[0151] Article 15: A system comprising: one or more processors; and a memory storing executable instructions, which, when executed by the one or more processors, cause the one or more processors to perform actions including: receiving input time series data of a specific time length; preprocessing the input time series data to obtain processed time series data, wherein the preprocessing includes at least removing trends in the input time series data; decomposing the processed time series data into multiple time series data of different levels of the specific time length; detecting whether a time series data of a specific level includes a periodic component candidate in the frequency domain; and in response to detecting that the time series data of the specific level includes a periodic component candidate in the frequency domain, verifying whether the periodic component candidate in the time series data of the specific level is a true periodic component of the input time series data in the time domain.

[0152] Clause 16: The system of Clause 15, wherein preprocessing the time series data comprises applying a Hodrick-Prescott (HP) filter to the time series data to remove any trends in the time series data.

[0153] Article 17: A system according to Article 15, wherein decomposing the processed time series data includes: decomposing the processed time series data using maximum overlap discrete wavelet transform, and preprocessing the time series data also includes: performing standardization on the time series data; and removing outliers from the time series data.

[0154] Article 18: A system according to Article 15, wherein detecting whether the time series data at the specific level includes periodic component candidates in the frequency domain includes: obtaining a periodogram or a Huber periodogram of the time series data at the specific level; and determining whether the periodogram or the Huber periodogram satisfies a predetermined hypothesis test.

[0155] Article 19: According to the system described in Article 15, the action also includes: sorting the multiple time series data according to the order of the respective variances of the multiple time series data of the specific time length at different levels.

[0156] Article 20: A system according to Article 15, wherein verifying whether a candidate periodic component in the piece of time series data at the specific level is a true periodic component of the input time series data in the time domain comprises: obtaining the ACF or robust ACF of the piece of time series data at the specific level in the time domain; calculating the median distance of a plurality of peaks in the ACF or robust ACF whose respective heights are greater than a predetermined threshold; and in response to determining that the median distance is within a predetermined range associated with the specific level of the piece of time series data, verifying that the periodic component is a true periodic component candidate whose period length is the median distance of the plurality of peaks.

Claims

1. A method implemented by one or more computing devices, the method comprising: Receiving input time series data of a specific time length, wherein the input time series data is observation data obtained or collected including or corresponding to a specific application; the specific application is an online game or an online shopping application, and the input time series data is the number of users visiting the game website or the shopping website; Preprocessing the input time series data to obtain processed time series data, the preprocessing at least comprising removing trends in the input time series data using a detrending filter; Decomposing the processed time series data into a plurality of time series data of the specific time length at different levels according to a transformation method for transforming the processed time series data from the time domain to the time-frequency domain; detecting whether a piece of time series data at a particular level includes a periodic component candidate in the frequency domain based at least in part on a predetermined hypothesis test; as well as In response to detecting that the time series data at the specific level includes a periodic component candidate in the frequency domain, it is verified whether the periodic component candidate in the time series data at the specific level is a true periodic component of the input time series data in the time domain, at least in part based on a predetermined indicator associated with the time series data segment at the specific level in the time domain.

2. The method according to claim 1, wherein: Preprocessing the time series data includes applying a Hodrick-Prescott (HP) filter to the time series data to remove any trends in the time series data.

3. The method according to claim 1, wherein: Decomposing the processed time series data includes decomposing the processed time series data using maximum overlap discrete wavelet transform.

4. The method according to claim 1, wherein: Preprocessing the time series data further includes: performing normalization on the time series data; and Outliers are removed from the time series data.

5. The method according to claim 1, wherein: Detecting whether the time series data of the specific level includes a periodic component candidate in the frequency domain includes: Obtaining a periodogram or a Huber periodogram of the time series data at the specific level; and It is determined whether the periodogram or Huber periodogram satisfies a predetermined hypothesis test.

6. The method according to claim 1, further comprising: The multiple time series data are sorted according to the order of the respective variances of the multiple time series data of the specific time length at different levels.

7. The method according to claim 1, wherein: Verifying whether the periodic component candidate in the time series data of the specific level is a true periodic component of the input time series data in the time domain includes: Obtaining the ACF or robust ACF of the time series data at the specific level in the time domain; Calculating the median distance of a plurality of peaks in the ACF or robust ACF whose respective heights are greater than a predetermined threshold; and In response to determining that the median distance is within a predetermined range associated with a specific level of the piece of time series data, verifying that the periodic component is a true periodic component candidate whose period length is the median distance of the plurality of peaks.

8. One or more computer-readable media storing executable instructions that, when executed by one or more processors, cause the one or more processors to perform actions including: Receiving input time series data of a specific time length, wherein the input time series data is observation data obtained or collected including or corresponding to a specific application; the specific application is an online game or an online shopping application, and the input time series data is the number of users visiting the game website or the shopping website; Preprocessing the input time series data to obtain processed time series data, the preprocessing at least comprising removing trends in the input time series data using a detrending filter; Decomposing the processed time series data into a plurality of time series data of the specific time length at different levels according to a transformation method for transforming the processed time series data from the time domain to the time-frequency domain; detecting whether a piece of time series data at a particular level includes a periodic component candidate in the frequency domain based at least in part on a predetermined hypothesis test; as well as In response to detecting that the time series data at the specific level includes a periodic component candidate in the frequency domain, it is verified whether the periodic component candidate in the time series data at the specific level is a true periodic component of the input time series data in the time domain, at least in part based on a predetermined indicator associated with the time series data segment at the specific level in the time domain.

9. A system for detecting periodicity in a time series and estimating period length, comprising: one or more processors; as well as The memory stores executable instructions, and when the executable instructions are executed by the one or more processors, the one or more processors are caused to perform the following actions: Receiving input time series data of a specific time length, wherein the input time series data is observation data obtained or collected including or corresponding to a specific application; the specific application is an online game or an online shopping application, and the input time series data is the number of users visiting the game website or the shopping website; Preprocessing the input time series data to obtain processed time series data, the preprocessing at least comprising removing trends in the input time series data using a detrending filter; Decomposing the processed time series data into a plurality of time series data of the specific time length at different levels according to a transformation method for transforming the processed time series data from the time domain to the time-frequency domain; detecting whether a piece of time series data at a particular level includes a periodic component candidate in the frequency domain based at least in part on a predetermined hypothesis test; as well as In response to detecting that the time series data at the specific level includes a periodic component candidate in the frequency domain, it is verified whether the periodic component candidate in the time series data at the specific level is a true periodic component of the input time series data in the time domain, at least in part based on a predetermined indicator associated with the time series data segment at the specific level in the time domain.

10. The system according to claim 9, wherein: Preprocessing the time series data includes applying a Hodrick-Prescott (HP) filter to the time series data to remove any trends in the time series data, and decomposing the processed time series data includes decomposing the processed time series data using a maximum overlap discrete wavelet transform.

11. The system according to claim 9, wherein: Preprocessing the time series data further includes: performing normalization on the time series data; and Outliers are removed from the time series data.

12. The system of claim 9, wherein the actions further comprise: The multiple time series data are sorted according to the order of the respective variances of the multiple time series data of the specific time length at different levels.

Citation Information

Patent Citations

  • Abnormal load detection method for cloud calculation on-line business

    CN105071983A

  • Power load prediction method based on multiple time sequences

    CN110264001A

  • Business index time sequence prediction method, device and equipment

    CN110400005A

  • Method for detecting abnormal running state of lightweight embedded system

    CN110417621A

  • Systems and methods for structural clustering of time sequences

    US20060224356A1