Universal real-time decryption and decompression method, device and storage medium for Jilin-1 satellite raw data based on TCP protocol

Through the general real-time decryption and decompression method of Jilin-1 satellite raw data based on the TCP protocol, subcontracting and streaming processing technology are used to solve the problems of high memory usage and low timeliness when parsing raw data of remote sensing satellites, and fast and efficient data processing is achieved.

CN115941635BActive Publication Date: 2025-04-04CHANGGUANG SATELLITE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211343108.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-04-04
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

The existing remote sensing satellite original data analysis method requires the satellite data transmission to be analyzed before it can be analyzed, and all data needs to be read in at one time for desynchronization, decryption and decompression, resulting in high memory usage and low timeliness.

Method used

The general real-time decryption and decompression method of Jilin-1 satellite raw data based on the TCP protocol is adopted. Through subcontracting and streaming processing technology, satellite data is received and processed in real time, and multi-threading and queue mechanisms are used to deinterleave, decrypt, decompress and standardize output.

Benefits of technology

Real-time decryption and decompression is achieved within 30 seconds after the satellite ground receiving station is received, reducing memory usage and improving timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115941635B_ABST
    Figure CN115941635B_ABST
Patent Text Reader

Abstract

The general real-time decryption and decompression method, device and storage medium of Jilin-1 satellite raw data based on TCP protocol belong to the field of image processing technology. The Jilin-1 satellite code, thread number, output directory, satellite ground receiving station demodulator IP and TCP port number are obtained respectively; according to the Jilin-1 satellite code, the deinterleaving, decryption, decompression and standardized output buffer size are set respectively; the TCP port number is initialized, and the ground receiving station demodulator is connected, and the ground receiving station demodulator starts to receive the raw data of Jilin-1 satellite; according to the Jilin-1 satellite data transmission code rate, the ground receiving station demodulator will packetize the received raw data and send the data streaming to the deinterleaving, decryption, decompression and standardized output queue for processing; after the ground receiving station demodulator receives the raw data of Jilin-1 satellite, it disconnects the TCP port connection and ends the operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to a universal real-time decryption and decompression method, a device and a storage medium for Jilin-1 satellite raw data based on TCP protocol. Background Art

[0002] The analysis of remote sensing satellite raw data is the first step in remote sensing image processing. Jilin-1 satellite has the characteristics of high-speed data transmission, and a single data transmission can reach more than 200GB.

[0003] The currently commonly used remote sensing satellite raw data analysis method requires that the satellite data transmission is completed before the raw data analysis can be performed, and all the raw data must be read in at one time, and then the raw data must be desynchronized, decrypted, decompressed, and other analysis steps are performed. The memory usage is large and the timeliness is low. Summary of the invention

[0004] The present invention solves the problem that the existing remote sensing satellite raw data analysis method needs to complete satellite data transmission before raw data analysis can be performed, and all raw data need to be read in at one time, and then the raw data needs to be desynchronized, decrypted, decompressed and other analysis steps, resulting in a large memory usage rate and low timeliness.

[0005] The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol of the present invention comprises the following steps:

[0006] Step S1, respectively obtaining the Jilin-1 satellite code, thread number, output directory, satellite ground receiving station demodulator IP and TCP port number;

[0007] Step S2, according to the Jilin-1 satellite code, respectively set the deinterleaving, decryption, decompression and standardization output buffer size;

[0008] Step S3, initializing the TCP port number and connecting to the ground receiving station demodulator, and the ground receiving station demodulator starts to receive the original data of Jilin-1 satellite;

[0009] Step S4, according to the Jilin-1 satellite data transmission code rate, the ground receiving station demodulator divides the received original data into packets, and sends the divided original data to the de-interleaving queue;

[0010] Step S5, after receiving the original data, the deinterleaving queue copies it to the deinterleaving buffer area, processes the original data in the deinterleaving buffer area according to the deinterleaving rule, copies the residual frame data to the head of the deinterleaving buffer area, and packages the processed data and sends it to the decryption queue;

[0011] Step S6, the decryption queue receives the deinterleaved data, copies it to the decryption buffer, processes the data according to the decryption rules, copies the residual frame data to the decryption buffer header, and packages the processed data and sends it to the decompression queue;

[0012] Step S7, the decompression queue receives the decrypted data, copies it to the decompression buffer area, decompresses the image data using a multi-threaded method, and packages the decompressed image data and sends it to the standardized output queue;

