Water quality grading method and device based on spaceborne multispectral remote sensing image

CN123016097APending Publication Date: 2026-10-30SHIFANG SATLINK (SUZHOU) AEROSPACE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611509998.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,上述地面处理模式存在数据下传量大、处理时效性差等问题,难以满足突发水环境污染事件的快速响应需求

Benefits of technology

[0019]上述基于星载多光谱遥感影像的水质分级方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,通过构建基于地表反射率与光谱指数的增强特征图,并结合采用线性计算复杂度的状态空间模型语义分割网络,在大幅降低计算资源消耗的同时实现了对星载遥感影像中水体全局空间上下文的高效捕获与精准提取,有效克服了传统Transformer 类模型计算量过大难以在星上部署的缺陷;通过融合微窗口邻域统计特征与多输出回归模型进行逐像素并行计算,实现了浑浊度与叶绿素a浓度的快速同步反演,避免了传统物理模型迭代求解耗时长的弊端,显著提升了星上实时处理效率;最终结合联合阈值矩阵直接生成水质分级结果,实现了从原始数据到水质等级的端到端星上自动化处理,极大地减少了星地链路的数据传输压力,为大范围水环境的实时动态监测提供了强有力的技术支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016097A_ABST
    Figure CN123016097A_ABST
Patent Text Reader

Abstract

The application relates to a water quality grading method and device based on a spaceborne multispectral remote sensing image. By constructing an enhanced feature map based on surface reflectivity and a spectral index and combining a semantic segmentation network, the global spatial context of water bodies in a spaceborne remote sensing image is efficiently captured and accurately extracted while greatly reducing the computing resources, and the defect that a traditional model has a large amount of calculation and is difficult to deploy on a satellite is effectively overcome. Through fusion of micro-window neighborhood statistical features and a multi-output regression model for pixel-by-pixel parallel calculation, rapid synchronous inversion of turbidity and chlorophyll-a concentration is realized, the disadvantage of long time consumption of traditional iterative solving is avoided, and the real-time processing efficiency on the satellite is significantly improved. By jointly using a threshold matrix to directly generate a water quality grading result, end-to-end automatic processing of the water quality grade from original data on the satellite is realized, the data transmission pressure of the satellite-ground link is greatly reduced, and strong technical support is provided for real-time dynamic monitoring of the water environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of spaceborne remote sensing processing technology, and in particular to a water quality classification method, apparatus, computer equipment, computer-readable storage medium, and computer program product based on spaceborne multispectral remote sensing images. Background Technology

[0002] Traditional water monitoring mainly relies on manual ground sampling and analysis. Although the accuracy at a single point is high, the spatial coverage is sparse and the temporal frequency is low, making it difficult to meet the dynamic monitoring needs at the watershed scale. With the rapid development of remote sensing technology, satellite remote sensing technology, with its ability to conduct large-scale synchronous observations, has become an important means of large-scale water environment monitoring.

[0003] The typical workflow for traditional remote sensing water quality monitoring is as follows: After satellites acquire images, the raw data is downloaded to ground stations. Ground servers then run index methods such as the Normalized Difference Water Index (NDWI) or the improved Normalized Difference Water Index (MNDWI), or extract water quality data using deep learning models such as Convolutional Neural Networks (CNN) and Transformers. Single water quality parameters such as turbidity are then retrieved based on empirical or semi-empirical regression models. Finally, a qualitative assessment of the water quality level is made manually using empirical thresholds. However, this ground-based processing method suffers from problems such as large data download volumes and poor processing timeliness, making it difficult to meet the rapid response requirements for sudden water pollution events.

[0004] In recent years, spaceborne artificial intelligence processing technology has gradually developed, but in-orbit solutions are still limited to target detection or qualitative identification of single parameters, failing to form an integrated in-orbit processing capability encompassing "precise water body segmentation—multi-parameter quantitative inversion—fine water quality classification." Specifically, when facing the needs of real-time water quality monitoring on space, traditional technologies face the following bottlenecks: First, methods based on water body indices have a high misclassification rate under interference from building shadows, mountain shadows, and eutrophic vegetation; CNNs have limited receptive fields and are prone to fragmentation in small rivers; while the Transformer self-attention mechanism can model global dependencies, its computational complexity increases quadratically with image size, making it difficult to adapt to spaceborne computing power constraints. Second, complex radiative transfer models cannot be run on-board for accurate atmospheric correction, and radiative domain shifts in multi-temporal images cause fixed regression models to fail to generalize. Third, traditional solutions often invert single water quality parameters, lacking a collaborative inversion mechanism for turbidity and chlorophyll a concentration, making it difficult to effectively distinguish between water bodies with high sediment content and organically polluted black and odorous water bodies, thus failing to meet the decision-making needs for refined management of drinking water sources. Fourth, the onboard memory and I / O bandwidth are extremely limited, and full-frame image traversal processing is prone to memory overflow. The lack of a targeted lightweight data stream engine and dynamic resource scheduling means that the reliability of processing is difficult to guarantee.

[0005] Therefore, under the conditions of strictly limited on-board computing resources, memory and downlink bandwidth, how to achieve the whole process of on-orbit integrated processing from multispectral images to water quality classification maps has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] Therefore, it is necessary to provide a water quality classification method, apparatus, computer equipment, computer-readable storage medium, and computer program product based on spaceborne multispectral remote sensing imagery to address the aforementioned technical problems.

[0007] In a first aspect, this application provides a water quality classification method based on spaceborne multispectral remote sensing imagery, the method comprising: Acquire raw data and imaging auxiliary data of single-scene multispectral remote sensing images; the multispectral band includes coastal aerosol band, blue band, green band, red band, near-infrared band and short-wave infrared band; Based on the imaging auxiliary data, the original data is preprocessed using a micro-window sliding method, and the surface reflectance under each band is calculated pixel by pixel and the spectral index is extracted. The surface reflectance and spectral index under each band are concatenated along the channel dimension to construct an enhanced feature map. Water bodies are extracted from the enhanced feature map based on a pre-trained semantic segmentation network based on a state-space model to obtain a water body mask. The semantic segmentation network captures the global spatial context with linear computational complexity. Based on the water body mask, the target spectral index and micro-window neighborhood statistical features of each water body pixel under each band are extracted, and the corresponding feature vector is obtained by feature fusion. The feature vector is input into a pre-trained multi-output regression model, and the water turbidity and chlorophyll a concentration are calculated in parallel pixel by pixel. Based on the preset joint threshold matrix of turbidity and chlorophyll a concentration, and the water quality level classification of each water body pixel by pixel based on the water turbidity and chlorophyll a concentration, the corresponding water quality classification results are obtained.

