A method for inverting atmospheric optical thickness
By constructing the TECIS-CASNet model and using the Fernald analysis method, combined with the Swing Transformer block for image feature extraction and restoration, the problem of high computational complexity and poor generalization performance of spaceborne lidar data inversion algorithms under complex conditions is solved. This achieves high-precision cloud and aerosol region identification and aerosol optical thickness calculation, improving the usability and ease of use of the model.
Patent Information
- Application Number
- CN202411447948.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing spaceborne lidar data inversion algorithms suffer from high computational complexity and poor generalization performance under large-scale and complex conditions, making it difficult to achieve fast and automated hierarchical classification of clouds and aerosols.
A TECIS-CASNet model was constructed, and image features were extracted and restored using the Swin Transformer block. The Fernald analysis method was used to invert aerosol characteristics, and the model was deployed by packaging it into a Docker image to improve its usability and ease of use.
It achieves high-precision cloud and aerosol region identification and aerosol optical thickness calculation, improving the model's usability, ease of use, and security, and is suitable for rapid classification tasks in complex environments.
Smart Images

Figure CN118962725B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of satellite remote sensing atmospheric optical thickness inversion, and in particular to an atmospheric optical thickness inversion method. Background Art
[0002] Through multi-dimensional and large-scale observation of global clouds and aerosol particles Through continuous observation and inversion with high resolution, we can significantly improve the ability to predict extreme meteorological events, the accuracy of environmental monitoring, and the speed of response to climate change. This is of great significance for disaster prevention, public health and sustainable development. Since the 1990s, dozens of satellites have been used for cloud and aerosol observations around the world. These satellites are equipped with active and passive remote sensing sensors such as infrared imagers, microwave radiometers, multi-angle observers and Lidar, and are widely used in fields such as Earth system science, public environmental health and climate modeling. Compared with passive optical sensors, Lidar has the advantages of all-weather working capability and high-precision vertical distribution observation. By combining multi-wavelength and polarization modes, Lidar can deeply understand the characteristics of multi-layer clouds and aerosol particles, and gradually become an important tool for studying the Earth's atmosphere.
[0003] With the rapid development of space-borne lidar, the inversion algorithm for its data needs to be further improved. The theoretical progress of hierarchical classification of space-borne atmospheric lidar mainly covers empirical methods, statistical models, machine learning and deep learning. Laser pulses can obtain the vertical distribution information of the atmosphere on the transmission path. Since the backscattering intensity of cloud and aerosol signals is significantly different from the background noise, the top and bottom information of the atmosphere can be obtained by setting empirical thresholds. However, this method is not suitable for large-scale, complex situations and automated identification tasks.
[0004] On this basis, statistical models broke through the limitation of one-dimensional line features and began to classify the vertical level of the atmosphere through the two-dimensional surface features of cloud and aerosol signals along the track, such as the CAD algorithm. However, the high computational complexity of statistical models and their reliance on prior reference data limit their ability to quickly complete classification tasks, and their generalization performance is poor. Summary of the invention
[0005] In view of the above technical problems in the related art, the present invention provides an atmospheric optical thickness inversion method, which can solve the above problems.
[0006] To achieve the above technical objectives, the technical solution of the present invention is implemented as follows:
[0007] An atmospheric optical thickness inversion method comprises the following steps:
[0008] S100, Model Building: Building the TECIS-CASNet model for spaceborne atmospheric lidar target segmentation;
[0009] S200, select Fernald analysis method to invert aerosol characteristics: When using the Land Carbon Satellite LiDAR data for analysis, first identify the cloud or aerosol area from the LiDAR signal through the TECIS-CASNet model and obtain the basic data of clouds and aerosols in the cloud or aerosol area. Then, use Fernald analysis method to invert aerosol characteristics, calculate the backscattering coefficient and extinction coefficient, and integrate the extinction coefficient to finally obtain the optical thickness of the aerosol.
[0010] S300, Model deployment: Package and deploy the TECIS-CASNet model, and transition the TECIS-CASNet model from the development environment to the production environment.
[0011] Furthermore, the encoder part of the TECIS-CASNet model uses the Swin Transformer block to extract deep-level image features, while the decoder part of the TECIS-CASNet model uses the image features extracted by the Swin Transformer block to restore the image resolution and generate a high-precision segmentation map; the built-in skip connection of the TECIS-CASNet model ensures the effective fusion of image features at different levels.
[0012] Furthermore, the Swin Transformer block includes:
[0013] Layer normalization, by standardizing the input features so that the input features of each layer have zero mean and unit variance, thus speeding up the model training process and improving stability;
[0014] Windowed multi-head self-attention, calculates self-attention in each local window, calculates the dot product of each query and key by linearly transforming the input features, and obtains the attention weight through the softmax function, and then weighted sums to get the final attention output;
[0015] Multilayer Perceptron, which consists of two layers of fully connected networks, first performs a linear transformation on the input features and adds a bias, then performs a nonlinear transformation through an activation function, and then undergoes a second linear transformation and activation, and finally outputs the processed features;
[0016] The shifted window multi-head self-attention first shifts the input features to offset the position of the window, and then applies the window multi-head self-attention mechanism in the offset window to capture cross-window dependencies and improve the ability to extract global features.
[0017] Furthermore, the construction of the TECIS-CASNet model includes the following steps:
[0018] S110. Produce a data set based on the historical detection data of the land ecosystem carbon monitoring satellite: process the detection data of a certain detection area to obtain the total backscatter coefficient, color ratio, and depolarization ratio, normalize the total backscatter coefficient, color ratio, and depolarization ratio, and finally combine them to generate a three-channel image. The data set also includes the real label of the corresponding detection area;
[0019] S120. Perform model training on the TECIS-CASNet model based on the prepared data set: increase the data diversity of the training data set by data enhancement, and then perform model training to ensure that the model performance meets expectations;
[0020] S130. Evaluate the model accuracy of the TECIS-CASNet model based on the prepared data set: input the test data set into the trained model to obtain the prediction results, and use the prediction results to calculate the evaluation indicators of the model, including precision, recall rate and F1 score.
[0021] Furthermore, the evaluation index of the model calculated using the prediction results specifically includes the following steps:
[0022] S131, obtaining a prediction result from the trained model, preparing a corresponding true label, comparing the prediction result with the true label to obtain a classified image, and the classified image classifies each pixel as background, cloud or aerosol;
[0023] S132, expand the prediction results and the true labels, and convert the prediction results and the true labels into a one-dimensional array in order to calculate the evaluation index;
[0024] S133. Construct a confusion matrix and use the confusion matrix to calculate various evaluation indicators.
[0025] Furthermore, the obtained prediction results are subjected to morphological processing, including the following steps: first, a structural element is selected; then, according to the characteristics of the prediction results, a morphological operation or a combination of multiple morphological operations is selected to process the prediction results, wherein the morphological operations include dilation, erosion, opening operation, and closing operation.
[0026] Furthermore, the aerosol backscattering coefficient calculation formula is:
[0027] ;
[0028] In the formula is the aerosol lidar ratio, and ,and , α represents the extinction coefficient, β represents the backscattering coefficient, and the subscripts m and p represent molecules and cloud-aerosol particles, respectively. is the signal strength received by the laser radar at R, R represents the target distance, that is, the specific distance that the laser radar wants to measure, R c represents the selected reference position, r is the integral variable, used for the integral operation, representing the distance from the lidar transmitter to any point, and r′ is the integral internal variable, used to represent the distance of any point on the integral path;
[0029] Based on the characteristics of the satellite-borne lidar system, the Fernald forward integration method is selected to invert the aerosol extinction coefficient:
[0030] ;
[0031] Finally, the extinction coefficient of aerosol particles in the aerosol layer is integrated to obtain the aerosol optical thickness AOD, which is expressed as follows:
[0032] ;
[0033] Where Z is the lidar detection height.
[0034] Furthermore, the packaging and deployment of the TECIS-CASNet model specifically includes the following steps:
[0035] S310, model packaging: package the trained model to facilitate deployment and calling on the intranet server;
[0036] S320, Build Docker image: Package the packaged application into a Docker image for easy porting and deployment;
[0037] S330, Migrate to the intranet server: Migrate the Docker image to the intranet server and deploy and run it;
[0038] S340, Intranet access and verification: Ensure that the services on the intranet server are running normally and verify through intranet access;
[0039] S350, Security and Optimization: Ensure that deployed services are secure, reliable, and optimized.
[0040] Beneficial effects of the present invention: Based on the atmospheric lidar data of the terrestrial ecosystem carbon monitoring satellite, the present application constructs a TECIS-CASNet model, accurately identifies the area of clouds or aerosols based on the lidar signal and uses the TECIS-CASNet model, and accurately obtains the basic data related to the area, and then inverts the aerosol characteristics through the Fernald analysis method, and calculates the optical thickness of the aerosol. At the same time, the present application encapsulates and deploys the TECIS-CASNet model, thereby improving the availability, ease of use and security of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] The present invention is further described in detail below with reference to the accompanying drawings.
[0043] Figure 1 is a schematic diagram of an atmospheric optical thickness inversion method according to an embodiment of the present invention;
[0044] Figure 2 It is a flow chart of packaging and deploying the model described in the embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0046] like Figure 1-2 As shown, according to the present invention, an atmospheric optical thickness inversion method is disclosed. First, a TECIS-CASNet model suitable for spaceborne atmospheric lidar target segmentation is constructed. Based on the constructed TECIS-CASNet model, a suitable analysis method is selected to invert aerosol characteristics, and a calculation method for the optical thickness of aerosol is obtained. Finally, the TECIS-CASNet model is packaged and deployed, and the TECIS-CASNet model is transitioned from a development environment to a production environment. Embodiment 1:
[0047] This application builds the TECIS-CASNet model to process satellite-borne lidar data and perform hierarchical classification of atmospheric targets. The model uses a hierarchical structure to reduce the resolution of feature maps, which not only expands the receptive field, but also enhances the model's ability to capture high-level semantic information. The encoder part uses the Swin Transformer block to extract deep-level image features, while the decoder uses these features to gradually restore the image resolution and generate a highly accurate segmentation map. The model's built-in jump connection ensures the effective fusion of features at different levels, thereby critically improving segmentation accuracy.
[0048] The Swin Transformer block includes layer normalization (LN), window multi-head self-attention (W-MSA), multi-layer perceptron (MLP) and shifted window multi-head self-attention (SW-MSA). The following is a detailed description of layer normalization (LN), window multi-head self-attention (W-MSA), multi-layer perceptron (MLP) and shifted window multi-head self-attention (SW-MSA):
[0049] Layer Normalization (LN) can be expressed as follows:
[0050] ;
[0051] Among them, x represents the input feature, μ represents the feature mean, and σ represents the feature standard deviation. represents a small constant used to prevent division by zero errors; γ and β represent trainable scaling and offset parameters. Layer normalization standardizes the input features so that the input features of each layer have zero mean and unit variance, thereby accelerating the training process of the model and improving stability.
[0052] Window Multi-Head Self-Attention (W-MSA) can be expressed as follows:
[0053] ;
[0054] Where Q (Query) represents the query matrix, K (Key) represents the key matrix, and V (Value) represents the value matrix; k Represents the dimension of the key. The window multi-head self-attention mechanism calculates self-attention in each local window, performs linear transformation of the query, key, and value of the input features, calculates the dot product of each query and key, obtains the attention weight through the softmax function, and then obtains the final attention output by weighted summation.
[0055] Multilayer Perceptron (MLP) can be expressed as follows:
[0056] ;
[0057] Among them, x represents the input feature, W1 and W2 represent the weight matrix, b1 and b2 represent the bias vector, GELU represents the Gaussian error linear unit activation function, Represents the activation function (usually ReLU or GELU). The multilayer perceptron consists of two layers of fully connected networks. First, the input features are linearly transformed and biased, then nonlinearly transformed through the activation function, and then a second linear transformation and activation are performed to finally output the processed features.
[0058] Shifted Window Multi-Head Self-Attention (SW-MSA) can be expressed as follows:
[0059] ;
[0060] in, represents the input features, It is a shift operation on the input features. Represents window multi-head self-attention. Shifted window multi-head self-attention first shifts the input features to offset the position of the window, and then applies the window multi-head self-attention mechanism in the offset window to capture cross-window dependencies and improve the ability to extract global features.
[0061] Swin Transformer block operation flow:
[0062] (1) Layer normalization: Normalize the input features to obtain ;
[0063] (2) Window multi-head self-attention: Apply the multi-head self-attention mechanism in each local window to obtain ;
[0064] (3) Multilayer Perceptron: The output features of the previous step are processed by a multilayer perceptron to obtain , and then processed by MLP, we get ;
[0065] (4) Shift window multi-head self-attention: Shift the input features and apply the multi-head self-attention mechanism in the shifted window to obtain .
[0066] Through the above steps, the Swin Transformer block can effectively extract local and global features of the image and improve the performance of classification and segmentation tasks.
[0067] Embodiment 2:
[0068] The Land Ecosystem Carbon Monitoring Satellite is equipped with four payloads, including a multi-beam lidar, a multi-angle multi-spectral optical camera (DPC), a hyperspectral detector (FSI), and a multi-angle polarization imager (DMC). Information on the scale of atmospheric particles can be obtained through laser multi-wavelength detection. Under the condition that the laser wavelength is equivalent to the particle scale, different particle scales respond differently to the wavelength. Through the corresponding scattering and extinction models, the scale, shape and other information of the particles can be inverted from the multi-wavelength echo signal. As shown in Table 1, the total backscattering coefficient of the 532nm channel is an indicator of the scattering ability of scattering materials (such as clouds and aerosols) in the atmosphere to the laser beam. It represents the laser scattering intensity within a unit length and unit fixed angle range, and is often used to estimate the concentration and distribution of clouds and aerosols. The color ratio is used to characterize the particle size distribution of clouds and aerosols in the atmosphere. It is obtained by measuring the scattering intensity ratio of different wavelengths, usually using two wavelengths of 532 nm and 1064 nm. A smaller color ratio indicates a larger particle, while a larger color ratio indicates a smaller particle. The depolarization ratio is a parameter that describes the degree of change in the polarization state of a laser beam after it encounters scattering matter in the atmosphere. It refers to the ratio between the horizontal polarization and vertical polarization components in the reflection and scattering of the laser beam. The depolarization ratio can provide information about the particle size, shape and composition of scattering matter in the atmosphere. For spherical particles (such as water droplets), the depolarization ratio is small, while for non-spherical particles (such as aerosols), the depolarization ratio is large.
[0069] Table 1:
[0070] ;
[0071] Therefore, a data set is produced based on the historical detection data of the land ecosystem carbon monitoring satellite. The detection data of a certain detection area is processed to obtain the total backscatter coefficient, color ratio, and depolarization ratio. Part of the data set is used as the training data set of the model, and part of it is used as the test data set of the model. In order to make the data of the data set better applied to the model, the total backscatter coefficient, color ratio, and depolarization ratio are normalized respectively. Finally, these three representative features are assigned to different R, G, and B channels and finally combined to generate a three-channel image. Different from the previous three-feature array display, the obtained picture is rich in information, and it is more intuitive to judge which part of the target is cloud and which part of the target is aerosol in the form of a picture.
[0072] Embodiment three:
[0073] For model training, firstly, for the training dataset, data augmentation such as flipping and rotation is used to increase data diversity. Then, based on Python 3.9 and Pytorch1.13.1, the model is trained on a computer with a CPU model of AMD Ryzen 7 6800H and a GPU model of NVIDIA GeForce RTX 3060 Laptop GPU GDDR6 @ 6GB (192 bits), and TECIS-CASNet is implemented. During training, the model parameters are initialized with the weights pre-trained on ImageNet, the initial learning rate is set to 0.001, and the SGD optimizer with a momentum of 0.9 and a weight decay of 1e-4 is used to optimize the model for back propagation.
[0074] Embodiment 4:
[0075] After the model training is completed, the test data set is used for prediction. The prediction steps are as follows: Input the test data into the trained model to obtain the prediction results. Compare the prediction results with the true labels to obtain classified images. These classified images will classify each pixel as background, cloud or aerosol.
[0076] Use the prediction results to calculate the model's evaluation indicators, including precision, recall, and F1 score. The calculation formula is as follows:
[0077] ;
[0078] Precision refers to the proportion of samples that are actually positive among all samples predicted as positive by the model. It focuses on the quality of the positive samples predicted by the model. The calculation formula is shown in (1), where TP (True Positives) is the number of samples correctly predicted as positive, and FP (False Positives) is the number of samples incorrectly predicted as positive.
[0079] ;
[0080] Recall refers to the proportion of samples that are actually positive that are correctly predicted as positive by the model. It focuses on the coverage of positive samples by the model. The calculation formula is shown in (2), where FN (False Negatives) is the number of positive samples that are incorrectly predicted as negative samples.
[0081] ;
[0082] The F1 score is the harmonic average of precision and recall, which is used to comprehensively consider precision and recall. When there is a trade-off between precision and recall, the F1 score can provide a single metric to evaluate the overall effect of the model. The calculation formula is shown in (3). The F1 score is particularly suitable for those situations where the positive and negative samples are unbalanced, and can balance the accuracy and completeness of positive example predictions.
[0083] The actual detailed calculation steps are as follows:
[0084] (1) Obtaining prediction results and true labels: First, we need to obtain the prediction results from the trained model and prepare the corresponding true labels, namely: Prediction result: The prediction result of the model for the test data, usually a classification image, where each pixel corresponds to a category (e.g., background, cloud, aerosol). True label: The corresponding regional true label, also a classification image, where each pixel corresponds to a true category.
[0085] (2) Expand the predicted results and true labels: In order to calculate the evaluation indicators, the predicted results and true labels need to be converted into a one-dimensional array.
[0086] (3) Construct and calculate the confusion matrix: Use the confusion matrix to calculate various evaluation indicators. The confusion matrix can help us understand the classification of each category. Each row of the confusion matrix represents the actual category, and each column represents the predicted category. The values on the diagonal represent the number of correct classifications, and the values in other positions represent the number of misclassifications. The form of the confusion matrix is shown in Table 2.
[0087] Table 2:
[0088] ;
[0089] According to the confusion matrix, various evaluation indicators can be calculated (precision, recall and F1 score). These indicators are usually calculated for each category, and then weighted averaged as needed to obtain the overall performance. Then draw the PR graph and ROC curve graph. In order to more intuitively display the model performance, the PR (Precision-Recall) curve and ROC (Receiver Operating Characteristic) curve are usually drawn. PR curve: Draw the precision and recall curves at different thresholds, and evaluate the classification effect of the model by looking at the area under the curve (AUC-PR). ROC curve: Draw the false positive rate (False Positive Rate) and true positive rate (True Positive Rate) curves at different thresholds, and evaluate the classification effect of the model by looking at the area under the curve (AUC-ROC).
[0090] Embodiment five:
[0091] In the segmentation task, due to the low signal-to-noise ratio of the lidar, some of the original input images have poor quality, which may affect the accuracy of the prediction results. Morphological operations can be used to smooth the prediction boundaries, remove noise, and fill holes, thereby improving the accuracy and consistency of the segmentation results. Specifically, morphological operations can smooth the discontinuous or jagged edges produced by the deep learning model at the segmentation boundaries to make the segmentation results more natural; remove some small erroneous areas (noise) in the prediction results; fill in areas that are not correctly segmented (holes); and enhance the coherence of connected areas to make the segmentation results more coherent and complete.
[0092] Morphological processing operations mainly include erosion, dilation, opening, closing, etc. These operations can be used in combination to process the prediction results according to specific needs.
[0093] The dilation operation can expand the boundaries of the target area to fill holes and smooth boundaries. Steps: Expand the target area by adding pixels at the edge of the target area. Effect: Fill small holes and gaps, making the target area more coherent.
[0094] The erosion operation can shrink the boundary of the target area and is used to remove noise and isolated small areas. Steps: Shrink the target area by removing pixels at the edge of the target area. Effect: Remove small noise points and isolated areas, making the target area cleaner.
[0095] The opening operation is an operation that first erodes and then expands, which is used to remove small noise. Steps: Erosion first, then expansion. Effect: Remove small noise points while maintaining the shape and size of the target area.
[0096] Closing is an operation that first dilates and then erodes, which is used to fill holes and smooth boundaries. Steps: Dilate first, then erode. Effect: Fill small holes and gaps while maintaining the shape and size of the target area.
[0097] The specific steps of morphological operation are as follows: First, select a suitable structural element (such as rectangle, circle, etc.), because the size and shape of the structural element will affect the effect of the operation. Then, according to the characteristics of the prediction results, select a suitable morphological operation (such as dilation, erosion, opening operation, closing operation) to process the prediction results. In practical applications, it may be necessary to combine multiple morphological operations to achieve the best effect. For example, first perform an opening operation to remove noise, and then perform a closing operation to fill the holes. Finally, according to the specific situation of the prediction results, adjust the parameters of the morphological operation (such as the size of the structural element) to obtain the best processing effect.
[0098] When applied in this application, for example, in a segmentation result image containing cloud and aerosol layer predictions, the following morphological operations can be used for post-processing. First, use an opening operation to remove isolated small noise areas to reduce noise. Second, use a closing operation to fill small holes in the segmentation result to improve the integrity of the segmentation. Finally, use dilation and erosion operations as needed to smooth the boundaries of the segmentation results to make the boundaries more natural and smooth. Through these morphological post-processing operations, the quality of the segmentation results can be significantly improved, making the segmented image more in line with the needs of practical applications.
[0099] Embodiment six:
[0100] Among the methods for inverting optical thickness, the Fernald inversion method is a classic inversion algorithm, which is widely used in the calculation of optical thickness of aerosols and clouds. This method is based on the lidar equation. Through the known relationship between the atmospheric backscattering coefficient and the extinction coefficient, combined with the lidar echo signal, the vertical distribution and optical thickness of the aerosol are inverted. The advantage of the Fernald method is that it can provide a more accurate distribution of aerosol optical thickness, but in practical applications, better initial conditions and boundary values are required. This application processes the lidar signal-related data based on the constructed TECIS-CASNet model, accurately identifies the area of clouds or aerosols and more accurately obtains the basic data related to the area, which is applied to the calculation of aerosol optical thickness in the Fernald inversion method.
[0101] When using the Land Carbon Satellite LiDAR data for analysis, we first use the hierarchical recognition algorithm in the TECIS-CASNet model to identify areas containing clouds or aerosols from the LiDAR signal. The algorithm can not only subdivide their subcategories, but also identify the locations of clouds and aerosols, providing basic data for the accurate inversion of aerosol characteristics. Then, the Fernald analysis method is used to invert the aerosol characteristics. By calculating the backscattering coefficient and the extinction coefficient and integrating the extinction coefficient, the optical thickness of the aerosol is finally obtained. Formula (4) shows the calculation formula for the aerosol backscattering coefficient profile. Fernald introduced the cloud-aerosol LiDAR ratio S p The concept of aerosol extinction coefficient is equal to the ratio of the backscattering coefficient. This method has three basic assumptions: In the inversion process, it is assumed that S p is a constant; assuming that the scattering and extinction of atmospheric molecules are known quantities, based on the theory of Rayleigh scattering, we can get ; Assuming a known height The corresponding backscattering coefficient is .
[0102] ;
[0103] In the formula, the subscripts m and p represent molecules and cloud-aerosol particles, respectively, and β represents the backscattering coefficient. The Fernald method usually assumes that Sp is about 50 sr, and the boundary value is generally selected in the clean atmosphere. The corresponding backscattering coefficient is It is generally assumed to be 1.01 to 1.05 times the molecular backscattering coefficient value corresponding to the height, and P(R) is the signal intensity received by the lidar at R.
[0104] Considering the characteristics of the satellite-borne lidar system, the Fernald forward integration method is used to invert the aerosol extinction coefficient:
[0105] ;
[0106] Finally, the extinction coefficient of aerosol particles in the aerosol layer is integrated to obtain the aerosol optical thickness AOD, which is expressed as follows:
[0107] ;
[0108] Where Z is the lidar detection height.
[0109] Embodiment seven:
[0110] In order to enhance the reliability and stability of the model, the model was transitioned from the development environment to the production environment so that it can be used by practical applications and users. The deep learning model was packaged and deployed, which is an important step in the semantic segmentation model and optical thickness inversion project based on the land ecological carbon monitoring satellite.
[0111] First, through encapsulation, the semantic segmentation model and its dependencies are packaged into independent executable units to ensure that they can be easily deployed and run in different environments. In this way, users and applications can directly call the model for prediction through a unified API interface, simplifying the integration process. For example, the semantic segmentation model can be encapsulated into a Docker image and run in any environment that supports Docker, thereby improving the availability and ease of use of the model.
[0112] Secondly, encapsulation and deployment enhance the reliability and stability of the model. By running the model in a controlled environment, errors caused by environmental changes or dependency conflicts are reduced. This is especially important for processing complex ecological carbon monitoring data and optical thickness inversion data. The unified access interface not only improves the ease of use, but also facilitates permission management and logging. The encapsulated model can support expansion and scaling, share the load by adding instances, and ensure high availability and responsiveness of the service.
[0113] In terms of security, firewalls, access control, and encryption measures can be used to prevent unauthorized access and data leakage, which is particularly important for models that process sensitive ecological and environmental data.
[0114] Team collaboration and automation also benefit from packaging and deployment. Standardized processes enable team members to test and use models in the same environment, which promotes collaboration and improves efficiency. For example, semantic segmentation models and optical thickness inversion models can be integrated into the CI / CD pipeline to achieve automated testing, building, and deployment, accelerating the release cycle.
[0115] The specific packaging deployment steps include:
[0116] (1) Model training
[0117] Model training is performed in an external network environment to ensure that the model performance meets expectations. Specifically, after training is completed, the final model TECIS-CASNet is saved, including the model structure and weights, for subsequent use.
[0118] (2) Model encapsulation
[0119] Encapsulate the trained model to facilitate deployment and calling on the intranet server. First, choose a suitable encapsulation framework, such as Flask, FastAPI, or Django. Then, write an API interface to load the model and provide an interface for prediction services. For example, you can use Flask to write a simple API interface to load the saved model and implement the prediction function. Finally, test the API interface to ensure that it works properly.
[0120] (3) Build a Docker image
[0121] Package the encapsulated application into a Docker image for easy porting and deployment. First, write a Dockerfile to define the image building process, including base image selection, working directory settings, dependency installation, etc. Then, use the Docker build tool to build the Docker image. After the build is complete, test it to ensure that the image can run normally and provide the expected services.
[0122] (4) Migrate to the intranet server
[0123] Migrate the Docker image to the intranet server and deploy it. If you have a private Docker repository, you can push the image to the private repository. First, push the image to the private repository, and then pull the image from the intranet server. After pulling, run the Docker container to ensure that the application runs normally on the intranet server.
[0124] (5) Intranet access and verification
[0125] Ensure that the services on the intranet server are running normally and verify through intranet access. Access the API interface through the intranet address and test to confirm that the prediction service can work properly. Set up logs and monitoring to promptly identify and resolve problems in operation to ensure the stability and reliability of the service.
[0126] (6) Security and optimization
[0127] Ensure that the deployed services are secure and reliable, and make necessary optimizations. First, configure network security measures, such as firewalls, to restrict access rights. Add authentication mechanisms to API interfaces to ensure that only authorized users can access them. Use encryption measures to protect sensitive information during data transmission and storage. Adjust resource configuration, optimize models and codes, and improve performance based on actual load conditions. Use CI / CD tools to automate deployment and updates and improve maintenance efficiency.
[0128] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for inverting atmospheric optical thickness, characterized in that: The steps include: S100, Model Building: Building the TECIS-CASNet model for spaceborne atmospheric lidar target segmentation; The construction of the TECIS-CASNet model includes the following steps: S110. Produce a data set based on the historical detection data of the land ecosystem carbon monitoring satellite: process the detection data of a certain detection area to obtain the total backscatter coefficient, color ratio, and depolarization ratio, normalize the total backscatter coefficient, color ratio, and depolarization ratio, and finally combine them to generate a three-channel image. The data set also includes the real label of the corresponding detection area; S120. Perform model training on the TECIS-CASNet model based on the prepared data set: increase the data diversity of the training data set by data enhancement, and then perform model training to ensure that the model performance meets expectations; S130, evaluating the model accuracy of the TECIS-CASNet model based on the prepared data set: inputting the test data set into the trained model to obtain the prediction results, and using the prediction results to calculate the evaluation indicators of the model, including precision, recall rate and F1 score; The following steps are used to calculate the evaluation indicators of the model using the prediction results: S131, obtaining a prediction result from the trained model, preparing a corresponding true label, comparing the prediction result with the true label to obtain a classified image, and the classified image classifies each pixel as background, cloud or aerosol; S132, expand the prediction results and the true labels, and convert the prediction results and the true labels into a one-dimensional array in order to calculate the evaluation index; S133, construct a confusion matrix, and use the confusion matrix to calculate various evaluation indicators; S200, select Fernald analysis method to invert aerosol characteristics: When using the Land Carbon Satellite LiDAR data for analysis, first identify the cloud or aerosol area from the LiDAR signal through the TECIS-CASNet model and obtain the basic data of clouds and aerosols in the cloud or aerosol area. Then, use Fernald analysis method to invert aerosol characteristics, calculate the backscattering coefficient and extinction coefficient, and integrate the extinction coefficient to finally obtain the optical thickness of the aerosol. S300, Model deployment: Package and deploy the TECIS-CASNet model, and transition the TECIS-CASNet model from the development environment to the production environment; The packaging and deployment of the TECIS-CASNet model includes the following steps: S310, model packaging: package the trained model to facilitate deployment and calling on the intranet server; S320, Build Docker image: Package the packaged application into a Docker image for easy porting and deployment; S330, Migrate to the intranet server: Migrate the Docker image to the intranet server and deploy and run it; S340, Intranet access and verification: Ensure that the services on the intranet server are running normally and verify through intranet access; S350, Security and Optimization: Ensure that deployed services are secure, reliable, and optimized.
2. The atmospheric optical thickness inversion method according to claim 1, characterized in that: The encoder part of the TECIS-CASNet model uses the Swin Transformer block to extract deep-level image features, while the decoder part of the TECIS-CASNet model uses the image features extracted by the Swin Transformer block to restore the image resolution and generate a high-precision segmentation map; the built-in skip connection of the TECIS-CASNet model ensures the effective fusion of image features between different levels.
3. A method for inverting atmospheric optical thickness according to claim 2, characterized in that: The Swin Transformer block includes: Layer normalization, by standardizing the input features so that the input features of each layer have zero mean and unit variance, thus speeding up the model training process and improving stability; Windowed multi-head self-attention, calculates self-attention in each local window, calculates the dot product of each query and key by linearly transforming the input features, and obtains the attention weight through the softmax function, and then weighted sums to get the final attention output; Multilayer Perceptron, which consists of two layers of fully connected networks, first performs a linear transformation on the input features and adds a bias, then performs a nonlinear transformation through an activation function, and then undergoes a second linear transformation and activation, and finally outputs the processed features; The shifted window multi-head self-attention first shifts the input features to offset the position of the window, and then applies the window multi-head self-attention mechanism in the offset window to capture cross-window dependencies and improve the ability to extract global features.
4. The atmospheric optical thickness inversion method according to claim 1, characterized in that: The obtained prediction results are morphologically processed, including the following steps: first, a structural element is selected; then, according to the characteristics of the prediction results, a morphological operation or a combination of multiple morphological operations is selected to process the prediction results, wherein the morphological operation includes expansion, erosion, opening operation, and closing operation.
5. The atmospheric optical thickness inversion method according to claim 1, characterized in that: The calculation formula of aerosol backscattering coefficient is: Where S p is the aerosol lidar ratio, and S p =α p (R) / β p (R), while S m =α m (R) / β m (R), α represents the extinction coefficient, β represents the backscattering coefficient, the subscripts m and p represent molecules and cloud-aerosol particles, respectively, P(R) is the signal strength received by the lidar at R, and R represents the target distance, that is, the specific distance that the lidar wants to measure, R c represents the selected reference position, r is the integral variable, used for the integral operation, representing the distance from the lidar transmitter to any point, and r′ is the integral internal variable, used to represent the distance of any point on the integral path; Based on the characteristics of the satellite-borne lidar system, the Fernald forward integration method is selected to invert the aerosol extinction coefficient: a p (R)=β p (R)×s p Finally, the extinction coefficient of aerosol particles in the aerosol layer is integrated to obtain the aerosol optical thickness AOD, which is expressed as follows: Where Z is the lidar detection height.
Citation Information
Patent Citations
Large-scale dynamic evolution dust type aerosol retrieval method
CN104268423A
Cloud-aerosol hierarchical classification method based on semantic segmentation
CN116543300A
Cloud and cloud shadow joint detection method based on physical characteristics and deep learning model
CN117058557A