[0013] Step S8, after receiving the image data, the standardized output queue copies the image data to the standardized output buffer area, and outputs the image data in a standardized manner according to the size of the buffer area;

[0014] Step S9, after the demodulator of the ground receiving station receives the original data from the Jilin-1 satellite and disconnects the TCP port connection, it checks in turn whether there is any unprocessed data in the deinterleaving, decryption, decompression and standardization output queues. If there is no unprocessed data in the queue, the operation is terminated. If there is still unprocessed data in the queue, the queue continues to process data until there is no unprocessed data in the queue, and the operation is terminated.

[0015] Further, in one embodiment of the present invention, after receiving the original data, the deinterleaving queue copies the original data to the deinterleaving buffer area, processes the original data in the deinterleaving buffer area according to the deinterleaving rule, copies the residual frame data to the deinterleaving buffer head, and packages the processed data and sends it to the decryption queue, including the following steps:

[0016] Step S501, taking out the original data of Jilin-1 satellite from the de-interleaving queue, copying it to the de-interleaving buffer area, releasing the memory space of the original data, and updating the length of the original data in the de-interleaving buffer area;

[0017] Step S502, searching the interleaving flag in the deinterleaving buffer, removing invalid frames, and storing the interleaved data in a container according to a fixed length;

[0018] Step S503, deinterleave the interleaved data in the container using the Jilin-1 different series satellite interleaving method;

[0019] Step S504, returning the residual frame length of the interleaved data, copying the residual frame data to the head of the deinterleaving buffer area, and updating the residual frame length to the deinterleaving buffer area length;

[0020] Step S505, applying for a new packet of the same size as the original data in step S501, storing the deinterleaved data in the deinterleaving buffer into the new packet, and sending the new packet to the decryption queue.

[0021] Furthermore, in one embodiment of the present invention, the fixed length is 2048 Bytes.

[0022] Further, in one embodiment of the present invention, the decryption queue receives the deinterleaved data, copies it to the decryption buffer, processes the data according to the decryption rule, copies the residual frame data to the decryption buffer header, and packages the processed data and sends it to the decompression queue, including the following steps:

[0023] Step S601, taking out the deinterleaved data from the decryption queue, copying it to the decryption buffer, releasing the memory space of the data, and updating the data length in the decryption buffer;

[0024] Step S602, in the decryption buffer, search for the decryption flag, remove invalid frames, read the serial number of each frame of encrypted data, and store the encrypted data in a container according to a fixed length;

[0025] Step S603, sorting and removing duplicates of all elements in the container according to the serial number of the encrypted data;

[0026] Step S604, decrypting the encrypted data processed in step S603 using the decryption algorithm function of Jilin-1 satellite;

[0027] Step S605, returning the residual frame length of the encrypted data, copying the residual frame data in the decryption buffer to the decryption buffer header, and updating the residual frame length to the decryption buffer length;

[0028] Step S606, applying for a new packet of the same size as the data in step S601, storing the decrypted data in the decryption buffer into the new packet, and sending the new packet to the decompression queue.

[0029] Furthermore, in one embodiment of the present invention, the fixed length is 8192 Bytes.

[0030] Further, in one embodiment of the present invention, the decompression queue receives the decrypted data, copies it to the decompression buffer area, decompresses the image data using a multi-threaded method, and packages the decompressed image data and sends it to the standardized output queue, including the following steps:

[0031] Step S701, taking out the decrypted data from the decompression queue and copying it to the decompression buffer area, releasing the memory space of the data, and updating the data length in the decompression buffer area;

[0032] Step S702, searching for each frame of image data according to the Jilin-1 different series satellite image data communication protocol, removing invalid frames, and storing each frame of image data in a container;

[0033] Step S703, using multithreading to decompress each frame of image data in the container, and renaming each frame of decompressed image data according to the Jilin-1 satellite image data communication protocol of different series and the Jilin-1 satellite standard 0-level product naming specification;

[0034] Step S704, returning the residual frame length of the decompressed data, copying the residual frame data in the decompression buffer area to the decompression buffer area header, and updating the residual frame length to the decompression buffer area length;

[0035] Step S705, applying for a new packet of the same size as each frame of image data in step S703, storing the decompressed image data in the decompression buffer into the new packet, and sending the new packet to the standardized output queue.

[0036] Further, in one embodiment of the present invention, after receiving the image data, the standardized output queue copies the image data to the standardized output buffer area, and outputs the image data in a standardized manner according to the size of the buffer area, including the following steps:

[0037] Step S801, taking out the decompressed image data from the standardized output queue and copying it to the standardized output buffer, releasing the memory space of the image data, and updating the image data length in the standardized output buffer;

[0038] Step S802, directly copying the first frame image data to the standardized output buffer area;

[0039] Step S803, comparing the naming of the subsequent frame image data with the naming of the image data in the standardized output buffer area, determining whether the first condition and the second condition are met at the same time, if the first condition and the second condition are met at the same time, executing step S804, if the first condition is met but the second condition is not met, executing step S805, if the first condition is not met but the second condition is met, executing step S806;

[0040] Step S804, copying the image data to the standardized output buffer;

[0041] Step S805, directly output the image data and set the length of the standardized output buffer to 0;

[0042] Step S806: directly output the image data.

[0043] Further, in one embodiment of the present invention, the first condition is that the naming is consistent;

[0044] The second condition is that the length of the standardized output buffer does not exceed the boundary after the image data is copied.

[0045] An electronic device described in the present invention comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0046] Memory, used to store computer programs;

[0047] The processor is used to implement any method step described in the above method when executing the program stored in the memory.

[0048] The present invention provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the above method is implemented.

[0049] The present invention solves the problem that the existing remote sensing satellite raw data analysis method needs to complete satellite data transmission before raw data analysis can be performed, and all raw data need to be read in at one time, and then the raw data needs to be desynchronized, decrypted, decompressed and other analysis steps, resulting in a large memory usage rate and low timeliness. Specific beneficial effects include:

[0050] 1. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol described in the present invention can be directly used for processing Jilin-1 satellite products, and can complete real-time decryption and decompression within 30 seconds after the satellite ground receiving station completes receiving, with low memory occupancy and strong practicality;

[0051] 2. The universal real-time decryption and decompression method for the original data of Jilin-1 satellite based on TCP protocol described in the present invention uses TCP protocol to receive the original data received by the satellite ground station in real time, designs four queues of deinterleaving, decryption, decompression and standardized output, automatically sets the size of each data packet according to the data transmission rate of Jilin-1 satellite, packages the original data and sends it to the queue in streaming mode, and each queue processes the received data packets in streaming mode, finally realizing the real-time decryption and decompression of the original data of Jilin-1 satellite;

[0052] 3. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol described in the present invention has a simple basic principle and a mature function library, and can realize real-time decryption and decompression of Jilin-1 satellite raw data. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0054] Figure 1 It is a flowchart of a general real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol described in a specific implementation method;

[0055] Figure 2 is a schematic diagram of a normal startup and waiting for a ground receiving station to send satellite raw data as described in a specific implementation method;

[0056] Figure 3 is a schematic diagram of an operation log described in a specific implementation manner;

[0057] Figure 4 is a log schematic diagram described in a specific implementation manner;

[0058] Figure 5 is a log diagram after the processing described in the specific implementation method is completed;

[0059] Figure 6 It is a schematic diagram of the output file of Jilin No. 1 Video 05 satellite after being processed by the present invention as described in the specific implementation mode;

[0060] Figure 7 It is a schematic diagram of the output file of the Jilin-1 Gaofen 03B01 satellite after being processed by the present invention as described in the specific implementation mode;

[0061] Figure 8 It is a schematic diagram of the output file of the Jilin-1 spectral satellite described in the specific implementation mode after being processed by the present invention;

[0062] Fig. 9 It is a schematic diagram of the output file of the Jilin-1 Gaofen 03C01 satellite after being processed by the present invention as described in the specific implementation mode;

[0063] Fig.10 This is a schematic diagram of the output file of the Jilin-1 Gaofen 02B satellite after being processed by the present invention as described in the specific implementation mode;

[0064] Fig.11 It is a schematic diagram of the output file of the Jilin-1 wide-band 01A satellite after being processed by the present invention as described in the specific implementation method. DETAILED DESCRIPTION

[0065] The following will clearly and completely describe various embodiments of the present invention in conjunction with the accompanying drawings. The embodiments described with reference to the accompanying drawings are exemplary and intended to be used to explain the present invention, but should not be understood as limiting the present invention.

[0066] The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol described in this embodiment comprises the following steps:

[0067] Step S1, respectively obtaining the Jilin-1 satellite code, thread number, output directory, satellite ground receiving station demodulator IP and TCP port number;

[0068] Step S2, according to the Jilin-1 satellite code, respectively set the deinterleaving, decryption, decompression and standardization output buffer size;

