Model training method, power prediction method, and device

Through information learning from multiple data sources and multiple time scales, combined with historical power and meteorological data, a multi-model fusion method is used to optimize the loss function, solving the accuracy and complexity challenges of existing power prediction methods and achieving more efficient power. predict.

WO2024198769A1PCT designated stage expired Publication Date: 2024-10-03HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/077717
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-19
Filing Date
2024-02-20
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

Existing power prediction methods have challenges in reducing computational complexity and improving model accuracy. In particular, timing prediction and domain knowledge constraint methods based on historical data require a large amount of data and human intervention, and lack sufficient ablation experimental verification.

Method used

Through information learning from multiple data sources and multiple time scales, historical power data, historical real meteorological data and historical predicted meteorological data are used, and a multi-model fusion method is used to determine the sub-loss function and weight, and optimize the target loss function to improve prediction accuracy. .

Benefits of technology

It achieves higher power prediction accuracy, reduces reliance on human intervention, improves model training efficiency and accuracy, and ensures prediction accuracy at different time scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077717_03102024_PF_FP_ABST
    Figure CN2024077717_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a model training method, a power prediction method, and a device, which can be applied to the field of artificial intelligence. A model at least comprises a first model and a second model. The method comprises: acquiring historical power data and historical meteorological data in preset durations; determining weights of loss functions of the models on the basis of a data set and constructing a target loss function, wherein the first model and the second model can be used for representing input data, and the data represented by the first model and the data represented by the second model are not completely the same; and finally, training the models by using the target loss function. By using a currently available data source, more complete information is captured from different modal data (i.e., historical power data and historical meteorological data) and different time scales (i.e., preset durations), so that a learning model is optimized, and higher prediction precision can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

A model training method, power prediction method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 24, 2023, with application number 202310335408.3, entitled “A model training method, photovoltaic power prediction method and device”, and the Chinese patent application filed with the State Intellectual Property Office on July 19, 2023, with application number 202310891669.3, entitled “A model training method, power prediction method and device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of machine learning, and in particular to a model training method, a power prediction method, and a device. Background Art

[0003] Solar energy is a clean, safe, and renewable energy source, but it cannot be produced continuously and is highly volatile. This volatility poses a significant challenge to integrating photovoltaic power generation into the power grid. Furthermore, predicting load power in different scenarios to facilitate grid dispatch and support electricity trading is a crucial issue. Therefore, power forecasting (PV power generation or load power consumption, etc.) is particularly important. Power forecasting aims to accurately estimate power supply or usage at different time granularities and timescales.

[0004] Current power prediction approaches primarily focus on two approaches: 1) Treating this problem as a time series prediction problem based on historical data. This approach employs random sampling in the frequency domain in the hope of reducing the length of the input vector, thereby reducing computational complexity. 2) Incorporating domain knowledge from various perspectives to constrain or improve the model learning process, in other words, incorporating domain knowledge as prior knowledge into the model to constrain and optimize it.

[0005] The sampling of the above method 1 is bound to be destructive to the input information. Although the sampling rate can be used to balance the computing performance and the final model accuracy, this trade-off essentially requires manual intervention to optimize the hyperparameters. In addition, the model of this method has a certain complexity and requires a large amount of data to drive learning as the basis for achieving the corresponding accuracy goals. The addition of domain knowledge in the above method 2 needs to participate in the model training as a loss constraint. Therefore, its accuracy is highly affected by the accuracy of the upper and lower bounds of the fitting function, and no sufficient ablation experiments have been conducted to verify the effectiveness of the constraints in its design.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a model training method, a power prediction method and a device for exploring how to conduct complete information learning from the perspective of multiple data sources and multiple time scales, thereby obtaining a more accurate model. Specifically, by utilizing the currently available data sources, from different modal data (i.e., historical power data, historical real meteorological data, historical forecast meteorological data and other data types), different time scales (i.e., preset durations, such as the past 24 hours, which can be customized, and the defined length is different, the time scale is different) to capture more complete information, thereby optimizing the learning model to achieve higher prediction accuracy.

[0008] Based on this, the embodiments of the present application provide the following technical solutions:

[0009] In the first aspect, the embodiment of the present application first provides a model training method that can be used in the field of artificial intelligence. The method includes: first obtaining a data set, which may include training data and verification data, wherein the data type in the data set includes at least historical power data (such as power data obtained by sampling within the past 24 hours) and historical meteorological data (such as meteorological data obtained by sampling within the past 24 hours) of a preset duration t (such as the past 24 hours). Afterwards, the first weight of the first sub-loss function corresponding to the first model and the second weight of the second sub-loss function corresponding to the second model are further determined based on the above data set. Among them, the first model and the second model can be used to characterize the input data, and the data characterized by the first model and the second model are not exactly the same. After obtaining the first weight and the second weight, the final target loss function can be determined based on the first sub-loss function, the second sub-loss function, the first weight and the second weight. Finally, based on the training data and verification data in the data set, the target loss function is used to train each model to obtain a trained high-precision prediction model. The trained model includes at least a trained first model and a trained second model. The trained model can be deployed online to complete the prediction task of real-time power data (such as generated power or load power, etc.).

[0010] In the above-mentioned embodiment of the present application, by utilizing the currently available data sources, more complete information is captured from different modal data (i.e., historical power data, historical real meteorological data, historical predicted meteorological data and other data types) and different time scales (i.e., preset time lengths, such as the past 24 hours, which can be customized, and the time scale will be different depending on the defined length), thereby optimizing the learning model and achieving higher prediction accuracy.

[0011] In one possible implementation of the first aspect, the first model and the second model can represent data from different dimensions. For example, the first model and the second model can represent different types of data, or respectively represent time domain data or frequency domain data. Optionally, the first model is used to globally represent at least historical power data and historical meteorological data in the dataset, and the second model is used to locally represent the historical meteorological data in the dataset.

[0012] In one possible implementation of the first aspect, the historical meteorological data may include historical real meteorological data (e.g., meteorological data sampled within the past 24 hours) and historical predicted meteorological data corresponding to the historical real meteorological data (e.g., real-time meteorological forecast data predicted within the past 24 hours and collected at the time the real meteorological data was sampled). Therefore, when collecting historical meteorological data, both real meteorological data and predicted meteorological data may be collected simultaneously, thereby training a high-precision model.

[0013] Optionally, the aforementioned historical meteorological data may include historical real meteorological data of a first time period and corresponding historical predicted meteorological data and historical predicted meteorological data of a second time period. The historical real meteorological data of the first time period and the corresponding historical predicted meteorological data can be used to determine the first weight and the second weight. The historical predicted meteorological data of the second time period is used for training, such as as input to the first model or the second model during the training process.

[0014] In one possible implementation of the first aspect, the aforementioned historical power data includes generated power or load power. The generated power includes the power generated by the power generation equipment, such as the photovoltaic power generation power of the photovoltaic power generation equipment, and the load power is the power consumed by one or more devices. Accordingly, when the historical power data includes generated power, the trained prediction model can be used to predict the generated power; when the historical power data includes load power, the trained prediction model can be used to predict the load power of the electrical equipment. Therefore, through the method provided in this application, training data can be selected according to actual needs, thereby realizing meteorological-based generated power prediction or load power prediction.

[0015] In a possible implementation of the first aspect, the historical real meteorological data for the first time period and the corresponding historical forecast meteorological data in the dataset may include at least a first sub-dataset and a second sub-dataset. For example, the historical real meteorological data for the first time period and the corresponding historical forecast meteorological data in the dataset may be divided into the first sub-dataset and the second sub-dataset according to a certain ratio. The first sub-dataset may also be referred to as a training dataset, and the second sub-dataset may also be referred to as a validation dataset. The historical real meteorological data and the historical forecast meteorological data included in the first sub-dataset may be referred to as first historical real meteorological data and first historical forecast meteorological data, respectively, and the historical real meteorological data and the historical forecast meteorological data included in the second sub-dataset may be referred to as second historical real meteorological data and second historical forecast meteorological data. In this case, one implementation of determining the first weight of the first sub-loss function and the second weight of the second sub-loss function based on the dataset may be: first, determining the first accuracy of the first historical forecast meteorological data in the first sub-dataset based on the data in the first sub-dataset, and determining the second accuracy of the second historical forecast meteorological data in the second sub-dataset based on the data in the second sub-dataset. Then, first determining the first weight of the first sub-loss function based on the calculated first accuracy and second accuracy. After obtaining the first weight, further determining the second weight of the second sub-loss function based on the first weight.

[0016] In the above-mentioned embodiment of the present application, by calculating the accuracy of the historical forecast meteorological data prediction of the two sub-data sets respectively and determining the weight of each model loss function based on the accuracy, different models are assigned different weights, so that more complete and more effective information can be comprehensively obtained during the model training process, thereby improving the model training efficiency and training accuracy.

[0017] In a possible implementation manner of the first aspect, a value of the first weight is inversely correlated with a value of the second accuracy.

[0018] In the above-mentioned embodiment of the present application, the limitation that the value of the first weight is inversely correlated with the value of the second accuracy has the following effect: when the prediction accuracy of the historical forecast meteorological data in the verification data is low (that is, the second accuracy is low), the second model is given a lower weight (that is, the second weight value is small), and the first model is given a larger weight (that is, the first weight value is large), so as to use global information to compensate for the impact of insufficient accuracy of the historical forecast meteorological data in the verification set, and focus more on the extraction of global information; conversely, when the prediction accuracy of the historical forecast meteorological data in the verification data is high (that is, the second accuracy is high), the second model is given a higher weight (that is, the second weight value is large) to obtain more important information in this model.

[0019] In a possible implementation of the first aspect, for calculating the first accuracy, the data in the current training set (i.e., the first sub-dataset) can be sliced ​​using the preset time length t (e.g., 24 hours) as the time window size, thereby obtaining M first slice segments Qi (1≤i≤M). Then, based on the first historical real meteorological data NWD1i and the first historical predicted meteorological data NWP1i in each first slice segment Qi, the first target accuracy ACC1i of the first historical predicted meteorological data NWP1i in each first slice segment Qi is calculated, thereby obtaining a total of M first target accuracies (i.e., ACC11, ACC12, ..., ACC1M). Finally, the first accuracy is determined based on the M first target accuracies, where the first accuracy includes the maximum value ACC1 of the M first target accuracies. max , minimum ACC min and / or average ACC mean .

[0020] In the above-mentioned embodiment of the present application, it is specifically explained that the first accuracy is determined based on the target accuracy of each data slice segment of the first sub-data set, and the first accuracy is finally calculated by utilizing the statistical characteristics of M first target accuracies, which has higher accuracy and feasibility.

[0021] In a possible implementation of the first aspect, the second accuracy is calculated based on the data in the second sub-dataset in a manner similar to the method for determining the first accuracy described above. Specifically, the data in the second sub-dataset is sliced ​​to obtain N second slice segments Pj (1≤j≤N). Then, based on the second historical real meteorological data NWD2j and the second historical forecast meteorological data NWP2j in each second slice segment Pj, a second target accuracy ACC2j of the second historical forecast meteorological data NWP2j in each second slice segment Pj is calculated. Thus, a total of N second target accuracies (i.e., ACC21, ACC22, ..., ACC2N) can be obtained. Finally, the second accuracy is determined based on the N second target accuracies, where the second accuracy includes an average of the N second target accuracies.

[0022] In the above-mentioned embodiment of the present application, it is specifically explained that the second accuracy is determined based on the target accuracy of each data slice segment of the second sub-data set, and the second accuracy is finally calculated by utilizing the statistical characteristics of N second target accuracies, which has higher accuracy and feasibility.

