Electric power material demand prediction method, system, equipment and medium

The power material demand forecast model constructed through the TensorFlow deep learning framework solves the problem of low accuracy of power material demand forecasting in traditional methods, achieves higher accuracy prediction, and supports refined management of power enterprises.

CN120409766APending Publication Date: 2025-08-01INSPUR ARTIFICIAL INTELLIGENCE RES INST CO LTD SHANDONG CHINA
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510434276.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The traditional power material demand prediction method is based on simple statistical models or linear regression, and it is difficult to capture the complexity and nonlinear characteristics of power material demand, resulting in low prediction accuracy and cannot meet the refined management needs of power companies.

Method used

The TensorFlow deep learning framework is adopted, combining convolutional networks, recurrent networks and LSTM networks, regularization terms and batch normalization structures are introduced, deep learning models are built, power material demand data are cleaned, feature extraction and preprocessed, and training, verification and test sets are divided for model training and optimization.

Benefits of technology

It improves the accuracy and reliability of power material demand forecasting, provides a data basis for power enterprises' material procurement and inventory management, and improves prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409766A_ABST
    Figure CN120409766A_ABST
Patent Text Reader

Abstract

The invention provides an electric power material demand prediction method, system and device and a medium, and belongs to the technical field of electric power material regulation, and the method comprises the steps: collecting historical electric power material demand data and influence factor data, and carrying out the preprocessing of cleaning, transformation and feature extraction; building a deep learning model based on a TensorFlow deep learning framework; performing training, model parameter adjustment and performance evaluation on the deep learning model by using the preprocessed historical data to obtain a final prediction model; and collecting real-time electric power material demand data and influence factor data, pre-processing the data, and inputting the data into the final prediction model for electric power material demand prediction. According to the method, the deep learning model is constructed through the TensorFlow deep learning framework, prediction of the electric power material demand data is realized in combination with the processed historical electric power material demand data, and the prediction precision is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power material regulation and control, and particularly relates to a power material demand prediction method, system, device and medium. Background Art

[0002] TensorFlow is an open-source deep learning framework under the Google architecture, which is applied to various machine learning and deep learning tasks, including fields such as image recognition, natural language processing, recommendation systems, and time series prediction.

[0003] Power material demand prediction is an important link in the operation and management of power systems, which is directly related to multiple key aspects such as material procurement, inventory management, and operation cost control of power enterprises. However, most traditional prediction methods are based on simple statistical models or linear regression models, and these methods have significant limitations and are difficult to accurately capture the complexity and non-linear characteristics of power material demand. The demand for power materials is affected by a variety of factors, such as seasonal demand changes, periodic fluctuations, economic conditions, meteorological conditions, equipment status, and spatial distribution differences. The complex relationships and non-linear associations among these factors result in low prediction accuracy of traditional methods and cannot meet the increasing refined management requirements of power enterprises.

[0004] Although TensorFlow provides rich network layers and model components that can be applied to time series prediction, there are difficulties in data processing, model construction, training optimization, and evaluation and deployment when using TensorFlow for power material demand prediction at present, and the prediction effect is not ideal. Summary of the Invention

[0005] In a first aspect, an embodiment of the present application provides a power material demand prediction method, including the following steps: S1. Collect historical power material demand data and corresponding influencing factor data, and perform preprocessing of cleaning, transformation, and feature extraction on the collected historical data; S2. Select a convolutional network, a recurrent network, and an LSTM network based on the TensorFlow deep learning framework, introduce a regularization term and a batch normalization structure to build a deep learning model, define the layers of the deep learning model, and then compile the defined deep learning model; S3. Divide the collected historical data after preprocessing into a training set, a validation set, and a test set, use the training set to train the deep learning model, use the validation set to adjust the parameters of the deep learning model, and then use the test set to evaluate the performance of the deep learning model to obtain a final prediction model; S4. Collect real-time power material demand data and corresponding influencing factor data, preprocess the collected real-time data through cleaning, normalization, and feature extraction, and then input it into the final prediction model for power material demand prediction.

[0006] Further, the specific steps of step S1 are as follows: S11. Determine the target power materials for which demand prediction is to be carried out; S12. Determine the target influencing factors affecting the demand for the target power materials; S13. Determine the collection method according to the type of target power materials, and collect the historical demand data and target influencing factor data of the target power materials within the set time period as historical data according to the determined collection method; S14. Conduct consistency checks on the collected historical data, handle invalid values and missing values, identify outliers and correct them to complete data cleaning; S15. Conduct standardization, normalization, and discretization processing on the historical data after cleaning to complete data transformation, and then conduct data reduction filtering; S16. Calculate the correlation between each type of data in the historical data after filtering and the demand for the target power materials, and select the data types related to time features, spatial features, economic features, and meteorological features with a correlation higher than the threshold to complete feature selection.

