Bus load prediction method and system, medium and terminal

The bus load prediction method optimizes short-term forecasting by building separate models for each sampling moment using similarity-based sample selection and machine learning, addressing the challenges of volatile large user loads and improving prediction accuracy.

CN119109022APending Publication Date: 2024-12-10POWER DISPATCHING CONTROL CENT OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411137443.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Accurate short-term bus load forecasting is challenging due to the volatility and randomness of large user loads, influenced by production planning, meteorology, and day type, leading to insufficient prediction accuracy and poor generalization ability in power system management.

Method used

A bus load prediction method that builds separate models for each sampling moment, using similarity-based sample selection and machine learning algorithms (XGB, LGB, SVM) to optimize training and testing, incorporating production plans, meteorological data, and day types to enhance prediction accuracy.

Benefits of technology

The method improves prediction accuracy by capturing unique data characteristics at each moment, reducing overall prediction errors, and enhancing the model's ability to handle nonlinear relationships and random factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109022A_ABST
    Figure CN119109022A_ABST
Patent Text Reader

Abstract

The invention discloses a bus load prediction method and system, a medium and a terminal, and the method comprises the steps: obtaining a plurality of first samples corresponding to a plurality of historical days, and a first key factor and a first load related factor corresponding to each sampling moment of a power system in a to-be-predicted day; traversing each sampling moment, calculating the similarity between the second key factor and the first key factor in each first sample corresponding to the current traversing sampling moment, and then selecting the first sample corresponding to the second key factor of which the similarity is greater than a preset value as a second sample corresponding to the current traversing sampling moment; and training and testing the initial model by using all the second samples corresponding to the current traversal sampling moment to obtain a load prediction model for realizing bus load prediction at the current traversal sampling moment. According to the method, modeling is performed independently for each sampling moment, and the sample for training the model is optimized, so that the overall prediction accuracy can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system management, and in particular to a bus load prediction method, system, medium and terminal. Background Art

[0002] Short-term bus load forecasting is a basic task in power system management, which involves predicting the total terminal load of a relatively small power supply area provided by the main transformer of a substation. Accurate short-term bus load forecasting is essential to maintain system stability, ensure efficient power generation, and avoid overload and power outages. In the context of economic development and industrial structure adjustment, enterprise equipment is gradually transforming to large-capacity and high-parameterized equipment, which makes large users have higher voltage levels and large loads. The load of large users shows certain volatility and randomness, which increases the difficulty of load forecasting. Accurately predicting the load of large users is conducive to improving the accuracy of load forecasting for the entire power grid, which is of great significance to the safety and economic operation of the power grid. Among the factors affecting the load of large users, production planning is one of the key factors that lead to the change of load of large users. The fluctuation of load has a certain periodicity and regularity with the adjustment of the production plan of large users. In addition, meteorology and day type also have certain influences. Since the production plan may be different at different times, the use of a single model to predict the bus load at any time may lead to problems such as insufficient prediction accuracy and poor generalization ability. Summary of the invention

[0003] The embodiments of the present invention provide a bus load prediction method, system, medium and terminal, which respectively build a model for each sampling moment and preferentially use samples for training the model to effectively reduce the error of the overall prediction result.

[0004] In order to solve the above technical problems, an embodiment of the present invention provides a bus load prediction method, comprising:

[0005] Acquire a plurality of first samples corresponding to a number of historical days, and a first key factor and a first load-related factor corresponding to each sampling moment of the power system within the day to be predicted; wherein one of the first samples includes a second key factor, a second load-related factor and an actual value of the bus load corresponding to a sampling moment of the power system within a historical day;

[0006] Traversing each sampling moment, calculating the similarity between the first key factor corresponding to the current traversal sampling moment and each of the second key factors corresponding to the current traversal sampling moment according to a preset algorithm, and then selecting the first sample corresponding to the second key factor whose similarity is greater than a preset value as the second sample corresponding to the current traversal sampling moment;

[0007] Using all the second samples corresponding to the current traversal sampling moment, the pre-built initial model is trained and tested to obtain a load forecasting model corresponding to the current traversal sampling moment;

[0008] The first key factor and the first load-related factor corresponding to the current traversal sampling moment are input into the load prediction model corresponding to the current traversal sampling moment, so that the load prediction model corresponding to the current traversal sampling moment outputs the bus load prediction value corresponding to the current traversal sampling moment.