[0023] In a possible implementation of the first aspect, in the first model, different sub-models can be divided according to the modality of the data. For example, the first model may include at least one of a first sub-model and a second sub-model, wherein the input of the first sub-model is the historical power data of the first time period in the data set, which is used to globally characterize the historical power data; the input of the second sub-model is the historical forecast meteorological data in the data set, which is used to globally characterize the historical forecast meteorological data of the first time period.

[0024] In the above-mentioned embodiment of the present application, the first model can be composed of multiple sub-models, which are used to globally represent different types of historical data and have decoupling properties.

[0025] In a possible implementation of the first aspect, the model may further include a third model, the input of which is the data in the above-mentioned dataset, wherein the input data may be part of the data in the dataset or all of the data, which is not specifically limited in this application. The output of the third model is the first adaptive weight of the first model and the second adaptive weight of the second model, and the third model is used to fuse the output results of the first model and the output results of the second model based on the first adaptive weight and the second adaptive weight to obtain a final prediction result.

[0026] In the above embodiment of the present application, the model may also include a third model, whose output is the adaptive weight of the other two models (that is, different weights are assigned to the corresponding output results of the other two models), which is used to fuse the output results of the first model and the second model to obtain the final prediction result. The third model can make the prediction result more accurate.

[0027] In a possible implementation of the first aspect, if the model also includes a third model, then the constructed target loss function must also include the loss function corresponding to the third model. In this case, the final target loss function is determined based on the third sub-loss function, the first sub-loss function, the second sub-loss function, the first weight, and the second weight corresponding to the third model.

[0028] In the above embodiment of the present application, since an additional third model is added, there is also a loss function corresponding to the third model in the target loss function (i.e., the third sub-loss function). During training, more complete and more effective information can be adaptively obtained, making the model more effective during the training process.

[0029] In a possible implementation of the first aspect, the first sub-model, the second sub-model, and the second model include any one of the following: a time convolutional network (TCN), a recurrent neural network (RNN), a long and short term memory network (LSTM), a multilayer perceptron (MLP), etc., which is not specifically limited in this application.

[0030] In the above-mentioned implementation manner of the present application, the network structure of the model is not dependent on and is not specified. The first sub-model, the second sub-model, and the second model can have multiple options and have wide applicability.

[0031] In a possible implementation of the first aspect, the third model may be an MLP or other types of neural networks with a self-attention mechanism, which is not specifically limited in this application.

[0032] In the above-mentioned implementation manner of the present application, the network structure of the model is not dependent on and is not specified. The third model can have multiple options and has wide applicability.

[0033] The second aspect of the embodiment of the present application also provides a power prediction method, which can be used in the field of artificial intelligence. The method includes: first, obtaining input data, which includes historical power data of a first preset time period (such as 24 hours past the current moment) and predicted meteorological data of a second preset time period (such as 24 hours after the current moment). After obtaining the input data, the input data can be input into the model trained through the above-mentioned training stage (such as the trained first model and second model), thereby obtaining the predicted power data of at least one preset moment in the second preset time period to be predicted in the future (such as, the second preset time period is 24 hours, the prediction time granularity is 1 hour, then the preset moment is 24 moments for each hour in the next 24 hours). Wherein, the trained first model and the trained second model are used to characterize the input data, and the data characterized by the model and the second model are not exactly the same. The representations output by the trained first model and the trained second model are used to obtain the predicted power data of at least one preset moment in the second preset time period.

[0034] In the above-mentioned embodiment of the present application, based on real-time weather forecast data and historical power data as input, the reasoning process is completed using the high-precision model obtained through the above-mentioned training process, and the reasoning results are fed back to make the prediction accuracy of the reasoning results higher.

[0035] In a possible implementation of the second aspect, the trained first model can be used to globally characterize the historical power data of a first preset time period or the predicted meteorological data of a second preset time period, and the trained second model can be used to locally characterize the predicted meteorological data of the second preset time period. The global characterization and the local characterization can be used to obtain predicted power data at at least one preset moment within the second preset time period.

[0036] In a possible implementation of the second aspect, the trained model can be obtained by training based on a data set using a target loss function. The data set may include historical power data of a third preset time period, historical real meteorological data, and historical predicted meteorological data corresponding to the historical real meteorological data. The target loss function is determined based on a first sub-loss function, a second sub-loss function, a first weight of the first sub-loss function, and a second weight of the second sub-loss function. The first sub-loss function is a loss function corresponding to the first model, and the second sub-loss function is a loss function corresponding to the second model. The first weight and the second weight are determined based on the data set.

[0037] In a possible implementation of the second aspect, in the first model, different sub-models can be divided according to the modality of the data. For example, the first model can include at least a first sub-model and a second sub-model, wherein the input of the first sub-model is the historical power data in the data set, which is used to globally characterize the historical power data; the input of the second sub-model is the historical predicted meteorological data in the data set, which is used to globally characterize the historical predicted meteorological data.

[0038] In the above-mentioned embodiment of the present application, the first model can be composed of multiple sub-models, which are used to globally represent different types of historical data and have decoupling properties.

[0039] In one possible implementation of the second aspect, the predicted power data for at least one preset moment within the second preset duration includes the generated power or load power at at least one preset moment within the second preset duration. The generated power includes the power generated by the power generation equipment, and the load power is the power consumed by one or more devices. Therefore, the method provided in this application can implement meteorologically-based generated power prediction or load power prediction.

[0040] In a possible implementation of the second aspect, the model may further include a third model, the input of which is the input data. The output of the third model is the first adaptive weight of the first model and the second adaptive weight of the second model. The third model is configured to fuse the output results of the first model and the second model based on the first adaptive weight and the second adaptive weight to obtain a final prediction result.

[0041] In the above embodiment of the present application, the model may also include a third model, whose output is the adaptive weight of the other two models, which is used to fuse the output results of the first model and the second model to obtain the final prediction result. The third model can make the prediction result more accurate.

[0042] In a possible implementation of the first aspect, the first sub-model, the second sub-model, and the second model include any one of the following: TCN, RNN, LSTM, MLP, etc., which is not specifically limited in this application.

[0043] In the above-mentioned implementation manner of the present application, the network structure of the model is not dependent on and is not specified. The first sub-model, the second sub-model, and the second model can have multiple options and have wide applicability.

[0044] In a possible implementation of the first aspect, the third model may be an MLP or other types of neural networks with a self-attention mechanism, which is not specifically limited in this application.

[0045] In the above-mentioned implementation manner of the present application, the network structure of the model is not dependent on and is not specified. The third model can have multiple options and has wide applicability.

[0046] A third aspect of the present application provides a training device that implements the method of the first aspect or any possible implementation of the first aspect. This functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functionality.

[0047] A fourth aspect of the present application provides an execution device that implements the method of the second aspect or any possible implementation of the second aspect. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0048] The fifth aspect of the embodiment of the present application provides a training device, which may include a memory, a processor and a bus system, wherein the memory is used to store programs, and the processor is used to call the programs stored in the memory to execute the method of the first aspect of the embodiment of the present application or any possible implementation method of the first aspect.

[0049] The sixth aspect of the embodiments of the present application provides an execution device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to call the programs stored in the memory to execute the method of the second aspect of the embodiments of the present application or any possible implementation of the second aspect.

[0050] A seventh aspect of an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer can execute the method of the above-mentioned first aspect or any possible implementation of the first aspect, or execute the method of the above-mentioned second aspect or any possible implementation of the second aspect.

[0051] An eighth aspect of an embodiment of the present application provides a computer program which, when executed on a computer, enables the computer to execute the method of the first aspect or any possible implementation of the first aspect, or to execute the method of the second aspect or any possible implementation of the second aspect.

[0052] The ninth aspect of the embodiment of the present application provides a chip, which includes at least one processor and at least one interface circuit, the interface circuit is coupled to the processor, the at least one interface circuit is used to perform transceiver functions, and send instructions to at least one processor, the at least one processor is used to run a computer program or instruction, which has the function of implementing the method of the first aspect or any possible implementation of the first aspect, or, it has the function of implementing the method of the second aspect or any possible implementation of the second aspect, the function can be implemented by hardware, or by software, or by a combination of hardware and software, the hardware or software includes one or more modules corresponding to the above functions. In addition, the interface circuit is used to communicate with other modules outside the chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] FIG1 is a schematic diagram of the structure of an artificial intelligence main framework provided in an embodiment of the present application;

[0054] FIG2 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0055] FIG3 is a schematic diagram of a framework of a task processing system provided in an embodiment of the present application;

[0056] FIG4 is a flow chart of a method for training a model according to an embodiment of the present application;

[0057] FIG5 is another flow chart of a method for training a model according to an embodiment of the present application;

[0058] FIG6 is a schematic diagram of an example provided in an embodiment of the present application;

[0059] FIG7 is a schematic diagram illustrating a specific description of the power prediction problem provided by an embodiment of the present application;

[0060] FIG8 is a schematic diagram of another example provided in an embodiment of the present application;

[0061] FIG9 is a schematic diagram of a flow chart of a power prediction method provided in an embodiment of the present application;

[0062] FIG10 is a schematic diagram of a flow chart of a power prediction method provided in an embodiment of the present application;

[0063] FIG11 is a schematic diagram of the overall algorithm framework provided in an embodiment of the present application;

[0064] FIG12 is a comparative schematic diagram of the beneficial effects of the method of the present application provided in an embodiment of the present application;

[0065] FIG13 is a schematic diagram of a training device provided in an embodiment of the present application;

[0066] FIG14 is a schematic diagram of an execution device provided in an embodiment of the present application;

[0067] FIG15 is another schematic diagram of the training device provided in an embodiment of the present application;

[0068] FIG16 is another schematic diagram of an execution device provided in an embodiment of the present application;

[0069] FIG17 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0070] The embodiments of the present application provide a model training method, power prediction method, and device for exploring how to perform complete information learning from the perspective of multiple data sources and multiple time scales, thereby obtaining a more accurate model. Specifically, by utilizing currently available data sources, capturing more complete information from different modal data (i.e., historical power data, historical real meteorological data, historical predicted meteorological data, and other data types) and different time scales, and thus optimizing the learning model, a higher prediction accuracy can be achieved.

[0071] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0072] In order to better understand the solutions of the embodiments of the present application, the following first introduces the relevant terms and concepts that may be involved in the embodiments of the present application. It should be understood that the interpretation of the relevant concepts may be limited by the specific circumstances of the embodiments of the present application, but it does not mean that the present application is limited to the specific circumstances. The specific circumstances of different embodiments may also vary, which is not specifically limited here.

[0073] (1) Neural Network

[0074] A neural network can be composed of neural units. Specifically, it can be understood as a neural network with an input layer, a hidden layer, and an output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. Among them, a neural network with many hidden layers is called a deep neural network (DNN). The work of each layer in the neural network can be expressed mathematically as To describe, from a physical level, the work of each layer in the neural network can be understood as completing the transformation from input space to output space (i.e., from the row space to the column space of the matrix) through five operations on the input space (a set of input vectors). These five operations include: 1. Dimensionality increase / decrease; 2. Zoom in / out; 3. Rotation; 4. Translation; 5. "Bending". Operations 1, 2, and 3 are represented by Completed, the operation of 4 is completed by "+b", and the operation of 5 is implemented by "a()". The word "space" is used here because the object being classified is not a single thing, but a class of things. Space refers to the collection of all individuals of this type of thing, where W is the weight matrix of each layer of the neural network, and each value in the matrix represents the weight value of a neuron in the layer. The matrix W determines the spatial transformation from the input space to the output space mentioned above, that is, the W of each layer of the neural network controls how to transform the space. The purpose of training a neural network is to eventually obtain the weight matrices of all layers of the trained neural network. Therefore, the training process of a neural network is essentially a way to learn to control spatial transformation, and more specifically, to learn the weight matrix. It should be noted that in the embodiments of the present application, a neural network can also be referred to as a model.

[0075] (2) Loss Function