[0069] Step S3, initializing the TCP port number and connecting to the ground receiving station demodulator, and the ground receiving station demodulator starts to receive the original data of Jilin-1 satellite;

[0070] Step S4, according to the Jilin-1 satellite data transmission code rate, the ground receiving station demodulator divides the received original data into packets, and sends the divided original data to the de-interleaving queue;

[0071] Step S5, after receiving the original data, the deinterleaving queue copies it to the deinterleaving buffer area, processes the original data in the deinterleaving buffer area according to the deinterleaving rule, copies the residual frame data to the head of the deinterleaving buffer area, and packages the processed data and sends it to the decryption queue;

[0072] Step S6, the decryption queue receives the deinterleaved data, copies it to the decryption buffer, processes the data according to the decryption rules, copies the residual frame data to the decryption buffer header, and packages the processed data and sends it to the decompression queue;

[0073] Step S7, the decompression queue receives the decrypted data, copies it to the decompression buffer area, decompresses the image data using a multi-threaded method, and packages the decompressed image data and sends it to the standardized output queue;

[0074] Step S8, after receiving the image data, the standardized output queue copies the image data to the standardized output buffer area, and outputs the image data in a standardized manner according to the size of the buffer area;

[0075] Step S9, after the demodulator of the ground receiving station receives the original data from the Jilin-1 satellite and disconnects the TCP port connection, it checks in turn whether there is any unprocessed data in the deinterleaving, decryption, decompression and standardization output queues. If there is no unprocessed data in the queue, the operation is terminated. If there is still unprocessed data in the queue, the queue continues to process data until there is no unprocessed data in the queue, and the operation is terminated.

[0076] In this implementation manner, after receiving the original data, the deinterleaving queue copies it to the deinterleaving buffer area, processes the original data in the deinterleaving buffer area according to the deinterleaving rule, copies the residual frame data to the deinterleaving buffer head, and packages the processed data and sends it to the decryption queue, including the following steps:

[0077] Step S501, taking out the original data of Jilin-1 satellite from the de-interleaving queue, copying it to the de-interleaving buffer area, releasing the memory space of the original data, and updating the length of the original data in the de-interleaving buffer area;

[0078] Step S502, searching the interleaving flag in the deinterleaving buffer, removing invalid frames, and storing the interleaved data in a container according to a fixed length;

[0079] Step S503, deinterleave the interleaved data in the container using the Jilin-1 different series satellite interleaving method;

[0080] Step S504, returning the residual frame length of the interleaved data, copying the residual frame data to the head of the deinterleaving buffer area, and updating the residual frame length to the deinterleaving buffer area length;

[0081] Step S505, applying for a new packet of the same size as the original data in step S501, storing the deinterleaved data in the deinterleaving buffer into the new packet, and sending the new packet to the decryption queue.

[0082] In this implementation, the fixed length is 2048 Bytes.

[0083] In this embodiment, the decryption queue receives the deinterleaved data, copies it to the decryption buffer, processes the data according to the decryption rules, copies the residual frame data to the decryption buffer header, and packages the processed data and sends it to the decompression queue, including the following steps:

[0084] Step S601, taking out the deinterleaved data from the decryption queue, copying it to the decryption buffer, releasing the memory space of the data, and updating the data length in the decryption buffer;

[0085] Step S602, in the decryption buffer, search for the decryption flag, remove invalid frames, read the serial number of each frame of encrypted data, and store the encrypted data in a container according to a fixed length;

[0086] Step S603, sorting and removing duplicates of all elements in the container according to the serial number of the encrypted data;

[0087] Step S604, decrypting the encrypted data processed in step S603 using the decryption algorithm function of Jilin-1 satellite;

[0088] Step S605, returning the residual frame length of the encrypted data, copying the residual frame data in the decryption buffer to the decryption buffer header, and updating the residual frame length to the decryption buffer length;

[0089] Step S606, applying for a new packet of the same size as the data in step S601, storing the decrypted data in the decryption buffer into the new packet, and sending the new packet to the decompression queue.

[0090] In this implementation, the fixed length is 8192 Bytes.

[0091] In this embodiment, the decompression queue receives the decrypted data, copies it to the decompression buffer area, decompresses the image data using a multi-threaded method, and packages the decompressed image data and sends it to the standardized output queue, including the following steps:

[0092] Step S701, taking out the decrypted data from the decompression queue and copying it to the decompression buffer area, releasing the memory space of the data, and updating the data length in the decompression buffer area;

