Cloud layer motion trajectory analysis method and system based on transformer 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 and low-cost cloud motion prediction, providing high-quality data support for photovoltaic power generation.

CN121053170BActive Publication Date: 2026-01-23INST OF ATMOSPHERIC PHYSICS CHINESE ACADEMY SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511573562.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-01-23
Estimated Expiration
2045-10-31

AI Technical Summary

Technical Problem

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, and deep learning methods lack specific optimization for cloud characteristics.

Method used

A cloud motion trajectory analysis method based on Transformer neural network is adopted. Video sequences are acquired by all-sky cameras, and resolution standardization and semantic segmentation are performed to construct a spatiotemporal tracking network. Multi-point tracking is performed using a multi-head attention mechanism. Combined with polar coordinate calculation and solar position analysis, high-precision photovoltaic power generation prediction data is generated.

Benefits of technology

It enables precise tracking and quantitative analysis of cloud movement trajectories, providing high-quality short-term solar radiation forecast data for photovoltaic power generation, improving accuracy and real-time performance, reducing costs, and enhancing intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121053170B_ABST
    Figure CN121053170B_ABST
Patent Text Reader

Abstract

The application discloses a cloud layer motion trajectory analysis method and system based on a Transformer neural network, and the method comprises the following steps: acquiring a continuous video sequence of a full-sky camera and performing cloud layer semantic segmentation to generate a cloud layer mask; a space-time decoupled Transformer tracking network is constructed, a space attention head, a time attention head and a space-time coupled attention head are set, and a grid multi-point tracking is performed on the cloud layer mask area to acquire an original trajectory; effective trajectories are screened through multidimensional quality control of visibility evaluation, continuity evaluation and motion consistency; a multi-algorithm fusion strategy of an instantaneous method, an average method and an arc-chord ratio correction method is adopted to calculate an angular velocity, and the weight is adaptively adjusted based on the trajectory arc-chord ratio; an 8-quartile relative relationship between the cloud layer motion direction and the sun position is established, a dynamic shading coefficient is calculated, and a solar radiation prediction value is generated. The method realizes accurate tracking and quantitative analysis of the cloud layer motion trajectory, and provides high-quality data support for photovoltaic power prediction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud movement analysis, in particular to a cloud movement trajectory analysis method and system based on a Transformer neural network. BACKGROUND

[0002] Currently, cloud observation and movement analysis techniques mainly rely on traditional means such as meteorological satellite remote sensing, ground-based observation equipment, and numerical weather prediction models. However, these techniques have significant limitations in photovoltaic power generation applications. Although meteorological satellites have a wide coverage, their time resolution is usually 15-30 minutes, and the spatial resolution is 1-4 kilometers, making it difficult to capture rapid cloud changes within the local range of a photovoltaic power station. At the same time, there is usually a 20-40 minute processing and transmission delay from the acquisition to the actual availability of satellite data, which cannot meet the real-time requirements of ultra-short-term prediction. In addition, satellite observation is costly, with annual usage fees for high-resolution commercial satellite data usually ranging from 500,000 to 1,000,000 yuan, which is economically unfavorable for individual photovoltaic power stations.

[0003] In recent years, deep learning technology has made breakthroughs 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 have multiple regions, multiple scales, and variable shapes. Since the Transformer architecture was proposed in 2017, it has achieved revolutionary success in natural language processing, and its design philosophy based on self-attention mechanisms 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 field of cloud movement trajectory analysis has not been fully explored. Existing research mainly focuses on general image understanding and target detection tasks, lacking specialized design for meteorological application characteristics. Cloud movement analysis requires consideration of both spatial distribution patterns and temporal evolution processes, requiring algorithms to have strong spatiotemporal modeling capabilities and multi-scale feature fusion capabilities. In addition, photovoltaic power generation prediction applications require high quantitative accuracy of cloud movement parameters, requiring accurate measurement of cloud movement direction, speed, and other physical quantities, as well as the establishment of coupling relationships with solar positions. These special requirements have not been effectively addressed in existing technologies.