[0009] In the implementation of the embodiment of the present invention, a plurality of first samples corresponding to a plurality of historical days, and a first key factor and a first load-related factor corresponding to each sampling moment of the power system within the day to be predicted are obtained, and a first sample includes a second key factor, a second load-related factor and an actual value of the bus load corresponding to a sampling moment of the power system within a historical day, and then each sampling moment is traversed, and the similarity between the first key factor corresponding to the current traversal sampling moment and each second key factor corresponding to the current traversal sampling moment is calculated, and the first sample corresponding to the second key factor with a similarity greater than a preset value is selected as the second sample corresponding to the current traversal sampling moment, so that the model can be subsequently implemented based on samples with higher similarity. Model training optimization is carried out to obtain a load forecasting model that can better reflect the actual situation. Then, all the second samples corresponding to the current traversal sampling moment are used to train and test the pre-built initial model to obtain the load forecasting model corresponding to the current traversal sampling moment, that is, a model is trained separately for each sampling moment. Since the bus load at each moment may be affected by different production plans, separate modeling can better take these local differences into account, thereby more accurately capturing the data characteristics and patterns unique to each sampling moment. Therefore, training and testing the model separately for each sampling moment can avoid ignoring the prediction of individual sampling moments, effectively reduce the error of the overall prediction result, and comprehensively improve the accuracy of bus load prediction at each moment.

[0010] As a preferred solution, the pre-built initial model is trained and tested using all the second samples corresponding to the current traversal sampling moment to obtain the load forecasting model corresponding to the current traversal sampling moment, specifically:

[0011] Using all the second samples corresponding to the current traversal sampling moment, training and testing several pre-built initial models in sequence to obtain test results of each of the initial models that have completed training; wherein the several initial models include an XGB model, an LGB model, and an SVM model;

[0012] Based on the test results of each of the initial models that have completed training, the prediction performance of each of the initial models that have completed training is analyzed, and then the initial model with the best prediction performance is used as the load prediction model corresponding to the current traversal sampling moment.

[0013] The preferred solution of the embodiment of the present invention is implemented, each sampling moment is traversed, and the XGB model, LGB model and SVM model are constructed by three machine learning methods respectively, and then all the second samples corresponding to the current traversal sampling moment are used to train and test the pre-constructed XGB model, LGB model and SVM model in turn, and the test results of the trained XGB model, LGB model and SVM model are obtained, and then based on the test results of the trained XGB model, LGB model and SVM model, the prediction performance of the trained XGB model, LGB model and SVM model is analyzed, and then the model with the best prediction performance is selected from the trained XGB model, LGB model and SVM model as the load prediction model corresponding to the current traversal sampling moment, so as to further improve the accuracy of the bus load prediction at the current traversal sampling moment and make up for the poor generalization ability of the single model. In addition, the load prediction model constructed by the machine learning method has a stronger learning ability for nonlinear relationships and random factors, and the bus load prediction is more accurate.

[0014] As a preferred solution, the method uses all the second samples corresponding to the current traversal sampling moment to train and test several pre-built initial models in sequence, and obtains the test results of each of the initial models that have completed the training, specifically:

[0015] According to a preset division ratio, all the second samples corresponding to the current traversal sampling time are divided into a training set and a test set;

[0016] Using the training set corresponding to the current traversal sampling moment, respectively train several pre-built initial models, and optimize the parameters of each of the initial models during the training process;

[0017] The prediction effect of each of the initial models that have completed training is verified by using the test set corresponding to the current traversal sampling moment, and the evaluation index value of each of the initial models that have completed training is obtained as the test result of each of the initial models that have completed training.

[0018] According to a preferred solution of the embodiment of the present invention, all second samples corresponding to the current traversal sampling moment are divided into a training set and a test set according to a preset division ratio, which can avoid overfitting of the training data during the training process, thereby improving the performance of the model on new data. Then, the training set corresponding to the current traversal sampling moment is used to train the XGB model, the LGB model and the SVM model, and the parameters of each model are optimized during the training process, which can improve the prediction accuracy of the model. Then, the test set corresponding to the current traversal sampling moment is used to verify the prediction effect of the trained XGB model, the LGB model and the SVM model to obtain the evaluation index value of each model, so as to intuitively show which model performs better under various conditions.

[0019] As a preferred solution, based on the test results of each of the initial models that have completed training, the prediction performance of each of the initial models that have completed training is analyzed, and then the initial model with the best prediction performance is used as the load prediction model corresponding to the current traversal sampling moment, specifically:

[0020] If the evaluation index value is the mean absolute error percentage or the root mean square error, the initial model corresponding to the minimum rating index value is used as the load forecasting model at the current traversal sampling time point.

[0021] The preferred scheme of the embodiment of the present invention is implemented, and the mean absolute error percentage or the root mean square error is used to evaluate the performance of the trained XGB model, LGB model and SVM model at the current traversal sampling time, and then the model with the smallest error is selected as the load forecasting model to achieve further optimization of the model.

[0022] As a preferred solution, the traversal of each sampling moment calculates the similarity between the first key factor corresponding to the current traversal sampling moment and each of the second key factors corresponding to the current traversal sampling moment according to a preset algorithm, and then selects the first sample corresponding to the second key factor whose similarity is greater than a preset value as the second sample corresponding to the current traversal sampling moment, specifically:

[0023] Traversing each sampling moment, and calculating the similarity between the first key factor corresponding to the current traversal sampling moment and each of the second key factors corresponding to the current traversal sampling moment according to a preset Euclidean distance algorithm; wherein the preset Euclidean distance algorithm is specifically:

[0024]

[0025] Where d represents the similarity; u represents the eigenvector of the first key factor corresponding to a sampling time; v represents the eigenvector of the second key factor corresponding to a sampling time; V[i] represents the variance of the eigenvector u and the eigenvector v;

[0026] From all the second key factors corresponding to the current traversal sampling moment, select the second key factor whose similarity with the first key factor corresponding to the current traversal sampling moment is greater than a preset value as the similar key factor, and use the first sample corresponding to the similar key factor as the second sample corresponding to the current traversal sampling moment.

[0027] The preferred solution of the embodiment of the present invention is implemented by evaluating the similarity between the first key factor corresponding to the current traversal sampling moment and each of the second key factors corresponding to the current traversal sampling moment through the Euclidean distance algorithm, which can accurately match the similarity between the first key factor and the second key factor at the current sampling moment, which helps to find the most relevant samples in the data. In addition, by setting a similarity threshold, samples with low similarity to the current key factor can be filtered out, thereby reducing noise interference in the data and making model training more stable and reliable.

[0028] As a preferred solution, the bus load prediction method further includes:

[0029] If the first key factor is the production plan coefficient of the power system at each sampling moment within the day to be predicted, the first load-related factor includes the predicted meteorological data of the power system at each sampling moment within the day to be predicted and the day type of the day to be predicted, and the second key factor is the actual production coefficient of the power system at a sampling moment within a historical day, and the second load-related factor includes the actual meteorological data of the power system at a sampling moment within a historical day and the day type of the current historical day;

[0030] If the first key factor is the predicted meteorological data of the power system at each sampling moment within the day to be predicted, the first load-related factor includes the production plan coefficient of the power system at each sampling moment within the day to be predicted and the day type of the day to be predicted, and the second key factor is the actual meteorological data of the power system at a sampling moment within a historical day, and the second load-related factor includes the actual production coefficient of the power system at a sampling moment within a historical day and the day type of the current historical day;

[0031] If the first key factor is the day type of the day to be predicted, the first load-related factor includes the production plan coefficient and predicted meteorological data of the power system at each sampling moment within the day to be predicted; the second key factor is the day type of the current historical day, and the second load-related factor includes the actual production coefficient and actual meteorological data of the power system at a sampling moment within a historical day.

[0032] The preferred scheme for implementing the embodiments of the present invention provides an effective processing method for the prediction problem involving multi-dimensional information such as production plan, meteorological data and day type. It combines multiple factors such as production plan coefficient, meteorological data, day type, etc. to conduct comprehensive prediction, which helps to accurately predict the bus load of the power system, optimize the operation and scheduling of the power system, and is suitable for load prediction needs in complex environments.

[0033] In order to solve the same technical problem, an embodiment of the present invention further provides a bus load prediction system, comprising:

[0034] A data acquisition module is used to acquire a plurality of first samples corresponding to a number of historical days, and a first key factor and a first load-related factor corresponding to each sampling moment of the power system within a day to be predicted; wherein one of the first samples includes a second key factor, a second load-related factor and an actual value of the bus load corresponding to a sampling moment of the power system within a historical day;