[0008] In one embodiment, the step of calculating the surface reflectance and extracting spectral indices pixel-by-pixel in each band includes: Based on the radiometric calibration coefficients in the imaging auxiliary data, the preprocessed image is radiometrically calibrated pixel by pixel and band by band to obtain the radiance of each pixel in each band. Based on the solar irradiance, solar altitude angle and Earth-Sun distance parameters in the imaging aid data, the radiance of each pixel in each band is converted into the corresponding apparent reflectance of the top of the atmosphere. Atmospheric state parameters of the imaging area are obtained from a pre-set global typical atmospheric conditions lookup table, and atmospheric correction parameter combinations are matched based on a simplified radiative transfer lookup table to convert the apparent reflectance of each pixel in each band into the corresponding initial surface reflectance. The initial surface reflectance of each pixel under each band is normalized by the bidirectional reflectance distribution function to obtain the corresponding normalized surface reflectance. The spectral index of each pixel is determined based on the normalized surface reflectance of each band.

[0009] In one embodiment, determining the spectral index of each pixel based on the normalized surface reflectance of each pixel in each band includes: , , , , , , in, , , , , , These represent the normalized surface reflectance under the coastal aerosol band, blue band, green band, red band, near-infrared band, and shortwave infrared band, respectively. Indicates the normalized difference index for water bodies. Indicates turbidity index. This represents the chlorophyll a index. Indicates the phytoplankton index, This represents the ratio of shortwave infrared to red. This represents the ratio of near-infrared to red. This indicates the center wavelength of the sensor in the near-infrared band. Indicates the center wavelength of the sensor in the red band, This indicates the center wavelength of the sensor in the shortwave infrared band.

[0010] In one embodiment, the pre-trained semantic segmentation network based on the state space model adopts an encoder-decoder architecture, wherein the encoder includes multiple downsampling stages, and each downsampling stage includes multiple stacked visual state space modules. The pre-trained semantic segmentation network based on a state-space model extracts water bodies from the enhanced feature map to obtain a water body mask, including: The visual state space module unfolds the input enhanced feature map into a one-dimensional sequence along multiple preset directions; One-dimensional sequences in each direction are fused after feature transformation through a one-dimensional selective state-space model to capture the global spatial context with linear complexity. The decoder fuses multi-scale features from the encoder via skip connections and gradually upsamples them to the original resolution to output a water body probability map. The water body probability map is subjected to threshold binarization to obtain the water body mask.

[0011] In one embodiment, based on the water mask, the step of extracting the target spectral index and micro-window neighborhood statistical features of each water pixel in each band, and obtaining the corresponding feature vector through feature fusion, includes: The water mask is scanned row by row using a spaceborne high-speed I / O engine, and continuous water pixel segments are encoded into triplet groups, which include row number, start column and end column; Based on the spatial coverage row and column range of the water body connectivity region located by the triplet, the data block corresponding to the water body connectivity region is read. Based on the data block, establish a mapping relationship between the spatial coordinates of water body pixels and the full-band surface reflectance and spectral index; Based on the mapping relationship, the target spectral index of each water body pixel is extracted, as well as the neighborhood statistical features of the micro-window centered on the water body pixel; the neighborhood statistical features include the mean, standard deviation, and median of the surface reflectance under each band within the micro-window of a preset size centered on the water body pixel. The feature vector of the water body pixel is obtained by concatenating the target spectral index and neighborhood statistical features of the water body pixel in each band.

[0012] In one embodiment, the multi-output regression model is implemented based on the XGBoost framework and includes multiple regression trees, each of which stores leaf node scores for the two targets of turbidity and chlorophyll a concentration. The step of inputting the feature vector into a pre-trained multi-output regression model and calculating water turbidity and chlorophyll a concentration pixel-by-pixel in parallel includes: The feature vector of each water pixel is input into a pre-trained multi-output regression model, and each regression tree is traversed. For the turbidity target and the chlorophyll a concentration target, the scores of the corresponding leaf nodes of each tree are accumulated to obtain the estimated turbidity value and the estimated chlorophyll a concentration value for each water pixel.

[0013] In one embodiment, the step of classifying water quality levels pixel by pixel based on a preset joint threshold matrix of turbidity and chlorophyll a concentration, and the turbidity and chlorophyll a concentration of each water pixel, to obtain the corresponding water quality classification result includes: Based on the water turbidity and chlorophyll a concentration of each water body pixel, and based on a preset joint threshold matrix of turbidity and chlorophyll a concentration, an upper limit threshold constraint mechanism is used to classify the water quality level of each water body pixel, and the classification result of each water body pixel is obtained. The isolated water pixels in the classification results are removed by a connected component analysis algorithm, and morphological processing is performed to smooth the boundaries of the connected components. Based on the smoothed connected components, a spatial distribution map of water quality levels for a single water body is generated, and the corresponding water quality classification results are obtained.

[0014] In one embodiment, the method further includes: The results of water body masking, turbidity distribution, chlorophyll a concentration distribution, and water quality classification are compressed and encoded, and then transmitted to the ground via a satellite-to-ground link.

[0015] Secondly, this application also provides a water quality classification device based on spaceborne multispectral remote sensing imagery, the device comprising: The data acquisition module is used to acquire raw data and imaging auxiliary data of single-scene multispectral remote sensing images; the multispectral band includes coastal aerosol band, blue band, green band, red band, near-infrared band and short-wave infrared band; The spectral feature extraction module is used to perform micro-window sliding preprocessing on the original data based on the imaging auxiliary data, calculate the surface reflectance of each band pixel by pixel and extract the spectral index; The water extraction module is used to stitch the surface reflectance and spectral index under each band along the channel dimension to construct an enhanced feature map. The enhanced feature map is then used to extract water bodies based on a pre-trained semantic segmentation network based on a state-space model to obtain a water body mask. The semantic segmentation network captures the global spatial context with linear computational complexity. The feature extraction and fusion module is used to extract the target spectral index and micro-window neighborhood statistical features of each water pixel under each band based on the water mask, and obtain the corresponding feature vector through feature fusion. The water quality parameter inversion module is used to input the feature vector into a pre-trained multi-output regression model and calculate the water turbidity and chlorophyll a concentration pixel by pixel in parallel. The water quality classification module is used to classify water quality into different levels pixel by pixel based on a preset joint threshold matrix of turbidity and chlorophyll a concentration, as well as the turbidity and chlorophyll a concentration of each water body pixel, and obtain the corresponding water quality classification results.

[0016] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in the first aspect.

