Cloud layer motion trail analysis method and system based on Transform neural network
By using a cloud motion trajectory analysis method based on Transformer neural networks, the problems of insufficient accuracy, poor real-time performance, and high cost in existing cloud observation and motion analysis applications for photovoltaic power generation are solved. This method achieves high-precision, real-time cloud motion analysis, providing high-quality data support for photovoltaic power generation.
Patent Information
- Application Number
- CN202511573562.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-10-31
AI Technical Summary
Existing cloud observation and motion analysis technologies suffer from insufficient accuracy, poor real-time performance, high cost, and low level of intelligence in photovoltaic power generation applications. Traditional meteorological observation methods cannot meet the needs of high-precision forecasting at the station level, computer vision methods lack specific optimization for cloud characteristics, and the application depth and breadth of deep learning technology in this field need to be improved.
A cloud motion trajectory analysis method based on Transformer neural network is adopted. Video sequences acquired by all-sky cameras are preprocessed, and cloud semantic segmentation is performed by combining RGB multi-channel feature fusion and adaptive threshold. A multi-head attention mechanism is used for gridded multi-point tracking, and cloud motion parameters are calculated by combining multi-algorithm fusion strategy. Finally, the photovoltaic impact is assessed by combining the position of the sun.
It enables precise tracking and quantitative analysis of cloud movement trajectories, providing high-quality data support for photovoltaic power generation forecasting, improving forecast accuracy and real-time performance, reducing costs, and enhancing intelligence.
Smart Images