[0035] A sample screening module, used to traverse each sampling moment, calculate the similarity between the first key factor corresponding to the current traversal sampling moment and each of the second key factors corresponding to the current traversal sampling moment according to a preset algorithm, and then select the first sample corresponding to the second key factor whose similarity is greater than a preset value as the second sample corresponding to the current traversal sampling moment;

[0036] A model training module, used to train and test a pre-built initial model using all the second samples corresponding to the current traversal sampling moment, to obtain a load forecasting model corresponding to the current traversal sampling moment;

[0037] The load prediction module is used to input the first key factor and the first load-related factor corresponding to the current traversal sampling moment into the load prediction model corresponding to the current traversal sampling moment, so that the load prediction model corresponding to the current traversal sampling moment outputs the bus load prediction value corresponding to the current traversal sampling moment.

[0038] As a preferred solution, the model training module specifically includes:

[0039] A training and testing unit, used to train and test a plurality of pre-built initial models in sequence using all the second samples corresponding to the current traversal sampling moment, and obtain the test results of each of the initial models that have completed the training; wherein the plurality of initial models include an XGB model, an LGB model and an SVM model;

[0040] The model screening unit is used to analyze the prediction performance of each of the initial models that have completed training based on the test results of each of the initial models that have completed training, and then use the initial model with the best prediction performance as the load prediction model corresponding to the current traversal sampling moment.

[0041] In order to solve the same technical problem, the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the bus load prediction method.

[0042] In order to solve the same technical problem, the present invention also provides a terminal, including a processor, a memory and a computer program stored in the memory; wherein the computer program can be executed by the processor to implement the bus load prediction method. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic flow chart of a bus load prediction method provided in Embodiment 1 of the present invention;

[0044] Figure 2 A schematic diagram of the structure of a bus load prediction system provided in Embodiment 1 of the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] Embodiment one:

[0047] Please refer to Figure 1 , is a bus load prediction method provided by an embodiment of the present invention, the method includes steps S1 to S4, each step is specifically as follows:

[0048] Step S1, obtaining a plurality of first samples corresponding to a plurality of historical days, and a first key factor and a first load-related factor corresponding to each sampling moment of the power system within a day to be predicted.

[0049] A first sample includes a second key factor, a second load-related factor and an actual value of the bus load corresponding to a sampling moment of the power system in a historical day.

[0050] In this embodiment, a number of sampling moments of the power system within a day are determined according to a preset sampling period; wherein the sampling period T is 15 minutes, and the number of sampling moments is 96.

[0051] As a preferred solution, for the first key factor, the first load-related factor, the second key factor and the second load-related factor in step S1, there are specifically the following three situations:

[0052] First, if the first key factor is the production planning coefficient of the power system at each sampling moment within the day to be predicted, the first load-related factor includes the predicted meteorological data of the power system at each sampling moment within the day to be predicted and the day type of the day to be predicted; the second key factor is the actual production coefficient of the power system at a sampling moment within a historical day; the second load-related factor includes the actual meteorological data of the power system at a sampling moment within a historical day and the day type of the current historical day.

[0053] Second, if the first key factor is the predicted meteorological data of the power system at each sampling moment within the day to be predicted, the first load-related factor includes the production plan coefficient of the power system at each sampling moment within the day to be predicted and the day type of the day to be predicted. The second key factor is the actual meteorological data of the power system at a sampling moment within a historical day. The second load-related factor includes the actual production coefficient of the power system at a sampling moment within a historical day and the day type of the current historical day.

[0054] Third, if the first key factor is the day type of the day to be predicted, the first load-related factor includes the production plan coefficient and predicted meteorological data of the power system at each sampling moment in the day to be predicted, and the second key factor is the day type of the current historical day, and the second load-related factor includes the actual production coefficient and actual meteorological data of the power system at a sampling moment in a historical day.

[0055] In this embodiment, the first key factor, the first load-related factor, the second key factor, the second load-related factor and the actual value of the bus load can be stored as time series data, and the time unit is minute (m). The day type includes weekdays, weekends and holidays, and the predicted meteorological data / actual meteorological data includes but is not limited to temperature, humidity and wind speed.

[0056] Step S2, traverse each sampling moment, and calculate the similarity between the first key factor corresponding to the current traversal sampling moment and the second key factors corresponding to the current traversal sampling moment according to a preset algorithm, and then select the first sample corresponding to the second key factor whose similarity is greater than a preset value as the second sample corresponding to the current traversal sampling moment.

