A power time series prediction dataset construction method and system

By integrating heterogeneous data from multiple sources and performing timestamp alignment, outlier cleaning, and unified format conversion, data related to power load were selected. A power time series dataset was constructed using a dynamic sampling weighting method, which solved the problem of single data source and improved prediction accuracy and model generalization ability.

CN120892824BActive Publication Date: 2025-12-09NARI TECH CO LTD +1

Patent Information

Application Number
CN202511440207.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2025-12-09
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

Existing power load forecasting methods rely on a single data source and fail to effectively incorporate and integrate multi-source heterogeneous time-series data, leading to difficulties in feature extraction and insufficient information utilization, which affects forecast accuracy and generalization performance.

Method used

This study integrates data from power sensors, dispatch centers, user terminals, and weather forecasting systems, and obtains multi-source time-series data covering energy, meteorology, transportation, and finance from public data sources. Through timestamp alignment, outlier cleaning, and unified format conversion, the study uses time-frequency feature extraction and similarity calculation to filter out data that are significantly related to power load. Finally, it constructs a heterogeneous power time-series dataset by combining dynamic sampling weighting methods.

Benefits of technology

It significantly improves the diversity and quality of data, enhances the generalization ability and pre-training and fine-tuning effects of time series prediction models, and improves the accuracy and stability of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892824B_ABST
    Figure CN120892824B_ABST
Patent Text Reader

Abstract

The application discloses a kind of electric power time sequence prediction dataset construction method and system, the method includes obtaining electric power load and weather data, constitutes electric power dataset and carries out cleaning alignment;While obtaining energy, meteorological and other multi-source public time sequence data;Two kinds of data are uniformly formatted and normalized, extract time-frequency characteristics and calculate similarity between sequences, filter out the public data significantly related to electric power load;Dynamic sampling weighting method is used to assign weight to each data, set sampling frequency, finally build heterogeneous electric power time sequence dataset for large model pre-training and fine-tuning;The application integrates multi-source heterogeneous data, constructs a unified standardized data format, and aligns and fuses multiple sources of data based on timestamp, significantly improves the consistency and availability of data, improves data fusion efficiency and model generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of data processing, and particularly relates to a power time sequence prediction data set construction method and system. BACKGROUND

[0002] With the deepening of the construction of new power systems, the penetration rate of new energy such as wind power and photovoltaic power in the power grid continues to increase, and the user side power consumption behavior is becoming increasingly diversified and interactive, and the dynamic coupling characteristics of the source and load sides are continuously enhanced. Under this background, the power load curve presents stronger volatility, intermittency and uncertainty, and its time sequence mode becomes increasingly complex, which puts higher requirements on the accuracy and timeliness of load prediction. The dependence of power system dispatching, market trading and stability control businesses on high-quality load prediction has significantly increased, and it has become one of the key challenges in the intelligent transformation of the industry.

[0003] The current mainstream power load prediction method is usually based on historical load data, and various time sequence analysis models or machine learning methods are used for modeling. Typical methods include using autoregressive integrated moving average (ARIMA), long short-term memory network (LSTM), gated recurrent unit (GRU) and other models, using historical load values as the main input, constructing training samples through a sliding window, and using sequence-to-sequence (Seq2Seq) or attention mechanism (Attention) to capture time sequence dependencies.

[0004] However, the existing technology has a most obvious disadvantage: the model input is mostly limited to single-source historical power data, the data dimension is relatively limited, and multi-source heterogeneous time sequence data from meteorology, economy, social events and the like cannot be effectively introduced and fused. Even if individual methods attempt to integrate external data, the differences in sampling frequency, time alignment and feature semantics of different source data often result in difficulty in feature extraction, insufficient information utilization, thereby limiting the ability of the model to describe complex multi-factor coupling relationships and affecting the prediction accuracy and generalization performance. SUMMARY

[0005] The purpose of the present application is to provide a power time sequence prediction data set construction method and system, which solves the problems of single source of power load prediction data, non-uniform format, low fusion efficiency of multi-source heterogeneous data and insufficient model generalization ability in the prior art.

[0006] The power time sequence prediction data set construction method provided by the present application comprises the following steps:

[0007] Step S1, obtaining power load data and weather data from power sensors, dispatching centers, user terminals and weather forecasting systems to form a power data set;

[0008] Step S2, for the time series data in the power dataset, align the power load data and weather data according to the timestamp, detect the mutation value and continuous constant value therein, and complete data cleaning by filling or discarding;

[0009] Step S3, acquiring multi-source time series data covering the fields of energy, meteorology, transportation and finance from public data sources to constitute a public dataset;

[0010] Step S4, converting the data in the cleaned power dataset into a unified format, the unified format including feature fields including target, start time, time series frequency and data number item_id, and optional feature fields including zero, one or two of dynamic covariates feat_dynamic_real and static covariates feat_static_real, the dynamic covariates including the following three types of characteristic factors: holiday characteristic factor, meteorological characteristic factor and load characteristic factor;

[0011] Step S5, normalizing the target values of the data in the power dataset and the public dataset, extracting the time-frequency features including mean, variance and Fourier transform coefficients, and calculating the similarity index between each time series data sequence in the power dataset and the public dataset;

[0012] Step S6, according to the similarity index, filtering out the data in the public dataset that has significant correlation with the power load to form a to-be-processed dataset together with the power dataset;

[0013] Step S7, using a dynamic sampling weighting method to calculate the weight of each time series data in the to-be-processed dataset, forming a weight mapping set weight_map, and setting a sampling frequency according to the weight mapping set, finally constructing a heterogeneous power time series dataset for power time series large model pre-training and fine-tuning.

[0014] The present application effectively solves the problem of single data source by integrating multi-source data such as power sensors, dispatching centers, user terminals and weather forecasting systems, and introducing public time series data covering the fields of energy, meteorology, transportation and finance; through timestamp alignment, outlier cleaning and unified format conversion, efficient fusion and standardized processing of multi-source heterogeneous data are realized; further using time-frequency feature extraction and similarity calculation, cross-domain data significantly correlated with power load are selected, and a heterogeneous dataset is constructed by combining a dynamic sampling weighting method, which significantly improves data diversity and quality, thereby enhancing the generalization ability and pre-training and fine-tuning effect of the time series prediction model.

[0015] Preferably, step S2 comprises:

[0016] The power load data and weather data are aligned based on timestamps, the weather data including temperature, wet-bulb temperature, relative humidity, wind speed and air pressure; the alignment process is based on uniform time granularity for interpolation or resampling processing, so that the load sequence and meteorological characteristics are aligned in the time dimension;

[0017] Local outliers are detected by using 3 sigma standard deviation method or interquartile range method, wherein, when the 3 sigma standard deviation method is used, the mean value mu and the standard deviation sigma of the time series are calculated, if the value x t of a time point satisfies |x t - mu | > 3 sigma, it is determined as a mutation value; when the interquartile range method is used, the first quartile Q1 and the third quartile Q3 are calculated, if the value x t satisfies x t < Q1 - 1.5 x IQR or x t > Q3 + 1.5 x IQR, wherein IQR = Q3 - Q1, it is determined as a mutation value;

