Efficient compression method for aurora spectral image based on transformer spatial context model

CN122888028APending Publication Date: 2026-10-09XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0007]第二,固定的拓扑结构与局限的感受野限制了模型捕捉复杂依赖关系的能力

Benefits of technology

本公开的实施例中,通过上述方法,一方面,将Swin Transformer架构引入空间上下文建模,利用其基于移动窗口的自注意力机制实现动态感受野调整。通过建立跨窗口的长程像素关联,弥补仅能感知邻近邻域的短视效应,从而有效消除长程空间冗余,提升复杂纹理下的压缩表现。另一方面,利用基于滑动窗口的多头自注意力机制突破了局部感受野限制,在保持线性计算复杂度的前提下,建立了精准的长程像素关联,有效捕捉极光特有的复杂纹理与宏观形态;同时,其层次化表征结构与跨窗口交互机制不仅优化了熵模型的概率分布参数估计,更深度契合极光演化的物理规律,从而在大幅消除空间冗余的同时,确保了高分辨率多波段科学观测数据的完整性与科研价值。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122888028A_ABST
    Figure CN122888028A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of aurora spectral image. The application provides an aurora spectral image efficient compression method based on a Transformer spatial context model. In the embodiment of the disclosure, the Swin Transformer architecture is introduced into spatial context modeling, and a dynamic receptive field adjustment is realized by using a self-attention mechanism based on a moving window. By establishing long-range pixel correlation across windows, the short-sighted effect of only being able to perceive the adjacent neighborhood is compensated for, thereby effectively eliminating long-range spatial redundancy and improving compression performance under complex textures. By using a multi-head self-attention mechanism based on a sliding window, the limitation of a local receptive field is broken through, long-range pixel correlation is accurately established under the premise of maintaining linear computational complexity, and complex textures and macroscopic forms specific to auroras are effectively captured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of aurora spectral imaging technology, and more particularly to an efficient compression method for aurora spectral images based on the Transformer spatial context model. Background Technology

[0002] The aurora is a luminous physical phenomenon occurring in the high latitudes of the Earth's North and South Poles. Essentially, it is an energy coupling product of the interaction between charged particles from the solar wind and the Earth's magnetosphere and atmosphere. High-energy charged particles originating from the sun, guided by the Earth's magnetic field, descend towards the magnetic poles and undergo inelastic collisions with oxygen atoms and nitrogen molecules in the thin upper atmosphere. During this process, the particles release energy and emit light radiation of specific wavelengths, ultimately appearing visually as a complex visible light curtain. As a macroscopic representation of Earth's magnetospheric activity, the geographical location, geometry, and intensity fluctuations of auroral eggs can reflect the dynamic evolution of the interaction between the solar wind and the magnetosphere in real time.

[0003] Therefore, the aurora is not only a highly valuable tracer of solar-terrestrial physical processes, but through in-depth analysis of its morphological characteristics and evolutionary logic, researchers can also elucidate the physical laws governing solar-terrestrial energy exchange, thus providing key parameters for space environment monitoring. In practical applications, aurora observation serves as a core basis for space weather forecasting, playing a crucial role in early warning of disastrous space weather events such as power system overloads, damage to satellite electronic components, and radio communication disruptions caused by geomagnetic storms.

[0004] Existing research on aurora spectral image compression has reached a bottleneck in balancing compression efficiency and fidelity when faced with ever-increasing data volumes. Meanwhile, the application of deep learning technology in natural imagery and hyperspectral remote sensing has demonstrated that deep neural networks possess extremely strong nonlinear feature learning capabilities, enabling them to automatically mine deep features and multidimensional correlations in images through end-to-end training.

