A hyperspectral satellite-oriented remote sensing image data adaptive parsing method

By dynamically identifying data format and Binning mode through an adaptive parsing method, and combining time-series splicing and asynchronous processing of multiple modules, the problems of format recognition and Binning mode adaptation in hyperspectral satellite data parsing are solved, thereby improving processing efficiency and the reliability of data interpretation.

CN122134536APending Publication Date: 2026-06-02HARBIN GONGDA SATELLITE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN GONGDA SATELLITE TECH CO LTD
Filing Date
2026-02-09
Publication Date
2026-06-02

Smart Images

  • Figure CN122134536A_ABST
    Figure CN122134536A_ABST
Patent Text Reader

Abstract

An adaptive parsing method for remote sensing image data from hyperspectral satellites is presented, belonging to the field of hyperspectral satellites. It addresses the shortcomings of existing technologies that cannot dynamically sense and adapt to different resolutions and stitching rules in different modes, leading to logical image reconstruction errors. The method includes: receiving remote sensing image data streams and assigning corresponding branches; parsing the coupling relationship between auxiliary data and image data, and determining the data format; for uncompressed visible light data, configuring image parameters and generating logical images using a temporal stitching model; for compressed visible light data, caching and batch writing in blocks, calculating the position in the cache area, and completing image block stitching; for infrared data, splitting single-line physical data into dual-focal-plane logical lines, synchronously parsing and independently outputting focal-plane images and auxiliary data; performing deduplication storage on auxiliary data; asynchronous parallel processing of multiple modules; and outputting multi-spectral TIFF image files and deduplicated auxiliary data. This method is applicable to the development and testing of hyperspectral satellites.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of hyperspectral satellite technology, and in particular relates to an adaptive parsing method for remote sensing image data of hyperspectral satellites. Background Technology

[0002] In the field of remote sensing satellite technology, especially in the development and testing of hyperspectral satellites, the ground data analysis system is a crucial link in verifying the performance of onboard payloads and the reliability of end-to-end data links. There are inherent differences in the data link between the ground testing phase and the on-orbit operation phase: during ground verification, data is typically sent directly to ground testing equipment via UDP protocol from the integrated electronic system; however, during on-orbit operation, data needs to be written to the onboard memory by the integrated electronic system and then transmitted to the ground station via the data transmission system. To fully verify the smoothness and data fidelity of the complete "single unit → integrated electronic system → memory → ground testing" link during the ground phase, a universal data analysis solution that is compatible with both ground testing and on-orbit mission scenarios is urgently needed.

[0003] Existing data interpretation methods are typically customized for specific scenarios or data formats, resulting in significant limitations. For example, some ground-based testing systems can only process uncompressed raw data streams directly downloaded from satellite, failing to effectively handle image data commonly found in on-orbit mode, which is organized for storage and compressed using standards such as JPEG2000. Conversely, ground station processing systems designed specifically for on-orbit data often struggle to adapt to the direct, non-persistent UDP data streams used in ground testing. This fragmented development model leads to redundant investment and makes it difficult to ensure consistency in data interpretation standards between the testing and on-orbit phases, creating potential risks for the quality verification of satellite data products.

[0004] Specifically, the shortcomings of existing technologies are mainly reflected in the following aspects: First, they lack adaptive recognition capabilities and cannot automatically determine the format (such as compressed and uncompressed) of the input data stream. This requires manual pre-configuration or the development of two independent logic sets, increasing operational complexity and the risk of errors. Second, when faced with multiple Binning modes (such as default and compatible modes) that may be dynamically activated in different spectral bands of hyperspectral satellites, existing technologies often use fixed image parameter configurations, failing to dynamically perceive and adapt to the resolution and stitching rules under different Binning modes, leading to logical image reconstruction errors. Furthermore, when processing non-row-aligned compressed data, traditional methods may rely on temporary files for decoding, resulting in huge I / O overhead and a lack of efficient pixel-level inverse correction and block-level cache reconstruction mechanisms, severely impacting processing efficiency and fidelity.

[0005] Furthermore, for data from multi-focal-plane detectors such as infrared detectors, current technologies struggle to achieve simultaneous analysis and independent output of dual focal planes, easily leading to data contamination. In auxiliary data processing, redundant storage is a common problem, failing to effectively deduplicat auxiliary data such as camera parameters and attitude information. Finally, existing system architectures are mostly serial processing, unable to fully utilize computing resources for asynchronous parallel analysis of data from multiple modules, resulting in low overall throughput efficiency and difficulty in meeting high-timeliness processing requirements. Summary of the Invention