[0017] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0018] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0019] The aforementioned water quality classification method, device, computer equipment, computer-readable storage medium, and computer program products based on spaceborne multispectral remote sensing imagery, by constructing an enhanced feature map based on surface reflectance and spectral index, and combining it with a semantic segmentation network using a state-space model with linear computational complexity, achieve efficient capture and accurate extraction of the global spatial context of water bodies in spaceborne remote sensing imagery while significantly reducing computational resource consumption. This effectively overcomes the shortcomings of traditional Transformer-type models, which have excessive computational load and are difficult to deploy on space. By fusing micro-window neighborhood statistical features with a multi-output regression model for pixel-by-pixel parallel computation, rapid synchronous inversion of turbidity and chlorophyll a concentration is achieved, avoiding the drawbacks of long iterative solutions in traditional physical models and significantly improving on-board real-time processing efficiency. Finally, by combining a joint threshold matrix to directly generate water quality classification results, end-to-end on-board automated processing from raw data to water quality levels is realized, greatly reducing the data transmission pressure of the space-to-ground link and providing strong technical support for real-time dynamic monitoring of large-scale water environments. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating a water quality classification method based on spaceborne multispectral remote sensing imagery in one embodiment. Figure 2 This is a flowchart illustrating the steps for extracting surface reflectance and spectral indices in one embodiment. Figure 3This is a structural block diagram of a water quality grading device based on spaceborne multispectral remote sensing imagery in one embodiment. Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0023] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0024] The water quality classification method based on spaceborne multispectral remote sensing imagery provided in this application can be applied to spaceborne processing devices (such as spaceborne computers) on satellite platforms. In objective application environments, spaceborne processing devices are limited by factors such as payload weight, power consumption, and the space radiation environment, resulting in severely constrained computing power, memory capacity, and satellite-to-ground downlink bandwidth. Compared to ground-based high-performance computing clusters, spaceborne processors typically employ radiation-hardened designs, have lower clock speeds, and limited parallel computing units; spaceborne memory is usually only a few hundred megabytes, and it must handle concurrent tasks such as attitude control and telemetry / remote control; satellite-to-ground link bandwidth is extremely valuable, typically supporting only megabits per second of effective data transmission. Therefore, achieving real-time inversion and classification of water quality parameters in a spaceborne environment requires extremely lightweight algorithm design and efficient memory access strategies to meet the stringent constraints of real-time onboard processing.

[0025] This application aims to precisely locate the distribution range of water bodies from multispectral remote sensing images mounted on a satellite platform, under conditions where onboard computing resources, memory capacity, and downlink bandwidth are strictly limited. This is achieved by analyzing the unique reflection and absorption radiation characteristics of water bodies in the visible to shortwave infrared spectral range, and then establishing a quantitative correlation between the spectral characteristics of water bodies and measured values ​​of water quality parameters through modeling. Finally, pixel-by-pixel data covering a large area of ​​the Earth's surface is generated, realizing a complete on-orbit integrated processing of surface rivers, lakes, and other water bodies, from raw multispectral images to five levels of water quality spatial distribution data.

[0026] In one exemplary embodiment, such as Figure 1 As shown, a water quality classification method based on spaceborne multispectral remote sensing imagery is provided, which may specifically include the following steps: Step 102: Obtain the raw data and imaging auxiliary data of a single scene multispectral remote sensing image.

[0027] The multispectral remote sensing images include at least six key bands: coastal aerosol band (CAB, with a typical wavelength range of approximately 400–450 nm), blue band (Blue, with a typical wavelength range of approximately 450–495 nm), green band (Green, with a typical wavelength range of approximately 495–570 nm), red band (Red, with a typical wavelength range of approximately 620–750 nm), near-infrared band (NIR, with a typical wavelength range of approximately 770–900 nm), and shortwave infrared band (SWIR, with a typical wavelength range of approximately 1550–1750 nm).

[0028] The imaging auxiliary data includes the full-band radiometric calibration gain coefficient and offset of the multispectral payload at the imaging time, sphericity constant, extra-atmospheric solar irradiance, Earth-Sun distance parameters, solar altitude angle, sensor observation angle, imaging timestamp, sensor geometric parameters, full-band DN value range, water spectral index value range, water turbidity value range, and chlorophyll a concentration value range. Optionally, the imaging auxiliary data may also include a lookup table of typical global atmospheric conditions and a simplified radiative transfer lookup table.

[0029] The Global Typical Atmospheric Conditions Lookup Table describes the physical state of the atmosphere itself, recording various typical atmospheric condition combinations that may occur globally (e.g., different geographical regions and seasons), including atmospheric state parameters such as different aerosol types, water vapor content, ozone concentration, and observation geometry. The Simplified Radiative Transfer Lookup Table records key physical quantities used to remove atmospheric interference under specific atmospheric conditions, primarily including atmospheric transmittance (T), path radiance, balloon albedo (S), and corresponding interpolation algorithms and other atmospheric correction parameters.

[0030] In this embodiment, the onboard processing device can acquire the raw data of single-scene multispectral remote sensing images collected by the sensor and the corresponding imaging auxiliary data through the onboard data bus, and perform water quality classification processing based on subsequent steps.

[0031] In one scenario, after acquiring the raw data, the onboard processing device can also perform integrity verification and format parsing on the raw data to ensure that the data of each band and the auxiliary data are strictly aligned on the spatiotemporal reference.

[0032] This embodiment simultaneously acquires raw multispectral remote sensing image data and high-precision imaging auxiliary data, laying a solid data foundation for subsequent elimination of sensor response differences and changes in external lighting conditions, and ensuring the data integrity and consistency of the on-board processing link.

[0033] Step 104: Based on the imaging auxiliary data, perform micro-window sliding preprocessing on the original data, calculate the surface reflectance of each band pixel by pixel and extract the spectral index.

[0034] Surface reflectance, after radiometric calibration and atmospheric correction to eliminate interference from external factors such as atmospheric scattering, absorption, and illumination angle, is a physical quantity that characterizes the true optical reflectance properties of a ground surface. As a physical benchmark for water quality parameter inversion, surface reflectance ensures the objectivity and consistency of on-board processing results under different spatiotemporal conditions.

[0035] Spectral indices, based on the aforementioned surface reflectance, utilize the differences in absorption and reflection of specific water components across different spectral bands, constructing characteristic parameters through mathematical operations (such as normalized differences and ratios). Spectral indices can effectively amplify the spectral response characteristics of target aquatic environmental parameters (such as turbidity, chlorophyll a concentration, and phytoplankton) while suppressing background noise interference, providing highly sensitive feature inputs for subsequent fine-grained water body segmentation and quantitative water quality inversion.

[0036] Preprocessing is the process of eliminating various distortions and noises in the raw data. In this embodiment, preprocessing converts digitally quantized values ​​(DN values) that lack physical meaning into spectral reflectance signals with physical meaning, thereby laying a reliable foundation for subsequent water body identification and water quality inversion.

[0037] For example, the micro-window can be a 3×3 sliding window. In this embodiment, micro-window sliding preprocessing of the original data based on imaging auxiliary data can specifically include: sliding the original image into a 3×3 micro-window. Within the read-in micro-window, based on the full-band DN value range (i.e., the effective range of full-band DN values) fixed by the local satellite multispectral payload hardware in the imaging auxiliary data, missing values, saturation values, and noise points are uniformly marked as bad points. If a pixel in the micro-window is marked as a bad point in all six bands, the KNN (K-Nearest Neighbor) algorithm is used to find the nearest neighbor in the single scene data, and the corresponding bad point is filled with the DN value of that neighbor; otherwise, the complementary relationship between the data in the spatial domain and the spectral domain is used to fill all bad points band by band. After preprocessing, all DN values ​​are controlled within a reasonable effective range, thereby avoiding the subsequent processing steps from using bad points as valid information in the calculation.