[0004] In summary, existing cloud observation and movement analysis techniques face key problems such as insufficient accuracy, poor real-time performance, high cost, and low intelligence in photovoltaic power generation applications. Traditional meteorological observation methods cannot meet the needs of site-level high-precision prediction, computer vision methods lack specialized optimization for cloud characteristics, and the depth and breadth of deep learning technology applications in this field need to be improved. SUMMARY

[0005] The application aims to provide a cloud layer motion trajectory analysis method and system based on a Transformer neural network, which combines the physical characteristics of cloud layer motion and the actual needs of photovoltaic applications, realizes accurate tracking and quantitative analysis of the cloud layer motion trajectory, and provides high-quality data support for photovoltaic power prediction.

[0006] To achieve the above-mentioned purpose, the application provides the following solutions.

[0007] A cloud layer motion trajectory analysis method based on a Transformer neural network comprises the following steps:

[0008] S1, acquiring a continuous video sequence through a full-sky camera, performing resolution standardization and video quality evaluation preprocessing, and obtaining a standardized video sequence;

[0009] S2, performing cloud layer semantic segmentation on the standardized video sequence based on RGB multi-channel feature fusion and an adaptive threshold, and generating a cloud layer mask;

[0010] S3, constructing a space-time tracking network based on a Transformer architecture, performing grid-based multi-point tracking in the cloud layer mask area by using a multi-head attention mechanism, and obtaining original trajectory data;

[0011] S4, extracting the original trajectory data and performing effective trajectory screening through multi-dimensional quality control of visibility, continuity and motion consistency;

[0012] S5, calculating a cloud layer motion direction angle based on the polar coordinates of the effective trajectory, and calculating an angular velocity by using a multi-algorithm fusion strategy of an instantaneous method, an average method and an arc-chord ratio correction method;

[0013] S6, calculating a sun position in combination with geographical position and time information, establishing an 8-quartile relative relationship between the cloud layer motion direction and the sun position, and analyzing the 8-quartile relative relationship;

[0014] S7, generating standardized prediction data output containing cloud layer motion parameters, a sun relative position and photovoltaic influence evaluation.

[0015] Preferably, the cloud layer semantic segmentation in S2 specifically comprises:

[0016] RGB three-channel independent feature extraction, including R / B ratio feature, G channel edge feature and blue sky background feature; and an adaptive threshold cloud layer segmentation algorithm is established:

[0017] R / B≥T1 wherein T1 is a judgment threshold of the red-to-blue channel ratio, T1∈[0.5, 1.0] is adaptively adjusted according to the illumination condition, and |G-μ sky | / σ sky ≥ T2, wherein G is a green channel gray value, μsky Gmean is the green channel mean of sky background region, σ sky σ is the green channel standard deviation of sky background, T2 is the normalized deviation degree required for determining cloud layer, T2 ∈ [1.5, 3.0], and multiple features are integrated by logical AND operation.

[0018] Preferably, the Transformer architecture in S3 adopts a multi-head attention mechanism decoupled in space and time, and spatial attention heads, time attention heads, and space-time coupled attention heads are set respectively. The spatial attention heads are used to focus on the spatial distribution pattern and neighborhood relationship of the cloud layer, the time attention heads are used to capture the time sequence dependence relationship of the cloud layer movement, and the space-time coupled attention heads are used to cooperatively process the space-time interaction.

[0019] Preferably, in S5, the polar coordinate calculation of the cloud layer movement direction angle based on the effective trajectory specifically includes:

[0020] A polar coordinate reference system is established, the image center is taken as the origin, and the north direction is 0°; the effective trajectory direction is calculated as θ = arctan2(Δy, Δx) + π, and the result is normalized to [0°, 360°), wherein Δy is the vertical displacement, and Δx is the horizontal displacement; and a weighted average method is used to calculate the main direction of the trajectory segment.

[0021] Preferably, in S5, a multi-algorithm fusion strategy of the instantaneous method, the average method, and the arc-chord ratio correction method is used to calculate the angular velocity, and the formula is as follows:

[0022] ω = α·ω1(t)+(1-α)·ω2

[0023] wherein ω1(t) is the instantaneous angular velocity, ω2 is the average angular velocity, and α is the weight, and the arc-chord ratio λ = L arc / L chord is adaptively adjusted, L arc is the total length of the actual movement trajectory of the tracking point, L chord is the straight line distance from the starting point to the ending point of the tracking point.