[0006] In view of this, the present invention aims to propose an adaptive parsing method for remote sensing image data of hyperspectral satellites, in order to solve the problem that the existing technology uses fixed image parameter configurations, which cannot dynamically perceive and adapt to the resolution and stitching rules of different Binning modes, resulting in logical image reconstruction errors.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: an adaptive parsing method for remote sensing image data from hyperspectral satellites, the method comprising: Step S1: Receive the raw remote sensing image data stream transmitted from the satellite, and allocate the data to the corresponding processing branch according to the data type. The data types include visible light data, infrared data, night light data, and emergency data. Step S2: The automatic identification module parses the coupling relationship between auxiliary data and image data in the data stream, dynamically determines whether the data format is compressed or uncompressed, and enables the corresponding parsing logic; Step S3: For uncompressed visible light data, dynamically configure image parameters according to the Binning mode flag of each spectral band, and generate a logical image using a time-series stitching model. The stitching rules of the time-series stitching model are based on the mapping relationship between spectral band resolution and physical line transmission period, including skipping filling lines, merging multiple lines of physical data, or truncating effective pixel intervals. Step S4: For compressed visible light data, a block caching and batch writing mechanism is adopted to perform memory stream decoding, inverse correction operation and pixel cropping on the JPEG2000 compressed bitstream, and calculate the position in the buffer area based on the global sequence number of the compressed block to complete the image block stitching. Step S5: For infrared data, split the single-line physical data into dual-focal-plane logical lines, and simultaneously parse and independently output the images and auxiliary data of odd-numbered lines belonging to focal plane 1 and even-numbered lines belonging to focal plane 2. Step S6: Perform deduplication and storage on the auxiliary data, and output only the changed data by comparing the full content; Step S7: Asynchronous parallel processing of multiple modules, including: parsing multiple module data in parallel using independent threads; Step S8: Output multi-band TIFF image files and deduplicated auxiliary data.

[0008] Furthermore, a preferred method is proposed, wherein the dynamic determination of data format in step S2 includes: The coupling relationship between auxiliary data and image data was analyzed. In the uncompressed format, auxiliary data and image data are tightly intertwined, while in the compressed format, auxiliary information is separated into 128-line blocks. By calling the CCDManager::kjg_auto module, the features of the auxiliary data area are extracted, and the visible light uncompressed data processing path or the visible light compressed data processing path is automatically enabled.

[0009] Furthermore, a preferred method is proposed, wherein step S3 involves dynamically configuring image parameters based on the Binning mode flag bits of each spectral band, including: Scan the data stream to locate auxiliary data for each spectral band and analyze the Binning mode flags of spectral bands P and B1-B16. For uncompressed data, the logical image width is dynamically calculated based on the Binning mode and spectral resolution, and a libtiff-based strip streaming writing mechanism is adopted, resulting in dynamic growth of the image height. For compressed data, the size of the pre-allocated cv::Mat buffer for the spectral band is dynamically determined by the spectral band resolution and Binning mode. For example, the buffer size for the 5m spectral band is 6144×128 in the default Binning mode and 3072×64 in the compatible Binning mode.

[0010] Furthermore, a preferred method is proposed, wherein the timing stitching model in step S3 is based on the mapping relationship between spectral band resolution and physical line transmission period, and applies corresponding stitching rules according to the actual Binning mode. These stitching rules include: In the default Binning mode: 5m band: Each 8-line physical cycle contains 8 lines of valid data, which are spliced ​​together line by line; 10m band: In every 8 lines of physical cycles, two adjacent lines of physical data are merged into one line of logical image; 20m spectral band: In every 8 lines of physical cycles, two adjacent lines are merged into one line of logical image, and the other two lines are repeated data; 40m band: Only 1 line of valid data in every 8 physical cycles; Compatible with Binning mode: 5m band: In every 8 physical cycles, the first half of the pixels in odd-numbered rows are valid data, and even-numbered rows are filled; 10m band: In every 8-line physical cycle, the first and fifth lines are valid data; 20m band: Only 1 line of valid data in every 8 lines of physical cycles; 40m band: In every 8 lines of physical cycle, two adjacent lines are merged into 1 line of logical image.

[0011] Furthermore, a preferred embodiment is proposed, wherein the processing of the compressed visible light data in step S4 includes: Each 128-line image block is divided into 72 JPEG2000 compressed bitstream blocks; A cv::Mat buffer is pre-allocated for each spectral band, and its size is dynamically determined by the spectral band resolution and Binning mode. The compressed blocks are decoded directly from memory using the memory stream callback interface of the OpenJPEG library, avoiding temporary file I / O; Perform inverse correction on the decompressed pixels and crop the result to a 14-bit range [0, 0x3FFF]: pixel_final=decompressed_value-1638+block_mean Where pixel_final is the final pixel, decompressed_value is the decompressed pixel, and block_mean is the average pixel value of each compressed bitstream block; Based on the global index of the compressed block in the 72-block sequence, calculate its starting row and column coordinates in the cv::Mat buffer to complete the pixel copy; After 72 compressed blocks have been processed, 128 rows of image blocks are written to the TIFF file in batch.

[0012] Furthermore, a preferred embodiment is proposed, wherein step S5 includes: The single row of physical data is split into odd-numbered rows belonging to focal plane 1 and even-numbered rows belonging to focal plane 2; Establish independent image data streams and auxiliary data streams for odd-numbered rows to belong to focal plane 1 and even-numbered rows to belong to focal plane 2, respectively; Based on the resolution and timing rules of infrared spectral bands B17-B21, TIFF images, multi-band auxiliary data, and attitude information of odd-numbered rows belonging to focal plane 1 and even-numbered rows belonging to focal plane 2 are alternately parsed and output.

