Photovoltaic power prediction method and device based on multi-scale meteorological features
Patent Information
- Application Number
- CN202610696158.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-20
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-05-20
AI Technical Summary
[0004]针对上述问题,目前尚未提出有效的解决方案
[0022]基于本说明书提供的基于多尺度气象特征的光伏功率预测方法和装置,具体实施前,可以利用样本数据训练得到基于改进的多通道Transformer网络,且适配于处理多尺度的气象数据的光伏功率预测模型。具体实施时,在获取关于目标光伏电站的第一时间段的多个尺度的气象数据之后,可以先根据预设的模型检测规则,判断当前的光伏功率预测模型是否满足预设的自适应学习条件;在确定满足预设的自适应学习条件的情况下,根据预设的模型更新规则,构造并利用改进的EWC损失函数,对当前的光伏功率预测模型进行预设的自适应学习,得到更新后的光伏功率预测模型;再根据预设的数据处理规则,利用第一时间段的多个尺度的气象数据,构造得到相对应的多通道特征向量;并利用更新后的光伏功率预测模型通过处理所述多通道特征向量,以及目标光伏电站的当前电站属性参数,确定目标光伏电站第二时间段的光伏发电功率。一方面,通过监测是否满足预设的自适应学习条件,自动触发构建并根据改进的EWC损失函数,对当前的光伏功率预测模型进行预设的自适应学习,能够使得模型在学习并适应新的数据变化状况的同时,避免丢失原有的重要知识,得到效果较好且运行稳定的更新后的光伏功率预测模型;另一方面,通过利用基于改进的多通道Transformer网络结构的更新后的光伏功率预测模型处理第一时间段的多个尺度的气象数据,能够全面、充分地融合利用不同时空尺度分辨率的气象数据信息,高效、精准地预测出目标光伏电站的光伏发电功率,有效地减少光伏发电功率的预测误差。
Smart Images