[0018] Continuous constant values are detected by using logical judgment method, the time series is processed by sliding window according to time sequence, if there is a section with continuous length L greater than or equal to a preset threshold L0 and adjacent data point change rate a less than a preset threshold a0, the section is marked as a constant value section.

[0019] The detected mutation values and constant value sections are cleaned, including: assigning the data points corresponding to the mutation values and constant value sections as null values; for a data section with continuous null value length less than a threshold N1, linear interpolation, forward filling, backward filling or spline interpolation is used for completion; for a data section with continuous null value length greater than or equal to N1 and less than a threshold N2, moving average, exponential weighted smoothing or weighted regression prediction is used for completion; for a data section with continuous null value length greater than or equal to N2 or adjacent known data points not satisfying the model construction condition, it is directly removed.

[0020] The power load and multi-dimensional meteorological data are aligned with high precision based on interpolation or resampling based on uniform time granularity, and the 3 sigma standard deviation method, the interquartile range method and the logical judgment method are comprehensively used to effectively detect and process abnormal data such as mutation values and continuous constant values; for different lengths of missing data sections, adaptive differential cleaning strategies such as linear interpolation, moving average, exponential smoothing and even rejection are used, which significantly improves the continuity and consistency of the data, and provides a high-quality and reliable data basis for subsequent time series prediction models.

[0021] Preferably, the uniform format comprises the following characteristic fields:

[0022] Mandatory characteristic fields:

[0023] target, used for recording the core time series variable to be predicted, and its value is the cleaned continuous data sequence;

[0024] start, used for representing the starting timestamp of the continuous data sequence, and encoded in a unified time format;

[0025] freq, used for identifying the data sampling frequency, representing the time step;

[0026] item_id, used for uniquely identifying the data source or sample entity;

[0027] Optional feature field, including zero, one or two of the following:

[0028] feat_dynamic_real, used for representing the time-synchronized changing external input variable;

[0029] feat_static_real, used for representing the background features that remain unchanged throughout the time series process.

[0030] By defining the mandatory fields including target variable, starting time, sampling frequency and data number, and introducing dynamic and static optional covariate fields, a highly structured and flexible unified data format is constructed; this format not only ensures the consistency of multi-source heterogeneous power time series data in semantics and dimensions, providing standardized input for subsequent large-scale data processing and model training, but also significantly enhances the information density of the data set and the feature perception ability of the model by integrating external time-varying features (such as weather, holiday factors) and embedding static covariates with invariant background information, laying a solid foundation for improving the accuracy and generalization of time series prediction.

[0031] Preferably, the holiday characteristic factor is constructed based on timestamp information, and is used to reflect the influence of different date types on power load, including independent coding of holidays, identification of offset before and after holidays, periodic coding of holiday days and identification of statutory holidays.

[0032] By constructing a holiday characteristic factor containing multiple dimensions of features such as independent holiday coding, pre and post offset identification, duration period coding and statutory holiday identification, this scheme can capture the differentiated influence of different date types (such as statutory holidays, make-up days) and their transition periods on power load in detail, thereby significantly enhancing the representation ability of periodic human activity patterns in time series data, providing key time semantic information for prediction models, and effectively improving the load prediction accuracy and generalization performance of the model in complex holiday scenarios.

[0033] Preferably, the meteorological characteristic factor is used to depict the influence of climate conditions on load fluctuation, including:

[0034] The temperature variable T is interval divided, and a plurality of temperature thresholds T1, T2,..., T n The temperature variable is discretized into different temperature sections, and a spline interpolation method is used to construct a temperature-load response function f(T) to represent the nonlinear influence relationship of different temperature sections on the load, and the response function is as follows:

[0035]

[0036] Wherein, B i (T) is a spline basis function, and β i is a corresponding coefficient.

[0037] A sensible temperature index based on temperature tmp, relative humidity rh and wind speed ws is constructed :

[0038]

[0039] The principal component analysis PCA method is used to reduce the dimension of the sensible temperature and its related variables, and the most representative meteorological factor combination is extracted;

[0040] A wet enthalpy index h based on relative humidity rh, dry bulb temperature tmp wb , humidity content d, water vapor saturation pressure P sb and atmospheric pressure P is constructed:

[0041] ; ;

[0042] A multi-dimensional meteorological feature matrix containing lag effects is constructed, including short-term temperature change rate, cumulative temperature difference index, sliding window statistical features, lag variable features and combined interaction features.

[0043] By discretizing the temperature and using spline interpolation to construct a nonlinear temperature-load response function, the differential influence of different temperature zones on the power load is accurately depicted; the sensible temperature and wet enthalpy index are constructed by integrating temperature, humidity, wind speed and other multi-dimensional meteorological elements, and the representative meteorological factor combination is extracted by using principal component analysis, which effectively quantifies the comprehensive effect of complex climate conditions on load fluctuation; further, the multi-dimensional meteorological feature matrix containing lag effects, change rate, cumulative statistics and interaction features is introduced, which comprehensively captures the dynamic evolution law and delay effect of meteorological factors, and significantly improves the representation depth of the data set on the meteorological-load coupling relationship and the explanation ability of the prediction model.

[0044] Preferably, the multi-dimensional meteorological feature matrix containing lag effects includes the following features:

[0045] Short-term temperature change rate, used to describe the fluctuation trend of temperature between adjacent time points, the calculation formula is: , wherein T t+1 and T t respectively represent the temperature values at the current time and the last time;

[0046] Cumulative temperature difference index, used to depict the historical deviation degree of the current climate state relative to the base temperature, the calculation formula is: , wherein n represents the step number corresponding to the cumulative length, represents the actual observed temperature at t-i time, is the base temperature;

[0047] Sliding window statistical feature, used to extract moving average temperature, sliding maximum and sliding minimum in a given time window; wherein, the moving average temperature: ; the sliding maximum: ; and the sliding minimum: , k is the length of the sliding window;

[0048] Lag variable feature, used to directly introduce historical meteorological variables as model inputs;

[0049] Combined interaction feature, used to represent the temperature deviation degree by constructing the difference feature between the current value and the historical statistical value.

[0050] By constructing a multi-dimensional meteorological feature matrix containing short-term temperature change rate, cumulative temperature difference index, sliding window statistics, lag variable and combined interaction feature, the scheme can finely capture the instantaneous trend of temperature fluctuation, the historical cumulative deviation effect and the statistical law under different time scales; the lag variable directly introduces the historical meteorological state, and the interaction feature quantifies the deviation degree of the real-time value and the historical background, thereby comprehensively representing the dynamic evolution process of the meteorological conditions and their delayed influence on the power load, significantly enhancing the ability of the data set to depict the complex meteorological-load correlation, providing deeper time-dependent information for the model, and effectively improving the time sequence perception accuracy and robustness of the load prediction.