[0013] Furthermore, a preferred embodiment is proposed, wherein the auxiliary data deduplication and storage in step S6 includes: Maintain independent buffers for multi-spectral and attitude / orbit data respectively; Before each write operation, a full comparison of the contents of the new auxiliary data block is performed, and the data is only output to the corresponding data stream if the contents have changed.

[0014] Furthermore, a preferred embodiment is proposed, wherein the multi-module asynchronous parallel processing in step S7 includes: Identify multiple independent module files in the input path; Start an independent thread for each module and call the corresponding parsing function; Each thread performs image stitching and auxiliary data generation in parallel, and finally merges and outputs the results.

[0015] Based on the same inventive concept, the present invention also proposes a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes an adaptive parsing method for remote sensing image data of hyperspectral satellites according to any of the preceding claims.

[0016] Based on the same inventive concept, the present invention also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of an adaptive parsing method for remote sensing image data of hyperspectral satellites as described in any of the above-mentioned embodiments.

[0017] Compared with the prior art, the beneficial effects of the present invention are: Existing technologies require the development of separate parsing systems for two data links: ground testing (UDP direct transmission) and on-orbit missions (fixed storage downlink). This invention, through its core CCDManager unified architecture, can adaptively process data from different sources, fundamentally avoiding redundant development and ensuring the uniqueness and reliability of data interpretation logic throughout the entire process from ground verification to on-orbit application. This effectively reduces the risk of misjudgment caused by system differences. The proposed method automatically identifies data formats (compressed / uncompressed) without manual intervention, avoiding parsing failures due to configuration errors. Simultaneously, through a multi-module asynchronous parallel processing mechanism, the system can concurrently process data streams from multiple camera modules, achieving a linear increase in processing throughput and significantly shortening the processing cycle of massive amounts of remote sensing data.

[0018] This invention can dynamically sense and adapt to diverse binning operating modes on satellite, and perform image stitching based on precise packet timing rules. This establishes a correct mapping between spectral resolution, physical line transmission period, and logical image lines, accurately generating standard images that meet expectations. This overcomes the image misalignment and distortion problems caused by fixed or unknown binning modes in existing technologies. For compressed data, memory stream decoding technology is used, avoiding the huge I / O overhead of creating temporary files and improving decoding speed. This method also introduces a deduplication storage mechanism for all auxiliary data (such as attitude and orbit information), performing write operations only when the content changes, greatly reducing redundant data, saving storage space, and alleviating the bandwidth pressure of subsequent data distribution.

[0019] This invention is applicable to link verification during the ground testing phase and ground data processing for on-orbit missions. Attached Figure Description