[0076] In the process of training a neural network, because we want the output of the neural network to be as close as possible to the value we actually want to predict, we can compare the current network's predicted value with the desired target value, and then update the weight matrix of each layer of the neural network based on the difference between the two (of course, there is usually an initialization process before the first update, which is to pre-configure the parameters for each layer in the neural network). For example, if the network's predicted value is too high, the weight matrix is ​​adjusted to make it predict a lower value, and this adjustment is continued until the neural network can predict the desired target value. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value." This is the loss function or objective function, which is an important equation used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the neural network becomes a process of minimizing this loss as much as possible.

[0077] (3) Backpropagation algorithm

[0078] During neural network training, the back propagation (BP) algorithm can be used to correct the size of the parameters in the initial neural network model, reducing the reconstruction error loss of the neural network model. Specifically, forward propagation of the input signal to the output generates error loss. This error loss information is then backpropagated to update the parameters in the initial neural network model, thereby converging the error loss. The BP algorithm is a backpropagation movement dominated by error loss, aiming to obtain the optimal parameters of the neural network model, such as the weight matrix.

[0079] (4) Numerical weather prediction data (NWP)

[0080] NWP, also known as historical forecast meteorological data, refers to the numerical prediction of future meteorological parameters through physical modeling and statistics. Its meteorological parameters include global horizontal irradiance (GHI), global tilted irradiance (GTI), temperature (TEMP) at 2 meters horizontally, and wind speed (WS) at 10 meters horizontally.

[0081] (5) Numerical weather data (NWD)

[0082] NWD can also be called historical real meteorological data, which is the real meteorological data recorded and sampled by sensors and other equipment over a period of time in the past.

[0083] (6) Multimodal modeling

[0084] There are currently two interpretations of multimodality. One is the difference in information types, including modeling different types of information such as text, time series, images, and audio. The other is the same information type. For example, the information types are all time series, but the angles of describing the objects are different. For example, one is the information of a temperature sensor and the other is the information of a wind speed sensor. Both are numerical time series data, but they can also be considered a multimodal modeling process.

[0085] (7) Multiscale modeling

[0086] There are many explanations of the definition of multi-scale. In the embodiments of this application, multi-scale is defined as: capturing information of different time granularities when processing time series data, or processing information within different receptive field sizes when processing image data.

[0087] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0088] First, let's describe the overall workflow of an AI system. See Figure 1, which shows a schematic diagram of the main AI framework. This framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.

[0089] (1) Infrastructure

[0090] Infrastructure provides computing power for AI systems, enabling communication with the outside world and supporting this through a foundational platform. External communication occurs through sensors; computing power is provided by intelligent chips (CPUs, NPUs, GPUs, ASICs, FPGAs, and other hardware accelerators). The foundational platform includes a distributed computing framework and network-related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then fed into the intelligent chips within the distributed computing system provided by the foundational platform for computation.

[0091] (2) Data

[0092] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.

[0093] (3) Data processing

[0094] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.

[0095] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.

[0096] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.

[0097] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.

[0098] (4) General ability

[0099] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0100] (5) Smart products and industry applications

[0101] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart manufacturing, smart transportation, smart homes, smart medical care, smart security, autonomous driving, smart cities, etc.

[0102] The embodiments of the present application can be applied to the optimization design of a model (in the embodiments of the present application, at least two models are included, namely a first model and a second model), specifically, can be applied to the optimization design of the loss function of the model. The model whose loss function is optimized by the present application can be specifically applied in various sub-fields of the field of artificial intelligence. Specifically, with reference to Figure 1, the data in the data set acquired by the infrastructure in the embodiment of the present application can be multiple data of different types (i.e., a data set, which at least includes training data and verification data, and training data can also be called training samples. Multiple training samples constitute a training set, and multiple verification data constitute a verification set) acquired through devices such as a weather forecast platform and a weather server. The data in the data set can be multiple image data, multiple video data, text data, audio data, etc. For example, it can at least include: historical power data of a preset time period (such as photovoltaic power generation power data or load power data, etc.), historical real meteorological data, historical predicted meteorological data corresponding to the historical real meteorological data, and other numerical time series data (i.e., text data). It can also include: image data or video data describing meteorological information. As long as the data set meets the function of iteratively training the model and verifying the accuracy of the model, the specific embodiment of the present application does not limit the data type in the data set.

[0103] For example, the method provided by the present application can be applied to both power generation prediction scenarios and load power prediction scenarios. The following is an illustrative introduction using photovoltaic power generation prediction as an example. The photovoltaic power generation power mentioned below can also be replaced by load power, which will not be repeated below. The embodiment of the present application can be applied to a photovoltaic power generation prediction system. A typical application scenario can be shown in Figure 2. Figure 2 is a system architecture diagram of a photovoltaic power generation prediction system provided by an embodiment of the present application. As an example, the photovoltaic power generation prediction system 200 can be composed of several parts such as the weather forecast platform 201, weather server 202, optical power prediction server 203, data storage server 204, visualization workbench 205, and scheduling system 206 shown in Figure 2. First, numerical meteorological data, weather cloud map data and other data sets can be obtained through the weather forecast platform 201, and then transmitted through the network. To the meteorological server 202; the meteorological server 202 and the data storage server 204 transmit real-time predicted / actual meteorological data and historical photovoltaic power generation data and other data to the optical power prediction server 203 respectively. After the predicted photovoltaic power generation power value is obtained through the model (at least including the first model and the second model) deployed on the optical power prediction server 203, it can be further transmitted in real time to the visualization workbench 205 and / or the dispatching system 206. The visualization workbench 205 is provided for system operation and maintenance engineers to perform corresponding operations. The dispatching system 206 can be connected to the State Grid platform to support grid dispatching decisions.

[0104] It is worth noting that Figure 2 is only a schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationships between the devices, components, modules, etc. shown in the figure do not constitute any limitation. In addition, the example in Figure 2 is not intended to limit the number and type of each device.

[0105] It should be noted that the product form involved in the embodiments of this application is mainly embodied in the core algorithm module of the photovoltaic power generation prediction system, and there are two main sales forms. One is that when bidding for the construction of a photovoltaic power station, this function will be added as a feature function in the bid to increase the success rate of the bid; the other is that for photovoltaic power stations that have been built, this function will directly conduct bidding for the photovoltaic power generation prediction system, and in the bid, the details of this function will be introduced.

[0106] To facilitate understanding of this solution, the framework of the task processing system provided in the embodiment of the present application will be introduced in conjunction with Figure 3. Please refer to Figure 3 first. Figure 3 is a system architecture diagram of the task processing system provided in the embodiment of the present application. In Figure 3, the task processing system 300 includes an execution device 310, a training device 320, a database 330, a client device 340, a data storage system 350 and a data acquisition device 360. The execution device 310 includes a computing module 311 and an input / output (I / O) interface 312.

[0107] Among them, in the training stage, the data acquisition device 360 ​​can be used to obtain the open source large-scale data sets (such as training sets and verification sets) required by the user, and store the data sets in the database 330. The data in the data set can be multiple data of different types obtained through the weather forecast platform 201, weather server 202 and other devices as shown in Figure 2. The data set can include multiple training data (or called training samples). The training data can be image data, video data, audio data, text data, etc., which are specifically related to the target task to be performed and are not limited here. For example, in an embodiment of the present application, the training data can be historical photovoltaic power generation data of a preset time period (replaced with load power data in the load power prediction scenario), historical real meteorological data, historical predicted meteorological data corresponding to the historical real meteorological data, and other numerical time series data (i.e., text data), or image data or video data describing meteorological information. The training device 320 trains the model 301 of the present application (i.e., at least including the first model 3001 and the second model 3002) based on the data set maintained in the database 330. The trained model 301 can be applied to different systems or devices (i.e., the execution device 310), specifically the optical power prediction server 203 as shown in Figure 2. In some special application scenarios, the execution device 310 can also be an edge device or an end-side device, such as a mobile phone, tablet, laptop computer, monitoring system, security system, etc. The execution device 310 can further send the predicted results of the photovoltaic power generation power to the scheduling system 206, visualization workbench 205, etc. as shown in Figure 2 for the next step of operation, or it can be further sent to the data storage server 204 for storage backup. The details are not repeated here.

[0108] During the inference phase, the execution device 310 can access data and code from the data storage system 350, or store data and instructions in the data storage system 350. The data storage system 350 can be located within the execution device 310 or be an external memory device relative to the execution device 310. The calculation module 311 uses the trained model 301 to perform power prediction for each input data point.

[0109] In FIG. 3 , the execution device 310 is configured with an I / O interface 312 for data interaction with external devices. A “user” can input data into the I / O interface 312 through a client device 340 . For example, the client device 340 can be a weather server 202 that is wirelessly connected to the weather forecast platform 201 as shown in FIG2 . The historical power data (such as historical photovoltaic power generation data or historical load power data) and historical forecast weather data stored by the weather server 202 are input as input data to the calculation module 311 of the execution device 310. The calculation module 311 predicts the input data to obtain a prediction result, and then outputs the prediction result to other devices or directly displays it on the display interface of the execution device 310 (if any). In addition, in some embodiments of the present application, the client device 340 can also be integrated into the execution device 310. For example, when the execution device 310 is a mobile phone, the target task can be directly obtained through the mobile phone or the target task sent by other devices (such as another mobile phone). The calculation module 311 in the mobile phone predicts the target task and obtains a prediction result, and directly presents the prediction result on the display interface of the mobile phone. The product form of the execution device 310 and the client device 340 is not limited here.

[0110] It is worth noting that Figure 3 is only a schematic diagram of a system architecture provided by an embodiment of the present application. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in Figure 3, the data storage system 350 is an external memory relative to the execution device 310. In other cases, the data storage system 350 can also be placed in the execution device 310; in Figure 3, the client device 340 is an external device relative to the execution device 310. In other cases, the client device 340 can also be integrated into the execution device 310.

[0111] In some embodiments of the present application, such as in Figure 3 , training device 320 and execution device 310 are independently distributed devices. However, Figure 3 is merely a schematic diagram of the architecture of a task processing system provided by an embodiment of the present invention, and the positional relationships between the devices, components, modules, etc. shown in the figure do not constitute any limitation. In other embodiments of the present application, training device 320 and execution device 310 may be integrated into the same device. Furthermore, the example in Figure 3 is not intended to limit the number of each device. For example, database 330 may communicate with multiple client devices 340.

[0112] It should also be noted that the training process of the model 301 described in the embodiment of the present application can be implemented on the cloud side. For example, the training device 320 on the cloud side (the training device 320 can be set on one or more servers or virtual machines) can obtain the training set and train the model according to multiple sets of training data (or training samples) in the training set to obtain the trained model 301. After that, the trained model 301 is sent to the execution device 310 for application. For example, as described in the system architecture corresponding to Figure 3, the training device 320 trains the model and the trained model 301 is sent to the execution device 310 for use. The training of the model 301 described in the above embodiment can also be implemented on the terminal side, that is, the training device 320 can be located on the terminal side. For example, the training set can be obtained by the terminal device (such as a mobile phone, smart watch, etc.) and the model can be trained according to multiple sets of training data in the training set to obtain the trained model 301. The trained model 301 can be used directly on the terminal device or sent by the terminal device to other devices for use. Specifically, the embodiment of the present application does not limit on which device (cloud side or terminal side) the model 301 is trained or applied.

[0113] In combination with the above description, an embodiment of the present application provides a model training method and a power prediction method, which can be applied to the training stage and the reasoning stage of the model, respectively, and are described below.

[0114] 1. Training Phase

[0115] In an embodiment of the present application, the training phase is the process in which the training device 320 in Figure 3 above uses the training data and verification data in the data set to perform training operations on the model 301 (including at least the first model 3001 and the second model 3002), that is, the process of training the model using the loss function constructed in this application.

[0116] The method flow of the training phase provided by this application may be shown in Figure 4. The method provided by this application may specifically include:

[0117] 501. Get the dataset.

[0118] The data set may include training data and validation data, wherein the data types in the data set include at least historical power data (e.g., power data sampled within the past 24 hours) and historical meteorological data (e.g., meteorological data sampled within the past 24 hours) for a preset time period t (e.g., the past 24 hours). The historical meteorological data may include weather, temperature, humidity, or cloud cover data, etc.

[0119] In addition, in different application scenarios, the data set may also include data related to the scenario. For example, in the load forecasting scenario, the data set may also include text data or image data related to the load. In the photovoltaic power generation scenario,

[0120] In one possible implementation, the historical meteorological data may include historical real meteorological data (e.g., meteorological data sampled over the past 24 hours) and historical predicted meteorological data corresponding to the historical real meteorological data (e.g., real-time meteorological forecast data collected over the past 24 hours corresponding to the sampling time of the real meteorological data). Therefore, when collecting historical meteorological data, both real meteorological data and predicted meteorological data may be collected simultaneously, thereby utilizing multimodal data to implement model updates and obtain a high-precision prediction model with better prediction results.

[0121] In addition, from the perspective of time, the data set may include historical real meteorological data and corresponding historical forecast meteorological data for the first time period, as well as historical forecast meteorological data for the second time period. The first time period and the second time period are data for different time periods, and the second time period is usually the time period after the first time period. The data for the first time period can be used to calculate the first weight and the second weight mentioned below, and the data for the second time period can be used for model training. Of course, the data for the first time period and the second time period can also be used for model training at the same time, and this application does not limit this.

[0122] In one possible implementation, the historical power data may include power generation power or load power. The power generation power includes the power generated by power generation equipment, such as photovoltaic power generation power of photovoltaic power generation equipment. The load power is the power consumed by one or more devices.

[0123] 502. Determine a first weight of a first sub-loss function corresponding to the first model and a second weight of a second sub-loss function corresponding to the second model based on the data set.

[0124] Typically, the first weight and the second weight may be calculated using the historical real meteorological data of the first period and the corresponding historical forecast meteorological data in the aforementioned data set.

[0125] The specific steps of step 502 refer to the introduction of step 402, which will not be repeated here.

[0126] 503. Determine a final target loss function according to the first sub-loss function, the second sub-loss function, the first weight, and the second weight.

[0127] After obtaining the first sub-loss function, the second sub-loss function, the first weight and the second weight, the first sub-loss function can be weighted according to the first weight, and the second sub-loss function can be weighted according to the second weight to obtain the final target loss function.

[0128] The specific steps of step 503 refer to the introduction of step 403, which will not be repeated here.

[0129] 504. Based on the training data and verification data in the data set, each model is trained using the target loss function to obtain a trained high-precision prediction model.

[0130] The trained model includes at least a trained first model and a trained second model. The trained model can be deployed online to complete the prediction task of real-time power data (such as generated power or load power). The first model and the second model can be used to represent the input data, and the data represented by the first model and the second model are not exactly the same.

[0131] Specifically, the first model and the second model can represent data from different dimensions, such as representing different types of data, or representing time domain data or frequency domain data respectively. Optionally, the first model can be used to globally represent the historical power data and the historical meteorological data, and the second model can be used to locally represent the historical meteorological data.

[0132] For example, a time series prediction model (such as a TFC model) can convert the original time series data (such as power data) into frequency domain data, and then perform one representation on the time series data and another different representation on the frequency domain data.

[0133] Optionally, the trained model may include more models and may be used to represent the input data in a different manner than the first model and the second model. The specific method may be determined based on the actual application scenario and will not be described in detail here.

[0134] In addition, during the training process, the historical forecast meteorological data for the second period in the aforementioned data set can be used as model input for training.

[0135] Accordingly, when the historical power data includes generated power, the trained prediction model can be used to predict generated power. When the historical power data includes complex power, the trained prediction model can be used to predict the load power of the electrical equipment. Therefore, the method provided by this application allows for selecting training data based on actual needs, thereby enabling weather-based generation power prediction or load power prediction.

[0136] Therefore, the method provided in this application can utilize the currently available data sources to capture more complete information from different modal data (i.e., historical power data, historical real meteorological data, historical predicted meteorological data and other data types) and different time scales (i.e., preset time lengths, such as the past 24 hours, which can be customized, and the defined length is different, and the time scale is different), so as to optimize the learning model and achieve higher prediction accuracy.

[0137] The method provided in this application can be applied to power generation prediction scenarios, as well as to load prediction scenarios. The following is an illustrative introduction using the photovoltaic power generation scenario as an example. It should be noted that the photovoltaic power generation power mentioned below can also be replaced by load power, that is, the load consumption power of one or more electrical devices, or it can also be replaced by power generated by other power generation methods, which will not be repeated below.

[0138] Please refer to FIG5 for details. FIG5 is a flow chart of a training method for a model provided in an embodiment of the present application, which may specifically include:

[0139] 401. Obtain a data set, the data set including at least historical photovoltaic power generation data of a preset time period, historical real meteorological data, and historical predicted meteorological data corresponding to the historical real meteorological data.

[0140] First, the training device can first obtain a data set, which may include training data and verification data, wherein the data types in the data set include at least historical photovoltaic power generation data of a preset time length t (e.g., the past 24 hours) (e.g., photovoltaic power generation data obtained by sampling within the past 24 hours), historical real meteorological data (e.g., real meteorological data obtained by sampling within the past 24 hours), and historical predicted meteorological data corresponding to the historical real meteorological data (e.g., real-time meteorological forecast data predicted within the past 24 hours and collected corresponding to the sampling time of the real meteorological data).

[0141] It should be noted that in the embodiments of the present application, different time scales are reflected by the preset duration t, that is, the preset duration t can be customized (such as the past 24 hours). The defined length is different, and the predicted time scale is different, depending on the specific application scenario. This application does not limit this.

[0142] 402. Determine a first weight of a first sub-loss function and a second weight of a second sub-loss function based on a data set, wherein the first sub-loss function is a loss function corresponding to the first model, and the second sub-loss function is a loss function corresponding to the second model, wherein the first model is at least used to globally characterize historical photovoltaic power generation data and historical forecast meteorological data, and the second model is used to locally characterize historical forecast meteorological data.

[0143] Afterwards, the training device can further determine the weight (which can be called the first weight) of the loss function (which can be called the first sub-loss function) corresponding to the first model and the weight (which can be called the second weight) of the loss function (which can be called the second sub-loss function) corresponding to the second model based on the above data set.

[0144] It should be noted that in the embodiments of the present application, there is no limitation on the type of the second model. For example, the second model can be TCN, RNN, LSTM, MLP, etc. Similarly, in the embodiments of the present application, the first model can be composed of multiple sub-models. Similarly, the present application does not limit the type of each sub-model. For example, each sub-model constituting the first model can also be TCN, RNN, LSTM, MLP, etc., and the present application does not specifically limit this.

[0145] This step is part of the dataset preprocessing process. The core idea is to obtain the loss weights of different models (e.g., the first model and the second model) based on the training and validation data in the dataset. The final target loss function is then constructed based on the calculated weights. Each model is then trained to obtain a high-precision prediction model. This process of calculating the loss weights of different models is also known as multimodal loss weight calculation, and the corresponding calculation module is called a multimodal loss weight calculation module, which is part of the data preprocessing module.

[0146] It should be noted that, in the embodiment of the present application, the first model is at least used to globally characterize the historical photovoltaic power generation data and the historical forecast meteorological data in the data set, and the second model is used to locally characterize the historical forecast meteorological data in the data set. That is, the input of the first model is the historical photovoltaic power generation data and the historical forecast meteorological data, and the input of the second model is the historical forecast meteorological data. However, it should be noted here that the historical forecast meteorological data input to the first model and the historical photovoltaic power generation data input can be of different time periods. In the input of the first model, the time period of the input historical photovoltaic power generation data (which can be called the time period [t1, t2]) is located before the time period of the input historical forecast meteorological data (which can be called the time period [t2, t3]), wherein t2 is the time point for dividing the future time period to be predicted. For details, please refer to the problem description of Figure 7: That is, when it is necessary to predict the photovoltaic power generation data (i.e., PV fut ∈R n×1 ), the input is the historical photovoltaic power data of the time period [t1, t2] (i.e. PV his ∈R m×1 ) and historical meteorological forecast data for the time period [t2, t3] (i.e., NWP∈R n×dBecause this weather forecast data can be predicted in advance based on the weather forecast platform, it is called historical weather forecast data. Of course, in other embodiments of the present application, the time periods of the various historical data input by the first model may also be slightly different. This is only an example and is not specifically limited in this application.

[0147] Specifically, in some other embodiments of the present application, the first model can be composed of multiple sub-models, which are used to perform global characterization of different types of historical data. As an example, please refer to Figure 6. The structure composed of the first model and the second model can be called a multimodal and multi-scale information fusion module. This module performs information extraction to train the corresponding model. Its core idea is: using multimodal data to perform multi-scale information fusion. As shown in Figure 6, according to the different scales of information extraction, the module can be divided into a first model and a second model, wherein the first model is used to extract global information and obtain global characterization, and the second model is used to extract local information and obtain local characterization. At the same time, in the first model, it can be divided into different sub-models according to the different modalities of the data. For example, the first model can include at least a first sub-model and a second sub-model, wherein the input of the first sub-model is the historical photovoltaic power generation data in the data set, which is used to perform global characterization of the historical photovoltaic power generation data; the input of the second sub-model is the historical forecast meteorological data in the data set, which is used to perform global characterization of the historical forecast meteorological data. It should be noted that Figure 6 is only an example. In other embodiments of the present application, if there are more types of data in the data set, the first model can also be composed of more sub-models to perform global representation of more different types of data. The representation method is similar to that of the first sub-model and the second sub-model, which will not be repeated here.

[0148] To facilitate understanding of the above process, the following uses a specific example to illustrate the processing of each model: It should be noted that the photovoltaic power generation prediction task can be divided into short-term prediction and ultra-short-term prediction according to the prediction time granularity (such as 15min granularity, 1h granularity, etc.) and time length (such as prediction of the next 4h, 24h, 72h, etc.). This example will specifically introduce the process of the short-term prediction task with 1h granularity and prediction of the next 24h length. Other tasks are similar and will not be expanded. The specific description of the problem can be shown in Figure 7. Assume that the given input is: PV his ∈R m×1 , NWP∈R n×d , the output is: PV fut ∈R n×1, specifically described as given historical photovoltaic power generation data, m-step length (i.e., the length of the input, for example, if the historical 24h data is used, then m=24), m and n can be different, and the accuracy is better if they are the same), and NWP data, n-step length (i.e., the length of time to be predicted, for example, if the photovoltaic power generation data for the next 24h is to be predicted, then n=24), d-dimensional data (such as light, temperature, humidity and other dimensional data), it is necessary to predict the future photovoltaic power generation value of the next n-step length. It should be noted that n and m can be the same or different, and this application does not limit this. As can be seen from Figure 6, the first model is used to extract global information and obtain global representation, and the second model is used to extract local information and obtain local representation. At the same time, in the first model, according to the different modalities of the data, it is divided into different first sub-models and second sub-models. The first sub-model receives historical photovoltaic power generation data (i.e., PV his ∈R m×1 ) mode as input to obtain the global representation of historical PV information m (assuming that the current task m is set to 24) time steps; the second sub-model is based on NWP (i.e. NWP∈R n×d ) modal data as input to obtain a global representation of NWP information over n time steps (assuming that n is set to 24 for the current task). Afterwards, the representations of different modalities can be fused to obtain a representation of the global input information from different modal data. For example, the global multimodal representation can be used to complete the mapping to the output based on the MLP model to obtain the output Output0. It should be noted here that the global representations of different sub-models can also be obtained directly without fusion. 01 、Output 02 .