[0051] Preferably, the load characteristic factor is used to depict the historical behavior mode and statistical characteristics of the power load itself, including:

[0052] Time sequence momentum factor, used to measure the change trend of the load in the past period of time;

[0053] Load fluctuation factor, used to measure the fluctuation degree of the load in the past period of time;

[0054] Holiday effect factor, used to quantify the influence of holidays on the load;

[0055] Load year-on-year factor, used to measure the relative change of current load and historical same period load.

[0056] By constructing the time series momentum factor, load fluctuation factor, holiday effect factor and load year-on-year factor, the scheme can deeply depict the internal behavior pattern of the power load from multiple dimensions: the time series momentum factor effectively captures the short-term change trend of the load, the load fluctuation factor quantifies the historical fluctuation intensity, the holiday effect factor accurately separates the influence of special dates, and the year-on-year factor reveals the long-term periodicity of the load, thereby comprehensively enhancing the time series feature representation ability of the load sequence in the data set, providing rich historical dependence and periodic prior information for the prediction model, and significantly improving the learning ability and prediction accuracy of the model on the dynamic evolution law of the load.

[0057] Preferably, step S5 comprises:

[0058] Selecting N groups of time series data from the power data set as reference sources, and performing standardization processing on the power load time series data and the target time series data in the public data set to obtain normalized target sequences , The calculation formula is as follows:

[0059]

[0060]

[0061] Wherein, represents the normalized value of the jth power load data target sequence t moment, represents the normalized value of the ith public data target sequence t moment, 、 The mean and standard deviation of the jth power load time series data are respectively 、 The mean and standard deviation of the ith target time series data are respectively

[0062] The similarity index between the jth power load time series data and the ith target time series data is calculated respectively, and the similarity index includes dynamic time warping similarity , Pearson correlation coefficient similarity , cosine similarity and Fourier spectrum similarity :

[0063]

[0064] Wherein, denotes a dynamic time warping distance, is a scalable factor;

[0065]

[0066]

[0067] wherein, , respectively correspond to the normalized mean of the jth power load time series data and the ith target time series data; , respectively correspond to the normalized value of the jth power data and the ith public data target sequence at time t;

[0068]

[0069] wherein, and respectively are the target sequence , the spectral value at frequency f after fast Fourier transform, and F is the number of frequency components;

[0070] The calculation results of each similarity index are taken as the median, and a unified similarity index is constructed by using a weighted fusion method :

[0071]

[0072] wherein, a, β, γ, δ are the weights of each similarity index, and a+β+γ+δ=1, and each weight is preset or obtained through training and learning.

[0073] By using standardization processing to eliminate the influence of data dimension, and comprehensively using dynamic time warping, Pearson correlation coefficient, cosine similarity and Fourier spectrum similarity and other multi-dimensional measurement methods, the complex correlation patterns between the power load sequence and the multi-source public time series data in the time domain waveform, linear correlation, vector angle and frequency domain characteristics and other aspects can be comprehensively captured; the unified similarity index constructed by the median statistics and the adaptive weighted fusion strategy effectively enhances the robustness and discrimination ability of the similarity measurement, so as to accurately select the cross-domain data similar to the power load in potential physical mechanism correlation or statistical rule, significantly expands the diversity and representativeness of the training data, and provides a rich and high-quality multi-source heterogeneous pre-training data basis for subsequent construction of high-performance power time series prediction model.

[0074] Preferably, the step S7 of calculating the weight of each time series data in the to-be-processed data set to form a weight mapping set weight_map comprises:

[0075] Calculate the length of each data subset B in the data set to be processed n If the target field is a multi-dimensional array, the length of the first row after flattening is counted as the length of the data subset, and if it is a one-dimensional structure, the length is directly extracted.

[0076] According to the prefix information or source of the data subset name, it is divided into a plurality of preset data source groups, and all target field length vectors belonging to the same data source group are spliced to form the overall length vector of each group D k and normalize each data subset to obtain the sampling weight of each data subset in the group

[0077]

[0078] In the formula, represents the length of the nth data subset in the D k data group, represents the sum of the lengths of all data subsets in the D k data group;

[0079] Calculate the sum of the target field lengths of each data source group and normalize to obtain the group sampling weight

[0080]

[0081] In the formula, represents the total length of the D k data group, represents the total length of the D i data group, and K represents a total of K data groups;

[0082] The group sampling weight is clipped so that its maximum value does not exceed a set threshold ε, and the normalized sampling weight is obtained by normalizing the clipped proportion vector again

[0083]

[0084] In the formula, represents the minimum value of the D k data group sampling weight and the set threshold ε, represents the minimum value of the D i data group sampling weight and the set threshold ε, and K represents a total of K data groups;

[0085] The threshold ε satisfies:

[0086] ​​​

[0087] wherein min(B n ) represents the minimum value of the data subset B n , max(B n ) represents the maximum value of the data subset B n , and median(B n ) represents the median of the data subset B n ;

[0088] According to the number of data subsets contained in each data source group, the standardized sampling weight is inversely proportional sampled to obtain a reweighting factor of each group :

[0089]

[0090] In the formula, represents the number of data subsets in the data group D j , K represents a total of K data groups, represents the number of data subsets in the data group D k , and K represents a total of K data groups. is the standardized sampling weight;

[0091] According to the reweighting factor of the group to which the data subset belongs and the sampling weight of the data subset in the group, a final weighting coefficient of each data subset is distributed to form a weight set weight_map:

[0092]

[0093] In the formula, is the reweighting factor of each group, is the sampling weight of each data subset in the group.

[0094] Through calculating the length of the data subset and according to the source grouping, multi-level fine weight distribution from individual to group is realized; through the double weighting mechanism of length normalization in the group and total length normalization between groups, both the information content of single time series data and the overall contribution of different data source groups are considered; the introduction of threshold clipping and reweighting factor effectively suppresses the deviation caused by extreme length or sample number imbalance, ensuring the fairness and stability of the sampling weight; the finally generated weight mapping set can accurately quantify the relative importance of each time series data in the heterogeneous data set, providing a scientific basis for dynamic sampling, thereby significantly improving the balance and representativeness of the pre-training data set and enhancing the ability of the model to learn general rules from multi-source data.

[0095] In a second aspect, the power time series prediction data set construction system provided by the application comprises:

[0096] a multi-source data collection module, configured to acquire power load data and weather data from power sensors, dispatch centers, user terminals, and weather forecasting systems to form a power dataset, and acquire multi-source time series data covering the fields of energy, meteorology, transportation, and finance from public data sources to form a public dataset;

[0097] a data alignment and cleaning module, configured to align the power load data and the weather data in the time series data in the power dataset according to timestamps, detect abrupt values and continuous constant values, and complete data cleaning through filling or discarding;