[0007] Further, the specific steps of step S2 are as follows: S21. Based on the TensorFlow deep learning framework, select to use a recurrent network as the input layer of the deep learning model, use several recurrent networks and LSTM networks as the hidden layers, set fully connected layers between the networks in the hidden layer for feature fusion and dimensionality reduction processing, introduce a regularization term and a batch normalization structure, and then use a linear regression structure or a classification structure as the output layer to complete the construction of the deep learning model network architecture; S22. Take the input layer of the deep learning model as the first layer and determine that the input layer is the interface for data input; S23. Set the hidden layer of the deep learning model between the input layer and the output layer, determine the types and quantities of each sub-layer in the hidden layer according to the type of target power materials, and set the positions and connection relationships of each sub-layer in the hidden layer; S24. Set the output layer of the deep learning model as the last layer, determine the number of neurons and the type of output values of the output layer according to the type of target power materials, and determine the activation function of the output layer; S25. Determine the weight parameters of the deep learning model and the model parameters for training to complete the compilation of the deep learning model; the model parameters include an optimizer, a loss function, and an evaluation metric; S26. Randomly initialize the model parameters of the deep learning model using the random initializer of the TensorFlow deep learning framework.

[0008] Furthermore, the specific steps of step S22 are as follows: S221. Set a gated recurrent unit (GRU) or long short-term memory (LSTM) unit to construct a recurrent network for the input layer; S222. Set the input layer as an interface for inputting historical data of power material requirements that have completed feature selection; The specific steps of step S23 are as follows: S231. Connect each recurrent network in the hidden layer to the LSTM network using a fully connected layer as required; the hidden layer includes a convolutional layer, a pooling layer, and a recurrent layer; S232. Set each fully connected layer to take the output of the previous network as input and perform a non-linear transformation through an activation function; The specific steps of step S24 are as follows: S241. Obtain the output value type of the target power material; When it is the data volume output type, go to step S242; When it is the category output type, go to step S244; S242. Set the output value of the predicted power material demand as the output layer of the deep learning model, and set the output layer to use one neuron to output a continuous value; S243. Determine that the output layer uses a linear activation function and go to step S25; S244. Set the predicted power material demand type as the output layer of the deep learning model, and determine the number of neurons in the output layer according to the predicted power material demand type; S245. Select an activation function according to the number of predicted power material demand types.

[0009] Furthermore, the specific steps of step S3 are as follows: S31. Divide the historical data that has completed feature selection into several batches according to the time series, and each batch includes an equal number of data samples; S32. Divide the dataset of each target power material into a training set, a validation set, and a test set; S33. Input the training set into the deep learning model batch by batch to obtain the predicted demand value of the target power material, and use a loss function to calculate the error between the actual demand value and the predicted demand value of the target power material in the training set; S34. During the training process, the backpropagation algorithm is used to calculate the gradient of the loss function with respect to the weight parameters, and the optimizer is used to update the weight parameters according to the gradient. The L2 regularization method is used to limit the weight parameters of the deep learning model. The batch normalization structure is used to normalize each batch of data samples in the training set. The dropout method is used to randomly discard neurons, and the learning rate decay is used to reduce the learning rate. The validation set is used to adjust the weight parameters of the deep learning model; S35. After the training is completed, the test set is used to evaluate the performance of the deep learning model using evaluation metrics, and the network architecture, parameter initialization method, or training method of the deep learning model is adjusted according to the evaluation results until the performance of the deep learning model meets the requirements, and the final prediction model is obtained.

[0010] Further, the specific steps of step S32 are as follows: S311. Screen the historical data of each power supply station according to the material type, and arrange the historical data of each target power material after screening in time series; S312. Determine the time window T of the input data according to the actual business requirements of the power grid; S313. Divide the arranged historical data according to the time window T. Among them, the first T - 1 data in each data sample are used as the input data of the target power material demand, and the Tth data is used as the actual demand value of the target power material; S314. Summarize the target power materials of the same material type in each power supply station to obtain the data set of each target power material.

[0011] Further, the specific steps of step S4 are as follows: S41. Collect the real-time demand data of the target power material and the target influencing factor data as real-time data according to the collection method of step S1; S42. Clean, transform, and select features for the collected real-time data according to the method of step S1; S43. Input the real-time data after feature selection into the final prediction model to obtain the demand prediction result of the target power material; S44. Interpret the results of the feature importance analysis and sensitivity analysis of the demand prediction result of the target power material, perform format conversion according to the actual requirements, and check using the actual requirements and data constraints, and display in the preset format.

[0012] In the second aspect, the embodiment of the present application further provides a power material demand prediction system, including: A data acquisition and processing module, which is used to acquire historical power material demand data and corresponding influencing factor data, and perform preprocessing such as cleaning, transformation, and feature extraction on the acquired historical data; A model construction module, which is used to select a convolutional network, a recurrent network, and an LSTM network based on the TensorFlow deep learning framework, introduce a regularization term and a batch normalization structure to construct a deep learning model, define the layers of the deep learning model, and then compile the defined deep learning model; A model training module, which is used to divide the acquired historical data after preprocessing into a training set, a validation set, and a test set, use the training set to train the deep learning model, use the validation set to adjust the parameters of the deep learning model, and then use the test set to evaluate the performance of the deep learning model to obtain a final prediction model; A power material demand prediction module, which is used to acquire real-time power material demand data and corresponding influencing factor data, perform preprocessing such as cleaning, normalization, and feature extraction on the acquired real-time data, and then input it into the final prediction model for predicting power materials in demand.