[0149] Similarly, the second model is a local scale representation module, which is based on NWP (i.e., NWP∈R n×d ) modal data as input to model local time scale information. The specific approach is: For the future prediction of photovoltaic power generation PV fut ∈R n×1 At each time step, there is a one-to-one correspondence between NWP data and the PV data to be predicted. It's important to note that the scale of the local representation is not fixed; it's a hyperparameter representing the window size, which is defined by the specific task. In this example, a time window of 1 is assumed (the window size is manually set; only local representation learning is required). This means that only the NWP data at the corresponding time point is used to predict the PV value at that time point. This allows the second model to obtain the local NWP representation, completing a direct mapping from the local NWP representation to the PV value, resulting in the module output value, Output1.

[0150] It should also be noted that, in some embodiments of the present application, the historical real meteorological data and the historical predicted meteorological data for the first time period in the above-mentioned data set may include at least a first sub-data set and a second sub-data set. For example, the historical real meteorological data and the historical predicted meteorological data for the first time period in the above-mentioned data set may be divided into a first sub-data set and a second sub-data set according to a certain ratio (such as 7:3, 6:4, etc., which can be customized). The first sub-data set may also be called a training data set, and the second sub-data set may also be called a verification data set. The historical real meteorological data and the historical predicted meteorological data included in the first sub-data set may be respectively referred to as the first historical real meteorological data (which may be recorded as NWD1) and the first historical predicted meteorological data (which may be recorded as NWP1), and the historical real meteorological data and the historical predicted meteorological data included in the second sub-data set may be respectively referred to as the second historical real meteorological data (which may be recorded as NWD2) and the second historical predicted meteorological data (which may be recorded as NWP2). In this case, one implementation method of determining the first weight of the first sub-loss function and the second weight of the second sub-loss function based on the above-mentioned data set may be: first, determine the accuracy of the first historical forecast meteorological data NWP1 in the first sub-data set based on the data in the first sub-data set (which may be called the first accuracy), and determine the accuracy of the second historical forecast meteorological data NWP2 in the second sub-data set based on the data in the second sub-data set (which may be called the second accuracy). Afterwards, first determine the first weight of the first sub-loss function based on the calculated first accuracy and second accuracy. After obtaining the first weight, the second weight of the second sub-loss function may be further determined based on the first weight.

[0151] Specifically, in some embodiments of the present application, the first accuracy and the second accuracy may be calculated in the following manners, which are respectively described below:

[0152] (1) Calculate the first accuracy

[0153] For calculating the first accuracy, the data in the current training set (i.e., the first sub-dataset) can be sliced ​​using the preset time length t (e.g., 24 hours) as the time window size to obtain M slice segments (which can be called the first slice segment and can be recorded as Q i , 1≤i≤M), then based on each first slice segment Q i The first historical real weather data in NWD 1i and the first historical forecast weather data NWP 1i Calculate each first slice segment Q i The first historical forecast weather data in NWP 1i Accuracy ACC 1i , this accuracy can be called the first target accuracy, and a total of M first target accuracies (i.e. ACC 11ACC 12 ,……,ACC 1M For example, assuming that the first slice segments obtained by data slicing are 5 (i.e., M=5), they are divided into first slice segments Q1-Q5, and the first historical real meteorological data (which can be multiple sampled data) included in the first slice segments Q1-Q5 are respectively recorded as NWD 11 -NWD 15 The first historical forecast meteorological data (which may be multiple sampled data) included in the first slice segments Q1-Q5 are respectively recorded as NWP 11 -NWP 15 , then for the first slice segment Q1, based on the first historical real meteorological data NWD 11 and the first historical forecast weather data NWP 11 Calculate the first historical forecast weather data NWP in the first slice segment Q1 11 First target accuracy ACC 11 Similarly, for the first slice segment Q2, the first historical real meteorological data NWD 12 and the first historical forecast weather data NWP 12 Calculate the first historical forecast weather data NWP in the first slice segment Q2 12 First target accuracy ACC 12 , and so on, the first historical forecast meteorological data NWP corresponding to all the first slice segments Q1-Q5 can be calculated 11 -NWP 15 First target accuracy ACC 11 -ACC 15 .

[0154] It should be noted that, in the embodiment of the present application, the first target accuracy ACC 1i The calculation method can be customized according to actual needs. As an example, a calculation method can be based on the formula ACC 1i =|NWD 1i -NWP 1i |÷NWD 1i Calculated.

[0155] After obtaining M first target accuracy ACC 1i After that, the M first target accuracy ACC can be obtained based on this 1i Statistical features, for example, M first target accuracy ACC 1i The average value of ACC mean , M first target accuracy ACC 1i The minimum value of ACC min , M first target accuracy ACC1i Maximum value of ACC max Finally, according to the M first target accuracy ACC 1i , determine the final first accuracy, which can be the above statistical feature ACC mean ACC min ACC max One or more of .

[0156] (2) Calculate the second accuracy

[0157] For calculating the second accuracy, in some embodiments of the present application, the training device determines the second accuracy of the second historical forecast meteorological data NWP2 based on the data in the second sub-data set (i.e., the validation set) in a manner similar to the above-mentioned manner of determining the first accuracy. Specifically, the data in the second sub-data set is sliced ​​to obtain N slice segments (which may be referred to as second slice segments and may be denoted as P). j , 1≤j≤N), then based on each second slice segment P j Second historical real weather data NWD 2j and second historical forecast weather data NWP 2j , calculate each second slice segment P j Second Historical Forecast Weather Data NWP 2j Accuracy ACC 2j , this accuracy can be called the second target accuracy, and a total of N second target accuracies (i.e. ACC 21 ACC 22 ,……,ACC 2N ).

[0158] Finally, according to the N second target accuracy ACC 2j , determine the second accuracy acc. It should be noted here that the second accuracy acc can be the N second target accuracy ACC mentioned above. 2j The average value of the second accuracy acc=(ACC 21 +ACC 22 +……+ACC 2N )÷N.