[0098] a unified format conversion module, configured to convert the data in the cleaned power dataset into a unified format, wherein the unified format includes feature fields including a target, a start time, a time series frequency, and a data number, and optionally includes one or both of dynamic covariates and static covariates; the dynamic covariates include three types of characteristic factors: holiday characteristic factors, meteorological characteristic factors, and load characteristic factors;

[0099] a feature extraction and fusion module, configured to normalize the target values of the data in the power dataset and the public dataset, extract time-frequency features including mean, variance, and Fourier transform coefficients, perform feature fusion on the multi-source data including holiday characteristic factors, meteorological characteristic factors, and load characteristic factors, and form a multi-dimensional and time series correlation strong feature set.

[0100] a similarity calculation and screening module, configured to calculate similarity indexes between time series data sequences in the power dataset and the public dataset, and screen data having significant correlation with power load from the public dataset based on a preset similarity threshold according to the similarity indexes, to form a to-be-processed dataset together with the power dataset;

[0101] a dynamic sampling weighting module, configured to calculate the weight of each time series data in the to-be-processed dataset using a dynamic sampling weighting method, to form a weight mapping set weight_map;

[0102] a heterogeneous dataset generation module, configured to set a sampling frequency according to the weight mapping set weight_map, and finally build a heterogeneous power time series dataset for power time series large model pre-training and fine-tuning.

[0103] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program capable of being loaded and executed by the processor to perform the power time series prediction dataset construction method.

[0104] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the power time series prediction data set construction method.

[0105] Advantages: Compared with the prior art, the present application has the following remarkable advantages: 1. By integrating multi-source heterogeneous data, constructing a unified standardized data format, and aligning and fusing multi-source data based on timestamps, the consistency and availability of the data are significantly improved, and the data fusion efficiency and model generalization ability are improved; 2. Combined with a variety of statistical methods and logical judgment mechanisms (such as 3σ method, quartile distance method, sliding window detection, etc.) for abnormal value identification and hierarchical cleaning, and through interpolation, smoothing, prediction and other methods for processing missing data, the integrity and accuracy of the data are effectively enhanced; 3. Through multi-index fusion similarity calculation, public data highly related to power load are screened out, and a dynamic sampling weighting strategy is adopted to realize reasonable weighting and balanced sampling of data from different sources, avoid bias in the training process, and improve the generalization ability and prediction stability of the model; 4. By introducing dynamic and static covariate fields, covering meteorological, holiday, load characteristics and other multi-class feature factors, and combining frequency domain and time domain feature extraction, a pre-training and fine-tuning data set with unified structure, rich information and easy extension is formed, supporting high-precision training and application of power time series large models. BRIEF DESCRIPTION OF DRAWINGS

[0106] Figure 1 It is a method flowchart of the present application;

[0107] Figure 2 It is a system structure schematic diagram of the present application;

[0108] Figure 3 It is a similarity index Si calculation result cutout of the present application;

[0109] Figure 4 It is a dynamic weighting weight_map calculation flowchart of the present application;

[0110] Figure 5 It is a weight_map calculation result cutout of the present application;

[0111] Figure 6 It is a comparison table of prediction accuracy of a certain place during May Day holiday after the model is fine-tuned by the data set generated by the present application;

[0112] Figure 7 It is a comparison table of prediction accuracy of a certain place during heavy rainfall weather after the model is fine-tuned by the data set generated by the present application;

[0113] Figure 8 It is a comparison chart of prediction accuracy of a certain place on May 1 after the model is fine-tuned by the data set generated by the present application. Detailed Implementation

[0114] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0115] This invention provides a method for constructing a power time-series prediction dataset, comprising the following steps:

[0116] Step S1: Obtain power load data and weather data from sources such as power sensors, dispatch centers, user terminals, and weather forecasting systems to form a power dataset, and align the load data and weather data according to timestamps. Obtain time-series data from public data sources (such as GluonTS, Monash, Kaggle, etc.), covering fields such as energy, meteorology, transportation, and finance, to form a public dataset.

[0117] In this embodiment, system load data, 7,342 bus load data, and 536,782 distribution network load data from 12 provinces across the country were acquired, spanning from January 1, 2021 to January 1, 2025. Corresponding meteorological data, including temperature, wet-bulb temperature, relative humidity, wind speed, and air pressure, were obtained from open-source meteorological software.

[0118] To ensure the representativeness and stability of the meteorological characteristics corresponding to the statistical load and to avoid the deviation that may be caused by data from a single meteorological observation point, this embodiment selects meteorological data from five typical cities in the province and takes the arithmetic mean of the meteorological indicators of each city at the corresponding time.

[0119] Step S2: Perform abrupt value, continuous constant value, and null value detection on the centralized data of the power data set.

[0120] Specifically, it includes the following steps:

[0121] Step S2.1: Perform limit exceedance detection on weather and load.

[0122] For weather limit violation detection, based on the statistical characteristics of weather data, range restrictions are imposed on numerical weather forecast data such as temperature, wet-bulb temperature, relative humidity, wind speed, and air pressure in the weather data to detect values ​​exceeding the limits. All detected values ​​exceeding the limits are recorded as outliers.

[0123] For load over-limit detection, based on the statistical characteristics of system, bus, and distribution network load data and voltage levels, the corresponding loads are range-limited, and over-limit values ​​in the load data are detected. All detected over-limit values ​​are recorded as anomalies.

[0124] Step S2.2: Use the 3σ detection method and interquartile range method to detect abrupt changes in weather and load data.

[0125] 3σ standard deviation method implementation steps are: calculating the mean μ and standard deviation σ of the time series, judging whether a value at a time meets the formula: |x t -μ|>3σ, if it is satisfied, it is determined to be a mutation value;

[0126] The implementation steps of the interquartile range method are: calculating the first quartile Q1 and the third quartile Q3 of the time series, if a value x t meets: x t <Q1-1.5×IQR or x t >Q3+1.5×IQR, where IQR=Q3-Q1, it is determined to be a mutation value;

[0127] Step S2.3: using the detection method of logical judgment, continuously detecting constant value anomalies of weather and load.

[0128] The load and meteorological time series data {xt} are processed in a sliding window according to time sequence, and the minimum continuous length threshold L0=8 (data frequency is 15 minutes, corresponding to 2 hours) and the change rate threshold α0=0.05% are set. When detecting any continuous length L≥L0 time period, the change rate α of adjacent time interval data points is less than α0, the segment is marked as a constant value segment.

[0129] Step S3: for the data detected in step S2, a filling or discarding strategy is used for cleaning.

[0130] Specifically, the following steps are included:

[0131] Step S3.1: merge all data points marked as abnormal, and set the data of the corresponding points to null.

[0132] Step S3.2: classify all null points, and use spline interpolation algorithm for interpolation for null points with less than 8 consecutive null points.

[0133] Step S3.3: for null points with more than 8 and less than 16 consecutive null points, use a weighted regression prediction method based on adjacent periods to complete the data.