[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 The flowchart is a method for adaptive parsing of remote sensing image data for hyperspectral satellites according to the present invention. Figure 2 This is a flowchart of the visible light pressure default Binning mode image data processing described in this invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other, and the described embodiments are only some embodiments of the present invention, not all embodiments.

[0022] Implementation Method 1, see [link] Figure 1 This implementation method is described below. Addressing the problem that existing technologies use fixed image parameter configurations, which cannot dynamically perceive and adapt to different resolutions and stitching rules under different binding modes, leading to logical image reconstruction errors, an adaptive parsing method for hyperspectral satellite remote sensing image data is proposed. The method includes: Step S1: Receive the raw remote sensing image data stream transmitted from the satellite, and allocate the data to the corresponding processing branch according to the data type. The data types include visible light data, infrared data, night light data, and emergency data. Step S2: The automatic identification module parses the coupling relationship between auxiliary data and image data in the data stream, dynamically determines whether the data format is compressed or uncompressed, and enables the corresponding parsing logic; The dynamic discrimination data format in step S2 of this embodiment includes: The coupling relationship between auxiliary data and image data was analyzed. In the uncompressed format, auxiliary data and image data are tightly intertwined, while in the compressed format, auxiliary information is separated into 128-line blocks. By calling the CCDManager::kjg_auto module, the features of the auxiliary data area are extracted, and the visible light uncompressed data processing path or the visible light compressed data processing path is automatically enabled. Step S3: For uncompressed visible light data, dynamically configure image parameters according to the Binning mode flag of each spectral band, and generate a logical image using a time-series stitching model. The stitching rules of the time-series stitching model are based on the mapping relationship between spectral band resolution and physical line transmission period, including skipping filling lines, merging multiple lines of physical data, or truncating effective pixel intervals. In this implementation method, step S3 dynamically configures image parameters based on the Binning mode flag bits of each spectral band, including: Scan the data stream to locate auxiliary data for each spectral band and analyze the Binning mode flags of spectral bands P and B1-B16. For uncompressed data, the logical image width is dynamically calculated based on the Binning mode and spectral resolution, and a libtiff-based strip streaming writing mechanism is adopted, resulting in dynamic growth of the image height. For compressed data, the size of the cv::Mat buffer for the pre-allocated spectral band is dynamically determined by the spectral band resolution and Binning mode. For example, the buffer size for the 5m spectral band is 6144×128 in the default Binning mode and 3072×64 in the compatible Binning mode. In step S3 of this implementation method, the timing stitching model is based on the mapping relationship between spectral band resolution and physical line transmission period, and applies corresponding stitching rules according to the actual Binning mode. The stitching rules include: In the default Binning mode: 5m band: Each 8-line physical cycle contains 8 lines of valid data, which are spliced ​​together line by line; 10m band: In every 8 lines of physical cycles, two adjacent lines of physical data are merged into one line of logical image; 20m spectral band: In every 8 lines of physical cycles, two adjacent lines are merged into one line of logical image, and the other two lines are repeated data; 40m band: Only 1 line of valid data in every 8 physical cycles; Compatible with Binning mode: 5m band: In every 8 physical cycles, the first half of the pixels in odd-numbered rows are valid data, and even-numbered rows are filled; 10m band: In every 8-line physical cycle, the first and fifth lines are valid data; 20m band: Only 1 line of valid data in every 8 lines of physical cycles; 40m spectral band: In every 8 lines of physical cycle, two adjacent lines are merged into 1 line of logical image; Step S4: For compressed visible light data, a block caching and batch writing mechanism is adopted to perform memory stream decoding, inverse correction operation and pixel cropping on the JPEG2000 compressed bitstream, and calculate the position in the buffer area based on the global sequence number of the compressed block to complete the image block stitching. The processing of compressed visible light data in step S4 of this embodiment includes: Each 128-line image block is divided into 72 JPEG2000 compressed bitstream blocks; A cv::Mat buffer is pre-allocated for each spectral band, and its size is dynamically determined by the spectral band resolution and Binning mode. The compressed blocks are decoded directly from memory using the memory stream callback interface of the OpenJPEG library, avoiding temporary file I / O; Perform inverse correction on the decompressed pixels and crop the result to a 14-bit range [0, 0x3FFF]: pixel_final=decompressed_value-1638+block_mean Where pixel_final is the final pixel, decompressed_value is the decompressed pixel, and block_mean is the average pixel value of each compressed bitstream block; Based on the global index of the compressed block in the 72-block sequence, calculate its starting row and column coordinates in the cv::Mat buffer to complete the pixel copy; After 72 compressed blocks have been processed, 128 rows of image blocks are written to the TIFF file in batch. Step S5: For infrared data, split the single-line physical data into dual-focal-plane logical lines, and simultaneously parse and independently output the images and auxiliary data of odd-numbered lines belonging to focal plane 1 and even-numbered lines belonging to focal plane 2. In this embodiment, step S5 includes: The single row of physical data is split into odd-numbered rows belonging to focal plane 1 and even-numbered rows belonging to focal plane 2; Establish independent image data streams and auxiliary data streams for odd-numbered rows to belong to focal plane 1 and even-numbered rows to belong to focal plane 2, respectively; Based on the resolution and timing rules of infrared spectral bands B17-B21, TIFF images, multi-band auxiliary data, and attitude information of odd-numbered rows belonging to focal plane 1 and even-numbered rows belonging to focal plane 2 are alternately parsed and output. Step S6: Perform deduplication and storage on the auxiliary data, and output only the changed data by comparing the full content; In this embodiment, step S6, which involves performing deduplication and storage of auxiliary data, includes: Maintain independent buffers for multi-spectral and attitude / orbit data respectively; Before each write operation, a full content comparison is performed on the new auxiliary data block, and output is only sent to the corresponding data stream if the content changes. Step S7: Asynchronous parallel processing of multiple modules, including: parsing multiple module data in parallel using independent threads; The asynchronous parallel processing of multiple modules in step S7 of this implementation method includes: Identify multiple independent module files in the input path; Start an independent thread for each module and call the corresponding parsing function; Each thread executes image stitching and auxiliary data generation in parallel, and finally merges and outputs the results. Step S8: Output multi-band TIFF image files and deduplicated auxiliary data.

[0023] Existing technologies typically rely on manual configuration or external information such as file extensions to determine data format. The method proposed in this implementation delves into the data stream, using the essential characteristic of the coupling relationship between auxiliary data and image data (e.g., row-level interleaving in uncompressed data, and separation by 128-line blocks in compressed data) as the criterion to trigger the parsing logic that characterizes the data's internal structure. This achieves format self-recognition without prior knowledge, which is the primary foundation for automating the processing flow.

[0024] Existing stitching models are typically static and fixed. The method proposed in this implementation uses the Binning mode as the core parameter driving the entire analysis process. During the initialization phase, the system extracts the Binning flags for each spectral band from the auxiliary data and dynamically calculates the logical image size, pre-allocates buffers, or configures streaming write parameters accordingly. More importantly, it establishes an intelligent stitching model bound to the Binning mode. For different resolution spectral bands under specific timings in default and compatible modes, it programmatically executes operations such as skipping, merging, and truncating, achieving accurate software reconstruction of the complex on-board imaging logic.

[0025] Due to the non-row alignment characteristic of JPEG2000 compressed data (each 128-line image block is divided into 72 compressed bitstream blocks), existing techniques struggle to accurately restore decompressed pixels to their correct positions within the entire image. This implementation proposes a block-level coordinate mapping method: a buffer is pre-allocated for each spectral band, and based on the global index of each decoded block in the 72-block sequence, combined with the spectral band resolution and Binning mode, its starting row and column coordinates within the buffer are precisely calculated. This principle ensures that decompressed pixels are accurately placed, and combined with inverse correction operations, high-fidelity image reconstruction is achieved, avoiding block artifacts or positional misalignment.

[0026] This implementation achieves inherent separation and synchronous processing of data streams for special structures such as infrared data (where a single line of physical data contains information about two focal planes). The single line of physical data is split into two logical lines, and completely independent image and auxiliary data streams are established for each of the two focal planes. This allows the analysis of the two focal planes to proceed synchronously, while the output results are independent of each other, ensuring processing efficiency while meeting the stringent requirements of independence and synchronization for multi-focal plane data.

[0027] Implementation Method 2, see below Figure 2 This embodiment describes a complete implementation process for the adaptive parsing method for hyperspectral satellite remote sensing image data described in Embodiment 1, including: The system receives raw remote sensing image data streams transmitted from satellites and allocates the data to corresponding processing branches according to the data type, which includes visible light data, infrared data, night light data, and emergency data. In this embodiment, visible light data is further subdivided into two categories: uncompressed data and uncompressed data. They enter different processing paths but share a unified entry identification mechanism. The automatic identification module analyzes the coupling relationship between auxiliary data and image data in the data stream, dynamically determines whether the data format is compressed or uncompressed, and activates the corresponding parsing logic. Specifically, the CCDManager::kjg_auto module is called to automatically determine the data format type of the current module by analyzing the coupling relationship between auxiliary data and image data (such as the two being tightly intertwined in uncompressed data, and auxiliary information being separated into 128-line blocks in compressed data).

[0028] In this embodiment, the raw remote sensing data stream is received. By detecting auxiliary data characteristics (uncompressed data where auxiliary data in each spectral band is highly coupled with image data; compressed data where 128-line blocks of auxiliary data are separated from image data), the system automatically determines whether the data is in compressed or uncompressed format and activates the corresponding parsing logic. The output includes TIFF images in 17 spectral bands, including P-band and B1–B16, auxiliary data for each spectral band, camera auxiliary data, and deduplicated attitude and trajectory auxiliary data.

[0029] In this embodiment, during the initial parsing stage, regardless of whether the visible light data is uncompressed or compressed, the auxiliary data for each spectral band is first located by scanning the data stream, and the Binning mode flags of each spectral band are extracted and parsed. Different processing logics are applied based on different data formats. For visible light compressed data, streaming writing is used. The width of the image for each spectral band is dynamically calculated based on the Binning mode and resolution, and data is processed line by line and spectral band by spectral band. The image height uses a dynamic growth strategy (based on libtiff's strip writing mechanism), eliminating the need for pre-allocation of the entire image memory. For visible light compressed data, block-level caching and batch writing are used based on the data characteristics of the compressed bitstream blocks. The cv::Mat buffer size for each spectral band is pre-allocated based on the Binning mode and resolution, and data is processed block by block and spectral band by spectral band. Line-by-line scanning is initiated after 72 compressed bitstream blocks (128 image blocks) have been processed.

[0030] For uncompressed visible light data, image parameters are dynamically configured according to the Binning mode flag of each spectral band, and a logical image is generated using a temporal stitching model. The stitching rules of the temporal stitching model are based on the mapping relationship between spectral band resolution and physical line transmission period, including skipping filling lines, merging multiple lines of physical data, or truncating effective pixel intervals. Specifically, the `kjg_uncompress` module is called to scan the auxiliary data area, extract the Binning mode flags of each spectral band (P, B1–B16), dynamically calculate the logical image width based on the spectral band resolution and Binning mode, and establish a libtiff-based strip streaming write channel. According to the preset physical row transmission cycle rules (e.g., under the default Binning mode for a 10m spectral band, every two lines of physical data are merged into one line of logical image), skip, merge, or truncate operations are performed. The image height adopts a dynamic growth strategy, without the need to pre-allocate the entire image memory. The auxiliary data is fully compared before writing, and is only output when changes occur, thus achieving deduplication storage.

[0031] In this embodiment, the timing stitching model is based on the mapping relationship between spectral band resolution and physical line transmission period, and applies corresponding stitching rules according to the actual Binning mode. The stitching rules include: In the default Binning mode: 5m band: Each 8-line physical cycle contains 8 lines of valid data, which are spliced ​​together line by line; 10m band: In every 8 lines of physical cycles, two adjacent lines of physical data are merged into one line of logical image; 20m spectral band: In every 8 lines of physical cycles, two adjacent lines are merged into one line of logical image, and the other two lines are repeated data; 40m band: Only 1 line of valid data in every 8 physical cycles; Compatible with Binning mode: 5m band: In every 8 physical cycles, the first half of the pixels in odd-numbered rows are valid data, and even-numbered rows are filled; 10m band: In every 8-line physical cycle, the first and fifth lines are valid data; 20m band: Only 1 line of valid data in every 8 lines of physical cycles; 40m band: In every 8 lines of physical cycle, two adjacent lines are merged into one line of logical image, and two other lines are repeated data.

[0032] Based on the identified Binning patterns of each spectral band, corresponding operations such as skipping fill rows, merging multiple rows of physical data, and truncating effective pixel intervals are used to generate the correct logical image rows.

[0033] For compressed visible light data, a block caching and batch writing mechanism is employed to perform memory stream decoding, inverse correction operations, and pixel cropping on the JPEG2000 compressed bitstream. The position of each compressed block in the buffer is calculated based on its global index to complete image block stitching, including: The `kjg_compress` module is called to extract the Binning mode. Based on the spectral resolution and Binning mode, a `cv::Mat` buffer is pre-allocated for different spectral bands. Utilizing the OpenJPEG library's memory stream callback interface, JPEG2000 compressed blocks are directly decoded from memory, avoiding temporary file I / O. Inverse correction operations are performed on each decompressed pixel, and it is cropped to a 14-bit valid range [0, 0x3FFF]. Based on the global index of the compressed block in the 72-block sequence, its starting row and column coordinates in the `cv::mat` buffer are precisely calculated, completing the pixel copy. Once all 72 compressed blocks are decompressed and stitched together to form a 128-line image block, batch writing is initiated, writing the block line by line to the corresponding spectral band's TIFF file. Auxiliary data is also output using a deduplication mechanism.

[0034] Furthermore, the visible light compressed data (JPEG2000 format) employs a block caching and batch writing strategy, specifically: The storage divides the entire image into 128 rows of image blocks, and the compression standard divides each 128 rows of image blocks into 72 compressed bitstream blocks for download. Each compressed block, after decompression, contains only a local subgraph within that 128-line region; A cv::Mat buffer is pre-allocated for each spectral band, and its size is dynamically determined by the spectral band resolution and Binning mode. For example, the 5m spectral band is 6144×128 in the default Binning mode and 3072×64 in the compatible Binning mode. After each bitstream block is decompressed, its starting row and column coordinates in the buffer are accurately calculated based on its global sequence number and spectral resolution in the 72-block sequence, and the inversely corrected pixel data is copied to the corresponding position. In particular, the position calculation logic of each bitstream block in cv::Mat needs to be re-evaluated according to the spectral band Binning mode to ensure that the pixel data is correctly placed in the appropriate position in the buffer. Only after all 72 compressed blocks have been decompressed and a complete 128-line image block stitching has been completed, will line-by-line scanning be started to write the 128 lines of data into the corresponding TIFF file in batches; This process is repeated until the entire image has been processed.

[0035] Both of the above paths support asynchronous processing of multiple modules: the main control logic identifies multiple module files in the input path, starts an independent thread for each module to call the corresponding parsing function, and basically achieves a linear improvement in throughput.

[0036] This implementation also includes memory stream decoding and inverse correction reconstruction of the compressed block: A memory stream abstraction layer is constructed to directly decode JPEG2000 compressed blocks from memory through the callback interfaces (read / skip / seek) of the OpenJPEG library, avoiding temporary file I / O overhead; Perform inverse correction operation on each decompressed pixel: pixel_final=decompressed_value-1638+block_mean The result is cropped to the 14-bit quantization range [0, 0x3FFF].

[0037] For infrared data, a single line of physical data is split into dual-focal-plane logical lines, and the images and auxiliary data belonging to focal plane 1 for odd-numbered lines and focal plane 2 for even-numbered lines are parsed and output independently. Specifically, the infrared data is processed by the CCDManager::hw module, which is unique in that a single line of physical data contains two focal plane auxiliary and image data. The hw module is asynchronously called based on the number of infrared modules. During parsing, each line of physical data is split into two logical lines: odd-numbered lines belong to focal plane 1, and even-numbered lines belong to focal plane 2. Independent image data streams and auxiliary data streams are established for each focal plane. Image stitching and writing are performed separately according to the resolution and packet timing rules of the infrared spectral bands (B17–B21), outputting completely independent data while satisfying synchronous parsing. This includes their respective TIFF images, multi-spectral auxiliary data, camera and attitude information.

[0038] Nighttime light data is processed by the CCDManager::yg module, which mainly outputs P-band images and auxiliary data. The processing logic is the same as that of the uncompressed visible light path, but the spectral band set is simplified. Emergency data is processed by the CCDManager::yj module, which outputs five key spectral bands: P, B1, B2, B4, and B6. It also follows the general splicing and timing rules.

[0039] Both types of data support parallel parsing of multiple modules and deduplication of auxiliary data, ensuring high efficiency and low redundancy even in special task scenarios.

[0040] The auxiliary data is deduplicated and stored, and only the changed data is output after a full content comparison, including: Each data format maintains an independent auxiliary data buffer for multi-spectral segments and attitude orbits during parsing; Before each write operation, perform a full comparison of the contents of the new auxiliary data block; Data is written to the corresponding output stream only when the content changes, effectively avoiding redundant storage.

[0041] Asynchronous parallel processing of multiple modules includes: parsing data from multiple modules in parallel using independent threads; Specifically, the main control logic identifies multiple independent module files in the input data path; asynchronously calls the parsing function for each module to start multi-threaded parallel processing; each thread independently completes the generation of image and auxiliary data, and finally merges them into a complete output.

[0042] Output multi-band TIFF image files and deduplicated auxiliary data, including: The final output includes multi-band TIFF image files and deduplicated auxiliary data, covering all valid spectral bands such as P, B1–B21, as well as camera and deduplicated attitude and trajectory auxiliary data. The output results of the infrared dual focal plane are independent.

[0043] Implementation Method 3: This implementation method provides a specific application example of the adaptive parsing method for hyperspectral satellite remote sensing image data described in Implementation Method 2, including: The method proposed in this embodiment is applied to the whole-satellite testing phase of a certain type of hyperspectral remote sensing satellite (referred to as DX for security reasons) to verify whether the data link from the hyperspectral camera → integrated electronic system (ICS) → onboard storage → ground testing equipment is smooth and whether the data content is correct. The specific process is as follows: 1. System Deployment Environment The parsing method described in this invention can be run on any device (front-end based on QML, back-end developed in C++, dependent on OpenJPEG 2.4.0, libtiff 4.5.0, and OpenCV 4.8.0), and the complete environment dependencies have been packaged. Prepare the raw telemetry data to be verified. The data includes various imaging data formats depending on the imaging mission: visible light is divided into compressed and uncompressed data, containing 17 spectral bands (P, B1–B16), with JPEG2000 as the compression standard. In addition, there is infrared multi-focal plane data, as well as emergency imaging and night vision imaging data. Depending on the imaging mission requirements, different spectral bands may operate in different binning modes (e.g., the 5m band is not binning by default, but must be compatible with 2×2 binning).

[0044] 2. Processing Flow Execution The system receives raw data streams from multiple modules of various categories and enters different processing branches according to the category. Taking visible light as an example: the CCDManager::kjg_auto module is called to automatically determine whether the data is in compressed format by analyzing the coupling relationship between auxiliary data and image data (the two are tightly intertwined in uncompressed data, while auxiliary information is separated into 128-line blocks in compressed data).

[0045] For compressed spectral bands, the `kjg_compress` process is initiated. It utilizes multi-threading based on the number of modules, parses the Binning flag for each spectral band from auxiliary data to determine whether it's in default Binning or compatible Binning mode, and configures the output image width and 128-line block data buffer size for each spectral band based on its original resolution. Taking the P-band with a resolution of 5m as an example, the pre-allocated cv::Mat buffer sizes in default Binning mode (no Binning) and compatible Binning mode (2×2 Binning) are 6144×128 and 3072×64, respectively.

[0046] The 128 lines of data are divided into 72 stream blocks, which are then decoded sequentially according to the JPEG2000 standard. Each block is decompressed to obtain a 768×128 image block. Based on its sequence number (0-71), its position in its respective spectral buffer is calculated, and then inverse correction is performed: pixel = decompressed_val - 1638 + block_mean, and the result is cropped to the 14-bit quantization range [0, 0x3FFF]. After the 72nd block is processed, the 128 lines of data are written line by line from the spectral buffer to the output stream of their respective spectral bands. The image is written using a streaming strip method, dynamically increasing the image height. All auxiliary data is fully compared before writing, and is only output to the auxiliary data file when there are changes.

[0047] 3. Verification of Results The obtained camera, attitude, and auxiliary data for each spectral band were further analyzed and found to be consistent with the telemetry data. The generated TIFF images were visually inspected and found to be consistent with the camera's self-calibration images. Successfully located a camera parameter configuration error: In a certain test, the B21 band pixel of the infrared dual focal plane image was 3FFF.

[0048] Implementation Method 4: This implementation method proposes a computer device, including a memory and a processor. The memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes an adaptive parsing method for remote sensing image data of hyperspectral satellites according to any one of Implementation Methods 1 to 2.

[0049] Implementation Method 5: A computer-readable storage medium according to this implementation method stores a computer program, which, when executed by a processor, performs the steps of an adaptive parsing method for remote sensing image data of hyperspectral satellites as described in any one of Implementation Methods 1 to 2.

[0050] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0051] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0052] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure and not to limit its protection scope. Although this disclosure has been described in detail with reference to the above embodiments, those skilled in the art should understand that after reading this disclosure, they can still make various changes, modifications or equivalent substitutions to the specific implementation of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the published pending claims.