[0057] As a preferred solution, step S2 includes step S21 to step S22, and each step is specifically as follows:

[0058] Step S21, traverse each sampling moment, and calculate the similarity between the first key factor corresponding to the current traversal sampling moment and each second key factor corresponding to the current traversal sampling moment according to a preset Euclidean distance algorithm.

[0059] For details about the preset Euclidean distance algorithm, please refer to (1).

[0060]

[0061] In the formula, d represents the similarity; u i Represents the eigenvector of the first key factor corresponding to a sampling moment; v i represents the eigenvector of the i-th second key factor corresponding to a sampling moment; V[i] represents the variance of the eigenvector u and the eigenvector v.

[0062] Step S22, from all the second key factors corresponding to the current traversal sampling moment, select the second key factor whose similarity with the first key factor corresponding to the current traversal sampling moment is greater than a preset value as the similar key factor, and use the first sample corresponding to the similar key factor as the second sample corresponding to the current traversal sampling moment.

[0063] Step S3, using all the second samples corresponding to the current traversal sampling moment, the pre-built initial model is trained and tested to obtain the load forecasting model corresponding to the current traversal sampling moment.

[0064] As a preferred solution, step S3 includes step S31 to step S32, and each step is specifically as follows:

[0065] Step S31, using all the second samples corresponding to the current traversal sampling moment, train and test several pre-built initial models in sequence to obtain the test results of each initial model that has completed the training.

[0066] Among them, several initial models include XGB model, LGB model and SVM model.

[0067] It should be noted that the construction of the XGB model, LGB model and SVM model is as follows:

[0068] 1) XGB model construction

[0069] The XGB model is XGBoost. XGBoost is an improved algorithm based on GBDT. It uses a multi-threaded parallel improvement algorithm to improve accuracy. The basic principles of XGBoost and GBDT are the same. The difference between the two is that GBDT uses the first-order derivative of the loss function, while XGBoost uses a more efficient loss function optimization method. By performing Taylor expansion on the loss function and using the first-order and second-order derivatives, the training speed is accelerated. The loss function of the XGBoost algorithm can be found in formula (2).

[0070]

[0071] In the formula, y is the true value corresponding to the current sample x; is the predicted value of sample x; is the loss function; f n is the nth classification tree model; is a regularization term, which is used to reflect the complexity of the algorithm; are the model parameters that need to be solved.

[0072] 2) LGB model construction

[0073] The LGB model is LightGBM. LightGBM belongs to the gradient boosting decision tree method. It obtains a strong learner by combining multiple weak regression trees and gradually improves the strong learner in an iterative manner. LightGBM uses the gradient boosting tree method to continuously build new trees to improve the performance of the model so that it can better fit the training data. The parameters such as the loss function and learning rate used in this process can be adjusted according to the specific problem. The final prediction model has the form of formula (3).

[0074]

[0075] In the formula, represents the nth weak regression tree, δ n (n=0,1,...,N) is the parameter to be determined, and the learning rate λ of each tree n is a hyperparameter, and x is an input vector. LightGBM uses the Gradient Single-Sided Sampling (GOSS) algorithm, the leaf algorithm, and the histogram algorithm to improve the training efficiency of the conventional gradient boosting decision tree method. The model supports parallel computing and has good prediction accuracy. By traversing all possible value combinations of LightGBM model parameters through the grid search algorithm and using cross-validation and other techniques to evaluate the performance of each combination, hyperparameters with better performance can be found.

[0076] 3) SVM model construction

[0077] The SVM model is a model built using the support vector regression algorithm. The basis of the support vector regression algorithm is the use of the epsilon insensitive function and the kernel function algorithm. When the fitted mathematical model is expressed as a curve in a multidimensional space, the result obtained according to the epsilon insensitive function is an "epsilon pipe" including the curve and the training points. Among all the sample points, only those distributed on the "pipe wall" determine the position of the pipe. These training samples on the pipe boundary are called "support vectors". Traditional fitting methods usually adapt to the nonlinearity of the training sample set by adding higher-order terms of the linear equation. Although this method is effective, the increased adjustable parameters also increase the risk of overfitting. In order to resolve this contradiction, the support vector regression algorithm uses the kernel function. By using the kernel function to replace the linear terms in the linear equation, the traditional linear algorithm can be transformed into a nonlinear regression algorithm. The introduction of the kernel function also realizes the "dimensionality increase" in the feature space, and the introduction of additional adjustable parameters can effectively control the risk of overfitting.