[0093] Step S702, searching for each frame of image data according to the Jilin-1 different series satellite image data communication protocol, removing invalid frames, and storing each frame of image data in a container;

[0094] Step S703, using multithreading to decompress each frame of image data in the container, and renaming each frame of decompressed image data according to the Jilin-1 satellite image data communication protocol of different series and the Jilin-1 satellite standard 0-level product naming specification;

[0095] Step S704, returning the residual frame length of the decompressed data, copying the residual frame data in the decompression buffer area to the decompression buffer area header, and updating the residual frame length to the decompression buffer area length;

[0096] Step S705, applying for a new packet of the same size as each frame of image data in step S703, storing the decompressed image data in the decompression buffer into the new packet, and sending the new packet to the standardized output queue.

[0097] In this embodiment, after receiving the image data, the standardized output queue copies the image data to the standardized output buffer area, and outputs the image data in a standardized manner according to the size of the buffer area, including the following steps:

[0098] Step S801, taking out the decompressed image data from the standardized output queue and copying it to the standardized output buffer, releasing the memory space of the image data, and updating the image data length in the standardized output buffer;

[0099] Step S802, directly copying the first frame image data to the standardized output buffer area;

[0100] Step S803, comparing the naming of the subsequent frame image data with the naming of the image data in the standardized output buffer area, determining whether the first condition and the second condition are met at the same time, if the first condition and the second condition are met at the same time, executing step S804, if the first condition is met but the second condition is not met, executing step S805, if the first condition is not met but the second condition is met, executing step S806;

[0101] Step S804, copying the image data to the standardized output buffer;

[0102] Step S805, directly output the image data and set the length of the standardized output buffer to 0;

[0103] Step S806: directly output the image data.

[0104] In this implementation mode, the first condition is that the naming is consistent;

[0105] The second condition is that the length of the standardized output buffer does not exceed the boundary after the image data is copied.

[0106] This implementation is based on the universal real-time decryption and decompression method for the original data of Jilin-1 satellite based on the TCP protocol described in the present invention, combined with Figure 1 To better understand this implementation, a practical implementation is provided:

[0107] The method comprises the following steps:

[0108] S100, respectively obtaining the Jilin-1 satellite code, the computer resources (number of threads) allocated to the method, the output path, the satellite ground receiving station demodulator IP and TCP port number.

[0109] S200, according to the satellite code, respectively set the deinterleaving, decryption, decompression and standardization output buffer size.

[0110] In this implementation, the default data package size is the size of the original data transmitted by the satellite for 3 seconds. For example, the data transmission rate of the Jilin-1 Gaofen 03B satellite is 450Mbps, so the data package size is set to 200MB.

[0111] Since each packet of data contains residual frame data related to adjacent packets of data, and the size of the residual frame data is an uncertain value, the present invention sets the buffer area to be twice the data packing size. For example, if the data packing size of Jilin-1 Gaofen 03B satellite is 200MB, the deinterleaving, decryption, decompression and standardization output buffer area size is 400MB.

[0112] S300, initialize the TCP protocol IP and port number, and connect to the ground receiving station demodulator to receive the original satellite data, such as Figure 2 shown.

[0113] S400, according to the satellite data transmission code rate, the received raw data is packetized and the data is streamed to the deinterleaving, decryption, decompression and standardization output queue.

[0114] S500, after receiving each packet of original data, the deinterleaving queue copies it to the deinterleaving buffer area, processes the buffer data according to the deinterleaving rule, copies the residual frame data to the buffer head, and packages the processed data and sends it to the decryption queue.

[0115] Take the satellite raw data from the deinterlace queue (deinterlaceQueue) and copy it to the deinterlace buffer (cacheDeinterlace), release the memory space of the raw data of the packet, and update the buffer data length;

[0116] Apply for a space of the same size as the original data of the packet to store the deinterleaved data;

[0117] In the de-interleaving buffer, search for the interleaving flag, remove invalid frames, and store the interleaved data into the container according to a fixed length (2048 Byte);

[0118] The interleaved data in the container is deinterleaved using the interleaving method of different series of Jilin-1 satellites;

[0119] Returns the length of the residual frame of interleaved data;

[0120] storing the deinterleaved data in the deinterleaving buffer into a new packet, and sending the new packet to the decryption queue;

[0121] Copy the residual frame data in the de-interleaving buffer to the buffer header, and update the residual frame length to the buffer length for the next packet of data to be copied;