[0005] In existing technologies, the introduction of a checkerboard context model (CCM) achieves an architectural transformation from pixel-by-pixel scanning to two-stage parallel processing by reconstructing the spatial topology of the latent representation. Specifically, this application first indexes based on spatial coordinates... The parity of the latent representation after quantization Divided into complementary sets of anchor points set of non-anchor points Based on this, two-stage parallel entropy modeling is performed by decoupling spatial dependencies: the first stage blocks spatial branches, utilizing only prior information. Complete the The first stage involves parallel prediction of the inner half of the pixels; the second stage uses the already decoded anchor points. As a spatial reference, local features are extracted and combined using masked convolution. Achieve Parallel inference. This design significantly compresses decoding time complexity, eliminating frequent memory read / write switching and improving hardware throughput. At the same time, it effectively compensates for probability estimation bias caused by missing references in the anchor stage by utilizing the enhanced local context obtained in the non-anchor stage. Thus, while ensuring a qualitative leap in decoding efficiency, it maintains rate-distortion performance comparable to high-complexity autoregressive models.

[0006] However, the CCM model has the following drawbacks: First, the local lack of spatial context information leads to a slight loss in rate-distortion performance. In the first stage of CCM decoding, since the anchor set lacks any decoded neighboring pixels as references, its probability distribution estimation degenerates completely into independent modeling that relies solely on prior information.

[0007] Second, the fixed topology and limited receptive field restrict the model's ability to capture complex dependencies. CCM's prediction mechanism mainly focuses on the four nearest anchor points. Although this is consistent with the characteristic that spatial correlation decays with distance, it also means that the model abandons global perception of long-range spatial dependencies and complex texture structures.

[0008] Therefore, it is necessary to improve one or more of the problems existing in the above-mentioned related technical solutions.

[0009] It should be noted that this section is intended to provide background or context for the technical solutions of this disclosure as set forth in the claims. The description herein does not constitute an admission that it is prior art simply because it is included in this section. Summary of the Invention

[0010] The purpose of this disclosure is to provide an efficient compression method for aurora spectral images based on the Transformer spatial context model, thereby overcoming, to at least some extent, one or more problems caused by the limitations and defects of related technologies.

[0011] According to embodiments of this disclosure, an efficient compression method for aurora spectral images based on a Transformer spatial context model is provided, including: A high-efficiency compression model for aurora spectral images is constructed. The high-efficiency compression model for aurora spectral images includes a master encoder, a super-prior encoder, a quantization module, a super-prior decoder, a Transformer spatial context model, a parameter aggregation module, an entropy encoder, an entropy decoder, and a master decoder. The original aurora spectral image is acquired, and the main encoder is used to perform nonlinear feature transformation on the original aurora spectral image to generate the main latent features; The master latent features are processed using a hyper-prior encoder to generate hyper-latent features; The quantization module is used to quantize the hyper-latent features and the principal latent features to obtain the quantized hyper-latent features and the quantized principal latent features. Entropy encoders are used to entropy encode the quantized hyperlatent features to form a hyperprior code stream; The super-prior decoder is used to decode the super-prior bitstream to generate super-prior side information for characterizing the probability distribution of the main latent features; The quantized master latent features are processed using the Transformer spatial context model to extract spatial context features; The parameter aggregation module is used to fuse the prior side information and spatial context features to obtain the probability distribution parameters of the main latent features; Based on probability distribution parameters, an entropy encoder is used to encode the quantized master latent features to generate a compressed bitstream. The entropy decoder is used to recover the quantized principal latent features based on the compressed bitstream, prior information, and probability distribution parameters, so as to generate the recovered quantized principal latent features. The recovered quantized master latent features are upsampled and inversely transformed using the master decoder to obtain the reconstructed aurora spectral image.

[0012] Furthermore, the main encoder and main decoder adopt a hierarchical Transformer architecture, which includes at least one Patch Merging layer. The Patch Merging layer is used to divide adjacent 2×2 pixels in the input feature map into four groups and concatenate them in the channel dimension. Then, the number of channels is reduced through a linear transformation layer to achieve downsampling.