[0038] Due to the strict limitations of onboard computing resources, memory capacity, and downlink bandwidth, this embodiment utilizes micro-window sliding preprocessing to complete bad pixel detection and repair without loading the entire scene image at once, significantly reducing memory usage. Furthermore, its dual-filling strategy based on KNN and spectral band complementarity effectively recovers data lost due to detector noise or transmission errors, providing clean and reliable input data for subsequent radiometric correction.

[0039] In this embodiment, the onboard processing device performs micro-window sliding preprocessing on the raw data based on imaging auxiliary data, and then calculates the surface reflectance of each band and extracts the spectral index pixel by pixel.

[0040] For example, such as Figure 2 As shown, the surface reflectance is calculated pixel-by-pixel for each band and spectral indices are extracted. This can specifically include the following steps: Step 202: Based on the radiometric calibration coefficients in the imaging auxiliary data, perform pixel-by-pixel and band-by-band radiometric calibration on the preprocessed image to obtain the radiance of each pixel in each band.

[0041] The radiometric calibration coefficients include the corresponding radiometric calibration gain coefficients and offsets. Specifically, the on-board calibration gain coefficients and offset parameters at the current imaging time are read from the imaging auxiliary data. The DN values ​​of each band of the preprocessed image are substituted into the linear radiometric calibration formula of the satellite's multispectral payload, thereby calculating the radiance of each pixel in each band pixel by pixel and band by band.

[0042] Step 204: Based on the solar irradiance, solar altitude angle and Earth-Sun distance parameters in the imaging auxiliary data, convert the radiance of each pixel in each band into the corresponding apparent reflectance of the top of the atmosphere.

[0043] Specifically, the spheric constant, the ratio of Earth-Sun distance to mean Earth-Sun distance, solar irradiance outside the atmosphere across all bands, and solar altitude angle are read from the imaging auxiliary data. The radiance of each pixel in each band is substituted into the standard normalization formula of apparent reflectance, and the apparent reflectance of the top of the atmosphere of each pixel in each band is calculated pixel by pixel and band by band.

[0044] Step 206: Obtain the atmospheric state parameters of the imaging area from the preset global typical atmospheric conditions lookup table, and match the atmospheric correction parameter combination based on the simplified radiative transfer lookup table to convert the apparent reflectance of each pixel in each band into the corresponding initial surface reflectance.

[0045] Specifically, real-time atmospheric state parameters, such as aerosol type, water vapor content, ozone concentration, and observation geometry, are retrieved from a pre-stored lookup table of typical global atmospheric conditions. Then, based on the atmospheric state parameters, solar altitude angle, and sensor observation angle, the closest set of atmospheric correction parameters, such as atmospheric transmittance (T), path radiance, spherical albedo (S), and corresponding interpolation algorithms, is quickly matched from a pre-set simplified radiative transfer lookup table. The matched atmospheric correction parameter set is then substituted into a simplified atmospheric correction analytical formula, and basic arithmetic operations are used to complete band-by-band atmospheric correction processing within the micro-window, converting the apparent reflectance of the atmospheric top at each pixel in each band into the initial surface reflectance.

[0046] Step 208: Normalize the initial surface reflectance of each pixel under each band using the bidirectional reflectance distribution function to obtain the corresponding normalized surface reflectance.

[0047] Specifically, by normalizing the initial surface reflectance of each pixel in each band using the Bidirectional Reflectance Distribution Function (BRDF) on a pixel-by-pixel and band-by-band basis, the normalized surface reflectance of the 3×3 pixels within the micro-window in the six bands is obtained, denoted as follows: (Represents the normalized surface reflectance in the coastal aerosol band) (Represents the normalized surface reflectance in the blue band) (Represents the normalized surface reflectance in the green band) (Represents the normalized surface reflectance in the red band) (Represents the normalized surface reflectance in the near-infrared band) (This represents the normalized surface reflectance in the shortwave infrared band).

[0048] Step 210: Determine the spectral index of each pixel based on the normalized surface reflectance of each band.

[0049] Specifically, based on the normalized surface reflectance of each pixel in each band determined by the above steps, the spectral index of each pixel can be calculated using the corresponding formula. The spectral index includes the water boundary identification index, turbidity index, chlorophyll a index, phytoplankton index, shortwave infrared to red ratio, and near-infrared to red ratio.

[0050] For example, the formula for calculating the spectral index can be referred to as shown in equations (1) to (6) below, where: (1) (2) (3) (4) (5) (6) in, , , , , , These represent the normalized surface reflectance under the coastal aerosol band, blue band, green band, red band, near-infrared band, and shortwave infrared band, respectively. This represents the normalized differential water index, used for water body identification; It represents the turbidity index, which is highly correlated with the turbidity of water bodies; The chlorophyll a index is used to capture the characteristics of chlorophyll a absorption in the red band and reflection in the green band. This represents the phytoplankton index, used for phytoplankton identification; This represents the ratio of shortwave infrared to red. This represents the ratio of near-infrared to red. and Used to enhance the distinguishability of spectral shapes; This indicates the center wavelength of the sensor in the near-infrared band. Indicates the center wavelength of the sensor in the red band, This indicates the center wavelength of the sensor in the shortwave infrared band, typically measured in nanometers (nm). It should be noted that the center wavelength varies slightly between different sensors; the actual center wavelength value of the current sensor can be used for calculations.

[0051] This embodiment uses an on-board atmospheric correction strategy based on lookup tables and a simplified radiative transfer model to achieve accurate inversion of surface reflectance with extremely low computational overhead. The extraction of multi-dimensional spectral indices fully utilizes the unique reflection and absorption characteristics of water bodies in the visible to short-wave infrared range, providing highly discriminative feature inputs for subsequent high-precision water body extraction and water quality parameter inversion.

[0052] Step 106: Extract water bodies based on surface reflectance and spectral indices in each band to obtain a water body mask.

[0053] In this embodiment, the spaceborne processing device first constructs an enhanced feature map by stitching together the spectral index of each pixel within a micro-window and its surface reflectance in each band along the channel dimension. Then, based on a pre-trained semantic segmentation network using a state-space model, water bodies are extracted from the enhanced feature map to obtain a water body mask.

[0054] For example, the enhanced feature map is obtained by stitching together the above six spectral indices and their normalized surface reflectance in the above six bands for each pixel in the micro-window along the channel dimension, and it has 12 channels.

[0055] Pre-trained semantic segmentation networks based on state-space models (such as CSMamba) employ an encoder-decoder architecture, capturing global spatial context with linear computational complexity. The encoder consists of multiple downsampling stages, each comprising stacked visual state space (VSS) modules.