Figure CN122315637B_ABST
Abstract
Description
Technical Field
[0001] This specification belongs to the field of artificial intelligence technology, and in particular relates to a photovoltaic power prediction method and device based on multi-scale meteorological characteristics. Background Technology
[0002] Photovoltaic power generation, as one of the most promising renewable energy sources, has attracted increasing attention. Many photovoltaic power plants have already been connected to the power grid.
[0003] Predicting the photovoltaic (PV) power output of a photovoltaic (PV) power plant is crucial for stable grid operation and the scheduling and maintenance of PV power plants. Most existing methods employ static models to predict PV power output. However, these methods often suffer from large prediction errors, and the model's performance tends to degrade after a period of use, further affecting prediction accuracy. These problems are particularly pronounced when long-term predictions of PV power output are required.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This specification provides a photovoltaic power prediction method and device based on multi-scale meteorological characteristics, which can efficiently and accurately predict the photovoltaic power generation of a target photovoltaic power station and effectively reduce the prediction error of photovoltaic power generation.
[0006] This specification provides a photovoltaic power prediction method based on multi-scale meteorological characteristics, including: Acquire meteorological data at multiple scales for the first time period of the target photovoltaic power plant; According to the preset model detection rules, the current photovoltaic power prediction model is tested to see if it meets the preset adaptive learning conditions; wherein, the current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network. Under the condition that the preset adaptive learning conditions are met, the improved EWC loss function is constructed and used to perform preset adaptive learning on the current photovoltaic power prediction model according to the preset model update rules, so as to obtain the updated photovoltaic power prediction model. Based on the preset data processing rules, the corresponding multi-channel feature vectors are constructed using meteorological data at multiple scales in the first time period. By using the updated photovoltaic power prediction model and processing the multi-channel feature vector, as well as the current power station attribute parameters of the target photovoltaic power station, the corresponding target prediction result is obtained. Based on the target prediction results, determine the photovoltaic power generation capacity of the target photovoltaic power station in the second time period.
[0007] In one embodiment, the meteorological data at multiple scales includes: first-scale meteorological data, second-scale meteorological data, and third-scale meteorological data; The first-scale meteorological data includes global meteorological data with a resolution of 25 km, the second-scale meteorological data includes regional meteorological data with a resolution of 3 km, and the third-scale meteorological data includes measured meteorological data within the local area where the target photovoltaic power station is located.
[0008] In one embodiment, detecting whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to preset model detection rules includes: Based on the preset model detection rules, obtain multi-scale meteorological data, measured photovoltaic power generation data, and current power station attribute parameters of the target photovoltaic power station for the historical reference time period before the current time point; Based on the third-scale meteorological data of the historical reference time period, it is detected whether the degree of change of meteorological data in the local area where the target photovoltaic power station is located is greater than the preset first degree of change threshold; based on the current power station attribute parameters of the target photovoltaic power station, it is detected whether the degree of change of the power generation performance of the target photovoltaic power station is greater than the preset second degree of change threshold. If the degree of change in meteorological data in the local area where the target photovoltaic power station is located is greater than a preset first degree of change threshold, and / or the degree of change in the power generation performance of the target photovoltaic power station is greater than a preset second degree of change threshold, a matching target sliding window is determined based on the change characteristics of the third-scale meteorological data in the historical reference time period. By using the current photovoltaic power prediction model and processing multi-scale meteorological data for a historical reference period, the predicted photovoltaic power generation data for that historical reference period can be determined. Using a target sliding window, the normalized root mean square error of the current photovoltaic power prediction model is calculated based on the predicted and measured photovoltaic power generation data for historical reference time periods. Check whether the normalized root mean square error of the current photovoltaic power prediction model is greater than the preset error threshold. If the normalized root mean square error of the current photovoltaic power prediction model is greater than the preset error threshold, then the current photovoltaic power prediction model is determined to meet the preset adaptive learning conditions.
[0009] In one embodiment, the step of constructing and utilizing an improved EWC loss function to perform pre-defined adaptive learning on the current photovoltaic power prediction model according to a preset model update rule includes: Based on the preset model update rules, construct the physical consistency loss term and the time smoothness loss term for the current photovoltaic power prediction model; An improved EWC loss function is constructed using the aforementioned physical consistency loss term and temporal smoothness loss term; By utilizing multi-scale meteorological data from historical reference periods and measured photovoltaic power generation data, an incremental sample set is constructed for the current photovoltaic power prediction model. Based on the improved EWC loss function, the current photovoltaic power prediction model is subjected to pre-defined adaptive learning using the incremental sample set to obtain an updated photovoltaic power prediction model.
[0010] In one embodiment, the step of constructing a corresponding multi-channel feature vector using meteorological data at multiple scales over a first time period according to preset data processing rules includes: According to the preset data processing rules, the first-scale meteorological data, the second-scale meteorological data, and the third-scale meteorological data are preprocessed accordingly to obtain the preprocessed first-scale meteorological data, the preprocessed second-scale meteorological data, and the preprocessed third-scale meteorological data. Based on the preprocessed first-scale meteorological data, the Euclidean distance between each location point and its neighboring associated location points, as well as the meteorological gradient sensitivity factor of the neighboring associated location points, are calculated. Based on the Euclidean distance between each location point and its neighboring associated location points, and the meteorological gradient sensitivity factor of the neighboring associated location points, the meteorological data of each location point in the preprocessed first-scale meteorological data are subjected to improved gradient-sensitive inverse distance weighted interpolation to obtain the interpolated first-scale meteorological data. Based on the second-scale meteorological data, the preprocessed third-scale meteorological data is upsampled to obtain upsampled third-scale meteorological data that matches the second-scale meteorological data. Based on the interpolated first-scale meteorological data, the preprocessed second-scale meteorological data, and the upsampled third-scale meteorological data, corresponding multi-channel feature vectors are constructed.
[0011] In one embodiment, the step of performing improved gradient-sensitive inverse distance weighted interpolation on the meteorological data of each location point in the preprocessed first-scale meteorological data, based on the Euclidean distance between each location point and its neighboring associated location points, and the meteorological gradient sensitivity factor of the neighboring associated location points, includes: The following formula is used to perform improved gradient-sensitive inverse distance weighted interpolation on the meteorological data of the current location point in the preprocessed first-scale meteorological data:
[0012]
[0013] in, This is the first-scale meteorological data after interpolation at the current location point. These are the position coordinates of the current location point. This provides the first-scale meteorological data for the i-th neighboring location among the current location's neighboring locations. Let i be the position coordinates of the nearest associated location point. The inverse distance weights of the meteorological data for the current location point are given to the neighboring associated location point numbered i. p is the Euclidean distance between the current location and its neighboring associated location with the number i, where p is the distance exponent. N is a control constant, where N is the total number of neighboring related locations of the current location. For the meteorological gradient sensitivity factor of the neighboring associated location point i with respect to the current location point, Let i be the meteorological gradient vector of the neighboring associated location point. This is the gradient sensitivity parameter.
[0014] In one embodiment, the updated photovoltaic power prediction model includes at least: a multi-scale feature embedding layer, a cross-scale attention fusion layer, a multi-layer Transformer encoder, and a prediction output layer; The multi-scale feature embedding layer includes at least: a first branch processing structure, a second branch processing structure, and a third branch processing structure; wherein the first branch processing structure corresponds to the first-scale meteorological data, the second branch processing structure corresponds to the second-scale meteorological data, and the third branch processing structure corresponds to the third-scale meteorological data. The multi-layer Transformer encoder includes at least multiple Transformer layers based on a multi-head self-attention mechanism.
[0015] In one embodiment, the process of using the updated photovoltaic power prediction model to process the multi-channel feature vector and the current power plant attribute parameters of the target photovoltaic power plant to obtain the corresponding target prediction result includes: The first branch processing structure, the second branch processing structure, and the third branch processing structure in the multi-scale feature embedding layer are used to process the first channel feature vector, the second channel feature vector, and the third channel feature vector in the multi-channel feature vector, respectively, to obtain multiple initial features based on different scales; and the multi-scale feature embedding layer is used to process the current power station attribute parameters of the target photovoltaic power station to obtain the corresponding attribute features. A cross-scale attention fusion layer is used to calculate dynamic attention interaction weights between initial features based on multiple initial features; and multiple intermediate features are obtained by fusing the dynamic attention interaction weights and the multiple initial features based on scale differences and meteorological field continuity. By utilizing multiple Transformer layers based on a multi-head self-attention mechanism in a multi-layer Transformer encoder, deep spatiotemporal features that meet the requirements are obtained through multiple rounds of deep feature iteration processing on multiple intermediate features. By processing the deep spatiotemporal features and the attribute features using the prediction output layer, the corresponding target prediction results are obtained.
[0016] In one embodiment, the method further includes: Acquire sample data; and use the sample data to construct a sample training set; An initial photovoltaic power prediction model is constructed based on an improved multi-channel Transformer network. The initial photovoltaic power prediction model includes at least: an initial multi-scale feature embedding layer, an initial cross-scale attention fusion layer, an initial multi-layer Transformer encoder, and an initial prediction output layer. Using the sample training set, multiple rounds of reinforcement learning are performed on the initial photovoltaic power prediction model to obtain a photovoltaic power prediction model that meets the requirements.
[0017] In one embodiment, after determining the photovoltaic power generation capacity of the target photovoltaic power station for the second time period based on the target prediction results, the method further includes: Based on the photovoltaic power generation capacity of the target photovoltaic power station in the second time period, determine the operation and maintenance management strategy of the target photovoltaic power station in the second time period, as well as the power handling strategy for power storage and grid-connected power sales.
[0018] This specification also provides a photovoltaic power prediction device based on multi-scale meteorological characteristics, including: The acquisition module is used to acquire meteorological data at multiple scales for the first time period of the target photovoltaic power station; The detection module is used to detect whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to the preset model detection rules; wherein, the current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network. The adaptive learning module is used to construct and utilize an improved EWC loss function to perform preset adaptive learning on the current photovoltaic power prediction model under the premise that the preset adaptive learning conditions are met, and to obtain the updated photovoltaic power prediction model according to the preset model update rules. The construction module is used to construct corresponding multi-channel feature vectors based on the preset data processing rules and using meteorological data at multiple scales in the first time period. The prediction module is used to obtain the corresponding target prediction result by processing the multi-channel feature vector and the current power station attribute parameters of the target photovoltaic power station using the updated photovoltaic power prediction model. The determination module is used to determine the photovoltaic power generation capacity of the target photovoltaic power station in the second time period based on the target prediction results.
[0019] This specification also provides an electronic device, including a processor and a memory for storing processor-executable instructions, wherein the processor executes the instructions to implement the steps of the photovoltaic power prediction method based on multi-scale meteorological features.
[0020] This specification also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the photovoltaic power prediction method based on multi-scale meteorological features.
[0021] This specification also provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the photovoltaic power prediction method based on multi-scale meteorological characteristics.
[0022] Based on the photovoltaic power prediction method and apparatus based on multi-scale meteorological features provided in this specification, before specific implementation, a photovoltaic power prediction model adapted to processing multi-scale meteorological data can be trained using sample data based on an improved multi-channel Transformer network. In specific implementation, after acquiring meteorological data at multiple scales for the first time period of the target photovoltaic power station, it is first determined whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to preset model detection rules. If the preset adaptive learning conditions are met, the current photovoltaic power prediction model is subjected to preset adaptive learning using an improved EWC loss function according to preset model update rules to obtain an updated photovoltaic power prediction model. Then, according to preset data processing rules, corresponding multi-channel feature vectors are constructed using meteorological data at multiple scales for the first time period. Finally, the updated photovoltaic power prediction model is used to process the multi-channel feature vectors and the current power station attribute parameters of the target photovoltaic power station to determine the photovoltaic power generation of the target photovoltaic power station for the second time period. On the one hand, by monitoring whether the preset adaptive learning conditions are met, the system automatically triggers the construction of a new photovoltaic power prediction model and performs preset adaptive learning based on the improved EWC loss function. This allows the model to learn and adapt to new data changes while avoiding the loss of important original knowledge, resulting in a better-performing and more stable updated photovoltaic power prediction model. On the other hand, by using the updated photovoltaic power prediction model based on the improved multi-channel Transformer network structure to process meteorological data at multiple scales in the first time period, the system can comprehensively and fully integrate meteorological data information at different spatiotemporal scale resolutions, efficiently and accurately predict the photovoltaic power generation of the target photovoltaic power station, and effectively reduce the prediction error of photovoltaic power generation. Attached Figure Description
[0023] To more clearly illustrate the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating a photovoltaic power prediction method based on multi-scale meteorological characteristics provided in one embodiment of this specification. Figure 2 This is a schematic diagram illustrating an embodiment of the photovoltaic power prediction method based on multi-scale meteorological characteristics provided in this specification, applied in a scenario example. Figure 3This is a schematic diagram illustrating an embodiment of the photovoltaic power prediction method based on multi-scale meteorological characteristics provided in this specification, applied in a scenario example. Figure 4 This is a schematic diagram illustrating an embodiment of the photovoltaic power prediction method based on multi-scale meteorological characteristics provided in this specification, applied in a scenario example. Figure 5 This is a schematic diagram illustrating an embodiment of the photovoltaic power prediction method based on multi-scale meteorological characteristics provided in this specification, applied in a scenario example. Figure 6 This is a schematic diagram of the structural composition of an electronic device provided in one embodiment of this specification; Figure 7 This is a schematic diagram of the structural composition of a photovoltaic power prediction device based on multi-scale meteorological characteristics provided in one embodiment of this specification; Figure 8 This is a schematic diagram illustrating an embodiment of the photovoltaic power prediction method based on multi-scale meteorological characteristics provided in this specification, applied in a scenario example. Figure 9 This is a schematic diagram illustrating an embodiment of the photovoltaic power prediction method based on multi-scale meteorological characteristics provided in this specification, applied in a scenario example. Figure 10 This is a schematic diagram illustrating an embodiment of the photovoltaic power prediction method based on multi-scale meteorological characteristics provided in this specification, applied in a scenario example. Detailed Implementation
[0025] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0026] It should be noted that the information and data related to users involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by the relevant parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with relevant laws, regulations, and standards, and necessary confidentiality measures have been taken. They do not violate public order and good morals, and corresponding operation entry points are provided for users or relevant parties to choose to authorize or refuse.
[0027] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0028] See Figure 1 As shown in the embodiments of this specification, a photovoltaic power prediction method based on multi-scale meteorological characteristics is provided. In specific implementation, this method may include the following: S101: Acquire meteorological data at multiple scales for the first time period of the target photovoltaic power plant; S102: According to the preset model detection rules, detect whether the current photovoltaic power prediction model meets the preset adaptive learning conditions; wherein, the current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network; S103: Under the condition that the preset adaptive learning conditions are met, construct and use the improved EWC loss function according to the preset model update rules to perform preset adaptive learning on the current photovoltaic power prediction model and obtain the updated photovoltaic power prediction model. S104: Based on the preset data processing rules, use meteorological data at multiple scales in the first time period to construct the corresponding multi-channel feature vector. S105: By processing the multi-channel feature vector and the current power station attribute parameters of the target photovoltaic power station using the updated photovoltaic power prediction model, the corresponding target prediction result is obtained; S106: Based on the target prediction results, determine the photovoltaic power generation capacity of the target photovoltaic power station in the second time period.
[0029] Specifically, the aforementioned target photovoltaic power station can be understood as the photovoltaic power station of interest whose photovoltaic power generation capacity is to be predicted.
[0030] The first time period mentioned above can be understood as a historical time period that occurs before and is adjacent to the second time period. Specifically, for example, the first time period mentioned above can be the current time period (e.g., the most recent month); correspondingly, the second time period mentioned above can be the next time period after the current time period (e.g., the next month).
[0031] The aforementioned meteorological data at multiple scales can specifically include meteorological data based on different spatial scales. These different scales of meteorological data correspond to different spatial resolutions.
[0032] Specifically, the aforementioned meteorological data at multiple scales can include: first-scale meteorological data, second-scale meteorological data, and third-scale meteorological data, etc. Among them, the first-scale meteorological data includes global meteorological data with a resolution of 25 km, such as ECMWF ERA5 reanalysis data containing at least large-scale circulation background information, which can be denoted as... The second-scale meteorological data includes regional meteorological data with a 3km resolution, such as WRF model output data containing at least mesoscale convective system information, which can be denoted as... The third-scale meteorological data includes measured meteorological data within the local area where the target photovoltaic power station is located. For example, it includes at least measured meteorological data within the vicinity of the target photovoltaic power station that contains local micro-meteorological characteristics, which can be denoted as... .
[0033] It should be noted that by introducing and using multi-scale meteorological data, including the first-scale meteorological data, the second-scale meteorological data, and the third-scale meteorological data mentioned above, full-scale coverage of meteorological data for the area where the target photovoltaic power station is located can be achieved. Based on the spatial dimension, the complex correlation between the evolution of large-scale meteorological systems, information on mesoscale meteorological processes, and local meteorological characteristics can be captured and utilized to accurately predict the photovoltaic power generation of the target photovoltaic power station and effectively improve the prediction accuracy.
[0034] Specifically, the aforementioned meteorological data may include one or more of the following: wind speed v(t), wind direction, etc. Meteorological data such as temperature T(t) and air pressure p(t) can be understood as data that changes over time and may include meteorological data from multiple time points.
[0035] In practice, in addition to acquiring meteorological data at multiple scales for the first time period of the target photovoltaic power station, the power station attribute parameters and photovoltaic power generation power of the target photovoltaic power station for the first time period can also be acquired simultaneously.
[0036] Specifically, the current power plant attribute parameters of the aforementioned target photovoltaic power plant may include at least one of the following: the current installed capacity of the target photovoltaic power plant, the current aging parameters of the photovoltaic modules, and the surface contaminant indicator parameters of the photovoltaic modules.
[0037] The aforementioned photovoltaic power prediction model can be understood as an algorithm model trained based on an improved multi-channel Transformer Network (MCT-Net). It can better adapt to complex meteorological data changes and predict future photovoltaic power generation by fusing and processing input multi-scale meteorological data.
[0038] Specifically, the photovoltaic power prediction model mentioned above may include at least the following structures: a multi-scale feature embedding layer, a cross-scale attention fusion layer, a multi-layer Transformer encoder, and a prediction output layer.
[0039] The multi-scale feature embedding layer may include at least a first branch processing structure, a second branch processing structure, and a third branch processing structure; wherein the first branch processing structure corresponds to the first-scale meteorological data, the second branch processing structure corresponds to the second-scale meteorological data, and the third branch processing structure corresponds to the third-scale meteorological data; the multi-layer Transformer encoder may include at least multiple Transformer layers based on a multi-head self-attention mechanism; the cross-scale attention fusion layer may analyze and adjust the dynamic attention interaction weights between different features based on the time dimension to obtain feature information that simultaneously takes into account scale differences and meteorological field continuity.
[0040] It should be noted that by introducing and using a photovoltaic power prediction model based on an improved multi-channel Transformer network structure, we can better integrate and process meteorological data at multiple scales input to the model based on the spatiotemporal dimension. This allows us to acquire and utilize more comprehensive and in-depth feature information, and more accurately predict photovoltaic power generation.
[0041] The improved EWC loss function described above can be understood as an EWC loss function that includes at least a physical consistency loss term and a temporal smoothness loss term related to the model.
[0042] The aforementioned EWC (Elastic Weight Consolidation) loss function can specifically refer to a loss function constructed based on the elastic weight consolidation mechanism.
[0043] It should be noted that by introducing and using an improved EWC loss function that includes at least a physical consistency loss term and a temporal smoothness loss term related to the model, we can, on the one hand, accelerate the model's convergence speed, enable more rapid and targeted fine-tuning of the model, and complete online adaptive learning; on the other hand, by utilizing the physical consistency loss term and the temporal smoothness loss term, the model can learn and master new knowledge patterns reflected by new data changes through adaptive learning without forgetting important existing knowledge, thus avoiding catastrophic forgetting; furthermore, the physical consistency loss term can also impose physical constraints on the adaptive learning process, actively preventing the model from learning erroneous patterns that do not conform to physical laws during adaptive learning, ensuring the accuracy and reliability of the model.
[0044] In practice, when it is necessary to predict the photovoltaic power generation of the target photovoltaic power station in the second time period, firstly, meteorological data of the target photovoltaic power station at multiple scales in the first time period can be obtained; among them, the meteorological data at multiple scales include at least: first-scale meteorological data, second-scale meteorological data, and third-scale meteorological data.
[0045] At the same time, based on the preset model detection rules, and considering both the changes in meteorological data and the changes in the attributes of the target photovoltaic power station itself, the model can analyze and determine whether new data changes have occurred, and thus determine whether the current photovoltaic power prediction model meets the preset adaptive learning conditions.
[0046] If new data changes are identified, it can be determined that the preset adaptive learning conditions are met. At this point, it can be determined that the current photovoltaic power prediction model is no longer applicable. Therefore, the current photovoltaic power prediction model can be subjected to preset adaptive learning to obtain an updated photovoltaic power prediction model. Then, using the updated photovoltaic power prediction model, by processing meteorological data at multiple scales in the first time period, the photovoltaic power generation of the target photovoltaic power station in the second time period can be predicted.
[0047] Conversely, if no new data changes are observed, it can be determined that the preset adaptive learning conditions have not been met. In this case, it can be concluded that the current photovoltaic power prediction model is still applicable, and thus the current photovoltaic power prediction model can be directly used to predict the photovoltaic power generation of the target photovoltaic power station in the second time period by processing meteorological data at multiple scales in the first time period.
[0048] When using the photovoltaic power prediction model to process meteorological data at multiple scales in the first time period, we can first construct corresponding multi-channel feature vectors based on the preset data processing rules using the meteorological data at multiple scales in the first time period. For example, we can construct a three-channel feature tensor as shown below: .
[0049] Next, the multi-scale feature embedding layer in the photovoltaic power prediction model can be used to process the aforementioned multi-channel feature vectors to obtain and output multiple initial features related to the spatiotemporal dimension of meteorological data, as well as attribute features related to the target photovoltaic power station's own attributes. Then, a cross-scale attention fusion layer is used to calculate the dynamic attention interaction weights between the initial features. Based on the dynamic attention interaction weights and the multiple initial features, multiple intermediate features based on scale differences and meteorological field continuity are fused. Then, multiple Transformer layers in a multi-layer Transformer encoder, based on a multi-head self-attention mechanism, are used to perform multiple rounds of deep feature iteration processing on the intermediate features to obtain the required deep spatiotemporal features. Finally, the prediction output layer processes the deep spatiotemporal features and the attribute features to obtain the corresponding target prediction result. Finally, based on the target prediction result, the photovoltaic power generation of the target photovoltaic power station in the second time period can be determined.
[0050] Based on the above embodiments, on the one hand, by monitoring whether the preset adaptive learning conditions are met, the system automatically triggers the construction of a preset adaptive learning model based on the improved EWC loss function. This enables the model to learn and adapt to new data changes while avoiding the loss of important original knowledge, resulting in a better and more stable updated photovoltaic power prediction model. On the other hand, by using the updated photovoltaic power prediction model based on the improved multi-channel Transformer network structure to process meteorological data at multiple scales in the first time period, the system can comprehensively and fully integrate meteorological data information at different spatiotemporal scale resolutions, efficiently and accurately predict the photovoltaic power generation of the target photovoltaic power station, and effectively reduce the prediction error of photovoltaic power generation.
[0051] In some embodiments, after acquiring meteorological data at multiple scales for a first time period of the target photovoltaic power plant, the meteorological data at multiple scales can be time-aligned. Specifically, based on first-scale meteorological data, second-scale meteorological data, and third-scale meteorological data, the start and end times of the outflow are determined respectively in the first-scale meteorological data, the second-scale meteorological data, and the third-scale meteorological data. Then, based on the end times of the first-scale, second-scale, and third-scale meteorological data, the earliest time point is determined as the common end time point. Based on the start times of the first-scale, second-scale, and third-scale meteorological data, the latest time point is determined as the common start time point. Then, based on the common start time point, the common end time point, and a preset common time interval, multiple time points in the first time period are determined. Based on the meteorological data at multiple scales in the first time period, the first-scale, second-scale, and third-scale meteorological data at the corresponding time points are extracted through interpolation fitting, resulting in meteorological data at multiple scales aligned for the first time period.
[0052] In some embodiments, the meteorological data at multiple scales may specifically include: first-scale meteorological data, second-scale meteorological data, and third-scale meteorological data, etc. Specifically, the first-scale meteorological data may include global meteorological data with a resolution of 25km, the second-scale meteorological data may include regional meteorological data with a resolution of 3km, and the third-scale meteorological data may include meteorological data within the local area where the target photovoltaic power station is located.
[0053] It should be noted that the meteorological data at various scales listed above are merely illustrative. In practice, depending on the specific circumstances and processing requirements, the meteorological data at these various scales may also include meteorological data at other suitable scales. This instruction manual does not impose any limitations on this.
[0054] In some embodiments, see Figure 2 As shown, the above method detects whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to the preset model detection rules. In specific implementation, it may include the following: S2-1: Based on the preset model detection rules, obtain multi-scale meteorological data, measured photovoltaic power generation data, and current power station attribute parameters of the target photovoltaic power station for the historical reference time period before the current time point; S2-2: Based on the third-scale meteorological data of the historical reference time period, detect whether the degree of change of meteorological data in the local area where the target photovoltaic power station is located is greater than the preset first degree of change threshold; based on the current power station attribute parameters of the target photovoltaic power station, detect whether the degree of change of the power generation performance of the target photovoltaic power station is greater than the preset second degree of change threshold. S2-3: When the degree of change in meteorological data in the local area where the target photovoltaic power station is located is greater than the preset first degree of change threshold, and / or the degree of change in the power generation performance of the target photovoltaic power station is greater than the preset second degree of change threshold, determine and determine a matching target sliding window based on the change characteristics of the third-scale meteorological data of the historical reference time period. S2-4: By processing multi-scale meteorological data of historical reference time periods using the current photovoltaic power prediction model, the predicted photovoltaic power generation data for the historical reference time period is determined. S2-5: Using the target sliding window, the normalized root mean square error of the current photovoltaic power prediction model is calculated based on the predicted and measured photovoltaic power generation data of the historical reference time period. S2-6: Detect whether the normalized root mean square error of the current photovoltaic power prediction model is greater than the preset error threshold. S2-7: If the normalized root mean square error of the current photovoltaic power prediction model is greater than the preset error threshold, determine that the current photovoltaic power prediction model meets the preset adaptive learning conditions.
[0055] Specifically, the aforementioned historical reference time period can be understood as a historical time period that occurred before the second time period to be predicted, is adjacent to the second time period, and has a duration exceeding a preset reference duration threshold. For example, half a month before the second time period.
[0056] In practical implementation, based on third-scale meteorological data from historical reference time periods, the system can detect whether the degree of change in meteorological data within the local area where the target photovoltaic power station is located exceeds a preset first threshold for degree of change. This determines whether there have been drastic changes in meteorological data within the local area of the target photovoltaic power station compared to previous historical time periods during the historical reference time period and the adjacent second time period. Consequently, the knowledge and rules previously learned and mastered by the model may no longer be applicable. Simultaneously, based on the current power station attribute parameters of the target photovoltaic power station, the system can detect whether the degree of change in the power generation performance of the target photovoltaic power station exceeds a preset second threshold for degree of change. This determines whether changes in key attribute factors such as photovoltaic module aging or surface contamination are affecting the normal photovoltaic power generation performance of the target photovoltaic power station, thus potentially rendering the knowledge and rules previously learned and mastered by the model inapplicable.
[0057] If the degree of change in meteorological data in the local area where the target photovoltaic power station is located exceeds a preset first degree of change threshold, and / or the degree of change in the power generation performance of the target photovoltaic power station exceeds a preset second degree of change threshold, it can be preliminarily determined that new data changes have occurred, meaning that the knowledge and rules previously learned and mastered by the current photovoltaic power prediction model may no longer be applicable. This triggers the determination and utilization of a matching target sliding window, based on an appropriate time scale, to detect the model error of the current photovoltaic power prediction model, determine whether the current photovoltaic power prediction model can adapt to the new data changes, and automatically determine whether the current photovoltaic power prediction model needs to undergo preset adaptive learning.
[0058] Specifically, the aforementioned target sliding window can be understood as a time window based on the time dimension. Specifically, the target sliding window can include multiple sliding windows of different time lengths.
[0059] In practice, the process can begin by determining the magnitude and rate of change of third-scale meteorological data within a historical reference time period, thus obtaining the variation characteristics of the third-scale meteorological data during that period. Then, based on these variation characteristics, a matching sliding window is identified by querying a pre-defined sliding window template, serving as the target sliding window. This pre-defined sliding window template can contain multiple sliding windows; each sliding window corresponds to at least one variation characteristic of third-scale meteorological data. The pre-defined sliding window template can be established in advance through big data analysis and clustering learning using a large number of sample processing records.
[0060] Specifically, for example, based on the variation characteristics of third-scale meteorological data over a historical reference period, when it is determined that the variation amplitude is large and / or the data variation rate is large, a relatively short sliding window can be determined and used as a matching target sliding window; when it is determined that the variation amplitude is small and the data variation rate is small, a relatively long sliding window can be determined and used as a matching target sliding window.
[0061] In practice, when the target sliding window includes multiple sliding windows of different time lengths, the normalized root mean square error (RMSE) of the current photovoltaic power prediction model based on different sliding windows can be calculated using these multiple sliding windows. Then, based on the normalized RMSE of the current photovoltaic power prediction model based on different sliding windows, the average value of the normalized RMSE is calculated to obtain the normalized RMSE of the current photovoltaic power prediction model, which takes into account the prediction effects of multiple different time scales and has relatively higher reference value.
[0062] In practical implementation, the above-mentioned normalized root mean square error of the photovoltaic power prediction model is calculated using a target sliding window based on the predicted and measured photovoltaic power generation data for a historical reference time period. This may include: Calculate the normalized root mean square error of the current photovoltaic power prediction model using the following formula:
[0063] in, Let be the normalized root mean square error of the current photovoltaic power prediction model, N be the total number of time points included in the target sliding window, and i be the time point number within the target sliding window. The measured data of photovoltaic power generation at time point i within the target sliding window. The predicted photovoltaic power generation data for time point i within the target sliding window. The installed capacity of the target photovoltaic power station.
[0064] Based on the above embodiments, by determining and utilizing a matching target sliding window, it is possible to accurately determine whether the preset adaptive learning conditions are met based on the time dimension, so as to determine whether to perform preset adaptive learning on the current photovoltaic power prediction model, thereby avoiding unnecessary adaptive learning of data processing resources and data processing time.
[0065] In some embodiments, see Figure 3 As shown, the above-mentioned method constructs and utilizes an improved EWC loss function based on a preset model update rule to perform preset adaptive learning on the current photovoltaic power prediction model. In specific implementation, this may include the following: S3-1: Based on the preset model update rules, construct the physical consistency loss term and time smoothness loss term for the current photovoltaic power prediction model; S3-2: Construct an improved EWC loss function using the physical consistency loss term and the time smoothness loss term; S3-3: Construct an incremental sample set for the current photovoltaic power prediction model by using multi-scale meteorological data and measured photovoltaic power generation data from historical reference time periods; S3-4: Based on the improved EWC loss function, the current photovoltaic power prediction model is subjected to preset adaptive learning using the incremental sample set to obtain an updated photovoltaic power prediction model.
[0066] The aforementioned pre-defined adaptive learning can be deep learning based on incremental samples.
[0067] In practical implementation, the improved EWC loss function can be constructed according to the following formula:
[0068] in, For the total loss, For EWC loss term, This is the physical consistency loss term. For time smoothness loss term, , , These are the first loss coefficient, the second loss coefficient, and the third loss coefficient, respectively.
[0069] Specifically, the EWC loss term can be constructed according to the following formula:
[0070] in, This represents the standard loss function value (e.g., mean squared error) of the model for the current round, obtained based on the incremental samples from the current round. These are the model parameters numbered i in the previous round of photovoltaic power prediction model. These are the model parameters numbered i in the current round of photovoltaic power prediction models. This is the i-th diagonal element in the Fisher information matrix (before the update), used to measure the importance of the model parameter with index i to the old task (old knowledge). This is an importance weight parameter used to control the balance between old and new knowledge.
[0071] By introducing and using the aforementioned EWC loss term, the variation of important model parameters can be limited by a quadratic penalty term, thus protecting old knowledge from being forgotten during the pre-defined adaptive learning process.
[0072] The Fisher Information Matrix (FIM) can be understood as a matrix used to measure the amount of information contained in the model parameters. Generally, the more information the corresponding model parameters contain, the more accurate the parameter estimation and the smaller the error based on that model.
[0073] In this embodiment, in each round of preset adaptive learning, after calculating the standard loss function value of the current round, the Fisher information matrix can also be updated online using the standard loss function value of the current round.
[0074] Specifically, the Fisher information matrix can be updated online using the following formula:
[0075] in, This represents the i-th diagonal element in the Fisher information matrix before the current round of updates. This represents the i-th diagonal element in the updated Fisher information matrix for the current round. Forgetting factor, This is used to control the degree to which information is retained in the historical Fisher information matrix.
[0076] By introducing and using the online update method for the Fisher information matrix described above, it is possible to avoid storing large amounts of historical data to calculate the Fisher information matrix, which helps to improve the overall computational efficiency.
[0077] Specifically, the physical consistency loss term can be constructed according to the following formula:
[0078] in, The data represents the predicted photovoltaic power generation at time point t, based on model predictions. To utilize irradiance data at time point t based on a physical model The theoretical data for the maximum power output of photovoltaic systems obtained through calculation. The irradiance data is calculated using meteorological data at time point t.
[0079] In the formula The partial derivative of photovoltaic power generation with respect to irradiance data reflects the fundamental physical relationship regarding photovoltaic power generation.
[0080] By introducing and using the aforementioned physical consistency loss term, the model can be guided to learn the physical relationship between photovoltaic power generation and irradiance data, and maintain consistency with the physical model, thereby avoiding prediction results that do not conform to the constraints of physical common sense.
[0081] Specifically, the time smoothness loss term can be constructed according to the following formula:
[0082] in, This is the predicted photovoltaic power generation data at time point (t+1) based on model predictions. This is the predicted data for photovoltaic power generation at time point t, obtained based on model predictions.
[0083] By introducing and using the aforementioned time smoothness loss term, the model can be specifically encouraged to pay attention to the relatively smooth changes in predicted values at adjacent time points during prediction, avoiding unreasonable and drastic fluctuations in the prediction curve, ensuring the temporal continuity of the prediction curve, and improving the reliability of the prediction results.
[0084] In practice, the first loss coefficient, the second loss coefficient, and the third loss coefficient mentioned above can be non-fixed loss coefficients, and can be dynamically updated in each round of preset adaptive learning.
[0085] Specifically, the first loss coefficient and the second loss coefficient can be updated according to the following formulas to obtain the first loss coefficient and the second loss coefficient for the current round:
[0086]
[0087] Where k is the sensitivity parameter, This represents the model accuracy calculated in the current round of pre-defined adaptive learning. , , These represent the EWC loss gradient, physical consistency loss gradient, and temporal smoothness loss gradient calculated in the current round of adaptive learning, respectively.
[0088] After calculating the first loss coefficient and the second loss coefficient of the current round according to the above formula, we can also use the first loss coefficient and the second loss coefficient of the current round, as well as the preset loss coefficient constraint relationship (for example, The third loss coefficient for the current round is calculated.
[0089] By introducing and using the above loss coefficient update method, the model can focus more on learning new knowledge (α) when the model accuracy drops significantly during the preset adaptive learning process, and focus more on physical constraints (β) when the physical consistency is poor, thereby achieving a dynamic balance of the loss function and making the model more targeted in each round of preset adaptive learning.
[0090] The above-mentioned improved EWC loss function utilizes the incremental sample set to perform pre-set adaptive learning on the current photovoltaic power prediction model. Specifically, the pre-set adaptive learning for the current round can be performed as follows: obtain the photovoltaic power prediction model from the previous round, and determine the incremental samples from the incremental sample set for the current round's pre-set adaptive learning; process the incremental samples from the previous round's photovoltaic power prediction model to obtain the predicted photovoltaic power generation data for the current round; calculate the loss function value for the current round using the predicted photovoltaic power generation data and the incremental samples from the current round, based on the improved EWC loss function; and adaptively fine-tune the model parameters of the previous round's photovoltaic power prediction model based on the current round's loss function value to obtain a photovoltaic power prediction model for the current round that meets the requirements.
[0091] Specifically, when performing each round of pre-set adaptive learning, a matching sliding window can be identified and used as a fine-tuning window; then, the model parameters of the photovoltaic power prediction model from the previous round can be adaptively fine-tuned using this fine-tuning window.
[0092] Specifically, for example, adaptive fine-tuning can be performed according to the following formula:
[0093] in, This indicates the size of the fine-tuning window, typically set to 168 hours (7 days). The duration of the window corresponding to time point t. Let t be the photovoltaic power generation at time point t. For the model parameters at time point t, Model parameters after fine-tuning at time point t.
[0094] By introducing and using the aforementioned fine-tuning window, it can be ensured that the fine-tuning data contains both the latest observation information and maintains a certain degree of temporal continuity, thus avoiding model overfitting due to single-point outliers.
[0095] Furthermore, during each round of pre-defined adaptive learning, the Fisher information matrix can intelligently filter out the first type of model parameters that need adjustment and the second type of model parameters (corresponding to important old knowledge) that do not need adjustment from the model parameters of the previous round's photovoltaic power prediction model. Further, the second type of parameters in the model can remain unchanged; while the first type of model parameters can be fine-tuned and updated based on the loss function value of the current round calculated using the improved EWC loss function.
[0096] Specifically, the model parameters of the previous round of photovoltaic power prediction model can be adaptively fine-tuned according to the following formula:
[0097] in, For learning rate, As a preset importance threshold, This is the i-th diagonal element in the Fisher information matrix (corresponding to the model parameter with number i).
[0098] By introducing and using the above methods for fine-tuning updates, important old knowledge in the model (corresponding to large amounts of old knowledge) can be preserved. The value is updated only for relatively unimportant parameters, further mitigating the problem of catastrophic forgetting.
[0099] Furthermore, the system can also detect whether the training termination condition is met based on the current round of photovoltaic power prediction model. If the training termination condition is met, the preset adaptive learning ends, and the current round of photovoltaic power prediction model is identified as the updated photovoltaic power prediction model. Conversely, if the training termination condition is not met, the current round of photovoltaic power prediction model and the incremental sample set can be used to continue the next round of preset adaptive learning until the training termination condition is met.
[0100] Based on the above embodiments, by constructing and utilizing the improved EWC loss function, the current photovoltaic power prediction model is subjected to pre-defined adaptive learning. On the one hand, with a relatively small amount of data processing, an updated photovoltaic power prediction model that adapts to the new data changes can be quickly trained on the basis of the current photovoltaic power prediction model. On the other hand, it also enables the model to avoid losing important original knowledge while learning and adapting to new data changes, thus ensuring the accuracy and stability of the model.
[0101] In some embodiments, see Figure 4 As shown, based on preset data processing rules, the above-mentioned multi-channel feature vectors are constructed using meteorological data at multiple scales from the first time period. In specific implementation, this may include the following: S4-1: According to the preset data processing rules, perform corresponding preprocessing on the first-scale meteorological data, the second-scale meteorological data, and the third-scale meteorological data respectively to obtain the preprocessed first-scale meteorological data, the preprocessed second-scale meteorological data, and the preprocessed third-scale meteorological data. S4-2: Based on the preprocessed first-scale meteorological data, calculate the Euclidean distance between each location point and its neighboring associated location points, as well as the meteorological gradient sensitivity factor of the neighboring associated location points; S4-3: Based on the Euclidean distance between each location point and its neighboring associated location points, and the meteorological gradient sensitivity factor of the neighboring associated location points, improve gradient-sensitive inverse distance weighted interpolation is performed on the meteorological data of each location point in the preprocessed first-scale meteorological data to obtain the interpolated first-scale meteorological data. S4-4: Based on the second-scale meteorological data, the preprocessed third-scale meteorological data is upsampled to obtain upsampled third-scale meteorological data that matches the second-scale meteorological data. S4-5: Based on the interpolated first-scale meteorological data, the preprocessed second-scale meteorological data, and the upsampled third-scale meteorological data, construct the corresponding multi-channel feature vectors.
[0102] Specifically, the aforementioned preprocessing may include: data cleaning, time alignment, spatial alignment, etc.
[0103] In practice, the meteorological data at multiple scales directly acquired in the first time period can be represented in the following form: .in, This is first-scale meteorological data. This is second-scale meteorological data. This refers to the third-scale meteorological data. The first-scale, second-scale, and third-scale meteorological data can each reflect the different levels of meteorological change characteristics in the area where the target photovoltaic power station is located, based on different spatial resolutions and spatial dimensions.
[0104] In practice, based on the interpolated first-scale meteorological data, the preprocessed second-scale meteorological data, and the upsampled third-scale meteorological data, a multi-channel feature vector can be constructed through feature extraction and feature fusion, which can be represented in the following form:
[0105] Where T is the time series length, which can be determined based on the target sliding window; H and W are the height and width of the spatial grid; and C is the number of feature channels for meteorological data at each scale. The first channel feature vector is obtained by feature extraction and processing based on the interpolated first-scale meteorological data. This is the second channel feature vector obtained by feature extraction and processing based on preprocessed second-scale meteorological data. The third channel feature vector is obtained by feature extraction and processing based on the upsampled third-scale meteorological data.
[0106] Based on the above embodiments, by using the second-scale meteorological data as the reference center, improving the gradient-sensitive inverse distance weighted interpolation of the first-scale meteorological data, and simultaneously upsampling the third-scale meteorological data, it is possible to integrate meteorological data of different scales into the same scale while preserving the spatial resolution of the first-scale, second-scale, and third-scale meteorological data. Furthermore, through feature extraction and feature fusion, a multi-channel feature vector can be obtained that maintains the independence of meteorological features at each scale and facilitates subsequent cross-scale feature interaction analysis processing of the model.
[0107] In some embodiments, the improved gradient-sensitive inverse distance weighted interpolation of the meteorological data of each location point in the preprocessed first-scale meteorological data is performed based on the Euclidean distance between each location point and its neighboring associated location points, and the meteorological gradient sensitivity factor of the neighboring associated location points. In specific implementations, this may include the following: The following formula is used to perform improved gradient-sensitive inverse distance weighted interpolation on the meteorological data of the current location point in the preprocessed first-scale meteorological data:
[0108]
[0109] in, This is the first-scale meteorological data after interpolation at the current location point. These are the position coordinates of the current location point. This provides the first-scale meteorological data for the i-th neighboring location among the current location's neighboring locations. Let i be the position coordinates of the nearest associated location point. The inverse distance weights of the meteorological data for the current location point are given to the neighboring associated location point numbered i. p is the Euclidean distance between the current location and its neighboring associated location with the number i, where p is the distance exponent. N is a control constant, where N is the total number of neighboring related locations of the current location. For the meteorological gradient sensitivity factor of the neighboring associated location point i with respect to the current location point, Let i be the meteorological gradient vector of the neighboring associated location point. This is the gradient sensitivity parameter.
[0110] Specifically, the aforementioned control constant can be a non-zero minimum value to avoid zero in the denominator. The neighboring locations of the current position can specifically include the four nearest neighboring locations. The distance index can be set to 2.
[0111] Based on the above embodiments, the first-scale meteorological data that meets the requirements can be obtained by performing improved gradient-sensitive inverse distance weighted interpolation on the first-scale meteorological data.
[0112] In some embodiments, the updated photovoltaic power prediction model may include at least the following structures: a multi-scale feature embedding layer, a cross-scale attention fusion layer, a multi-layer Transformer encoder, and a prediction output layer. The multi-scale feature embedding layer may include at least a first branch processing structure, a second branch processing structure, and a third branch processing structure; wherein the first branch processing structure corresponds to the first-scale meteorological data, the second branch processing structure corresponds to the second-scale meteorological data, and the third branch processing structure corresponds to the third-scale meteorological data. Furthermore, the multi-scale feature embedding layer also includes an attribute parameter branch processing structure corresponding to the power station attribute parameters.
[0113] Specifically, the first, second, and third branch processing structures in the multi-scale feature embedding layer can be used to independently and adaptively embed the first, second, and third channel feature vectors of the input model's multi-channel feature vectors by fusing temporal and spatial information, respectively, to obtain multiple initial features based on different scales. These initial features can carry corresponding scale indicator labels. Simultaneously, the attribute parameter branch processing structure in the multi-scale feature embedding layer performs corresponding feature processing on the current power station attribute parameters of the input target photovoltaic power station to obtain corresponding attribute features.
[0114] Specifically, for example, the first channel feature vector, the second channel feature vector, and the third channel feature vector can be processed according to the following formula through the first branch processing structure, the second branch processing structure, and the third branch processing structure:
[0115]
[0116]
[0117] in, This represents the initial features based on the first scale. This represents the initial features based on the second scale. This represents the initial features based on the third scale. This represents the feature embedding transformation based on a multi-scale feature embedding layer. The first branch processing structure has already learned and mastered the first linear transformation matrix. The second branch processes the second linear transformation matrix that has already been learned and mastered. The third branch processing structure already learned and mastered uses the third linear transformation matrix. This is the first bias vector. This is the second bias vector. For the third bias vector, To address the first scale, a first positional code is generated through spatiotemporal hybrid coding, combining temporal and spatial information based on the feature vector of the first channel. To address the second scale, a second positional code is generated through spatiotemporal hybrid coding, combining temporal and spatial information based on the second channel feature vector. To target the third scale, a third position code is generated by combining temporal and spatial information based on the third channel feature vector through spatiotemporal hybrid coding.
[0118] The multi-layer Transformer encoder may include at least multiple Transformer layers (or Transformer layers) based on a multi-head self-attention mechanism.
[0119] Specifically, multiple Transformer layers based on a multi-head self-attention mechanism can be used to perform multiple rounds of spatiotemporal hybrid deep feature iterative processing on multiple intermediate input features, while simultaneously combining temporal and spatial information, in order to obtain deep spatiotemporal features that simultaneously integrate relevant temporal and spatial information.
[0120] Specifically, for example, multiple rounds of deep feature iteration processing can be performed according to the following formula to obtain deep spatiotemporal features that meet the requirements: F (l+1) enc =TransformerBlock(F (l) enc ) Among them, F (l+1) enc F represents the iteration result of the (l+1)th round based on the intermediate features. (l) enc This represents the iteration result of the l-th round based on the intermediate features.
[0121] Specifically, for each iteration, the following formula can be used:
[0122]
[0123]
[0124] Where X represents the input of the current round, This indicates the attention sublayer (including layer normalization with residuals). This indicates a feedforward sublayer (including one with residual + layer normalization), and the attention sublayer is connected in series with the feedforward sublayer.
[0125] Furthermore, the cross-scale attention fusion layer includes at least: a cross-feature interaction analysis module based on a scale-aware attention mechanism, and a corresponding cross-feature fusion module.
[0126] Specifically, the dynamic attention interaction weights between the initial input features can be calculated first through the cross-feature interaction analysis module; then, the cross-feature fusion module can be used to perform cross-feature fusion on different initial features based on the dynamic attention interaction weights between the initial features, so as to obtain multiple intermediate features that can simultaneously reflect scale differences and the continuity of the meteorological field.
[0127] The prediction output layer includes at least a linear transformation layer and a regression prediction layer.
[0128] Specifically, the deep spatiotemporal features of the input can be linearly encoded and mapped through a linear transformation layer to obtain the corresponding key meteorological features that are suitable for subsequent regression analysis and play a major role in photovoltaic power prediction. The key meteorological features and attribute features are then concatenated to obtain the target joint features. Finally, the regression prediction layer performs regression analysis and prediction based on the target joint features to determine and output the corresponding target prediction results.
[0129] Specifically, for example, deep spatiotemporal features can be linearly encoded and mapped using the following formula:
[0130] in, The key meteorological characteristics of the second time period within the local area where the target photovoltaic power station is located. For deep spatiotemporal features, L represents the number of the last Transformer layer in the multi-layer Transformer encoder. For the weights of the output layer, This is the bias for the output layer.
[0131] Based on the above embodiments, by introducing and utilizing a photovoltaic power prediction model that includes at least a multi-scale feature embedding layer, a cross-scale attention fusion layer, a multi-layer Transformer encoder, and a prediction output layer, it can better adapt to complex weather changes and efficiently and accurately predict the corresponding photovoltaic power generation.
[0132] In some embodiments, see Figure 5 As shown, the above-mentioned photovoltaic power prediction model uses the updated photovoltaic power prediction model to process the multi-channel feature vector and the current power station attribute parameters of the target photovoltaic power station to obtain the corresponding target prediction result. In specific implementation, it may include the following: S5-1: Using the first branch processing structure, the second branch processing structure, and the third branch processing structure in the multi-scale feature embedding layer, the first channel feature vector, the second channel feature vector, and the third channel feature vector in the multi-channel feature vector are processed respectively to obtain multiple initial features based on different scales; and the current power station attribute parameters of the target photovoltaic power station are processed using the multi-scale feature embedding layer to obtain the corresponding attribute features. S5-2: Utilize a cross-scale attention fusion layer to calculate dynamic attention interaction weights between multiple initial features; and fuse multiple intermediate features based on scale differences and meteorological field continuity according to the dynamic attention interaction weights and the multiple initial features. S5-3: By utilizing multiple Transformer layers in a multi-layer Transformer encoder based on a multi-head self-attention mechanism, multiple rounds of deep feature iteration processing are performed on multiple intermediate features to obtain the required deep spatiotemporal features. S5-4: By processing the deep spatiotemporal features and the attribute features, the prediction output layer is used to obtain the corresponding target prediction results.
[0133] Specifically, the current power plant attribute parameters of the aforementioned target photovoltaic power plant may include at least one of the following: the current installed capacity of the target photovoltaic power plant, the current aging parameters of the photovoltaic modules, and the surface contaminant indicator parameters of the photovoltaic modules.
[0134] The above-mentioned cross-scale attention fusion layer calculates the dynamic attention interaction weights between multiple initial features; and based on the dynamic attention interaction weights and the multiple initial features, obtains multiple intermediate features that simultaneously take into account scale differences and meteorological field continuity. In specific implementation, this can include: calculating the dynamic attention interaction weights between the initial features according to the following formula:
[0135]
[0136] in, The matrix represents the dynamic attention interaction weights between initial features, where each element corresponds to a dynamic attention interaction weight between initial features; Q, K, and V represent the query matrix, key matrix, and value matrix constructed based on multiple initial features, respectively. Let K be the dimension of the key matrix; Represents the scale bias matrix; The element in the i-th row and j-th column of the scale bias matrix represents the dynamic attention interaction weight between the initial feature numbered i and the initial feature numbered j. The scale similarity weight coefficient; , These represent the scale indicator parameters for the initial feature numbered i and the initial feature numbered j, respectively. This is a parameter related to scale difference sensitivity. This represents a weather system consistency indicator function.
[0137] Specifically, when the above belongs to the first scale, the corresponding scale indicator parameter can be 0; when it belongs to the second scale, the corresponding scale indicator parameter can be 1; and when it belongs to the third scale, the corresponding scale indicator parameter can be 2. When the initial feature numbered i and the initial feature numbered j belong to the same weather system, The value is 1 if it is not 0 otherwise.
[0138] The above-mentioned method of using the prediction output layer to process the deep spatiotemporal features and the attribute features to obtain the corresponding target prediction results can be specifically implemented as follows: using the prediction output layer to determine the key meteorological features of the second time period within the local area where the target photovoltaic power station is located based on the deep spatiotemporal features; using the prediction bundle layer to splice the key meteorological features and the attribute features to obtain the corresponding joint features; and using the prediction output layer to perform regression analysis and prediction based on the joint features to obtain the corresponding target prediction results.
[0139] Based on the above embodiments, the advantages and characteristics of the relevant model structure in the updated photovoltaic power prediction model can be fully utilized to efficiently and accurately predict the required target prediction results.
[0140] In some embodiments, the method may further include the following: S1: Obtain sample data; and use the sample data to construct a sample training set; S2: Based on the improved multi-channel Transformer network, an initial photovoltaic power prediction model is constructed; wherein, the initial photovoltaic power prediction model includes at least: an initial multi-scale feature embedding layer, an initial cross-scale attention fusion layer, an initial multi-layer Transformer encoder, and an initial prediction output layer. S3: Using the sample training set, perform multiple rounds of reinforcement learning on the initial photovoltaic power prediction model to obtain a photovoltaic power prediction model that meets the requirements.
[0141] Based on the above embodiments, a photovoltaic power prediction model that is suitable for complex data change scenarios and has good performance can be efficiently trained.
[0142] In some embodiments, after determining the photovoltaic power generation capacity of the target photovoltaic power station in the second time period based on the target prediction results, the method may further include the following: Based on the photovoltaic power generation capacity of the target photovoltaic power station in the second time period, determine the operation and maintenance management strategy of the target photovoltaic power station in the second time period, as well as the power handling strategy for power storage and grid-connected power sales.
[0143] In practice, a pre-set auxiliary decision-making model can be used to determine the operation and maintenance management strategy of the target photovoltaic power station in the second time period, as well as the power processing strategy for power storage and grid-connected power sales, based on the photovoltaic power generation capacity of the target photovoltaic power station in the second time period.
[0144] Specifically, the aforementioned pre-set auxiliary decision-making model can be a large language model trained in advance using a large number of historical operation and maintenance management records of photovoltaic power plants, as well as historical electricity storage and grid-connected electricity sales records.
[0145] In practice, based on the above-mentioned operation and maintenance management strategy and power processing strategy, the target photovoltaic power station can be operated and maintained accordingly during the second time period, as well as power storage and grid-connected power sales operations.
[0146] This allows for ensuring the accurate and stable operation of the target photovoltaic power station in the second time period while maximizing its power generation capacity. Furthermore, the generated electricity can be rationally allocated for storage and grid-connected sales, thereby securing relatively high operating revenue for the target photovoltaic power station.
[0147] As can be seen from the above, the photovoltaic power prediction method based on multi-scale meteorological features provided in this specification can, before implementation, train a photovoltaic power prediction model based on an improved multi-channel Transformer network using sample data, which is adapted to process multi-scale meteorological data. In specific implementation, after acquiring meteorological data at multiple scales for the first time period of the target photovoltaic power station, the system first determines whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to preset model detection rules. If the preset adaptive learning conditions are met, the system constructs and utilizes an improved EWC loss function according to preset model update rules to perform preset adaptive learning on the current photovoltaic power prediction model, obtaining an updated photovoltaic power prediction model. Then, according to preset data processing rules, the system constructs corresponding multi-channel feature vectors using meteorological data at multiple scales for the first time period. Finally, the updated photovoltaic power prediction model processes the multi-channel feature vectors and the current power station attribute parameters of the target photovoltaic power station to determine the photovoltaic power generation of the target photovoltaic power station for the second time period. On the one hand, by monitoring whether the preset adaptive learning conditions are met, the system automatically triggers the construction of a new photovoltaic power prediction model and performs preset adaptive learning based on the improved EWC loss function. This allows the model to learn and adapt to new data changes while avoiding the loss of important original knowledge, resulting in a better-performing and more stable updated photovoltaic power prediction model. On the other hand, by using the updated photovoltaic power prediction model based on the improved multi-channel Transformer network structure to process meteorological data at multiple scales in the first time period, the system can comprehensively and fully integrate meteorological data information at different spatiotemporal scale resolutions, efficiently and accurately predict the photovoltaic power generation of the target photovoltaic power station, and effectively reduce the prediction error of photovoltaic power generation.
[0148] This specification provides an electronic device through its embodiments. (See attached document.) Figure 6 As shown. The electronic device includes a network communication port 601, a processor 602, and a memory 603. These structures are connected by internal cables so that they can perform specific data interaction.
[0149] Specifically, the network communication port 601 can be used to acquire meteorological data at multiple scales for a first time period of the target photovoltaic power station.
[0150] The processor 602 is specifically used to detect whether the current photovoltaic power prediction model meets preset adaptive learning conditions according to preset model detection rules; wherein, the current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network; if the preset adaptive learning conditions are met, the processor constructs and uses an improved EWC loss function according to preset model update rules to perform preset adaptive learning on the current photovoltaic power prediction model to obtain an updated photovoltaic power prediction model; according to preset data processing rules, the processor constructs corresponding multi-channel feature vectors using meteorological data at multiple scales in the first time period; the processor uses the updated photovoltaic power prediction model to process the multi-channel feature vectors and the current power station attribute parameters of the target photovoltaic power station to obtain the corresponding target prediction result; and the processor determines the photovoltaic power generation of the target photovoltaic power station in the second time period based on the target prediction result.
[0151] The memory 603 can be used to store the corresponding instruction program and related intermediate data.
[0152] Based on the above method, the relevant structural performance of electronic equipment can be effectively utilized to improve the data processing speed of electronic equipment and efficiently realize the data processing of photovoltaic power prediction based on multi-scale meteorological characteristics.
[0153] In this embodiment, the network communication port 601 can be a virtual port bound to different communication protocols, thereby enabling the sending or receiving of different data. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. Furthermore, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM or CDMA; it can also be a Wi-Fi chip; or it can be a Bluetooth chip.
[0154] In this embodiment, the processor 602 can be implemented in any suitable manner. For example, the processor can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc. This specification is not limiting.
[0155] In this embodiment, the memory 603 may include multiple layers. In a digital system, anything that can store binary data can be a memory. In an integrated circuit, a circuit with storage function but no physical form is also called a memory, such as RAM, FIFO, etc. In a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0156] This specification also provides a computer-readable storage medium based on the above-described photovoltaic power prediction method based on multi-scale meteorological features. The computer-readable storage medium stores computer program instructions that, when executed, perform the following: acquire meteorological data at multiple scales for a first time period of a target photovoltaic power station; detect whether the current photovoltaic power prediction model meets preset adaptive learning conditions according to preset model detection rules; wherein the current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network; if the preset adaptive learning conditions are met, construct and utilize an improved EWC loss function according to preset model update rules to perform preset adaptive learning on the current photovoltaic power prediction model, obtaining an updated photovoltaic power prediction model; construct corresponding multi-channel feature vectors using meteorological data at multiple scales for the first time period according to preset data processing rules; use the updated photovoltaic power prediction model to process the multi-channel feature vectors and the current power station attribute parameters of the target photovoltaic power station to obtain corresponding target prediction results; and determine the photovoltaic power generation of the target photovoltaic power station for a second time period based on the target prediction results.
[0157] In this embodiment, the storage medium includes, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Cache, Hard Disk Drive (HDD), or Memory Card. The memory can be used to store computer program instructions. The network communication unit can be an interface configured according to standards specified in the communication protocol for network connection communication.
[0158] In this embodiment, the specific functions and effects implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other embodiments, and will not be repeated here.
[0159] This specification also provides a computer program product, comprising at least a computer program, which, when executed by a processor, implements the following method steps: acquiring meteorological data at multiple scales for a first time period of a target photovoltaic power station; detecting whether the current photovoltaic power prediction model meets preset adaptive learning conditions according to preset model detection rules; wherein the current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network; if the preset adaptive learning conditions are met, constructing and utilizing an improved EWC loss function according to preset model update rules to perform preset adaptive learning on the current photovoltaic power prediction model, thereby obtaining an updated photovoltaic power prediction model; constructing corresponding multi-channel feature vectors using meteorological data at multiple scales for the first time period according to preset data processing rules; using the updated photovoltaic power prediction model to process the multi-channel feature vectors and the current power station attribute parameters of the target photovoltaic power station to obtain corresponding target prediction results; and determining the photovoltaic power generation of the target photovoltaic power station for a second time period based on the target prediction results.
[0160] See Figure 7 As shown, at the software level, this specification also provides a photovoltaic power prediction device based on multi-scale meteorological characteristics, which may specifically include the following structural modules: The acquisition module 701 can be used to acquire meteorological data at multiple scales for the first time period of the target photovoltaic power station; The detection module 702 can be used to detect whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to the preset model detection rules; wherein, the current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network. The adaptive learning module 703 can be used to construct and utilize an improved EWC loss function to perform preset adaptive learning on the current photovoltaic power prediction model under the premise that the preset adaptive learning conditions are met, so as to obtain the updated photovoltaic power prediction model. The construction module 704 can be used to construct corresponding multi-channel feature vectors based on the preset data processing rules and using meteorological data at multiple scales in the first time period. The prediction module 705 can be used to obtain the corresponding target prediction result by processing the multi-channel feature vector and the current power station attribute parameters of the target photovoltaic power station using the updated photovoltaic power prediction model. The determination module 706 can be used to determine the photovoltaic power generation capacity of the target photovoltaic power station in the second time period based on the target prediction results.
[0161] In some embodiments, the meteorological data at multiple scales may specifically include: first-scale meteorological data, second-scale meteorological data, and third-scale meteorological data, etc. Specifically, the first-scale meteorological data may include global meteorological data with a resolution of 25km, the second-scale meteorological data may include regional meteorological data with a resolution of 3km, and the third-scale meteorological data may include meteorological data within the local area where the target photovoltaic power station is located.
[0162] In some embodiments, when the detection module 702 is specifically implemented, it can detect whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to the preset model detection rules in the following manner: Based on the preset model detection rules, it acquires multi-scale meteorological data of the historical reference time period before the current time point, measured data of photovoltaic power generation, and the current power station attribute parameters of the target photovoltaic power station; based on the third-scale meteorological data of the historical reference time period, it detects whether the degree of change of the meteorological data in the local area where the target photovoltaic power station is located is greater than a preset first degree of change threshold; based on the current power station attribute parameters of the target photovoltaic power station, it detects whether the degree of change of the power generation performance of the target photovoltaic power station is greater than a preset second degree of change threshold; when it is determined that the degree of change of the meteorological data in the local area where the target photovoltaic power station is located is greater than the preset first degree of change threshold, and Alternatively, if the degree of change in the power generation performance of the target photovoltaic power station exceeds a preset second degree of change threshold, a matching target sliding window is determined based on the change characteristics of the third-scale meteorological data of the historical reference time period; the current photovoltaic power prediction model is used to process multi-scale meteorological data of the historical reference time period to determine the predicted photovoltaic power generation data for the historical reference time period; using the target sliding window, the normalized root mean square error of the current photovoltaic power prediction model is calculated based on the predicted and measured photovoltaic power generation data of the historical reference time period; it is checked whether the normalized root mean square error of the current photovoltaic power prediction model exceeds a preset error threshold; if it is determined that the normalized root mean square error of the current photovoltaic power prediction model exceeds the preset error threshold, the current photovoltaic power prediction model is determined to meet the preset adaptive learning conditions.
[0163] In some embodiments, when the adaptive learning module 703 is specifically implemented, it can construct and utilize an improved EWC loss function according to a preset model update rule to perform preset adaptive learning on the current photovoltaic power prediction model in the following manner: construct a physical consistency loss term and a time smoothness loss term for the current photovoltaic power prediction model according to the preset model update rule; construct an improved EWC loss function using the physical consistency loss term and the time smoothness loss term; construct an incremental sample set for the current photovoltaic power prediction model using multi-scale meteorological data and measured photovoltaic power generation data of historical reference time periods; and perform preset adaptive learning on the current photovoltaic power prediction model using the incremental sample set based on the improved EWC loss function to obtain an updated photovoltaic power prediction model.
[0164] In some embodiments, when the above-mentioned construction module 704 is specifically implemented, it can construct corresponding multi-channel feature vectors using meteorological data at multiple scales in the first time period according to preset data processing rules in the following manner: Preprocessing is performed on the first-scale meteorological data, the second-scale meteorological data, and the third-scale meteorological data according to preset data processing rules to obtain preprocessed first-scale meteorological data, preprocessed second-scale meteorological data, and preprocessed third-scale meteorological data; Based on the preprocessed first-scale meteorological data, the Euclidean distance between each location point and its neighboring associated location points, and the meteorological gradient of the neighboring associated location points are calculated. Sensitivity factors: Based on the Euclidean distance between each location point and its neighboring associated location points, and the meteorological gradient sensitivity factors of the neighboring associated location points, improved gradient-sensitive inverse distance weighted interpolation is performed on the meteorological data of each location point in the preprocessed first-scale meteorological data to obtain the interpolated first-scale meteorological data; Based on the second-scale meteorological data, an upsampling operation is performed on the preprocessed third-scale meteorological data to obtain upsampled third-scale meteorological data that matches the second-scale meteorological data; Based on the interpolated first-scale meteorological data, the preprocessed second-scale meteorological data, and the upsampled third-scale meteorological data, corresponding multi-channel feature vectors are constructed.
[0165] In some embodiments, when the above-described construction module 704 is specifically implemented, improved gradient-sensitive inverse distance weighted interpolation can be performed on the meteorological data of the current location point in the preprocessed first-scale meteorological data according to the following formula:
[0166]
[0167] in, This is the first-scale meteorological data after interpolation at the current location point. These are the position coordinates of the current location point. This provides the first-scale meteorological data for the i-th neighboring location among the current location's neighboring locations. Let i be the position coordinates of the nearest associated location point. The inverse distance weights of the meteorological data for the current location point are given to the neighboring associated location point numbered i. p is the Euclidean distance between the current location and its neighboring associated location with the number i, where p is the distance exponent. N is a control constant, where N is the total number of neighboring related locations of the current location. For the meteorological gradient sensitivity factor of the neighboring associated location point i with respect to the current location point, Let i be the meteorological gradient vector of the neighboring associated location point. This is the gradient sensitivity parameter.
[0168] In some embodiments, the updated photovoltaic power prediction model may include at least: a multi-scale feature embedding layer, a cross-scale attention fusion layer, a multi-layer Transformer encoder, and a prediction output layer, etc. The multi-scale feature embedding layer includes at least: a first branch processing structure, a second branch processing structure, and a third branch processing structure; wherein the first branch processing structure corresponds to the first-scale meteorological data, the second branch processing structure corresponds to the second-scale meteorological data, and the third branch processing structure corresponds to the third-scale meteorological data. The multi-layer Transformer encoder includes at least multiple Transformer layers based on a multi-head self-attention mechanism.
[0169] In some embodiments, when the prediction module 705 is specifically implemented, it can use the updated photovoltaic power prediction model to process the multi-channel feature vector and the current power station attribute parameters of the target photovoltaic power station to obtain the corresponding target prediction result in the following manner: using the first branch processing structure, the second branch processing structure, and the third branch processing structure in the multi-scale feature embedding layer to process the first channel feature vector, the second channel feature vector, and the third channel feature vector in the multi-channel feature vector respectively to obtain multiple initial features based on different scales; and using the multi-scale feature embedding layer to process the current power station attribute parameters of the target photovoltaic power station to obtain the corresponding attribute features; using the cross-scale attention fusion layer to calculate the dynamic attention interaction weight between the initial features based on the multiple initial features; and using the dynamic attention interaction weight and the multiple initial features to fuse multiple intermediate features based on scale differences and meteorological field continuity; using multiple Transformer layers based on multi-head self-attention mechanism in the multi-layer Transformer encoder to perform multiple rounds of deep feature iteration processing on the multiple intermediate features to obtain the required deep spatiotemporal features; and using the prediction output layer to process the deep spatiotemporal features and the attribute features to obtain the corresponding target prediction result.
[0170] In some embodiments, the device can also be used to: acquire sample data; construct a sample training set using the sample data; construct an initial photovoltaic power prediction model based on an improved multi-channel Transformer network; wherein the initial photovoltaic power prediction model includes at least: an initial multi-scale feature embedding layer, an initial cross-scale attention fusion layer, an initial multi-layer Transformer encoder, and an initial prediction output layer; and perform multiple rounds of reinforcement learning on the initial photovoltaic power prediction model using the sample training set to obtain a photovoltaic power prediction model that meets the requirements.
[0171] In some embodiments, after determining the photovoltaic power generation capacity of the target photovoltaic power station in the second time period based on the target prediction results, the device can also be used to: determine the operation and maintenance management strategy of the target photovoltaic power station in the second time period, and the power processing strategy regarding power storage and grid-connected power sales, based on the photovoltaic power generation capacity of the target photovoltaic power station in the second time period.
[0172] It should be noted that the units, devices, or modules described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. For ease of description, the above devices are described by dividing them into various modules according to their functions. Of course, in implementing this specification, the functions of each module can be implemented in one or more software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection between the devices or units shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0173] As can be seen from the above, the photovoltaic power prediction based on multi-scale meteorological features provided in the embodiments of this specification has two advantages. First, by monitoring whether the preset adaptive learning conditions are met, the model is automatically triggered to construct and perform preset adaptive learning on the current photovoltaic power prediction model according to the improved EWC loss function. This enables the model to learn and adapt to new data changes while avoiding the loss of important original knowledge, resulting in an updated photovoltaic power prediction model with better performance and stable operation. Second, by using the updated photovoltaic power prediction model based on the improved multi-channel Transformer network structure to process meteorological data at multiple scales in the first time period, the model can comprehensively and fully integrate meteorological data information at different spatiotemporal scale resolutions, efficiently and accurately predict the photovoltaic power generation of the target photovoltaic power station, and effectively reduce the prediction error of photovoltaic power generation.
[0174] In a specific scenario example, the photovoltaic power prediction method based on multi-scale meteorological characteristics provided in this manual can be applied to achieve multi-scale photovoltaic power prediction based on adaptive online learning. For detailed implementation procedures, please refer to [link / reference needed]. Figure 8 As shown, it may include the following:
[0175] In this scenario example, considering that photovoltaic (PV) power generation is one of the most promising renewable energy sources, its large-scale grid connection poses a severe challenge to the stable operation of the power grid. Accurate PV power forecasting is a key technology for ensuring grid security, optimizing power dispatch, and improving the economic benefits of PV power plants. With the rapid growth of PV installed capacity, the requirements for forecast accuracy are also increasing.
[0176] However, existing methods for photovoltaic power prediction using trained models face the following bottlenecks: 1. Insufficient multi-scale information fusion: Most methods use only single-scale meteorological data (e.g., only NWP data or only satellite data), failing to fully utilize the complementarity of multi-source meteorological information. There are complex intrinsic relationships between large-scale weather system information, mesoscale meteorological process information, and local micro-meteorological information, and existing methods lack effective multi-scale fusion mechanisms. 2. Difficulty in modeling long-term dependencies: Traditional RNNs and LSTMs suffer from vanishing or exploding gradients when modeling long-distance temporal dependencies. While the standard Transformer model can alleviate this problem, its computational complexity is high, and it is not specifically optimized for the characteristics of meteorological data. 3. Lack of adaptive capability: Existing deep learning models are mostly static models, with fixed parameters after training, unable to dynamically adjust based on changes in prediction accuracy and environmental changes. When meteorological conditions change drastically (e.g., extreme weather events), the model's prediction accuracy drops significantly. 4. Inefficient online updates: When the model needs to be updated to adapt to new data, the entire model usually needs to be retrained. This is not only computationally expensive, but may also lead to catastrophic forgetting, where the model forgets important existing knowledge while learning new knowledge. 5. Difficulty in guaranteeing physical consistency: Purely data-driven methods may produce prediction results that do not conform to physical laws, such as unreasonable phenomena like the power curve decreasing as irradiance increases.
[0177] This leads to the following problems: Problem 1: Insufficient fusion of multi-scale meteorological data. Existing methods mostly use meteorological data at a single scale, failing to simultaneously capture the complex relationships between large-scale weather system evolution, mesoscale meteorological processes, and local micro-meteorological characteristics. Global-scale NWP data (25km resolution) provides the large-scale circulation background, regional-scale refined forecast data (3km resolution) contains mesoscale convective system information, while field-measured data reflects local micro-meteorological characteristics. Existing technologies lack effective multi-scale fusion mechanisms, making it difficult to comprehensively utilize these complementary information. Problem 2: Limited spatiotemporal feature extraction capabilities. Traditional deep learning models struggle to effectively model the complex spatiotemporal evolution of meteorological fields, especially long-range dependencies in long-term series. Meteorological systems exhibit multi-timescale characteristics (from minute-level turbulence changes to seasonal solar altitude angle changes) and spatial correlations (similar meteorological conditions in neighboring areas). Existing RNN and CNN models have limitations in capturing these complex spatiotemporal features. Problem 3: Lack of adaptive adjustment mechanisms in models. Most existing prediction models are static, with fixed parameters after training, making dynamic adjustments impossible based on changes in prediction accuracy and weather conditions. This leads to two problems: first, the model's prediction accuracy drops significantly when weather conditions change drastically (e.g., extreme weather events); second, the actual performance of power plants changes slowly due to factors such as photovoltaic module aging and surface contamination, and static models cannot adapt to these changes. Problem 4: Inefficient model updates and catastrophic forgetting. When updating the model to adapt to new data, the entire model usually needs to be retrained, resulting in high computational costs and potentially catastrophic forgetting—the model learns new knowledge but forgets important existing knowledge. Existing incremental learning methods do not fully consider the specific characteristics of photovoltaic power prediction, and their update strategies are not efficient or stable enough. Problem 5: Insufficient physical consistency guarantees. Purely data-driven methods may produce prediction results that do not conform to physical laws, lacking physical constraints. For example, there is a fundamental physical relationship between photovoltaic power generation and irradiance, but in some cases, data-driven models may produce anomalous predictions of power decreases as irradiance increases.
[0178] To address the aforementioned issues and their root causes, this scenario example proposes a multi-scale fusion Transformer architecture, a precision-triggered adaptive online fine-tuning mechanism, a loss function incorporating physical constraints, and an improved elastic weight consolidation algorithm to achieve high-precision, adaptive, and physically reasonable photovoltaic power prediction.
[0179] For specific implementation, please refer to Figure 8As shown in the example, a complete and systematic adaptive photovoltaic power prediction system is provided, consisting of five core modules. These modules are connected through standardized data interfaces and control flow to form an organic whole.
[0180] The system comprises five core modules: a data acquisition and multi-scale fusion module, a multi-channel Transformer prediction module, an accuracy monitoring and triggering module, an adaptive online fine-tuning module, and a power prediction output module. These modules are interconnected via standardized data and control flows. Specifically, the accuracy monitoring module calculates the prediction accuracy (normalized root mean square error nRMSE) in real time. When the accuracy falls below 85% (i.e., nRMSE > 15%), it sends a trigger signal to the adaptive online fine-tuning module, initiating the model fine-tuning process. The fine-tuned model parameters are then updated to the prediction module, forming a closed-loop feedback mechanism that enables the system to continuously adapt to environmental changes.
[0181] 1. Regarding the multi-scale meteorological data fusion module
[0182] In practice, this module is responsible for collecting, preprocessing, and fusing meteorological data at three different scales (e.g., meteorological data at multiple scales) to form a unified feature representation. This is the data foundation of the entire system, and its quality directly affects the accuracy of subsequent forecasts.
[0183] Specifically, first, define and analyze the characteristics of the data source. You can refer to the following:
[0184] in, (For example, first-scale meteorological data) provides a large-scale circulation background for global-scale meteorological data with a resolution of 25 km (such as ECMWF ERA5 reanalysis data); (For example, second-scale meteorological data) is regional-scale meteorological data with a resolution of 3 km (such as WRF model output), which includes information on mesoscale convective systems; (For example, third-scale meteorological data) refers to measured meteorological data from photovoltaic power stations, reflecting local micro-meteorological characteristics.
[0185] Next, data unification processing can be performed. Since the three data sources have different spatial resolutions, unification processing is necessary. This invention proposes an improved gradient-sensitive inverse distance weighted interpolation method to downsample global data to a 3km resolution while preserving the gradient characteristics of the meteorological field:
[0186] in, The result is the interpolation at the target grid point (x, y); N is the number of source points involved in the interpolation (usually the 4 nearest neighbors). Inverse distance weights, Let p be the Euclidean distance between the source and target points, and p be the distance exponent (usually taken as 2). To prevent division by zero for small constants; Let i be the meteorological gradient vector of the i-th source point; This is the gradient sensitivity parameter, which controls the degree to which the gradient affects the weights. The innovation of this method lies in the introduction of a gradient sensitivity factor. This ensures that gradient information is fully considered when interpolating in areas with large meteorological gradients (such as fronts and convection zones), avoiding the smoothing out of important meteorological features.
[0187] Finally, feature fusion is performed. The unified multi-scale data is constructed into a three-channel feature tensor (e.g., a multi-channel feature vector):
[0188] Where T is the time series length, H and W are the height and width of the spatial grid, and C is the number of feature channels for each scale of data. For global scale features (e.g., first channel feature vector). This represents regional scale features (e.g., second channel feature vectors). This represents local-scale features (obtained by interpolation from station data) (e.g., the third-channel feature vector). This three-channel representation maintains the independence of features at each scale, facilitating subsequent cross-scale feature interactions.
[0189] 2. Regarding the Multi-Channel Transformer Prediction Module (MCT-Net)
[0190] In practical implementation, an improved Transformer architecture specifically designed for multi-scale meteorological data was developed for this module, called the Multi-Channel Transformer Network (MCT-Net).
[0191] Specifically, regarding the network architecture design, the aforementioned MCT-Net consists of three main parts: a multi-scale feature embedding layer, a cross-scale attention fusion layer, and a multi-layer Transformer encoder.
[0192] The aforementioned multi-scale feature embedding layer can be used to design independent embedding transformations for features at each scale:
[0193]
[0194]
[0195] in, , , It is a learnable linear transformation matrix; , , It is the bias vector; , , Scale-specific location coding. Location coding employs a spatiotemporal hybrid coding method, simultaneously encoding temporal and spatial location information.
[0196] The aforementioned cross-scale attention fusion layer employs a scale-aware attention mechanism to enable effective interaction between features of different scales.
[0197]
[0198] Where Q, K, and V are the query, key, and value matrices, respectively, which are obtained by linear transformation of features at three scales; The dimension of the key vector; This is the scale bias matrix; The spatial scale of feature points i and j (values are 0, 1, and 2, representing global, regional, and local scales, respectively). The scale similarity weight coefficient; This is a parameter related to scale difference sensitivity. This is a weather system consistency indicator function, which takes the value 1 when feature points i and j belong to the same weather system, and 0 otherwise. This indicator function is calculated based on the continuity characteristics of the meteorological field. The design enables the network to dynamically adjust attention weights based on scale differences and weather system correlations, promoting information flow between relevant scales and suppressing interference between unrelated scales.
[0199] The above multi-layer Transformer encoder, after cross-scale fusion, uses a standard Transformer encoder layer to further extract features:
[0200]
[0201]
[0202]
[0203] in, For the first The output of the layer encoder; This is a multi-head self-attention mechanism; This is a feedforward neural network. It is constructed by stacking multiple... The network can learn the deep spatiotemporal characteristics of the weather field.
[0204] Finally, the above-mentioned prediction output layer maps the encoded features to predictions of future meteorological elements through a linear transformation:
[0205] in, For the predicted future Meteorological elements at each time step (corresponding to the second time period); This is the output of the last Transformer encoder layer; , These are the weights and biases for the output layer.
[0206] 3. Regarding the accuracy monitoring and triggering module
[0207] In practice, this module monitors prediction accuracy in real time and triggers model fine-tuning when the accuracy falls below a threshold. For details, please refer to [link / reference needed]. Figure 9 As shown.
[0208] First, regarding the accuracy evaluation metric, the normalized root mean square error (nRMSE) is used as the accuracy evaluation metric:
[0209] in, The actual power at the i-th time point; The corresponding predicted power; denoted as , where is the installed capacity of the photovoltaic power plant; N is the number of samples within the evaluation window. nRMSE normalizes the prediction error to the power plant capacity, facilitating comparisons between different power plants and enabling the setting of a unified trigger threshold.
[0210] Secondly, regarding the sliding window monitoring mechanism, the real-time accuracy is calculated using the sliding window mechanism:
[0211] Where W is the sliding window size, typically set to 24 hours (hourly forecasting) or 7 days (daily forecasting); t is the current time. The sliding window mechanism ensures real-time evaluation while reducing the impact of random errors through window smoothing.
[0212] Furthermore, regarding the trigger condition design, when the real-time accuracy falls below a preset threshold, model fine-tuning is triggered:
[0213] in, This is the trigger threshold. It is recommended to set the threshold to 15%, corresponding to a prediction accuracy of 85%. This threshold is a balance point determined based on extensive experiments and analysis: it can respond promptly to a decrease in accuracy while avoiding frequent fine-tuning due to over-triggering. The threshold can be adjusted according to specific application scenarios; for example, a smaller value can be set for scenarios requiring higher prediction accuracy.
[0214] In addition, a trigger condition context record is introduced: when a trigger occurs, the system not only records the trigger time, but also records the meteorological conditions and prediction error distribution at the time of the trigger, providing contextual information for subsequent fine-tuning and helping the model better understand the reasons for the decrease in accuracy.
[0215] Figure 9 The complete adaptive online fine-tuning process is demonstrated. Under normal operating conditions, the system continuously performs power prediction and accuracy monitoring. The accuracy monitoring module calculates the prediction accuracy (nRMSE) in real time and compares it with a preset threshold (15%). If the accuracy meets the threshold (nRMSE ≤ 15%), the system continues normal prediction; if the accuracy drops beyond the threshold (nRMSE > 15%), the system triggers the fine-tuning process. After triggering, the system first collects the latest measured data, then performs online fine-tuning based on the improved EWC algorithm. After fine-tuning, the model parameters are updated, and the prediction cycle continues. This process enables the prediction system to achieve self-optimization and continuous adaptation.
[0216] 4. Regarding the adaptive online fine-tuning module
[0217] In practical implementation, this module is responsible for fine-tuning the prediction model online under trigger conditions. This invention proposes an improved Elastic Weight Consolidation (EWC) algorithm that combines physical constraints and temporal smoothness constraints to achieve efficient and stable online learning.
[0218] Background of related issues: Traditional online learning or incremental learning methods face two main challenges when adapting to new data: First, the catastrophic forgetting problem, that is, the model over-adjusts parameters when learning new knowledge, causing important original knowledge to be forgotten; second, the lack of physical constraints may lead to the model learning patterns that do not conform to physical laws.
[0219] By introducing an improved EWC loss function, physical consistency loss and temporal smoothness loss are added to the standard EWC loss function: .
[0220] The above scheme was specifically applied to a coastal photovoltaic power station under special weather conditions (typhoon passage) for testing. The collected meteorological data are shown in Table 1.
[0221] Table 1
[0222] Based on the above data, this scheme is used to predict photovoltaic power generation; and the system will make adaptive adjustments during typhoon weather. For details of the adjustment process, please refer to [link / reference needed]. Figure 10 As shown.
[0223] Figure 10 This demonstrates the complete process of the system's adaptive adjustment during typhoon weather. As the typhoon's impact intensified, the prediction accuracy (nRMSE) gradually increased from the normal level of 12%. When nRMSE exceeded the 15% threshold (August 16, 14:00), the system triggered fine-tuning for the first time. After fine-tuning, nRMSE decreased from 28% to 20%. As the typhoon continued to affect the system, accuracy decreased again, and the system triggered fine-tuning for the second time at August 18, 09:00, with nRMSE decreasing from 22% to 17%. After the typhoon passed, as the weather returned to normal, the prediction accuracy gradually recovered to normal levels. This process demonstrates the system's adaptive capability to extreme weather.
[0224] In practice, under typhoon weather conditions, the system's adaptive fine-tuning mechanism employs the following special strategies: Dynamic adjustment based on Fisher information matrix:
[0225] in, (0.7 under normal conditions). Under extreme weather conditions such as typhoons, the system reduces the weight of retaining historical knowledge, enabling the model to adapt to new weather patterns more quickly.
[0226] And perform fine-tuning and dataset augmentation: When a typhoon weather pattern is detected, the system automatically retrieves similar typhoon weather samples from the historical database and adds them to the fine-tuning dataset. Similarity is calculated based on features such as typhoon path, intensity, and impact range. Data augmentation improves the model's learning efficiency for extreme weather events.
[0227] Physical constraints are also reinforced: Under extreme weather conditions, the weight of the physical consistency loss should be appropriately reduced (from 0.5 under normal conditions to 0.4), because the power-meteorological relationship under extreme weather conditions may differ from that under normal conditions, and excessive physical constraints may limit the model's adaptability.
[0228] The predictive performance of the system under typhoon weather can be seen in Table 2 through adaptive online fine-tuning.
[0229] Table 2
[0230] Specifically, compared to a static model: without an adaptive fine-tuning mechanism, the static model's prediction nRMSE during typhoons might consistently remain above 28%, while this invention controls the nRMSE between 17% and 22% through two fine-tuning adjustments, representing a relative improvement of 22% to 39%. Compared to fixed-interval updates: if a fixed time interval (e.g., daily) is used to update the model, it may fail to respond promptly in the early stages of a typhoon, and then require unnecessary updates after the typhoon has passed. The accuracy-triggered mechanism of this invention is more intelligent and efficient. Recovery speed analysis: after a typhoon, the system's prediction accuracy recovers to normal levels (below 15%) within 24 hours, while a static model may require several days to gradually recover, demonstrating the good adaptability and recovery capability of this invention.
[0231] Through the above scenario examples, the photovoltaic power prediction method based on multi-scale meteorological features provided in this specification is verified. Through an accuracy-triggered adaptive online fine-tuning mechanism, prediction accuracy monitoring and model fine-tuning are dynamically combined, achieving self-optimization of the prediction system. A deep fusion method of multi-scale meteorological data is employed, utilizing an improved multi-channel Transformer architecture to effectively integrate global, regional, and local meteorological information. A physics-guided online learning algorithm is used, introducing physical constraints and temporal smoothness constraints on the EWC algorithm to ensure the physical rationality and stability of the online learning process. This achieves the following beneficial effects: 1. Significantly improved prediction accuracy: Through multi-scale meteorological data fusion, this invention can fully utilize the complementarity of global, regional, and local meteorological information to effectively capture meteorological features at different scales. Experiments show that compared to single-source prediction methods, the prediction accuracy of this invention can be improved by 25%-40%. Particularly in medium-term prediction (3-10 days), the accuracy improvement is particularly significant due to the fusion of large-scale circulation information. Furthermore, the improved MCT-Net architecture is specifically designed for the spatiotemporal characteristics of meteorological data, improving accuracy by 15%-20% in meteorological element prediction tasks compared to the standard Transformer model. 2. Significantly Enhanced Adaptability: The innovative accuracy monitoring-triggering-fine-tuning mechanism enables the system to dynamically adjust the model based on predictive performance, adapting to changes in weather conditions and power plant operating status. When encountering extreme weather events or slow changes in power plant performance, the system can automatically detect a decrease in accuracy and trigger fine-tuning, allowing the model to quickly adapt to new conditions. Compared to methods that update at fixed time intervals, the adaptive triggering mechanism of this invention is more intelligent and efficient, updating in a timely manner when needed and avoiding unnecessary computational overhead. 3. Significantly Optimized Computational Efficiency: The online fine-tuning mechanism updates only a portion of the model's parameters, avoiding retraining the entire model. The fine-tuning process can typically be completed within minutes, reducing computational costs by 60%-80%. The selective parameter update strategy further improves fine-tuning efficiency by updating only relatively unimportant parameters, protecting important knowledge from being compromised. This efficient update mechanism allows the system to be deployed on resource-constrained edge devices, meeting the needs of real-time prediction. 4. Guaranteed Physical Consistency: Through a physical-data hybrid model and a physical consistency loss function, this invention ensures that the prediction results conform to the physical laws of photovoltaic power generation, avoiding non-physical predictions that may occur with purely data-driven methods. The introduction of physical constraints not only improves the rationality of predictions but also enhances the interpretability of the model, making the prediction results more readily accepted and trusted by domain experts. Experiments show that after adding physical constraints, the model's prediction stability under extreme conditions improves by more than 30%. 5. Effective mitigation of catastrophic forgetting problem: The online learning mechanism based on the improved EWC algorithm protects important historical knowledge during fine-tuning, preventing the model from over-adapting to new data and forgetting existing knowledge.The online update and adaptive weight adjustment mechanism of the Fisher information matrix further enhance the robustness of the algorithm. Experiments show that, compared with traditional incremental learning methods, this invention improves the memory retention rate of historical models by 40%-60% after continuously learning multiple different meteorological models. 6. Strong scalability and versatility: The system architecture adopts a modular design, and the modules are connected through standard interfaces, making it easy to expand and modify. For example, meteorological data sources can be easily replaced, the prediction model structure can be adjusted, and the fine-tuning algorithm can be modified. In addition, this method is not only applicable to photovoltaic power prediction, but can also be applied to other time series prediction tasks such as wind power prediction and load prediction after appropriate adjustments, demonstrating wide applicability.
[0232] While this specification provides the steps of operation for the methods described in the embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or client product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded. The terms "first," "second," etc., are used to denote names and do not indicate any particular order.
[0233] Those skilled in the art will also know that, besides implementing the controller using purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.
[0234] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer-readable storage media, including storage devices.
[0235] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this specification can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of this specification can essentially be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of this specification.
[0236] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. This specification can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices, etc.
[0237] Although this specification has been described by way of examples, those skilled in the art will recognize that many variations and modifications are possible without departing from the spirit of this specification, and it is intended that the appended text include such variations and modifications without departing from the spirit of this specification.
Claims
1. A photovoltaic power prediction method based on multi-scale meteorological characteristics, characterized in that, include: Acquire meteorological data at multiple scales for the first time period of the target photovoltaic power plant; The meteorological data at multiple scales includes: first-scale meteorological data, second-scale meteorological data, and third-scale meteorological data, with different scales of meteorological data corresponding to different spatial resolutions; According to preset model detection rules, the current photovoltaic power prediction model is tested to see if it meets preset adaptive learning conditions. The current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network. The photovoltaic power prediction model includes at least: a multi-scale feature embedding layer, a cross-scale attention fusion layer, a multi-layer Transformer encoder, and a prediction output layer. The multi-scale feature embedding layer includes at least: a first branch processing structure corresponding to first-scale meteorological data, a second branch processing structure corresponding to second-scale meteorological data, and a third branch processing structure corresponding to third-scale meteorological data. The cross-scale attention fusion layer includes at least: a cross-feature interaction analysis module based on a scale-aware attention mechanism, and a corresponding cross-feature fusion module. The cross-scale attention fusion layer is used to analyze and adjust the dynamic attention interaction weights between different features based on the time dimension to obtain intermediate features that simultaneously consider scale differences and meteorological field continuity. The multi-layer Transformer encoder includes at least multiple Transformer layers based on a multi-head self-attention mechanism, used to obtain deep spatiotemporal features that meet the requirements by performing multiple rounds of deep feature iteration processing on the intermediate features. Under the condition that the preset adaptive learning conditions are met, the improved EWC loss function is constructed and used to perform preset adaptive learning on the current photovoltaic power prediction model according to the preset model update rules, so as to obtain the updated photovoltaic power prediction model. The improved EWC loss function includes: EWC loss term, physical consistency loss term, and time smoothness loss term. Based on the preset data processing rules, the corresponding multi-channel feature vectors are constructed using meteorological data at multiple scales in the first time period. By using the updated photovoltaic power prediction model and processing the multi-channel feature vector, as well as the current power station attribute parameters of the target photovoltaic power station, the corresponding target prediction result is obtained. Based on the target prediction results, determine the photovoltaic power generation capacity of the target photovoltaic power station in the second time period.
2. The method according to claim 1, characterized in that, The first-scale meteorological data includes global meteorological data with a resolution of 25 km, the second-scale meteorological data includes regional meteorological data with a resolution of 3 km, and the third-scale meteorological data includes measured meteorological data within the local area where the target photovoltaic power station is located.
3. The method according to claim 2, characterized in that, The step of detecting whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to the preset model detection rules includes: Based on the preset model detection rules, obtain multi-scale meteorological data, measured photovoltaic power generation data, and current power station attribute parameters of the target photovoltaic power station for the historical reference time period before the current time point; Based on the third-scale meteorological data of the historical reference time period, it is detected whether the degree of change of meteorological data in the local area where the target photovoltaic power station is located is greater than the preset first degree of change threshold; based on the current power station attribute parameters of the target photovoltaic power station, it is detected whether the degree of change of the power generation performance of the target photovoltaic power station is greater than the preset second degree of change threshold. If the degree of change in meteorological data in the local area where the target photovoltaic power station is located is greater than a preset first degree of change threshold, and / or the degree of change in the power generation performance of the target photovoltaic power station is greater than a preset second degree of change threshold, a matching target sliding window is determined based on the change characteristics of the third-scale meteorological data in the historical reference time period. By using the current photovoltaic power prediction model and processing multi-scale meteorological data for a historical reference period, the predicted photovoltaic power generation data for that historical reference period can be determined. Using a target sliding window, the normalized root mean square error of the current photovoltaic power prediction model is calculated based on the predicted and measured photovoltaic power generation data for historical reference time periods. Check whether the normalized root mean square error of the current photovoltaic power prediction model is greater than the preset error threshold. If the normalized root mean square error of the current photovoltaic power prediction model is greater than the preset error threshold, then the current photovoltaic power prediction model is determined to meet the preset adaptive learning conditions.
4. The method according to claim 3, characterized in that, The step of constructing and utilizing an improved EWC loss function to perform pre-defined adaptive learning on the current photovoltaic power prediction model according to a preset model update rule includes: Based on the preset model update rules, construct the physical consistency loss term and the time smoothness loss term for the current photovoltaic power prediction model; An improved EWC loss function is constructed using the aforementioned physical consistency loss term and temporal smoothness loss term; By utilizing multi-scale meteorological data from historical reference periods and measured photovoltaic power generation data, an incremental sample set is constructed for the current photovoltaic power prediction model. Based on the improved EWC loss function, the current photovoltaic power prediction model is subjected to pre-defined adaptive learning using the incremental sample set to obtain an updated photovoltaic power prediction model.
5. The method according to claim 2, characterized in that, The step involves constructing a corresponding multi-channel feature vector using meteorological data at multiple scales from the first time period, based on preset data processing rules. According to the preset data processing rules, the first-scale meteorological data, the second-scale meteorological data, and the third-scale meteorological data are preprocessed accordingly to obtain the preprocessed first-scale meteorological data, the preprocessed second-scale meteorological data, and the preprocessed third-scale meteorological data. Based on the preprocessed first-scale meteorological data, the Euclidean distance between each location point and its neighboring associated location points, as well as the meteorological gradient sensitivity factor of the neighboring associated location points, are calculated. Based on the Euclidean distance between each location point and its neighboring associated location points, and the meteorological gradient sensitivity factor of the neighboring associated location points, the meteorological data of each location point in the preprocessed first-scale meteorological data are subjected to improved gradient-sensitive inverse distance weighted interpolation to obtain the interpolated first-scale meteorological data. Based on the second-scale meteorological data, the preprocessed third-scale meteorological data is upsampled to obtain upsampled third-scale meteorological data that matches the second-scale meteorological data. Based on the interpolated first-scale meteorological data, the preprocessed second-scale meteorological data, and the upsampled third-scale meteorological data, corresponding multi-channel feature vectors are constructed.
6. The method according to claim 5, characterized in that, The improved gradient-sensitive inverse distance weighted interpolation, performed on the meteorological data of each location point in the preprocessed first-scale meteorological data based on the Euclidean distance between each location point and its neighboring associated location points, and the meteorological gradient sensitivity factor of the neighboring associated location points, includes: The following formula is used to perform improved gradient-sensitive inverse distance weighted interpolation on the meteorological data of the current location point in the preprocessed first-scale meteorological data: in, This is the first-scale meteorological data after interpolation at the current location point. These are the position coordinates of the current location point. This provides the first-scale meteorological data for the i-th neighboring location among the current location's neighboring locations. Let i be the position coordinates of the nearest associated location point. The inverse distance weights of the meteorological data for the current location point are given to the neighboring associated location point numbered i. p is the Euclidean distance between the current location and its neighboring associated location with the number i, where p is the distance exponent. N is a control constant, where N is the total number of neighboring related locations of the current location. For the meteorological gradient sensitivity factor of the neighboring associated location point i with respect to the current location point, Let i be the meteorological gradient vector of the neighboring associated location point. This is the gradient sensitivity parameter.
7. The method according to claim 2, characterized in that, The updated photovoltaic power prediction model includes at least: a multi-scale feature embedding layer, a cross-scale attention fusion layer, a multi-layer Transformer encoder, and a prediction output layer; The multi-scale feature embedding layer includes at least: a first branch processing structure, a second branch processing structure, and a third branch processing structure; wherein the first branch processing structure corresponds to the first-scale meteorological data, the second branch processing structure corresponds to the second-scale meteorological data, and the third branch processing structure corresponds to the third-scale meteorological data. The multi-layer Transformer encoder includes at least multiple Transformer layers based on a multi-head self-attention mechanism.
8. The method according to claim 7, characterized in that, The updated photovoltaic power prediction model is used to process the multi-channel feature vector and the current power station attribute parameters of the target photovoltaic power station to obtain the corresponding target prediction result, including: The first branch processing structure, the second branch processing structure, and the third branch processing structure in the multi-scale feature embedding layer are used to process the first channel feature vector, the second channel feature vector, and the third channel feature vector in the multi-channel feature vector, respectively, to obtain multiple initial features based on different scales; and the multi-scale feature embedding layer is used to process the current power station attribute parameters of the target photovoltaic power station to obtain the corresponding attribute features. A cross-scale attention fusion layer is used to calculate dynamic attention interaction weights between initial features based on multiple initial features; and multiple intermediate features are obtained by fusing the dynamic attention interaction weights and the multiple initial features based on scale differences and meteorological field continuity. By utilizing multiple Transformer layers based on a multi-head self-attention mechanism in a multi-layer Transformer encoder, deep spatiotemporal features that meet the requirements are obtained through multiple rounds of deep feature iteration processing on multiple intermediate features. By processing the deep spatiotemporal features and the attribute features using the prediction output layer, the corresponding target prediction results are obtained.
9. The method according to claim 1, characterized in that, The method further includes: Acquire sample data; and use the sample data to construct a sample training set; An initial photovoltaic power prediction model is constructed based on an improved multi-channel Transformer network. The initial photovoltaic power prediction model includes at least: an initial multi-scale feature embedding layer, an initial cross-scale attention fusion layer, an initial multi-layer Transformer encoder, and an initial prediction output layer. Using the sample training set, multiple rounds of reinforcement learning are performed on the initial photovoltaic power prediction model to obtain a photovoltaic power prediction model that meets the requirements.
10. The method according to claim 1, characterized in that, After determining the photovoltaic power generation capacity of the target photovoltaic power station in the second time period based on the target prediction results, the method further includes: Based on the photovoltaic power generation capacity of the target photovoltaic power station in the second time period, determine the operation and maintenance management strategy of the target photovoltaic power station in the second time period, as well as the power handling strategy for power storage and grid-connected power sales.
11. A photovoltaic power prediction device based on multi-scale meteorological characteristics, characterized in that, include: The acquisition module is used to acquire meteorological data at multiple scales for the first time period of the target photovoltaic power station; The meteorological data at multiple scales includes: first-scale meteorological data, second-scale meteorological data, and third-scale meteorological data, with different scales of meteorological data corresponding to different spatial resolutions; The detection module is used to detect whether the current photovoltaic power prediction model meets the preset adaptive learning conditions according to the preset model detection rules. The current photovoltaic power prediction model is a model trained based on an improved multi-channel Transformer network. The photovoltaic power prediction model includes at least: a multi-scale feature embedding layer, a cross-scale attention fusion layer, a multi-layer Transformer encoder, and a prediction output layer. The multi-scale feature embedding layer may include at least: a first branch processing structure corresponding to the first-scale meteorological data, a second branch processing structure corresponding to the second-scale meteorological data, and a third branch processing structure corresponding to the third-scale meteorological data. The cross-scale attention fusion layer includes at least: a cross-feature interaction analysis module based on a scale-aware attention mechanism, and a corresponding cross-feature fusion module. The cross-scale attention fusion layer is used to analyze and adjust the dynamic attention interaction weights between different features based on the time dimension to obtain intermediate features that simultaneously consider scale differences and meteorological field continuity. The multi-layer Transformer encoder includes at least multiple Transformer layers based on a multi-head self-attention mechanism, used to obtain deep spatiotemporal features that meet the requirements by performing multiple rounds of deep feature iteration processing on the intermediate features. An adaptive learning module is used to construct and utilize an improved EWC loss function to perform a preset adaptive learning on the current photovoltaic power prediction model, based on a preset model update rule, under the condition that the preset adaptive learning conditions are met, so as to obtain an updated photovoltaic power prediction model. The improved EWC loss function includes: an EWC loss term, a physical consistency loss term, and a time smoothness loss term. The construction module is used to construct corresponding multi-channel feature vectors based on the preset data processing rules and using meteorological data at multiple scales in the first time period. The prediction module is used to obtain the corresponding target prediction result by processing the multi-channel feature vector and the current power station attribute parameters of the target photovoltaic power station using the updated photovoltaic power prediction model. The determination module is used to determine the photovoltaic power generation capacity of the target photovoltaic power station in the second time period based on the target prediction results.
12. An electronic device, characterized in that, It includes a processor and a memory for storing processor-executable instructions, wherein the processor, when executing the instructions, implements the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.
14. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Photovoltaic power prediction method, model training method, device, equipment and medium
CN117200187A