Claims

1. An adaptive parsing method for remote sensing image data from hyperspectral satellites, characterized in that, The method includes: Step S1: Receive the raw remote sensing image data stream transmitted from the satellite, and allocate the data to the corresponding processing branch according to the data type. The data types include visible light data, infrared data, night light data, and emergency data. Step S2: The automatic identification module parses the coupling relationship between auxiliary data and image data in the data stream, dynamically determines whether the data format is compressed or uncompressed, and enables the corresponding parsing logic; Step S3: For uncompressed visible light data, dynamically configure image parameters according to the Binning mode flag of each spectral band, and generate a logical image using a time-series stitching model. The stitching rules of the time-series stitching model are based on the mapping relationship between spectral band resolution and physical line transmission period, including skipping filling lines, merging multiple lines of physical data, or truncating effective pixel intervals. Step S4: For compressed visible light data, a block caching and batch writing mechanism is adopted to perform memory stream decoding, inverse correction operation and pixel cropping on the JPEG2000 compressed bitstream, and calculate the position in the buffer area based on the global sequence number of the compressed block to complete the image block stitching. Step S5: For infrared data, split the single-line physical data into dual-focal-plane logical lines, and simultaneously parse and independently output the images and auxiliary data of odd-numbered lines belonging to focal plane 1 and even-numbered lines belonging to focal plane 2. Step S6: Perform deduplication and storage on the auxiliary data, and output only the changed data by comparing the full content; Step S7: Asynchronous parallel processing of multiple modules, including: parsing multiple module data in parallel using independent threads; Step S8: Output multi-band TIFF image files and deduplicated auxiliary data.