[0013] Thirdly, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the power material demand prediction method as described in the first aspect are implemented.

[0014] Fourthly, an embodiment of the present application further provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the power material demand prediction method as described in the first aspect are implemented.

[0015] From the above technical solutions, it can be seen that the present invention has the following advantages: In the power material demand prediction method, system, device, and medium provided by the present application, by acquiring historical power material demand data and its influencing factors, and using the TensorFlow deep learning framework to construct a deep learning model for training and optimization, the non-linear characteristics of power material demand can be captured, the accuracy of power material demand prediction can be improved, and a data basis can be provided for the material procurement and inventory management of power enterprises. Description of the Drawings

[0016] In order to more clearly illustrate the technical solutions of the present invention, the drawings required to be used in the description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1It is a schematic flowchart of the power material demand forecasting method of the present invention.

[0018] Figure 2 It is a schematic diagram of the power material demand forecasting system of the present invention. Detailed implementation manners

[0019] In the following detailed description of the specific steps of the power material demand forecasting method, various embodiments of the present disclosure will be more comprehensively described. The present disclosure may have various embodiments and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but the present disclosure should be understood to cover all adjustments, equivalents and / or alternative solutions falling within the spirit and scope of the various embodiments of the present disclosure.

[0020] Exemplarily speaking, power material demand forecasting is a crucial link in the operation and management of the power system and is the basis for the material procurement planning, inventory strategy formulation and operation cost control of power enterprises. However, the previous forecasting means mainly relied on basic statistical models or linear regression models, and these traditional methods have obvious limitations and are difficult to comprehensively capture the complexity and non-linear dynamics implicit in power material demand. In fact, power material demand is comprehensively affected by a multi-dimensional factor network, including seasonal demand fluctuations, periodic changes, macroeconomic conditions, weather conditions, equipment health status, and geographical distribution differences, etc. The complex interactions and potential non-linear relationships among these influencing factors lead to extremely low accuracy of traditional forecasting methods and are difficult to meet the increasing demand of power enterprises for the refinement degree of management.

[0021] Although TensorFlow, as a powerful deep learning framework, provides diverse network layers and model components and is applicable to time series forecasting tasks, in the practical process of applying TensorFlow to power material demand forecasting, there are still problems such as cumbersome data processing, complex model architecture design, great difficulty in optimizing the training process, and numerous challenges in forecasting model evaluation and deployment. These factors jointly restrict the improvement of forecasting performance and make the current forecasting effect not yet reach the ideal state.

[0022] In view of the above problems, this embodiment provides a power material demand forecasting method. By collecting historical power material demand data and its influencing factors and using a deep learning model for training and optimization, it can capture the non-linear characteristics of power material demand, improve the accuracy and reliability of power material demand forecasting, and provide a data basis for power enterprises to optimize material procurement and inventory management.

[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0024] Please refer to Figure 1 The figure shows a flowchart of a method for predicting the demand for electric power materials in a specific embodiment. The method includes the following steps: S1. Collect historical electric power material demand data and corresponding influencing factor data, and perform preprocessing of cleaning, transformation, and feature extraction on the collected historical data; It should be noted that collecting historical electric power material demand data and influencing factor data provides a data basis for demand data prediction. By performing preprocessing of cleaning, transformation, and feature extraction on the collected data, noise and anomalies in the data can be removed. Through feature extraction, key features that have a greater impact on the demand for electric power materials can be screened out, providing a data basis for the training of the deep learning model and ensuring the prediction accuracy of the model; S2. Select a convolutional network, a recurrent network, and an LSTM network based on the TensorFlow deep learning framework, introduce a regularization term and a batch normalization structure to build a deep learning model, define the layers of the deep learning model, and then compile the defined deep learning model; It should be noted that selecting the network structures of a convolutional network, a recurrent network, and an LSTM network based on the TensorFlow deep learning framework and introducing a regularization term and batch normalization make full use of the characteristics of deep learning to handle the complex non-linear relationships of the demand for electric power materials. This can not only improve the learning ability of the deep learning model, but also prevent overfitting, and can capture features and patterns in the data; defining and compiling the layers of the deep learning model to adapt to the prediction of the demand for electric power materials provides a model basis for the training and optimization of the model; S3. Divide the collected historical data after preprocessing into a training set, a validation set, and a test set. Use the training set to train the deep learning model, use the validation set to adjust the parameters of the deep learning model, and then use the test set to evaluate the performance of the deep learning model to obtain the final prediction model; It should be noted that dividing the data into a training set, a validation set, and a test set, using the training set to train the model, the validation set to adjust the parameters, and the test set to evaluate the performance ensures the integrity of the model training process, and can determine the optimal model parameters and structure, improving the prediction accuracy of the model; S4. Collect real-time power material demand data and corresponding influencing factor data. After preprocessing the collected real-time data, including cleaning, normalization, and feature extraction, input it into the final prediction model for predicting the required power materials. It should be noted that preprocessing the real-time data in a similar way to the dataset and inputting it into the final prediction model can ensure the accuracy of real-time prediction, enabling the deep learning model to meet the actual scenarios of power material demand prediction and assisting power enterprises in optimizing material allocation and management.