[0024] Preferably, in S6, the sun position is calculated in combination with the geographical position and time information, and specifically includes:

[0025] The sun position is calculated based on the geographical coordinates and UTC time, and the formula for obtaining the sun elevation angle is as follows:

[0026] h = arcsin(sinφsinδ+ cosφcosδcosH)

[0027] The formula for obtaining the sun azimuth angle is as follows:

[0028] A = arctan2(sinH, cosHsinφ - tanδcosφ)

[0029] wherein, φ is the latitude, δ is the solar declination, and H is the hour angle.

[0030] Preferably, the standardized prediction data generated in S7 includes: cloud cover area, cloud thickness, dynamic shading coefficient, and solar radiation prediction value; the cloud thickness is estimated based on the optical thickness; and the formula for calculating the predicted solar radiation value is as follows:

[0031] I pred = I clear × K(t+Δt)

[0032] wherein, I pred is the predicted solar radiation value, I clea r is the clear sky radiation value, and K(t+Δt) is the dynamic shading coefficient.

[0033] The application also provides a cloud motion trajectory analysis system based on a Transformer neural network, which applies any one of the cloud motion trajectory analysis methods based on the Transformer neural network, and comprises:

[0034] a data preprocessing module, configured to acquire a continuous video sequence through an all-sky camera, perform resolution standardization and video quality evaluation preprocessing, and obtain a standardized video sequence;

[0035] a cloud semantic segmentation module, configured to perform cloud semantic segmentation on the standardized video sequence based on RGB multi-channel feature fusion and an adaptive threshold, and generate a cloud mask;

[0036] a tracking network construction module, configured to construct a space-time tracking network based on a Transformer architecture, perform grid-based multi-point tracking in the cloud mask area by using a multi-head attention mechanism, and obtain original trajectory data;

[0037] an effective trajectory screening module, configured to extract the original trajectory data and perform effective trajectory screening through multidimensional quality control of visibility, continuity and motion consistency;

[0038] a cloud motion direction calculation module, configured to calculate a cloud motion direction angle based on polar coordinates of the effective trajectory, and calculate an angular velocity by using a multi-algorithm fusion strategy of an instantaneous method, an average method and an arc-chord ratio correction method;

[0039] a relative relationship analysis module, configured to calculate a sun position in combination with geographical position and time information, and establish an 8-quartile relative relationship analysis of the cloud motion direction and the sun position;

[0040] a prediction data output module, configured to generate standardized prediction data output containing cloud motion parameters, a sun relative position and photovoltaic influence evaluation.

[0041] The application also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the cloud layer motion trajectory analysis method based on the Transformer neural network according to any one of the above.

[0042] According to the specific embodiments of the application, the following technical effects are disclosed:

[0043] (1) The application aims to provide a cloud layer motion trajectory analysis method based on the Transformer neural network, which realizes accurate tracking and quantitative analysis of the cloud layer motion trajectory by constructing a special spatio-temporal attention mechanism and a multi-scale feature fusion network, and provides high-precision short-term solar radiation prediction data for photovoltaic power stations, and solves the deficiencies of the prior art in terms of precision, real-time performance and cost.

[0044] (2) The method fully utilizes the advantages of advanced artificial intelligence technologies such as the Transformer, and combines the physical characteristics of cloud layer motion and the actual needs of photovoltaic applications, to realize accurate tracking and quantitative analysis of the cloud layer motion trajectory, and to provide high-quality data support for photovoltaic power prediction. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0046] Figure 1 The application provides a cloud layer motion trajectory analysis system architecture based on the Transformer neural network.

[0047] Figure 2 The application provides a flowchart of the cloud layer motion trajectory analysis method based on the Transformer neural network.

[0048] Figure 3 The application provides a multi-channel cloud layer recognition algorithm flowchart.

[0049] Figure 4 The application provides a grid-based tracking point management diagram.

[0050] Figure 5 The application provides an angular velocity multi-algorithm fusion calculation diagram.

[0051] Figure 6 The application provides a cloud-sun relative position analysis and prediction data output diagram.