[0134] (a) Expand the buffer zone B=max(6,[L / 2]) on both sides of the missing interval to obtain the window: , where L is the number of missing points, t s is the left boundary, t e is the right boundary; then select a set of adjacent dates from the target date within 7 days before and after the target date , extract the corresponding intra-day time and adjacent time of the missing interval, and construct a candidate sample set .

[0135] (b) For each candidate sample , construct feature vector:

[0136]

[0137] where: ; is the sine-cosine encoding of time; daytype represents weekday / weekend / holiday; Temp is the temperature feature.

[0138] (c) assign weight w i to each sample i, and normalize to get :

[0139]

[0140] where: is the difference between sample date and target date; is the difference between sample temperature and average temperature of missing interval; is the day type weight, 0.3 if different, 1 if same; is the time difference weight.

[0141] (d) construct weighted ridge regression objective function, solve to get regression coefficient , where is the regularization coefficient.

[0142] )

[0143] (e) for each time t in the missing interval, construct feature vector , get predicted value .

[0144]

[0145] (f) to avoid discontinuity in the completed segment, introduce boundary consistency constraint and first-order smoothing constraint, process predicted value .

[0146] (g) boundary correction is made to the predicted result to get the completed value of the missing interval.x p90 is the 90th percentile value of historical load.

[0147]

[0148] Step S3.4: discard the missing value points with more than 16 consecutive missing value points or the missing value points whose adjacent data points do not satisfy the linear regression condition.

[0149] Step S4: convert the public data set and the cleaned power data set into a unified format for standardized modeling input, including mandatory feature fields and optional feature fields.

[0150] Among them, the mandatory feature field includes: target field (target) for recording the core timing variable to be predicted, the value is the continuous data sequence after cleaning; start time field (start) for indicating the starting timestamp of the data sequence, encoded in a unified time format; timing data frequency field (freq) for identifying the data sampling frequency, indicating the time step (such as minute, hour, day, etc.); Data number field (item_id) for uniquely identifying the data source or sample entity, such as device number, region number or user ID, etc. Optional feature fields include: dynamic covariate field (feat_dynamic_real) for indicating time-synchronized external input variables, such as weather, electricity price, workday identifier, etc.; Static covariate field (feat_static_real) for indicating background features that remain unchanged throughout the time series process, including but not limited to capacity, geographic location, device type, etc.

[0151] Taking distribution network load data as an example, after being converted into a unified format, the target field is load, the start time field is 2021-01-01 00:00:00, the frequency is 15min, the dynamic covariate field is weather and the factor constructed in step S5, and the static covariate is capacity and geographic location.

[0152] Some data in the public data set only exist target variables, which are converted into a unified format according to the mandatory feature field.

[0153] Step S5: To improve the perception and generalization ability of the prediction model to the change of timing characteristics, the embodiment proposes a method for generating dynamic covariate features.

[0154] This method can generate a feature sequence that can be directly input into the load prediction model. The dynamic covariate is constructed according to the attribute information at different time points in the time series, covering multiple factors affecting power load fluctuations, including holiday characteristic factors, meteorological characteristic factors and load characteristic factors.

[0155] Step S5.1: Holiday characteristic factor construction. The holiday characteristic factor is constructed based on timestamp information, which is used to explicitly introduce the influence signal of different date types, thereby improving the modeling accuracy of the model to the holiday effect. Its construction method includes:

[0156] Discretize each type of holiday using One-Hot encoding to enable the model to distinguish the independent influence of different holidays;

[0157] Generate holiday offset identifiers before and after the time series position to describe the relative number of days from the holiday at a certain time, in order to capture the gradual change rule before and after the holiday effect;

[0158] The sine-cosine periodic encoding is used to periodically map the holiday duration, reflecting the periodic pattern of holidays on the load;

[0159] The national statutory holiday identifier variable is introduced to distinguish the different influences of statutory holidays and ordinary holidays.

[0160] Step S5.2: Meteorological characteristic factor construction. Meteorological characteristic factors are used to characterize the influence of climate conditions on power load fluctuations, and their construction methods include:

[0161] Temperature segmentation and nonlinear response modeling: The original temperature variable T is divided into intervals, and several temperature thresholds T1, T2, …, T n , and the cubic spline interpolation method is used to construct the temperature-load response function f(T) to characterize the nonlinear influence of different temperature zones on the load. The response function is as follows:

[0162]

[0163] Where B i (T) is the spline basis function, and β i is the corresponding coefficient.

[0164] Construction of the apparent temperature index: The apparent temperature index Tapp based on temperature tmp, relative humidity rh and wind speed ws is introduced to represent the actual thermal environment intensity perceived by the human body, and the formula is as follows:

[0165]

[0166] And the principal component analysis (PCA) method is used to reduce the dimensionality of the apparent temperature and its related variables, extract the most representative meteorological factor combination, reduce feature redundancy and improve modeling efficiency.

[0167] Construction of the wet enthalpy index: The wet enthalpy index h based on relative humidity rh, dry bulb temperature tmp wb , humidity content d, water vapor saturation pressure P sb , and atmospheric pressure P is introduced to represent the comprehensive influence of the moisture content in the air on the power load, which can be calculated by the following formula:

[0168]

[0169] Meteorological lag feature matrix design: A multi-dimensional meteorological feature matrix containing lag effects is constructed to capture the delayed and cumulative effects of weather variables on the load, which includes but is not limited to the following features:

[0170] Short-term temperature change rate (gradient): used to describe the fluctuation trend of temperature between adjacent time points, the calculation formula is: Where T t+1 and T t represent the temperature values at the current time and the last time (15 minutes ago), respectively;

[0171] Cumulative temperature difference index: used to depict the historical deviation degree of the current climate state relative to the base temperature (T base ), the calculation formula is: Where n represents the step number corresponding to the cumulative length, represents the actual observed temperature at t - i time;

[0172] Sliding window statistical features: within a given time window (1 hour, 6 hours and 24 hours in this embodiment), the following statistical indicators are extracted, and k is the length of the sliding window:

[0173] Moving average temperature: ,

[0174] Sliding maximum value: ,

[0175] Sliding minimum value: ,

[0176] Lag variable features: directly introduce historical time meteorological variables as model input, this embodiment takes the temperature values of the past 15 minutes, 1 hour, 6 hours and 24 hours.

[0177] Combined interaction features: by constructing the difference features between the current value and the historical statistical value, such as: represents the deviation degree between the current temperature and the average temperature of the past 24 hours.

[0178] Step S5.3: Load characteristic factor construction. The load characteristic factor is used to extract the dynamic properties reflecting the internal time sequence rules of the load from the historical load data, which specifically includes:

[0179] Time sequence momentum factor: the change degree of short-term load mean (near 7 days) relative to long-term load mean (near 30 days), the formula is:

[0180]

[0181] In the formula, represents the arithmetic mean value of the t period in the past 7 days, represents the arithmetic mean value of the t period in the past 30 days;

[0182] Load fluctuation factor: the mean square error between each load point and the mean value of the sliding window (96 points), the formula is:

[0183]

[0184] where n is the size of the sliding window, is the actual load value at time t−i, is the average load value of the window interval;

[0185] Holiday effect factor: here k takes 7, the change of the average load of each hour of the holiday relative to the average load of the same time of the benchmark day (the average of the 7 days before the holiday) is calculated, the formula is:

[0186]

[0187] where is the load value of each time of the holiday (1 hour has 4 times), is the load value of the corresponding time of the dth benchmark day, k is the number of selected benchmark days;

[0188] Load year-on-year factor: the growth rate of the current load and the load of the same time of the previous year, the formula is:

[0189]

[0190] where is the load value at time t, is the load value of the corresponding time 365 days ago;

[0191] Step S6: On the basis of the public data set which has completed the unified format conversion in step S5 and the cleaned power data set, the public data source is screened according to the similarity index, and the specific method is as follows:

[0192] Step S6.1: 100 groups of time series data are selected from the power load data set as reference sources, and the power load time series data and the target time series data in the public data source are standardized to obtain normalized sequences , , and the calculation formula is as follows:

[0193]

[0194] wherein, denotes the normalized value of the jth power load data target sequence at time t, denotes the normalized value of the ith public data target sequence at time t, 、 and are the mean and standard deviation of the jth power data target sequence, respectively, 、 respectively the mean and standard deviation of the i-th public data target sequence;

[0195] Step S6.2: Calculate the similarity indicators between the j-th power data and the i-th public data target sequence respectively, as shown in the following formula: Figure 3 including dynamic time warping similarity Si DTW , Pearson correlation coefficient similarity Si PCC , cosine similarity Si cos , and Fourier spectrum similarity Si FFT .

[0196]

[0197] wherein, denotes the dynamic time warping distance, is a scalable factor.

[0198]

[0199] wherein, , respectively the normalized mean of the j-th power data and the i-th public data target sequence, , respectively the normalized value of the j-th power data and the i-th public data target sequence at time t.

[0200]

[0201] and respectively the frequency spectrum values after fast Fourier transform of the target sequence , , and F is the number of frequency components.

[0202] Step S6.3: For the calculation results of each indicator in step S6.2, take the median value to represent the value of the indicator, and then use the weighted fusion method to construct a unified similarity indicator Si, which is used to evaluate the overall similarity between the i-th public data source and the power load data, and the calculation formula is as follows:

[0203]

[0204] Step S6.4: Sort the public data sources according to the fused similarity indicators Si, select the data sources that meet the threshold Si greater than 0.60, and construct a to-be-processed data set with the target load data.

[0205] Step S7: Calculate the weight of each time series data in the data set to be processed using the dynamic sampling weighting method, and form a weight set (weight_map), as shown in Figures 4-5 The specific method is as follows:

[0206] Step S7.1: Calculate the target field length of each data subset B n in the data set to be processed. If the target field is a multi-dimensional array, the length of the first row after flattening is taken as the length of the data subset. If it is a one-dimensional structure, the length is directly extracted;

[0207] Step S7.2: According to the prefix information or source of the data subset name, divide it into a plurality of preset data source groups. Concatenate all target field length vectors belonging to a data source group to form a total length vector of each group D k . Then normalize each data subset to obtain the sampling weight of each data subset in the group ;

[0208]

[0209] In the formula, represents the length of the nth data subset in the D k data group, represents the sum of the lengths of all data subsets in the D k data group.

[0210] Step S7.3: Calculate the sum of the target field lengths of each data source group, and then normalize the length sum of each group to obtain the group sampling weight ;

[0211]

[0212] In the formula, represents the total length of the D k data group, represents the total length of the D i data group, and K represents the total number of data groups.

[0213] Step S7.4: Calculate the clipping threshold ε of the group sampling weight , and in this embodiment, ε = 0.005.

[0214]

[0215] Wherein, min(B n ) represents the minimum value of the data subset B n , max(B n ) represents the maximum value of the data subset B n , and median(Bn ) represents a data subset the median of the data subsets.

[0216] Step S7.5: clipping the sampling weight of each data group to make its maximum value not exceed a set threshold value ε; and normalizing the clipped proportion vector again to obtain the normalized sampling weight ;

[0217]

[0218] wherein, represents the D k sampling weight of the data group, the minimum value of the sampling weight of the data group and the set threshold value ε, represents the D i sampling weight of the data group, the minimum value of the sampling weight of the data group and the set threshold value ε, and K represents the total number of the K data groups.

[0219] Step S7.6: inversely proportionally sampling the sampling weight based on the number of the data subsets contained in each data source group to obtain a reweighting factor of each group ;

[0220]

[0221] wherein, represents the number of the data subsets in the D j data group, and K represents the total number of the K data groups, represents the number of the data subsets in the D k data group, is the normalized sampling weight obtained in equation (20).

[0222] Step S7.7: distributing the final weighting coefficient of each data subset according to the reweighting factor of the group to which the data subset belongs and the sampling weight of the data subset in the group to form a weight set (weight_map):

[0223]

[0224] wherein, is the reweighting factor of each group obtained in equation (21), is the sampling weight of each data subset in the group obtained in equation (17).

[0225] As Figures 6-8 ​As shown, the present application effectively improves the integrity and reliability of data through unified alignment, fusion and standardization processing of multi-source heterogeneous time series data, combined with abnormality detection and hierarchical cleaning of various statistical and logical methods; through multi-index fusion similarity calculation method, the public data source highly related to the load is screened, and the dynamic sampling weighting strategy is adopted to realize the balanced utilization of different data sources, avoiding training bias; finally, the high-quality heterogeneous time series dataset with unified structure and scalability is output, which not only can fully depict the key influencing factors of power load, but also can effectively improve the prediction accuracy and robustness of the prediction model.

[0226] Based on the same inventive concept, the embodiment provides a power time series prediction dataset construction system, which refers to Figure 2 The system comprises:

[0227] A multi-source data acquisition module is configured to acquire power load data and weather data from various sources such as power sensors, dispatch centers, user terminals, and weather forecasting systems, to form an original power dataset; and to acquire time series data covering energy, meteorology, transportation, finance, etc. from public data sources (such as GluonTS, Monash, Kaggle, etc.) to form a public dataset.

[0228] A data alignment and cleaning module is configured to align the time series data in the power dataset with the load data and weather data according to the timestamp, and to detect sudden value, over-the-line value, continuous constant value, and null value; according to the detection result, the abnormal value is cleaned by interpolation, filling or discarding, etc. to ensure the effectiveness and continuity of the data in time dimension and value dimension.

[0229] A unified format conversion module is configured to convert the cleaned time series data into a unified format, which includes target field, start time field, time series data frequency field and data number field, and can include dynamic covariate field and static covariate field, so as to standardize the input to the modeling process.