[0078] As a preferred solution, step S31 includes step S311 to step S313, and each step is specifically as follows:

[0079] Step S311, dividing all second samples corresponding to the current traversal sampling time into a training set and a test set according to a preset division ratio.

[0080] Step S312, using the training set corresponding to the current traversal sampling moment, respectively train several pre-built initial models, and optimize the parameters of each initial model during the training process.

[0081] Step S313, using the test set corresponding to the current traversal sampling moment, respectively verify the prediction effect of each initial model that has completed training, and obtain the evaluation index value of each initial model that has completed training as the test result of each initial model that has completed training.

[0082] Step S32, based on the test results of each initial model that has completed training, the prediction performance of each initial model that has completed training is analyzed, and then the initial model with the best prediction performance is used as the load prediction model corresponding to the current traversal sampling time.

[0083] As a preferred solution, step S32 is specifically as follows: if the evaluation index value is mean absolute percentage error (MAPE) or root mean square error (RMSE), the initial model corresponding to the minimum rating index value is used as the load forecasting model at the current traversal sampling time point.

[0084] Step S4, inputting the first key factor and the first load-related factor corresponding to the current traversal sampling moment into the load prediction model corresponding to the current traversal sampling moment, so that the load prediction model corresponding to the current traversal sampling moment outputs the bus load prediction value corresponding to the current traversal sampling moment.

[0085] In this embodiment, in actual application scenarios, emergencies, unexpected weather changes or other unforeseen factors may affect the load forecasting results. In order to further improve the accuracy and reliability of the forecast, the results output by the load forecasting model can be corrected based on manual experience.

[0086] Please refer to Figure 2 , is a schematic diagram of the structure of a bus load prediction system provided by an embodiment of the present invention, the system includes a data acquisition module M1, a sample screening module M2, a model training module M3 and a load prediction module M4, each module is specifically as follows:

[0087] The data acquisition module M1 is used to obtain a plurality of first samples corresponding to a number of historical days, and a first key factor and a first load-related factor corresponding to each sampling moment of the power system within the day to be predicted; wherein a first sample includes a second key factor, a second load-related factor and an actual value of the bus load corresponding to a sampling moment of the power system within a historical day;

[0088] The sample screening module M2 is used to traverse each sampling moment, calculate the similarity between the first key factor corresponding to the current traversal sampling moment and each second key factor corresponding to the current traversal sampling moment according to a preset algorithm, and then select the first sample corresponding to the second key factor whose similarity is greater than a preset value as the second sample corresponding to the current traversal sampling moment;

[0089] The model training module M3 is used to train and test the pre-built initial model using all the second samples corresponding to the current traversal sampling moment to obtain the load forecasting model corresponding to the current traversal sampling moment;

[0090] The load prediction module M4 is used to input the first key factor and the first load-related factor corresponding to the current traversal sampling moment into the load prediction model corresponding to the current traversal sampling moment, so that the load prediction model corresponding to the current traversal sampling moment outputs the bus load prediction value corresponding to the current traversal sampling moment.

[0091] As a preferred solution, the model training module M3 specifically includes a training and testing unit 31 and a model screening unit 32, and the specific details of each unit are as follows:

[0092] The training and testing unit 31 is used to train and test several pre-built initial models in sequence using all the second samples corresponding to the current traversal sampling moment, and obtain the test results of each initial model that has completed the training; wherein the several initial models include an XGB model, an LGB model and an SVM model;

[0093] The model screening unit 32 is used to analyze the prediction performance of each initial model that has completed training based on the test results of each initial model that has completed training, and then use the initial model with the best prediction performance as the load prediction model corresponding to the current traversal sampling moment.

[0094] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0095] An embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program; wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a bus load prediction method described in Embodiment 1.

[0096] An embodiment of the present invention further provides a terminal, comprising a processor, a memory, and a computer program stored in the memory; wherein the computer program can be executed by the processor to implement a bus load prediction method described in Embodiment 1.

[0097] Preferably, the computer program can be divided into one or more modules / units (such as computer program, computer program), one or more modules / units are stored in the memory and executed by the processor to complete the present invention. One or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal.

[0098] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor. The processor is the control center of the terminal, and various parts of the terminal are connected using various interfaces and lines.

[0099] The memory mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory can also be other volatile solid-state storage devices.