[0025] This embodiment solves the limitations of traditional prediction methods in the face of power material demand through the TensorFlow deep learning framework. Through data preprocessing, the construction and training optimization of the deep learning model, and the prediction application of real-time data, it can more accurately predict power material demand, providing a basis for power enterprises' material procurement, inventory management, and operation cost control, and improving the prediction accuracy.

[0026] Furthermore, as a refinement and extension of the specific implementation manner of the above embodiment, to fully illustrate the specific implementation process in this embodiment, another power material demand prediction method is provided. This method includes the following steps: S1. Collect historical power material demand data and corresponding influencing factor data, and preprocess the collected historical data, including cleaning, transformation, and feature extraction. The specific steps of step S1 are as follows: S11. Determine the target power materials for which demand prediction is to be carried out. Exemplarily, the target power materials can be transformer-related materials, such as transformer oil and insulating materials, or cable-related materials, such as cables and cable trays. S12. Determine the target influencing factors that affect the demand for the target power materials. Exemplarily, the target influencing factors for transformer-related materials include time factors, meteorological factors, economic factors, equipment status factors, and power load factors; the target influencing factors for cable-related materials include time factors, spatial factors, economic factors, and meteorological factors. S13. Determine the collection method according to the type of target power materials, and collect the historical demand data and target influencing factor data of the target power materials in the set time period as historical data according to the determined collection method. It should be noted that after determining the data source, corresponding data collection methods are adopted to collect historical data. The data collection methods include data docking with existing systems, external data scraping, and manual collection. Specifically, data docking with existing systems is achieved by docking data interfaces with the power grid operation management system and the material management system to perform automatic data synchronization and real-time update; external data scraping is to scrape relevant web data through web crawlers and perform cleaning and sorting; for data that cannot be obtained through automated means, such as industry data and market research data, manual collection methods are required. S14. Conduct consistency checks on the collected historical data, handle invalid values and missing values, identify outliers and correct them to complete data cleaning. Exemplarily, taking the recorded data of a certain power supply station as an example, calculate its mean and standard deviation , and calculate the degree to which each sample deviates from the mean . The magnitude of Z reflects the relative distance between the data point and the average value. The larger the absolute value, the farther the data point is from the average value, and the greater the possibility of being an outlier; for example, if the of the sample, then this data is considered an outlier, and the outlier is corrected through the following formula:

[0027] Finally, the outlier is corrected to the average consumption of the first 12 months of this sample. If the outlier sample itself is among the first 12 data of the sample, it is corrected to the average consumption of the first 12 months. S15. Perform standardization, normalization, and discretization processing on the historical data that has completed cleaning to complete data transformation, and then perform data reduction and filtering. Exemplarily, scale the data proportionally so that it falls within a specific range, convert the data to the range of 0 to 1, and convert continuous data into discrete categories. The method of data normalization is:

[0028] where x represents the recorded data of a certain month, and represent the minimum and maximum values of the recorded data of each power supply station respectively, represents the recorded data of this month after normalization; It should be noted that during data reduction and filtering, methods such as numerical reduction or attribute reduction are used to reduce the quantity and complexity of the data and improve the training efficiency of the prediction model; S16. Calculate the correlation between each type of data in the historical data after filtering and the target power material demand, select the data types related to time features, spatial features, economic features, and meteorological features with a correlation higher than the threshold, and complete feature selection; It should be noted that feature selection is to select features with high correlation with the target power material demand from the original features to improve the prediction effect of the model; time features include features with obvious time periodicity such as year, month, quarter, week number, and holidays, such as seasonality and periodic fluctuations; spatial features include demand locations, power supply areas, terrain and landforms. By introducing spatial features, the differences in power material demands between different regions and different power supply areas can be more accurately reflected; economic features include electricity prices, industrial added value, etc. Economic features will affect the operation status of power enterprises and power material demands; meteorological features include temperature, humidity, rainfall, wind speed, etc. By introducing meteorological features, the impact of climate change on power material demands can be more accurately reflected; The correlation can be calculated through the following Pearson correlation coefficient:

[0029] Among them, X represents a certain type of data feature, Y represents the target power material demand, n represents the number of samples, represents the i-th sample value of variable X, represents the i-th sample value of variable Y, represents the sample mean of X, Y represents the sample mean of Y, r represents the Pearson correlation coefficient, and for the linear correlation degree between this type of data feature and the target power material demand, the value range can be limited to , r taking -1 indicates a perfect negative correlation, r taking 1 indicates a perfect positive correlation, and r taking 0 indicates no linear correlation; S2. Based on the TensorFlow deep learning framework, select a convolutional network, a recurrent network, and an LSTM network, and introduce a regularization term and a batch normalization structure to build a deep learning model. Define the layers of the deep learning model, and then compile the defined deep learning model. The specific steps of step S2 are as follows: S21. Based on the TensorFlow deep learning framework, select a recurrent network as the input layer of the deep learning model, use several recurrent networks and LSTM networks as hidden layers, set fully connected layers between the networks in the hidden layer for feature fusion and dimensionality reduction processing, introduce a regularization term and a batch normalization structure, and then use a linear regression structure or a classification structure as the output layer to complete the construction of the deep learning model network architecture; S22. Take the input layer of the deep learning model as the first layer and determine that the input layer is the interface for data input; It should be noted that the specific structure of the input layer is determined according to the type and dimension of the input data. For example, for image data, the input layer receives a pixel matrix; for text data, the input layer receives a sequence of word vectors; for time series data, the input layer receives a series of data points at time steps; S23. Set the hidden layer of the deep learning model between the input layer and the output layer. Determine the types and quantities of each sub-layer in the hidden layer according to the target power material type, and set the positions and connection relationships of each sub-layer in the hidden layer; It should be noted that the hidden layer is the layer that learns and extracts features from the data. There may be multiple hidden layers, and each hidden layer includes multiple sub-layers; the sub-layers included in the hidden layer include fully connected layers, convolutional layers, pooling layers, and recurrent layers; the convolutional layer in the hidden layer can process image data, slide the convolutional kernel on the input data and perform convolutional operations to extract local features of the image. The parameters in the convolutional layer include the size, quantity, and stride of the convolutional kernel, etc.; the pooling layer reduces the data dimension and computational complexity; the recurrent layer processes sequence data, such as text or time series, can remember previous information, and use this information to predict the current input; The number of hidden layers, the types of sub-layers, and the parameters of each sub-layer need to be appropriately selected. Too many layers or parameters will lead to overfitting, while too few layers or parameters may lead to underfitting; S24. Set the output layer of the deep learning model as the last layer. Determine the number of neurons, the type of output value, and the activation function of the output layer according to the target power material type; It should be noted that the structure and type of the output layer are determined according to the target to be predicted. For example, for a regression problem, the output layer may have only neurons and output a continuous value. For a classification problem, the output layer will include multiple neurons, each neuron corresponding to a category and outputting a probability distribution; Exemplarily, for a regression problem, the activation function includes a linear activation function. For a classification problem, the activation function includes the sigmoid function for binary classification or the softmax function for multi-classification; S25. Determine the weight parameters of the deep learning model and the model parameters for training, and complete the compilation of the deep learning model; the model parameters include an optimizer, a loss function, and evaluation metrics; It should be noted that the optimizer can use the gradient descent optimizer, momentum optimizer, RMSprop optimizer or Adam optimizer; the loss function quantifies the difference between the prediction result of the model and the true value. Specifically, in the prediction of power material demand, the mean square error MSE can be used as the loss function to calculate the average value of the scores of the differences between the predicted value and the true value. The mean absolute error MAE can also be used as the loss function to calculate the average value of the absolute values of the differences between the predicted value and the true value; the prediction of power material demand is not necessarily a regression problem. In some cases, the demand prediction needs to be converted into a classification problem. For example, if it is predicted whether a certain type of power material will exceed a certain threshold, the evaluation metrics can adopt accuracy, recall rate or F1 score in the regression problem, and root mean square error RMSE and coefficient of determination in the classification problem; S26. Randomly initialize the model parameters of the deep learning model using the random initializer of the TensorFlow deep learning framework; It should be noted that random initialization randomly initializes the parameters of the deep learning model to random values within a certain range. This method can break the symmetry of the model parameters and make it easier for the deep learning model to learn data features during training; Exemplarily, the TensorFlow deep learning framework provides a random normal distribution initializer and a random uniform distribution initializer to generate the initial parameter values; S3. Divide the collected historical data that has completed preprocessing into a training set, a validation set and a test set. Use the training set to train the deep learning model, use the validation set to adjust the parameters of the deep learning model, and then use the test set to evaluate the performance of the deep learning model to obtain the final prediction model. The specific steps of step S3 are as follows: S31. Divide the historical data that has completed feature selection into several batches according to the time series, and each batch includes an equal number of data samples; S32. Divide the dataset of each target power material into a training set, a validation set and a test set; S33. Input the training set into the deep learning model batch by batch to obtain the predicted demand value of the target power material, and use the loss function to calculate the error between the actual demand value and the predicted demand value of the target power material in the training set; S34. During training, use the backpropagation algorithm to calculate the gradient of the loss function with respect to the weight parameters, and use the optimizer to update the weight parameters according to the gradient. Use the L2 regularization method to limit the weight parameters of the deep learning model. Use the batch normalization structure to normalize each batch of data samples in the training set. Use the dropout method to randomly discard neurons, and use learning rate decay to reduce the learning rate. Use the validation set to adjust the weight parameters of the deep learning model; Exemplarily, the normalization processing of each batch of data samples in the training set using the batch normalization structure is achieved as follows: For each batch of data samples , first calculate the mean of a batch and variance

[0030] Then perform batch normalization using the following formula:

[0031] where is a very small number to ensure that the divisor is not zero; S35. After the training is completed, use the test set to evaluate the performance of the deep learning model using evaluation metrics, and adjust the network architecture, parameter initialization method, or training method of the deep learning model according to the evaluation results until the performance of the deep learning model meets the requirements to obtain the final prediction model; S4. Collect real-time power material demand data and corresponding influencing factor data, perform preprocessing such as cleaning, normalization, and feature extraction on the collected real-time data, and then input it into the final prediction model for demand power material prediction; The specific steps of step S4 are as follows: S41. Collect the real-time demand data of the target power material and the target influencing factor data as real-time data according to the collection method in step S1; S42. Perform data cleaning, data transformation, and feature selection on the collected real-time data according to the method in step S1; S43. Input the real-time data after feature selection into the final prediction model to obtain the demand prediction result of the target power material; S44. Interpret the results of feature importance analysis and sensitivity analysis of the demand prediction result of the target power material, perform format conversion according to actual needs, check using actual needs and data constraints, and display in a preset format.

[0032] In an embodiment of the present invention, based on step S22, step S23, and step S24, a possible embodiment will be given below to non-restrictively elaborate on its specific implementation scheme.

[0033] The specific steps of step S22 are as follows: S221. Set a gated recurrent unit GRU or LSTM unit to construct a recurrent network for the input layer; S222. Set the input layer as an interface for inputting the historical data of the power material demand after feature selection is completed; The specific steps of step S23 are as follows: S231. Connect each recurrent network in the hidden layer and the LSTM network using a fully connected layer as required; the hidden layer includes a convolutional layer, a pooling layer, and a recurrent layer; S232. Set each fully connected layer to take the output of the previous network as input and perform a non-linear transformation through an activation function; The specific steps of step S24 are as follows: S241. Obtain the output value type of the target power material; When it is the data volume output type, go to step S242; When it is the category output type, go to step S244; S242. Set the output value of the output power material demand prediction value as the output layer of the deep learning model, and set the output layer to use one neuron to output a continuous value; S243. Determine that the output layer uses a linear activation function and go to step S25; S244. Set the output power material demand prediction type as the output layer of the deep learning model, and determine the number of output layer neurons according to the power material demand prediction type; S245. Select an activation function according to the number of power material demand prediction types.

[0034] In an embodiment of the present invention, based on step S32, a possible embodiment will be given below to non-limitingly elaborate on its specific implementation scheme.

[0035] The specific steps of step S32 are as follows: S311. Screen the historical data of each power supply station according to the material type, and arrange the historical data of the selected target power materials in time series; S312. Determine the time window T of the input data according to the actual business requirements of the power grid; S313. Divide the arranged historical data into data samples according to the time window T, where the first T - 1 data in each data sample are used as the input data of the target power material demand, and the Tth data is used as the actual demand value of the target power material; S314. Aggregate the target power materials of the same material type in each power supply station to obtain a data set of each target power material.

[0036] It should be understood that the magnitudes of the sequence numbers of the above steps in the embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0037] Such as Figure 2As shown below, this is an embodiment of the power material demand prediction system provided by the present disclosure. This system and the power material demand prediction methods of the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the power material demand prediction system, reference can be made to the embodiments of the above power material demand prediction methods.

[0038] The system includes: A data acquisition and processing module, configured to acquire historical power material demand data and corresponding influencing factor data, and perform preprocessing such as cleaning, transformation, and feature extraction on the acquired historical data; A model building module, configured to select a convolutional network, a recurrent network, and an LSTM network based on the TensorFlow deep learning framework, introduce a regularization term and a batch normalization structure to build a deep learning model, define the layers of the deep learning model, and then compile the defined deep learning model; A model training module, configured to divide the acquired historical data after preprocessing into a training set, a validation set, and a test set, use the training set to train the deep learning model, use the validation set to adjust the parameters of the deep learning model, and then use the test set to evaluate the performance of the deep learning model to obtain a final prediction model; A power material demand prediction module, configured to acquire real-time power material demand data and corresponding influencing factor data, perform preprocessing such as cleaning, normalization, and feature extraction on the acquired real-time data, and then input it into the final prediction model for predicting power materials in demand.

[0039] This embodiment realizes the prediction of power material demand by integrating the data acquisition and processing, model building, model training, and power material demand prediction modules, improving the efficiency of the prediction process.

[0040] The power material demand prediction method provided by the embodiments of the present application can be applied to electronic devices. Those skilled in the art can understand that the structure of the electronic device involved in the embodiments of the present invention does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. In the embodiments of the present invention, the electronic device includes, but is not limited to, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described herein and / or claimed.

[0041] The electronic device may include a processor, an external memory interface, an internal memory, a Universal Serial Bus (USB) interface, a charging management module, a power management module, a battery, a wireless communication module, an audio module, a speaker, a microphone, a sensor module, keys, a camera, a display screen, and a Subscriber Identity Module (SIM) card interface, etc.