[0230] A feature extraction and fusion module is configured to normalize the target value and extract time-frequency features (including mean, variance, Fourier change coefficient, etc.); to perform feature fusion on multi-source data, including holiday characteristic factor, meteorological characteristic factor and load characteristic factor, to form a multi-dimensional and time series correlation strong feature set.

[0231] A similarity calculation and screening module is configured to calculate a plurality of similarity indexes between the power load data and each target time series in the public dataset, including dynamic time warping similarity, Pearson correlation coefficient similarity, cosine similarity and Fourier spectrum similarity, and to obtain a comprehensive similarity index by weighted fusion; according to the similarity threshold, the public data source highly related to the power load is screened out to construct a to-be-processed dataset.

[0232] A dynamic sampling weighting module is configured to calculate sampling weights based on the length and source of each time series data in the data set to be processed, and normalize and threshold cut the sampling weights; and combine a reweighting factor distribution to generate a final weight set (weight_map) for subsequent construction of a heterogeneous data set.

[0233] A heterogeneous data set generation module is configured to dynamically weight sample data according to the weight set to generate a heterogeneous power time series data set covering multiple sources, multiple features and multiple time scales for use in pre-training and fine-tuning of a power time series large model.

[0234] The application further discloses an electronic device.

[0235] Specifically, the electronic device can be a computer device such as a desktop computer, a notebook computer, a palm computer and a cloud server. The computer device can include but is not limited to a processor and a memory. The processor and the memory can be connected through a bus or other means. The processor can be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, graphics processing units (GPU), embedded neural network processing units (NPU) or other dedicated deep learning coprocessors, discrete gates or transistor logic devices, discrete hardware components, etc. chips, or combinations of the above chips.

[0236] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules. The processor performs various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory. The memory can include a program storage area and a data storage area, wherein the program storage area can store application programs required by the control unit and at least one function; and the data storage area can store data created by the processor and the like. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0237] The application further discloses a computer readable storage medium.

[0238] Specifically, the computer readable storage medium is used to store a computer program, and the computer program is executed by the processor to realize the method in the above method embodiments.

[0239] Those skilled in the art can understand that all or part of the processes in the above method embodiments of the application can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc. The storage medium can also include a combination of the above types of memories.

Claims

1. A method for constructing a power time series prediction dataset, the method comprising: receiving a plurality of power time series data; and generating a power time series prediction dataset based on the plurality of power time series data. The method comprises the following steps: Step S1, obtaining power load data and weather data from power sensors, dispatch centers, user terminals and weather forecasting systems to form a power dataset; Step S2, aligning the power load data and the weather data in the time series data in the power dataset according to timestamps, detecting mutation values and continuous constant values, and completing data cleaning by filling or discarding; Step S3, obtaining multi-source time series data covering energy, meteorology, transportation and finance from public data sources to form a public dataset; Step S4, converting the data in the cleaned power dataset into a unified format, wherein the feature fields included in the unified format comprise target, start time, time series frequency and data number item_id; and the optional feature fields comprise zero, one or both of dynamic covariates feat_dynamic_real and static covariates feat_static_real; the dynamic covariates include the following three types of characteristic factors: holiday characteristic factors, meteorological characteristic factors and load characteristic factors; Step S5, normalizing the target values of the data in the power dataset and the public dataset, extracting time-frequency features including mean, variance and Fourier transform coefficients, and calculating the similarity index between each time series data sequence in the power dataset and the public dataset; Step S6, filtering out data with significant correlation with power load from the public dataset according to the similarity index to form a to-be-processed dataset together with the power dataset; Step S7, calculating the weight of each time series data in the to-be-processed dataset using a dynamic sampling weighting method to form a weight mapping set weight_map, setting a sampling frequency according to the weight mapping set, and finally constructing a heterogeneous power time series dataset for power time series large model pre-training and fine-tuning; The step S5 comprises: Select N groups of time series data from the power dataset as reference sources, and target time series data in the public dataset and the public dataset Standardization processing is performed to obtain normalized target sequences , The calculation formula is as follows: ; ; wherein, denotes the normalized value of the jth power load data target sequence at time t, denotes the normalized value of the ith public data target sequence at time t, , are the mean and standard deviation of the jth power load time series data, respectively, , are the mean and standard deviation of the ith target time series data, respectively; calculating a similarity measure between the jth electric power load time series data and the ith target time series data, the similarity measure comprising a dynamic time warping similarity , a Pearson correlation coefficient similarity , a cosine similarity , and a Fourier spectrum similarity : ; wherein, denotes a dynamic time warping distance, is a scalable scaling factor; ; ; wherein, , correspond to the normalized mean of the jth power load time series data and the ith target time series data, respectively; , correspond to the normalized value of the jth power data and the ith public data target sequence at time t, respectively; ; wherein, and are target sequences , spectral values after fast Fourier transform at frequency f, F is the number of frequency components; The median of the calculation results of each similarity index is taken, and a unified similarity index is constructed by using a weighted fusion method : ; wherein a, β, γ, δ are weights of each similarity index, and a + β + γ + δ = 1, each weight being preset or obtained through training learning. 2.The method of claim 1, wherein, Step S2 comprises: Aligning the power load data and the weather data based on timestamps, wherein the weather data includes temperature, wet-bulb temperature, relative humidity, wind speed and air pressure; the alignment process is based on uniform time granularity for interpolation or resampling processing to align the load sequence and the meteorological characteristics in the time dimension; Local outliers are detected by 3σ standard deviation method or quartile range method, wherein: when 3σ standard deviation method is used, mean μ and standard deviation σ of time series are calculated, if a value x t at a time satisfies |x t -μ|>3σ, it is determined as a mutation value; when quartile range method is used, first quartile Q1 and third quartile Q3 are calculated, if a value x t satisfies x t <Q1-1.5×IQR or x t >Q3+1.5×IQR, wherein IQR=Q3-Q1, it is determined as a mutation value; Detecting continuous constant values using logical judgment method, and performing sliding window processing on the time series in chronological order; if there is a section with continuous length L≥ preset threshold L0 and adjacent data point change rate a< preset threshold a0, the section is marked as a constant value section; Cleaning the detected mutation values and constant value sections, including: assigning the data points corresponding to the mutation values and constant value sections to null values; for data segments with continuous null value length less than threshold N1, linear interpolation, forward filling, backward filling or spline interpolation is used for completion; for data segments with continuous null value length greater than or equal to N1 and less than threshold N2, sliding average, exponential weighted smoothing or weighted regression prediction is used for completion; for data segments with continuous null value length greater than or equal to N2 or adjacent known data points not meeting the model construction conditions, they are directly removed. 3.The method of claim 1, wherein, The unified format in step S4 includes the following characteristic fields: Mandatory characteristic fields: A target field target for recording the core time series variable to be predicted, with a value of a cleaned continuous data sequence; A start time field start for indicating the starting timestamp of the continuous data sequence, encoded in a unified time format; A time series data frequency field freq for identifying the data sampling frequency, indicating the time step; A data number field item_id for uniquely identifying the data source or sample entity; Optional characteristic fields, including one or both of the following: A dynamic covariate field feat_dynamic_real for indicating time-synchronized changing external input variables; A static covariate field feat_static_real for indicating background features that remain unchanged throughout the time series. 4.The method of claim 1, wherein, The holiday characteristic factor is constructed based on timestamp information, and is used to reflect the influence of different date types on power load, including independent coding of holidays, identification of offset before and after holidays, periodic coding of holiday days, and identification of statutory holidays.

