Power time sequence data processing method and device and computer equipment
By dividing power time series data into subsequences and adjusting feature weights, the problem of feature representation of power time series data under sudden change scenarios is solved, and more accurate feature extraction and representation are achieved.
Patent Information
- Application Number
- CN202511919640.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, feature extraction from power time-series data relies on fixed rules or static dimensions, resulting in poor accuracy of feature representation in scenarios such as sudden changes in power load and equipment failures.
The power time series data is divided into subsequences. An initial feature vector is constructed through feature extraction. The sequence at a specified time is predicted. The feature weight vector is determined based on the difference between the actual sequence and the predicted sequence. The initial feature vector is adjusted to obtain the target feature vector.
It improves the accuracy of power time series data representation, adapts to the non-stationarity and sudden changes in power data, and enhances the adaptability and accuracy of feature extraction.
Smart Images

Figure CN121502323A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power data technology, and in particular to a method, apparatus and computer equipment for processing power time-series data. Background Technology
[0002] With the rapid development of smart grids and the Internet of Things for power, massive amounts of time-series data, such as voltage, current, power, and frequency, have been generated in the power system.
[0003] These time-series data typically exhibit characteristics such as non-stationarity, susceptibility to sudden changes, and multi-scale features. Related technologies often rely on fixed rules or static dimensions for feature extraction, such as wavelet transform and Fourier transform, which limits the expressive power of the features. This is especially true in scenarios involving sudden changes in power load or equipment failures, where features directly extracted from raw power data often lack accuracy in representing the original power data. Summary of the Invention
[0004] Therefore, it is necessary to provide a power time series data processing method, apparatus, and computer equipment that can improve the accuracy of the representation of raw power data in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for processing power time-series data, including:
[0006] Acquire power time-series data and divide the power time-series data into at least two sub-series;
[0007] For each subsequence, feature extraction is performed to construct an initial feature vector:
[0008] Based on the subsequence, the predicted sequence at a specified time is obtained;
[0009] Determine the true sequence at a specified time point, and determine the feature weight vector based on the difference between the true sequence and the predicted sequence;
[0010] The initial feature vector is adjusted based on the feature weight vector to obtain the target feature vector.
[0011] In one embodiment, based on the subsequence, a predicted sequence for a specified time is predicted, including:
[0012] Feature extraction is performed on the latest subsequence to obtain a multidimensional feature vector;
[0013] Determine the initial weight vector for the multidimensional feature vector;
[0014] Based on the multidimensional feature vector and the initial weight vector, the predicted sequence at the specified time is obtained.
[0015] In one embodiment, the feature weight vector is determined based on the difference between the true sequence and the predicted sequence, including:
[0016] Determine the prediction error value based on the actual sequence and the predicted sequence;
[0017] Based on the prediction error value, the initial weight vector is adjusted to obtain the feature weight vector.
[0018] In one embodiment, the initial feature vector is adjusted based on the feature weight vector to obtain the target feature vector, including:
[0019] Based on the feature weight vector, determine the weight coefficient of each feature in the initial feature vector;
[0020] Features in the initial feature vector whose weight coefficients are less than or equal to a predetermined weight threshold are sparsified.
[0021] The target feature vector is determined based on the initial feature vector after sparsification.
[0022] In one embodiment, determining the target feature vector based on the initial feature vector after sparsification further includes:
[0023] Determine the initial principal component space for power time series data;
[0024] Based on the sparsified features in the initial feature vector, the initial principal component space is updated to obtain the target principal component space;
[0025] The sparsified features in the initial feature vector are projected onto the target principal component space to reduce the dimensionality of the sparsified features.
[0026] The target feature vector is obtained based on the initial feature vector after dimensionality reduction.
[0027] In one embodiment, determining the target feature vector based on the initial feature vector after sparsification further includes:
[0028] Clustering is performed on each feature in the initial feature vector after sparsification to obtain several clusters;
[0029] The features in each cluster are merged to obtain the target feature vector.
[0030] In one embodiment, feature extraction is performed on each subsequence to construct an initial feature vector, including:
[0031] Extract the time-domain features, frequency-domain features, and time-frequency-domain features of each subsequence;
[0032] An initial feature vector is constructed based on time-domain features, frequency-domain features, and time-frequency-domain features.
[0033] In one embodiment, the method further includes:
[0034] Input the target feature vector into the specified prediction model to obtain the predicted power data;
[0035] Determine the actual power data at the forecast time corresponding to the predicted power data;
[0036] Determine the data discrepancies based on actual power data and predicted power data;
[0037] If the data difference is greater than or equal to a specified difference threshold, return the steps for predicting the predicted sequence at a specified time based on the subsequence.
[0038] Secondly, this application also provides a power time-series data processing apparatus, comprising:
[0039] The data acquisition module is used to acquire power time-series data and divide the power time-series data into at least two sub-series.
[0040] The vector construction module is used to extract features from each subsequence and construct an initial feature vector:
[0041] The sequence prediction module is used to predict the sequence at a specified time based on the subsequence;
[0042] The weight determination module is used to determine the true sequence at a specified time and to determine the feature weight vector based on the difference between the true sequence and the predicted sequence.
[0043] The vector adjustment module is used to adjust the initial feature vector based on the feature weight vector to obtain the target feature vector.
[0044] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0045] Acquire power time-series data and divide the power time-series data into at least two sub-series;
[0046] For each subsequence, feature extraction is performed to construct an initial feature vector:
[0047] Based on the subsequence, the predicted sequence at a specified time is obtained;
[0048] Determine the true sequence at a specified time point, and determine the feature weight vector based on the difference between the true sequence and the predicted sequence;
[0049] The initial feature vector is adjusted based on the feature weight vector to obtain the target feature vector.
[0050] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0051] Acquire power time-series data and divide the power time-series data into at least two sub-series;
[0052] For each subsequence, feature extraction is performed to construct an initial feature vector:
[0053] Based on the subsequence, the predicted sequence at a specified time is obtained;
[0054] Determine the true sequence at a specified time point, and determine the feature weight vector based on the difference between the true sequence and the predicted sequence;
[0055] The initial feature vector is adjusted based on the feature weight vector to obtain the target feature vector.
[0056] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0057] Acquire power time-series data and divide the power time-series data into at least two sub-series;
[0058] For each subsequence, feature extraction is performed to construct an initial feature vector:
[0059] Based on the subsequence, the predicted sequence at a specified time is obtained;
[0060] Determine the true sequence at a specified time point, and determine the feature weight vector based on the difference between the true sequence and the predicted sequence;
[0061] The initial feature vector is adjusted based on the feature weight vector to obtain the target feature vector.
[0062] The aforementioned power time-series data processing method, apparatus, and computer equipment acquire power time-series data, divide the data into at least two sub-series, extract features from each sub-series, construct an initial feature vector, predict the sequence at a specified time based on the sub-series, determine the true sequence at the specified time, and determine a feature weight vector based on the difference between the true and predicted sequences. The initial feature vector is then adjusted based on the feature weight vector to obtain a target feature vector. This application addresses the non-stationarity and abrupt changes in power data by identifying variations in power time-series data through the difference between the true and predicted sequences. This allows for the adaptive selection of corresponding feature weight vectors and adjustment of the initial feature vector, resulting in a target feature vector that more accurately represents the power time-series data. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is an application environment diagram of a power time-series data processing method in one embodiment;
[0065] Figure 2 This is a flowchart illustrating a power time-series data processing method in one embodiment;
[0066] Figure 3 This is a flowchart illustrating the power time-series data processing method in another embodiment;
[0067] Figure 4 This is a flowchart illustrating the power time-series data processing method in yet another embodiment;
[0068] Figure 5 This is a structural block diagram of a power timing data processing device in one embodiment;
[0069] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0071] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0072] The power time-series data processing method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. The data storage system can store power time-series data. Terminal 102 can read power time-series data from server 104, then divide the power time-series data into at least two sub-sequences, extract features from each sub-sequence, construct an initial feature vector, predict the predicted sequence at a specified time based on the sub-sequences, determine the true sequence at the specified time, and determine the feature weight vector based on the difference between the true sequence and the predicted sequence. The initial feature vector is then adjusted based on the feature weight vector to obtain the target feature vector. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart TVs, smart in-vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Headset devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0073] In one exemplary embodiment, such as Figure 2 As shown, a power time-series data processing method is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps S110 to S150. Wherein:
[0074] Step S110: Obtain power time series data and divide the power time series data into at least two subsequences;
[0075] Among them, power time series data refers to power data described in time series form, such as one or more of the characteristic values describing power information, such as voltage, current, and power.
[0076] For example, this embodiment can acquire raw power data and then preprocess the raw power data to obtain power time-series data. For example, preprocessing can include data cleaning, outlier detection and correction, and normalization. For data cleaning, this embodiment can fill in the raw power data with more than a predetermined number of consecutive missing data points using linear interpolation or spline interpolation. For missing data points exceeding the predetermined number consecutively, the data segment is directly marked as invalid or deleted and not involved in subsequent processing to avoid introducing excessive errors. For outlier detection and correction, this embodiment can calculate the mean μ and standard deviation σ of the data points for each channel (i.e., the same type of data), and determine the data points falling outside the interval [μ-3σ, μ+3σ] as outliers, replacing the outliers with the mean of the data points in the preceding and following windows. For normalization, this embodiment can linearly map data points to the interval [0, 1]. The normalization formula is: x'=(x-min) / (max-min), which is suitable for normalization processing that requires limiting the output range. x' is the data point after normalization, x is the data point before normalization, min is the minimum value of the data point, and max is the maximum value of the data point.
[0077] After obtaining power time-series data, this embodiment can divide the data into several sub-series according to a predetermined time interval. Alternatively, to enhance the connection between preceding and subsequent data, this embodiment can also divide the power time-series data into several sub-series using a sliding window. The base window duration of the sliding window can be a pre-set duration or a base window duration T set based on the sampling frequency. The number of data points within the window is N = T × f_s, where f_s is the sampling frequency. A fixed sliding step size is set based on the base window duration, such as 60% or 70% of the base window duration. Furthermore, this embodiment can also associate labels with the sub-series, using the data within the corresponding window as features and the data value or trend at a future specified time point after the window ends as the label for that window. Alternatively, the power grid status within that time period can also be used as the label.
[0078] Step S120: Extract features from each subsequence and construct an initial feature vector;
[0079] For each subsequence, this embodiment can extract features from the time dimension to obtain time-domain features. This embodiment can also transform the subsequence from the time domain to the frequency domain using Fourier transform to obtain the corresponding spectrum, and extract features from the spectrum to obtain frequency-domain features. This embodiment can also perform wavelet transform on the subsequence to obtain wavelet transform-related features, and perform variational mode decomposition on the subsequence to obtain intrinsic mode function features. At least one of the wavelet transform-related features and intrinsic mode function features is used as time-frequency domain features. Furthermore, this embodiment can construct an initial feature vector using at least one of the time-domain features, frequency-domain features, and time-frequency domain features.
[0080] In some embodiments, feature extraction is performed on each subsequence to construct an initial feature vector, including:
[0081] Step S121: Extract the time-domain features, frequency-domain features, and time-frequency-domain features of each subsequence;
[0082] Step S122: Construct an initial feature vector based on time-domain features, frequency-domain features, and time-frequency-domain features.
[0083] For example, for each subsequence, this embodiment can extract features from the time dimension to obtain time-domain features, such as trend characteristics describing the central tendency of data points in the subsequence (e.g., mean, median, etc.), discrete characteristics describing the degree of dispersion (e.g., standard deviation, variance, range, etc.), morphological characteristics describing the distribution pattern (e.g., skewness, kurtosis, etc.), and other derived statistical features, such as zero-crossing rate (the frequency with which data points cross zero or the mean), waveform indicators (peak factor, impulse factor, waveform factor), correlation features (calculating the autocorrelation coefficient of the subsequence and extracting the time lag of the autocorrelation coefficient decaying to a specific threshold), approximate entropy, or sample entropy (measuring the complexity and unpredictability of the time series), at least one of these.
[0084] For example, for each subsequence, this embodiment can transform the subsequence from the time domain to the frequency domain using Fourier transform to obtain the spectrum corresponding to the subsequence. Feature extraction is performed on the spectrum to obtain frequency domain features, such as at least one of the following: dominant frequency (the frequency component with the largest amplitude in the spectrum), spectral centroid (the location where the energy of the spectrum is concentrated), spectral variance (the degree of dispersion of the energy of the spectrum), spectral entropy (the entropy value of the spectral components, which measures the degree of disorder in the frequency distribution), and band energy (the proportion of energy in multiple key frequency bands that divide the spectrum).
[0085] For example, for each subsequence, this embodiment can obtain wavelet transform-related features by performing wavelet transform on the subsequence. These wavelet transform-related features can be at least one of wavelet coefficient features (statistics of wavelet detail coefficients and approximation coefficients after wavelet transform) and wavelet energy entropy (energy distribution entropy of wavelet coefficients after wavelet transform). This embodiment can also perform variational mode decomposition on the subsequence to obtain intrinsic mode function features. For example, the subsequence S(t) can be decomposed into K quasi-orthogonal IMF (Intrinsic Mode Function) components (IMF1, IMF2, ..., IMFK) with center frequencies through variational mode decomposition. Then, feature extraction is performed on each IMF component to obtain intrinsic mode function features. These intrinsic mode function features can include at least one of IMF energy (energy of each IMF component), IMF center frequency (recording the center frequency of each IMF component), and IMF sample entropy (sample entropy of each IMF component, describing the complexity of each frequency band component). This embodiment can include at least one of wavelet transform related features and variational mode features.
[0086] Therefore, this embodiment can construct an initial feature vector based on time-domain features, frequency-domain features, and time-frequency-domain features. For example, the initial feature vector F_initial = [time-domain features, frequency-domain features, time-frequency-domain features].
[0087] Step S130: Based on the subsequence, predict the predicted sequence at the specified time.
[0088] The specified time is the time after the corresponding time in the subsequence.
[0089] This embodiment can extract features from at least a portion of the subsequences to obtain multi-dimensional feature vectors, and then perform prediction based on these multi-dimensional feature vectors to obtain the predicted sequence at a specified time. Alternatively, this embodiment can extract features from all subsequences to obtain multi-dimensional feature vectors, and then perform prediction based on these multi-dimensional feature vectors to obtain the predicted sequence at a specified time. To improve the prediction efficiency and real-time performance of the predicted sequence, this embodiment can select the latest subsequence from the subsequences divided from the power time-series data, and then predict the predicted sequence at a specified time based on the latest subsequence.
[0090] Step S140: Determine the true sequence at the specified time and determine the feature weight vector based on the difference between the true sequence and the predicted sequence;
[0091] For example, in this embodiment, after reaching a specified time, a subsequence at that specified time is collected as the true sequence. Then, based on the difference between the true sequence and the predicted sequence, a feature weight vector is determined. The difference between the true sequence and the predicted sequence can be represented by the difference, ratio, or loss value of a predetermined loss function. The predetermined loss function is a function used to describe the difference between the sequences. For example, in this embodiment, a prediction error value can be calculated based on the true sequence and the predicted sequence using the predetermined loss function. Then, in this embodiment, the initial weight vector can be adjusted based on the prediction error value to obtain a feature weight vector. The initial weight vector includes at least the weight coefficients of each feature in the initial feature vector. The adjustment direction of the initial weight vector is the direction in which the difference between the true sequence and the predicted sequence (such as the prediction error value) decreases.
[0092] Step S150: Adjust the initial feature vector based on the feature weight vector to obtain the target feature vector.
[0093] For example, this embodiment can determine the weight coefficients of each feature in the initial feature vector based on the feature weight vector, perform sparsification on features whose weight coefficients are less than or equal to a predetermined weight threshold in the initial feature vector, and determine the target feature vector based on the sparsified initial feature vector. Further, this embodiment can also determine the initial principal component space of the power time series data, update the initial principal component space based on the sparsified features in the initial feature vector to obtain the target principal component space, project the sparsified features in the initial feature vector onto the target principal component space, perform dimensionality reduction on the sparsified features, and obtain the target feature vector based on the dimensionality-reduced initial feature vector. In addition, this embodiment can also perform clustering on each feature in the sparsified initial feature vector to obtain several clusters, and merge the features in each cluster to obtain the target feature vector. In another example, this embodiment can also perform weighted processing on the initial feature vector based on the feature weight vector to obtain the target feature vector. The target feature vector can be used as a training dataset for training the model, or as input features of the model.
[0094] In some embodiments, the method further includes:
[0095] Step S210: Input the target feature vector into the specified prediction model to obtain the predicted power data;
[0096] Step S220: Determine the actual power data at the prediction time corresponding to the predicted power data;
[0097] Step S230: Determine the data discrepancy based on the actual power data and the predicted power data;
[0098] Step S240: If the data difference is greater than or equal to a specified difference threshold, return the step of predicting the predicted sequence at a specified time based on the subsequence.
[0099] The specified prediction model can be a neural network model (such as a recurrent neural network, convolutional neural network, etc.) or a linear model (such as linear regression, logistic regression, perceptron, etc.). The specified prediction model can be a locally stored model or an online model. Data difference can be a representation of the difference or ratio between predicted power data and actual power data.
[0100] This embodiment inputs the target feature vector into a specified prediction model to obtain predicted power data. Then, it collects the actual power data at the predicted time corresponding to the predicted power data. Next, based on the actual power data and the predicted power data, this embodiment determines the data difference. Taking current data as an example, the data difference can be a current difference or current ratio, etc. If the data difference is greater than or equal to a specified difference threshold, the embodiment returns to the step of predicting the predicted sequence at the specified time based on the subsequence, thereby redetermining the feature weight vector. In cases where the data error caused by the target feature vector under the feature weight vector is large, this embodiment redetermines the feature weight vector to ensure that the feature weight vector is adapted to the real-time power data changes.
[0101] In the aforementioned power time-series data processing method, power time-series data is acquired, divided into at least two sub-series, features are extracted from each sub-series, an initial feature vector is constructed, a predicted sequence for a specified time is predicted based on the sub-series, the true sequence for the specified time is determined, and a feature weight vector is determined based on the difference between the true sequence and the predicted sequence. The initial feature vector is then adjusted based on the feature weight vector to obtain the target feature vector. This application's embodiment addresses the non-stationarity and abrupt changes in power data by identifying changes in power time-series data through the difference between the true sequence and the predicted sequence. This allows for the adaptive selection of corresponding feature weight vectors and adjustment of the initial feature vector, resulting in a target feature vector that more accurately represents the power time-series data.
[0102] In one exemplary embodiment, such as Figure 3 As shown, predicting the predicted sequence at a specified time based on the subsequence includes steps S310 to S330. Wherein:
[0103] Step S310: Extract features from the latest subsequence to obtain a multidimensional feature vector;
[0104] Step S320: Determine the initial weight vector of the multidimensional feature vector;
[0105] Step S330: Based on the multidimensional feature vector and the initial weight vector, the predicted sequence at the specified time is obtained.
[0106] The specified time is the time after the time corresponding to the latest subsequence, and the time interval between the specified time and the time corresponding to the latest subsequence can be selected according to actual needs.
[0107] This embodiment selects the latest subsequence from the subsequences divided from power time-series data for prediction. On one hand, the latest subsequence reflects the latest power data fluctuations; on the other hand, it avoids using the full power time-series data, effectively improving the real-time performance of the prediction. This embodiment can extract features from the latest subsequence to obtain a multi-dimensional feature vector, which includes at least all features from the initial feature vector. Furthermore, this embodiment can set corresponding weight coefficients for each feature of the multi-dimensional feature vector, and construct an initial weight vector based on these weight coefficients. It is understood that the weight coefficients in the initial weight vector can be specified values, small random numbers, or set based on prior knowledge. This embodiment can predict the sequence at a specified time based on the multi-dimensional feature vector and the initial weight vector. For example, this embodiment can input the multi-dimensional feature vector into a predetermined prediction model, so that the predetermined prediction model outputs the predicted sequence at a specified time based on the initial weight vector. The predetermined prediction model can be a neural network model (such as a recurrent neural network, convolutional neural network, etc.) or a linear model (such as linear regression, logistic regression, perceptron, etc.). The predicted model can be a locally stored model or an online model.
[0108] In some embodiments, determining the feature weight vector based on the difference between the true sequence and the predicted sequence includes:
[0109] Step S331: Determine the prediction error value based on the actual sequence and the predicted sequence;
[0110] Step S332: Adjust the initial weight vector according to the prediction error value to obtain the feature weight vector.
[0111] This embodiment calculates a prediction error value representing the degree of difference between the true sequence and the predicted sequence. For example, this embodiment can pre-set a loss function describing the degree of difference between sequences, and then substitute the true sequence and the predicted sequence into the loss function to obtain the prediction error value. Furthermore, this embodiment can adjust the initial weight vector based on the prediction error value to obtain a feature weight vector. For example, this embodiment can use the gradient of the prediction error value with respect to the initial weight vector:
[0112]
[0113] Where L is the prediction error value, w1, w2, ... w n The initial weight vector W t The weighting coefficients in the equation.
[0114] Then, based on the gradient, the initial weight vector is updated to obtain the feature weight vector. For example, the formula for calculating the feature weight vector is as follows:
[0115]
[0116] Among them, W t+1 For the feature weight vector, The prediction error value is related to the initial weight vector W. t The gradient is denoted by η, which is the learning rate and is used to control the step size for updating the initial weight vector.
[0117] In this embodiment, the prediction error value is determined based on the actual sequence and the predicted sequence. The initial weight vector is then adjusted based on the prediction error value to obtain the feature weight vector. Thus, this embodiment enables the feature weight vector to be adapted to the non-stationarity of the power time series data.
[0118] In one exemplary embodiment, such as Figure 4 As shown, adjusting the initial feature vector based on the feature weight vector to obtain the target feature vector includes steps S410 to S430. Wherein:
[0119] Step S410: Determine the weight coefficients of each feature in the initial feature vector based on the feature weight vector;
[0120] Step S420: Sparsify the features in the initial feature vector whose weight coefficients are less than or equal to a predetermined weight threshold.
[0121] Step S430: Determine the target feature vector based on the initial feature vector after sparsification.
[0122] Sparsification is a technique used to weaken features, allowing the target feature vector to focus on key information. A predetermined weight threshold is used to determine the weight value for each feature.
[0123] This embodiment determines the weight coefficients of each feature in the initial feature vector based on the feature weight vector. Then, features with weight coefficients less than or equal to a predetermined weight threshold are designated as low-weight features. Next, this embodiment performs sparsification on the low-weight features in the initial feature vector. For example, this embodiment can multiply the values of the low-weight features by a decay coefficient to reduce their values, thus completing the sparsification process. Then, this embodiment determines the sparsified initial feature vector as the target feature vector. This embodiment can also perform dimensionality reduction and / or clustering on the sparsified initial feature vector to obtain the target feature vector.
[0124] In some embodiments, determining the target feature vector based on the initial feature vector after sparsification further includes:
[0125] Step S431: Determine the initial principal component space of the power time series data;
[0126] Step S432: Based on the sparsified features in the initial feature vector, update the initial principal component space to obtain the target principal component space;
[0127] Step S433: Project the sparsified features in the initial feature vector onto the target principal component space and perform dimensionality reduction on the sparsified features.
[0128] Step S434: Based on the initial feature vector after dimensionality reduction, obtain the target feature vector.
[0129] The initial principal component space is the initial space describing the principal component directions of the power time series data.
[0130] This embodiment can also use historical power time-series data for principal component analysis to determine the initial principal component directions of the power time-series data, thus obtaining the initial principal component space of the power time-series data. This embodiment can update the initial principal component space based on the sparsified features in the initial feature vector to obtain the target principal component space. For example, this embodiment can incrementally update the initial principal component space using IPCA (Incremental Principal Component Analysis) (partial_fit method) based on the sparsified features in the initial feature vector to update the principal components of the initial principal component space, thus obtaining the target principal component space. Furthermore, this embodiment can project the sparsified features in the initial feature vector onto the target principal component space, perform dimensionality reduction on the sparsified features, and obtain the target feature vector based on the dimensionality-reduced initial feature vector.
[0131] This embodiment determines the initial principal component space of power time-series data, updates the initial principal component space based on the sparsified features in the initial feature vector, obtains the target principal component space, projects the sparsified features in the initial feature vector onto the target principal component space, performs dimensionality reduction on the sparsified features, and obtains the target feature vector based on the dimensionality-reduced initial feature vector. Therefore, using principal component analysis for dimensionality reduction helps improve the discriminative power of the target feature vector.
[0132] In some embodiments, determining the target feature vector based on the initial feature vector after sparsification further includes:
[0133] Step S510: Perform clustering on each feature in the initial feature vector after sparsification to obtain several clusters;
[0134] Step S550: Merge the features in each cluster to obtain the target feature vector.
[0135] Clustering can be performed using clustering algorithms such as K-means and hierarchical clustering.
[0136] The features in the initial feature vector after sparsification are clustered to obtain several clusters. The features in each cluster are then merged to obtain the target feature vector. For example, in this embodiment, the features in the clusters can be concatenated, weighted, or merged using statistical or learning methods. For example, taking the initial feature vector F_initial = [time domain features, frequency domain features, time-frequency domain features] as an example, in this embodiment, the time-frequency domain features and the time domain features form one cluster, and the frequency domain features form another cluster. In this embodiment, the time-frequency domain features and the time domain features can be fused to obtain the fused features, and the target feature vector F_optimized = [fused features, frequency domain features].
[0137] This embodiment can perform clustering on each feature in the initial feature vector after sparsification to obtain several clusters. The features in each cluster are then merged to obtain the target feature vector. This clustering process is used to merge redundant features, which helps to improve the computational efficiency of using the target feature vector.
[0138] In one specific embodiment, this embodiment may include the following process:
[0139] S1: Preprocess the power time series data by using a sliding window to divide the power time series data into multiple subsequences. The window size of the sliding window is set according to the sampling frequency of the power time series data.
[0140] S2: Extract time-domain features, frequency-domain features, and time-frequency-domain features for each subsequence, and construct an initial feature vector F_initial = [time-domain features, frequency-domain features, time-frequency-domain features];
[0141] S3: Using real-time data within a sliding window, the feature weights are updated through an online learning model to achieve dynamic adjustment of the feature weights;
[0142] S4: Based on the feature weights, sparsify the features in the initial feature vector whose weights are below a specified threshold, then use incremental principal component analysis or autoencoder to reduce the dimensionality of the feature, and evaluate the feature distribution of the initial feature vector through clustering algorithm, merge redundant features in the initial feature vector, and obtain the optimized feature vector.
[0143] S5: Input the optimized feature vector into the prediction model. When the output error of the prediction model exceeds the error threshold, the feature extraction and optimization process is retried.
[0144] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0145] Based on the same inventive concept, this application also provides a power time series data processing apparatus for implementing the power time series data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more power time series data processing apparatus embodiments provided below can be found in the limitations of the power time series data processing method described above, and will not be repeated here.
[0146] In one exemplary embodiment, such as Figure 5 As shown, a power time-series data processing device 600 is provided, including: a data acquisition module 610, a vector construction module 620, a sequence prediction module 630, a weight determination module 640, and a vector adjustment module 650, wherein:
[0147] The data acquisition module 610 is used to acquire power time-series data and divide the power time-series data into at least two sub-series.
[0148] Vector construction module 620 is used to extract features from each subsequence and construct an initial feature vector:
[0149] The sequence prediction module 630 is used to predict the predicted sequence at a specified time based on the subsequence;
[0150] The weight determination module 640 is used to determine the true sequence at a specified time and determine the feature weight vector based on the difference between the true sequence and the predicted sequence.
[0151] The vector adjustment module 650 is used to adjust the initial feature vector based on the feature weight vector to obtain the target feature vector.
[0152] In some embodiments, the sequence prediction module 630 is further configured to:
[0153] Feature extraction is performed on the latest subsequence to obtain a multidimensional feature vector. The initial weight vector of the multidimensional feature vector is determined. Based on the multidimensional feature vector and the initial weight vector, the predicted sequence at the specified time is predicted.
[0154] In some embodiments, the weight determination module 640 is further configured to:
[0155] Based on the true sequence and the predicted sequence, the prediction error value is determined. Based on the prediction error value, the initial weight vector is adjusted to obtain the feature weight vector.
[0156] In some embodiments, the vector adjustment module 650 is further configured to:
[0157] Based on the feature weight vector, determine the weight coefficient of each feature in the initial feature vector. Sparse the features whose weight coefficients in the initial feature vector are less than or equal to a predetermined weight threshold. Based on the initial feature vector after sparsification, determine the target feature vector.
[0158] In some embodiments, the vector adjustment module 650 is further configured to:
[0159] The initial principal component space of the power time series data is determined. Based on the sparsified features in the initial feature vector, the initial principal component space is updated to obtain the target principal component space. The sparsified features in the initial feature vector are projected onto the target principal component space. The dimensionality of the sparsified features is reduced. Based on the dimensionality-reduced initial feature vector, the target feature vector is obtained.
[0160] In some embodiments, the vector adjustment module 650 is further configured to:
[0161] Clustering is performed on each feature in the initial feature vector after sparsification to obtain several clusters. The features in each cluster are then merged to obtain the target feature vector.
[0162] In some embodiments, the vector construction module 620 is further configured to:
[0163] Extract the time-domain features, frequency-domain features, and time-frequency-domain features of each subsequence, and construct an initial feature vector based on these features.
[0164] In some embodiments, the power time-series data processing apparatus 600 further includes a model prediction module, for:
[0165] The target feature vector is input into the specified prediction model to obtain the predicted power data. The actual power data at the prediction time corresponding to the predicted power data is determined. The data difference is determined based on the actual power data and the predicted power data. If the data difference is greater than or equal to the specified difference threshold, the steps of predicting the prediction sequence at the specified time based on the subsequence are returned.
[0166] Each module in the aforementioned power time-series data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0167] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores power timing data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a power timing data processing method.
[0168] Those skilled in the art will understand that Figure 6The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0169] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the embodiments described above.
[0170] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above embodiments.
[0171] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above embodiments.
[0172] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0173] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0174] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0175] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for processing power time-series data, characterized in that, The method includes: Acquire power time-series data and divide the power time-series data into at least two sub-series; Feature extraction is performed on each subsequence to construct an initial feature vector; Based on the subsequence, a predicted sequence for a specified time is obtained; Determine the true sequence at the specified time, and determine the feature weight vector based on the difference between the true sequence and the predicted sequence; The initial feature vector is adjusted based on the feature weight vector to obtain the target feature vector.
2. The method according to claim 1, characterized in that, The step of predicting the predicted sequence at a specified time based on the subsequence includes: Feature extraction is performed on the latest subsequence to obtain a multidimensional feature vector; Determine the initial weight vector of the multidimensional feature vector; Based on the multidimensional feature vector and the initial weight vector, a predicted sequence at a specified time is obtained.
3. The method according to claim 2, characterized in that, The step of determining the feature weight vector based on the difference between the real sequence and the predicted sequence includes: The prediction error value is determined based on the actual sequence and the predicted sequence; Based on the prediction error value, the initial weight vector is adjusted to obtain the feature weight vector.
4. The method according to claim 1, characterized in that, The step of adjusting the initial feature vector based on the feature weight vector to obtain the target feature vector includes: Based on the feature weight vector, determine the weight coefficient of each feature in the initial feature vector; The features in the initial feature vector whose weight coefficients are less than or equal to a predetermined weight threshold are sparsified. The target feature vector is determined based on the initial feature vector after sparsification.
5. The method according to claim 4, characterized in that, The step of determining the target feature vector based on the initial feature vector after sparsification processing further includes: Determine the initial principal component space of the power time series data; Based on the sparsified features in the initial feature vector, the initial principal component space is updated to obtain the target principal component space; The sparsified features in the initial feature vector are projected onto the target principal component space, and the dimensionality of the sparsified features is reduced. The target feature vector is obtained based on the initial feature vector after dimensionality reduction.
6. The method according to claim 4, characterized in that, The step of determining the target feature vector based on the initial feature vector after sparsification processing further includes: Clustering is performed on each feature in the initial feature vector after sparsification to obtain several clusters; The features in each of the clusters are merged to obtain the target feature vector.
7. The method according to claim 1, characterized in that, The step of extracting features from each subsequence and constructing an initial feature vector includes: Extract the time-domain features, frequency-domain features, and time-frequency-domain features of each subsequence; Based on the time-domain features, frequency-domain features, and time-frequency-domain features, an initial feature vector is constructed.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The target feature vector is input into a specified prediction model to obtain predicted power data; Determine the actual power data at the prediction time corresponding to the predicted power data; The data discrepancies are determined based on the actual power data and the predicted power data; If the data difference is greater than or equal to a specified difference threshold, the step of predicting the predicted sequence at a specified time based on the subsequence is returned.
9. A power time-series data processing device, characterized in that, The device includes: The data acquisition module is used to acquire power time-series data and divide the power time-series data into at least two sub-series. The vector construction module is used to extract features from each subsequence and construct an initial feature vector: A sequence prediction module is used to predict a predicted sequence at a specified time based on the subsequence; The weight determination module is used to determine the true sequence at the specified time and determine the feature weight vector based on the difference between the true sequence and the predicted sequence. The vector adjustment module is used to adjust the initial feature vector based on the feature weight vector to obtain the target feature vector.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.