Feature extraction methods, apparatus, equipment and storage media for time series data
By performing frequency domain decomposition and feature extraction on time series data using an N-level filter bank, the problem of limited model performance caused by considering only the time dimension in existing technologies is solved, achieving more comprehensive feature extraction and improved model performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2020-10-20
- Publication Date
- 2026-05-26
AI Technical Summary
Existing feature engineering techniques only consider the time dimension and ignore the frequency dimension when extracting features from time series data, which limits the performance of the models.
An N-stage filter bank is used to perform frequency domain decomposition on the time-domain signal of the time series data, extracting multiple time-series sub-band signals of different frequency bands, and performing feature extraction on each time-series sub-band signal to obtain the characteristics of the time series data in different frequency bands.
By using multi-level filter bank decomposition and feature extraction, the model's performance was significantly improved, capturing more time-series data features and enhancing the model's risk discrimination ability.
Smart Images

Figure CN112163558B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device and storage medium for feature extraction of time series data. Background Technology
[0002] With the development of artificial intelligence (AI), AI technology is increasingly integrated into our lives. Depending on the application area, the techniques used in AI research vary, with machine learning and computer vision currently being popular areas. Feature engineering in machine learning transforms raw input data into features to better represent potential problems and improve the accuracy of predictive models. Feature engineering has a significant impact on the application of machine learning models; generally speaking, data and features determine the upper limit of a machine learning model's performance.
[0003] Existing feature engineering techniques only consider the time dimension when extracting features from time series data, neglecting the frequency dimension. However, time series data, as a signal, may exhibit diverse characteristics across different frequency bands. Considering only the time dimension will overlook some subtle features, thus impacting model performance. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for feature extraction of time series data, which can acquire the performance of time series data in different frequency bands, extract more features from time series data, and improve model performance.
[0005] On the one hand, this application provides a feature extraction method for time series data, the method comprising:
[0006] Obtain the time-domain signal corresponding to the user's time-series data, wherein the time-series data represents the user's economic behavior data;
[0007] The time-domain signal is decomposed into N-level frequency domains using an N-level filter bank to obtain multiple time-series sub-band signals of different frequency bands, where N is a positive integer greater than or equal to 1.
[0008] Feature extraction is performed on each of the time-series sub-band signals to obtain the target features of the time-series data.
[0009] On the other hand, a feature extraction device for time series data is provided, the device comprising:
[0010] The signal acquisition module is used to acquire the time-domain signal corresponding to the user's time-series data, wherein the time-series data represents the user's economic behavior data;
[0011] The signal decomposition module is used to perform N-level frequency domain decomposition on the time-domain signal using an N-level filter bank to obtain multiple time-series sub-band signals of different frequency bands, where N is a positive integer greater than or equal to 1.
[0012] The feature extraction module is used to extract features from each of the time-series sub-band signals to obtain the target features of the time-series data.
[0013] On the other hand, a feature extraction device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded by the processor and executed as described above for the feature extraction method of time series data.
[0014] On the other hand, a computer storage medium is provided, wherein at least one instruction or at least one program is stored in the computer storage medium, wherein the at least one instruction or at least one program is loaded and executed by a processor to implement the feature extraction method for time series data as described above.
[0015] The feature extraction method, apparatus, device, and storage medium for time series data provided in this application have the following beneficial effects:
[0016] By using a multi-stage filter bank to decompose the time-domain signal corresponding to the time series data step by step, multiple time-series sub-band signals are obtained. Since each time-series sub-band signal corresponds to a different frequency band, feature extraction can be performed on the time-series sub-band signal of each frequency band to extract the features of the time series data in different subdivided frequency bands, thereby obtaining more features of the time series data and improving the performance of the model. Attached Figure Description
[0017] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the implementation environment of a feature extraction method for time series data provided in an embodiment of this application.
[0019] Figure 2 This is a flowchart illustrating a feature extraction method for time series data provided in an embodiment of this application.
[0020] Figure 3 This is a schematic diagram of the process for performing N-level frequency domain decomposition on a time-domain signal, provided in an embodiment of this application.
[0021] Figure 4 This is an example of using a discrete wavelet filter bank to decompose a time-domain signal, as provided in the embodiments of this application.
[0022] Figure 5 This is a schematic diagram of the waveforms of each sub-band signal output by each stage of the discrete wavelet filter bank provided in the embodiments of this application.
[0023] Figure 6 It is an equivalent representation of the decomposed time-domain signal provided in the embodiments of this application.
[0024] Figure 7 This is an example of the time spectrum after S-transformation provided in the embodiments of this application.
[0025] Figure 8 This is an example waveform diagram of the time-domain signal corresponding to the user quota utilization rate provided in the embodiments of this application.
[0026] Figure 9 This is an example of selecting wavelet basis functions for discrete wavelet transform provided in the embodiments of this application.
[0027] Figure 10 This is an example diagram of the sub-band signals formed by frequency domain decomposition of a time-domain signal using a discrete wavelet filter bank, as provided in the embodiments of this application.
[0028] Figure 11 This is a schematic diagram of the structure of a feature extraction device for time series data provided in an embodiment of this application.
[0029] Figure 12 This is a schematic diagram of the structure of the signal decomposition module provided in an embodiment of this application.
[0030] Figure 13 This is a schematic diagram of the structure of another feature extraction device for time series data provided in an embodiment of this application.
[0031] Figure 14 This is a schematic diagram of the hardware structure of a device for implementing the method provided in the embodiments of this application. Detailed Implementation
[0032] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities. AI technology is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics.
[0033] The solutions provided in this application relate to Machine Learning (ML) technology in artificial intelligence. Machine learning is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and many other disciplines. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0034] Feature engineering is the process of using specialized background knowledge and skills to process data so that features can play a better role in machine learning algorithms. Feature engineering transforms raw data into features that better represent the real-world problems that predictive models are dealing with, improving the accuracy of predictions for unknown data. Better features mean greater flexibility and better results.
[0035] However, current feature engineering techniques, especially in the fields of anti-money laundering and risk control, mainly extract features from the time dimension when extracting features from time series data, while ignoring the performance of time series data in different frequency bands. This results in limited features extracted and affects the performance of the model.
[0036] To obtain the performance of time series data across different frequency bands and extract more features from the time series data, this application provides a feature extraction method for time series data. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0037] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0038] Please see Figure 1 The illustration shows a schematic diagram of the implementation environment of a feature extraction method for time series data provided in an embodiment of this application, such as... Figure 1 As shown, the implementation environment may include at least client 01 and server 02.
[0039] Specifically, the client 01 may include devices such as smartphones, desktop computers, tablets, laptops, digital assistants, smart wearable devices, and voice interaction devices. It may also include software running on the device, such as web pages provided to users by service providers, or applications provided by those service providers. Specifically, the client 01 can be used to display the user's time-series data and the feature extraction results of the time-series data sent by the server 02.
[0040] Specifically, server 02 may include a standalone server, a distributed server, or a server cluster consisting of multiple servers. Server 02 may include a network communication unit, a processor, and memory, etc. Specifically, server 02 can be used to extract features from a user's time-series data, send the feature extraction results to client 01, and use the feature extraction results to test the performance of a machine learning model.
[0041] The following describes a feature extraction method for time series data according to this application. Figure 2 This is a flowchart illustrating a feature extraction method for time series data provided in an embodiment of this application. This specification provides the operational steps of the method described in the embodiments or flowchart, but based on conventional or non-inventive methods, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the method can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiments or accompanying drawings. Specifically, as... Figure 2 As shown, the method may include:
[0042] S201, acquire the time-domain signal corresponding to the user's time-series data, wherein the time-series data represents the user's economic behavior data.
[0043] In this embodiment, time-series data refers to data collected at different times, and economic behavior refers to actions taken by users to achieve certain economic purposes, such as credit behavior or payment behavior. Accordingly, economic behavior data can include credit data or payment data. Specifically, credit data refers to data in credit scenarios, such as user credit limit utilization rate or successful application frequency; payment data refers to data in payment scenarios, such as data on receiving and paying red envelopes, face-to-face payments, and receiving or paying via bank transfer.
[0044] When acquiring time series data, the server can either retrieve pre-collected time series data from a preset database or perform time series data acquisition operations when no time series data that meets the conditions exists in the preset database.
[0045] For example, if you need to use the user credit limit utilization rate of a certain credit product as time series data, you can use the time when the user's credit application is approved as the starting point, and use days as the time unit to calculate the daily credit limit utilization rate as a sample point. All sample points from this starting point for a preset number of days constitute the time series data.
[0046] S202, use an N-level filter bank to perform N-level frequency domain decomposition on the time-domain signal to obtain multiple time-series sub-band signals of different frequency bands, where N is a positive integer greater than or equal to 1.
[0047] In this embodiment, each filter bank may include a high-pass filter and a low-pass filter. After the time-domain signal is filtered by the low-pass and high-pass filters, a low-pass sub-band signal and a high-pass sub-band signal are obtained. The low-pass sub-band signal captures the essential features of the signal, while the high-pass sub-band signal reflects the subtle differences in the signal. The low-pass sub-band signal can then be further filtered by the low-pass and high-pass filters in the next stage of the filter bank until the time-domain signal is finally decomposed into time-series sub-band signals that meet certain conditions, such as the time-domain signal being ultimately decomposed into time-series sub-band signals with only one sample point.
[0048] For details, please refer to Figure 3 As shown, the step of using an N-level filter bank to perform N-level frequency domain decomposition on the time-domain signal to obtain multiple time-series sub-band signals of different frequency bands may include:
[0049] S2021, the first-stage filter bank is used as the current filter bank, and the time-domain signal is used as the current processing signal.
[0050] S2022, The current processed signal is decomposed in the frequency domain by the current filter group to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter group.
[0051] S2023, determine whether the current filter bank is the Nth level filter bank.
[0052] If the current filter bank is not the Nth-level filter bank, then step S2024 is executed to continue frequency domain decomposition; if the current filter bank is the Nth-level filter bank, then step S2025 is executed to stop frequency domain decomposition.
[0053] In step S2024, the low-pass subband signal is used as the current processing signal, and the next-stage filter bank is used as the current filter bank. Then, the process returns to step S2022 to continue frequency domain decomposition of the current processing signal.
[0054] S2025, the high-pass subband signal and low-pass subband signal corresponding to each level of the filter bank are used as the timing subband signals of the multiple different frequency bands.
[0055] In the embodiments of this application, there are at least two multiple representations. It can be understood that, in specific implementation, the multiple time-series sub-band signals of different frequency bands determined can be time-series sub-band signals of all frequency bands directly output by the N-level filter bank, or a preset number of time-series sub-band signals selected from all the output time-series sub-band signals of all frequency bands.
[0056] To decompose time-domain signals, discrete wavelet filters can be used as high-pass and low-pass filters in practical applications. Since the discrete wavelet transform can be viewed as a tree-like result, the S-transform can also be used as the high-pass and low-pass filters in specific implementations. Therefore, the filter bank in the embodiments of this application can be a discrete wavelet filter bank or an S-transform filter bank.
[0057] In some embodiments, if the filter bank is a discrete wavelet filter bank, then step S2022 may specifically include: performing discrete wavelet transform on the current processed signal through the current filter bank based on the pre-selected wavelet basis function to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank.
[0058] like Figure 4 As shown, this is an example of using a discrete wavelet filter bank to decompose a time-domain signal. Figure 4 In the diagram, the time-domain signal is filtered by the first-stage discrete wavelet filter bank to obtain a low-pass subband signal 1 and a high-pass subband signal 1; the low-pass subband signal 1 is filtered by the second-stage discrete wavelet filter bank to obtain a low-pass subband signal 2 and a high-pass subband signal 2; the low-pass subband signal 2 is filtered by the third-stage discrete wavelet filter bank to obtain a low-pass subband signal 3 and a high-pass subband signal 3. This is understandable. Figure 4 The example only shows the case where N is 3. In practical applications, this filtering process can continue until the time-domain signal is filtered down to a single sample point. Correspondingly, Figure 5 This is a schematic diagram of the waveforms of each sub-band signal output after passing through each stage of the discrete wavelet filter bank.
[0059] If S represents the time-domain signal, then... Indicates the first The low-pass subband signal output by the discrete wavelet filter bank is used... Indicates the first The high-pass subband signal output by the discrete wavelet filter bank is as follows: Figure 6 As shown, the time-domain signal (S), after being decomposed by a three-stage discrete wavelet filter bank, can be expressed as:
[0060]
[0061] So, This refers to the multiple time-series sub-band signals of different frequency bands obtained after decomposing the time-domain signal S into N levels of frequency domain. Since the low-pass and high-pass sub-band signals of each level are used as time-series sub-band signals of different frequency bands, each time-series sub-band signal represents the timing of that time-series sub-band signal in the corresponding frequency band.
[0062] In this embodiment of the application, before performing discrete wavelet transform on the current processed signal based on the pre-selected wavelet basis function and obtaining the high-pass subband signal and low-pass subband signal corresponding to the current filter group, a step of selecting a wavelet basis function is further included.
[0063] To achieve better model performance, when selecting wavelet basis functions, it is important to choose wavelet bases that are as similar as possible to the time-domain signal waveform, i.e., the original time-series waveform, in order to capture features. Therefore, the selection of wavelet basis functions may include: selecting wavelet functions that are similar to and orthogonal to the time-domain signal waveform as the wavelet basis functions.
[0064] For example, for time series data with step-like abrupt changes, the Haar wavelet function can be selected, while for time series data with smoothness, the smooth wavelet function can be selected.
[0065] When selecting wavelet functions similar to the time-domain signal waveform, orthogonal wavelet functions should be chosen as the wavelet basis functions for discrete wavelet transform as much as possible. On the one hand, using orthogonal bases returns a compact signal representation, while non-orthogonal bases, due to the high correlation of their spectra in adjacent time intervals, result in redundant representations. On the other hand, similar to PCA (Principal Component Analysis) denoising, discrete wavelet transform can also use orthogonal bases to output noise as small, even negligible, coefficients, thus achieving noise reduction and further improving model performance.
[0066] In some other embodiments, if the filter bank is an S-transform filter bank, then step S2022 may specifically include: in the current filter bank, performing an S-transform on the current processed signal according to M points in the frequency domain to obtain the high-frequency component and low-frequency component of the current processed signal, where M is a positive integer greater than or equal to 2; performing inverse transforms on the high-frequency component and the low-frequency component respectively to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank.
[0067] In this embodiment, the M-points in the frequency domain represent dividing the frequency domain into M equal parts. The M-points are used as threshold points for high and low frequencies. Then, the spectrum is continuously split through the S-transform. The high-frequency and low-frequency components obtained from the splitting are inversely transformed to obtain the results of the S-transform high pass filter and low pass filter.
[0068] like Figure 7 As shown, it illustrates an example of the time spectrum after the S-transform. Figure 7In this model, the frequency domain is divided into two equal parts, with time (t) on the horizontal axis and frequency (f) on the vertical axis. The current signal is repeatedly split into high and low frequencies at each of these bisecting points. Then, inverse transforms are performed on the high-frequency and low-frequency components to obtain sequences of different frequency bands. Understandably, in practical applications, other bisecting points can also be used. Generally, the finer the frequency band division, the more refined the feature capture and the better the model performance, but the computational cost also increases progressively.
[0069] S203, perform feature extraction on each of the time-series sub-band signals to obtain the target features of the time-series data.
[0070] Since each time-series sub-band signal filtered by the filter represents the time sequence in the corresponding frequency band, if features are extracted from each time-series sub-band signal, the time-series features of the time series data in different frequency bands can be extracted, and the time-series features of different frequency bands constitute the target features of the time series data.
[0071] Understandably, each time-series sub-band signal corresponds to a sub-time series data. When extracting features from each time-series sub-band signal, the calculation function corresponding to the target feature can be used to calculate the sub-time series data corresponding to each time-series sub-band signal, thus obtaining the time-series features corresponding to that time-series sub-band signal. For example, it is possible to use... , , as well as The function is used to solve for the minimum, maximum, mean, and standard deviation of the sub-time series data corresponding to each time series sub-band signal.
[0072] In this embodiment of the application, the obtained target features may include at least one of the following: autoregressive model coefficients; Shannon entropy; statistical features; first-order difference zero-crossing rate; and mean-crossing rate. The statistical features may include at least one of variance, standard deviation, mean, minimum 25th percentile, median, 75th percentile, maximum, root mean square, and gradient mean; the first-order difference zero-crossing rate represents the number of times the difference crosses the zero line; and the mean-crossing rate represents the number of times the difference crosses the mean line.
[0073] These target features are the extractable time-series features, which describe the magnitude, trend, rate of change, regularity, and stability of time-series data in different frequency bands. Of course, other required features can also be derived from these time-series features. Understandably, when extracting features from each time-series sub-band signal, all general time-series features can be extracted, not just those mentioned above. Furthermore, different time-series features can be extracted for different application scenarios.
[0074] In this embodiment of the application, after extracting features from each of the time-series sub-band signals to obtain the target features of the time-series data, the performance of the machine learning model can also be tested using the target features.
[0075] The following sections use discrete wavelet filter banks and S-transform filter banks as examples, and credit data as time series data, to verify the feature extraction method for time series data provided in this application.
[0076] This experiment extracts the user credit limit utilization rate of a credit product over 180 days as time series data. Specifically, the user credit limit utilization rate of each user over 180 days is collected as a time series data, i.e., sample data. The user credit limit utilization rate of each day is used as a sample point. Users who have had serious delinquencies, users who do not use the product, users who have been delinquent since the beginning of the performance period, users whose accounts have been open for less than 6 months, and users who have triggered anti-fraud measures are excluded. Then, feature extraction is performed on the time domain signal corresponding to each sample data.
[0077] The time-domain signal waveform corresponding to the collected user credit limit utilization rate can be referenced. Figure 8 As shown. In Figure 8 In the graph, the horizontal axis represents time (days), and the vertical axis represents the user's quota utilization rate. As can be seen from the graph, the curve decreases when a user repays a loan, increases when a user borrows, and remains unchanged for a long period when a user is overdue. Because user borrowing and repayment operations usually have a certain time interval, the time-domain signal typically exhibits a stepped change. The table below shows the results. Figure 8 The corresponding sample data:
[0078]
[0079] When selecting wavelet basis functions, such as Figure 9 As shown, since the time-domain signal waveform corresponding to the user's credit usage rate is very similar to the Haar wavelet waveform, the Haar wavelet function is selected as the wavelet basis function of the discrete wavelet transform in order to capture more features.
[0080] During the experiment, the KS (Kolmogorov-Smirnov) index was used to evaluate the model's performance. Generally, the larger the KS index, the stronger the model's ability to distinguish risks.
[0081] First, features are extracted using the untransformed original time-domain signal, i.e., feature calculation is performed on the sample data in the table above. The obtained target features are: Shannon entropy 2.183873e+00, first-order difference zero-crossing rate 8.000000e+00, mean-crossing rate 3.000000e+00, minimum value 5.445276e-01, 25th percentile 6.987240e-01, 75th percentile 7.705894e-01, median 9.725609e-01, mean 7.519479e-01, and variance 7.334048e-01. The standard deviation is 1.260993e-01, the root mean square is 1.590104e-02, the coefficients of the 5th-order autoregressive model are 7.334048e-01, the coefficient of the 5th-order autoregressive model 0 is 9.757138e-01, the coefficient of the 5th-order autoregressive model 1 is -1.905276e-15, the coefficient of the 5th-order autoregressive model 2 is 8.115073e-15, the coefficient of the 5th-order autoregressive model 3 is 9.457542e-02, the coefficient of the 5th-order autoregressive model 4 is -1.188617e-01, and the coefficient of the 5th-order autoregressive model 5 is 3.535742e-02.
[0082] The LightGBM model was then trained using the aforementioned target features, resulting in a KS value of 0.3930, which was used as a benchmark for evaluating the model's performance.
[0083] Next, as Figure 10 As shown, a discrete wavelet filter bank is used to decompose the time-domain signal corresponding to each sample data multiple times. For most time-domain signals, only 2 sample points remain after 7 decompositions. After the 8th decomposition, the time-series sub-band signals corresponding to many sample data are consistent. Therefore, this experiment only extracts features from the time-series sub-band signals of the first 7 decompositions.
[0084] For example, after passing the sample data through the first Haar wavelet filter, the resulting sub-time series is as follows: Figure 10As shown in Level 1, feature extraction is performed on the time-series sub-band signal (Approximation coefficients) obtained after passing through the Haar wavelet low-pass filter. The corresponding time-series features are as follows: Shannon entropy is 2.252595, first-order difference zero-crossing rate is 8.000000, mean-crossing rate is 3.000000, minimum value is 0.770078, 25th percentile is 0.988145, 75th percentile is 1.089778, median is 1.375409, and mean is 1.06. The variance is 1.037191, the standard deviation is 0.177771, the root mean square is 0.031602, the coefficients of the 5th-order autoregressive model are 1.037191, the coefficient of the 5th-order autoregressive model 0 is 0.978488, the coefficient of the 5th-order autoregressive model 1 is 0.065783, the coefficient of the 5th-order autoregressive model 2 is -0.097900, the coefficient of the 5th-order autoregressive model 3 is -0.000585, the coefficient of the 5th-order autoregressive model 4 is -0.049617, and the coefficient of the 5th-order autoregressive model 5 is 0.066693.
[0085] Using the same method, features can be extracted from each time-series sub-band signal after Haar wavelet filtering. When the time-series features extracted from all time-series sub-band signals are used as target features to train the LightGBM model, the obtained KS is 0.4337, which is significantly higher than the above benchmark value.
[0086] To illustrate the importance of selecting wavelet functions similar to the time-domain signal waveform, the table below shows the KS values obtained for wavelet functions sym9, coif2, db15, and Bior3.1, respectively. The table demonstrates that using wavelet functions similar to the time-domain signal waveform as the wavelet basis functions for discrete wavelet transform yields better KS values and superior model performance.
[0087]
[0088] Next, when performing frequency domain decomposition on the original time-domain signal using the S-transform filter bank, the bisection points, trisection points, and quartile points were selected as high and low frequency threshold points, respectively, and then features were extracted to train the LightGBM model. As shown in the table below, it can be seen that the finer the frequency band division, the finer the feature capture, and the better the model performance.
[0089]
[0090] The experiments above show that models using an N-level filter bank to extract features from different frequency bands perform significantly better than those trained by directly extracting features from the original time-domain signal. Furthermore, wavelet transform outperforms S-transform, possibly due to waveform variations; for time-series data with abrupt changes, irregular wavelet bases are more likely to capture effective features than smooth sine waves.
[0091] This application also provides a feature extraction device for time series data, such as... Figure 11 As shown, the device may include:
[0092] The signal acquisition module 1110 is used to acquire the time-domain signal corresponding to the user's time-series data, wherein the time-series data represents the user's economic behavior data;
[0093] The signal decomposition module 1120 is used to perform N-level frequency domain decomposition on the time domain signal using an N-level filter bank to obtain multiple time-series sub-band signals of different frequency bands, where N is a positive integer greater than or equal to 1.
[0094] The feature extraction module 1130 is used to extract features from each of the time-series sub-band signals to obtain the target features of the time-series data.
[0095] In the embodiments of this application, such as Figure 12 As shown, the signal decomposition module 1120 may include:
[0096] Preprocessing unit 1121 is used to take the first-stage filter bank as the current filter bank and the time-domain signal as the current processing signal;
[0097] Frequency domain decomposition unit 1122 is used to perform frequency domain decomposition on the current processed signal through the current filter group to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter group;
[0098] The judgment unit 1123 is used to determine whether the current filter bank is the Nth level filter bank;
[0099] The loop execution unit 1124 is used to, when the current filter bank is not the Nth level filter bank, take the low-pass subband signal as the current processing signal, take the next level filter bank as the current filter bank, and return to the frequency domain decomposition unit 1122 to continue to perform frequency domain decomposition on the current processing signal.
[0100] The timing subband acquisition unit 1125 is used to, when the current filter bank is the Nth level filter bank, take the high-pass subband signal and low-pass subband signal corresponding to each level of the filter bank as the timing subband signal of the multiple different frequency bands.
[0101] In this embodiment of the application, the filter bank can be a discrete wavelet filter bank or an S-transform filter bank.
[0102] In some embodiments, if the filter bank is a discrete wavelet filter bank, then the frequency domain decomposition unit 1122 may include:
[0103] The discrete wavelet decomposition unit is used to perform discrete wavelet transform on the current processed signal through the current filter bank based on a pre-selected wavelet basis function, so as to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank.
[0104] In this embodiment of the application, in order to obtain better model performance, when selecting wavelet basis functions, it is necessary to select wavelet bases that are as similar as possible to the time-domain signal waveform, i.e., the original time-series waveform, so as to facilitate feature capture. Therefore, the signal decomposition module 1120 may further include:
[0105] Wavelet basis selection unit, used to select wavelet basis functions.
[0106] In specific implementation, the wavelet basis selection unit selects a wavelet function that is similar to and orthogonal to the time-domain signal waveform as the wavelet basis function.
[0107] In some embodiments, if the filter bank is an S-transform filter bank, the frequency domain decomposition unit 1122 may further include:
[0108] The S-transform decomposition unit is used to perform S-transform on the current processed signal according to M points in the frequency domain in the current filter bank to obtain the high-frequency component and low-frequency component of the current processed signal, where M is a positive integer greater than or equal to 2.
[0109] The inverse transform unit is used to perform inverse transforms on the high-frequency component and the low-frequency component respectively to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank.
[0110] In some embodiments, such as Figure 13 As shown, the device may further include:
[0111] The model detection module 1140 is used to detect the performance of the machine learning model using the results of the feature analysis.
[0112] When the feature extraction device provided in the above embodiment is used, it first acquires the time-domain signal corresponding to the user's time-series data according to the signal acquisition module 1110; then, it performs N-level frequency domain decomposition on the time-domain signal according to the signal decomposition module 1120 to obtain multiple time-series sub-band signals of different frequency bands; then, it uses the feature extraction module 1130 to extract features from each time-series sub-band signal, and the obtained target features are the time-series features of the time-series data. The extracted target features include at least one of the following: autoregressive model coefficients; Shannon entropy; statistical features; first-order difference zero-crossing rate; and mean-crossing rate.
[0113] After extracting the temporal features, the extracted temporal features can be used by the model detection module 1140 to perform performance testing on the machine learning model in order to determine the effectiveness of the current model.
[0114] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0115] This application embodiment also provides a feature extraction device, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded by the processor and executed by the processor to extract the feature of time series data provided in the above method embodiment.
[0116] Furthermore, Figure 14 A schematic diagram of a hardware structure for implementing the method provided in the embodiments of this application is shown. This device may participate in or include the apparatus or system provided in the embodiments of this application. Figure 14 As shown, device 14 may include one or more processors 1402 (shown as 1402a, 1402b, ..., 1402n in the figure) (processor 1402 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 1404 for storing data, and a transmission device 1406 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 14 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, device 14 may also include a... Figure 14 The more or fewer components shown, or having the same Figure 14 The different configurations shown.
[0117] It should be noted that the aforementioned one or more processors 1402 and / or other data processing circuitry are generally referred to herein as "data processing circuitry". This data processing circuitry may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within device 14 (or mobile device). As involved in the embodiments of this application, this data processing circuitry serves as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0118] The memory 1404 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method described in the embodiments of this application. The processor 1402 executes various functional applications and data processing by running the software programs and modules stored in the memory 1404, thereby realizing the above-described method for feature extraction of time series data. The memory 1404 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1404 may further include memory remotely located relative to the processor 1402, and these remote memories can be connected to the device 14 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0119] The transmission device 1406 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of device 14. In one example, the transmission device 1406 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 1406 may be a radio frequency (RF) module used for wireless communication with the Internet.
[0120] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of device 14 (or a mobile device).
[0121] This application also provides a computer storage medium storing at least one instruction or at least one program, which is loaded and executed by a processor to implement the feature extraction method for time series data provided in the above method embodiments.
[0122] Optionally, in this embodiment, the aforementioned computer storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the aforementioned storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0123] This application also provides a computer program product or computer program that includes computer instructions stored in a computer storage medium. The processor of the feature extraction device reads the computer instructions from the computer storage medium and executes the computer instructions, causing the feature extraction device to perform the steps described in the above-described method embodiments.
[0124] As can be seen from the embodiments of the time series data feature extraction method, apparatus, device, and storage medium provided in this application, this application utilizes a multi-level filter bank to decompose the time-domain signal corresponding to the time series data step by step, obtaining time-series sub-band signals of multiple frequency bands. Since each time-series sub-band signal corresponds to a different frequency band, by performing feature extraction on the time-series sub-band signal of each frequency band, the features of the time series data in different subdivided frequency bands can be extracted, thereby obtaining more features of the time series data. Selecting a wavelet function similar to the waveform of the time-domain signal can improve the performance of the model. Using a wavelet function with orthogonality can filter out noise in the time-domain signal, playing a noise reduction role, which can further improve the model's performance.
[0125] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0126] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and electronic device embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0127] The foregoing description has fully disclosed the specific embodiments of this application. It should be noted that any modifications made by those skilled in the art to the specific embodiments of this application do not depart from the scope of the claims. Accordingly, the scope of the claims of this application is not limited to the foregoing specific embodiments.
Claims
1. A feature extraction method for time series data, characterized in that, The method includes: Obtain the time-domain signal corresponding to the user's time-series data, wherein the time-series data represents the user's economic behavior data; the economic behavior data includes credit data or payment data, wherein the credit data includes at least one of user credit limit utilization rate data or successful application frequency data, and the payment data includes at least one of red envelope receipt data, red envelope payment data, face-to-face payment data, transfer receipt data, or transfer payment data. The time-domain signal is decomposed into multiple time-series sub-band signals in different frequency bands using an N-level filter bank, where N is a positive integer greater than or equal to 1; each time-series sub-band signal filtered by the filter bank represents the timing in the corresponding frequency band. Feature extraction is performed on each of the time-series sub-band signals to obtain the target features of the time-series data, including: feature extraction for each of the time-series sub-band signals to obtain the time-series features of the corresponding frequency band for each of the time-series sub-band signals; the target features are the time-series features of different frequency bands extracted from the time-series data, and the time-series features are used to describe at least one of the magnitude, trend, rate of change, regularity, or stability of the time-series data in different frequency bands; The step of using an N-level filter bank to perform N-level frequency domain decomposition on the time-domain signal to obtain multiple time-series sub-band signals of different frequency bands includes: The first-level filter bank is used as the current filter bank, and the time-domain signal is used as the current processing signal; The current processed signal is decomposed in the frequency domain by the current filter group to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter group. If the current filter bank is not the Nth level filter bank, then the low-pass subband signal is used as the current processing signal, the next level filter bank is used as the current filter bank, and the process returns to the step of performing frequency domain decomposition on the current processing signal through the current filter bank to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank. If the current filter bank is the Nth level filter bank, then the high-pass subband signal and low-pass subband signal corresponding to each level of the filter bank are used as the time-series subband signals of the multiple different frequency bands; If the filter bank is an S-transform filter bank, then the step of performing frequency domain decomposition on the current processed signal through the current filter bank to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank includes: In the current filter bank, the current processed signal is subjected to S-transform at M points in the frequency domain to obtain the high-frequency component and low-frequency component of the current processed signal, where M is a positive integer greater than or equal to 2. The high-frequency component and the low-frequency component are respectively inversely transformed to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank.
2. The method according to claim 1, characterized in that, If the filter bank is a discrete wavelet filter bank, then the step of performing frequency domain decomposition on the current processed signal through the current filter bank to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank includes: Based on the pre-selected wavelet basis function, the current processed signal is subjected to discrete wavelet transform through the current filter bank to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank.
3. The method according to claim 2, characterized in that, Before performing discrete wavelet transform on the current processed signal using the current filter bank based on the pre-selected wavelet basis function to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank, the step of selecting the wavelet basis function is further included: The selection of wavelet basis functions includes: Select a wavelet function that is similar to and orthogonal to the time-domain signal waveform as the wavelet basis function.
4. The method according to claim 1, characterized in that, The target feature includes at least one of the following: Autoregressive model coefficients; Shannon entropy; statistical characteristics; first-order difference zero-crossing rate; mean-crossing rate.
5. The method according to claim 1, characterized in that, After performing feature extraction on each of the time-series sub-band signals to obtain the target features of the time-series data, the method further includes: The performance of the machine learning model is tested using the target features.
6. A feature extraction device for time series data, characterized in that, The device includes: The signal acquisition module is used to acquire the time-domain signal corresponding to the user's time-series data, wherein the time-series data represents the user's economic behavior data; the economic behavior data includes credit data or payment data, wherein the credit data includes at least one of user credit limit utilization rate data or successful application frequency data, and the payment data includes at least one of red envelope receipt data, red envelope payment data, face-to-face payment data, transfer receipt data, or transfer payment data. The signal decomposition module is used to perform N-level frequency domain decomposition on the time-domain signal using an N-level filter bank to obtain multiple time-series sub-band signals in different frequency bands, where N is a positive integer greater than or equal to 1; each time-series sub-band signal filtered by the filter bank represents the timing in the corresponding frequency band. The feature extraction module is used to extract features from each of the time-series sub-band signals to obtain the target features of the time-series data. This includes: extracting features from each of the time-series sub-band signals to obtain the time-series features of the corresponding frequency band for each time-series sub-band signal; the target features are time-series features of different frequency bands extracted from the time-series data, and the time-series features are used to describe at least one of the following in different frequency bands: magnitude, trend, rate of change, regularity, or stability of the time-series data. The signal decomposition module includes: The preprocessing unit is used to take the first-stage filter bank as the current filter bank and the time-domain signal as the current processing signal; The frequency domain decomposition unit is used to perform frequency domain decomposition on the current processed signal through the current filter bank to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank. The determination unit is used to determine whether the current filter bank is the Nth level filter bank; The loop execution unit is configured to, when the current filter bank is not the Nth level filter bank, take the low-pass subband signal as the current processing signal, take the next level filter bank as the current filter bank, and return to the frequency domain decomposition unit to continue to perform frequency domain decomposition on the current processing signal. The timing subband acquisition unit is used to, when the current filter bank is the Nth level filter bank, take the high-pass subband signal and low-pass subband signal corresponding to each level of the filter bank as the timing subband signal of the multiple different frequency bands; If the filter bank is an S-transform filter bank, then the frequency domain decomposition unit further includes: The S-transform decomposition unit is used to perform S-transform on the current processed signal according to M points in the frequency domain in the current filter bank to obtain the high-frequency component and low-frequency component of the current processed signal, where M is a positive integer greater than or equal to 2. The inverse transform unit is used to perform inverse transforms on the high-frequency component and the low-frequency component respectively to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank.
7. The apparatus according to claim 6, characterized in that, If the filter bank is a discrete wavelet filter bank, then the frequency domain decomposition unit includes: The discrete wavelet decomposition unit is used to perform discrete wavelet transform on the current processed signal through the current filter bank based on a pre-selected wavelet basis function, so as to obtain the high-pass subband signal and low-pass subband signal corresponding to the current filter bank.
8. The apparatus according to claim 7, characterized in that, The signal decomposition module further includes: Wavelet basis selection unit, used to select wavelet basis functions; The wavelet basis selection unit is further configured to select a wavelet function that is similar to and orthogonal to the time-domain signal waveform as the wavelet basis function.
9. The apparatus according to claim 6, characterized in that, The target feature includes at least one of the following: Autoregressive model coefficients; Shannon entropy; statistical characteristics; first-order difference zero-crossing rate; mean-crossing rate.
10. The apparatus according to claim 6, characterized in that, The device further includes: The model detection module is used to evaluate the performance of machine learning models using the results of feature analysis.
11. A feature extraction device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded by the processor and executed as the feature extraction method for time series data as described in any one of claims 1-5.
12. A computer storage medium, characterized in that, The computer storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the feature extraction method for time series data as described in any one of claims 1-5.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by an electronic device, it implements the feature extraction method for time series data as described in any one of claims 1-5.