[0100] It should be noted that the above-mentioned terminal may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that the above-mentioned terminal is merely an example and does not constitute a limitation on the terminal. It may include more or fewer components, or a combination of certain components, or different components.

[0101] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0102] The present invention provides a bus load prediction method, system, medium and terminal, which obtain multiple first samples corresponding to several historical days, and the first key factor and the first load-related factor corresponding to each sampling moment of the power system in the day to be predicted, and a first sample includes the second key factor, the second load-related factor and the actual value of the bus load corresponding to a sampling moment of the power system in a historical day, and then traverses each sampling moment, calculates the similarity between the first key factor corresponding to the current traversal sampling moment and each second key factor corresponding to the current traversal sampling moment, and selects the first sample corresponding to the second key factor with a similarity greater than a preset value as the second sample corresponding to the current traversal sampling moment, so that the first sample corresponding to the second key factor with a similarity greater than a preset value can be selected ... The high sample realizes model training optimization, and then obtains the load forecasting model that can better reflect the actual situation. Then, all the second samples corresponding to the current traversal sampling moment are used to train and test the pre-built initial model, so as to obtain the load forecasting model corresponding to the current traversal sampling moment, that is, the model is trained separately for each sampling moment. Since the bus load at each moment may be affected by different production plans, and separate modeling can better take these local differences into account, so as to more accurately capture the data characteristics and patterns unique to each sampling moment, therefore, training and testing the model separately for each sampling moment can avoid ignoring the prediction of individual sampling moments, effectively reduce the error of the overall prediction result, and comprehensively improve the accuracy of bus load prediction at each moment.

[0103] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A bus load prediction method, It is characterized in that include: Acquire a plurality of first samples corresponding to a number of historical days, and a first key factor and a first load-related factor corresponding to each sampling moment of the power system within the day to be predicted; wherein a first sample includes a second key factor, a second load-related factor and an actual value of the bus load corresponding to a sampling moment of the power system within a historical day; Traversing each sampling moment, calculating the similarity between the first key factor corresponding to the current traversal sampling moment and each second key factor corresponding to the current traversal sampling moment according to a preset algorithm, and then selecting the first sample corresponding to the second key factor whose similarity is greater than a preset value as the second sample corresponding to the current traversal sampling moment; Using all the second samples corresponding to the current traversal sampling time, the pre-built initial model is trained and tested to obtain the load forecasting model corresponding to the current traversal sampling time; The first key factor and the first load-related factor corresponding to the current traversal sampling moment are input into the load prediction model corresponding to the current traversal sampling moment, so that the load prediction model corresponding to the current traversal sampling moment outputs the bus load prediction value corresponding to the current traversal sampling moment.

2. A bus load prediction method according to claim 1, It is characterized in that The method of using all the second samples corresponding to the current traversal sampling time to train and test the pre-built initial model to obtain the load forecasting model corresponding to the current traversal sampling time is as follows: Using all the second samples corresponding to the current traversal sampling moment, training and testing several pre-built initial models in sequence to obtain test results of each of the initial models that have completed training; wherein the several initial models include an XGB model, an LGB model, and an SVM model; Based on the test results of each of the initial models that have completed training, the prediction performance of each of the initial models that have completed training is analyzed, and then the initial model with the best prediction performance is used as the load prediction model corresponding to the current traversal sampling moment.

3. A bus load prediction method as claimed in claim 2, It is characterized in that The method of using all the second samples corresponding to the current traversal sampling time to train and test the pre-built initial models in sequence, and obtaining the test results of the initial models that have completed the training, is specifically as follows: According to a preset division ratio, all the second samples corresponding to the current traversal sampling time are divided into a training set and a test set; Using the training set corresponding to the current traversal sampling moment, respectively train several pre-built initial models, and optimize the parameters of each of the initial models during the training process; The prediction effect of each of the initial models that have completed training is verified by using the test set corresponding to the current traversal sampling moment, and the evaluation index value of each of the initial models that have completed training is obtained as the test result of each of the initial models that have completed training.

4. A bus load prediction method as claimed in claim 3, It is characterized in that The test results of the initial models that have completed training are used to analyze the prediction performance of the initial models that have completed training, and then the initial model with the best prediction performance is used as the load prediction model corresponding to the current traversal sampling time, specifically: If the evaluation index value is the mean absolute error percentage or the root mean square error, the initial model corresponding to the minimum rating index value is used as the load forecasting model at the current traversal sampling time point.