Figure CN121053170A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud motion analysis technology, and in particular to a method and system for analyzing cloud motion trajectories based on Transformer neural networks. Background Technology
[0002] Currently, cloud observation and motion analysis technologies mainly rely on traditional methods such as meteorological satellite remote sensing, ground-based observation equipment, and numerical weather prediction models. However, these technologies all have significant limitations in photovoltaic power generation applications. Although meteorological satellites have wide coverage, their temporal resolution is typically 15-30 minutes, and their spatial resolution is 1-4 kilometers, making it difficult to capture rapid cloud changes within the local area of a photovoltaic power station. Furthermore, satellite data often experiences a 20-40 minute processing and transmission delay from acquisition to practical use, failing to meet the real-time requirements of ultra-short-term forecasts. In addition, satellite observation is costly; the annual cost of high-resolution commercial satellite data is typically 500,000-1,000,000 yuan, which is economically unfeasible for a single photovoltaic power station.
[0003] In recent years, deep learning technology has made groundbreaking progress in the field of computer vision, and some target tracking methods based on convolutional neural networks have begun to be applied to meteorological observation. However, existing deep learning tracking methods are mainly designed for single targets and are difficult to handle complex targets such as clouds, which are multi-regional, multi-scale, and morphologically variable. Since its introduction in 2017, the Transformer architecture has achieved revolutionary success in the field of natural language processing. Its design concept based on the self-attention mechanism provides a new approach to solving the long-term dependency problem in sequence modeling. However, the potential of the Transformer architecture in the specific application area of cloud motion trajectory analysis has not been fully explored. Existing research mainly focuses on general image understanding and target detection tasks, lacking specialized designs for meteorological applications. Cloud motion analysis needs to consider both spatial distribution patterns and temporal evolution processes, requiring algorithms with strong spatiotemporal modeling capabilities and multi-scale feature fusion capabilities. In addition, photovoltaic power generation prediction applications have high requirements for the quantification of cloud motion parameters, requiring accurate measurement of physical quantities such as cloud motion direction and velocity, and establishment of a coupling relationship with the sun's position. These special requirements have not been effectively addressed in existing technologies.
[0004] In summary, existing cloud observation and motion analysis technologies face key challenges in photovoltaic power generation applications, including insufficient accuracy, poor real-time performance, high cost, and low level of intelligence. Traditional meteorological observation methods cannot meet the demand for high-precision forecasting at the station level, computer vision methods lack specific optimizations for cloud characteristics, and the depth and breadth of deep learning technology applications in this field need to be improved. Summary of the Invention
[0005] The purpose of this invention is to provide a cloud motion trajectory analysis method and system based on Transformer neural network. By combining the physical characteristics of cloud motion and the actual needs of photovoltaic applications, it can achieve accurate tracking and quantitative analysis of cloud motion trajectory, and provide high-quality data support for photovoltaic power generation prediction.
[0006] To achieve the above objectives, the present invention provides the following solution: A method for analyzing cloud motion trajectories based on Transformer neural networks includes the following steps: S1. Acquire continuous video sequences using an all-sky camera, perform resolution standardization and video quality assessment preprocessing to obtain standardized video sequences; S2. Perform cloud semantic segmentation on standardized video sequences based on RGB multi-channel feature fusion and adaptive threshold to generate cloud masks; S3. Construct a spatiotemporal tracking network based on the Transformer architecture, and use a multi-head attention mechanism to perform gridded multi-point tracking within the cloud mask region to obtain the original trajectory data; S4. Extract the raw trajectory data and perform effective trajectory screening through multi-dimensional quality control of visibility, continuity, and motion consistency; S5. Calculate the cloud motion direction angle based on the polar coordinates of the effective trajectory, and calculate the angular velocity using a multi-algorithm fusion strategy of instantaneous method, average method and arc-chord ratio correction method; S6. Calculate the sun's position by combining geographical location and time information, establish the octet relationship between the direction of cloud movement and the sun's position, and analyze the octet relationship. S7. Generate standardized prediction data output including cloud motion parameters, relative solar position, and photovoltaic impact assessment.
[0007] Preferably, the cloud semantic segmentation in S2 specifically includes: Independent feature extraction of RGB three channels, including R / B ratio features, G channel edge features, and blue sky background features; establishment of an adaptive threshold cloud segmentation algorithm: R / B≥T1, where T1 is the threshold for judging the ratio of red to blue channels, T1∈[0.5, 1.0], which is adaptively adjusted according to the lighting conditions, and |G-μ sky | / σ sky ≥ T2, where G is the grayscale value of the green channel, μ sky σ represents the mean of the green channel in the sky background area. sky T1 represents the standard deviation of the sky background in the green channel, and T2 represents the standardized deviation required to determine if it is a cloud. T2∈[1.5, 3.0]. Multiple features are combined through logical AND operation.
[0008] Preferably, the Transformer architecture in S3 adopts a spatiotemporally decoupled multi-head attention mechanism, setting up a spatial attention head, a temporal attention head, and a spatiotemporally coupled attention head respectively. The spatial attention head is used to focus on the spatial distribution pattern and neighborhood relationship of the cloud layer, the temporal attention head is used to capture the temporal dependency relationship of cloud layer movement, and the spatiotemporally coupled attention head is used to collaboratively process spatiotemporal interactions.
[0009] Preferably, in S5, the calculation of the cloud motion direction angle based on the polar coordinates of the effective trajectory specifically includes: Establish a polar coordinate reference system with the image center as the origin and true north as 0°; calculate the effective trajectory direction: θ = arctan2(Δy, Δx) + π, and normalize the result to [0°, 360°), where Δy is the vertical displacement (pixels) and Δx is the horizontal displacement (pixels); use a weighted average method to calculate the main direction of the trajectory segment.
[0010] Preferably, in S5, a multi-algorithm fusion strategy using the instantaneous method, the average method, and the arc-chord ratio correction method is employed to calculate the angular velocity, as shown in the following formula:
[0011] Where ω1(t) is the instantaneous angular velocity, ω2 is the average angular velocity, and α is the weight, based on the trajectory arc-to-chord ratio λ = L arc / L chord Adaptive adjustment, L arc To track the total length of the actual trajectory of the point, L chord This is the straight-line distance from the starting point to the ending point of the tracking point.
[0012] Preferably, in S6, calculating the sun's position by combining geographical location and time information specifically includes: The formula for calculating the solar altitude angle based on geographic coordinates and UTC time is as follows: h = arcsin(sinφsinδ+ cosφcosδcosH) The formula for the solar azimuth angle is as follows: A = arctan2(sinH, cosHsinφ - tanδcosφ) Where φ is latitude, δ is solar declination, and H is hour angle.
[0013] Preferably, the standardized prediction data generated in S7 includes: cloud shading area, cloud thickness, dynamic shading coefficient, and predicted solar radiation; cloud thickness is estimated based on transmittance of optical thickness; the formula for calculating the predicted solar radiation value is as follows: I pred = I clear × K(t+Δt) Among them, Ipred To predict solar radiation values, I clea r is the clear-sky radiation value, and K(t+Δt) is the dynamic shading coefficient.
[0014] This invention also provides a cloud motion trajectory analysis system based on a Transformer neural network, and a cloud motion trajectory analysis method based on a Transformer neural network applying any of the above claims, comprising: The data preprocessing module is used to acquire continuous video sequences through an all-sky camera, perform resolution standardization and video quality assessment preprocessing, and obtain standardized video sequences. The cloud semantic segmentation module is used to perform cloud semantic segmentation on standardized video sequences based on RGB multi-channel feature fusion and adaptive thresholding, and generate cloud masks. The tracking network building module is used to build a spatiotemporal tracking network based on the Transformer architecture. It uses a multi-head attention mechanism to perform gridded multi-point tracking within the cloud mask region to obtain the original trajectory data. The effective trajectory filtering module is used to extract raw trajectory data and filter effective trajectories through multi-dimensional quality control based on visibility, continuity, and motion consistency. The cloud motion direction calculation module is used to calculate the cloud motion direction angle based on the polar coordinates of the effective trajectory. It uses a multi-algorithm fusion strategy of instantaneous method, average method and arc-chord ratio correction method to calculate angular velocity. The relative relationship analysis module is used to calculate the sun's position by combining geographical location and time information, and to establish an octet relative relationship analysis between the direction of cloud movement and the sun's position; The prediction data output module generates standardized prediction data output that includes cloud motion parameters, the relative position of the sun, and photovoltaic impact assessment.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a cloud motion trajectory analysis method based on a Transformer neural network as described above.
[0016] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: (1) The purpose of this invention is to provide a cloud motion trajectory analysis method based on Transformer neural network. By constructing a special spatiotemporal attention mechanism and a multi-scale feature fusion network, it can achieve accurate tracking and quantitative analysis of cloud motion trajectory, provide high-precision short-term solar radiation prediction data for photovoltaic power plants, and solve the shortcomings of existing technologies in terms of accuracy, real-time performance and cost. (2) The method of the present invention makes full use of the advantages of advanced artificial intelligence technologies such as Transformer, and combines the physical characteristics of cloud movement with the actual needs of photovoltaic applications to achieve accurate tracking and quantitative analysis of cloud movement trajectory, providing high-quality data support for photovoltaic power generation prediction. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic diagram of the cloud motion trajectory analysis system architecture based on Transformer neural network provided by the present invention; Figure 2 A flowchart illustrating the cloud motion trajectory analysis method based on Transformer neural network provided by this invention; Figure 3 This is a flowchart of the multi-channel cloud layer recognition algorithm used in this invention; Figure 4 This is a schematic diagram of the grid-based tracking point management of the present invention; Figure 5 This is a schematic diagram of the angular velocity multi-algorithm fusion calculation used in this invention; Figure 6 This is a schematic diagram illustrating the cloud-sun relative position analysis and prediction data output of the present invention; Figure 7 This is a diagram demonstrating the tracking effect of the algorithm of this invention; Where (a) is the initial frame, (b)-(g) are intermediate frames, and (h) is the end frame. Detailed Implementation
[0019] The technical solutions of the embodiments 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, and 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.
[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] like Figure 2As shown, the present invention provides a cloud motion trajectory analysis method based on Transformer neural network, which includes the following steps: S1. Acquire continuous video sequences using an all-sky camera, perform resolution standardization and video quality assessment preprocessing to obtain standardized video sequences; S2. Perform cloud semantic segmentation on standardized video sequences based on RGB multi-channel feature fusion and adaptive threshold to generate cloud masks; S3. Construct a spatiotemporal tracking network based on the Transformer architecture, and use a multi-head attention mechanism to perform gridded multi-point tracking within the cloud mask region to obtain the original trajectory data; S4. Extract the raw trajectory data and perform effective trajectory screening through multi-dimensional quality control of visibility, continuity, and motion consistency; S5. Calculate the cloud motion direction angle based on the polar coordinates of the effective trajectory, and calculate the angular velocity using a multi-algorithm fusion strategy of instantaneous method, average method and arc-chord ratio correction method; S6. Calculate the sun's position by combining geographical location and time information, establish the octet relationship between the direction of cloud movement and the sun's position, and analyze the octet relationship. S7. Generate standardized prediction data output including cloud motion parameters, relative solar position, and photovoltaic impact assessment.
[0022] Specifically, step S1: Multi-source data acquisition and intelligent preprocessing includes: S1.1 Standardized processing of all-sky video data A fisheye all-sky camera was used to acquire continuous video sequences with a field of view of 160°-180°. Establish an adaptive resolution adjustment algorithm: dynamically adjust the processing resolution according to cloud density, ranging from 512×512 to 2048×2048 pixels; Achieve timestamp synchronization and frame rate standardization: uniformly process to a standard frame rate of 30fps; S1.2 Intelligent Video Quality Assessment and Anomaly Detection Establish an image sharpness evaluation index based on gradient variance: σ² = Σ( I)² / N, where, σ² The average of the squared gradients of the image. I is the rate of change of image grayscale values in space, N is the total number of pixels in the image, and Σ(.) is the cumulative grayscale value of all pixels in the image; Design an adaptive discrimination algorithm for lighting conditions: evaluate the distribution of the V channel in the HSV color space; Automatic identification of severe weather conditions: automatic filtering of extreme weather such as rain, snow, and dense fog.
[0023] Furthermore, cloud semantic segmentation in S2, such as Figure 3 Specifically, it includes: S2.1 Independent feature extraction of RGB three channels, including R / B ratio features, G channel edge features, and blue sky background features; establishing an adaptive threshold cloud segmentation algorithm: R / B≥T1, where T1 is the threshold for judging the ratio of red to blue channels, T1∈[0.5, 1.0], which is adaptively adjusted according to the lighting conditions, and |G-μ sky | / σ sky ≥ T2, where G is the grayscale value of the green channel, μ sky σ represents the mean of the green channel in the sky background area. sky T1 represents the standard deviation of the sky background in the green channel, and T2 represents the standardized deviation required to determine if it is a cloud. T2 ∈ [1.5, 3.0]. Multiple features are combined through logical AND operation. S2.2 Morphological Post-processing and Region Optimization Multi-scale morphological filtering: employs opening and closing operations with variable kernel sizes from 3×3 to 9×9; Connected component analysis and noise removal: Removal area smaller than A min = Noise region of 0.01% of image area, where A min Represents the minimum effective connected region area threshold (unit: pixels); Circular field-of-view mask generation: Establish an effective observation region with a radius of R = min(W, H) / 2 - M, where R represents the radius of the effective observation region (unit: pixels) and M is the edge margin (unit: pixels).
[0024] Specifically, S3 includes: S3.1 Spatiotemporal coding and location embedding design Design a two-dimensional location code: For a spatial location (x, y), the location is encoded as a d-dimensional vector, where the first d / 2 dimensions encode the x-coordinate and the last d / 2 dimensions encode the y-coordinate: PE(x,y,2i) = sin(x / 10000 (2i / d) (Sine encoding of the x-coordinate, i=0,1,...,d / 4-1) PE(x,y,2i+1) = cos(x / 10000 (2i / d) (Cosine encoding of the x-coordinate) PE(x,y,d / 2+2j) = sin(y / 10000 (2j / d) (Sine code of y-coordinate, j=0, 1, ..., d / 4-1) PE(x,y,d / 2+2j+1) = cos(y / 10000 (2j / d) (Cosine encoding of the y-coordinate) Constructing the time-code: TE(t) = [sin(2πt / T), cos(2πt / T)], where t is the index of the time step and T is the total duration of the video; Multi-scale feature embedding: Mapping the original pixel features to a d-dimensional embedding space, d∈[256, 512]; S3.2 Design of Multi-Head Spatiotemporal Attention Mechanism Spatial attention focus: on the spatial distribution patterns and neighborhood relationships of clouds; Attention_spatial(Q,K,V) = softmax(QK T / √d k )V, where Q represents the query matrix, K is the key matrix, V is the value matrix, and d k d represents the vector dimension. k =64, softmax represents the normalized exponential function.
[0025] Temporal attention focus: Modeling the temporal dependencies of cloud motion; Attention_temporal(Q,K,V) = softmax(Q {t} K {t-τ} T / √d k V {t-τ} Q {t} Let K be the query matrix at the current time. {t-τ} V is the key matrix for historical moments, τ is the time delay, τ = [1,2,3], V {t-τ} Let d be the value matrix at historical moments. k represents the vector dimension, and softmax represents the normalization exponential function.
[0026] Spatiotemporal coupling attention head: simultaneously considering the interaction between spatiotemporal dimensions; S3.3 Adaptive Management of Grid-based Tracking Points Figure 4 As shown: Initial mesh generation: Generate an N×N regular mesh in the cloud mask region, where N∈[20, 60]; Dynamic density adjustment: Adaptively increases or decreases the density of tracking points based on the complexity of cloud motion; Quality assessment and updating: Dynamic point management based on confidence threshold θ∈[0.6, 0.9]; Step S4: Trajectory data extraction and multidimensional quality control include: S4.1 Multidimensional Evaluation of Trajectory Validity Visibility assessment: V(t) = Σexp(-||p(t)-p pred(t) ||² / 2σ²), requiring V(t)≥V min Where V(t) represents the tracking quality index at time t, ideally all tracking points are perfectly predicted, and p(t) is the actual observed position of the tracking point at time t. pred(t) To track the predicted position of the point at time t, V min V is the minimum visibility threshold. min ∈[0.5N, 0.9N]; Continuity assessment: C = L continuous / L total ≥ C min C min ∈[0.7, 0.9], where L continuous L represents the length of the continuous trajectory (effective length). total C represents the total trajectory length (within the tracking period) and the continuity ratio.
[0027] Motion consistency assessment: consistency indicators based on the rate of change of velocity and direction; S4.2 Abnormal Trajectory Detection and Correction Velocity anomaly detection: v(t) ∈ [v min v max ], v(t) is the speed of cloud movement at time t, v min v max These are the minimum and maximum reasonable speed thresholds, respectively. Speeds exceeding these ranges are automatically flagged. The speed is determined based on cloud movement patterns. min v max Value is 0° / s, v max The value is 10° / s; Detection of directional abrupt changes: |θ(t)-θ(t-1)| ≤ θ max θ max ∈[30°, 60°], where θ(t) is the direction angle of cloud motion at time t, θ(t-1) is the direction angle of motion at the previous time, and θ max This represents the maximum permissible change in direction. Trajectory repair algorithm: trajectory interpolation and smoothing based on Kalman filtering; Furthermore, S5 includes: S5.1, Calculating the cloud motion direction angle based on polar coordinates of the effective trajectory, specifically including: Establish a polar coordinate reference system with the image center as the origin and true north as 0°; calculate the effective trajectory direction: θ = arctan2(Δy, Δx) + π, and normalize the result to [0°, 360°), where Δy is the vertical displacement (pixels) and Δx is the horizontal displacement (pixels); use a weighted average method to calculate the main direction of the trajectory segment.
[0028] S5.2 A multi-algorithm fusion strategy employing the instantaneous method, average method, and arc-chord ratio correction method is used to calculate the angular velocity, as shown in Figure 5.2. Figure 5 As shown, the formula is as follows: Instantaneous angular velocity method: ω1(t) = |θ(t+1) - θ(t)|·fps, where ω1(t) is the instantaneous angular velocity at time t, θ(t+1) is the direction angle at the next time step, θ(t) is the direction angle at the current time step, and fps is the video frame rate (unit: Hz). Mean angular velocity method: ω2=|θ end -θ start | / (t end -t start ), where ω2 is the average angular velocity (overall trajectory), and θ end Let θ be the direction angle at the end time. start Let t be the direction angle at the start time. end -t start The observation time span.
[0029] Arc length correction method: Introduce the arc-to-chord ratio factor λ = L arc / L chord Make corrections
[0030] Where ω1(t) is the instantaneous angular velocity, ω2 is the average angular velocity, and α is the weight, based on the trajectory arc-to-chord ratio λ = L arc / L chord Adaptive adjustment, L arc To track the total length of the actual trajectory of the point, L chord To track the straight-line distance from the starting point to the ending point; S5.3 Classification and Statistics of Movement Patterns Speed grading statistics: [0-1° / s], [1-2° / s], [2-3° / s], [3-5° / s], [>5° / s]; Directional octet statistics: North, Northeast, East, Southeast, South, Southwest, West, Northwest; Motion pattern recognition: four types of patterns: linear, arc, random, and stationary.
[0031] Furthermore, step S6: Solar position coupling analysis and relative motion assessment includes: S6.1 High-precision solar position calculation The solar position was calculated based on geographic coordinates and UTC time: Solar altitude angle: h = arcsin(sinφsinδ + cosφcosδcosH); Solar azimuth: A = arctan2(sinH, cosHsinφ - tanδcosφ); Where φ is latitude, δ is solar declination, and H is hour angle; S6.2 Analysis of the relative positional relationship between clouds and the sun, as follows: Figure 6 As shown: Establish an octet relative orientation system Sunny: |θ cloud - A sun | ≤ 22.5°, where θ cloud For the direction angle of the running motion, A sun The azimuth of the sun; Shaded area: |θ cloud - A sun - 180° | ≤ 22.5°; Left skew / Right skew: Precise classification based on angle subdivision; Assessment of the impact of shading: A comprehensive assessment combining cloud size, density, and relative position.
[0032] Furthermore, step S7: Standardization and output of photovoltaic forecast data includes: S7.1 Cloud Impact Factor Calculation Cloud obscuration area prediction: Obscuration area in the next 10-60 minutes based on trajectory extrapolation Cloud thickness estimation: Transmittance estimation based on optical thickness Dynamic occlusion coefficient: K(t+Δt) = f(A) cloud(t+Δt ), ρ cloud h sun ), where A cloud(t+Δt To predict the area suitable for cloud cover to block the sun, ρ cloud h represents the optical thickness of the cloud layer. sun The solar altitude angle is used as the coefficient, and the mapping relationship is obtained based on the optimized atmospheric radiative transfer model.
[0033] S7.2 Solar Radiation Prediction Model Clear-sky radiation model: I clear = I0× cos(θ z ) × τ atm , where I clear Where is the clear-sky radiation intensity (unit: W / m²), I0 is the solar constant, and cos(θ) z ) is the projection factor (cosine of the zenith angle), τ atm Atmospheric transmittance; Cloud impact correction: I pred = I clear × K(t+Δt) Uncertainty quantification: provides prediction confidence intervals and error estimates. Among them, I pred To predict solar radiation values, I clear denoted as clear-sky radiation value, and K(t+Δt) as dynamic shading coefficient.
[0034] like Figure 1 As shown, the present invention also provides a cloud motion trajectory analysis system based on a Transformer neural network, and a cloud motion trajectory analysis method based on a Transformer neural network applying any of the above claims, comprising: The data preprocessing module is used to acquire continuous video sequences through an all-sky camera, perform resolution standardization and video quality assessment preprocessing, and obtain standardized video sequences. The cloud semantic segmentation module is used to perform cloud semantic segmentation on standardized video sequences based on RGB multi-channel feature fusion and adaptive thresholding, and generate cloud masks. The tracking network building module is used to build a spatiotemporal tracking network based on the Transformer architecture. It uses a multi-head attention mechanism to perform gridded multi-point tracking within the cloud mask region to obtain the original trajectory data. The effective trajectory filtering module is used to extract raw trajectory data and filter effective trajectories through multi-dimensional quality control based on visibility, continuity, and motion consistency. The cloud motion direction calculation module is used to calculate the cloud motion direction angle based on the polar coordinates of the effective trajectory. It uses a multi-algorithm fusion strategy of instantaneous method, average method and arc-chord ratio correction method to calculate angular velocity. The relative relationship analysis module is used to calculate the sun's position by combining geographical location and time information, and to establish an octet relative relationship analysis between the direction of cloud movement and the sun's position; The prediction data output module generates standardized prediction data output that includes cloud motion parameters, the relative position of the sun, and photovoltaic impact assessment.
[0035] In a specific embodiment, the frame sequence tracking effect obtained by using the above method is as follows: Figure 7 As shown in (a)-(h): Initial Frame (Frame 1): In the initial frame, the algorithm accurately identifies the cloud region through the cloud semantic segmentation module and generates initial grid tracking points within the cloud mask region. As shown in the illustration, the tracking points are evenly distributed at the cloud edges and inside, providing a good starting point for subsequent trajectory tracking.
[0036] Intermediate frames (frames 2-7): As the clouds move, the algorithm updates the position of the tracking points in real time, accurately capturing the cloud's trajectory. In this frame, the tracking points can be seen moving along the actual direction and speed of the cloud's movement; the trajectory is continuous and smooth, without any obvious jumps or loss of tracking points.
[0037] End frame (frame 8): At the end of the tracking, the algorithm outputs a complete and accurate cloud motion trajectory, clearly reflecting the cloud's movement throughout the video sequence. Through trajectory data extraction and processing by the multi-dimensional quality control module, the final trajectory data can be used for subsequent cloud motion parameter analysis and photovoltaic prediction.
[0038] The hardware system configuration is as follows: 1. Data Acquisition Equipment Requirements All-sky camera system: Lens type: fisheye lens, field of view ≥160°, 180° recommended. Sensor: CMOS sensor, effective pixels ≥ 5 million Resolution: Supports 1920×1920 or higher resolutions Frame rate: Adjustable from 1-30fps, 5-10fps recommended. Protection rating: IP65 or higher, suitable for outdoor environments. Data interface: Gigabit Ethernet or USB 3.0 Environmental monitoring equipment (optional): Illuminance sensor: Measurement range 0-100,000 lux Temperature and humidity sensor: Accuracy ±0.5°C, ±3%RH GPS positioning module: Positioning accuracy ≤3 meters 2. Computing Processing Platform Basic configuration requirements: CPU: Intel Core i7-8700 or AMD Ryzen 7 2700X or higher GPU: NVIDIA GTX 1080 or RTX 2070 or higher, with ≥8GB of VRAM. Memory: 32GB DDR4 RAM or higher Storage: 1TB NVMe SSD + 4TB HDD Network: Gigabit Ethernet interface Recommended configuration: CPU: Intel Core i9-10900K or AMD Ryzen 9 3900X GPU: NVIDIA RTX 3080 or higher, with ≥10GB of VRAM Memory: 64GB DDR4 RAM Storage: 2TB NVMe SSD + 8TB HDD Compared with other conventional cloud motion analysis methods, the following conclusions are drawn: (1) Accuracy comparison Accuracy of cloud motion direction: The prediction error of cloud motion direction by the method of the present invention is controlled within 5°, while the error of traditional methods (such as optical flow method, feature matching method, etc.) is usually between 10° and 20°.
[0039] Cloud movement speed accuracy: The speed error of this invention is controlled within 0.2° / s, while the speed error of traditional methods is generally 0.5° / s-1° / s.
[0040] Solar radiation prediction accuracy: The prediction accuracy of this invention reaches 92% for 0-30 minutes and 87% for 30-60 minutes, which is a significant improvement compared to the prediction accuracy of traditional methods (such as numerical weather prediction models and simple cloud identification methods), which are typically 70%-80%. In practical photovoltaic power plant applications, the correlation between the solar radiation value predicted by this method and the actual measured value reaches over 0.85, while the correlation of traditional methods is only around 0.7.
[0041] (2) Speed comparison Single-frame processing time: Based on the Transformer-based spatiotemporal tracking network, the processing time of a single frame in this invention is controlled within 0.5 seconds, which meets the real-time requirements. In contrast, the processing time of a single frame of traditional recurrent neural network (RNN / LSTM) methods is usually 1-2 seconds, and the processing time of single frames of optical flow-based tracking methods can even reach several seconds when processing complex cloud images.
[0042] End-to-end processing latency: From acquiring all-sky video data to outputting the final photovoltaic prediction data, the end-to-end latency of this invention is controlled within 5 minutes. Traditional methods, due to the complexity of data processing and calculation, often have an end-to-end latency of 10-20 minutes, which cannot provide timely data support for photovoltaic power generation prediction.
[0043] (3) Cost comparison Equipment cost: The data acquisition equipment used in this invention, such as all-sky cameras, has a lower cost, reducing the cost by more than 80% compared to traditional equipment such as weather radar.
[0044] Operation and maintenance costs: The system of this invention has a high degree of intelligence and can achieve automated operation, with annual operation and maintenance costs not exceeding 10% of traditional solutions. Traditional methods require a large amount of manual intervention for data processing and equipment maintenance, resulting in high operation and maintenance costs.
[0045] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a cloud motion trajectory analysis method based on a Transformer neural network as described above.
[0046] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable 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, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0047] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for analyzing cloud motion trajectories based on Transformer neural networks, characterized in that, Includes the following steps: S1. Acquire continuous video sequences using an all-sky camera, perform resolution standardization and video quality assessment preprocessing to obtain standardized video sequences; S2. Perform cloud semantic segmentation on standardized video sequences based on RGB multi-channel feature fusion and adaptive threshold to generate cloud masks; S3. Construct a spatiotemporal tracking network based on the Transformer architecture, and use a multi-head attention mechanism to perform gridded multi-point tracking within the cloud mask region to obtain the original trajectory data; S4. Extract the raw trajectory data and perform effective trajectory screening through multi-dimensional quality control of visibility, continuity, and motion consistency; S5. Calculate the cloud motion direction angle based on the polar coordinates of the effective trajectory, and calculate the angular velocity using a multi-algorithm fusion strategy of instantaneous method, average method and arc-chord ratio correction method; S6. Calculate the sun's position by combining geographical location and time information, establish the octet relative relationship between the direction of cloud movement and the sun's position, and analyze the octet relative relationship; S7. Generate standardized prediction data output including cloud motion parameters, relative solar position, and photovoltaic impact assessment.
2. The cloud motion trajectory analysis method based on Transformer neural network according to claim 1, characterized in that, The cloud semantic segmentation in S2 specifically includes: Independent feature extraction for RGB three channels, including R / B ratio features, G channel edge features, and blue sky background features; An adaptive threshold cloud segmentation algorithm is established: R / B ≥ T1, where T1 is the discrimination threshold for the red-blue channel ratio, T1 ∈ [0.5, 1], which is adaptively adjusted according to the illumination conditions, and |G-μ sky | / σ sky ≥ T2, where G is the grayscale value of the green channel, μ sky σ represents the mean of the green channel in the sky background area. sky T1 represents the standard deviation of the sky background in the green channel, and T2 represents the standardized deviation required to determine if it is a cloud. T2 ∈ [1.5, 3.0].
3. The cloud motion trajectory analysis method based on Transformer neural network according to claim 1, characterized in that, The Transformer architecture in S3 adopts a spatiotemporally decoupled multi-head attention mechanism, setting up a spatial attention head, a temporal attention head, and a spatiotemporally coupled attention head. The spatial attention head is used to focus on the spatial distribution pattern and neighborhood relationship of the cloud layer, the temporal attention head is used to capture the temporal dependency relationship of cloud layer movement, and the spatiotemporally coupled attention head is used to collaboratively process spatiotemporal interactions.
4. The cloud motion trajectory analysis method based on Transformer neural network according to claim 1, characterized in that, In step S5, the calculation of the cloud motion direction angle based on the polar coordinates of the effective trajectory specifically includes: Establish a polar coordinate reference system with the image center as the origin and true north as 0°; calculate the effective trajectory direction: θ = arctan2(Δy, Δx) + π, and normalize the result to [0°, 360°), where Δy is the vertical displacement and Δx is the horizontal displacement; use a weighted average method to calculate the main direction of the trajectory segment.
5. The cloud motion trajectory analysis method based on Transformer neural network according to claim 1, characterized in that, In step S5, a multi-algorithm fusion strategy using the instantaneous method, the average method, and the arc-chord ratio correction method is employed to calculate the angular velocity, as shown in the following formula: ; Where ω1(t) is the instantaneous angular velocity, ω2 is the average angular velocity, and α is the weight, based on the trajectory arc-to-chord ratio λ = L arc / L chord Adaptive adjustment, L arc To track the total length of the actual trajectory of the point, L chord This is the straight-line distance from the starting point to the ending point of the tracking point.
6. The cloud motion trajectory analysis method based on Transformer neural network according to claim 1, characterized in that, In step S6, calculating the sun's position by combining geographical location and time information specifically includes: The formula for calculating the solar altitude angle based on geographic coordinates and UTC time is as follows: h = arcsin(sinφsinδ+ cosφcosδcosH) The formula for the solar azimuth angle is as follows: A = arctan2(sinH, cosHsinφ - tanδcosφ) Where φ is latitude, δ is solar declination, and H is hour angle.
7. The cloud motion trajectory analysis method based on Transformer neural network according to claim 1, characterized in that, The standardized prediction data generated in S7 includes: cloud cover area, cloud thickness, dynamic shading coefficient, and predicted solar radiation; cloud thickness is estimated based on transmittance of optical thickness; the formula for calculating the predicted solar radiation value is as follows: I pred = I clear × K(t+Δt) Among them, I pred To predict solar radiation values, I clear denoted as clear-sky radiation value, and K(t+Δt) as dynamic shading coefficient.
8. A cloud motion trajectory analysis system based on a Transformer neural network, applied to perform the cloud motion trajectory analysis method based on a Transformer neural network as described in any one of claims 1-7, characterized in that, include: The data preprocessing module is used to acquire continuous video sequences through an all-sky camera, perform resolution standardization and video quality assessment preprocessing, and obtain standardized video sequences. The cloud semantic segmentation module is used to perform cloud semantic segmentation on standardized video sequences based on RGB multi-channel feature fusion and adaptive thresholding, and generate cloud masks. The tracking network building module is used to build a spatiotemporal tracking network based on the Transformer architecture. It uses a multi-head attention mechanism to perform gridded multi-point tracking within the cloud mask region to obtain the original trajectory data. The effective trajectory filtering module is used to extract raw trajectory data and filter effective trajectories through multi-dimensional quality control based on visibility, continuity, and motion consistency. The cloud motion direction calculation module is used to calculate the cloud motion direction angle based on the polar coordinates of the effective trajectory. It uses a multi-algorithm fusion strategy of instantaneous method, average method and arc-chord ratio correction method to calculate angular velocity. The relative relationship analysis module is used to calculate the sun's position by combining geographical location and time information, and to establish an octet relative relationship analysis between the direction of cloud movement and the sun's position; The prediction data output module generates standardized prediction data output that includes cloud motion parameters, the relative position of the sun, and photovoltaic impact assessment.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a cloud motion trajectory analysis method based on a Transformer neural network as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Photovoltaic tracking method and system based on micro spatial-temporal scale irradiation prediction, and medium
CN116192005A
Ultra-short-term solar irradiance prediction method based on multi-modal feature fusion
CN118470486A
Photovoltaic power prediction method and system based on deep learning and multi-source data fusion driving
CN119340970A
Photovoltaic power prediction method and system for photovoltaic power station
CN120320300A
Intra-hour photovoltaic power prediction method
CN120510397A