[0159] The training device calculates the first accuracy (ACC mean ACC min ACC maxAfter obtaining one or more of the first and second accuracies (i.e., acc), the first weight w of the first sub-loss function corresponding to the first model and the second weight 1-w of the second sub-loss function corresponding to the second model can be converted into the first weight w of the first sub-loss function corresponding to the first model and the second weight 1-w of the second sub-loss function corresponding to the second model according to the first and second accuracies using the corresponding conversion mechanism. As an example, the first weight w can be calculated by the conversion mechanism of the following formula (1):

[0160] It should be noted that the conversion mechanism of the above formula (1) is to convert the statistical feature ACC mean ACC min ACC max All are used, which can improve the accuracy of the calculation of the first weight w, but in other embodiments of the present application, the conversion mechanism can also be a statistical feature ACC mean ACC min ACC max Any one or two of them are not limited in this application.

[0161] It should also be noted that, in the embodiment of the present application, the value of the first weight w and the value of the second accuracy acc need to be in an anti-correlated relationship (e.g., formula (1) conforms to this anti-correlated relationship). The specific role of the first weight w is that, when the prediction accuracy of the NWP data in the verification data is low (i.e., the second accuracy is low), the model used for local characterization (i.e., the second model) is given a lower weight (i.e., the second weight 1-w is small), and the model used for global characterization (i.e., the first model) is given a larger weight (i.e., the w value is large), so as to use global information to compensate for the impact of insufficient accuracy of the NWP data in the verification set, and to focus more on the extraction of global information; on the contrary, when the prediction accuracy of the NWP data in the verification data is high (i.e., the second accuracy is high), the model used for local characterization (i.e., the second model) is given a higher weight (i.e., the 1-w value is large) to obtain more important information in this model.

[0162] 403. Determine a target loss function according to the first sub-loss function, the second sub-loss function, the first weight, and the second weight.

[0163] After obtaining the first weight w and the second weight 1-w, we can use the first sub-loss function (i.e., the above ), the second sub-loss function (that is, the above ), the first weight w and the second weight 1-w determine the final target loss function Loss total Specifically, the objective loss function Loss total It can be expressed by formula (2):

[0164] It should be noted that the premise of the above formula (2) is the form of the fusion of the output results of each sub-model included in the first model (such as the first sub-model and the second sub-model mentioned above). In other embodiments of the present application, the output results of each sub-model may not be fused, and the output of each sub-model may be directly obtained. 01 、Output 02 , in this case, the objective loss function Loss total It can be expressed by formula (3):

[0165] It should be noted that if the first model also includes more sub-models (that is, in addition to the first sub-model and the second sub-model mentioned above), the objective loss function Loss total Corresponding to the output of more sub-models 0k The loss function Where k is the number of the sub-model, and the loss function of each sub-model is The weight can also be w.

[0166] It should also be noted that the loss function type of each sub-item on the right side of the above formula (2) or formula (3) is not limited. For example, it can be a mean absolute error (MAE) loss function. In addition, the types of each sub-loss function can be the same or different, and this application does not specifically limit this.

[0167] It should be noted that in some embodiments of the present application, the model may also include a third model, the input of the third model is the data in the above-mentioned data set (in the inference stage, the input of the third model is real-time input data), the third model may be an MLP, or it may be other types of neural networks with a self-attention mechanism, and the present application does not limit this. Among them, the input data may be part of the data in the data set, or it may be all the data, and the present application does not limit this. The output of the third model is the first adaptive weight α of the first model and the second adaptive weight β of the second model. The third model is used to fuse the output result Output0 of the first model (for ease of explanation, this application uses the fused output result as an example) and the output result Output1 of the second model based on the first adaptive weight α and the second adaptive weight β to obtain the final prediction result Output. The third model can make the prediction result more accurate. Please refer to Figure 8 for details. The third model is an adaptive weighting module. Its core idea is how to fuse the results of the first model and the second model to obtain the final output. For ease of understanding, we still take the above example as an example. For example, the PV of the sample his NWP of the sample and forecast pointi By splicing the prediction points of the sample as input, the adaptive weights α and β of each prediction point of the prediction sample for the first model and the second model can be obtained based on the third model, and the results from the first model and the second model can be integrated to obtain the final prediction result Output. That is: Output i =αOutput 0i +βOutput 1i , where α+β=1 and the subscript i represents the i-th time step prediction of a sample.

[0168] It should be noted that if the model also includes a third model, then the constructed objective loss function Loss total It is also necessary to include the loss function corresponding to the third model. In this case, the final target loss function Loss total It is based on the third sub-loss function Loss corresponding to the third model output , the first sub-loss function (In the case of fusion), the second sub-loss function The first weight w and the second weight 1-w are determined as shown in formula (4):

[0169] If the output results of each sub-model are not integrated, the final target loss function Loss total It can be shown as formula (5):

[0170] 404. According to the data set, the model is trained using the target loss function to obtain a trained model, where the trained model includes at least a trained first model and a trained second model.

[0171] Finally, the training device can use the target loss function Loss according to the training data and verification data in the dataset. total Each model is trained (i.e., n epochs are completed, where n can be customized, such as n=100) to obtain a trained high-precision prediction model. The trained model includes at least a trained first model and a trained second model. After that, the model can be deployed online to complete the task of predicting real-time photovoltaic power generation data.

[0172] 2. Reasoning Stage

[0173] In the embodiment of the present application, the inference stage is the process in which the execution device 310 in Figure 3 uses the trained model 301 (including at least the trained first model 3001 and the trained second model 3002). The trained model can be used to predict power generation or power consumption. For example, a model trained based on historical power generation data can be used to complete real-time photovoltaic power generation data, or a model trained based on historical load power data can be used to predict the load power data of one or more electrical devices.

[0174] Specifically, the process of the prediction method used in the present application can be shown in FIG9 , which may include:

[0175] 901. Obtain input data.

[0176] The input data may include historical power data for a first preset time period (such as 24 hours past the current moment) and predicted meteorological data for a second preset time period (such as 24 hours after the current moment), and the predicted meteorological data may also be referred to as historical predicted meteorological data.

[0177] 902. Input the input data into the model trained in the training phase to obtain predicted power data within a second preset time period.

[0178] After obtaining the input data, the input data can be input into the model trained through the above-mentioned training stage (such as the trained first model and the second model), so as to obtain the predicted power data of at least one preset moment within the second preset time period to be predicted in the future (such as, the second preset time period is 24 hours, the prediction time granularity is 1 hour, then the preset moment is 24 moments for each hour in the next 24 hours).

[0179] In the above-mentioned embodiment of the present application, based on real-time weather forecast data and historical power data as input, the reasoning process is completed using the high-precision model obtained through the above-mentioned training stage, and the reasoning results are fed back to make the prediction accuracy of the reasoning results higher.

[0180] Specifically, the method provided in this application can be applied to power generation scenarios or load prediction scenarios. For example, taking the photovoltaic power generation application scenario as an example, please refer to Figure 10, which is a flow chart of a power prediction method provided in an embodiment of this application, which may specifically include:

[0181] 801. Acquire input data, where the input data includes historical photovoltaic power generation data and historical forecast meteorological data for a first preset time period.

[0182] First, the execution device can obtain input data, which includes historical photovoltaic power generation power data of a preset time period (which can be called the first preset time period, such as the m-step time period mentioned above) and historical predicted meteorological data of a second preset time period (i.e., the time period to be predicted in the future, such as the n-step time period mentioned above). The historical photovoltaic power generation power data and the historical predicted meteorological data can be read from the data storage server 204 shown in Figure 2, wherein the initial historical predicted meteorological data can be obtained based on the meteorological forecast platform 201 shown in Figure 2.

[0183] 802. Input the input data into the trained model to obtain predicted photovoltaic power generation data for at least one preset moment within a second preset time period.

[0184] Afterwards, after obtaining the input data, the execution device can input the input data into the model trained through the above-mentioned training stage (such as the trained first model and the second model), thereby obtaining the predicted photovoltaic power generation power data of at least one preset moment (such as the second preset time period is 24 hours, the prediction time granularity is 1 hour, then the preset moment is 24 moments for each hour in the next 24 hours) within the future predicted time period (which can be called the second preset time period, such as the n-step step length mentioned above).

[0185] In the embodiment of the present application, how the trained model is trained based on the constructed target loss function can be found in the relevant descriptions of the corresponding embodiments of Figures 4 to 10 above, and will not be repeated here.

[0186] In summary, the embodiment method of the present application, as an algorithm framework structure, does not rely on or specify the basic network structure, is not limited to the choice of the basic model, and has strong generalization. Its specific algorithm overall framework can be shown in Figure 11. During the data preprocessing process, the method of the present application obtains the Loss weights of different modalities, utilizes multimodal data, and completes information fusion at multiple scales to achieve more complete information extraction; and, for the outputs generated by data of different modalities and different scales, the addition of the third model can be adaptively weighted and fused to obtain the final prediction result, thereby improving the accuracy of the model.

[0187] To provide a more intuitive understanding of the beneficial effects of the embodiments of this application, the following further compares the technical effects of the embodiments of this application. Specifically, tests were conducted on 13 industrial and commercial photovoltaic power generation sites in 10 provinces in the Huawei dataset, and compared with other existing solutions. From the perspective of average accuracy and single-site performance, the method of this application achieved SOTA results. The comparison of average accuracy can be seen in Figure 12.

[0188] On the basis of the above embodiment, in order to better implement the above scheme of the embodiment of the present application, the following also provides related equipment for implementing the above scheme. Please refer to Figure 13 in detail. Figure 13 is a schematic diagram of a training device provided in the embodiment of the present application. The training device is deployed with a model, which includes at least a first model and a second model. The training device 1100 may specifically include: an acquisition module 1101, a calculation module 1102, a determination module 1103 and a training module 1104, wherein the acquisition module 1101 is used to acquire a data set, which at least includes historical power data of a preset time period (such as historical photovoltaic power generation power data or historical load power data, etc.) and historical meteorological data. Optionally, the historical meteorological data may specifically include historical real meteorological data, historical predicted meteorological data corresponding to the historical real meteorological data, etc.; the calculation module 1102 determines the first weight of the first sub-loss function and the second weight of the second sub-loss function according to the data set, the first sub-loss function is the loss function corresponding to the first model, and the second sub-loss function is the loss function corresponding to the second model, wherein the first model and the second model can be used to characterize the input data, and the data characterized by the first model and the second model are not exactly the same; the determination module 1103, according to the first sub-loss function, the second sub-loss function, the second sub-loss function A weight and the second weight determine a target loss function; a training module 1104 trains the model according to the data set and the target loss function to obtain a trained model, and the trained model at least includes a trained first model and a trained second model, wherein the input of the first model is the historical photovoltaic power generation data and the historical meteorological data (such as when the historical meteorological data includes historical predicted meteorological data, the input of the first model includes historical predicted meteorological data), and the input of the second model is the historical meteorological data (such as when the historical meteorological data includes historical predicted meteorological data, the input of the second model includes historical predicted meteorological data).

[0189] In a possible implementation of the first aspect, the first model and the second model can represent data from different dimensions. For example, the first model and the second model can represent different types of data, or respectively represent time domain data or frequency domain data. Optionally, the first model can be used to globally represent the historical power data and the historical meteorological data, and the second model can be used to locally represent the historical meteorological data.

[0190] In one possible design, the historical meteorological data includes historical real meteorological data of a first time period and corresponding historical predicted meteorological data and historical predicted meteorological data of a second time period. The historical real meteorological data of the first time period and the corresponding historical predicted meteorological data are used to determine the first weight and the second weight, and the historical predicted meteorological data of the second time period is used to train the model.

[0191] In one possible design, the historical real meteorological data of the first time period in the data set and the corresponding historical predicted meteorological data may include a first sub-data set and a second sub-data set, the first sub-data set including the first historical real meteorological data and the first historical predicted meteorological data, the second sub-data set including the second historical real meteorological data and the second historical predicted meteorological data, and the calculation module 1102 is specifically used to: determine the first accuracy of the first historical predicted meteorological data based on the first sub-data set; determine the second accuracy of the second historical predicted meteorological data based on the second sub-data set; determine the first weight of the first sub-loss function based on the first accuracy and the second accuracy; and determine the second weight of the second sub-loss function based on the first weight.

[0192] In a possible design, the value of the first weight is inversely correlated with the value of the second accuracy.

[0193] In one possible design, the calculation module 1102 is further specifically used to: slice the data in the first sub-data set to obtain M first slice segments; calculate the first target accuracy of the first historical predicted meteorological data in each first slice segment based on the first historical real meteorological data and the first historical predicted meteorological data in each first slice segment to obtain M first target accuracies; determine the first accuracy based on the M first target accuracies, and the first accuracy includes the maximum value, minimum value and / or average value of the M first target accuracies.

[0194] In one possible design, the calculation module 1102 is further specifically used to: slice the data in the second sub-data set to obtain N second slice segments; calculate the second target accuracy of the second historical predicted meteorological data in each second slice segment based on the second historical real meteorological data and the second historical predicted meteorological data in each second slice segment to obtain N second target accuracies; determine the second accuracy based on the N second target accuracies, and the second accuracy includes the average value of the N second target accuracies.

[0195] In one possible design, the first model may include at least one of a first sub-model and a second sub-model; the input of the first sub-model is the historical power data in the data set, such as historical photovoltaic power generation power data or historical load power data, which is used to globally characterize the historical power data (historical photovoltaic power generation power data or historical load power data); the input of the second sub-model is the historical predicted meteorological data in the data set, which is used to globally characterize the historical predicted meteorological data.

[0196] In one possible design, the model also includes a third model; the input of the third model is the data in the data set, and the output of the third model is the first adaptive weight of the first model and the second adaptive weight of the second model; the third model is used to fuse the output results of the first model and the output results of the second model based on the first adaptive weight and the second adaptive weight.

[0197] In one possible design, the determination module 1103 is specifically used to determine the target loss function based on the third sub-loss function, the first sub-loss function, the second sub-loss function, the first weight and the second weight, where the third sub-loss function is the loss function corresponding to the third model.

[0198] In one possible design, the first sub-model, the second sub-model, and the second model include any one of the following: TCN, RNN, LSTM, and MLP.

[0199] In one possible design, the third model includes any one of the following: MLP, neural network with self-attention mechanism.

[0200] It should be noted that the information interaction, execution process, etc. between the modules / units in the training device 1100 are based on the same concept as the method embodiments corresponding to Figures 4-5 in this application. For specific contents, please refer to the description in the method embodiments shown above in this application, and will not be repeated here.

[0201] An embodiment of the present application also provides an execution device, specifically refer to Figure 14, which is a schematic diagram of an execution device provided by an embodiment of the present application, wherein the execution device is deployed with a trained model, which includes at least a first model and a second model. The execution device 1200 may specifically include: an acquisition module 1201 and a prediction module 1202, wherein the acquisition module 1201 is used to acquire input data, which includes historical photovoltaic power generation data of a first preset time period and historical predicted meteorological data of a second preset time period; the prediction module 1202 is used to input the input data into the trained model to obtain predicted photovoltaic power generation data for at least one preset moment within the second preset time period, and the trained model includes at least a trained first model and a trained second model, wherein the trained first model and the trained second model are used to characterize the input data, and the data characterized by the model and the second model are not exactly the same, and the representations output by the trained first model and the trained second model are used to obtain predicted power data for at least one preset moment within the second preset time period.

[0202] In one possible implementation, the trained first model can be used to globally characterize the historical power data of a first preset time period or the predicted meteorological data of a second preset time period, and the trained second model can be used to locally characterize the predicted meteorological data of the second preset time period. The global characterization and the local characterization can be used to obtain the predicted power data of at least one preset moment within the second preset time period.

[0203] The model training process can be specifically referred to the process of the aforementioned training phase.

[0204] Optionally, the predicted power data for at least one preset moment within the second preset duration includes the generated power or load power at at least one preset moment within the second preset duration. The generated power includes the power generated by the power generation equipment, and the load power is the power consumed by one or more devices. Therefore, the method provided in this application can achieve meteorological-based generation power prediction or load power prediction.

[0205] Optionally, the trained model is trained using a target loss function based on a data set, where the data set includes at least historical power data and historical meteorological data for a third preset time period. Optionally, the historical power data may include historical photovoltaic power generation data or historical load power data; the historical meteorological data may include historical real meteorological data and historical predicted meteorological data corresponding to the historical real meteorological data. The target loss function is determined based on a first sub-loss function, a second sub-loss function, a first weight of the first sub-loss function, and a second weight of the second sub-loss function. The first sub-loss function is the loss function corresponding to the first model, the second sub-loss function is the loss function corresponding to the second model, and the first weight and the second weight are determined based on the data set.

[0206] In one possible design, the first model includes at least a first sub-model and a second sub-model; the input of the first sub-model is the historical power data in the data set, which is used to globally characterize the historical power data; the input of the second sub-model is the historical meteorological data in the data set, which is used to globally characterize the historical meteorological data. For example, for a photovoltaic power generation scenario, the input of the first sub-model is the historical photovoltaic power generation power data, which is used to globally characterize the historical photovoltaic power generation power data; the input of the second sub-model is the historical forecast meteorological data, which is used to globally characterize the historical forecast meteorological data. For a load forecast scenario, the input of the first sub-model is the historical load power data, which is used to globally characterize the historical power complex data; the input of the second sub-model is the historical forecast meteorological data, which is used to globally characterize the historical forecast meteorological data.

[0207] In one possible design, the model also includes a third model; the input of the third model is the input data, and the output of the third model is the first adaptive weight of the first model and the second adaptive weight of the second model; the third model is used to fuse the output results of the first model and the output results of the second model based on the first adaptive weight and the second adaptive weight.

[0208] In one possible design, the first sub-model, the second sub-model, and the second model include any one of the following: TCN, RNN, LSTM, and MLP.

[0209] In one possible design, the third model includes any one of the following: MLP, neural network with self-attention mechanism.

[0210] It should be noted that the information interaction, execution process, etc. between the modules / units in the execution device 1200 are based on the same concept as the method embodiment corresponding to Figure 9 in this application. For specific contents, please refer to the description in the method embodiment shown above in this application, and will not be repeated here.

[0211] Next, another training device provided by an embodiment of the present application will be introduced. Please refer to Figure 15, which is a structural diagram of a training device provided by an embodiment of the present application. The training device 1100 described in the embodiment corresponding to Figure 13 can be deployed on the training device 1300 to implement the functions of the training device 1100 in the embodiment corresponding to Figure 13. Specifically, the training device 1300 is implemented by one or more servers. The training device 1300 may have relatively large differences due to different configurations or performance. It may include one or more central processing units (CPUs) 1322 and memories 1332, and one or more storage media 1330 (for example, one or more mass storage devices) for storing application programs 1342 or data 1344. Among them, the memories 1332 and storage media 1330 can be temporary storage or persistent storage. The program stored in the storage medium 1330 may include one or more modules (not shown in the figure), each of which may include a series of instruction operations in the training device 1300. Furthermore, the central processing unit 1322 may be configured to communicate with the storage medium 1330 and execute a series of instruction operations in the storage medium 1330 on the training device 1300 .

[0212] The training device 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1358, and / or one or more operating systems 1341, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0213] In an embodiment of the present application, the central processing unit 1322 is used to execute the training method of the model executed by the training device in the corresponding embodiment of Figures 4 and 5. For example, the central processing unit 1322 can be used to: first, a data set can be obtained, and the data set can include training data and verification data, wherein the data type in the data set at least includes historical photovoltaic power generation data of a preset time length t (such as the past 24 hours) (such as photovoltaic power generation data obtained by sampling within the past 24 hours), historical real meteorological data (such as real meteorological data obtained by sampling within the past 24 hours), and historical predicted meteorological data corresponding to historical real meteorological data (such as real-time meteorological forecast data collected corresponding to the sampling time of real meteorological data predicted within the past 24 hours). Afterwards, the first weight of the first sub-loss function and the second weight of the second sub-loss function are determined according to the data set, the first sub-loss function is the loss function corresponding to the first model, and the second sub-loss function is the loss function corresponding to the second model, wherein the first model is at least used to globally characterize the historical photovoltaic power generation data and the historical predicted meteorological data, and the second model is used to locally characterize the historical predicted meteorological data. After obtaining the first weight and the second weight, the target loss function is determined based on the first sub-loss function, the second sub-loss function, the first weight, and the second weight. Finally, the target loss function is used to train each model based on the training data and validation data in the dataset (i.e., complete n epochs, where n can be customized, such as n = 100), to obtain a trained high-precision prediction model. The trained model includes at least the trained first model and the trained second model. After that, the model can be deployed online to complete the task of predicting real-time photovoltaic power generation data.