2. The adaptive parsing method for remote sensing image data from hyperspectral satellites according to claim 1, characterized in that, The dynamically determined data format in step S2 includes: The coupling relationship between auxiliary data and image data was analyzed. In the uncompressed format, auxiliary data and image data are tightly intertwined, while in the compressed format, auxiliary information is separated into 128-line blocks. By calling the CCDManager::kjg_auto module, the features of the auxiliary data area are extracted, and the visible light uncompressed data processing path or the visible light compressed data processing path is automatically enabled.

3. The adaptive parsing method for remote sensing image data from hyperspectral satellites according to claim 1, characterized in that, Step S3, which dynamically configures image parameters based on the Binning mode flags of each spectral band, includes: Scan the data stream to locate auxiliary data for each spectral band and analyze the Binning mode flags of spectral bands P and B1-B16. For uncompressed data, the logical image width is dynamically calculated based on the Binning mode and spectral resolution, and a libtiff-based strip streaming writing mechanism is adopted, resulting in dynamic growth of the image height. For compressed data, the size of the pre-allocated cv::Mat buffer for the spectral band is dynamically determined by the spectral band resolution and Binning mode. For example, the buffer size for the 5m spectral band is 6144×128 in the default Binning mode and 3072×64 in the compatible Binning mode.

4. The adaptive parsing method for remote sensing image data from hyperspectral satellites according to claim 1, characterized in that, In step S3, the timing stitching model is based on the mapping relationship between spectral band resolution and physical line transmission period, and applies corresponding stitching rules according to the actual Binning mode. The stitching rules include: In the default Binning mode: 5m band: Each 8-line physical cycle contains 8 lines of valid data, which are spliced ​​together line by line; 10m band: In every 8 lines of physical cycles, two adjacent lines of physical data are merged into one line of logical image; 20m spectral band: In every 8 lines of physical cycles, two adjacent lines are merged into one line of logical image, and the other two lines are repeated data; 40m band: Only 1 line of valid data in every 8 physical cycles; Compatible with Binning mode: 5m band: In every 8 physical cycles, the first half of the pixels in odd-numbered rows are valid data, and even-numbered rows are filled; 10m band: In every 8-line physical cycle, the first and fifth lines are valid data; 20m band: Only 1 line of valid data in every 8 lines of physical cycles; 40m band: In every 8 lines of physical cycle, two adjacent lines are merged into 1 line of logical image.