[0013] Furthermore, the Transformer spatial context model includes cascaded window-based multi-head self-attention modules and sliding window-based multi-head self-attention modules. The window-based multi-head self-attention module is used to establish pixel correlations within a local window, while the sliding window-based multi-head self-attention module is used to achieve cross-window feature interaction through cyclic translation and attention masking mechanisms.

[0014] Furthermore, the window-based multi-head self-attention module divides the input feature map into multiple non-overlapping fixed-size windows, generates a query matrix, a key matrix, and a value matrix in each window, calculates the context features within the window through scaling dot product attention, and introduces residual connections for feature fusion.

[0015] Furthermore, the multi-head self-attention module based on the sliding window translates the window division position by a preset distance along the horizontal and vertical directions to form a sliding window, and moves the offset edge region to the diagonal direction for re-stitching through cyclic translation, and introduces an isolation mask before the Softmax operation of attention calculation to shield pixel weights that are irrelevant in the original spatial position.

[0016] Furthermore, the Transformer spatial context model comprises two consecutive Swing TransformerBlocks; wherein, The first Swing Transformer Block uses a window-based multi-head self-attention mechanism, while the second Swing Transformer Block uses a sliding window-based multi-head self-attention mechanism. The two blocks transfer features through residual connections.

[0017] Furthermore, each Swin Transformer Block includes a layer normalization module, a multi-head self-attention module or a multilayer perceptron module, and a residual connection module; wherein, The layer normalization module is used to normalize the input features, and the multilayer perceptron module is used to perform nonlinear mapping and feature enhancement on the features along the channel dimension.

[0018] Furthermore, the probability distribution parameters include scale parameters and mean parameters. The parameter aggregation module fuses prior information with spatial context features through channel cascading or weighted summation.

[0019] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: In the embodiments of this disclosure, the above-described method, on the one hand, introduces the Swin Transformer architecture into spatial context modeling, utilizing its moving window-based self-attention mechanism to achieve dynamic receptive field adjustment. By establishing long-range pixel associations across windows, it compensates for the short-sightedness effect of only being able to perceive nearby neighborhoods, thereby effectively eliminating long-range spatial redundancy and improving compression performance under complex textures. On the other hand, it utilizes a multi-head self-attention mechanism based on sliding windows to overcome the limitations of local receptive fields, establishing accurate long-range pixel associations while maintaining linear computational complexity, effectively capturing the unique complex textures and macroscopic forms of auroras; simultaneously, its hierarchical representation structure and cross-window interaction mechanism not only optimize the probability distribution parameter estimation of the entropy model but also deeply align with the physical laws of auroral evolution, thereby significantly eliminating spatial redundancy while ensuring the integrity and scientific research value of high-resolution multi-band scientific observation data. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0021] Figure 1 The diagram illustrates the steps of an efficient aurora spectral image compression method based on the Transformer spatial context model in an exemplary embodiment of this disclosure. Figure 2 This diagram illustrates the overall framework of an efficient compression model for aurora spectral images in an exemplary embodiment of this disclosure. Figure 3 This diagram illustrates the structure of the Swing Transformer Block in an exemplary embodiment of this disclosure. Figure 4 This diagram shows a comparison of PSNR performance of different algorithms in exemplary embodiments of this disclosure; Figure 5 A performance comparison chart of different MS-SSIM algorithms in exemplary embodiments of this disclosure is shown. Detailed Implementation