[0214] It should be noted that the specific manner in which the central processing unit 1322 executes the above steps is based on the same concept as the method embodiments corresponding to Figures 4-5 of this application, and the technical effects it brings are also the same as the above embodiments of this application. For specific content, please refer to the description in the method embodiments shown above in this application, and will not be repeated here.

[0215] Next, an execution device provided by an embodiment of the present application is introduced. Please refer to Figure 16. Figure 16 is a structural schematic diagram of an execution device provided by an embodiment of the present application. The execution device 1400 can be specifically expressed as the optical power prediction server 203 shown in Figure 2, or it can be various other terminal devices, such as mobile phones, tablets, laptops, monitoring data processing equipment, etc., which are not limited here. Among them, the execution device 1400 can be deployed with the execution device 1200 described in the embodiment corresponding to Figure 14 to implement the functions of the execution device 1200 in the embodiment corresponding to Figure 14. Specifically, the execution device 1400 includes: a receiver 1401, a transmitter 1402, a processor 1403 and a memory 1404 (wherein the number of processors 1403 in the execution device 1400 can be one or more, and Figure 16 takes one processor as an example), wherein the processor 1403 may include an application processor 14031 and a communication processor 14032. In some embodiments of the present application, the receiver 1401, the transmitter 1402, the processor 1403 and the memory 1404 can be connected via a bus or other means.

[0216] Memory 1404 may include read-only memory and random access memory, and provides instructions and data to processor 1403. A portion of memory 1404 may also include non-volatile random access memory (NVRAM). Memory 1404 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.

[0217] Processor 1403 controls the operation of execution device 1400. In specific applications, the various components of execution device 1400 are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all of these buses are collectively referred to as a bus system in the figure.

[0218] The methods disclosed in the embodiments corresponding to Figures 9 and 10 of this application can be applied to or implemented by processor 1403. Processor 1403 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in processor 1403. The above processor 1403 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and can further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 1403 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiment corresponding to Figure 8 of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 1404, and processor 1403 reads the information in memory 1404 and, in conjunction with its hardware, completes the steps of the above method.

[0219] Receiver 1401 can be used to receive input digital or character information and generate signal input related to executing relevant settings and function control of device 1400. Transmitter 1402 can be used to output digital or character information through the first interface. Transmitter 1402 can also be used to send instructions to the disk pack through the first interface to modify data in the disk pack. Transmitter 1402 can also include a display device such as a display screen.

[0220] In one embodiment of the present application, processor 1403 is configured to perform corresponding data processing on input data using a trained model (e.g., a trained first model and a trained second model) to obtain corresponding output data (i.e., a prediction result). The trained model may be obtained using the training method corresponding to Figures 4 and 5 of the present application. For details, please refer to the description of the method embodiment shown above in the present application, and will not be repeated here.

[0221] A computer-readable storage medium is also provided in an embodiment of the present application, which stores a program for signal processing. When the computer-readable storage medium is run on a computer, it enables the computer to execute the steps executed by the training device described in the embodiment shown above, or enables the computer to execute the steps executed by the execution device described in the embodiment shown in Figure 8 above.

[0222] The training device, execution device, etc. provided in the embodiments of the present application may specifically be a chip, which includes a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin, or a circuit. The processing unit may execute computer-executable instructions stored in the storage unit to cause the chip within the training device to perform the steps performed by the training device described in the embodiments shown in Figures 4 and 5 , or to cause the chip within the execution device to perform the steps performed by the execution device described in the embodiments shown in Figures 9 and 10 .

[0223] Optionally, the storage unit is a storage unit within the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0224] Specifically, see Figure 17 , which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be implemented as a neural network processor (NPU) 200. NPU 200 is mounted on a host CPU (host CPU) as a coprocessor, with tasks assigned by the host CPU. The core of the NPU is arithmetic circuit 2003, which is controlled by controller 2004 to extract matrix data from memory and perform multiplication operations.

[0225] In some implementations, arithmetic circuit 2003 includes multiple processing engines (PEs). In some implementations, arithmetic circuit 2003 is a two-dimensional systolic array. Arithmetic circuit 2003 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, arithmetic circuit 2003 is a general-purpose matrix processor.

[0226] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 2002 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 2001 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 2008.

[0227] Unified memory 2006 is used to store input and output data. Weight data is directly transferred to weight memory 2002 through direct memory access controller (DMAC) 2005. Input data is also transferred to unified memory 2006 through DMAC.

[0228] The bus interface unit 2010 (BIU) is used for interaction between the AXI bus, the DMAC, and the instruction fetch buffer (IFB) 2009 .

[0229] The bus interface unit 2010 is used for the instruction fetch memory 2009 to obtain instructions from the external memory, and is also used for the storage unit access controller 2005 to obtain the original data of the input matrix A or the weight matrix B from the external memory.

[0230] DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 2006 or transfer weight data to the weight memory 2002 or transfer input data to the input memory 2001.

[0231] The vector calculation unit 2007 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.

[0232] In some implementations, the vector calculation unit 2007 can store the processed output vector to the unified memory 2006. For example, the vector calculation unit 2007 can apply a linear function and / or a nonlinear function to the output of the operation circuit 2003, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values ​​to generate an activation value. In some implementations, the vector calculation unit 2007 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 2003, such as for use in subsequent layers in a neural network.

[0233] An instruction fetch buffer 2009 connected to the controller 2004 is used to store instructions used by the controller 2004;

[0234] Unified memory 2006, input memory 2001, weight memory 2002, and instruction fetch memory 2009 are all on-chip memories. External memories are private to the NPU hardware architecture.

[0235] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above-mentioned first aspect method.

[0236] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0237] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0238] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0239] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, computer, training device or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

Claims

1. A model training method, wherein the model comprises at least a first model and a second model, characterized in that: include: Acquire a data set, wherein the data set includes historical power data and historical meteorological data of a preset time period; Determining a first weight of a first sub-loss function and a second weight of a second sub-loss function according to the data set, wherein the first sub-loss function is a loss function corresponding to the first model, and the second sub-loss function is a loss function corresponding to the second model, wherein the first model and the second model are used to characterize input data, and the data characterized by the first model and the second model are not completely the same; Determine a target loss function according to the first sub-loss function, the second sub-loss function, the first weight, and the second weight; According to the data set, the model is trained using the target loss function to obtain a trained model, and the trained model at least includes a trained first model and a trained second model.

2. The method according to claim 1, characterized in that: The first model is used to globally characterize the historical power data and the historical meteorological data, and the second model is used to locally characterize the historical meteorological data.

3. The method according to claim 1 or 2, characterized in that: The historical meteorological data includes historical real meteorological data of a first time period and corresponding historical predicted meteorological data and historical predicted meteorological data of a second time period. The historical real meteorological data of the first time period and the corresponding historical predicted meteorological data are used to determine the first weight and the second weight, and the historical predicted meteorological data of the second time period is used to train the model.

4. The method according to claim 3, characterized in that The historical real meteorological data of the first time period and the corresponding historical forecast meteorological data include a first sub-dataset and a second sub-dataset, the first sub-dataset includes first historical real meteorological data and first historical forecast meteorological data, the second sub-dataset includes second historical real meteorological data and second historical forecast meteorological data, and the determining of the first weight of the first sub-loss function and the second weight of the second sub-loss function according to the data sets includes: determining a first accuracy of the first historical forecast meteorological data according to the first sub-dataset; determining a second accuracy of the second historical forecast meteorological data according to the second sub-dataset; Determining a first weight of a first sub-loss function according to the first accuracy and the second accuracy; A second weight of a second sub-loss function is determined according to the first weight.

5. The method according to claim 4, characterized in that The value of the first weight is inversely correlated with the value of the second accuracy.

6. The method according to any one of claims 4 to 5, characterized in that: Determining the first accuracy of the first historical forecast meteorological data according to the first sub-dataset includes: Slicing the data in the first sub-data set to obtain M first slice segments; Based on the first historical real meteorological data and the first historical predicted meteorological data in each of the first slice segments, calculating the first target accuracy of the first historical predicted meteorological data in each of the first slice segments to obtain M first target accuracies; The first accuracy is determined according to the M first target accuracies, where the first accuracy includes a maximum value, a minimum value and / or an average value of the M first target accuracies.

7. The method according to any one of claims 4 to 6, characterized in that: Determining the second accuracy of the second historical forecast meteorological data according to the second sub-data set includes: Slicing the data in the second sub-data set to obtain N second slice segments; Based on the second historical real meteorological data and the second historical predicted meteorological data in each of the second slice segments, calculating the second target accuracy of the second historical predicted meteorological data in each of the second slice segments, to obtain N second target accuracies; The second accuracy is determined according to the N second target accuracies, wherein the second accuracy includes an average value of the N second target accuracies.