[0052] Figure 7 Tracking effect display figure for the algorithm of the present application;

[0053] Wherein, (a) is the initial frame, (b)-(g) are intermediate frames, and (h) is the end frame. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0055] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0056] As Figure 2 shown, the cloud layer motion trajectory analysis method based on the Transformer neural network provided by the present application comprises the following steps:

[0057] S1, acquiring a continuous video sequence through an all-sky camera, performing resolution standardization and video quality evaluation preprocessing to obtain a standardized video sequence;

[0058] S2, performing cloud layer semantic segmentation on the standardized video sequence based on RGB multi-channel feature fusion and an adaptive threshold to generate a cloud layer mask;

[0059] S3, constructing a space-time tracking network based on a Transformer architecture, and performing grid-based multi-point tracking in the cloud layer mask area by using a multi-head attention mechanism to obtain original trajectory data;

[0060] S4, extracting the original trajectory data and performing effective trajectory screening through multi-dimensional quality control of visibility, continuity and motion consistency;

[0061] S5, calculating a cloud layer motion direction angle based on the polar coordinates of the effective trajectory, and calculating an angular velocity by using a multi-algorithm fusion strategy of the instantaneous method, the average method and the arc-chord ratio correction method;

[0062] S6, calculating a sun position in combination with geographical position and time information, establishing an 8-quartile relative relationship between the cloud layer motion direction and the sun position, and analyzing the 8-quartile relative relationship;

[0063] S7, generating standardized prediction data output containing cloud layer motion parameters, sun relative position and photovoltaic influence evaluation.

[0064] Specifically, step S1: multi-source data acquisition and intelligent preprocessing includes:

[0065] S1.1 Full-sky video data standardization processing

[0066] Adopt fisheye lens full-sky camera to obtain continuous video sequence, field of view angle range 160°-180°;

[0067] Establish adaptive resolution adjustment algorithm: dynamically adjust processing resolution according to cloud density, range 512x512 to 2048x2048 pixels;

[0068] Realize timestamp synchronization and frame rate standardization: unify processing to 30fps standard frame rate;

[0069] S1.2 Intelligent evaluation and abnormal detection of video quality

[0070] Establish gradient variance-based image sharpness evaluation index: σ 2 = Σ( I) 2 / N, wherein σ 2 is the average value of image gradient square, I is the spatial variation rate of image gray value, N is the total number of image pixels, and Σ(.) is the cumulative value of all pixel gray values of the image;

[0071] Design illumination condition adaptive discrimination algorithm: evaluate through V channel distribution of HSV color space;

[0072] Realize automatic recognition of severe weather conditions: automatic filtering of extreme weather such as rain, snow and heavy fog.

[0073] Further, the cloud layer semantic segmentation in S2 specifically includes as shown in Figure 3 :

[0074] S2.1 RGB three-channel independent feature extraction, including R / B ratio feature, G channel edge feature, and blue sky background feature; establish adaptive threshold cloud layer segmentation algorithm:

[0075] R / B≥T1 wherein T1 is the discrimination threshold of red to blue channel ratio, T1∈[0.5, 1.0] is adaptively adjusted according to illumination condition, and |G-μ sky | / σ sky ≥ T2, wherein G is the green channel gray value, μ sky is the green channel mean value of the sky background area, and σ skyFor sky background in green channel standard deviation, T2 is the required normalized deviation degree for determining as cloud layer, T2 ∈ [1.5, 3.0], and multiple features are integrated by logical and operation;

[0076] S2.2 Morphological post-processing and region optimization

[0077] Multi-scale morphological filtering: open-close operation with variable kernel size from 3x3 to 9x9;

[0078] Connected component analysis and noise removal: remove noise regions with area less than A min = 0.01% image area, where A min represents the minimum effective connected region area threshold (unit: pixel);

[0079] Circular field of view mask generation: establish an effective observation area with radius R = min(W, H) / 2 - M, where R represents the effective observation area radius (unit: pixel), and M is the edge margin (unit: pixel).

[0080] Specifically, S3 includes: S3.1 Spatio-temporal coding and position embedding design

[0081] Design two-dimensional position coding:

[0082] For spatial position (x, y), the position coding is a d-dimensional vector, where the first d / 2 dimensions encode the x coordinate and the last d / 2 dimensions encode the y coordinate:

[0083] PE(x, y, 2i) = sin(x / 10000 (2i / d) ) (sinusoidal encoding of x coordinate, i = 0, 1,..., d / 4-1)

[0084] PE(x, y, 2i+1) = cos(x / 10000 (2i / d) ) (cosine encoding of x coordinate)

[0085] PE(x, y, d / 2+2j) = sin(y / 10000 (2j / d) ) (sinusoidal encoding of y coordinate, j = 0, 1,..., d / 4-1)

[0086] PE(x, y, d / 2+2j+1) = cos(y / 10000 (2j / d) ) (cosine encoding of y coordinate)

[0087] Construct time coding: TE(t) = [sin(2πt / T), cos(2πt / T)], t is the time step index, and T is the total duration of the video;

[0088] Multi-scale feature embedding: original pixel features are mapped to a d-dimensional embedding space, d e [256, 512];

[0089] S3.2 Multi-head spatio-temporal attention mechanism design

[0090] Spatial attention head: focusing on the spatial distribution pattern and neighborhood relationship of clouds;

[0091] Attention_spatial(Q, K, V) = softmax(QK T / )V, where Q represents the query matrix, K is the key matrix, V is the value matrix, d k represents the vector dimension, d k =64, and softmax represents the normalization exponential function.

[0092] Temporal attention head: modeling the temporal dependence relationship of cloud motion;

[0093] Attention_temporal(Q, K, V) = softmax(Q {t} K {t-τ} T / )V {t-τ} , where Q {t} is the query matrix at the current time, K {t-τ} is the key matrix at the historical time, τ is the time delay, τ = [1, 2, 3], V {t-τ} is the value matrix at the historical time, d k represents the vector dimension, and softmax represents the normalization exponential function.

[0094] Spatio-temporal coupled attention head: considering the interaction of spatial and temporal dimensions at the same time;

[0095] S3.3 Grid-based tracking point adaptive management as shown in Figure 4

[0096] Initial grid generation: generating N x N regular grids in the cloud mask area, N e [20, 60];

[0097] Dynamic density adjustment: adaptively increasing or decreasing the tracking point density according to the complexity of cloud motion;

[0098] Quality evaluation and update: dynamic point management based on confidence threshold θ e [0.6, 0.9];

[0099] Step S4: trajectory data extraction and multi-dimensional quality control, including:

[0100] S4.1 Multi-dimensional evaluation of trajectory validity

[0101] ​Visibility evaluation: 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, all tracking points are perfectly predicted in the ideal case, p(t) is the actual observed position of the tracking point at time t, p pred(t) is the predicted position of the tracking point at time t, V min is the minimum visibility threshold, V min ∈[0.5N, 0.9N];

[0102] Continuity evaluation: C = L continuous / L total ≥ C min , C min ∈[0.7, 0.9], where L continuous is the continuous trajectory length (effective length), L total is the total trajectory length (in the tracking period), and C is the continuity ratio.

[0103] Motion consistency evaluation: consistency index based on speed and direction change rate;

[0104] S4.2 Abnormal trajectory detection and correction

[0105] Speed anomaly detection: v(t) ∈ [v min , v max ], v(t) is the cloud layer movement speed at time t, v min , v max are the minimum and maximum reasonable speed thresholds, respectively, and are automatically marked outside the range, wherein according to the cloud layer speed rule, v min , v max take the value 0° / s, and v max takes the value 10° / s;

[0106] Direction mutation detection: |θ(t)-θ(t-1)| ≤ θ max , θ max ∈[30°, 60°], where θ(t) is the cloud layer movement direction angle at time t, θ(t-1) is the movement direction angle at the previous time, and θ max is the maximum allowed direction change;

[0107] Trajectory repair algorithm: trajectory interpolation and smoothing based on Kalman filtering;

[0108] Further, S5 includes: S5.1, calculating the cloud layer movement direction angle based on the effective trajectory, specifically including:

[0109] A polar coordinate reference system is established, with the image center as the origin and the north direction as 0°; the effective trajectory direction is calculated: θ = arctan2(Δy, Δx) + π, the result is normalized to [0°, 360°), wherein Δy is the vertical displacement (pixels), and Δx is the horizontal displacement (pixels); the weighted average method is used to calculate the main direction of the trajectory segment.

[0110] S5.2, the angular velocity is calculated by using a multi-algorithm fusion strategy of instantaneous method, average method and arc chord ratio correction method as shown in Figure 5 The formula is as follows:

[0111] Instantaneous angular velocity method: ω1(t) = |θ(t+1)-θ(t)|·fps, wherein ω1(t) is the instantaneous angular velocity at time t, θ(t+1) is the direction angle at the next time, θ(t) is the direction angle at the current time, and fps is the video frame rate (unit: Hz)

[0112] Average angular velocity method: ω2 = |θ end -θ start | / (t end -t start ), wherein ω2 is the average angular velocity (full trajectory), θ end is the direction angle at the end time, θ start is the direction angle at the start time, and t end -t start is the observation time span.

[0113] Arc length correction method: introduce the arc chord ratio factor λ = L arc / L chord for correction

[0114] ω = α·ω1(t)+(1-α)·ω2

[0115] , wherein ω1(t) is the instantaneous angular velocity, ω2 is the average angular velocity, α is the weight, L arc is the total length of the actual motion trajectory of the tracking point, and L chord is the straight line distance from the starting point to the end point of the tracking point;

[0116] Based on the trajectory arc chord ratio λ = L arc / L chord , the weight α is adaptively adjusted, when λ is close to 1 (the trajectory is close to a straight line), it indicates that the cloud movement is stable, the average method is more reliable, and the value of α should be reduced, and the weight of the average angular velocity ω2 should be increased, when λ is large (the degree of curvature of the trajectory is high), it indicates that the cloud movement is complex and changeable, the instantaneous method can better reflect the real-time state, and the value of α should be increased, and the weight of the instantaneous angular velocity ω1 should be increased;

[0117] S5.3 Motion mode classification and statistics

[0118] Speed ​​grading statistics: [0-1° / s], [1-2° / s], [2-3° / s], [3-5° / s], [>5° / s];

[0119] Directional octet statistics: North, Northeast, East, Southeast, South, Southwest, West, Northwest;

[0120] Motion pattern recognition: four types of patterns: linear, arc, random, and stationary.

[0121] Furthermore, step S6: Solar position coupling analysis and relative motion assessment includes:

[0122] S6.1 High-precision solar position calculation

[0123] The solar position was calculated based on geographic coordinates and UTC time:

[0124] Solar altitude angle: h = arcsin(sinφsinδ + cosφcosδcosH);

[0125] Solar azimuth: A = arctan2(sinH, cosHsinφ - tanδcosφ);

[0126] Where φ is latitude, δ is solar declination, and H is hour angle;

[0127] S6.2 Analysis of the relative positional relationship between clouds and the sun, as follows: Figure 6 As shown:

[0128] Establish an octet relative orientation system

[0129] Sunny: |θ cloud - A sun | ≤ 22.5°, where θ cloud For the direction angle of the running motion, A sun The azimuth of the sun;

[0130] Shaded area: |θ cloud - A sun - 180° | ≤ 22.5°;

[0131] Left skew / Right skew: Precise classification based on angle subdivision;

[0132] Assessment of the impact of shading: A comprehensive assessment combining cloud size, density, and relative position.

[0133] Furthermore, step S7: Standardization and output of photovoltaic forecast data includes:

[0134] S7.1 Cloud Impact Factor Calculation

[0135] Cloud cover area prediction: 10-60 min ahead occluded area based on trajectory extrapolation

[0136] Cloud thickness estimation: transmittance estimation based on optical thickness

[0137] Dynamic occlusion coefficient: K(t+Δt) = f(A cloud(t+Δt) ), ρ cloud , h sun ), where A cloud(t+Δt) is the predicted area of the cloud covering the sun, ρ cloud is the cloud optical thickness, h sun is the sun elevation angle, and the coefficient is calculated based on the mapping relationship obtained from the optimized atmospheric radiation transfer model.

[0138] S7.2 Solar radiation prediction model