[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0023] Furthermore, the accompanying drawings are merely illustrative diagrams of embodiments of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0024] This example implementation provides an efficient compression method for aurora spectral images based on the Transformer spatial context model. (Reference) Figure 1 As shown, this efficient compression method for aurora spectral images based on the Transformer spatial context model may include: Step S1: Construct an efficient compression model for aurora spectral images; wherein, the efficient compression model for aurora spectral images includes a master encoder, a super prior encoder, a quantization module, a super prior decoder, a Transformer spatial context model, a parameter aggregation module, an entropy encoder, an entropy decoder, and a master decoder; Step S2: Acquire the original aurora spectral image, and use the main encoder to perform nonlinear feature transformation on the original aurora spectral image to generate the main latent features; Step S3: Process the master latent features using a hyper-prior encoder to generate hyper-latent features; Step S4: Use the quantization module to quantize the hyper-latent features and principal latent features to obtain the quantized hyper-latent features and quantized principal latent features; Step S5: Use an entropy encoder to entropy encode the quantized hyperlatent features to form a hyperprior code stream; Step S6: Decode the super-prior code stream using the super-prior decoder to generate super-prior side information for characterizing the probability distribution of the main latent features; Step S7: Process the quantized master latent features using the Transformer spatial context model to extract spatial context features; Step S8: Use the parameter aggregation module to fuse the prior side information and spatial context features to obtain the probability distribution parameters of the main latent features; Step S9: Based on the probability distribution parameters, use an entropy encoder to encode the quantized master latent features to generate a compressed bitstream; Step S10: Use the entropy decoder to recover the quantized principal latent features based on the compressed bitstream, prior information, and probability distribution parameters to generate the recovered quantized principal latent features; Step S11: Use the master decoder to upsample and inverse transform the recovered quantized master latent features to obtain the reconstructed aurora spectral image.

[0025] The above methods, on the one hand, introduce the Swin Transformer architecture into spatial context modeling, utilizing its moving window-based self-attention mechanism to achieve dynamic receptive field adjustment. By establishing long-range pixel associations across windows, the short-sightedness effect of only perceiving nearby neighborhoods is compensated, thereby effectively eliminating long-range spatial redundancy and improving compression performance under complex textures. On the other hand, the multi-head self-attention mechanism based on sliding windows overcomes the limitations of local receptive fields, establishing accurate long-range pixel associations while maintaining linear computational complexity, effectively capturing the unique complex textures and macroscopic morphologies of auroras. Simultaneously, its hierarchical representation structure and cross-window interaction mechanism not only optimize the probability distribution parameter estimation of the entropy model but also deeply align with the physical laws of auroral evolution, thus significantly eliminating spatial redundancy while ensuring the integrity and research value of high-resolution multi-band scientific observation data.

[0026] Below, we will refer to Figures 1 to 5 The steps of the efficient compression method for aurora spectral images based on the Transformer spatial context model described in this example embodiment will be explained in more detail.

[0027] In one embodiment, to address the weak long-range dependency capture capability caused by single-scale representation and fixed receptive field, a multi-scale sliding window self-attention architecture is introduced into the context modeling module of the compressed network. This application achieves linear computational complexity while overcoming spatial correlation truncation, accurately capturing the multi-dimensional physical structural features of aurora images through the synergy of windowed local attention, cyclic offset interaction, and implicit positional bias.

[0028] The corresponding aurora spectral image context parsing network system (i.e., an efficient compression model for aurora spectral images): 1. Feature extraction architecture based on hierarchical Transformer This application employs a pyramid structure, similar to a convolutional neural network, to construct the feature extraction network. Before proceeding to each stage, it uses... The mechanism downsamples the feature map.

[0029] The specific implementation process is as follows: For the input resolution of... Feature map, Adjacent Each pixel is extracted and divided into four groups, then concatenated along the channel dimension. This operation transforms the tensor dimension into... Then through a linear transformation layer ( Reduce the number of channels to This design, while compressing sequence length, simulates the hierarchy of visual perception, enabling shallow layers of the network to capture texture details such as aurora edges, while deeper layers extract semantic structures such as the overall distribution of aurora morphology.

[0030] 2. Window-based Multi-Head Self-Attention Mechanism (W-MSA) Implementation Scheme This invention introduces a windowed modeling approach into the spatial context model. The model divides the image into... Each independent fixed-size window (window size is...) ), and perform multi-head self-attention computation within each window. For the input feature matrix The learnable weight matrix is ​​mapped to the query matrix. Key matrix Sum matrix The formula for calculating scaled dot product attention is:

[0031] This mechanism reduces computational complexity to the total number of image pixels. The relationship is linear, thus supporting end-to-end parallel training and inference of high-resolution, multi-band aurora spectral images.

[0032] 3. Cross-window interaction mechanism based on sliding window (SW-MSA) First, a standard window is defined, and then the dividing boundaries are shifted to the right and downwards in the next layer. Each pixel. To address the problem of calculating irregular windows caused by offset, this invention employs cyclic translation and masking techniques: the offset edge regions are cyclically moved to the diagonal direction and re-stitched, and an isolation mask is introduced during the calculation. The original spatially unrelated pixel weights are masked. This mechanism ensures that the network has global awareness while performing local encoding, which aligns with the physical characteristics of the continuous evolution of the aurora curtain and effectively eliminates spatial redundancy.

[0033] In one embodiment, such as Figure 2 As shown, the efficient compression framework for aurora spectral images based on the Transformer spatial context model (i.e., the efficient compression model for aurora spectral images) includes a master encoder, a super-prior encoder, a quantization module, a super-prior decoder, a Transformer spatial context model, a parameter aggregation module, an entropy encoder, an entropy decoder, and a master decoder.

[0034] After the original aurora spectral image is input into the main encoder, the main encoder performs nonlinear feature transformation on the original image to obtain the main latent feature y. Among them, the main encoder performs joint characterization of local texture, strip structure and long-range spatial dependence in the aurora image through convolutional downsampling, residual feature extraction and Transformer spatial context modeling.

[0035] The super-prior encoder processes the principal latent feature y to obtain the super-latent feature z. The super-latent feature z is then quantized and entropy-encoded to form a super-prior bitstream, which is then used by the super-prior decoder at the decoding end to recover the super-prior side information representing the probability distribution of the principal latent feature. The Transformer spatial context model processes the quantized principal latent feature, utilizing window-based multi-head self-attention and sliding-window-based multi-head self-attention mechanisms to extract spatial context features. The window-based multi-head self-attention mechanism is used to establish pixel correlations within a local window, while the sliding-window-based multi-head self-attention mechanism is used to achieve cross-window feature interaction.

[0036] The parameter aggregation module fuses prior information and spatial context features to obtain the probability distribution parameters of the master latent features, including scale and mean parameters. The entropy encoder encodes the quantized master latent features according to these probability distribution parameters to generate a compressed bitstream. The entropy decoder recovers the quantized master latent features based on the compressed bitstream, prior information, and the probability distribution parameters predicted by the Transformer spatial context model. The master decoder upsamples and performs inverse transform on the recovered quantized master latent features to obtain the reconstructed aurora spectral image. Through this structure, this invention, while maintaining parallel entropy encoding / decoding capabilities, introduces cross-window spatial dependency modeling, improving the accuracy of master latent feature probability estimation, thereby enhancing the compression efficiency and reconstruction quality of the aurora spectral image.

[0037] like Figure 3 As shown, the Swin Transformer Block includes a first-layer normalization module, a window-based multi-head self-attention module, a first residual connection module, a second-layer normalization module, a multilayer perceptron module, and a second residual connection module. In two adjacent Swin Transformer Blocks, one uses a window-based multi-head self-attention mechanism, and the other uses a sliding window-based multi-head self-attention mechanism. After the input feature map enters the first Swin Transformer Block, the first-layer normalization module normalizes the input features to obtain normalized features. The window-based multi-head self-attention module divides the normalized features into multiple non-overlapping local windows and generates a query matrix, a key matrix, and a value matrix in each local window. The context features within the window are calculated through scaling dot product attention. The first residual connection module fuses the context features within the window with the input features to obtain the first fused features.