[0056] In this embodiment, the VSS module performs a 2D Selective Scan (SS2D) operation: the input enhanced feature map is unfolded into a one-dimensional sequence along multiple preset directions (e.g., top left to bottom right, bottom left to top right, bottom right to top left, and top right to bottom left). Each one-dimensional sequence is then fused using a one-dimensional selective state space model (SSM) to capture global spatial context information with linear complexity. This mechanism effectively solves the problems of limited receptive field in traditional convolutional neural networks and the unacceptable computational complexity of Transformer quadratic computation in a spaceborne environment. The decoder then fuses multi-scale features from the encoder through skip connections and progressively upsamples them to the original resolution, outputting a single-channel water probability map. The water probability map is then binarized with a threshold (e.g., a threshold of 0.05) to obtain a water mask within a micro-window (e.g., a 3×3 window).

[0057] Furthermore, after initially obtaining the water mask, the pixels in the water mask are filtered according to the preset effective range of the water spectral index. Pixels outside the range are uniformly set to "non-water" to avoid abnormal results in subsequent water quality inversion. By cyclically sliding the micro-window and merging the calculation results of all pixels, a water mask covering the entire imaging range of a single scene is finally obtained.

[0058] In this embodiment, since the input enhanced feature map is a 12-channel enhanced feature that integrates the original bands and spectral indices, the network can learn prior physical knowledge and accurately segment water body boundaries even in easily confused backgrounds such as building shadows and vegetation, especially maintaining connectivity for small river tributaries. Under the constraints of onboard computing power, the semantic segmentation network based on the state-space model balances global context modeling capabilities with linear inference efficiency, significantly improving the extraction accuracy of water body boundaries in complex backgrounds and the real-time performance of onboard processing.

[0059] In an exemplary embodiment, the construction process of the semantic segmentation network described above may include: collecting historical multispectral image samples and generating accurate water body label masks based on high-resolution optical images or field survey data. During training, multispectral image samples are input into the network, water body labels are used as supervision signals, and end-to-end training is performed using the cross-entropy loss function until the network converges. To meet the requirements of spaceborne deployment, the network is lightweighted after training, including optional methods such as weight quantization (e.g., FP32 to INT8), structured pruning, and knowledge distillation, so that the weight file size of the semantic segmentation network is controlled to approximately 430KB. Through rigorous sample construction and lightweight training strategies, it ensures that the model can maintain excellent inversion accuracy and inference efficiency even under extreme spaceborne constraints.

[0060] Step 108: Based on the water body mask, extract the target spectral index and micro-window neighborhood statistical features of each water body pixel in each band, and obtain the corresponding feature vector through feature fusion.

[0061] In this embodiment, based on the water mask obtained in the above steps, the target spectral index and micro-window neighborhood statistical features of each water pixel under each band are extracted, and the corresponding feature vector is obtained through feature fusion.

[0062] For example, a spaceborne high-speed I / O engine can be used to perform run-length encoding on the water mask, scanning row by row to encode continuous water pixel segments into triplets including row number, start column, and end column (i.e., run-length encoding). Based on this triplet, the spatial coverage row and column range of the water body connected region can be quickly located, and only the data block corresponding to the water body connected region is read instead of the entire scene image, thus avoiding invalid traversal of non-water areas (such as land and clouds). Subsequently, the spaceborne high-speed I / O engine establishes a mapping relationship between the spatial coordinates of water body pixels and the surface reflectance and spectral indices of the single scene full band based on the read data blocks. Based on this mapping relationship, for each water body pixel, six spectral indices (i.e., target spectral indices) of the pixel are extracted according to the pixel spatial coordinates to form a 6-dimensional index feature; at the same time, the mean, standard deviation, and median of the six bands of normalized surface reflectance within a preset-size micro-window (exemplarily 3×3) centered on the water body pixel are extracted as 18-dimensional neighborhood statistical features. Finally, the target spectral index (6-dimensional) is concatenated with the neighborhood statistical features (18-dimensional) to obtain a 24-dimensional feature vector.

[0063] This embodiment utilizes a spaceborne high-speed I / O engine combined with a run-length encoding triplet mechanism to reduce the amount of water body data read by more than 90% compared to full-scale traversal, significantly reducing memory bandwidth pressure and I / O latency. In the micro-window neighborhood statistical features, median operation naturally suppresses isolated salt-and-pepper noise, standard deviation captures local texture heterogeneity, and the mean provides smooth background information. The combination of these three significantly enhances the adaptability of water quality parameter inversion to local optical heterogeneity of water bodies. Subsequent inversion based on this 24-dimensional feature vector achieves robustness to sensor noise and atmospheric residual errors with extremely low computational cost, while ensuring reliable execution within the safe boundaries of spaceborne memory.

[0064] Step 110: Input the feature vector into the pre-trained multi-output regression model and calculate the water turbidity and chlorophyll a concentration pixel by pixel in parallel.

[0065] The multi-output regression model is implemented based on the XGBoost framework, which includes multiple regression trees. Each regression tree stores leaf node scores for the two targets of turbidity and chlorophyll a concentration.

[0066] In this embodiment, the 24-dimensional feature vector of each water pixel obtained by fusing the above steps is input into a pre-trained multi-output regression model to calculate the water turbidity and chlorophyll a concentration pixel by pixel in parallel. Specifically, the 24-dimensional feature vector of each water pixel is input into the module, and by traversing each regression tree, the scores of the turbidity nodes of each tree are accumulated for the turbidity target to obtain the water turbidity of the corresponding water pixel. For the target chlorophyll a concentration, the scores of the chlorophyll a concentration nodes of each tree leaf are accumulated to obtain the chlorophyll a concentration of the corresponding water pixel. Since turbidity characterizes suspended particulate matter and chlorophyll a indicates algal biomass, and both have a nonlinear mapping relationship with the red band, near-infrared band, and their ratios, a multi-output regression model can effectively capture this complex nonlinear characteristic.

[0067] In one scenario, the above inversion results (i.e., based on preset water turbidity ranges and water chlorophyll a concentration ranges) can also be adjusted. and The filter is used to uniformly set the attribute values ​​of pixels outside the range to non-water bodies to ensure the reliability of subsequent result analysis. Then, by iteratively merging the calculation results of all water body pixels, the turbidity distribution map and chlorophyll a concentration distribution map of a single water body are obtained.

[0068] This embodiment, based on the XGBoost framework, uses a multi-output regression model that involves only numerical comparison and accumulation operations during the inference phase, eliminating the need for large-scale matrix operations required by deep networks. This results in extremely low computational overhead, perfectly matching the characteristics of the arithmetic logic unit of the onboard processor. Simultaneously, the multi-output structure estimates both turbidity and chlorophyll a concentration, leveraging the physical correlation between the two parameters to improve inversion accuracy. This overcomes the technical limitation of traditional onboard solutions that can only invert a single parameter, further enhancing onboard processing efficiency.

