Training method and system for electricity selling data prediction model and medium
By performing volatile analysis and feature extraction of timing data of electricity sales, combined with long -term memory networks and integrated learning, a model that can effectively predict electricity sales data is constructed, solving the deficiencies of traditional models when processing non -linearity and multi -dimensional data, realizing the realization, realization Higher prediction accuracy and real -time update capabilities.
Patent Information
- Application Number
- CN202411579767.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional power prediction model methods mostly rely on classic statistical models such as linear regression, and it is difficult to effectively process nonlinear relationships and multidimensional data, resulting in low accuracy of prediction results and lack of real-time update capabilities.
By obtaining the original electricity sales time series data, analyze the time series changes of electricity sales fluctuations, divide the long-term and short-term time series data, use the long short-term memory network to capture the dependent contribution characteristic values of each time series data, and construct the electricity sales through integrated learning fusion modeling. Data integration prediction model, adaptively adjust the learning rate for model update.
The accuracy and real-time update capabilities of the electricity sales data forecast model have been improved, and it can more effectively capture long-term trends and short-term fluctuations, providing a more comprehensive analysis perspective and stronger forecasting capabilities.
Smart Images

Figure CN119359354A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of model training technology, and in particular to a training method, system and medium for a power sales data prediction model. Background Art
[0002] In recent years, the rapid development of artificial intelligence and machine learning technologies has provided new solutions for electricity sales data forecasting. At the same time, deep learning algorithms can handle a large amount of complex nonlinear data and improve forecasting accuracy through self-learning. By integrating multiple data sources, including historical electricity sales data, meteorological data, etc., a comprehensive data set is constructed, and data cleaning and preprocessing techniques are used to ensure data accuracy and consistency. In addition, in terms of feature selection, advanced feature engineering techniques are applied to extract key features related to electricity sales data, and algorithms are used to optimize the feature selection process to improve the model's predictive ability. By using deep learning algorithms such as long short-term memory networks (LSTM) and convolutional neural networks (CNN), complex patterns of time series data can be captured and the accuracy of forecasts can be improved. However, traditional electricity forecasting model methods mostly rely on classical statistical models such as linear regression. These models often have insufficient performance when dealing with nonlinear relationships and multidimensional data, which leads to low accuracy of model prediction results and lacks the ability to update electricity data forecasting models in real time. Summary of the invention
[0003] Based on this, it is necessary for the present invention to provide a training method, system and medium for a power sales data prediction model to solve at least one of the above technical problems.
[0004] To achieve the above purpose, a training method for a power sales data prediction model includes the following steps:
[0005] Step S1: obtaining original power sales time series data, and performing power sales fluctuation time series change analysis on the original power sales time series data to obtain first time series data of power sales fluctuation amplitude; performing time series fluctuation division on the first time series data of power sales fluctuation amplitude to obtain long-term time series data of power sales fluctuation change and short-term time series data of power sales fluctuation change;
[0006] Step S2: using a long short-term memory network to capture the power sales fluctuation dependency contribution eigenvalues corresponding to the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes, respectively, to obtain the long-term dependency contribution eigenvalues corresponding to the long-term time series data of power sales and the short-term dependency contribution eigenvalues corresponding to the short-term time series data of power sales; adding the long-term dependency contribution eigenvalues corresponding to the long-term time series data of power sales and the short-term dependency contribution eigenvalues corresponding to the short-term time series data of power sales to the corresponding time series positions in each time series data, to obtain the second time series data of power sales fluctuation amplitude and the third time series data of power sales fluctuation amplitude;
[0007] Step S3: Perform integrated learning fusion modeling processing on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to construct an integrated prediction model for power sales data; perform quantitative calculation of the training error of the integrated learning training process corresponding to the integrated prediction model for power sales data to obtain the training error of the power sales data prediction model; adaptively adjust and update the learning rate corresponding to the integrated prediction model for power sales data based on the training error of the power sales data prediction model to obtain the adaptive update learning rate of the prediction model;
[0008] Step S4: Based on the prediction model adaptively updating the learning rate, the integrated prediction model for power sales data is subjected to model incremental learning and updating processing to obtain an updated optimized prediction model for power sales data.
[0009] Further, step S1 includes the following steps:
[0010] Step S11: obtaining original electricity sales time series data;
[0011] Step S12: preprocessing the original electricity sales time series data to obtain electricity sales preprocessed time series data;
[0012] Step S13: Performing statistical analysis on the mean and standard deviation of the electricity sales preprocessing time series data to obtain the mean and standard deviation of the electricity sales data;
[0013] Step S14: performing power sales fluctuation amplitude analysis on the power sales preprocessing time series data based on the power sales data mean and the power sales data standard deviation to obtain the power sales data fluctuation amplitude corresponding to different time points; performing fluctuation time series change integration processing on the power sales data fluctuation amplitude corresponding to different time points to obtain the power sales fluctuation amplitude first time series data;
[0014] Step S15: dividing the first time series data of the power sales fluctuation amplitude into time series fluctuations to obtain the long-term time series data of the power sales fluctuation change and the short-term time series data of the power sales fluctuation change.
[0015] Further, step S15 includes the following steps:
[0016] Step S151: Drawing a time series change curve of power sales fluctuation amplitude for the first time series data of power sales fluctuation amplitude to generate a time series change curve of power sales fluctuation amplitude;
[0017] Step S152: Slidingly dividing the time-series change curve of the power sales fluctuation amplitude by time window to obtain corresponding power sales fluctuation amplitude curve segments under different time windows;
[0018] Step S153: performing statistical analysis on the fluctuation frequency and intensity of the power sales fluctuation amplitude curve segments corresponding to different time windows, and obtaining the fluctuation frequency and fluctuation intensity of the power sales segment curves corresponding to different time windows;
[0019] Step S154: Based on the fluctuation frequency and fluctuation intensity of the power selling segmented curves corresponding to different time windows, the power selling fluctuation change score calculation formula is used to calculate the fluctuation score of the corresponding power selling fluctuation amplitude curve segments, so as to obtain the corresponding power selling fluctuation change score values under different time windows;
[0020] Step S155: Compare and judge the corresponding power sales fluctuation change score values according to the preset power sales fluctuation classification standard value. When the power sales fluctuation change score value is less than the preset power sales fluctuation classification standard value, the first time series data of the corresponding power sales fluctuation amplitude in its time window is determined as a long-term stable fluctuation change type, and the first time series data of the power sales fluctuation amplitude in the corresponding time window determined as the long-term stable fluctuation change type is integrated with the long-term fluctuation data to obtain the long-term time series data of power sales fluctuation change; when the power sales fluctuation change score value is greater than or equal to the preset power sales fluctuation classification standard value, the first time series data of the corresponding power sales fluctuation amplitude in its time window is determined as a short-term drastic fluctuation change type, and the first time series data of the power sales fluctuation amplitude in the corresponding time window determined as the short-term drastic fluctuation change type is integrated with the short-term fluctuation data to obtain the short-term time series data of power sales fluctuation change.
[0021] Furthermore, the formula for calculating the electricity sales fluctuation score in step S154 is specifically:
[0022]
[0023] In the formula, S i is the corresponding power sales fluctuation change score value in the i-th time window, n is the total number of time windows, i is the item measurement parameter of the time window, is the starting time point corresponding to the i-th time window, is the termination time point corresponding to the i-th time window, t is the time variable parameter, A i(t) is the fluctuation amplitude of electricity sales corresponding to the electricity sales fluctuation amplitude curve segment at time t in the i-th time window, F i (t) is the fluctuation frequency of the power sales segment curve at time t in the i-th time window, I i (t) is the fluctuation intensity of the electricity sales segment curve at time t in the i-th time window, η i is the correction coefficient of the corresponding electricity sales fluctuation score value in the i-th time window.
[0024] Further, step S2 includes the following steps:
[0025] Step S21: Decomposing the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes into long-term and short-term time series components respectively through a long-term and short-term memory network to obtain the long-term time series channel component of power sales fluctuation and the short-term time series channel component of power sales fluctuation;
[0026] Step S22: designing corresponding long-term time steps and long-term memory units according to the long-term time series channel components of power sales fluctuations, and designing a long-term dependency model for the long-term time series channel components of power sales fluctuations based on the long-term time steps and long-term memory units to generate a long-term dependency model for power sales fluctuations;
[0027] Step S23: Based on the long-term dependence model of electricity sales fluctuation, the long-term dependence contribution value of the long-term time series channel component of electricity sales fluctuation in each long-term time step is calculated to obtain the long-term dependence contribution characteristic value corresponding to the long-term time series data of electricity sales;
[0028] Step S24: designing the corresponding short-term time step and short-term memory unit according to the short-term time series channel component of the power sales fluctuation, and designing the short-term dependence model for the short-term time series channel component of the power sales fluctuation based on the short-term time step and the short-term memory unit to generate the short-term dependence model of the power sales fluctuation; calculating the short-term dependence contribution value of the short-term time series channel component of the power sales fluctuation within each short-term time step based on the short-term dependence model of the power sales fluctuation, to obtain the short-term dependence contribution characteristic value corresponding to the short-term time series data of the power sales;
[0029] Step S25: Add the long-term dependence contribution characteristic value corresponding to the long-term time series data of electricity sales and the short-term dependence contribution characteristic value corresponding to the short-term time series data of electricity sales to the corresponding time series position in each time series data to obtain the second time series data of electricity sales fluctuation amplitude and the third time series data of electricity sales fluctuation amplitude.
[0030] Further, step S23 includes the following steps:
[0031] Step S231: Based on the long-term dependency model of power sales fluctuation, long-term dependency mining analysis is performed on the long-term time series channel components of power sales fluctuation within each long-term time step to obtain the long-term dependency relationship between the long-term time series components of power sales fluctuation within each long-term time step;
[0032] Step S232: performing dependency correlation quantitative calculation on the long-term time series channel component of the power sales fluctuation in each long-term time step based on the long-term dependency relationship between the long-term time series components of the power sales fluctuation in each long-term time step, and obtaining the corresponding correlation coefficient of the power sales fluctuation channel component in the long-term dependency relationship in each long-term time step;
[0033] Step S233: Calculate the long-term dependency contribution value of the corresponding power sales fluctuation long-term time series channel component according to the corresponding correlation coefficient of the power sales fluctuation channel component in the long-term dependency relationship in each long-term time step, so as to obtain the long-term dependency contribution characteristic value corresponding to the power sales long-term time series data.
[0034] Further, step S25 includes the following steps:
[0035] Step S251: performing long-term time series channel positioning on the time series position of the long-term dependent contribution characteristic value corresponding to the long-term time series data of electricity sales in the long-term time series data of electricity sales fluctuation change, so as to obtain the time series channel position of the long-term contribution value in the long-term time series data; adding the corresponding long-term dependent contribution characteristic value to the time series channel position of the long-term contribution value in the long-term time series data to perform long-term contribution local attention weighting, so as to obtain the second time series data of electricity sales fluctuation amplitude;
[0036] Step S252: perform short-term time series channel positioning on the time series position of the short-term dependent contribution characteristic value corresponding to the short-term time series data of electricity sales in the short-term time series data of electricity sales fluctuation changes, so as to obtain the time series channel position of the short-term contribution value in the short-term time series data; add the corresponding short-term dependent contribution characteristic value to the time series channel position of the short-term contribution value in the short-term time series data to perform short-term contribution local attention weighting, and obtain the third time series data of electricity sales fluctuation amplitude.
[0037] Further, step S3 includes the following steps:
[0038] Step S31: performing data fusion analysis on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to obtain a power sales fluctuation amplitude time series fusion data set;
[0039] Step S32: performing integrated learning and fusion modeling processing on the electricity sales fluctuation amplitude time series fusion data set to construct an integrated prediction model for electricity sales data, wherein the integrated prediction model for electricity sales data includes a decision tree prediction sub-model, a random forest prediction sub-model, and a gradient boosting tree prediction sub-model;
[0040] Step S33: performing a quantitative calculation of the model training error for the integrated learning training process corresponding to each prediction sub-model in the integrated prediction model for electricity sales data, and obtaining the model training error corresponding to each electricity sales data prediction sub-model;
[0041] Step S34: performing weighted arithmetic mean calculation on the model training error corresponding to each power sales data prediction sub-model to obtain the power sales data prediction model training error;
[0042] Step S35: Adaptively adjust and update the learning rate corresponding to the power sales data integrated prediction model based on the power sales data prediction model training error. When the power sales data prediction model training error gradually decreases, the learning rate corresponding to the power sales data integrated prediction model is gradually reduced; when the power sales data prediction model training error gradually increases, the learning rate corresponding to the power sales data integrated prediction model is appropriately increased, otherwise no processing is performed to obtain the prediction model adaptively updated learning rate.
[0043] Furthermore, the present invention also provides a training system for a power sales data prediction model, which is used to execute the training method for a power sales data prediction model as described above. The training system for a power sales data prediction model includes:
[0044] The electricity sales data time series fluctuation division module is used to obtain the original electricity sales time series data, and perform a time series change analysis of the electricity sales fluctuation on the original electricity sales time series data to obtain the first time series data of the electricity sales fluctuation amplitude; perform time series fluctuation division on the first time series data of the electricity sales fluctuation amplitude to obtain the long-term time series data of the electricity sales fluctuation change and the short-term time series data of the electricity sales fluctuation change;
[0045] The long-term and short-term fluctuation dependency contribution analysis module is used to capture the power sales fluctuation dependency contribution characteristic values corresponding to the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes respectively through the long-term and short-term memory networks, so as to obtain the long-term dependency contribution characteristic values corresponding to the long-term time series data of power sales and the short-term dependency contribution characteristic values corresponding to the short-term time series data of power sales; the long-term dependency contribution characteristic values corresponding to the long-term time series data of power sales and the short-term dependency contribution characteristic values corresponding to the short-term time series data of power sales are added to the corresponding time series positions in each time series data, so as to obtain the second time series data of power sales fluctuation amplitude and the third time series data of power sales fluctuation amplitude;
[0046] The integrated power sales prediction model training module is used to perform integrated learning fusion modeling processing on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to construct an integrated power sales data prediction model; perform quantitative calculation of the training error of the integrated learning training process corresponding to the integrated power sales data prediction model to obtain the training error of the power sales data prediction model; based on the training error of the power sales data prediction model, the learning rate corresponding to the integrated power sales data prediction model is adaptively adjusted and updated to obtain the adaptive update learning rate of the prediction model;
[0047] The power sales prediction model incremental learning and updating module is used to perform model incremental learning and updating processing on the power sales data integrated prediction model based on the prediction model adaptive update learning rate to obtain the power sales data updated optimized prediction model.
[0048] Furthermore, the present invention also provides a computer storage medium having a computer program stored thereon, and when the computer program is executed, the training method for the electricity sales data prediction model as described above is implemented.
[0049] Beneficial effects of the present invention:
[0050] 1. The training method for the electricity sales data prediction model proposed in the present invention, compared with the prior art, has the beneficial effect of obtaining the corresponding original electricity sales time series data. This step establishes a comprehensive database by collecting and organizing historical electricity sales data, including electricity sales, customer distribution, regional division, etc. in different time periods. These data usually come from power companies or related market institutions, covering various types of electricity sales information. Accurate and comprehensive original data can help understand electricity sales trends, seasonal changes and potential market fluctuations, thereby laying a solid foundation for subsequent analysis. By analyzing the time series changes of electricity sales fluctuations on the original electricity sales time series data, the changes in electricity sales data at different time points can be effectively identified. By comparing the degree of deviation of actual electricity sales from the mean, it can be determined which time periods have abnormal electricity sales fluctuations. Such analysis can reveal potential market changes, such as electricity sales fluctuations caused by seasonal demand changes, policy influences or economic fluctuations. Further integrating the time series changes of fluctuation amplitudes can form a complete fluctuation amplitude time series. At the same time, by dividing the first time series data of the fluctuation amplitude of electricity sales into time series fluctuations, long-term and short-term fluctuation change data can be obtained. The long-term time series is helpful to analyze the overall trend and cyclical changes of electricity sales, while the short-term time series pays more attention to the impact of immediate market dynamics and emergencies. This division can provide support for decision-making at different levels and adjust strategies in time to adapt to the rapid changes in the market, thereby providing basic data guarantee for the subsequent prediction model training process. Secondly, by using the long short-term memory network to capture the long-term time series data of electricity sales fluctuation changes and the short-term time series data of electricity sales fluctuation changes, the electricity sales fluctuation dependence contribution eigenvalues corresponding to the long-term and short-term time series data can be effectively identified. The key factors affecting the fluctuation of electricity sales in each long-term and short-term time period can be effectively identified. This process not only helps to quantify the contribution of each time period in the long-term and short-term time series, but also helps to identify the important influencing factors in different time periods through the calculation of eigenvalues. This quantitative analysis provides data support for the subsequent processing process, so that corresponding strategies can be adopted more targetedly. The generation of the eigenvalue provides an important basis for the subsequent adjustment of long-term and short-term time series data, thereby further improving the model's explanatory power and prediction ability for long-term and short-term fluctuations in electricity sales. By adding the long-term dependence contribution eigenvalues corresponding to the long-term time series data of electricity sales and the short-term dependence contribution eigenvalues corresponding to the short-term time series data of electricity sales to the corresponding time series positions in each corresponding time series data, the second and third time series data of electricity sales fluctuation amplitude are formed, which can fully reflect the dynamic changes of electricity sales fluctuations. Through the fusion of such eigenvalues, the model can not only capture long-term trends, but also effectively identify short-term fluctuations, forming a multi-dimensional analysis perspective. This comprehensive analysis provides richer data support for the integrated learning and training process of the subsequent prediction model, making the prediction results more comprehensive and accurate.Then, the second time series data of the electricity sales fluctuation amplitude and the third time series data of the electricity sales fluctuation amplitude are processed by integrated learning and fusion modeling to construct an integrated prediction model for electricity sales data. Integrated learning combines multiple prediction sub-models (such as decision trees, random forests and gradient boosting trees) to give full play to the advantages of each model and improve the accuracy and robustness of the prediction. The decision tree model can effectively capture the nonlinear relationship in the data due to its intuitiveness and easy interpretation; the random forest reduces the variance of the model and improves the stability by integrating multiple decision trees; the gradient boosting tree shows better fitting ability when dealing with complex relationships. By integrating these three models, more comprehensive coverage can be achieved on different data features, and finally a more powerful prediction model is formed to improve the prediction accuracy of electricity sales fluctuations. By quantifying the training error of the integrated learning training process corresponding to the integrated prediction model of power sales data, a comprehensive performance evaluation can be provided for the entire integrated prediction model. This error quantification calculation method can give different weights to each sub-model according to its error performance during the training process, and calculate its error average to ensure that the final error index is more accurate and fair. This process makes the final model more intelligent when processing data, and can identify which models perform better in specific situations and give them more influence in the overall decision-making. This not only improves the accuracy of the prediction model, but also enhances the model's adaptability to uncertainty and abnormal situations. The learning rate corresponding to the integrated prediction model of power sales data is adaptively adjusted and updated based on the training error of the power sales data prediction model. When the training error gradually decreases, gradually reducing the learning rate can make the model more stable when approaching the optimal solution, prevent violent oscillation near the local optimal solution, and ensure the stability of convergence; when the training error increases, appropriately increasing the learning rate helps the model escape from the bad local optimal solution and explore a better parameter space. Through this dynamic adjustment, the model can self-optimize at different learning stages and improve the overall prediction ability. This mechanism ensures that the model can maintain adaptability in a changing data environment and enhance the continuous accuracy of model prediction, so as to achieve the real-time update capability of the power sales data prediction model. Finally, the integrated prediction model of power sales data is processed by incremental learning based on the adaptive update learning rate of the prediction model. The core of this process is to adjust the model according to the new data and the adaptive update learning rate, so as to improve the flexibility and adaptability of the model. The incremental learning method enables the model to be updated and optimized in time without the need to start training from scratch, which can not only effectively save computing resources, but also reflect market changes in real time, ensuring that the prediction model always maintains efficiency and accuracy.
[0051] 2. The training system for the electricity sales data prediction model proposed in the present invention is generally composed of a electricity sales data time series fluctuation division module, a long-term and short-term fluctuation dependency contribution analysis module, a electricity sales integrated prediction model training module and a electricity sales prediction model incremental learning and update module. It can implement any training method for the electricity sales data prediction model described in the present invention, and is used to combine the operations between computer programs running on various modules to implement the training method for the electricity sales data prediction model. The internal structures of the system cooperate with each other, which can greatly reduce duplication of work and manpower investment, and can quickly and effectively provide a more accurate and efficient training process for the electricity sales data prediction model, thereby simplifying the operating procedures of the training system for the electricity sales data prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings:
[0053] Figure 1 A schematic diagram of the steps of the training method for the electricity sales data prediction model of the present invention;
[0054] Figure 2 for Figure 1 Detailed step flow diagram of step S1;
[0055] Figure 3 for Figure 2 Detailed step flow chart of step S15 in FIG. DETAILED DESCRIPTION
[0056] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0057] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.
[0058] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0059] To achieve this, please refer to Figures 1 to 3 The present invention provides a training method for a power sales data prediction model, the method comprising the following steps:
[0060] Step S1: obtaining original power sales time series data, and performing power sales fluctuation time series change analysis on the original power sales time series data to obtain first time series data of power sales fluctuation amplitude; performing time series fluctuation division on the first time series data of power sales fluctuation amplitude to obtain long-term time series data of power sales fluctuation change and short-term time series data of power sales fluctuation change;
[0061] Step S2: using a long short-term memory network to capture the power sales fluctuation dependency contribution eigenvalues corresponding to the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes, respectively, to obtain the long-term dependency contribution eigenvalues corresponding to the long-term time series data of power sales and the short-term dependency contribution eigenvalues corresponding to the short-term time series data of power sales; adding the long-term dependency contribution eigenvalues corresponding to the long-term time series data of power sales and the short-term dependency contribution eigenvalues corresponding to the short-term time series data of power sales to the corresponding time series positions in each time series data, to obtain the second time series data of power sales fluctuation amplitude and the third time series data of power sales fluctuation amplitude;
[0062] Step S3: Perform integrated learning fusion modeling processing on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to construct an integrated prediction model for power sales data; perform quantitative calculation of the training error of the integrated learning training process corresponding to the integrated prediction model for power sales data to obtain the training error of the power sales data prediction model; adaptively adjust and update the learning rate corresponding to the integrated prediction model for power sales data based on the training error of the power sales data prediction model to obtain the adaptive update learning rate of the prediction model;
[0063] Step S4: Based on the prediction model adaptively updating the learning rate, the integrated prediction model for power sales data is subjected to model incremental learning and updating processing to obtain an updated optimized prediction model for power sales data.
[0064] In the embodiment of the present invention, please refer to Figure 1FIG. 1 is a flow chart of the steps of the training method for the electricity sales data prediction model of the present invention. In this example, the training method for the electricity sales data prediction model includes the following steps:
[0065] Step S1: obtaining original power sales time series data, and performing power sales fluctuation time series change analysis on the original power sales time series data to obtain first time series data of power sales fluctuation amplitude; performing time series fluctuation division on the first time series data of power sales fluctuation amplitude to obtain long-term time series data of power sales fluctuation change and short-term time series data of power sales fluctuation change;
[0066] In an embodiment of the present invention, it is implemented through the power company database or API interface, and Python's pandas library is used to extract data from CSV or database to ensure that the data timestamp is complete and covers all electricity sales records within the target time period, thereby obtaining the original electricity sales time series data. The previously acquired original power sales time series data is preprocessed to identify and process its missing values and outliers, the fillna() method of the pandas library is used to fill missing values, the Z-score or IQR method is used to detect and remove outliers, and the mean and standard deviation of the power sales time series data obtained after the previous preprocessing are statistically analyzed to calculate the mean and standard deviation of the power sales data by using the mean() and std() functions of pandas. At the same time, the corresponding preprocessed data is analyzed for fluctuation amplitude by combining the power sales data mean and the power sales data standard deviation obtained by the previous quantitative calculation, so as to calculate the deviation of each time point from the mean and compare it with the standard deviation, so as to obtain the fluctuation amplitude of the power sales data corresponding to different time points, and the fluctuation amplitude of the power sales data corresponding to different time points obtained by the previous quantitative calculation is sequentially integrated to integrate the results into the first time series data to form a new DataFrame, and the fluctuation amplitude of each time point is recorded to obtain the first time series data of the power sales fluctuation amplitude. Then, by dividing the first time series data of the power sales fluctuation amplitude obtained by the previous integration analysis into time series fluctuations, the sliding window technology is used to divide the long-term and short-term fluctuation series. The window size can be set, such as 7 days and 30 days, and the rolling() method of pandas is used to generate the corresponding long-term and short-term series data respectively, so as to obtain different time series data sets that can be used for prediction models, and finally obtain the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes.
[0067] Step S2: using a long short-term memory network to capture the power sales fluctuation dependency contribution eigenvalues corresponding to the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes, respectively, to obtain the long-term dependency contribution eigenvalues corresponding to the long-term time series data of power sales and the short-term dependency contribution eigenvalues corresponding to the short-term time series data of power sales; adding the long-term dependency contribution eigenvalues corresponding to the long-term time series data of power sales and the short-term dependency contribution eigenvalues corresponding to the short-term time series data of power sales to the corresponding time series positions in each time series data, to obtain the second time series data of power sales fluctuation amplitude and the third time series data of power sales fluctuation amplitude;
[0068] In an embodiment of the present invention, a long short-term memory network (LSTM) is used to decompose the long-term time series data and short-term time series data of power sales fluctuations into long-term and short-term time series components, so as to collect historical power sales data and perform preprocessing, including missing value filling and standardization, and input the long-term time series and short-term time series into independent LSTM models respectively. In the LSTM model, the appropriate number of network layers and the number of neurons in each layer are set to ensure that the model can capture the long-term channel components and short-term channel components in the sequence, and the corresponding long-term time step and long-term memory unit are designed according to the long-term channel components obtained by the previous decomposition, so as to set a reasonable time step, such as 24 hours or 7 days, by analyzing the characteristics of the long-term channel components, so as to capture the periodic changes of weeks or days, and then design the memory unit of the LSTM model to ensure that it has sufficient capacity to store and transmit long-term information. At this stage, TensorFlow or PyTorch is used. Deep learning frameworks such as LSTM combine long-term time steps and long-term memory units to construct long-term dependency models for corresponding long-term channel components to construct corresponding model architectures and optimize hyperparameters to improve model performance. After model training is completed, a long-term dependency model for power sales fluctuations is generated. The long-term dependency contribution value of the long-term channel components in each long-term time step is calculated by combining the long-term dependency model designed and constructed previously. The model output is obtained by forward propagating the channel components of each time step using the trained LSTM model, calculating the correlation coefficient of each channel component to the output result, and quantifying its contribution to the model prediction result through feature importance analysis (such as SHAP value or LIME method), that is, the weighted sum method is used to multiply the correlation coefficient of each component with its corresponding channel component, and the long-term dependency contribution value of each channel component is calculated, thereby obtaining the long-term dependency contribution feature value corresponding to the long-term time series data of power sales. Similarly, by designing the corresponding short-term time step and short-term memory unit according to the short-term channel components obtained by the previous decomposition, a smaller time step, such as 1 hour or 30 minutes, is set by analyzing the characteristics of the short-term channel components to capture the rapidly changing patterns. When designing the short-term dependency model, a similar LSTM structure is adopted, but a smaller number of layers and neurons can be selected to adapt to the short-term characteristics. The model is constructed and trained using deep learning frameworks such as PyTorch, and the model performance is optimized by setting an appropriate learning rate and batch size to construct a short-term dependency model. At the same time, by combining the short-term dependency model constructed previously, the short-term dependency contribution value of the channel component in each short-term time step is calculated, so that the correlation coefficient of each component is multiplied by its corresponding channel component by using a similar feature importance analysis method, and the short-term dependency contribution value of each channel component is calculated, thereby obtaining the short-term dependency contribution feature value corresponding to the short-term time series data of electricity sales.Then, the long-term dependent contribution characteristic values corresponding to the long-term time series data of electricity sales and the short-term dependent contribution characteristic values corresponding to the short-term time series data of electricity sales obtained by previous quantitative calculation are added into the time series positions in the corresponding time series data respectively, and the long-term and short-term contribution characteristic values are merged with the original time series data through data processing tools (such as Pandas library). During the merging process, it is ensured that each contribution value is correctly added to the corresponding timestamp position to maintain the integrity of the time series and ensure that it can effectively reflect the combined impact of long-term and short-term fluctuations, and finally the second time series data of electricity sales fluctuation amplitude and the third time series data of electricity sales fluctuation amplitude are obtained.
[0069] Step S3: Perform integrated learning fusion modeling processing on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to construct an integrated prediction model for power sales data; perform quantitative calculation of the training error of the integrated learning training process corresponding to the integrated prediction model for power sales data to obtain the training error of the power sales data prediction model; adaptively adjust and update the learning rate corresponding to the integrated prediction model for power sales data based on the training error of the power sales data prediction model to obtain the adaptive update learning rate of the prediction model;
[0070] In an embodiment of the present invention, a fusion processing of time series data is performed on the second time series data of the power sales fluctuation amplitude previously obtained by weighting the long-term and short-term contribution attention and the third time series data of the power sales fluctuation amplitude, so as to extract the characteristics of each time series by using time series data processing technology, such as the sliding window method and Fourier transform, that is, the mean and standard deviation of each time series in different time periods are extracted by the sliding window method, and a feature vector is constructed, and the extracted features are fused by weighted average or principal component analysis method to form a comprehensive data set, and an integrated learning modeling processing is performed on the time series fusion data set previously obtained by fusion analysis, so as to model by using the Scikit-learn library in Python, and the specific steps of constructing the integrated prediction model include first defining three basic prediction sub-models: decision tree, random forest and gradient boosting tree, and the hyperparameters of each sub-model are optimized by the grid search method to ensure the best performance, and the fused data set is divided into a training set and a test set, and the three sub-models are trained respectively by using the training set to generate prediction results. This integrated learning model obtains the integrated prediction model of power sales data by weighted averaging the outputs of the three sub-models. At the same time, the model training error is quantified by calculating the training process of each prediction sub-model in the integrated prediction model of power sales data, and the mean square error (MSE) is used as the error evaluation indicator. During the training process, the difference between the true value and the predicted value is calculated for the prediction result of each sub-model on the test set. The error value of each sub-model will be recorded and stored, and the weighted arithmetic average will be calculated. According to the training effect of each sub-model, its error will be weighted according to the preset weight. The weight can be set according to the accuracy and stability of each sub-model, and the overall error is calculated by using the weighted average formula, which ensures that the contribution of different sub-models to the final prediction model can be reasonably reflected, thereby obtaining the training error of the power sales data prediction model. Then, the learning rate corresponding to the integrated prediction model of power sales data is adaptively adjusted and updated by combining the training error of the power sales data prediction model obtained by arithmetic mean calculation previously. By setting a threshold, the change of the training error is monitored. When the training error gradually decreases, the learning rate is gradually reduced at a fixed ratio to improve the convergence speed and stability of the model. On the contrary, when the training error gradually increases, the learning rate is appropriately increased to prevent model overfitting or training stagnation. This adaptive learning rate adjustment process ensures that the model is continuously optimized during the learning process by performing error evaluation after each training iteration, thereby enhancing the generalization ability of the model and finally obtaining the adaptive update learning rate of the prediction model.
[0071] Step S4: Based on the prediction model adaptively updating the learning rate, the integrated prediction model for power sales data is subjected to model incremental learning and updating processing to obtain an updated optimized prediction model for power sales data.
[0072] In an embodiment of the present invention, by combining the adaptive learning rate updated in the previous step, the electricity sales data integrated prediction model is incrementally learned and updated, so as to utilize the new electricity sales data stream to perform online training on the model, set the parameters of incremental learning and the update frequency, and whenever new data arrives, use the weights of the previous model to perform a rapid update to avoid training from scratch, and by adjusting the learning rate and using the experience replay mechanism, ensure that the model can maintain memory and adaptation to old data when facing new data, and finally obtain an updated optimized prediction model for electricity sales data, which has stronger real-time prediction capabilities and can adapt to the rapidly changing electricity market environment.
[0073] Further, step S1 includes the following steps:
[0074] Step S11: obtaining original electricity sales time series data;
[0075] Step S12: preprocessing the original electricity sales time series data to obtain electricity sales preprocessed time series data;
[0076] Step S13: Performing statistical analysis on the mean and standard deviation of the electricity sales preprocessing time series data to obtain the mean and standard deviation of the electricity sales data;
[0077] Step S14: performing power sales fluctuation amplitude analysis on the power sales preprocessing time series data based on the power sales data mean and the power sales data standard deviation to obtain the power sales data fluctuation amplitude corresponding to different time points; performing fluctuation time series change integration processing on the power sales data fluctuation amplitude corresponding to different time points to obtain the power sales fluctuation amplitude first time series data;
[0078] Step S15: dividing the first time series data of the power sales fluctuation amplitude into time series fluctuations to obtain the long-term time series data of the power sales fluctuation change and the short-term time series data of the power sales fluctuation change.
[0079] As an embodiment of the present invention, refer to Figure 2 As shown, Figure 1 Detailed step flow diagram of step S1 in FIG. 1 , in this embodiment, step S1 includes the following steps:
[0080] Step S11: obtaining original electricity sales time series data;
[0081] In an embodiment of the present invention, it is implemented through the power company database or API interface, and Python's pandas library is used to extract data from CSV or database to ensure that the data timestamp is complete and covers all electricity sales records within the target time period, and finally the original electricity sales time series data is obtained.
[0082] Step S12: preprocessing the original electricity sales time series data to obtain electricity sales preprocessed time series data;
[0083] In an embodiment of the present invention, the original electricity sales time series data previously obtained is preprocessed to identify and process its missing values and outliers, the fillna() method of the pandas library is used to fill the missing values, and the Z-score or IQR method is used to detect and remove outliers. The generated electricity sales preprocessed time series data should meet the requirements of time series analysis to ensure data quality, and finally the electricity sales preprocessed time series data is obtained.
[0084] Step S13: Performing statistical analysis on the mean and standard deviation of the electricity sales preprocessing time series data to obtain the mean and standard deviation of the electricity sales data;
[0085] In an embodiment of the present invention, by performing statistical analysis on the mean and standard deviation of the electricity sales preprocessing time series data obtained after previous preprocessing, the mean and standard deviation of the electricity sales data are calculated by using the mean() and std() functions of pandas. This step ensures a clear understanding of the fluctuations in the electricity sales data, and ultimately the mean and standard deviation of the electricity sales data are obtained.
[0086] Step S14: performing power sales fluctuation amplitude analysis on the power sales preprocessing time series data based on the power sales data mean and the power sales data standard deviation to obtain the power sales data fluctuation amplitude corresponding to different time points; performing fluctuation time series change integration processing on the power sales data fluctuation amplitude corresponding to different time points to obtain the power sales fluctuation amplitude first time series data;
[0087] In an embodiment of the present invention, the fluctuation amplitude of the corresponding pre-processed data is analyzed by combining the mean value of the electricity sales data and the standard deviation of the electricity sales data obtained by previous quantitative calculation, so as to calculate the deviation of each time point from the mean value and compare it with the standard deviation, so as to obtain the fluctuation amplitude of the electricity sales data corresponding to different time points. The apply() function of pandas can be used to perform row-by-row calculation. At the same time, the fluctuation amplitude of the electricity sales data corresponding to different time points obtained by previous quantitative calculation is sequentially integrated in time series to integrate the results into the first time series data, forming a new DataFrame, recording the fluctuation amplitude at each time point, and finally obtaining the first time series data of the electricity sales fluctuation amplitude.
[0088] Step S15: dividing the first time series data of the power sales fluctuation amplitude into time series fluctuations to obtain the long-term time series data of the power sales fluctuation change and the short-term time series data of the power sales fluctuation change.
[0089] In an embodiment of the present invention, by performing time series fluctuation division on the first time series data of the power sales fluctuation amplitude obtained by the previous integrated analysis, and using the sliding window technology to divide the long-term and short-term fluctuation series, the window size can be set, for example 7 days and 30 days, and the rolling() method of pandas is used to generate the corresponding long-term and short-term series data, thereby obtaining different time series data sets that can be used for the prediction model, and finally obtaining the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes.
[0090] Further, step S15 includes the following steps:
[0091] Step S151: Drawing a time series change curve of power sales fluctuation amplitude for the first time series data of power sales fluctuation amplitude to generate a time series change curve of power sales fluctuation amplitude;
[0092] Step S152: Slidingly dividing the time-series change curve of the power sales fluctuation amplitude by time window to obtain corresponding power sales fluctuation amplitude curve segments under different time windows;
[0093] Step S153: performing statistical analysis on the fluctuation frequency and intensity of the power sales fluctuation amplitude curve segments corresponding to different time windows, and obtaining the fluctuation frequency and fluctuation intensity of the power sales segment curves corresponding to different time windows;
[0094] Step S154: Based on the fluctuation frequency and fluctuation intensity of the power selling segmented curves corresponding to different time windows, the power selling fluctuation change score calculation formula is used to calculate the fluctuation score of the corresponding power selling fluctuation amplitude curve segments, so as to obtain the corresponding power selling fluctuation change score values under different time windows;
[0095] Step S155: Compare and judge the corresponding power sales fluctuation change score values according to the preset power sales fluctuation classification standard value. When the power sales fluctuation change score value is less than the preset power sales fluctuation classification standard value, the first time series data of the corresponding power sales fluctuation amplitude in its time window is determined as a long-term stable fluctuation change type, and the first time series data of the power sales fluctuation amplitude in the corresponding time window determined as the long-term stable fluctuation change type is integrated with the long-term fluctuation data to obtain the long-term time series data of power sales fluctuation change; when the power sales fluctuation change score value is greater than or equal to the preset power sales fluctuation classification standard value, the first time series data of the corresponding power sales fluctuation amplitude in its time window is determined as a short-term drastic fluctuation change type, and the first time series data of the power sales fluctuation amplitude in the corresponding time window determined as the short-term drastic fluctuation change type is integrated with the short-term fluctuation data to obtain the short-term time series data of power sales fluctuation change.
[0096] As an embodiment of the present invention, refer to Figure 3 As shown, Figure 2 Detailed step flow diagram of step S15 in FIG. 1 , in this embodiment, step S15 includes the following steps:
[0097] Step S151: Drawing a time series change curve of power sales fluctuation amplitude for the first time series data of power sales fluctuation amplitude to generate a time series change curve of power sales fluctuation amplitude;
[0098] In an embodiment of the present invention, a time series change curve is drawn for the first time series data of the power sales fluctuation amplitude obtained after the previous integration, so as to ensure the integrity and accuracy of the data by collecting the power sales data within a certain time range, and use data analysis tools (such as Pandas and Matplotlib libraries in Python) to process the data, calculate the power sales fluctuation amplitude at each time point, and after forming the time series, use the plot function in the Matplotlib library to draw the power sales fluctuation time series change curve, and set appropriate coordinate axis labels and legends to make the drawn curve clear and easy to understand, and finally draw and generate the power sales fluctuation amplitude time series change curve.
[0099] Step S152: Slidingly dividing the time-series change curve of the power sales fluctuation amplitude by time window to obtain corresponding power sales fluctuation amplitude curve segments under different time windows;
[0100] In an embodiment of the present invention, a time-series sliding process is performed on the previously drawn and generated power sales fluctuation amplitude time-series change curve by setting a corresponding time window size (for example, 1 hour, 1 day, etc.), so as to segment the power sales fluctuation amplitude time-series change curve by specifying the window size by using the rolling function in the Pandas library, and generate power sales fluctuation amplitude curve segments within multiple time windows. This process converts the time series data into multiple small segments for subsequent statistical analysis of fluctuation frequency and intensity, and finally obtains the corresponding power sales fluctuation amplitude curve segments under different time windows.
[0101] Step S153: performing statistical analysis on the fluctuation frequency and intensity of the power sales fluctuation amplitude curve segments corresponding to different time windows, and obtaining the fluctuation frequency and fluctuation intensity of the power sales segment curves corresponding to different time windows;
[0102] In an embodiment of the present invention, the fluctuation frequency and intensity statistics are performed on the electricity sales fluctuation curve segments obtained by the previous division in different time windows, so as to statistically calculate the fluctuation frequency in each time window, that is, the number of times the curve changes. Then, the standard deviation or variance is used to calculate the fluctuation intensity of each segment of data. The std and var functions in the NumPy library can be used to calculate the fluctuation intensity of each segment of data, so as to perform detailed fluctuation analysis on each time window to ensure that accurate fluctuation frequency and intensity data are obtained, and finally the fluctuation frequency and fluctuation intensity of the electricity sales segment curve corresponding to different time windows are obtained.
[0103] Step S154: Based on the fluctuation frequency and fluctuation intensity of the power selling segmented curves corresponding to different time windows, the power selling fluctuation change score calculation formula is used to calculate the fluctuation score of the corresponding power selling fluctuation amplitude curve segments, so as to obtain the corresponding power selling fluctuation change score values under different time windows;
[0104] In an embodiment of the present invention, a suitable power sales fluctuation change score calculation formula is formed by combining the total number of time windows, the starting time point, the ending time point, the time variable parameters, the power sales fluctuation amplitude corresponding to the power sales fluctuation amplitude curve segment, the power sales segment curve fluctuation frequency, the power sales segment curve fluctuation intensity and related parameters to perform fluctuation score calculation on the corresponding power sales fluctuation amplitude curve segment, so as to quantitatively calculate the power sales fluctuation change score value corresponding to each time window. This score value will be used for subsequent classification and comparison to ensure that different fluctuation types can be effectively distinguished, and finally the corresponding power sales fluctuation change score values under different time windows are obtained.
[0105] Step S155: Compare and judge the corresponding power sales fluctuation change score values according to the preset power sales fluctuation classification standard value. When the power sales fluctuation change score value is less than the preset power sales fluctuation classification standard value, the first time series data of the corresponding power sales fluctuation amplitude in its time window is determined as a long-term stable fluctuation change type, and the first time series data of the power sales fluctuation amplitude in the corresponding time window determined as the long-term stable fluctuation change type is integrated with the long-term fluctuation data to obtain the long-term time series data of power sales fluctuation change; when the power sales fluctuation change score value is greater than or equal to the preset power sales fluctuation classification standard value, the first time series data of the corresponding power sales fluctuation amplitude in its time window is determined as a short-term drastic fluctuation change type, and the first time series data of the power sales fluctuation amplitude in the corresponding time window determined as the short-term drastic fluctuation change type is integrated with the short-term fluctuation data to obtain the short-term time series data of power sales fluctuation change.
[0106] In an embodiment of the present invention, a comparison is made between the power sales fluctuation change score values obtained by the previous quantitative calculation and the preset power sales fluctuation classification standard values, so as to compare the score values of each time window with the preset standard. If the score value is less than the standard value, the power sales fluctuation under the time window is determined to be a long-term stable fluctuation type; conversely, if the score value is greater than or equal to the standard value, it is determined to be a short-term violent fluctuation type. At the same time, by integrating each type of power sales fluctuation data, the long-term fluctuation data can be integrated by taking the average or median to form long-term time series data of power sales fluctuation changes; and the short-term fluctuations are integrated by weighted averaging and other methods to form short-term time series data of power sales fluctuation changes. The long-term and short-term fluctuation data finally obtained provide a reliable data basis for the training of subsequent power sales data prediction models.
[0107] Furthermore, the formula for calculating the electricity sales fluctuation score in step S154 is specifically:
[0108]
[0109] In the formula, S i is the corresponding power sales fluctuation change score value in the i-th time window, n is the total number of time windows, i is the item measurement parameter of the time window, is the starting time point corresponding to the i-th time window, is the termination time point corresponding to the i-th time window, t is the time variable parameter, A i (t) is the fluctuation amplitude of electricity sales corresponding to the electricity sales fluctuation amplitude curve segment at time t in the i-th time window, F i (t) is the fluctuation frequency of the power sales segment curve at time t in the i-th time window, I i (t) is the fluctuation intensity of the electricity sales segment curve at time t in the i-th time window, η i is the correction coefficient of the corresponding electricity sales fluctuation score value in the i-th time window.
[0110] The present invention obtains a formula for calculating the score of power sales fluctuation changes by using a specific mathematical model and verifying it, which is used to calculate the fluctuation score of the corresponding power sales fluctuation amplitude curve segment. The formula for calculating the score of power sales fluctuation changes uses the integral form of the time window, which can comprehensively consider the power sales fluctuation amplitude, frequency and intensity and other factors within the time window, making the scoring result more comprehensive. At the same time, the introduction of the correction coefficient can be adjusted according to the actual situation, thereby improving the adaptability and accuracy of the score. This design makes the calculation formula flexible, so that it can compare the power sales fluctuation change score values by setting the corresponding classification standard values, and can effectively distinguish long-term stable fluctuations from short-term violent fluctuations, which provides a solid data foundation for subsequent forecasting analysis and model construction. In summary, the formula fully considers the corresponding power sales fluctuation change score value S in the i-th time window. i , the total number of time windows n, the item measurement parameter i of the time window, the starting time point corresponding to the i-th time window The end time point corresponding to the i-th time window Time variable parameter t, the sales volume fluctuation amplitude A corresponding to the sales volume fluctuation amplitude curve segment at time i in the i-th time window i (t), the fluctuation frequency F of the power sales segment curve at time t in the i-th time window i (t), the fluctuation intensity of the electricity sales segment curve at time t in the i-th time window Ii ( t), the correction coefficient η of the corresponding power sales fluctuation score value in the i-th time window i , according to the corresponding power sales fluctuation change score S in the i-th time window i The correlation between the above parameters constitutes a functional relationship This formula can realize the fluctuation score calculation process of the corresponding power sales fluctuation amplitude curve segment. At the same time, the correction coefficient η of the corresponding power sales fluctuation change score value in the i-th time window is used. i The introduction of can be adjusted according to the errors that occur in the calculation process, thereby improving the accuracy and applicability of the calculation formula for the electricity sales fluctuation change score.
[0111] Further, step S2 includes the following steps:
[0112] Step S21: Decomposing the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes into long-term and short-term time series components respectively through a long-term and short-term memory network to obtain the long-term time series channel component of power sales fluctuation and the short-term time series channel component of power sales fluctuation;
[0113] In an embodiment of the present invention, a long short-term memory network (LSTM) is used to decompose the long-term time series data and short-term time series data of electricity sales fluctuation changes into long-term and short-term time series components, so as to collect historical electricity sales data and perform preprocessing, including missing value filling and standardization, and input the long-term time series and short-term time series into independent LSTM models respectively. In the LSTM model, a suitable number of network layers and the number of neurons in each layer are set to ensure that the model can capture the long-term dependency and short-term dependency features in the sequence. After the model is trained, the long-term and short-term channel components are extracted by back-propagating the time step of the input data. Through this process, the long-term time series channel components of electricity sales fluctuations and the short-term time series channel components of electricity sales fluctuations are finally obtained.
[0114] Step S22: designing corresponding long-term time steps and long-term memory units according to the long-term time series channel components of power sales fluctuations, and designing a long-term dependency model for the long-term time series channel components of power sales fluctuations based on the long-term time steps and long-term memory units to generate a long-term dependency model for power sales fluctuations;
[0115] In an embodiment of the present invention, a corresponding long-term time step and a long-term memory unit are designed according to the long-term time series channel component of power sales fluctuation obtained by the previous decomposition, and a reasonable time step, such as 24 hours or 7 days, is set by analyzing the characteristics of the long-term channel component to capture the periodic changes of weeks or days. Subsequently, the memory unit of the LSTM model is designed to ensure that it has sufficient capacity to store and transmit long-term information. At this stage, a deep learning framework such as TensorFlow or PyTorch is used in combination with a long-term time step and a long-term memory unit to construct a long-term dependency model for the corresponding long-term time series channel component of power sales fluctuation, so as to construct a corresponding model architecture, and optimize hyperparameters to improve model performance. After the model training is completed, a long-term dependency model for power sales fluctuation is generated, which is used to capture important patterns and trends in long-term time series data, and finally a long-term dependency model for power sales fluctuation is constructed.
[0116] Step S23: Based on the long-term dependence model of electricity sales fluctuation, the long-term dependence contribution value of the long-term time series channel component of electricity sales fluctuation in each long-term time step is calculated to obtain the long-term dependence contribution characteristic value corresponding to the long-term time series data of electricity sales;
[0117] In an embodiment of the present invention, the long-term dependence contribution value of the long-term time series channel component of the power sales fluctuation in each long-term time step is calculated by combining the previously designed and constructed long-term dependence model of power sales fluctuation, so as to obtain the model output by using the trained LSTM model to forward propagate the channel component of each time step, calculate the correlation coefficient of each channel component to the output result, and quantify its contribution to the model prediction result through feature importance analysis (such as SHAP value or LIME method), that is, the weighted sum method is adopted to multiply the correlation coefficient of each component with its corresponding channel component, and calculate the long-term dependence contribution value of each channel component. In this process, it is ensured that the contribution value of each long-term time step is recorded, so as to form a long-term dependence contribution feature value set, and finally obtain the long-term dependence contribution feature value corresponding to the long-term time series data of power sales.
[0118] Step S24: designing the corresponding short-term time step and short-term memory unit according to the short-term time series channel component of the power sales fluctuation, and designing the short-term dependence model for the short-term time series channel component of the power sales fluctuation based on the short-term time step and the short-term memory unit to generate the short-term dependence model of the power sales fluctuation; calculating the short-term dependence contribution value of the short-term time series channel component of the power sales fluctuation within each short-term time step based on the short-term dependence model of the power sales fluctuation, to obtain the short-term dependence contribution characteristic value corresponding to the short-term time series data of the power sales;
[0119] In the embodiment of the present invention, similarly, the corresponding short-term time step and short-term memory unit are designed according to the channel components of the short-term time series of electricity sales fluctuations obtained by the previous decomposition, so as to analyze the characteristics of the short-term channel components and set a smaller time step, such as 1 hour or 30 minutes, to capture the rapidly changing pattern. When designing the short-term dependency model, a similar LSTM structure is adopted, but a smaller number of layers and neurons can be selected to adapt to the short-term characteristics. The model is constructed and trained using deep learning frameworks such as PyTorch, and the model performance is optimized by setting an appropriate learning rate and batch size, so as to construct and generate a short-term dependency model of electricity sales fluctuations. At the same time, the short-term dependency contribution value of the channel components in each short-term time step is calculated by combining the short-term dependency model constructed previously, so as to multiply the correlation coefficient of each component with its corresponding channel component by using a similar feature importance analysis method, and calculate the short-term dependency contribution value of each channel component, and finally obtain the short-term dependency contribution feature value corresponding to the short-term time series data of electricity sales.
[0120] Step S25: Add the long-term dependence contribution characteristic value corresponding to the long-term time series data of electricity sales and the short-term dependence contribution characteristic value corresponding to the short-term time series data of electricity sales to the corresponding time series position in each time series data to obtain the second time series data of electricity sales fluctuation amplitude and the third time series data of electricity sales fluctuation amplitude.
[0121] In an embodiment of the present invention, the long-term dependent contribution characteristic value corresponding to the long-term time series data of electricity sales and the short-term dependent contribution characteristic value corresponding to the short-term time series data of electricity sales obtained by previous quantitative calculation are respectively added into the time series positions in the corresponding time series data, and the long-term and short-term contribution characteristic values are merged with the original time series data through data processing tools (such as Pandas library). During the merging process, it is ensured that each contribution value is correctly added to the corresponding timestamp position to maintain the integrity of the time series and ensure that it can effectively reflect the comprehensive impact of long-term and short-term fluctuations, and finally the second time series data of electricity sales fluctuation amplitude and the third time series data of electricity sales fluctuation amplitude are obtained.
[0122] Further, step S23 includes the following steps:
[0123] Step S231: Based on the long-term dependency model of power sales fluctuation, long-term dependency mining analysis is performed on the long-term time series channel components of power sales fluctuation within each long-term time step to obtain the long-term dependency relationship between the long-term time series components of power sales fluctuation within each long-term time step;
[0124] In an embodiment of the present invention, a long-term dependency mining analysis is performed on the long-term time series channel components of power sales fluctuations in each long-term time step based on a long-term dependency model of power sales fluctuations designed and generated previously, so as to select a suitable long-term dependency analysis model, such as a long short-term memory network (LSTM) or a time series decomposition method, and identify the intrinsic dependency between different channel components in the long-term time series through learning from historical data. The long-term time series data is divided into multiple time steps, each time step corresponds to a group of data, and in each time step, the correlation between channel components is calculated using the model, and the long-term dependency features are extracted to form a dependency matrix. This process ensures that the relationship between different channel components can be accurately identified, and finally the long-term dependency between the long-term time series components of power sales fluctuations in each long-term time step is obtained.
[0125] Step S232: performing dependency correlation quantitative calculation on the long-term time series channel component of the power sales fluctuation in each long-term time step based on the long-term dependency relationship between the long-term time series components of the power sales fluctuation in each long-term time step, and obtaining the corresponding correlation coefficient of the power sales fluctuation channel component in the long-term dependency relationship in each long-term time step;
[0126] In an embodiment of the present invention, by combining the long-term dependence between the long-term time series components of power sales fluctuations in each long-term time step obtained by previous mining and analysis, the corresponding long-term time series channel components of power sales fluctuations are subjected to dependence correlation quantitative calculation, so as to use the Pearson correlation coefficient method to calculate the correlation coefficient between the components in each time step and other components. In the specific operation, the components in each long-term time step are first standardized to eliminate the dimension effect, and then the correlation coefficient matrix is calculated using statistical analysis software (such as Python's NumPy library), and finally the correlation coefficient corresponding to the power sales fluctuation channel components in each long-term time step in the long-term dependence is obtained.
[0127] Step S233: Calculate the long-term dependency contribution value of the corresponding power sales fluctuation long-term time series channel component according to the corresponding correlation coefficient of the power sales fluctuation channel component in the long-term dependency relationship in each long-term time step, so as to obtain the long-term dependency contribution characteristic value corresponding to the power sales long-term time series data.
[0128] In an embodiment of the present invention, the long-term dependence contribution value of the corresponding power sales fluctuation long-term time series channel component is calculated according to the corresponding correlation coefficient of the power sales fluctuation channel component in each long-term time step obtained by previous quantitative calculation in the long-term dependence relationship, and the weighted sum method is adopted to multiply the correlation coefficient of each component with its corresponding channel component to calculate the long-term dependence contribution value of each channel component. In the specific implementation process, the Pandas library in Python can be used for data processing and calculation, and the obtained correlation coefficient is combined with the original data, and the final contribution value is generated by setting weights. This result reflects the importance of each channel component in the long-term time series, and finally the long-term dependence contribution characteristic value corresponding to the power sales long-term time series data is obtained.
[0129] Further, step S25 includes the following steps:
[0130] Step S251: performing long-term time series channel positioning on the time series position of the long-term dependent contribution characteristic value corresponding to the long-term time series data of electricity sales in the long-term time series data of electricity sales fluctuation change, so as to obtain the time series channel position of the long-term contribution value in the long-term time series data; adding the corresponding long-term dependent contribution characteristic value to the time series channel position of the long-term contribution value in the long-term time series data to perform long-term contribution local attention weighting, so as to obtain the second time series data of electricity sales fluctuation amplitude;
[0131] In an embodiment of the present invention, the time series channel is located by locating the time series position of the corresponding long-term dependent contribution characteristic value obtained by the long short-term memory network analysis in the long-term time series data of the power sales fluctuation change, so as to use the autoregressive moving average model (ARIMA) to perform time series analysis, extract key features in the long-term time series data, such as trend, seasonality and periodicity, and identify the position of the long-term dependent contribution characteristic value in the time series in a time window-based manner, generate a long-term contribution value time series channel using the position data, and add the corresponding long-term dependent contribution characteristic value to the determined position. In this process, the local weighted regression (LOWESS) method is used to weight the long-term contribution value to strengthen the influence of the key time series position, so as to adjust the second time series data corresponding to the power sales data fluctuation, accurately reflect the long-term fluctuation trend, and finally obtain the second time series data of the power sales fluctuation amplitude.
[0132] Step S252: perform short-term time series channel positioning on the time series position of the short-term dependent contribution characteristic value corresponding to the short-term time series data of electricity sales in the short-term time series data of electricity sales fluctuation changes, so as to obtain the time series channel position of the short-term contribution value in the short-term time series data; add the corresponding short-term dependent contribution characteristic value to the time series channel position of the short-term contribution value in the short-term time series data to perform short-term contribution local attention weighting, and obtain the third time series data of electricity sales fluctuation amplitude.
[0133] In an embodiment of the present invention, similarly, the time series position of the corresponding short-term dependency contribution characteristic value obtained through the long short-term memory network analysis in the short-term time series data of the power sales fluctuation change is located in the same way, and the short-term time series is preprocessed by the exponential smoothing method to reduce the influence of noise, and the key time series position of the short-term dependency feature in the time series is determined by calculating the autocorrelation function (ACF) of the short-term time series data, and the corresponding short-term dependency contribution characteristic value is added to the located short-term contribution value time series channel, and the weighted average method is used to perform local attention weighting. In the specific operation, the weighting factor is set so that the data points closer to the target time series position have a higher weight, thereby adjusting the third time series data corresponding to the power sales data fluctuation, accurately capturing the dynamic change characteristics of the short-term fluctuation, and finally obtaining the third time series data of the power sales fluctuation amplitude.
[0134] Further, step S3 includes the following steps:
[0135] Step S31: performing data fusion analysis on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to obtain a power sales fluctuation amplitude time series fusion data set;
[0136] In an embodiment of the present invention, time series data fusion processing is performed on the second time series data of power sales fluctuation amplitude and the third time series data of power sales fluctuation amplitude previously obtained through weighted long-term and short-term contribution attention, so as to extract the characteristics of each time series by using time series data processing technology, such as sliding window method and Fourier transform, that is, the mean and standard deviation of each time series in different time periods are extracted by sliding window method, and feature vectors are constructed. The extracted features are fused by weighted average or principal component analysis method to form a comprehensive data set. The fused data set contains multi-dimensional time features, which can comprehensively reflect the dynamic changes of power sales data in long-term and short-term fluctuations, and finally obtain the power sales fluctuation amplitude time series fused data set.
[0137] Step S32: performing integrated learning and fusion modeling processing on the electricity sales fluctuation amplitude time series fusion data set to construct an integrated prediction model for electricity sales data, wherein the integrated prediction model for electricity sales data includes a decision tree prediction sub-model, a random forest prediction sub-model, and a gradient boosting tree prediction sub-model;
[0138] In an embodiment of the present invention, an integrated learning modeling process is performed on the power sales fluctuation amplitude time series fusion data set previously obtained by fusion analysis, so as to perform modeling by using the Scikit-learn library in Python. The specific steps of constructing an integrated prediction model include first defining three basic prediction sub-models: decision tree, random forest and gradient boosting tree. The hyperparameters of each sub-model are optimized by a grid search method to ensure the best performance. The fusion data set is divided into a training set and a test set. The three sub-models are trained separately using the training set to generate prediction results. This integrated learning model finally obtains an integrated prediction model for power sales data by weighted averaging the outputs of the three sub-models.
[0139] Step S33: performing a quantitative calculation of the model training error for the integrated learning training process corresponding to each prediction sub-model in the integrated prediction model for electricity sales data, and obtaining the model training error corresponding to each electricity sales data prediction sub-model;
[0140] In an embodiment of the present invention, the model training error is quantified by calculating the training process of each prediction sub-model in the integrated prediction model of electricity sales data, and the mean square error (MSE) is used as the error evaluation indicator. During the training process, the difference between the true value and the predicted value is calculated for the prediction result of each sub-model on the test set. The error value of each sub-model will be recorded and stored for subsequent analysis and comparison. Through this quantitative calculation, the model training error corresponding to each electricity sales data prediction sub-model is finally obtained.
[0141] Step S34: performing weighted arithmetic mean calculation on the model training error corresponding to each power sales data prediction sub-model to obtain the power sales data prediction model training error;
[0142] In an embodiment of the present invention, a weighted arithmetic average is performed on the training errors of each electricity sales data prediction sub-model obtained from the previous analysis, and based on the training effect of each sub-model, its error is weighted according to a preset weight. The weight can be set according to the accuracy and stability of each sub-model, and the overall error is calculated by using the weighted average formula. The result is recorded as the training error of the electricity sales data prediction model, thereby ensuring that the contribution of different sub-models to the final prediction model can be reasonably reflected, and finally the training error of the electricity sales data prediction model is obtained.
[0143] Step S35: Adaptively adjust and update the learning rate corresponding to the power sales data integrated prediction model based on the power sales data prediction model training error. When the power sales data prediction model training error gradually decreases, the learning rate corresponding to the power sales data integrated prediction model is gradually reduced; when the power sales data prediction model training error gradually increases, the learning rate corresponding to the power sales data integrated prediction model is appropriately increased, otherwise no processing is performed to obtain the prediction model adaptively updated learning rate.
[0144] In an embodiment of the present invention, the learning rate corresponding to the integrated prediction model of power sales data is adaptively adjusted and updated by combining the training error of the power sales data prediction model previously obtained by arithmetic averaging. By setting a threshold, the change of the training error is monitored. When the training error gradually decreases, the learning rate is gradually reduced at a fixed ratio to improve the model convergence speed and stability. On the contrary, when the training error gradually increases, the learning rate is appropriately increased to prevent model overfitting or training stagnation. This adaptive learning rate adjustment process ensures that the model is continuously optimized during the learning process by performing error evaluation after each training iteration, thereby enhancing the generalization ability of the model and finally obtaining the adaptive update learning rate of the prediction model.
[0145] Furthermore, the present invention also provides a training system for a power sales data prediction model, which is used to execute the training method for a power sales data prediction model as described above. The training system for a power sales data prediction model includes:
[0146] The electricity sales data time series fluctuation division module is used to obtain the original electricity sales time series data, and perform a time series change analysis of the electricity sales fluctuation on the original electricity sales time series data to obtain the first time series data of the electricity sales fluctuation amplitude; perform time series fluctuation division on the first time series data of the electricity sales fluctuation amplitude to obtain the long-term time series data of the electricity sales fluctuation change and the short-term time series data of the electricity sales fluctuation change;
[0147] The long-term and short-term fluctuation dependency contribution analysis module is used to capture the power sales fluctuation dependency contribution characteristic values corresponding to the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes respectively through the long-term and short-term memory networks, so as to obtain the long-term dependency contribution characteristic values corresponding to the long-term time series data of power sales and the short-term dependency contribution characteristic values corresponding to the short-term time series data of power sales; the long-term dependency contribution characteristic values corresponding to the long-term time series data of power sales and the short-term dependency contribution characteristic values corresponding to the short-term time series data of power sales are added to the corresponding time series positions in each time series data, so as to obtain the second time series data of power sales fluctuation amplitude and the third time series data of power sales fluctuation amplitude;
[0148] The integrated power sales prediction model training module is used to perform integrated learning fusion modeling processing on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to construct an integrated power sales data prediction model; perform quantitative calculation of the training error of the integrated learning training process corresponding to the integrated power sales data prediction model to obtain the training error of the power sales data prediction model; based on the training error of the power sales data prediction model, the learning rate corresponding to the integrated power sales data prediction model is adaptively adjusted and updated to obtain the adaptive update learning rate of the prediction model;
[0149] The power sales prediction model incremental learning and updating module is used to perform model incremental learning and updating processing on the power sales data integrated prediction model based on the prediction model adaptive update learning rate to obtain the power sales data updated optimized prediction model.
[0150] Furthermore, the present invention also provides a computer storage medium having a computer program stored thereon, and when the computer program is executed, the training method for the electricity sales data prediction model as described above is implemented.
[0151] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0152] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A training method for a power sales data prediction model, characterized in that: The following steps are involved: Step S1: obtaining original power selling time series data, and performing power selling fluctuation time series change analysis on the original power selling time series data to obtain first time series data of power selling fluctuation amplitude; Performing time series fluctuation division on the first time series data of the fluctuation amplitude of electricity sales to obtain long-term time series data of fluctuation changes in electricity sales and short-term time series data of fluctuation changes in electricity sales; Step S2: using a long short-term memory network to capture the power sales fluctuation dependency contribution eigenvalues corresponding to the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes, respectively, so as to obtain the long-term dependency contribution eigenvalues corresponding to the long-term time series data of power sales and the short-term dependency contribution eigenvalues corresponding to the short-term time series data of power sales; Add the long-term dependence contribution characteristic value corresponding to the long-term time series data of electricity sales and the short-term dependence contribution characteristic value corresponding to the short-term time series data of electricity sales to the corresponding time series position in each time series data to obtain the second time series data of electricity sales fluctuation amplitude and the third time series data of electricity sales fluctuation amplitude; Step S3: Perform integrated learning fusion modeling processing on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to construct an integrated prediction model for power sales data; perform quantitative calculation of the training error of the integrated learning training process corresponding to the integrated prediction model for power sales data to obtain the training error of the power sales data prediction model; adaptively adjust and update the learning rate corresponding to the integrated prediction model for power sales data based on the training error of the power sales data prediction model to obtain the adaptive update learning rate of the prediction model; Step S4: Based on the prediction model adaptively updating the learning rate, the integrated prediction model for power sales data is subjected to model incremental learning and updating processing to obtain an updated optimized prediction model for power sales data.
2. The training method for the electricity sales data prediction model according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: obtaining original electricity sales time series data; Step S12: preprocessing the original electricity sales time series data to obtain electricity sales preprocessed time series data; Step S13: Performing statistical analysis on the mean and standard deviation of the electricity sales preprocessing time series data to obtain the mean and standard deviation of the electricity sales data; Step S14: performing power sales fluctuation amplitude analysis on the power sales preprocessing time series data based on the power sales data mean and the power sales data standard deviation to obtain the power sales data fluctuation amplitude corresponding to different time points; performing fluctuation time series change integration processing on the power sales data fluctuation amplitude corresponding to different time points to obtain the power sales fluctuation amplitude first time series data; Step S15: dividing the first time series data of the power sales fluctuation amplitude into time series fluctuations to obtain the long-term time series data of the power sales fluctuation change and the short-term time series data of the power sales fluctuation change.
3. The training method for the electricity sales data prediction model according to claim 2, characterized in that: Step S15 includes the following steps: Step S151: plotting a time series change curve of power sales fluctuation amplitude for the first time series data of power sales fluctuation amplitude, so as to generate a time series change curve of power sales fluctuation amplitude; Step S152: performing sliding division of the time window of the power sales fluctuation amplitude time series change curve to obtain the power sales fluctuation amplitude curve segments corresponding to different time windows; Step S153: performing statistical analysis on the fluctuation frequency and intensity of the power sales fluctuation amplitude curve segments corresponding to different time windows, and obtaining the fluctuation frequency and fluctuation intensity of the power sales segment curves corresponding to different time windows; Step S154: Based on the fluctuation frequency and fluctuation intensity of the power selling segmented curves corresponding to different time windows, the power selling fluctuation change score calculation formula is used to calculate the fluctuation score of the corresponding power selling fluctuation amplitude curve segments, so as to obtain the corresponding power selling fluctuation change score values under different time windows; Step S155: Compare and judge the corresponding power sales fluctuation change score values according to the preset power sales fluctuation classification standard value. When the power sales fluctuation change score value is less than the preset power sales fluctuation classification standard value, the first time series data of the corresponding power sales fluctuation amplitude in its time window is determined as a long-term stable fluctuation change type, and the first time series data of the power sales fluctuation amplitude in the corresponding time window determined as the long-term stable fluctuation change type is integrated with the long-term fluctuation data to obtain the long-term time series data of power sales fluctuation change; when the power sales fluctuation change score value is greater than or equal to the preset power sales fluctuation classification standard value, the first time series data of the corresponding power sales fluctuation amplitude in its time window is determined as a short-term drastic fluctuation change type, and the first time series data of the power sales fluctuation amplitude in the corresponding time window determined as the short-term drastic fluctuation change type is integrated with the short-term fluctuation data to obtain the short-term time series data of power sales fluctuation change.
4. The training method for the electricity sales data prediction model according to claim 3 is characterized in that: The specific calculation formula for the power sales fluctuation change score in step S154 is: In the formula, S i is the corresponding power sales fluctuation change score value in the i-th time window, n is the total number of time windows, i is the item measurement parameter of the time window, is the starting time point corresponding to the i-th time window, is the termination time point corresponding to the i-th time window, t is the time variable parameter, A i (t) is the fluctuation amplitude of electricity sales corresponding to the electricity sales fluctuation amplitude curve segment at time t in the i-th time window, F i (t) is the fluctuation frequency of the power sales segment curve at time t in the i-th time window, I i (t) is the fluctuation intensity of the electricity sales segment curve at time t in the i-th time window, η i is the correction coefficient of the corresponding electricity sales fluctuation score value in the i-th time window.
5. The training method for the electricity sales data prediction model according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: Decomposing the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes into long-term and short-term time series components respectively through a long-term and short-term memory network to obtain the long-term time series channel component of power sales fluctuation and the short-term time series channel component of power sales fluctuation; Step S22: designing corresponding long-term time steps and long-term memory units according to the long-term time series channel components of power sales fluctuations, and designing a long-term dependency model for the long-term time series channel components of power sales fluctuations based on the long-term time steps and long-term memory units to generate a long-term dependency model for power sales fluctuations; Step S23: Based on the long-term dependence model of electricity sales fluctuation, the long-term dependence contribution value of the long-term time series channel component of electricity sales fluctuation in each long-term time step is calculated to obtain the long-term dependence contribution characteristic value corresponding to the long-term time series data of electricity sales; Step S24: designing the corresponding short-term time step and short-term memory unit according to the short-term time series channel component of the power sales fluctuation, and designing the short-term dependence model for the short-term time series channel component of the power sales fluctuation based on the short-term time step and the short-term memory unit to generate the short-term dependence model of the power sales fluctuation; calculating the short-term dependence contribution value of the short-term time series channel component of the power sales fluctuation within each short-term time step based on the short-term dependence model of the power sales fluctuation, to obtain the short-term dependence contribution characteristic value corresponding to the short-term time series data of the power sales; Step S25: Add the long-term dependence contribution characteristic value corresponding to the long-term time series data of electricity sales and the short-term dependence contribution characteristic value corresponding to the short-term time series data of electricity sales to the corresponding time series position in each time series data to obtain the second time series data of electricity sales fluctuation amplitude and the third time series data of electricity sales fluctuation amplitude.
6. The training method for the electricity sales data prediction model according to claim 5, characterized in that: Step S23 includes the following steps: Step S231: Based on the long-term dependency model of power sales fluctuation, long-term dependency mining analysis is performed on the long-term time series channel components of power sales fluctuation within each long-term time step to obtain the long-term dependency relationship between the long-term time series components of power sales fluctuation within each long-term time step; Step S232: performing dependency correlation quantitative calculation on the long-term time series channel component of the power sales fluctuation in each long-term time step based on the long-term dependency relationship between the long-term time series components of the power sales fluctuation in each long-term time step, and obtaining the corresponding correlation coefficient of the power sales fluctuation channel component in the long-term dependency relationship in each long-term time step; Step S233: Calculate the long-term dependency contribution value of the corresponding power sales fluctuation long-term time series channel component according to the corresponding correlation coefficient of the power sales fluctuation channel component in the long-term dependency relationship in each long-term time step, so as to obtain the long-term dependency contribution characteristic value corresponding to the power sales long-term time series data.
7. The training method for the electricity sales data prediction model according to claim 5, characterized in that: Step S25 includes the following steps: Step S251: performing long-term time series channel positioning on the time series position of the long-term dependent contribution characteristic value corresponding to the long-term time series data of electricity sales in the long-term time series data of electricity sales fluctuation change, so as to obtain the time series channel position of the long-term contribution value in the long-term time series data; adding the corresponding long-term dependent contribution characteristic value to the time series channel position of the long-term contribution value in the long-term time series data to perform long-term contribution local attention weighting, so as to obtain the second time series data of electricity sales fluctuation amplitude; Step S252: perform short-term time series channel positioning on the time series position of the short-term dependent contribution characteristic value corresponding to the short-term time series data of electricity sales in the short-term time series data of electricity sales fluctuation changes, so as to obtain the time series channel position of the short-term contribution value in the short-term time series data; add the corresponding short-term dependent contribution characteristic value to the time series channel position of the short-term contribution value in the short-term time series data to perform short-term contribution local attention weighting, and obtain the third time series data of electricity sales fluctuation amplitude.
8. The training method for the electricity sales data prediction model according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: performing data fusion analysis on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to obtain a power sales fluctuation amplitude time series fusion data set; Step S32: performing integrated learning and fusion modeling processing on the electricity sales fluctuation amplitude time series fusion data set to construct an integrated prediction model for electricity sales data, wherein the integrated prediction model for electricity sales data includes a decision tree prediction sub-model, a random forest prediction sub-model, and a gradient boosting tree prediction sub-model; Step S33: performing a quantitative calculation of the model training error for the integrated learning training process corresponding to each prediction sub-model in the integrated prediction model for electricity sales data, and obtaining the model training error corresponding to each electricity sales data prediction sub-model; Step S34: performing weighted arithmetic mean calculation on the model training error corresponding to each power sales data prediction sub-model to obtain the power sales data prediction model training error; Step S35: Adaptively adjust and update the learning rate corresponding to the power sales data integrated prediction model based on the power sales data prediction model training error. When the power sales data prediction model training error gradually decreases, the learning rate corresponding to the power sales data integrated prediction model is gradually reduced; when the power sales data prediction model training error gradually increases, the learning rate corresponding to the power sales data integrated prediction model is appropriately increased, otherwise no processing is performed to obtain the prediction model adaptively updated learning rate.
9. A training system for a power sales data prediction model, characterized in that: Used to execute the training method for the electricity sales data prediction model according to claim 1, the training system for the electricity sales data prediction model comprises: The electricity sales data time series fluctuation division module is used to obtain the original electricity sales time series data, and perform a time series change analysis of the electricity sales fluctuation on the original electricity sales time series data to obtain the first time series data of the electricity sales fluctuation amplitude; perform time series fluctuation division on the first time series data of the electricity sales fluctuation amplitude to obtain the long-term time series data of the electricity sales fluctuation change and the short-term time series data of the electricity sales fluctuation change; The long-term and short-term fluctuation dependency contribution analysis module is used to capture the power sales fluctuation dependency contribution characteristic values corresponding to the long-term time series data of power sales fluctuation changes and the short-term time series data of power sales fluctuation changes respectively through the long-term and short-term memory networks, so as to obtain the long-term dependency contribution characteristic values corresponding to the long-term time series data of power sales and the short-term dependency contribution characteristic values corresponding to the short-term time series data of power sales; the long-term dependency contribution characteristic values corresponding to the long-term time series data of power sales and the short-term dependency contribution characteristic values corresponding to the short-term time series data of power sales are added to the corresponding time series positions in each time series data, so as to obtain the second time series data of power sales fluctuation amplitude and the third time series data of power sales fluctuation amplitude; The integrated power sales prediction model training module is used to perform integrated learning fusion modeling processing on the second time series data of the power sales fluctuation amplitude and the third time series data of the power sales fluctuation amplitude to construct an integrated power sales data prediction model; perform quantitative calculation of the training error of the integrated learning training process corresponding to the integrated power sales data prediction model to obtain the training error of the power sales data prediction model; based on the training error of the power sales data prediction model, the learning rate corresponding to the integrated power sales data prediction model is adaptively adjusted and updated to obtain the adaptive update learning rate of the prediction model; The power sales prediction model incremental learning and updating module is used to perform model incremental learning and updating processing on the power sales data integrated prediction model based on the prediction model adaptive update learning rate to obtain the power sales data updated optimized prediction model.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the training method for the electricity sales data prediction model as described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Thermal power plant data analysis and diagnosis method
CN120804986A