[0038] The second-layer normalization module normalizes the first fused feature. The multilayer perceptron module performs nonlinear mapping and feature enhancement on the normalized first fused feature along the channel dimension. The second residual connection module fuses the output of the multilayer perceptron module with the first fused feature to obtain the output feature of the first Swing Transformer Block. After this output feature is input into the second Swing Transformer Block, the second Swing Transformer Block translates the window division position by a preset distance along the horizontal and vertical directions to form a sliding window, and performs multi-head self-attention calculation within the sliding window. Among them, the boundary regions of the sliding window are constrained by cyclic translation and attention masking to avoid features with irrelevant original spatial positions from participating in the attention calculation.

[0039] Through the two consecutive Swing Transformer Blocks described above, the model first extracts local texture and detail features of the aurora image within a fixed window, and then establishes feature interaction relationships between adjacent windows through a sliding window to obtain output features that simultaneously contain local contextual information and long-range dependencies across windows. This structure replaces the local modeling approach with a fixed receptive field in traditional convolutional context models, enabling the banded structures, diffuse edges, and continuously evolving textures in aurora spectral images to be more fully represented in a compressed feature space, thereby providing more accurate spatial contextual information for subsequent probability distribution parameter estimation.

[0040] In one specific embodiment Figure 4 This paper presents the rate-distortion performance comparison results of the proposed WCC (Windows ChannelCheckerboard Context Model) on an aurora image dataset with various benchmark methods. Figure 4 As shown, under the PSNR evaluation metric, the WCC model achieves a significant performance gain of 0.7-1.2 dB in the 0.4-0.6 bpp range compared to the STF model, which is also based on Transformer. Furthermore, compared to He2022, WCC maintains a stable lead of approximately 0.3-0.5 dB. Particularly noteworthy is the performance comparison between WCC and the classic autoregressive model Minnen2018. While the difference isn't significant, WCC demonstrates a substantial advantage in subsequent encoding / decoding time comparisons.

[0041] Figure 5 The rate-distortion performance of WCC and the above frameworks was compared under the MS-SSIM metric. Figure 5The MS-SSIM evaluation results show that, compared to STF, our method achieves a 1.0-1.5 dB improvement in PSNR on MS-SSIM. Compared to Minnen2018, our method shows a significant lead after 0.3 bpp, reaching 14.6 dB at 0.8 bpp, which is better than the 14.4 dB of the comparison method. This indicates that WCC not only improves PSNR by reducing pixel errors, but also effectively maintains the multi-scale structural features of aurora images by capturing global dependencies.

[0042] The above methods, on the one hand, introduce the Swin Transformer architecture into spatial context modeling, utilizing its moving window-based self-attention mechanism to achieve dynamic receptive field adjustment. By establishing long-range pixel associations across windows, the short-sightedness effect of only perceiving nearby neighborhoods is compensated, thereby effectively eliminating long-range spatial redundancy and improving compression performance under complex textures. On the other hand, the multi-head self-attention mechanism based on sliding windows overcomes the limitations of local receptive fields, establishing accurate long-range pixel associations while maintaining linear computational complexity, effectively capturing the unique complex textures and macroscopic morphologies of auroras. Simultaneously, its hierarchical representation structure and cross-window interaction mechanism not only optimize the probability distribution parameter estimation of the entropy model but also deeply align with the physical laws of auroral evolution, thus significantly eliminating spatial redundancy while ensuring the integrity and research value of high-resolution multi-band scientific observation data.

[0043] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.

[0044] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.

Claims