[0069] In an exemplary embodiment, the construction process of the aforementioned multi-output regression model may include: extracting feature vectors from training samples based on a water mask, and matching the measured true values ​​of turbidity and chlorophyll a concentration at the corresponding locations (derived from simultaneous ground sampling or high-precision laboratory analysis). During training, using the measured true values ​​as labels, multi-objective joint training is performed based on the XGBoost framework, employing the mean squared error loss function, and determining the optimal hyperparameters and the number of trees through cross-validation until the model converges. Similarly, the trained multi-output regression model is deployed in a lightweight manner, with its weight file size controlled to approximately 1.4MB per objective and the inference file to approximately 30KB. Through rigorous sample construction and lightweight training strategies, it ensures that the model maintains excellent inversion accuracy and inference efficiency even under extreme spaceborne constraints.

[0070] Step 112: Classify the water quality level pixel by pixel based on the water turbidity and chlorophyll a concentration of each water body pixel to obtain the corresponding water quality classification results.

[0071] In this embodiment, water quality is classified pixel by pixel based on a preset joint threshold matrix of turbidity and chlorophyll a concentration, as well as the turbidity and chlorophyll a concentration of each water body pixel, to obtain the corresponding water quality classification result.

[0072] The water quality grades can specifically include five levels: clear, slightly turbid, moderately turbid, heavily turbid, and black and odorous water. The preset turbidity and chlorophyll a concentration joint threshold matrix is ​​shown in Table (1) below. Table (1) is as follows: For example, this embodiment uses an upper limit threshold constraint mechanism to classify water quality levels pixel by pixel. That is, if any parameter exceeds the upper limit of the corresponding level, the level is upgraded. Furthermore, when the turbidity NTU > 100, it is directly classified as Grade V black and odorous water, regardless of chlorophyll a concentration. This dual-parameter upper limit constraint mechanism fully considers the objective law that either high turbidity or high chlorophyll a concentration signifies water quality deterioration, significantly improving the accuracy of identifying black and odorous water bodies.

[0073] Then, noise removal processing is performed on the preliminary water quality classification results for each water body pixel. For example, connected component analysis algorithm is used to remove small, isolated water body pixels in the classification results, and morphological erosion and dilation processing is performed to smooth the boundary details of the water body area and avoid abrupt changes in the category of a single pixel. Finally, all pixels are merged to generate a spatial distribution map of the water quality level of a single water body to obtain the final water quality classification result.

[0074] This embodiment ensures the scientific rigor and precision of water quality classification through a two-dimensional joint threshold matrix of turbidity and chlorophyll a concentration, along with an upper threshold constraint mechanism, avoiding the limitation of a single turbidity threshold failing to identify algal blooms and black / odorous water. Connectivity analysis and morphological post-processing effectively eliminate salt-and-pepper noise and fragmentation misjudgments that may occur during on-board inversion, further improving the spatial continuity and boundary accuracy of the classification results, generating a spatially continuous, smooth-boundary water quality distribution map that can be directly used for operational decision-making.

[0075] The aforementioned water quality classification method based on spaceborne multispectral remote sensing imagery constructs an enhanced feature map based on surface reflectance and spectral index, and combines it with a semantic segmentation network using a state-space model with linear computational complexity. This significantly reduces computational resource consumption while achieving efficient capture and accurate extraction of the global spatial context of water bodies in spaceborne remote sensing imagery, effectively overcoming the drawback of traditional Transformer-type models being computationally too large to be deployed on satellite. By fusing micro-window neighborhood statistical features with a multi-output regression model for pixel-by-pixel parallel computation, rapid synchronous inversion of turbidity and chlorophyll a concentration is achieved, avoiding the time-consuming iterative solutions of traditional physical models and significantly improving on-board real-time processing efficiency. Finally, by combining a joint threshold matrix to directly generate water quality classification results, end-to-end on-board automated processing from raw data to water quality levels is realized, greatly reducing the data transmission pressure of the satellite-to-ground link and providing strong technical support for real-time dynamic monitoring of large-scale water environments.

[0076] In an exemplary embodiment, the spaceborne processing device can further compress and encode the water mask, turbidity distribution results, chlorophyll a concentration distribution results, and water quality classification results obtained from the above processing (e.g., LZ77 encoding). The compressed comprehensive water quality data, along with corresponding geographic location information and auxiliary information (e.g., full-band DN value range, spectral index value range, turbidity value range, and chlorophyll a concentration value range, used for filtering invalid pixels according to valid intervals during ground post-processing), is then encapsulated into a standard GeoTIFF format file and transmitted to the ground via a space-to-ground link. Upon receiving various spatial distribution maps, the ground receiver performs pixel-by-pixel geometric correction processing, converting the original coordinate system of the image into a CGCS2000 (three-dimensional geocentric geodetic coordinate system) projected coordinate system to ensure that the location data of subsequent ground-measured sampling points can be accurately matched with the geographic location benchmark of the image.

[0077] This embodiment uses efficient compression encoding and structured encapsulation to compress the amount of data transmitted by more than 98% compared to the original image, which greatly alleviates the bandwidth bottleneck of the satellite-to-ground link and realizes efficient satellite-to-ground transmission of high-value water quality information.

[0078] In one exemplary embodiment, the onboard processing device also includes a dynamic resource probe module. This dynamic resource probe is a lightweight daemon thread that monitors the CPU utilization, memory availability, and power consumption of the onboard processing device in real time.

[0079] When the resource probe detects that memory or CPU resources are approaching a preset warning threshold, it automatically sends a degradation command to the high-speed I / O engine and parallel inference module to reduce the batch processing scale of the I / O engine or reduce the number of parallel threads in M-XGBoost inversion, and switches to serial processing mode if necessary. Once resources recover to a safe range, it automatically reverts to high-parallel mode. This ensures that the entire on-board processing workflow can consistently operate stably within the memory safety boundary until mission completion, even when faced with arbitrarily complex images and hardware fluctuations in onboard processing equipment, without crashing due to single-point resource exhaustion, significantly improving the reliability of on-orbit missions.

[0080] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0081] Based on the same inventive concept, this application also provides an apparatus for implementing the method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations of one or more water quality classification apparatus embodiments based on spaceborne multispectral remote sensing images provided below can be found in the limitations of the method described above, and will not be repeated here.