5. A bus load prediction method according to claim 1, It is characterized in that The traversing each sampling moment, calculating the similarity between the first key factor corresponding to the current traversal sampling moment and each of the second key factors corresponding to the current traversal sampling moment according to a preset algorithm, and then selecting the first sample corresponding to the second key factor whose similarity is greater than a preset value as the second sample corresponding to the current traversal sampling moment, specifically: Traversing each sampling moment, and calculating the similarity between the first key factor corresponding to the current traversal sampling moment and each of the second key factors corresponding to the current traversal sampling moment according to a preset Euclidean distance algorithm; wherein the preset Euclidean distance algorithm is specifically: Where d represents the similarity; u represents the eigenvector of the first key factor corresponding to a sampling time; v represents the eigenvector of the second key factor corresponding to a sampling time; V[i] represents the variance of the eigenvector u and the eigenvector v; From all the second key factors corresponding to the current traversal sampling moment, select the second key factor whose similarity with the first key factor corresponding to the current traversal sampling moment is greater than a preset value as the similar key factor, and use the first sample corresponding to the similar key factor as the second sample corresponding to the current traversal sampling moment.

6. A bus load prediction method according to claim 1, It is characterized in that Also includes: If the first key factor is the production plan coefficient of the power system at each sampling moment within the day to be predicted, the first load-related factor includes the predicted meteorological data of the power system at each sampling moment within the day to be predicted and the day type of the day to be predicted, and the second key factor is the actual production coefficient of the power system at a sampling moment within a historical day, and the second load-related factor includes the actual meteorological data of the power system at a sampling moment within a historical day and the day type of the current historical day; If the first key factor is the predicted meteorological data of the power system at each sampling moment within the day to be predicted, the first load-related factor includes the production plan coefficient of the power system at each sampling moment within the day to be predicted and the day type of the day to be predicted, and the second key factor is the actual meteorological data of the power system at a sampling moment within a historical day, and the second load-related factor includes the actual production coefficient of the power system at a sampling moment within a historical day and the day type of the current historical day; If the first key factor is the day type of the day to be predicted, the first load-related factor includes the production plan coefficient and predicted meteorological data of the power system at each sampling moment within the day to be predicted; the second key factor is the day type of the current historical day, and the second load-related factor includes the actual production coefficient and actual meteorological data of the power system at a sampling moment within a historical day.

7. A bus load prediction system, It is characterized in that include: A data acquisition module is used to acquire a plurality of first samples corresponding to a number of historical days, and a first key factor and a first load-related factor corresponding to each sampling moment of the power system within a day to be predicted; wherein one of the first samples includes a second key factor, a second load-related factor and an actual value of the bus load corresponding to a sampling moment of the power system within a historical day; A sample screening module, used to traverse each sampling moment, calculate the similarity between the first key factor corresponding to the current traversal sampling moment and each of the second key factors corresponding to the current traversal sampling moment according to a preset algorithm, and then select the first sample corresponding to the second key factor whose similarity is greater than a preset value as the second sample corresponding to the current traversal sampling moment; A model training module, used to train and test a pre-built initial model using all the second samples corresponding to the current traversal sampling moment, to obtain a load forecasting model corresponding to the current traversal sampling moment; The load prediction module is used to input the first key factor and the first load-related factor corresponding to the current traversal sampling moment into the load prediction model corresponding to the current traversal sampling moment, so that the load prediction model corresponding to the current traversal sampling moment outputs the bus load prediction value corresponding to the current traversal sampling moment.

8. A bus load prediction system as claimed in claim 7, It is characterized in that The model training module specifically includes: A training and testing unit, used to train and test a plurality of pre-built initial models in sequence using all the second samples corresponding to the current traversal sampling moment, and obtain the test results of each of the initial models that have completed the training; wherein the plurality of initial models include an XGB model, an LGB model and an SVM model; The model screening unit is used to analyze the prediction performance of each of the initial models that have completed training based on the test results of each of the initial models that have completed training, and then use the initial model with the best prediction performance as the load prediction model corresponding to the current traversal sampling moment.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored computer program; wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a bus load prediction method as described in any one of claims 1 to 6.

10. A terminal, It is characterized in that It comprises a processor, a memory and a computer program stored in the memory; wherein the computer program can be executed by the processor to implement a bus load prediction method as described in any one of claims 1 to 6.