[0042] It can be understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0043] The processor may include one or more processing units. For example, the processor may include a Central Processing Unit (CPU), etc., an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and / or a Neural-Network Processing Unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0044] Among them, the processor may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0045] A memory may also be provided in the processor for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory may save the instructions or data that the processor has just used or recycled. If the processor needs to use the instruction or data again, it can directly call it from this memory. This avoids repeated accesses, reduces the waiting time of the processor, and thus improves the system efficiency.

[0046] The above electronic device implements the technical solution of the power material demand prediction method of the present application, which collects historical power material demand data and corresponding influencing factor data, and performs preprocessing of cleaning, transformation and feature extraction on the collected historical data; selects a convolutional network, a recurrent network and an LSTM network based on the TensorFlow deep learning framework, and introduces a regularization term and a batch normalization structure to build a deep learning model, defines the layers of the deep learning model, and then compiles the defined deep learning model; divides the collected historical data after preprocessing into a training set, a validation set and a test set, uses the training set to train the deep learning model, uses the validation set to adjust the parameters of the deep learning model, and then uses the test set to evaluate the performance of the deep learning model to obtain the final prediction model; collects real-time power material demand data and corresponding influencing factor data, performs preprocessing of cleaning, normalization and feature extraction on the collected real-time data, and inputs it into the final prediction model for predicting the required power materials. This achieves the beneficial effect of being able to capture the non-linear characteristics of power material demand, improve the accuracy and reliability of power material demand prediction, and provide a data basis for power enterprises to optimize material procurement and inventory management.

[0047] In the storage medium provided by the present application, there is a program product capable of implementing the power material demand prediction method.

[0048] The power material demand prediction method includes: collecting historical power material demand data and corresponding influencing factor data, and performing preprocessing of cleaning, transformation and feature extraction on the collected historical data; selecting a convolutional network, a recurrent network and an LSTM network based on the TensorFlow deep learning framework, and introducing a regularization term and a batch normalization structure to build a deep learning model, defining the layers of the deep learning model, and then compiling the defined deep learning model; dividing the collected historical data after preprocessing into a training set, a validation set and a test set, using the training set to train the deep learning model, using the validation set to adjust the parameters of the deep learning model, and then using the test set to evaluate the performance of the deep learning model to obtain the final prediction model; collecting real-time power material demand data and corresponding influencing factor data, performing preprocessing of cleaning, normalization and feature extraction on the collected real-time data, and inputting it into the final prediction model for predicting the required power materials.

[0049] In some possible implementation manners, the power material demand prediction method of the present disclosure may be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.

[0050] The storage medium of the present disclosure may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0051] The above description of the disclosed embodiments enables those skilled in the art to implement or use 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 rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for predicting the demand of electric power materials, characterized in that It includes the following steps: S1. Collect historical power material demand data and corresponding influencing factor data, and perform preprocessing of cleaning, transformation, and feature extraction on the collected historical data; S2. Based on the TensorFlow deep learning framework, select a convolutional network, a recurrent network, and an LSTM network, introduce a regularization term and a batch normalization structure to build a deep learning model, define the layers of the deep learning model, and then compile the defined deep learning model; S3. Divide the preprocessed collected historical data into a training set, a validation set, and a test set, use the training set to train the deep learning model, use the validation set to adjust the parameters of the deep learning model, and then use the test set to evaluate the performance of the deep learning model to obtain the final prediction model; S4. Collect real-time power material demand data and corresponding influencing factor data, perform preprocessing of cleaning, normalization, and feature extraction on the collected real-time data, and then input it into the final prediction model for predicting the required power materials.

2. The power material demand forecasting method according to claim 1, wherein The specific steps of step S1 are as follows: S11. Determine the target power materials for which demand prediction is to be carried out; S12. Determine the target influencing factors that affect the demand for the target power materials; S13. Determine the collection method according to the type of target power materials, and collect the historical demand data and target influencing factor data of the target power materials in the set time period as historical data according to the determined collection method; S14. Conduct a consistency check on the collected historical data, perform processing on invalid values and missing values, identify outliers and correct them to complete data cleaning; 3. The power material demand forecasting method according to claim 2, wherein S15. Perform standardization, normalization, and discretization processing on the cleaned historical data to complete data transformation, and then perform data reduction filtering; S16. Calculate the correlation between each type of data in the filtered historical data and the demand for the target power materials, select the data types related to time features, spatial features, economic features, and meteorological features with a correlation higher than the threshold to complete feature selection. The specific steps of step S2 are as follows: S21. Based on the TensorFlow deep learning framework, select a recurrent network as the input layer of the deep learning model, use several recurrent networks and LSTM networks as hidden layers, set a fully connected layer between each network in the hidden layer for feature fusion and dimensionality reduction processing, introduce a regularization term and a batch normalization structure, and then use a linear regression structure or a classification structure as the output layer to complete the construction of the deep learning model network architecture; S22. Take the input layer of the deep learning model as the first layer and determine that the input layer is the interface for data input; S23. Set the hidden layer of the deep learning model between the input layer and the output layer, determine the types and quantities of each sub-layer in the hidden layer according to the type of target power materials, and set the positions and connection relationships of each sub-layer in the hidden layer; S24. Set the output layer of the deep learning model as the last layer, determine the number of neurons and the type of output value of the output layer according to the type of target power materials, and determine the activation function of the output layer; S25. Determine the weight parameters of the deep learning model and the model parameters for training, and complete the compilation of the deep learning model; the model parameters include an optimizer, a loss function, and an evaluation metric; S26. Randomly initialize the model parameters of the deep learning model using the random initializer of the TensorFlow deep learning framework.