[0122] S600, the decryption queue receives the data after data deinterleaving, copies it to the decryption buffer, processes the packet data according to the decryption rules, copies the residual frame data to the buffer header, and packages the processed data and sends it to the decompression queue.

[0123] Take the deinterleaved data from the decryption queue (decryptQueue) and copy it to the decryption cache (cacheDecrypt), release the memory space of the packet data, and update the cache data length;

[0124] Apply for a space of the same size as the data in the packet to store the decrypted data;

[0125] The decryption queue receives the deinterleaved data, copies it to the decryption buffer, searches for the decryption flag in the buffer, removes invalid frames, reads the serial number of each frame of encrypted data, and stores the encrypted data in a container according to a fixed length (8192Byte);

[0126] Sort and deduplicate all elements in the container according to the frame serial number of the encrypted data;

[0127] The encrypted data in the container is decrypted using the decryption algorithm function (decryptOneFrame) independently developed by Jilin-1 Satellite;

[0128] In order to improve the timeliness of decryption, a multi-threaded method is used to decrypt the elements in the container and return the length of the remaining frame of the encrypted data;

[0129] The decrypted data in the decryption buffer is stored in a new packet, and the new packet is sent to the decompression queue;

[0130] The residual frame data in the decryption buffer is copied to the buffer header, and the residual frame length is updated to the decryption buffer length for the next packet of data to be copied.

[0131] S700, the decompression queue receives the decrypted data, copies it to the decompression buffer, and searches for each line of image data according to the satellite image data communication protocol. After the search is completed, the residual frame data is copied to the buffer header, and the image data is sorted by line serial number. Use a multi-threaded method to split each line of image data into auxiliary data, full chromatographic segment data, and multi-spectral data, and package the three types of data and send them to the standardized output queue.

[0132] Take the decrypted data from the decompression queue (decompressQueue) and copy it to the decryption cache (cacheDecompress), release the memory space of the packet data, and update the cache data length;

[0133] According to the communication protocol of Jilin-1 satellite image data, search for each frame of image data, remove invalid frames, and store each frame of image data in the container. For the image data in the container, divide different imaging tasks according to the file number, imaging mode, and camera number in the auxiliary data, and return the residual frame length of the compressed data;

[0134] According to the communication protocol of Jilin-1 satellite image data, a fixed size of space is applied for each frame of image data to store the decompressed data;

[0135] Use multithreading to decompress the image data in the container and store the processed data in the pre-requested space of each frame;

[0136] According to the communication protocols of different series of Jilin-1 satellite images and the naming specifications of Jilin-1 satellite standard level 0 products, rename each frame of decompressed image data;

[0137] The image data of each frame after decompression in the buffer area is stored in a new packet, and the new packet is sent to the standardized output queue;

[0138] The residual frame data in the buffer is copied to the buffer header, and the residual frame length is updated to the buffer length for the next packet of data to be copied.

[0139] S800, after receiving the decompressed data, the standardized output queue copies it to the standardized output buffer area, and performs standardized output according to the size of the buffer area, thereby improving the write rate, such as Figure 3 shown.

[0140] Take the decompressed image data from the standardized output queue (outputQueue) and copy it to the decompression cache (cacheOutput), release the memory space of the image data package, and update the cache data length;

[0141] For the first frame of image data, directly copy it to the standardized output buffer area;

[0142] For subsequent frame image data, the name is first compared with the image data in the buffer. If the name is consistent and the buffer length does not exceed the boundary after copying the image data, the image data is copied to the buffer.

[0143] If the names are consistent but the buffer length exceeds the boundary after copying the image data, the image data is directly output and the buffer length is reset to 0;

[0144] If the naming is inconsistent, the image data is directly output, indicating that the data of the previous imaging task has been completely processed.

[0145] S900, after the ground receiving station finishes receiving the original satellite data, it disconnects the TCP connection. Figure 4 After receiving the TCP disconnection information, check whether there is unprocessed data in the deinterleaving, decryption, decompression, and standardization output queues in turn. When there is no unprocessed data in the queue, the processing ends, as shown in Figure 5 shown.

[0146] After the ground receiving station disconnects the TCP connection, it checks whether the deinterleaving queue is empty. If it is not empty, it continues to process the interleaved data, otherwise it closes the deinterleaving process and the deinterleaving module ends;

[0147] After the deinterleaving module is finished, check whether the decryption queue is empty. If it is not empty, continue to process the encrypted data, otherwise close the decryption process and the decryption module ends;