5. The adaptive parsing method for remote sensing image data from hyperspectral satellites according to claim 1, characterized in that, The processing of compressed visible light data in step S4 includes: Each 128-line image block is divided into 72 JPEG2000 compressed bitstream blocks; A cv::Mat buffer is pre-allocated for each spectral band, and its size is dynamically determined by the spectral band resolution and Binning mode. The compressed blocks are decoded directly from memory using the memory stream callback interface of the OpenJPEG library, avoiding temporary file I / O; Perform inverse correction on the decompressed pixels and crop the result to a 14-bit range [0, 0x3FFF]: pixel_final=decompressed_value-1638+block_mean Where pixel_final is the final pixel, decompressed_value is the decompressed pixel, and block_mean is the average pixel value of each compressed bitstream block; Based on the global index of the compressed block in the 72-block sequence, calculate its starting row and column coordinates in the cv::Mat buffer to complete the pixel copy; After 72 compressed blocks have been processed, 128 rows of image blocks are written to the TIFF file in batch.

6. The adaptive parsing method for remote sensing image data from hyperspectral satellites according to claim 1, characterized in that, Step S5 includes: The single row of physical data is split into odd-numbered rows belonging to focal plane 1 and even-numbered rows belonging to focal plane 2; Establish independent image data streams and auxiliary data streams for odd-numbered rows to belong to focal plane 1 and even-numbered rows to belong to focal plane 2, respectively; Based on the resolution and timing rules of infrared spectral bands B17-B21, TIFF images, multi-band auxiliary data, and attitude information of odd-numbered rows belonging to focal plane 1 and even-numbered rows belonging to focal plane 2 are alternately parsed and output.

7. The adaptive parsing method for remote sensing image data from hyperspectral satellites according to claim 1, characterized in that, The auxiliary data deduplication and storage process in step S6 includes: Maintain independent buffers for multi-spectral and attitude / orbit data respectively; Before each write operation, a full comparison of the contents of the new auxiliary data block is performed, and the data is only output to the corresponding data stream if the contents have changed.

8. The adaptive parsing method for remote sensing image data from hyperspectral satellites according to claim 1, characterized in that, The asynchronous parallel processing of multiple modules in step S7 includes: Identify multiple independent module files in the input path; Start an independent thread for each module and call the corresponding parsing function; Each thread performs image stitching and auxiliary data generation in parallel, and finally merges and outputs the results.

9. A computer device, characterized in that: The system includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes an adaptive parsing method for remote sensing image data of hyperspectral satellites according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of an adaptive parsing method for remote sensing image data of a hyperspectral satellite as described in any one of claims 1-8.