[0139] Clear sky radiation model: I clear = I0× cos(θ z ) × τ atm , where I clear is the clear sky radiation intensity (unit: W / m²), I0 is the solar constant, cos(θ z ) is the projection factor (cosine of zenith angle), and τ atm is the atmospheric transmittance.

[0140] Cloud impact correction: I pred = I clear × K(t+Δt)

[0141] Uncertainty quantification: provide prediction confidence interval and error estimation

[0142] where I pred is the predicted solar radiation value, I clear is the clear sky radiation value, and K(t+Δt) is the dynamic occlusion coefficient.

[0143] As shown in Figure 1 , the present application also provides a cloud motion trajectory analysis system based on a Transformer neural network, which applies any one of the above cloud motion trajectory analysis methods based on a Transformer neural network, comprising:

[0144] A data preprocessing module for obtaining a continuous video sequence through a full-sky camera, performing resolution standardization and video quality assessment preprocessing to obtain a standardized video sequence;

[0145] A cloud semantic segmentation module for performing cloud semantic segmentation on the standardized video sequence based on RGB multi-channel feature fusion and adaptive thresholding to generate a cloud mask;

[0146] A tracking network construction module is configured to construct a space-time tracking network based on a Transformer architecture, and utilize a multi-head attention mechanism to perform grid-based multi-point tracking within a cloud layer mask area to obtain original trajectory data.

[0147] An effective trajectory screening module is configured to extract the original trajectory data and perform effective trajectory screening through multi-dimensional quality control of visibility, continuity and motion consistency.

[0148] A cloud layer motion direction calculation module is configured to calculate a cloud layer motion direction angle based on polar coordinates of effective trajectories, and calculate an angular velocity by using a multi-algorithm fusion strategy of an instantaneous method, an average method and an arc-chord ratio correction method.

[0149] A relative relationship analysis module is configured to calculate a sun position in combination with geographical position and time information, and establish an 8-quartile relative relationship analysis of the cloud layer motion direction and the sun position.

[0150] A prediction data output module is configured to generate standardized prediction data output containing cloud layer motion parameters, a sun relative position and photovoltaic impact assessment.

[0151] In specific embodiments, the frame sequence tracking effect obtained by using the above method is as shown in Figure 7

[0152] An initial frame (1st frame): in the initial frame, the algorithm accurately identifies the cloud layer area through the cloud layer semantic segmentation module, and generates initial grid tracking points within the cloud layer mask area. As can be seen in the diagram, the tracking points are uniformly distributed on the edge and inside of the cloud layer, providing a good starting point for subsequent trajectory tracking.

[0153] An intermediate frame (2nd-7th frames): as the cloud layer moves, the algorithm can update the position of the tracking points in real time and accurately capture the motion trajectory of the cloud layer. In this frame, it can be seen that the tracking points move along the actual motion direction and speed of the cloud layer, and the trajectory is continuous and smooth without obvious jumping or loss phenomenon.

[0154] An ending frame (8th frame): at the end of tracking, the cloud layer motion trajectory output by the algorithm is complete and accurate, and can clearly reflect the motion process of the cloud layer in the entire video sequence. Through the processing of the trajectory data extraction and multi-dimensional quality control module, the final trajectory data can be used for subsequent cloud layer motion parameter analysis and photovoltaic prediction.

[0155] The hardware system configuration is as follows:

[0156] 1. Data acquisition equipment requirements

[0157] All-sky camera system:

[0158] Lens type: fisheye lens, field of view angle ≥ 160°, recommended 180°​

[0159] Sensor: CMOS sensor, effective pixels ≥ 50 million

[0160] Resolution: Supports 1920x1920 or higher resolution

[0161] Frame rate: Adjustable 1-30fps, recommended 5-10fps

[0162] Protection level: IP65 or above, suitable for outdoor environment

[0163] Data interface: Gigabit Ethernet or USB3.0

[0164] Environmental monitoring equipment (optional):

[0165] Illuminance sensor: measurement range 0-100,000 lux

[0166] Temperature and humidity sensor: accuracy ±0.5°C, ±3%RH

[0167] GPS positioning module: positioning accuracy ≤3 meters

[0168] 2. Computing platform

[0169] Basic configuration requirements:

[0170] CPU: Intel Core i7-8700 or AMD Ryzen 7 2700X or above

[0171] GPU: NVIDIA GTX 1080 or RTX 2070 or above, video memory ≥8GB

[0172] Memory: 32GB DDR4 RAM or above

[0173] Storage: 1TB NVMe SSD + 4TB HDD

[0174] Network: Gigabit Ethernet interface

[0175] Recommended configuration:

[0176] CPU: Intel Core i9-10900K or AMD Ryzen 9 3900X

[0177] GPU: NVIDIA RTX 3080 or higher model, video memory ≥10GB

[0178] Memory: 64GB DDR4 RAM

[0179] Storage: 2TB NVMe SSD + 8TB HDD

[0180] Compared with other conventional cloud motion analysis methods, the following conclusions are obtained:

[0181] (1) Precision comparison

[0182] Cloud motion direction accuracy: The cloud motion direction prediction error of the present method is controlled within 5°, while the error of traditional methods (such as optical flow method, feature matching method, etc.) is usually between 10°-20°.

[0183] Cloud motion speed accuracy: The speed error of the present method is controlled within 0.2° / s, and the speed error of traditional methods is generally between 0.5° / s-1° / s.

[0184] Solar radiation prediction accuracy: The 0-30 minute prediction accuracy of the present method reaches 92%, and the 30-60 minute prediction accuracy reaches 87%, which is significantly improved compared with the prediction accuracy (usually between 70%-80%) of traditional methods (such as numerical weather prediction model, simple cloud recognition method, etc.). In actual photovoltaic power station applications, the correlation between the predicted solar radiation value and the actual measured value of the present method reaches 0.85 or above, while the correlation of traditional methods is only about 0.7.

[0185] (2) Speed comparison

[0186] Single frame processing time: The spatio-temporal tracking network based on Transformer of the present method controls the single frame processing time within 0.5 seconds, which can meet the real-time requirements. The single frame processing time of traditional recurrent neural network (RNN / LSTM) methods is usually between 1-2 seconds, and the single frame processing time of tracking methods based on optical flow method can even reach several seconds when processing complex cloud images.

[0187] End-to-end processing delay: From the full-sky video data to the final photovoltaic prediction data output, the full-link delay of the present method is controlled within 5 minutes. Due to the complexity of data processing and calculation, the end-to-end delay of traditional methods is usually between 10-20 minutes, which cannot provide timely data support for photovoltaic power generation prediction.

[0188] (3) Cost comparison

[0189] Equipment cost: The data acquisition equipment such as full-sky camera used in the present method has low cost, and the cost is reduced by more than 80% compared with traditional equipment such as weather radar.

[0190] Operation and maintenance cost: The system of the present method has high intelligence and can realize automatic operation, and the annual operation and maintenance cost is not more than 10% of the traditional scheme. Traditional methods require a large amount of manual intervention for data processing and equipment maintenance, and the operation and maintenance cost is high.

[0191] The application further provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the cloud layer motion trajectory analysis method based on the Transformer neural network according to any one of the above.

[0192] Those skilled in the art can clearly understand from the above description of the embodiments that the embodiments can be realized by means of software and necessary universal hardware platforms, and of course, can also be realized by hardware. Based on such understanding, the above technical solutions, essentially or in the sense of contribution to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, or an optical disc, and includes a plurality of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0193] The principles and implementation manners of the application are described by applying specific examples herein, and the above description of the embodiments is only for helping to understand the method of the application and its core idea; meanwhile, for those skilled in the art, according to the idea of the application, the specific implementation manners and application ranges will have changes. In conclusion, the content of the specification should not be understood as a limitation of the application.

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: ω = α·ω1(t)+(1-α)·ω2 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 Adaptively adjust α, 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 Here, K(t+Δt) represents the clear-sky radiation value, and K(t+Δt) represents the dynamic shading coefficient. I clear = I0× cos(θ z ) × τ atm Where I0 is the solar constant, cos(θ) z ) is the projection factor, τ atm Atmospheric transmittance; K(t+Δt) = f(A cloud(t+Δt) ),ρ cloud , h sun ) Among them, 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 This is the solar altitude angle.

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