[0082] In one exemplary embodiment, such as Figure 3 As shown, a water quality classification device based on spaceborne multispectral remote sensing imagery is provided, comprising: a data acquisition module 302, a spectral feature extraction module 304, a water body extraction module 306, a feature extraction and fusion module 308, a water quality parameter inversion module 310, and a water quality classification module 312, wherein: The data acquisition module 302 is used to acquire raw data and imaging auxiliary data of a single scene multispectral remote sensing image; the multispectral includes coastal aerosol band, blue band, green band, red band, near-infrared band and short-wave infrared band; The spectral feature extraction module 304 is used to perform micro-window sliding preprocessing on the original data based on the imaging auxiliary data, calculate the surface reflectance of each band pixel by pixel and extract the spectral index. The water extraction module 306 is used to stitch the surface reflectance and the spectral index under each band along the channel dimension to construct an enhanced feature map, and to extract water from the enhanced feature map based on a pre-trained semantic segmentation network based on a state space model to obtain a water mask; the semantic segmentation network captures the global spatial context with linear computational complexity. The feature extraction and fusion module 308 is used to extract the target spectral index and micro-window neighborhood statistical features of each water pixel under each band based on the water mask, and obtain the corresponding feature vector through feature fusion. The water quality parameter inversion module 310 is used to input the feature vector into a pre-trained multi-output regression model and calculate the water turbidity and chlorophyll a concentration pixel by pixel in parallel. The water quality classification module 312 is used to classify water quality levels pixel by pixel based on the preset joint threshold matrix of turbidity and chlorophyll a concentration, as well as the turbidity and chlorophyll a concentration of each water body pixel, and obtain the corresponding water quality classification results.

[0083] In one exemplary embodiment, the spectral feature extraction module is further configured to: Based on the radiometric calibration coefficients in the imaging auxiliary data, the preprocessed image is radiometrically calibrated pixel by pixel and band by band to obtain the radiance of each pixel in each band. Based on the solar irradiance, solar altitude angle and Earth-Sun distance parameters in the imaging aid data, the radiance of each pixel in each band is converted into the corresponding apparent reflectance of the top of the atmosphere. Atmospheric state parameters of the imaging area are obtained from a pre-set global typical atmospheric conditions lookup table, and atmospheric correction parameter combinations are matched based on a simplified radiative transfer lookup table to convert the apparent reflectance of each pixel in each band into the corresponding initial surface reflectance. The initial surface reflectance of each pixel under each band is normalized by the bidirectional reflectance distribution function to obtain the corresponding normalized surface reflectance. The spectral index of each pixel is determined based on the normalized surface reflectance of each band.

[0084] In an exemplary embodiment, determining the spectral index of each pixel based on the normalized surface reflectance for each band includes: , , , , , , in, , , , , , These represent the normalized surface reflectance under the coastal aerosol band, blue band, green band, red band, near-infrared band, and shortwave infrared band, respectively. Indicates the normalized difference index for water bodies. Indicates turbidity index. This represents the chlorophyll a index. Indicates the phytoplankton index, This represents the ratio of shortwave infrared to red. This represents the ratio of near-infrared to red. This indicates the center wavelength of the sensor in the near-infrared band. Indicates the center wavelength of the sensor in the red band, This indicates the center wavelength of the sensor in the shortwave infrared band.

[0085] In an exemplary embodiment, the pre-trained semantic segmentation network based on a state-space model employs an encoder-decoder architecture, wherein the encoder includes multiple downsampling stages, and each downsampling stage includes multiple stacked visual state-space modules; the water extraction module is further configured to: The visual state space module unfolds the input enhanced feature map into a one-dimensional sequence along multiple preset directions; One-dimensional sequences in each direction are fused after feature transformation through a one-dimensional selective state-space model to capture the global spatial context with linear complexity. The decoder fuses multi-scale features from the encoder via skip connections and gradually upsamples them to the original resolution to output a water body probability map. The water body probability map is subjected to threshold binarization to obtain the water body mask.

[0086] In an exemplary embodiment, the feature extraction and fusion module is further configured to: The water mask is scanned row by row using a spaceborne high-speed I / O engine, and continuous water pixel segments are encoded into triplet groups, which include row number, start column and end column; Based on the spatial coverage row and column range of the water body connectivity region located by the triplet, the data block corresponding to the water body connectivity region is read. Based on the data block, establish a mapping relationship between the spatial coordinates of water body pixels and the full-band surface reflectance and spectral index; Based on the mapping relationship, the target spectral index of each water body pixel is extracted, as well as the neighborhood statistical features of the micro-window centered on the water body pixel; the neighborhood statistical features include the mean, standard deviation, and median of the surface reflectance under each band within the micro-window of a preset size centered on the water body pixel. The feature vector of the water body pixel is obtained by concatenating the target spectral index and neighborhood statistical features of the water body pixel in each band.

[0087] In an exemplary embodiment, the multi-output regression model is implemented based on the XGBoost framework and includes multiple regression trees, each storing leaf node scores for both turbidity and chlorophyll a concentration; the water quality parameter inversion module is further used for: The feature vector of each water pixel is input into a pre-trained multi-output regression model, and each regression tree is traversed. For the turbidity target and the chlorophyll a concentration target, the scores of the corresponding leaf nodes of each tree are accumulated to obtain the estimated turbidity value and the estimated chlorophyll a concentration value for each water pixel.

[0088] In one exemplary embodiment, the water quality grading module is further configured to: Based on the water turbidity and chlorophyll a concentration of each water body pixel, and based on a preset joint threshold matrix of turbidity and chlorophyll a concentration, an upper limit threshold constraint mechanism is used to classify the water quality level of each water body pixel, and the classification result of each water body pixel is obtained. The isolated water pixels in the classification results are removed by a connected component analysis algorithm, and morphological processing is performed to smooth the boundaries of the connected components. Based on the smoothed connected components, a spatial distribution map of water quality levels for a single water body is generated, and the corresponding water quality classification results are obtained.

[0089] In one exemplary embodiment, the device further includes a data transmission module for compressing and encoding the water mask, turbidity distribution results, chlorophyll a concentration distribution results, and water quality classification results, and transmitting them to the ground via a satellite-to-ground link.

[0090] Each module in the aforementioned water quality grading device based on spaceborne multispectral remote sensing imagery can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.

[0091] In one exemplary embodiment, a computer device is provided, which may be an onboard processing device (e.g., an onboard computer) deployed on a satellite platform, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a water quality classification method based on spaceborne multispectral remote sensing imagery. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0092] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0093] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0094] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0095] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0096] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0097] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0098] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0099] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A water quality classification method based on spaceborne multispectral remote sensing imagery, characterized in that, The method includes: Acquire raw data and imaging auxiliary data of single-scene multispectral remote sensing images; the multispectral band includes coastal aerosol band, blue band, green band, red band, near-infrared band and short-wave infrared band; Based on the imaging auxiliary data, the original data is preprocessed using a micro-window sliding method, and the surface reflectance under each band is calculated pixel by pixel and the spectral index is extracted. The surface reflectance and spectral index under each band are concatenated along the channel dimension to construct an enhanced feature map. Water bodies are extracted from the enhanced feature map based on a pre-trained semantic segmentation network based on a state-space model to obtain a water body mask. The semantic segmentation network captures the global spatial context with linear computational complexity. Based on the water body mask, the target spectral index and micro-window neighborhood statistical features of each water body pixel under each band are extracted, and the corresponding feature vector is obtained by feature fusion. The feature vector is input into a pre-trained multi-output regression model, and the water turbidity and chlorophyll a concentration are calculated in parallel pixel by pixel. Based on the preset joint threshold matrix of turbidity and chlorophyll a concentration, and the water quality level classification of each water body pixel by pixel based on the water turbidity and chlorophyll a concentration, the corresponding water quality classification results are obtained.