5. The method of claim 1, wherein, The weather characteristic factor is used to characterize the influence of climate conditions on load fluctuations, including: The temperature variable T is divided into intervals, and several temperature thresholds T1, T2, …, T n The temperature variable is discretized into different temperature sections, and a spline interpolation method is used to construct a temperature-load response function f(T) to represent the nonlinear influence relationship of different temperature sections on the load, and the response function is as follows: ; wherein B i (T) is a spline basis function, β i is a corresponding coefficient; Constructing a sensible temperature index based on temperature tmp, relative humidity rh and wind speed ws : ; Principal component analysis (PCA) was used to reduce the dimensionality of the body temperature and its related variables, and extract the most representative combination of meteorological factors; A humidity enthalpy index h is constructed based on the relative humidity rh, the dry-bulb temperature tmp wb , the moisture content d, the water vapor saturation pressure P sb and the atmospheric pressure P. ; ; ; Construct a multi-dimensional weather feature matrix containing lag effects, including short-term temperature change rate, cumulative temperature difference index, sliding window statistical features, lag variable features, and combined interaction features.

6. The power time series prediction dataset construction method of claim 5, wherein, The construction of the multi-dimensional weather feature matrix with lag effects includes the following features: Short-term temperature change rate, used to describe the fluctuation trend of temperature between adjacent time points, is calculated by the formula: where T t+1 and T t represent the temperature values at the current time and the previous time, respectively. Cumulative temperature difference index, used to depict the degree of deviation of the current climate state from the historical deviation of the base temperature, the calculation formula is: Wherein n represents the step number corresponding to the cumulative time length, represents the actual observation temperature at t-i moment, is the base temperature; Sliding window statistical features for extracting moving average temperature, sliding maximum and sliding minimum within a given time window; wherein the moving average temperature: ; the sliding maximum: ; and the sliding minimum: , k is the length of the sliding window. Lag variable features for directly introducing historical time weather variables as model inputs; Combined interaction features for representing the temperature deviation degree by constructing the difference features between the current value and the historical statistical value. 7.The method of claim 1, wherein, The load characteristic factor is used to characterize the historical behavior patterns and statistical characteristics of the power load itself, including: Time series momentum factors for measuring the change trend of the load in the past period of time; Load fluctuation factors for measuring the fluctuation degree of the load in the past period of time; Holiday effect factors for quantifying the influence of holidays on the load; Load year-on-year factors for measuring the relative change of the current load and the historical load at the same period. 8.The method of claim 1, wherein, The calculation of the weight of each time series data in the to-be-processed data set in step S7 forms a weight mapping set weight_map, including: calculating the length of the target field of each data subset B in the data set to be processed n , if the target field is a multi-dimensional array, the length of the first row after flattening is counted as the length of the data subset, and if it is a one-dimensional structure, the length is directly extracted; According to prefix information of data subset name or source, the data subsets are divided into preset multiple data source groups, all target field length vectors belonging to one data source group are spliced to form a total length vector of each group D k , and each data subset is normalized to obtain sampling weights of each data subset in the group : wherein represents D k the length of the nth data subset in the data group, represents D k the sum of the lengths of all data subsets in the data group; The target field length sum of each data source group is calculated and normalized to obtain a group sampling weight : ; wherein, D k total length of data groups, D i total length of data groups, K represents a total of K data groups; sampling weights of the group clipping processing is performed so that the maximum value does not exceed a set threshold ε, and the clipped proportion vector is normalized again to obtain normalized sampling weights : wherein D represents D k data set sampling weight the minimum value of the set threshold value ε, K represents a total of K data sets D represents D i data set sampling weight the minimum value of the set threshold value ε, K represents a total of K data sets The threshold ε satisfies: ; where min(B n ) denotes the minimum value of the data subset B n , max(B n ) denotes the maximum value of the data subset B n , and median(B n ) denotes the median of the data subset B n . Based on the number of data subsets contained in each data source group, inverse proportional sampling is performed on the standardized sampling weight to obtain a reweighting factor for each group : wherein denotes the statistical D j the number of data subsets in the data group, K denotes that there are K data groups in total, denotes the statistical D k the number of data subsets in the data group, is the normalized sampling weight; a reweighting factor according to the group to which the data subset belongs and the sampling weight of the data subset within the group assigning a final weighting coefficient to each data subset, forming a weight set weight_map: ; where, is a reweighting factor for each group, is the sampling weight of each data subset within a group.

9. An electric power timing prediction dataset construction system, characterized by, Including: A multi-source data acquisition module for acquiring power load data and weather data from power sensors, dispatch centers, user terminals, and weather forecasting systems to form a power data set; Obtaining multi-source time series data covering energy, weather, transportation, and finance fields from public data sources to form a public data set; A data alignment and cleaning module for aligning the time series data in the power data set according to the timestamps, detecting sudden changes and continuous constant values in the power load data and weather data, and completing data cleaning through filling or discarding; The unified format conversion module is configured to convert the data in the cleaned power dataset into a unified format, and the unified format includes the following characteristic fields: target, start time, time sequence frequency, and data number; and the optional characteristic fields include zero, one, or both of a dynamic covariant and a static covariant; the dynamic covariant includes the following three types of characteristic factors: holiday characteristic factor, weather characteristic factor, and load characteristic factor; The feature extraction and fusion module is configured to normalize the target values of the data in the power dataset and the public dataset, extract time-frequency characteristics of the data, including mean, variance, and Fourier transform coefficients, and perform feature fusion on the multi-source data, including holiday characteristic factors, weather characteristic factors, and load characteristic factors, to form a multi-dimensional and time sequence correlation strong feature set; The similarity calculation and screening module is configured to calculate a similarity index between each time sequence data sequence in the power dataset and the public dataset, and screen out data with significant correlation with the power load from the public dataset based on a preset similarity threshold, to form a to-be-processed dataset together with the power dataset; The dynamic sampling weighting module is configured to calculate the weight of each time sequence data in the to-be-processed dataset by using a dynamic sampling weighting method, to form a weight mapping set weight_map; The heterogeneous dataset generation module is configured to set a sampling frequency according to the weight mapping set weight_map, and finally construct a heterogeneous power time sequence dataset for power time sequence large model pre-training and fine-tuning.

Citation Information

Patent Citations

  • Short-term load prediction method and device based on deep neural network

    CN110222727A

  • Power load prediction method and system

    CN119476556A

Cited By

  • Semi-supervised training method and device for energy heterogeneous data credible compensation AI model

    CN121835801A