4. The power material demand forecasting method according to claim 3, wherein The specific steps of step S22 are as follows: S221. Set a gated recurrent unit GRU or an LSTM unit to construct a recurrent network for the input layer; S222. Set the input layer as an interface for inputting historical data of power material requirements that have completed feature selection; The specific steps of step S23 are as follows: S231. Connect each recurrent network in the hidden layer and the LSTM network using fully connected layers as required; the hidden layer includes a convolutional layer, a pooling layer, and a recurrent layer; S232. Set each fully connected layer to take the output of the previous network as input and perform a non-linear transformation through an activation function; The specific steps of step S24 are as follows: S241. Obtain the output value type of the target power material; When it is the data volume output type, go to step S242; When it is the category output type, go to step S244; S242. Set the output value of the predicted power material demand as the output layer of the deep learning model, and set the output layer to use one neuron to output a continuous value; S243. Determine that the output layer uses a linear activation function, and go to step S25; S244. Set the predicted power material demand type as the output layer of the deep learning model, and determine the number of neurons in the output layer according to the predicted power material demand type; S245. Select an activation function according to the number of predicted power material demand types.

5. The power material demand forecasting method according to claim 3, wherein The specific steps of step S3 are as follows: S31. Divide the historical data that has completed feature selection into several batches according to the time series, and each batch includes an equal number of data samples; S32. Divide the data sets of each target power material into a training set, a validation set, and a test set; S33. Input the training set into the deep learning model batch by batch to obtain the predicted demand value of the target power material, and use the loss function to calculate the error between the actual demand value of the target power material and the predicted demand value of the target power material in the training set; S34. During the training process, use the backpropagation algorithm to calculate the gradient of the loss function with respect to the weight parameters, and use the optimizer to update the weight parameters according to the gradient, use the L2 regularization method to limit the weight parameters of the deep learning model, use the batch normalization structure to normalize each batch of data samples in the training set, use the dropout method to randomly discard neurons, and use learning rate decay to reduce the learning rate, and use the validation set to adjust the weight parameters of the deep learning model; S35. After the training is completed, use the test set to evaluate the performance of the deep learning model using the evaluation metric, and adjust the network architecture, parameter initialization method, or training method of the deep learning model according to the evaluation results until the performance of the deep learning model meets the requirements to obtain the final prediction model.

6. The power material demand forecasting method according to claim 5, characterized in that The specific steps of step S32 are as follows: S311. Screen the historical data of each power supply station according to the material type, and arrange the historical data of each target power material obtained by screening in time series; S312. Determine the time window T of the input data according to the actual business requirements of the power grid; S313. Divide the arranged historical data according to the time window T to form data samples. Among them, the first T - 1 data in each data sample are used as the input data for the target power material demand, and the T-th data is used as the actual demand value of the target power material; S314. Aggregate the target power materials of the same material type in each power supply station to obtain the data sets of each target power material.

7. The power material demand forecasting method according to claim 5, characterized in that, The specific steps of step S4 are as follows: S41. Collect the real-time demand data of the target power material and the target influencing factor data as real-time data according to the collection method in step S1; S42. Perform data cleaning, data transformation, and feature selection on the collected real-time data in the same way as in step S1; S43. Input the real-time data after feature selection into the final prediction model to obtain the demand prediction result of the target power material; S44. Interpret the results of feature importance analysis and sensitivity analysis of the demand prediction result of the target power material, perform format conversion according to the actual requirements, check using the actual requirements and data constraints, and display in the preset format.

8. A power material demand forecasting system, characterized in that, It includes: A data collection and processing module, which is used to collect the historical power material demand data and the corresponding influencing factor data, and perform preprocessing such as cleaning, transformation, and feature extraction on the collected historical data; A model building module, which is used to select a convolutional network, a recurrent network, and an LSTM network based on the TensorFlow deep learning framework, introduce a regularization term and a batch normalization structure to build a deep learning model, define the layers of the deep learning model, and then compile the defined deep learning model; A model training module, which is used to divide the collected historical data after preprocessing into a training set, a validation set, and a test set, use the training set to train the deep learning model, use the validation set to adjust the parameters of the deep learning model, and then use the test set to evaluate the performance of the deep learning model to obtain the final prediction model; A power material demand prediction module, which is used to collect the real-time power material demand data and the corresponding influencing factor data, perform preprocessing such as cleaning, normalization, and feature extraction on the collected real-time data, and then input it into the final prediction model to predict the demand power material.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The feature is that when the processor executes the program, it implements the steps of the power material demand prediction method according to any one of claims 1 to 7.

10. A storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the steps of the power material demand prediction method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Electric power material demand response method and device

    CN120822792A

  • A method and apparatus for responding to demand for electric power supplies

    CN120822792B