Cloud classification based adaptive attention hourly solar radiation calculation method and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
- Filing Date
- 2026-04-24
- Publication Date
- 2026-08-04
AI Technical Summary
[0005]针对现有技术中存在的问题,本发明提供了一种基于云分类的自适应注意力逐时地表太阳辐射计算方法和设备,其目的在于提升复杂云况下逐时地表太阳辐射的计算精度,解决现有深度学习模型对云类型异质性处理不足以及无法有效捕捉空间邻近效应的技术问题
Smart Images

Figure CN122508530A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of solar energy resource assessment and satellite remote sensing inversion technology, and is a method and device for calculating hourly surface solar radiation based on cloud classification and adaptive attention. Background Technology
[0002] Earth's surface solar radiation is the core energy source for life systems on Earth and a key parameter for building energy-saving design, photovoltaic system planning, and operational optimization. Accurate hourly data on Earth's surface solar radiation can support core tasks such as building site selection, orientation optimization, thermal design of building envelopes, and optimization of photovoltaic module layout, which is of great significance for improving building energy efficiency and promoting the large-scale utilization of renewable energy.
[0003] Current hourly simulation techniques for Earth's surface solar radiation are mainly divided into two categories: traditional physical models and machine learning models. Traditional physical models are built based on atmospheric radiative transfer theory, calculating the amount of radiation reaching the Earth's surface by simulating the transmission process of solar radiation in the atmosphere. Although these models have a clear physical mechanism, they have high computational complexity and stringent requirements for the completeness and accuracy of atmospheric parameters. Under complex atmospheric conditions such as cloud cover and changes in aerosol concentration, their generalization ability and simulation accuracy decrease significantly.
[0004] In recent years, machine learning methods, represented by deep learning, have become the mainstream technology for satellite remote sensing inversion of Earth's surface solar radiation due to their powerful nonlinear feature extraction capabilities. However, existing deep learning models still have shortcomings: First, existing models generally treat clouds in the atmosphere as a single type for homogeneous modeling, ignoring the significant heterogeneity of different cloud types such as cirrus, cumulus, and stratus in terms of optical thickness, microphysical parameters, and spatiotemporal distribution. Different cloud types have significantly different effects on the solar radiation transmission process. For example, thick clouds have a significantly stronger attenuation effect on solar radiation than thin cirrus clouds, and existing models cannot effectively distinguish and utilize cloud type information, resulting in severely insufficient simulation accuracy under complex cloud conditions such as overcast and cloudy days. Second, Earth's surface solar radiation has a significant spatial proximity effect, meaning that the radiation intensity at a target location is not only affected by the clouds directly above that location but also modulated by the scattering and reflection of solar radiation by clouds in the surrounding area. Existing models typically use data from a single pixel or a small-scale window as input, making it difficult to effectively capture the spatial correlation information of cloud features in satellite remote sensing data and fully explore the influence of neighborhood cloud distribution on radiative transfer, further limiting the improvement of inversion accuracy. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention provides an adaptive attention-based hourly surface solar radiation calculation method and device based on cloud classification. Its purpose is to improve the calculation accuracy of hourly surface solar radiation under complex cloud conditions and solve the technical problems of insufficient handling of cloud type heterogeneity and inability to effectively capture spatial proximity effects in existing deep learning models.
[0006] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: According to a first aspect of the present invention, an adaptive attention-based hourly surface solar radiation calculation method based on cloud classification is provided, comprising: Acquire multi-source data for the target area, including satellite remote sensing cloud product data, satellite remote sensing aerosol product data, and astronomical parameters; the satellite remote sensing cloud product data includes cloud classification data. The multi-source data is preprocessed to obtain preprocessed input data; The preprocessed input data is input into a pre-trained adaptive attention network model based on cloud classification to obtain hourly calculated values of solar radiation on the Earth's surface. The cloud-based adaptive attention network model includes a coarse feature extraction network, an adaptive attention network, and a feature extraction regression network. The coarse feature extraction network is used to perform shallow spatial feature extraction on the input data and output a cloud physical feature map; The adaptive attention network includes a cloud classification embedding layer, a multi-head attention branch, and a graph attention branch. The cloud classification embedding layer receives the cloud classification data and maps it into continuous feature vectors. The multi-head attention branch receives the continuous feature vectors and the cloud physical feature map, and extracts the global spatial dependencies of cloud features based on the continuous feature vectors and the cloud physical feature map. The graph attention branch receives the continuous feature vectors and the cloud physical feature map, and extracts the local neighborhood topology of cloud features based on the continuous feature vectors and the cloud physical feature map. The feature extraction regression network is used to receive the output of the adaptive attention network and generate the hourly calculated value of surface solar radiation based on the output of the adaptive attention network.
[0007] In one possible implementation of the first aspect, the satellite remote sensing cloud product data further includes hourly cloud effective particle radius, hourly cloud optical thickness, hourly cloud top height, and hourly cloud top temperature; The satellite remote sensing aerosol product data includes hourly aerosol optical thickness and Ångström index; The astronomical parameters include hourly solar altitude angle, solar declination angle, and solar hour angle; The hourly calculated values of solar radiation on the Earth's surface include the hourly calculated values of total radiation on the Earth's surface and the hourly calculated values of diffuse radiation on the Earth's surface.
[0008] In one possible implementation of the first aspect, the preprocessing of the multi-source data specifically includes: Geometric correction and radiometric calibration are performed on the satellite remote sensing cloud product data and the satellite remote sensing aerosol product data; The satellite remote sensing data, after geometric correction and radiometric calibration, is spatiotemporally matched with the locations of ground stations. Centered on the ground station, a satellite image block of a preset pixel size is extracted. The satellite image block contains the cloud classification data and cloud physical parameters used to generate the cloud physical feature map. The continuous variables in the extracted satellite image patch are normalized to obtain the preprocessed input data.
[0009] In one possible implementation of the first aspect, the coarse feature extraction network is constructed using convolutional kernels to convert multi-channel input data into cloud physical feature maps of a preset channel dimension. The cloud classification embedding layer is used to map the discrete cloud classification data into a continuous feature vector of a preset dimension.
[0010] In one possible implementation of the first aspect, the multi-head attention branch generates a query vector using the continuous feature vector, generates a key vector and a value vector using the cloud physical feature map, calculates the global spatial dependency between the continuous feature vector and the cloud physical feature map through the multi-head attention mechanism, and processes it using residual connection and layer normalization. The graph attention branch concatenates the continuous feature vector with the cloud physical feature map, constructs a graph structure based on the concatenated features, and constructs an undirected graph adjacency matrix based on a preset neighborhood range. It then dynamically calculates the attention weights of adjacent nodes through a learnable weight matrix to extract the local neighborhood topology.
[0011] In one possible implementation of the first aspect, the multi-head attention branch adopts an 8-head attention structure, and the graph attention branch constructs the undirected graph adjacency matrix using 8 neighborhoods.
[0012] In one possible implementation of the first aspect, the feature extraction regression network includes a convolutional layer, a batch normalization layer, an activation function layer, a pooling layer, a channel attention module, a spatial attention module, and a fully connected regression layer connected in sequence. The channel attention module is used to receive the fused features output by the adaptive attention network and to recalibrate the channel-dimensional weights of the fused features to obtain channel-weighted features. The spatial attention module is used to receive the channel-weighted features and recalibrate the spatial dimensions of the channel-weighted features to obtain spatial-weighted features. The fully connected regression layer is used to receive the spatially weighted features and output the hourly calculated value of solar radiation on the Earth's surface; the fully connected regression layer has a built-in Dropout regularization mechanism.
[0013] In one possible implementation of the first aspect, the training process of the pre-trained cloud classification-based adaptive attention network model includes: A model training sample set is constructed based on historical satellite remote sensing cloud product data, historical satellite remote sensing aerosol product data, historical hourly measured surface solar radiation data from ground stations, and historical astronomical parameters. The model training sample set is divided into a training set and a test set; The initial cloud classification-based adaptive attention network model was trained end-to-end using the training set, with the Adam optimizer employed and the root mean square error as the loss function. The model performance during the training process was monitored using the test set. Training is terminated when the loss value of the test set does not decrease within a preset number of consecutive training rounds. The current model weights are saved to obtain the pre-trained adaptive attention network model based on cloud classification.
[0014] According to a second aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the aforementioned method for calculating hourly surface solar radiation based on cloud classification adaptive attention.
[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned method for calculating hourly surface solar radiation based on cloud classification and adaptive attention.
[0016] According to a fourth aspect of the present invention, a computer program product is provided that, when executed by a processor, implements the aforementioned method for calculating hourly surface solar radiation based on cloud classification and adaptive attention.
[0017] Compared with the prior art, the present invention has at least the following beneficial effects: This invention provides an adaptive attention-based hourly surface solar radiation calculation method based on cloud classification. By constructing a coarse feature extraction network, an adaptive attention network integrating a cloud classification embedding mechanism and a two-branch attention structure, and a feature extraction regression network, it achieves end-to-end high-precision calculation of hourly surface solar radiation from satellite remote sensing data. By setting a cloud classification embedding layer in the adaptive attention network, ten discrete cloud type labels, such as cirrus, cumulus, and stratus, are mapped to continuous feature vectors, enabling the model to distinguish the significant heterogeneity of different cloud types in optical thickness, microphysical parameters, and spatiotemporal distribution. The cloud classification embedding layer captures the semantic relationships between different cloud types, ensuring that cloud types with similar optical properties are closer in the feature space, while cloud types with significantly different optical properties are farther apart. Based on this mechanism, the model can effectively enhance the attenuation response to radiation when facing thick clouds and maintain an appropriate transmission response when facing thin cirrus clouds, thereby improving the accuracy of radiation simulation under complex cloud conditions such as overcast and cloudy days.
[0018] By setting up a multi-head attention branch and a graph attention branch in parallel, the spatial dependencies of cloud features are extracted from both global and local spatial scales. The multi-head attention branch generates query vectors from continuous feature vectors and key and value vectors from cloud physical feature maps. Through attention calculation in multiple subspaces, it captures the macroscopic distribution trend and long-distance dependencies of cloud systems across the entire satellite image patch, enabling the model to perceive the scattering and modulation effect of distant clouds on the radiation intensity at the target location. The graph attention branch constructs pixels in the image patch as graph-structured nodes and dynamically calculates the attention weights between nodes based on neighborhood connectivity, accurately characterizing the local scattering and reflection effects of clouds surrounding the target location. The architecture design of parallel extraction and fusion output of the two branches effectively solves the inherent defect of existing models in capturing the spatial proximity effect of surface solar radiation.
[0019] A coarse feature extraction network extracts shallow spatial features from the input data and unifies the channel dimensions, providing a cloud physics feature map for the adaptive attention network and reducing computational redundancy caused by direct input of multi-source heterogeneous data. The feature extraction regression network receives the fused features output by the adaptive attention network, and through stepwise weight recalibration by the channel attention module and spatial attention module, strengthens the feature representation highly correlated with radiation calculation. Finally, the fully connected regression layer outputs the hourly total surface radiation calculation value and the hourly surface scattered radiation calculation value.
[0020] The overall architecture of this method enables it to maintain the nonlinear fitting ability of deep learning models while having a dual perception ability for cloud type heterogeneity and spatial proximity effect. It can maintain stable radiation calculation accuracy under various weather conditions such as sunny, cloudy, and overcast days, thus solving the problem of insufficient adaptability of traditional deep learning models to complex cloud conditions. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the specific embodiments of the present invention, the drawings used in the description of the specific embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0022] Figure 1 This is a flowchart of an adaptive attention-based hourly surface solar radiation calculation method based on cloud classification according to the present invention; Figure 2 This invention provides an adaptive attention network model framework based on cloud classification. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Example 1 This example uses Xi'an Station and Lhasa Station as the target areas for explanation. Figure 1 As shown, an adaptive attention-based method for calculating hourly surface solar radiation based on cloud classification includes the following steps: S1. Acquire multi-source data of the target area, including satellite remote sensing cloud product data, satellite remote sensing aerosol product data, and astronomical parameters.
[0025] Specifically, the satellite remote sensing cloud product data and satellite remote sensing aerosol product data originate from the Himawari-8 geostationary meteorological satellite. The advanced imager onboard this satellite provides multi-channel observation data with a temporal resolution of 10 minutes and a spatial resolution of 5 km. The satellite remote sensing data is downloaded through JAXA's official P-Tree system. The satellite remote sensing cloud product data includes cloud classification data, which categorizes clouds into ten types: cirrus, cirrostratus, deep convective clouds, altostratus, altocumulus, stratocumulus, cumulus, nimbostratus, and cumulonimbus. Astronomical parameters are calculated using astronomical formulas.
[0026] S2. Preprocess the multi-source data to obtain preprocessed input data.
[0027] The purpose of preprocessing is to unify data from different sources and with different spatiotemporal resolutions to the same specifications and to remove low-quality observations. Specifically, satellite 10-minute resolution data is aggregated into 1-hour scale data by aligning it with the time of ground stations, while measured data from multiple ground stations within the range of 34°N to 37°N and 108°E to 111°E are used as quality control and training references.
[0028] S3. Input the preprocessed input data into the pre-trained adaptive attention network model based on cloud classification to obtain the hourly calculated value of solar radiation on the Earth's surface.
[0029] The cloud-based adaptive attention network model includes a coarse feature extraction network, an adaptive attention network, and a feature extraction regression network. This model is built using the PyTorch deep learning framework. Figure 2 The overall architecture of the model is shown.
[0030] The coarse feature extraction network is used to perform shallow spatial feature extraction on the input data and output a cloud physical feature map. The input data is presented in the form of image patches based on multi-channel satellite remote sensing parameters, with each image patch corresponding to a spatiotemporally matched satellite observation slice.
[0031] The adaptive attention network comprises a cloud classification embedding layer, a multi-head attention branch, and a graph attention branch. The cloud classification embedding layer receives cloud classification data and maps it to continuous feature vectors. Originally discrete category labels, cloud classification data is transformed into continuous vector representations in a high-dimensional space using two-dimensional embedding techniques, allowing the semantic similarity between different cloud types to be reflected in the feature space. The multi-head attention branch receives continuous feature vectors and cloud physical feature maps, and extracts global spatial dependencies of cloud features based on these vectors and maps. The multi-head attention mechanism uses multiple independent attention heads to compute feature associations in different subspaces in parallel, capturing the distribution trends and movement characteristics of cloud systems over a large spatial range. The graph attention branch receives continuous feature vectors and cloud physical feature maps, and extracts local neighborhood topological relationships of cloud features based on these vectors and maps. The graph attention branch treats pixels in image patches as nodes in a graph structure, modeling cloud feature interactions within local regions through adjacency relationships between nodes.
[0032] The feature extraction regression network receives the output of the adaptive attention network and generates hourly calculated values of surface solar radiation based on the output of the adaptive attention network. The global spatial dependency features and local neighborhood topological features extracted by the adaptive attention network are fused and then further processed by the feature extraction regression network, ultimately mapping them to hourly calculated values of total surface radiation and hourly calculated values of surface diffuse radiation.
[0033] This embodiment constructs a coarse feature extraction network to initially extract cloud physical features. A cloud classification embedding layer transforms discrete cloud type labels into continuous embedding vectors. Then, a multi-head attention branch captures global spatial dependencies, and a graph attention branch extracts local neighborhood topological relationships. Finally, a feature extraction regression network generates radiation calculation values. This approach addresses the shortcomings of existing models in handling cloud type heterogeneity and capturing spatial proximity effects, enabling higher accuracy hourly calculations of surface solar radiation under complex cloud conditions.
[0034] Example 2 Satellite remote sensing cloud product data also includes hourly cloud effective particle radius, hourly cloud optical thickness, hourly cloud top height, and hourly cloud top temperature. The cloud effective particle radius characterizes the average size of cloud droplets or ice crystals, cloud optical thickness characterizes the overall attenuation capacity of the cloud layer against solar radiation, and cloud top height and cloud top temperature describe the location and thermodynamic state of the cloud's upper boundary, respectively. These parameters, together with cloud classification data, constitute the core content of satellite remote sensing cloud product data.
[0035] Satellite remote sensing aerosol product data includes hourly aerosol optical thickness and the Ångström index. Aerosol optical thickness represents the cylindrical extinction capacity of aerosol particles against solar radiation and is an important parameter describing atmospheric turbidity. The Ångström index reflects the size distribution characteristics of aerosol particles; a larger index value indicates a higher proportion of small-diameter particles.
[0036] Astronomical parameters include the hourly solar altitude angle, solar declination angle, and solar hour angle. The solar altitude angle is the angle between the sun's rays and the Earth's horizontal plane; the solar declination angle is the angle between the point where the sun is directly overhead and the Earth's equatorial plane; and the solar hour angle is the angular distance between the hour circle where the sun is located at the time of observation and the local meridian. These three parameters together determine the instantaneous intensity of solar radiation at the upper boundary of the atmosphere.
[0037] The hourly calculated values of solar radiation at the Earth's surface include the hourly calculated total surface radiation and the hourly calculated diffuse surface radiation. Total radiation is the sum of direct solar radiation received by the horizontal surface and diffuse radiation from the sky, while diffuse radiation is the radiation component that reaches the Earth's surface from the sky hemisphere after being scattered by the atmosphere and clouds.
[0038] This embodiment introduces continuous cloud physics parameters such as effective cloud particle radius, cloud optical thickness, cloud top height, and cloud top temperature, which complement cloud classification data, enabling the model to simultaneously utilize discrete cloud type semantic information and continuous cloud physical characteristic information. The introduction of aerosol optical thickness and the Ångström exponent allows the model to consider the impact of aerosol variations on radiative transfer. Solar altitude angle, solar declination angle, and solar hour angle, as astronomical parameters, provide the model with accurate information on the sun's geometric position. These input parameters ensure the model's adaptability under different atmospheric conditions.
[0039] Example 3 The preprocessing of the multi-source data specifically includes: Geometric correction and radiometric calibration are performed on satellite remote sensing cloud product data and satellite remote sensing aerosol product data. Geometric correction eliminates image distortion caused by satellite observation angle, terrain undulation, and Earth curvature, while radiometric calibration converts the raw digital signals recorded by the satellite into physically meaningful atmospheric parameter values. After correction and calibration, all satellite data are unified to the same space reference frame and radiometric standard.
[0040] The satellite remote sensing data, after geometric correction and radiometric calibration, were spatiotemporally matched with the locations of ground stations. In the temporal dimension, the 10-minute resolution observation data from the Himawari-8 satellite were aggregated into hourly data in 30-minute windows before and after each hour, and aligned with the measured radiometric data at the 1-hour resolution of the ground stations. In the spatial dimension, the corresponding pixel positions were located in the satellite imagery based on the latitude and longitude coordinates of the ground stations.
[0041] Centered on the ground station, a satellite image patch of a preset pixel size is extracted. The preset pixel size of the satellite image patch is 17×17 pixels. This size selection balances computational efficiency and spatial coverage, effectively encompassing the adjacent influence area of the cloud in the horizontal direction. The satellite image patch contains cloud classification data and cloud physical parameters used to generate cloud physical feature maps, namely, cloud effective particle radius, cloud optical thickness, cloud top height, and cloud top temperature.
[0042] Continuous variables in the extracted satellite image patches were normalized to obtain preprocessed input data. The minimum-maximum normalization method was used to map all continuous variables to the dimensionless interval [0,1], eliminating the negative impact of differences in parameter dimensions on model training. Physical thresholding was used to control the quality of ground station data, removing low solar altitude angle data (with a solar zenith angle exceeding 85 degrees) and abnormally strong radiation data (with a clear sky index greater than 0.9). Valid samples were categorized into three weather types based on the clear sky index: sunny (clear sky index greater than 0.6), cloudy (clear sky index between 0.3 and 0.6), and overcast (clear sky index less than 0.3). A total of 4379 valid hourly samples were retained from the Xi'an and Lhasa stations.
[0043] This embodiment ensures spatial consistency and radiometric accuracy of satellite data through geometric correction and radiometric calibration. By cropping 17×17 pixel image blocks, sufficient neighborhood information is provided for the graph attention branch to extract local topological relationships. Normalization and quality control improve the quality of training samples.
[0044] Example 4 The coarse feature extraction network is constructed using convolutional kernels to convert multi-channel input data into cloud physical feature maps with a preset channel dimension. Specifically, the coarse feature extraction network consists of three consecutive 3×3 convolutional kernel layers. The first convolutional layer receives input data containing seven channels: cloud effective particle radius, cloud optical thickness, cloud top height, cloud top temperature, cloud classification, aerosol optical thickness, and Ångström index, and outputs an intermediate feature map with eight channels. The second and third convolutional layers maintain the same number of channels and further extract shallow spatial features. No pooling operations are applied to the three convolutional layers to maintain the spatial resolution of the feature map. The final output cloud physical feature map has eight channels, and its spatial size is consistent with the size of the input satellite image patch.
[0045] The cloud classification embedding layer maps discrete cloud classification data into continuous feature vectors of a preset dimension. The original cloud classification data consists of integer labels ranging from 0 to 9, representing ten cloud types. The cloud classification embedding layer constructs a learnable embedding matrix with 10 rows corresponding to the ten cloud types and the preset embedding dimension of 32 columns. For each input cloud classification label, the embedding layer retrieves the corresponding row vector in the embedding matrix and outputs this row vector as a continuous feature vector. This continuous feature vector has a dimension of 32, much smaller than the one-hot encoding representation of the original labels, but it can express the intrinsic relationships between different cloud types in the form of a dense vector.
[0046] The continuous feature vector output by the cloud classification embedding layer is first subjected to a dimensionality expansion operation to match its spatial size with the cloud physical feature map. Then, it is concatenated with the cloud physical feature map in the channel dimension to form a fused feature representation, which is used by the adaptive attention network.
[0047] In this embodiment, the coarse feature extraction network compresses the original 7-channel input to 8 channels through three layers of 3×3 convolutions, reducing computational complexity while preserving key spatial information. The cloud classification embedding layer replaces the 10 discrete labels with 32-dimensional embedding vectors, achieving a continuous representation of cloud classification semantics.
[0048] Example 5 The multi-head attention branch generates a query vector Q from continuous feature vectors and a key vector K and a value vector V from cloud physical feature maps. Specifically, the continuous feature vectors are transformed into the query vector Q through a linear transformation layer, while the cloud physical feature maps are transformed into the key vector K and the value vector V through two different linear transformation layers. The multi-head attention mechanism divides Q, K, and V into multiple subspaces along the channel dimension, with each subspace corresponding to an independent attention head. Within each attention head, the dot product similarity between Q and K is calculated, and after softmax normalization, an attention weight matrix is obtained. This weight matrix is then used to sum V in a weighted manner to obtain the attention output of that head. The outputs of all attention heads are concatenated along the channel dimension and then transformed back to the original dimension through a linear transformation layer.
[0049] The multi-head attention branch is processed through residual connections and layer normalization. Residual connections add the input and output of the attention layer, effectively mitigating the vanishing gradient problem during deep network training. Layer normalization standardizes the feature channels of each sample, stabilizing the feature value distribution. The final output of the multi-head attention branch is the global spatial dependency of the cloud features extracted by that branch.
[0050] The graph attention branch concatenates continuous feature vectors with the cloud physical feature map, constructing a graph structure based on the concatenated features. Specifically, each pixel in the satellite image patch is considered a node in the graph structure, and each node uses the concatenated feature vector at that pixel location as its initial node feature. An undirected graph adjacency matrix is constructed based on a preset neighborhood range, which is an 8-neighborhood centered on each pixel, i.e., adjacent pixels in the top, bottom, left, right, and four diagonal directions. For node i and node j within its 8-neighborhood, the corresponding position in the adjacency matrix is assigned a value of 1, indicating a connection; the remaining positions are assigned a value of 0, indicating no connection.
[0051] The graph attention branch dynamically calculates the attention weights of neighboring nodes using a learnable weight matrix. For each node i and its neighbor j, the feature vectors of the two nodes are first concatenated, then mapped to scalar attention coefficients using a learnable weight vector. These coefficients are then normalized using the LeakyReLU activation function and softmax normalization to obtain the normalized attention weights of node j on node i. The final output feature of node i is a weighted sum of the features of all its neighboring nodes, with the contribution of each neighboring node determined by its attention weight. The final output of the graph attention branch is the local neighborhood topology extracted by this branch.
[0052] This embodiment utilizes differentiated generation methods for queries, keys, and values in the multi-head attention branch to enable the attention mechanism to focus on the interaction between cloud classification semantic information and cloud physical features. Through the construction of an 8-neighborhood graph structure and the dynamic calculation of learnable attention weights in the graph attention branch, the model can accurately capture the local cloud feature influence between the target pixel and its surrounding pixels. The two branches work in parallel, extracting cloud features from both macroscopic and microscopic spatial scales.
[0053] Example 6 The multi-head attention branch employs an 8-head attention structure. Eight attention heads compute in parallel, with each head processing a feature subspace with a dimension one-eighth of the total dimension. This 8-head structure achieves a good balance between computational efficiency and feature representation richness, enabling the capture of correlation patterns between continuous feature vectors and cloud physical feature maps from different semantic perspectives.
[0054] The graph attention branch uses an 8-neighborhood to construct an undirected graph adjacency matrix. The 8-neighborhood covers the closest spatial neighbors of the target pixel, effectively characterizing the impact of cloud scattering and reflection on the radiation intensity at the center point within the local region. The attention calculation in the graph structure is jointly optimized with other model parameters during training using the Adam optimizer.
[0055] In this embodiment, the 8-head attention structure enables the model to learn the global dependencies of cloud features from multiple perspectives, and the selection of 8 neighborhoods ensures that local topological relationships are fully extracted and computation is efficient.
[0056] Example 7 The feature extraction regression network consists of sequentially connected convolutional layers, batch normalization layers, activation function layers, pooling layers, channel attention modules, spatial attention modules, and fully connected regression layers.
[0057] The convolutional layers use 3×3 kernels with a stride of 1 and padding of 1, maintaining the feature map spatial size. Batch normalization layers standardize the mean and variance of each feature channel, accelerating model convergence and suppressing internal covariate bias. The activation function layer uses the ReLU activation function to increase the network's non-linear expressiveness. These convolutional layers, batch normalization layers, and activation function layers constitute a set of convolutional modules. The feature extraction regression network contains two sets of sequentially arranged convolutional modules, each with 16 and 32 output channels, respectively. A pooling layer using 2×2 max pooling is placed between the two sets of convolutional modules to progressively compress the spatial size and expand the receptive field.
[0058] The channel attention module receives the fused features output by the adaptive attention network and recalibrates the channel-dimensional weights of these features to obtain channel-weighted features. First, the channel attention module performs global average pooling and global max pooling on the input feature map, resulting in two sets of channel description vectors. These two sets of description vectors are then processed by a multilayer perceptron with shared weights, outputting two channel attention vectors. These vectors are summed and activated by a sigmoid function to obtain the weight coefficients for each channel. These weight coefficients are then multiplied by the original input feature map channel by channel to complete the channel-dimensional weight recalibration.
[0059] The spatial attention module receives channel-weighted features and recalibrates them spatially to obtain spatially weighted features. First, the spatial attention module performs average pooling and max pooling on the channel-weighted features along the channel dimension, resulting in two sets of spatial descriptors. These two sets of spatial descriptors are concatenated along the channel dimension, then dimensionality-reduced to a single channel by a 7×7 convolutional layer, and finally activated by a sigmoid function to obtain the weight coefficients at each spatial location. These weight coefficients are multiplied by the channel-weighted features according to their spatial location to complete the spatial recalibration.
[0060] The fully connected regression layer receives spatially weighted features and outputs hourly calculated values of surface solar radiation. The spatially weighted features are first flattened into a one-dimensional feature vector using global average pooling, and then passed through three fully connected layers. The first fully connected layer has 128 nodes, the second has 64 nodes, and the third has 2 nodes, corresponding to the hourly calculated values of total surface radiation and hourly calculated surface diffuse radiation, respectively. The fully connected regression layer incorporates a Dropout regularization mechanism with a deactivation probability of 0.5, randomly discarding some neuron connections during training to effectively suppress model overfitting.
[0061] This embodiment enhances the representation of feature channels highly correlated with radiometric calculation through a channel attention module, focuses on the spatial location of effective cloud features in image patches through a spatial attention module, and completes the mapping from high-dimensional features to radiometric values through a fully connected regression layer. The sequential combination of these three components enables the feature extraction regression network to progressively refine feature representations and output accurate radiometric values.
[0062] Example 8 The training process of the pre-trained cloud classification-based adaptive attention network model is as follows: A model training sample set was constructed based on historical satellite remote sensing cloud product data, historical satellite remote sensing aerosol product data, historical hourly measured surface solar radiation data from ground stations, and historical astronomical parameters. Specifically, historical data of Himawari-8 satellite cloud and aerosol products from 2016 to 2020 were downloaded, and historical hourly measured radiation data from ground stations in Xi'an and Lhasa were obtained. Astronomical parameters for the corresponding time periods were calculated. After spatiotemporal matching and quality control, a total of 4379 valid hourly samples were obtained. The sample set was randomly divided into a training set and a test set in a 7:3 ratio, with 3065 samples in the training set and 1314 samples in the test set. Data augmentation operations were performed on the training set, including random rotation, Gaussian blur, brightness adjustment, and horizontal flipping.
[0063] The model training sample set is divided into a training set and a test set.
[0064] The initially constructed cloud-based adaptive attention network model was trained end-to-end using the training set. The Adam optimizer was used for training, with an initial learning rate of 0.001, which was decayed to 0.9 times every 10 training epochs. The root mean square error (RMSE) was used as the loss function. The batch size was set to 32. The maximum number of training epochs was 100. Model performance was monitored during training using the test set, and the RMSE loss value on the test set was calculated after each training epoch.
[0065] Training terminates when the loss value on the test set fails to decrease within a preset number of consecutive training epochs. The current model weights are then saved, resulting in a pre-trained adaptive attention network model based on cloud classification. The preset number of consecutive training epochs is 10 epochs. During training, the model weights with the minimum loss on the test set are recorded as the final saved model weights. In experiments conducted in Xi'an and Lhasa, early stopping was triggered at approximately 40 to 60 epochs, effectively preventing overfitting.
[0066] The relative root mean square error (RRMSE), mean deviation error (MBE), and coefficient of determination (R²) are used as indicators to evaluate model accuracy. RRMSE measures the relative deviation between simulated and measured values, and is calculated as the ratio of the root mean square of the difference between simulated and measured values to the mean of the measured values. MBE assesses whether the model has a systematic tendency to overestimate or underestimate; its value is the average of the differences between simulated and measured values. R² characterizes the model's explanatory power for trends in radiation variation; a value closer to 1 indicates a better model fit.
[0067] In the all-weather scenario at Xi'an Station, the RRMSE for total radiation is 9.77%, and the RRMSE for diffuse radiation is 17.49%; in the cloudy scenario, the RRMSE for total radiation is 8.52%, and the RRMSE for diffuse radiation is 9.01%. In the all-weather scenario at Lhasa Station, the RRMSE for total radiation is 13.48%, and the RRMSE for diffuse radiation is 16.97%; in the cloudy scenario, the RRMSE for total radiation is 11.24%, and the RRMSE for diffuse radiation is 12.12%.
[0068] Compared to the baseline model with the attention layer removed, this model shows a relatively lower total radiation RRMSE in cloudy scenarios; compared to the variant model that retains only the multi-head attention branch, this model significantly improves the accuracy of scattered radiation simulation; and compared to the variant model that retains only the graph attention branch, this model has better generalization ability in sunny scenarios. Compared to the traditional VGGNet16 convolutional neural network model and LSTM temporal model, this model shows significant advantages on all evaluation metrics, validating the effectiveness of the dual-branch attention architecture and cloud classification embedding mechanism.
[0069] This embodiment reduces the risk of overfitting while ensuring sufficient model training through an early stopping mechanism and a learning rate decay strategy, and increases the diversity of training samples through data augmentation. Experimental results show that the trained model has excellent radiation calculation accuracy under complex cloud conditions.
[0070] In another embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions from the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used to operate an adaptive attention-based hourly surface solar radiation calculation method based on cloud classification.
[0071] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be Random Access Memory (RAM) or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the above embodiment regarding an adaptive attention-based hourly surface solar radiation calculation method based on cloud classification.
[0072] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.
[0073] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0076] This invention also provides a computer program product for executing any of the aforementioned adaptive attention hourly surface solar radiation calculation methods based on cloud classification. Since the computer program product provided by this invention belongs to the same inventive concept as the aforementioned adaptive attention hourly surface solar radiation calculation method based on cloud classification, it possesses all the advantages of the aforementioned method. Therefore, the beneficial effects of the computer program product provided by this invention will not be elaborated upon here.
[0077] In this invention, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0078] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention.
Claims
1. A cloud classification based adaptive attention hourly solar radiation calculation method, characterized in that, include: Acquire multi-source data for the target area, including satellite remote sensing cloud product data, satellite remote sensing aerosol product data, and astronomical parameters; The satellite remote sensing cloud product data includes cloud classification data; The multi-source data is preprocessed to obtain preprocessed input data; The preprocessed input data is input into a pre-trained adaptive attention network model based on cloud classification to obtain hourly calculated values of solar radiation on the Earth's surface. The cloud-based adaptive attention network model includes a coarse feature extraction network, an adaptive attention network, and a feature extraction regression network. The coarse feature extraction network is used to perform shallow spatial feature extraction on the input data and output a cloud physical feature map; The adaptive attention network includes a cloud classification embedding layer, a multi-head attention branch, and a graph attention branch. The cloud classification embedding layer receives the cloud classification data and maps it into continuous feature vectors. The multi-head attention branch receives the continuous feature vectors and the cloud physical feature map, and extracts the global spatial dependencies of cloud features based on the continuous feature vectors and the cloud physical feature map. The graph attention branch receives the continuous feature vectors and the cloud physical feature map, and extracts the local neighborhood topology of cloud features based on the continuous feature vectors and the cloud physical feature map. The feature extraction regression network is used to receive the output of the adaptive attention network and generate the hourly calculated value of surface solar radiation based on the output of the adaptive attention network.
2. The cloud classification based adaptive attention hourly global solar radiation calculation method according to claim 1, characterized in that, The satellite remote sensing cloud product data also includes hourly cloud effective particle radius, hourly cloud optical thickness, hourly cloud top height, and hourly cloud top temperature; The satellite remote sensing aerosol product data includes hourly aerosol optical thickness and Ångström index; The astronomical parameters include hourly solar altitude angle, solar declination angle, and solar hour angle; The hourly calculated values of solar radiation on the Earth's surface include the hourly calculated values of total radiation on the Earth's surface and the hourly calculated values of diffuse radiation on the Earth's surface.
3. The adaptive attention-based hourly surface solar radiation calculation method based on cloud classification according to claim 1, characterized in that, The preprocessing of the multi-source data specifically includes: Geometric correction and radiometric calibration are performed on the satellite remote sensing cloud product data and the satellite remote sensing aerosol product data; The satellite remote sensing data, after geometric correction and radiometric calibration, is spatiotemporally matched with the locations of ground stations. Centered on the ground station, a satellite image block of a preset pixel size is extracted. The satellite image block contains the cloud classification data and cloud physical parameters used to generate the cloud physical feature map. The continuous variables in the extracted satellite image patch are normalized to obtain the preprocessed input data.
4. The adaptive attention-based hourly surface solar radiation calculation method based on cloud classification according to claim 1, characterized in that, The coarse feature extraction network is constructed using convolutional kernels to convert multi-channel input data into cloud physical feature maps of a preset channel dimension. The cloud classification embedding layer is used to map the discrete cloud classification data into a continuous feature vector of a preset dimension.
5. The adaptive attention-based hourly surface solar radiation calculation method based on cloud classification according to claim 1, characterized in that, The multi-head attention branch generates a query vector using the continuous feature vector and generates a key vector and a value vector using the cloud physical feature map. It calculates the global spatial dependency between the continuous feature vector and the cloud physical feature map through the multi-head attention mechanism and processes it using residual connections and layer normalization. The graph attention branch concatenates the continuous feature vector with the cloud physical feature map, constructs a graph structure based on the concatenated features, and constructs an undirected graph adjacency matrix based on a preset neighborhood range. It then dynamically calculates the attention weights of adjacent nodes through a learnable weight matrix to extract the local neighborhood topology.
6. The adaptive attention-based hourly surface solar radiation calculation method based on cloud classification according to claim 5, characterized in that, The multi-head attention branch adopts an 8-head attention structure, and the graph attention branch uses 8 neighborhoods to construct the undirected graph adjacency matrix.
7. The adaptive attention-based hourly surface solar radiation calculation method based on cloud classification according to claim 1, characterized in that, The feature extraction regression network includes a convolutional layer, a batch normalization layer, an activation function layer, a pooling layer, a channel attention module, a spatial attention module, and a fully connected regression layer connected in sequence. The channel attention module is used to receive the fused features output by the adaptive attention network and to recalibrate the channel-dimensional weights of the fused features to obtain channel-weighted features. The spatial attention module is used to receive the channel-weighted features and recalibrate the spatial dimensions of the channel-weighted features to obtain spatial-weighted features. The fully connected regression layer is used to receive the spatially weighted features and output the hourly calculated value of solar radiation on the Earth's surface; the fully connected regression layer has a built-in Dropout regularization mechanism.
8. The adaptive attention-based hourly surface solar radiation calculation method based on cloud classification according to any one of claims 1 to 7, characterized in that, The training process of the pre-trained cloud classification-based adaptive attention network model includes: A model training sample set is constructed based on historical satellite remote sensing cloud product data, historical satellite remote sensing aerosol product data, historical hourly measured surface solar radiation data from ground stations, and historical astronomical parameters. The model training sample set is divided into a training set and a test set; The initial cloud classification-based adaptive attention network model was trained end-to-end using the training set, with the Adam optimizer employed and the root mean square error as the loss function. The model performance during the training process was monitored using the test set. Training is terminated when the loss value of the test set does not decrease within a preset number of consecutive training rounds. The current model weights are saved to obtain the pre-trained adaptive attention network model based on cloud classification.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the adaptive attention hourly surface solar radiation calculation method based on cloud classification as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the adaptive attention-based hourly surface solar radiation calculation method based on cloud classification as described in any one of claims 1 to 8.