1. A method for efficient compression of aurora spectral images based on the Transformer spatial context model, characterized in that, include: A high-efficiency compression model for aurora spectral images is constructed. The high-efficiency compression model for aurora spectral images includes a master encoder, a super-prior encoder, a quantization module, a super-prior decoder, a Transformer spatial context model, a parameter aggregation module, an entropy encoder, an entropy decoder, and a master decoder. The original aurora spectral image is acquired, and the main encoder is used to perform nonlinear feature transformation on the original aurora spectral image to generate the main latent features; The master latent features are processed using a hyper-prior encoder to generate hyper-latent features; The quantization module is used to quantize the hyper-latent features and the principal latent features to obtain the quantized hyper-latent features and the quantized principal latent features. Entropy encoders are used to entropy encode the quantized hyperlatent features to form a hyperprior code stream; The super-prior decoder is used to decode the super-prior bitstream to generate super-prior side information for characterizing the probability distribution of the main latent features; The quantized master latent features are processed using the Transformer spatial context model to extract spatial context features; The parameter aggregation module is used to fuse the prior side information and spatial context features to obtain the probability distribution parameters of the main latent features; Based on probability distribution parameters, an entropy encoder is used to encode the quantized master latent features to generate a compressed bitstream. The entropy decoder is used to recover the quantized principal latent features based on the compressed bitstream, prior information, and probability distribution parameters, so as to generate the recovered quantized principal latent features. The recovered quantized master latent features are upsampled and inversely transformed using the master decoder to obtain the reconstructed aurora spectral image.

2. The efficient compression method for aurora spectral images based on the Transformer spatial context model according to claim 1, characterized in that, The main encoder and main decoder adopt a hierarchical Transformer architecture, which includes at least one Patch Merging layer. The Patch Merging layer is used to divide adjacent 2×2 pixels in the input feature map into four groups and concatenate them along the channel dimension. Then, the number of channels is reduced through a linear transformation layer to achieve downsampling.

3. The efficient compression method for aurora spectral images based on the Transformer spatial context model according to claim 1, characterized in that, The Transformer spatial context model includes cascaded window-based multi-head self-attention modules and sliding window-based multi-head self-attention modules. The window-based multi-head self-attention module is used to establish pixel correlations within a local window, while the sliding window-based multi-head self-attention module is used to achieve cross-window feature interaction through cyclic translation and attention masking mechanisms.

4. The efficient compression method for aurora spectral images based on the Transformer spatial context model according to claim 3, characterized in that, The window-based multi-head self-attention module divides the input feature map into multiple non-overlapping fixed-size windows, generates a query matrix, a key matrix, and a value matrix in each window, calculates the context features within the window through scaling dot product attention, and introduces residual connections for feature fusion.

5. The efficient compression method for aurora spectral images based on the Transformer spatial context model according to claim 4, characterized in that, The multi-head self-attention module based on the sliding window translates the window division position by a preset distance in the horizontal and vertical directions to form a sliding window. It then moves the offset edge region to the diagonal direction and re-stitches it by cyclic translation. In addition, it introduces an isolation mask before the Softmax operation of attention calculation to shield pixel weights that are irrelevant in the original spatial position.

6. The efficient compression method for aurora spectral images based on the Transformer spatial context model according to claim 5, characterized in that, The Transformer spatial context model consists of two consecutive Swing Transformer Blocks; where, The first Swing Transformer Block uses a window-based multi-head self-attention mechanism, while the second Swing Transformer Block uses a sliding window-based multi-head self-attention mechanism. The two blocks transfer features through residual connections.

7. The efficient compression method for aurora spectral images based on the Transformer spatial context model according to claim 6, characterized in that, Each Swing Transformer Block includes a layer normalization module, a multi-head self-attention module or a multilayer perceptron module, and a residual connection module; among which, The layer normalization module is used to normalize the input features, and the multilayer perceptron module is used to perform nonlinear mapping and feature enhancement on the features along the channel dimension.

8. The efficient compression method for aurora spectral images based on the Transformer spatial context model according to claim 7, characterized in that, The probability distribution parameters include scale parameters and mean parameters. The parameter aggregation module fuses prior information with spatial context features through channel cascading or weighted summation.