2. The method according to claim 1, characterized in that, The step of calculating the surface reflectance and extracting spectral indices for each band pixel by pixel includes: Based on the radiometric calibration coefficients in the imaging auxiliary data, the preprocessed image is radiometrically calibrated pixel by pixel and band by band to obtain the radiance of each pixel in each band. Based on the solar irradiance, solar altitude angle and Earth-Sun distance parameters in the imaging aid data, the radiance of each pixel in each band is converted into the corresponding apparent reflectance of the top of the atmosphere. Atmospheric state parameters of the imaging area are obtained from a pre-set global typical atmospheric conditions lookup table, and atmospheric correction parameter combinations are matched based on a simplified radiative transfer lookup table to convert the apparent reflectance of each pixel in each band into the corresponding initial surface reflectance. The initial surface reflectance of each pixel under each band is normalized by the bidirectional reflectance distribution function to obtain the corresponding normalized surface reflectance. The spectral index of each pixel is determined based on the normalized surface reflectance of each band.

3. The method according to claim 2, characterized in that, The determination of the spectral index of each pixel based on the normalized surface reflectance in each band includes: , , , , , , in, , , , , , These represent the normalized surface reflectance under the coastal aerosol band, blue band, green band, red band, near-infrared band, and shortwave infrared band, respectively. Indicates the normalized difference index for water bodies. Indicates turbidity index. This represents the chlorophyll a index. Indicates the phytoplankton index, This represents the ratio of shortwave infrared to red. This represents the ratio of near-infrared to red. This indicates the center wavelength of the sensor in the near-infrared band. Indicates the center wavelength of the sensor in the red band, This indicates the center wavelength of the sensor in the shortwave infrared band.

4. The method according to claim 1, characterized in that, The pre-trained semantic segmentation network based on the state space model adopts an encoder-decoder architecture. The encoder includes multiple downsampling stages, and each downsampling stage includes multiple stacked visual state space modules. The pre-trained semantic segmentation network based on a state-space model extracts water bodies from the enhanced feature map to obtain a water body mask, including: The visual state space module unfolds the input enhanced feature map into a one-dimensional sequence along multiple preset directions; One-dimensional sequences in each direction are fused after feature transformation through a one-dimensional selective state-space model to capture the global spatial context with linear complexity. The decoder fuses multi-scale features from the encoder via skip connections and gradually upsamples them to the original resolution to output a water body probability map. The water body probability map is subjected to threshold binarization to obtain the water body mask.

5. The method according to claim 1, characterized in that, Based on the water body mask, for each water body pixel, the target spectral index and micro-window neighborhood statistical features of each corresponding water body pixel in each band are extracted, and the corresponding feature vector is obtained through feature fusion, including: The water mask is scanned row by row using a spaceborne high-speed I / O engine, and continuous water pixel segments are encoded into triplet groups, which include row number, start column and end column; Based on the spatial coverage row and column range of the water body connectivity region located by the triplet, the data block corresponding to the water body connectivity region is read. Based on the data block, establish a mapping relationship between the spatial coordinates of water body pixels and the full-band surface reflectance and spectral index; Based on the mapping relationship, the target spectral index of each water body pixel is extracted, as well as the neighborhood statistical features of the micro-window centered on the water body pixel; the neighborhood statistical features include the mean, standard deviation, and median of the surface reflectance under each band within the micro-window of a preset size centered on the water body pixel. The feature vector of the water body pixel is obtained by concatenating the target spectral index and neighborhood statistical features of the water body pixel in each band.

6. The method according to claim 1, characterized in that, The multi-output regression model is implemented based on the XGBoost framework and includes multiple regression trees. Each regression tree stores leaf node scores for the two targets of turbidity and chlorophyll a concentration. The step of inputting the feature vector into a pre-trained multi-output regression model and calculating water turbidity and chlorophyll a concentration pixel-by-pixel in parallel includes: The feature vector of each water pixel is input into a pre-trained multi-output regression model, and each regression tree is traversed. For the turbidity target and the chlorophyll a concentration target, the scores of the corresponding leaf nodes of each tree are accumulated to obtain the estimated turbidity value and the estimated chlorophyll a concentration value for each water pixel.

7. The method according to claim 1, characterized in that, The process involves classifying water quality levels pixel-by-pixel based on a preset joint threshold matrix of turbidity and chlorophyll a concentration, along with the turbidity and chlorophyll a concentration of each water body pixel, to obtain corresponding water quality grading results, including: Based on the water turbidity and chlorophyll a concentration of each water body pixel, and based on a preset joint threshold matrix of turbidity and chlorophyll a concentration, an upper limit threshold constraint mechanism is used to classify the water quality level of each water body pixel, and the classification result of each water body pixel is obtained. The isolated water pixels in the classification results are removed by a connected component analysis algorithm, and morphological processing is performed to smooth the boundaries of the connected components. Based on the smoothed connected components, a spatial distribution map of water quality levels for a single water body is generated, and the corresponding water quality classification results are obtained.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The results of water body masking, turbidity distribution, chlorophyll a concentration distribution, and water quality classification are compressed and encoded, and then transmitted to the ground via a satellite-to-ground link.

9. A water quality grading device based on spaceborne multispectral remote sensing imagery, characterized in that, The device includes: The data acquisition module is used to acquire raw data and imaging auxiliary data of single-scene multispectral remote sensing images; the multispectral band includes coastal aerosol band, blue band, green band, red band, near-infrared band and short-wave infrared band; The spectral feature extraction module is used to perform micro-window sliding preprocessing on the original data based on the imaging auxiliary data, calculate the surface reflectance of each band pixel by pixel and extract the spectral index; The water extraction module is used to stitch the surface reflectance and spectral index under each band along the channel dimension to construct an enhanced feature map. The enhanced feature map is then used to extract water bodies based on a pre-trained semantic segmentation network based on a state-space model to obtain a water body mask. The semantic segmentation network captures the global spatial context with linear computational complexity. The feature extraction and fusion module is used to extract the target spectral index and micro-window neighborhood statistical features of each water pixel under each band based on the water mask, and obtain the corresponding feature vector through feature fusion. The water quality parameter inversion module is used to input the feature vector into a pre-trained multi-output regression model and calculate the water turbidity and chlorophyll a concentration pixel by pixel in parallel. The water quality classification module is used to classify water quality into different levels pixel by pixel based on a preset joint threshold matrix of turbidity and chlorophyll a concentration, as well as the turbidity and chlorophyll a concentration of each water body pixel, and obtain the corresponding water quality classification results.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.