[0148] After the decryption module is finished, check whether the decompression queue is empty. If it is not empty, continue to process the compressed data, otherwise close the decompression process and the decompression module ends;

[0149] After the decompression module is finished, check whether the standardized output queue is empty. If it is not empty, continue to process the image data, otherwise close the standardized output process and the processing ends;

[0150] After the processing is completed, the relevant information of the processing is printed: the efficiency of interleaved data, the number of encrypted data frames, the efficiency of encrypted data, the number of imaging tasks for this data, and the time used for this processing.

[0151] In this embodiment, if Figure 6-11 As mentioned above, it supports various series of Jilin-1 satellites, including: Jilin-1 video series satellites, Jilin-1 spectrum series satellites, Jilin-1 high-resolution 02 series satellites, Jilin-1 high-resolution 03B series satellites, Jilin-1 high-resolution 03C series satellites, Jilin-1 wideband series satellites, etc.; and supports reception and processing of multiple demodulators, such as: Rongwei demodulator, Tsinghua demodulator, Aerospace Star demodulator; it can be seamlessly connected to the ground receiving station for use in processing the original data of Jilin-1 satellite;

[0152] The invention has a simple basic principle and a mature function library, and can realize real-time decryption and decompression of the original data of Jilin-1 satellite, and can be directly used for processing Jilin-1 satellite products. The Jilin-1 satellite can complete real-time decryption and decompression within 30 seconds after being received by the ground receiving station, and has strong practicality.

[0153] An electronic device described in this embodiment includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0154] Memory, used to store computer programs;

[0155] The processor is used to implement any method step described in the above implementation mode when executing the program stored in the memory.

[0156] The computer-readable storage medium described in this embodiment stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of the above embodiments are implemented.

[0157] The memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus RAM (DR RAM). It should be noted that the memory of the method described in the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0158] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).

[0159] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0160] It should be noted that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined and performed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0161] The above is a detailed introduction to the universal real-time decryption and decompression method, device and storage medium for the original data of Jilin-1 satellite based on the TCP protocol proposed in the present invention. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol, characterized in that: The following steps are involved: Step S1, respectively obtaining the Jilin-1 satellite code, thread number, output directory, satellite ground receiving station demodulator IP and TCP port number; Step S2, according to the Jilin-1 satellite code, respectively set the deinterleaving, decryption, decompression and standardization output buffer size; Step S3, initializing the TCP port number and connecting to the ground receiving station demodulator, and the ground receiving station demodulator starts to receive the original data of Jilin-1 satellite; Step S4, according to the Jilin-1 satellite data transmission code rate, the ground receiving station demodulator divides the received original data into packets, and sends the divided original data to the de-interleaving queue; Step S5, after receiving the original data, the deinterleaving queue copies it to the deinterleaving buffer area, processes the original data in the deinterleaving buffer area according to the deinterleaving rule, copies the residual frame data to the head of the deinterleaving buffer area, and packages the processed data and sends it to the decryption queue; Step S6, the decryption queue receives the deinterleaved data, copies it to the decryption buffer, processes the data according to the decryption rules, copies the residual frame data to the decryption buffer header, and packages the processed data and sends it to the decompression queue; Step S7, the decompression queue receives the decrypted data, copies it to the decompression buffer area, decompresses the image data using a multi-threaded method, and packages the decompressed image data and sends it to the standardized output queue; Step S8, after receiving the image data, the standardized output queue copies the image data to the standardized output buffer area, and outputs the image data in a standardized manner according to the size of the buffer area; Step S9, after the demodulator of the ground receiving station receives the raw data of Jilin-1 satellite, it disconnects the TCP port connection and checks in sequence whether there is any unprocessed data in the deinterleaving, decryption, decompression and standardization output queues. If there is no unprocessed data in the queue, the operation is terminated. If there is still unprocessed data in the queue, the queue continues to process data until there is no unprocessed data in the queue, and the operation is terminated. Each packet of data contains residual frame data related to adjacent packet data, and the size of the residual frame data is an uncertain value.

2. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol according to claim 1, characterized in that: After receiving the original data, the deinterleaving queue copies it to the deinterleaving buffer area, processes the original data in the deinterleaving buffer area according to the deinterleaving rule, copies the residual frame data to the head of the deinterleaving buffer area, and packages the processed data and sends it to the decryption queue, including the following steps: Step S501, taking out the original data of Jilin-1 satellite from the de-interleaving queue, copying it to the de-interleaving buffer area, releasing the memory space of the original data, and updating the length of the original data in the de-interleaving buffer area; Step S502, searching the interleaving flag in the deinterleaving buffer, removing invalid frames, and storing the interleaved data in a container according to a fixed length; Step S503, deinterleave the interleaved data in the container using the Jilin-1 different series satellite interleaving method; Step S504, returning the residual frame length of the interleaved data, copying the residual frame data to the head of the deinterleaving buffer area, and updating the residual frame length to the deinterleaving buffer area length; Step S505, applying for a new packet of the same size as the original data in step S501, storing the deinterleaved data in the deinterleaving buffer into the new packet, and sending the new packet to the decryption queue.

3. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol according to claim 2 is characterized in that: The fixed length is 2048 Bytes.

4. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol according to claim 1 is characterized in that: The decryption queue receives the deinterleaved data, copies it to the decryption buffer, processes the data according to the decryption rules, copies the residual frame data to the decryption buffer header, and packages the processed data and sends it to the decompression queue, including the following steps: Step S601, taking out the deinterleaved data from the decryption queue, copying it to the decryption buffer, releasing the memory space of the data, and updating the data length in the decryption buffer; Step S602, in the decryption buffer, search for the decryption flag, remove invalid frames, read the serial number of each frame of encrypted data, and store the encrypted data in a container according to a fixed length; Step S603, sorting and removing duplicates of all elements in the container according to the serial number of the encrypted data; Step S604, decrypting the encrypted data processed in step S603 using the decryption algorithm function of Jilin-1 satellite; Step S605, returning the residual frame length of the encrypted data, copying the residual frame data in the decryption buffer to the decryption buffer header, and updating the residual frame length to the decryption buffer length; Step S606, applying for a new packet of the same size as the data in step S601, storing the decrypted data in the decryption buffer into the new packet, and sending the new packet to the decompression queue.

5. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol according to claim 4 is characterized in that: The fixed length is 8192 Bytes.

6. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol according to claim 1 is characterized in that: The decompression queue receives the decrypted data, copies it to the decompression buffer area, decompresses the image data using a multi-threaded method, and packages the decompressed image data and sends it to the standardized output queue, including the following steps: Step S701, taking out the decrypted data from the decompression queue and copying it to the decompression buffer area, releasing the memory space of the data, and updating the data length in the decompression buffer area; Step S702, searching for each frame of image data according to the Jilin-1 different series satellite image data communication protocol, removing invalid frames, and storing each frame of image data in a container; Step S703, using multithreading to decompress each frame of image data in the container, and renaming each frame of decompressed image data according to the Jilin-1 satellite image data communication protocol of different series and the Jilin-1 satellite standard 0-level product naming specification; Step S704, returning the residual frame length of the decompressed data, copying the residual frame data in the decompression buffer area to the decompression buffer area header, and updating the residual frame length to the decompression buffer area length; Step S705, applying for a new packet of the same size as each frame of image data in step S703, storing the decompressed image data in the decompression buffer into the new packet, and sending the new packet to the standardized output queue.

7. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol according to claim 1 is characterized in that: After receiving the image data, the standardized output queue copies the image data to the standardized output buffer area, and outputs the image data in a standardized manner according to the size of the buffer area, including the following steps: Step S801, taking out the decompressed image data from the standardized output queue and copying it to the standardized output buffer, releasing the memory space of the image data, and updating the image data length in the standardized output buffer; Step S802, directly copying the first frame image data to the standardized output buffer area; Step S803, comparing the naming of the subsequent frame image data with the naming of the image data in the standardized output buffer area, determining whether the first condition and the second condition are met at the same time, if the first condition and the second condition are met at the same time, executing step S804, if the first condition is met but the second condition is not met, executing step S805, if the first condition is not met but the second condition is met, executing step S806; Step S804, copying the image data to the standardized output buffer; Step S805, directly output the image data and set the length of the standardized output buffer to 0; Step S806: directly output the image data.

8. The universal real-time decryption and decompression method for Jilin-1 satellite raw data based on TCP protocol according to claim 7 is characterized in that: The first condition is that the naming is consistent; The second condition is that the length of the standardized output buffer does not exceed the boundary after the image data is copied.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 8 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Method for controlling real-time decompressor of multi-spectrum band remote sensing images

    CN107046647A

  • Compression for deep learning in case of sparse values mapped to non-zero value

    CN109961392A