8. The method according to any one of claims 3 to 7, characterized in that: The first model includes at least one of a first sub-model and a second sub-model; The input of the first sub-model is the historical power data in the data set, and is used to globally characterize the historical power data; The input of the second sub-model is the historical forecast meteorological data in the data set, which is used to globally characterize the historical forecast meteorological data.

9. The method according to any one of claims 1 to 8, characterized in that The historical power data includes power generation power or load power. The power generation power includes the power generated by the power generation equipment, and the load power is the power consumed by one or more devices.

10. The method according to any one of claims 1 to 9, characterized in that The model also includes a third model; The input of the third model is the data in the data set, and the output of the third model is the first adaptive weight of the first model and the second adaptive weight of the second model; The third model is used to fuse the output result of the first model and the output result of the second model based on the first adaptive weight and the second adaptive weight.

11. The method according to claim 10, characterized in that Determining the target loss function according to the first sub-loss function, the second sub-loss function, the first weight, and the second weight includes: A target loss function is determined according to a third sub-loss function, the first sub-loss function, the second sub-loss function, the first weight, and the second weight, wherein the third sub-loss function is a loss function corresponding to the third model.

12. The method according to claim 8, characterized in that The first sub-model, the second sub-model, and the second model include any one of the following: Temporal convolutional network TCN, recurrent neural network RNN, long short-term memory network LSTM, multi-layer perceptron MLP.

13. The method according to any one of claims 10-11, characterized in that: The third model includes any one of the following: Multi-layer perceptron MLP, neural network with self-attention mechanism.

14. A power prediction method, characterized in that: include: Acquire input data, wherein the input data includes historical power data of a first preset time period and predicted meteorological data of a second preset time period; The input data is input into the trained model to obtain predicted power data for at least one preset moment within the second preset time period, the trained model includes at least a trained first model and a trained second model, the trained first model and the trained second model are used to characterize the input data, and the data characterized by the model and the second model are not exactly the same, and the characterizations output by the trained first model and the trained second model are used to obtain predicted power data for at least one preset moment within the second preset time period.

15. The method according to claim 14, characterized in that The trained first model is used to globally characterize the historical power data of the first preset time period or the predicted meteorological data of the second preset time period, and the trained second model is used to locally characterize the predicted meteorological data of the second preset time period. The global characterization and the local characterization are used to obtain the predicted power data at at least one preset moment within the second preset time period.

16. The method according to claim 14 or 15, characterized in that The first model includes at least a first sub-model and a second sub-model; The input of the first sub-model is the historical power data, and is used to globally characterize the historical power data; The input of the second sub-model is the predicted meteorological data, which is used to perform global characterization on the predicted meteorological data.

17. The method according to any one of claims 14 to 16, characterized in that: The predicted power data of at least one preset moment within the second preset time period includes the power generation power or load power of at least one preset moment within the second preset time period, the power generation power includes the power generated by the power generation equipment, and the load power is the power consumed by one or more devices.

18. The method according to any one of claims 14 to 16, characterized in that: The model also includes a third model; The input of the third model is the input data, and the output of the third model is the first adaptive weight of the first model and the second adaptive weight of the second model; The third model is used to fuse the output result of the first model and the output result of the second model based on the first adaptive weight and the second adaptive weight.

19. The method according to claim 16, characterized in that The first sub-model, the second sub-model, and the second model include any one of the following: Temporal convolutional network TCN, recurrent neural network RNN, long short-term memory network LSTM, multi-layer perceptron MLP.

20. The method according to claim 18, characterized in that The third model includes any one of the following: Multi-layer perceptron MLP, neural network with self-attention mechanism.

21. A training device, characterized in that The training device is deployed with a model, the model includes at least a first model and a second model, and the training device includes: An acquisition module, used to acquire a data set, wherein the data set at least includes historical power data and historical meteorological data of a preset time period; A calculation module, which determines a first weight of a first sub-loss function and a second weight of a second sub-loss function according to the data set, wherein the first sub-loss function is a loss function corresponding to the first model, and the second sub-loss function is a loss function corresponding to the second model, and the first model and the second model are used to characterize input data, and the data characterized by the first model and the second model are not completely the same; A determination module, which determines a target loss function according to the first sub-loss function, the second sub-loss function, the first weight, and the second weight; A training module trains the model according to the data set and using the target loss function to obtain a trained model, wherein the trained model at least includes a trained first model and a trained second model.

22. The device according to claim 21, characterized in that The first model is used to globally characterize the historical power data and the historical meteorological data, and the second model is used to locally characterize the historical meteorological data.

23. The device according to claim 21 or 22, characterized in that The historical meteorological data includes historical real meteorological data of a first time period and corresponding historical predicted meteorological data and historical predicted meteorological data of a second time period. The historical real meteorological data of the first time period and the corresponding historical predicted meteorological data are used to determine the first weight and the second weight, and the historical predicted meteorological data of the second time period is used to train the model.

24. The device according to claim 23, characterized in that The historical real meteorological data of the first time period and the corresponding historical forecast meteorological data include a first sub-dataset and a second sub-dataset, the first sub-dataset includes first historical real meteorological data and first historical forecast meteorological data, the second sub-dataset includes second historical real meteorological data and second historical forecast meteorological data, and the calculation module is specifically used to: determining a first accuracy of the first historical forecast meteorological data according to the first sub-dataset; determining a second accuracy of the second historical forecast meteorological data according to the second sub-dataset; Determining a first weight of a first sub-loss function according to the first accuracy and the second accuracy; A second weight of a second sub-loss function is determined according to the first weight.

25. The device according to claim 24, characterized in that The value of the first weight is inversely correlated with the value of the second accuracy.

26. The device according to any one of claims 24-25, characterized in that The computing module is further specifically used for: Slicing the data in the first sub-data set to obtain M first slice segments; Based on the first historical real meteorological data and the first historical predicted meteorological data in each of the first slice segments, calculating the first target accuracy of the first historical predicted meteorological data in each of the first slice segments to obtain M first target accuracies; The first accuracy is determined according to the M first target accuracies, where the first accuracy includes a maximum value, a minimum value and / or an average value of the M first target accuracies.

27. The device according to any one of claims 24 to 26, characterized in that The computing module is further specifically used for: Slicing the data in the second sub-data set to obtain N second slice segments; Based on the second historical real meteorological data and the second historical predicted meteorological data in each of the second slice segments, calculating the second target accuracy of the second historical predicted meteorological data in each of the second slice segments, to obtain N second target accuracies; The second accuracy is determined according to the N second target accuracies, wherein the second accuracy includes an average value of the N second target accuracies.

28. The device according to any one of claims 21 to 27, characterized in that The first model includes at least one of a first sub-model and a second sub-model; The input of the first sub-model is the historical power data in the data set, and is used to globally characterize the historical power data; The input of the second sub-model is the historical forecast meteorological data in the data set, which is used to globally characterize the historical forecast meteorological data.

29. The device according to any one of claims 21 to 28, characterized in that The historical power data includes power generation power or load power. The power generation power includes the power generated by the power generation equipment, and the load power includes the power consumed by one or more devices.

30. The device according to any one of claims 21 to 29, characterized in that The model also includes a third model; The input of the third model is the data in the data set, and the output of the third model is the first adaptive weight of the first model and the second adaptive weight of the second model; The third model is used to fuse the output result of the first model and the output result of the second model based on the first adaptive weight and the second adaptive weight.

31. The device according to claim 30, characterized in that The determining module is specifically used for: A target loss function is determined according to a third sub-loss function, the first sub-loss function, the second sub-loss function, the first weight, and the second weight, wherein the third sub-loss function is a loss function corresponding to the third model.

32. The device according to claim 29, characterized in that The first sub-model, the second sub-model, and the second model include any one of the following: Temporal convolutional network TCN, recurrent neural network RNN, long short-term memory network LSTM, multi-layer perceptron MLP.

33. The device according to any one of claims 30 to 32, characterized in that The third model includes any one of the following: Multi-layer perceptron MLP, neural network with self-attention mechanism.

34. An execution device, characterized in that: The execution device is deployed with a trained model, the model includes at least a first model and a second model, and the execution device includes: An acquisition module, configured to acquire input data, wherein the input data includes historical power data of a first preset time period and predicted meteorological data of a second preset time period; A prediction module is used to input the input data into a trained model to obtain predicted power data for at least one preset moment within the second preset time period, wherein the trained model includes at least a trained first model and a trained second model, wherein the trained first model and the trained second model are used to characterize the input data, and the data characterized by the model and the second model are not exactly the same, and the characterizations output by the trained first model and the trained second model are used to obtain predicted power data for at least one preset moment within the second preset time period.

35. The device according to claim 34, characterized in that The trained first model is used to globally characterize the historical power data of the first preset time period or the predicted meteorological data of the second preset time period, and the trained second model is used to locally characterize the predicted meteorological data of the second preset time period. The global characterization and the local characterization are used to obtain the predicted power data at at least one preset moment within the second preset time period.

36. Apparatus according to claim 34 or 35, characterised in that The first model includes at least a first sub-model and a second sub-model; The input of the first sub-model is the historical power data, and is used to globally characterize the historical power data; The input of the second sub-model is the predicted meteorological data, which is used to perform global characterization on the predicted meteorological data.

37. The device according to any one of claims 34 to 36, characterized in that The predicted power data of at least one preset moment within the second preset time period includes the power generation power or load power of at least one preset moment within the second preset time period, the power generation power includes the power generated by the power generation equipment, and the load power is the power consumed by one or more devices.

38. The device according to any one of claims 34 to 37, characterized in that The model also includes a third model; The input of the third model is the input data, and the output of the third model is the first adaptive weight of the first model and the second adaptive weight of the second model; The third model is used to adjust the output result of the first model and the output result of the first model based on the first adaptive weight and the second adaptive weight. The output results of the second model are fused.

39. The device according to claim 36, characterized in that The first sub-model, the second sub-model, and the second model include any one of the following: Temporal convolutional network TCN, recurrent neural network RNN, long short-term memory network LSTM, multi-layer perceptron MLP.

40. The apparatus according to claim 38, characterized in that The third model includes any one of the following: Multi-layer perceptron MLP, neural network with self-attention mechanism.

41. A training device, comprising a processor and a memory, wherein the processor is coupled to the memory, characterized in that: The memory is used to store programs; The processor is used to execute the program in the memory so that the training device executes the method as described in any one of claims 1-13.

42. An execution device, comprising a processor and a memory, wherein the processor is coupled to the memory, characterized in that: The memory is used to store programs; The processor is used to execute the program in the memory, so that the execution device executes the method according to any one of claims 14 to 20.

43. A computer-readable storage medium, characterized in that The invention comprises a program which, when being run on a computer, causes the computer to execute the method according to any one of claims 1 to 20.

44. A computer program product comprising instructions, characterized in that When the method is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 20.

45. A chip, characterized in that: The chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method as described in any one of claims 1-20.

Citation Information

Patent Citations

  • Model training method, power prediction method and device

    CN117131974A

  • Text classification model building and text classification methods and apparatuses

    CN107908635A

  • Photovoltaic power station power prediction method and system based on recurrent neural network

    CN113919232A

  • Model training method, photovoltaic power generation power prediction method and device

    CN116502692A

  • Calculator system, demand prediction method of item, and program

    JP2023009811A

Cited By

  • Gas pipe network supply end initial value assignment method, device, equipment and medium

    CN119151257A

  • Photovoltaic participation multi-energy power supply method and system based on machine learning

    CN119341084A

  • Power grid control method, control device and electronic equipment

    CN119543124A

  • Industrial key parameter long-time prediction method based on double-offset fragment division and adaptive normalization

    CN119596870A

  • Deep cone concentration machine modeling method and system based on state space

    CN119670535A