A satellite raw data preprocessing method and device based on Flink in hybrid transmission mode
By processing satellite raw data in real time on the Flink platform, the problem of high delay in satellite remote sensing data processing is solved, and efficient and accurate data preprocessing is achieved.
Patent Information
- Application Number
- CN202411178165.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-27
AI Technical Summary
In the prior art, data preprocessing is required to wait for the full-orbit satellite orbit data to be transmitted to the ground station before data preprocessing is performed, resulting in a high delay in satellite remote sensing data processing.
The satellite raw data preprocessing method is adopted based on Flink, and the satellite raw code stream data is obtained in real time, and the channel data is merged using the stream merging operator. The data synchronization operator controls the data packet consumption difference, and the preprocessing operator performs the Data packets are preprocessed and the sort output operator is used to sort and output data when preset conditions are met.
The original satellite data is "transmitted and processed at the same time", which reduces processing delays, ensures the correctness of data sorting and the accuracy of processing results.
Smart Images

Figure CN118713734B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of remote sensing satellite technology, and specifically to a satellite raw data preprocessing method and device based on Flink in a hybrid transmission mode. Background Art
[0002] Some remote sensing satellites, such as GF5, GF7, DQ and other satellites in mixed transmission mode, generally use dual-channel polarization multiplexing to transmit data to the ground. Due to the different recording rates of each payload data, the channels assigned to the recorded data during playback are not fixed, and the time when the two channels start transmission is slightly different, the data type (virtual channel) and sorting method (VCDU count) of the data frames transmitted in the two channels are not fixed, that is, "mixed data transmission". Under this transmission characteristic, a lot of data processing work needs to be completed when the ground is processing data.
[0003] However, the traditional remote sensing data preprocessing method needs to wait for the entire orbit data of the satellite to be transmitted to the ground station before processing the entire orbit data of the satellite, resulting in high processing delay of the current satellite remote sensing data. Summary of the invention
[0004] To this end, the present application provides a satellite raw data preprocessing method and device based on Flink in a hybrid transmission mode to solve the problem of high satellite remote sensing data preprocessing delay in the prior art caused by the need to wait for the entire orbital satellite data to be transmitted to the ground station before data preprocessing can be performed.
[0005] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a satellite raw data preprocessing method based on Flink in a mixed transmission mode, the method comprising: acquiring satellite raw code stream data in real time; the satellite raw code stream data comprises first channel data and second channel data; based on the stream merging operator in Flink, merging the first channel data and the second channel data to obtain merged data; the first channel data and the second channel data each comprise a plurality of data packets; in the process of outputting a data packet based on the merged data, based on the data synchronization operator in Flink, controlling the absolute value of the difference between the first data packet consumption and the second data packet consumption to be not greater than a first threshold; the first data packet consumption is used to indicate the first channel data. The consumption of data packets; the second data packet consumption is used to indicate the consumption of data packets in the second channel data; based on the preprocessing operator in Flink, perform data packet preprocessing on each output data packet to obtain multiple groups of AOS frame data, and cache the multiple groups of AOS frame data to corresponding cache areas respectively; for any cache area, based on the sorting output operator in Flink, execute the following steps: determine whether the preset condition is met; if the preset condition is met, sort the AOS frame data cached in the cache area; output part or all of the sorted AOS frame data; re-cache the AOS frame data that has not been output to the corresponding cache area, and return to the step of determining whether the preset condition is met.
[0006] According to the first aspect, or any implementation of the first aspect above, in the process of outputting a data packet based on the merged data, based on the data synchronization operator in Flink, the absolute value of the difference between the first data packet consumption and the second data packet consumption is controlled to be not greater than the first threshold, including: performing data packet transmission control operations for the first channel data and the second channel data, respectively; the data packet transmission control operation includes: when a data packet is received, determining whether the corresponding cache queue is empty; when the corresponding cache queue is not empty, adding the data packet to the corresponding cache queue, and, when the data packet is not the last data packet, returning to the step of determining whether the corresponding cache queue is empty when the data packet is received; when the corresponding cache queue is empty, determining whether the cache queue corresponding to another channel data is empty; when the cache queue corresponding to the other channel data is not empty, outputting the data packet and the first data packet in the cache queue corresponding to the other channel data, and, when the data packet is not the last data packet, returning to the step of determining whether the corresponding cache queue is empty when the data packet is received.
[0007] According to the first aspect, or any implementation of the first aspect above, the data packet transmission control operation also includes: when the cache queue corresponding to the other channel data is empty, determining whether the difference between the data packet consumption of the channel data and the data packet consumption of the other channel data is greater than or equal to the first threshold, and determining whether the output of the data packet of the other channel data has been completed; when the difference between the data packet consumption of the channel data and the data packet consumption of the other channel data is greater than or equal to the first threshold, and the data packet of the other channel data has not been output, adding the data packet to the corresponding cache queue, and when the data packet is not the last data packet, returning to the step of determining whether the corresponding cache queue is empty when the data packet is received; when the difference between the data packet consumption of the channel data and the data packet consumption of the other channel data is less than the first threshold, or, when it is determined that the output of the data packet of the other channel data has been completed, outputting the data packet, and, when the data packet is not the last data packet, returning to the step of determining whether the corresponding cache queue is empty when the data packet is received.
[0008] According to the first aspect, based on the preprocessing operator in Flink, each output data packet is preprocessed to obtain multiple groups of AOS frame data, including: for each output data packet: deinterleave the data packet to obtain I-channel data and Q-channel data; descramble the I-channel data and Q-channel data based on the initial state of the IQ channel scrambling code to obtain AOS frame data; the AOS frame data includes a virtual channel identifier; and the AOS frame data is grouped based on the virtual channel identifier.
[0009] According to the first aspect, when a preset condition is met, the AOS frame data cached in the buffer area is sorted, including: when the amount of cached AOS frame data is equal to or greater than a second threshold, the AOS frame data cached in the buffer area is sorted; or, when the transmission of satellite original code stream data is completed, the AOS frame data cached in the buffer area is sorted.
[0010] According to the first aspect, or any implementation of the first aspect above, the AOS frame data includes a class object, and the class object includes at least a frame count and valid data; the AOS frame data cached in the buffer area is sorted, including: sorting the class objects corresponding to the AOS frame data in order from small to large according to the frame count.
[0011] According to the first aspect, or any implementation method of the first aspect above, when the transmission of the satellite original code stream data is completed, after the AOS frame data cached in the buffer area is sorted, part or all of the sorted AOS frame data is output, including: outputting class objects corresponding to all the AOS frame data in the sorted order.
[0012] According to the first aspect, or any implementation method of the first aspect above, when the amount of cached AOS frame data is equal to or greater than a second threshold, after sorting the AOS frame data cached in the cache area, partially or completely output the sorted AOS frame data, including: outputting a preset percentage of class objects in the front in the sorting order.
[0013] According to the first aspect, or any implementation method of the first aspect above, class objects that rank at the top with a preset percentage are output in a sorted order, including: based on the sorted order, detecting whether there is a frame count reset; in the absence of a frame count reset, outputting class objects that rank at the top with a preset percentage in a sorted order; in the presence of a frame count reset, determining whether the first part meets the conditions for full output; the first part is the class object corresponding to the AOS frame data whose frame count has not been reset; when the first part meets the conditions for full output, all class objects contained in the first part are output according to the sorted order of the first part; when the first part does not meet the conditions for full output, the class objects that rank at the top with a preset percentage in the first part are output according to the sorted order of the first part.
[0014] According to the first aspect, or any implementation method of the first aspect above, based on the sorting order, detecting whether there is a frame count reset includes: detecting whether the difference between the frame counts contained in adjacent class objects is greater than the counting threshold; if the difference between the frame counts contained in adjacent class objects is greater than the counting threshold, determining that there is a frame count reset.
[0015] According to the first aspect, or any implementation method of the first aspect above, detecting whether the difference in frame counts contained in adjacent class objects is greater than a counting threshold includes: excluding class objects sorted at a front preset position and a back preset position, and detecting whether the difference in frame counts contained in remaining adjacent class objects is greater than the counting threshold.
[0016] The second aspect of the present application provides a satellite raw data preprocessing device based on Flink in a mixed transmission mode, the device comprising: an acquisition module for acquiring satellite raw code stream data in real time; the satellite raw code stream data comprises first channel data and second channel data; a merging module for merging the first channel data and the second channel data based on a stream merging operator in Flink to obtain merged data; the first channel data and the second channel data each comprise a plurality of data packets; a synchronization module for controlling the absolute value of the difference between the first data packet consumption and the second data packet consumption to be not greater than a first threshold value based on a data synchronization operator in Flink during a process of outputting a data packet based on the merged data; the first data packet consumption is used to indicate the number of packets in the first channel data. The first embodiment of the present invention is a method for controlling the consumption of AOS frame data packets in a first channel and a second channel. The first embodiment of the present invention is a method for controlling the consumption of AOS frame data packets in a first channel and a second channel. The first embodiment of the present invention is a method for controlling the consumption of AOS frame data packets in a first channel and a second channel. The first embodiment of the present invention is a method for controlling the consumption of AOS frame data packets in a first channel and a second channel. The first embodiment of the present invention is a method for controlling the consumption of AOS frame data packets in a first channel and a second channel. The first embodiment of the present invention is a method for controlling the consumption of AOS frame data packets in a first channel and a second channel. The first embodiment of the present invention is a method for controlling the consumption of AOS frame data packets in a first channel and a second channel.
[0017] The present application has the following advantages: In the satellite raw data preprocessing method based on Flink in the mixed transmission mode provided in the embodiment of the present application, firstly, the satellite raw code stream data acquired in real time is merged with the first channel data and the second channel data in the satellite raw code stream data based on the stream merging operator in Flink to obtain the merged data, that is, in the embodiment of the present application, the first acquired satellite raw code stream data can be processed without waiting until all satellite raw code stream data are transmitted before processing the data, which can achieve the effect of "processing while transmitting" the satellite raw code stream data and effectively reduce the processing delay of the satellite raw code stream data; secondly, in the process of outputting data packets based on the merged data, based on the data synchronization operator in Flink, the data in the first channel data and the second channel data are controlled. The absolute value of the difference in the consumption of the packet is not greater than the first threshold value, so as to balance the number of data packets outputted by the dual-channel data, effectively ensure the correctness of the subsequent data sorting, and reduce the probability of frame loss; then, based on the preprocessing operator in Flink, perform data packet preprocessing on each output data packet, obtain multiple groups of AOS frame data, and cache the multiple groups of AOS frame data to the corresponding buffer area respectively; then, for any buffer area, based on the sorting output operator in Flink, sort the AOS frame data cached in the buffer area when the preset conditions are met, and output the sorted AOS frame data partially or completely; and re-cache the unoutputted AOS frame data to the corresponding buffer area, and re-monitor whether the preset conditions are met, so as to realize the complete processing process of the satellite original code stream data. The satellite raw data preprocessing method based on Flink in the mixed transmission mode provided in the embodiment of the present application can not only improve the processing efficiency of satellite raw data and reduce processing delay, but also ensure the accuracy of the processing results at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide further understanding of the present application and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present application, but do not constitute a limitation to the present application.
[0019] Figure 1 A flowchart of a satellite raw data preprocessing method based on Flink in a hybrid transmission mode provided in an embodiment of the present application;
[0020] Figure 2 A flowchart of a data packet preprocessing method provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of a flow chart of a data packet transmission control operation provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of AOS frame data sorting in the case of frame count reset provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of an AOS frame data output method provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of an operator flow for processing satellite raw data provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of the process of processing satellite raw data provided in an embodiment of the present application;
[0026] Figure 8a An example diagram of a conventional satellite raw data processing time provided in an embodiment of the present application;
[0027] Figure 8b An example diagram of the satellite data preprocessing time of the present application provided in an embodiment of the present application;
[0028] Figure 8c An example diagram of a processing process of satellite raw data preprocessing based on Flink in a hybrid transmission mode provided in an embodiment of the present application;
[0029] Fig. 9 An example diagram of an application effect provided by an embodiment of the present application;
[0030] Fig.10 A schematic diagram of the structure of a satellite raw data preprocessing device based on Flink in a hybrid transmission mode provided in an embodiment of the present application;
[0031] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0033] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0034] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0035] The terms used in this application are only used to describe specific embodiments and are not intended to limit the present application.As used in this application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0036] When the terms “comprising” and / or “made of…” are used in this application, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0037] The embodiments described in the present application may be described with reference to plan views and / or cross-sectional views by means of ideal schematic diagrams of the present application. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.
[0038] Unless otherwise defined, all terms (including technical and scientific terms) used in this application have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this application.
[0039] Satellites such as GF5, GF7, and DQ use dual-channel polarization multiplexing to transmit data to the ground. Since the recording rates of each payload data are different, the channels assigned to the recorded data during playback are not fixed, and the time when the two channels start transmission is slightly different, the data type (virtual channel) and sorting method (VCDU count) of the data frames transmitted in the two channels are not fixed, that is, "mixed data transmission". Under this transmission characteristic, data multiplexing and sorting need to be completed when the ground processes data.
[0040] Apache Flink is a pure real-time distributed processing framework that supports high throughput, low latency, and high performance in the open source community in recent years. Globally, more and more companies are using Flink as their distributed big data processing engine on a large scale.
[0041] In view of Flink's high throughput, low latency, and high-performance pure real-time processing mode, in the embodiment of the present application, it is applied to the data processing in the remote sensing satellite hybrid transmission mode, which can effectively improve the efficiency of data processing. By reconstructing the Flink operator to design the real-time stream preprocessing process of the hybrid transmission mode remote sensing data, and adopting the data synchronization and sorting strategy, the data processing efficiency is improved while ensuring the processing accuracy.
[0042] Figure 1The flowchart of a satellite raw data preprocessing method based on Flink in a hybrid transmission mode provided by an embodiment of the present application. The satellite raw data preprocessing method based on Flink in the hybrid transmission mode is applied to a data preprocessing device, and the data preprocessing device is deployed in an electronic device. Figure 1 The satellite raw data preprocessing method based on Flink in the mixed transmission mode includes: steps S101 to S106.
[0043] Step S101: Acquire satellite original code stream data in real time.
[0044] In an embodiment of the present application, the remote sensing satellite sends the satellite raw code stream data to the ground station in real time. The ground station has a connection relationship with a distributed messaging system, such as Kafka, or the ground station is integrated with a distributed messaging system. The ground station sends the satellite raw code stream data received in real time to the distributed messaging system, and the electronic device in the present application that is deployed with a data preprocessing device obtains the satellite raw code stream data from the distributed messaging system in real time.
[0045] In an embodiment of the present application, the remote sensing satellite uses a dual-channel polarization multiplexing method to transmit data to the ground. Therefore, the satellite original code stream data includes first channel data and second channel data.
[0046] It is understandable that real-time acquisition of satellite raw code stream data is a continuous process. For example, the data preprocessing device can acquire satellite raw code stream data once per second until the satellite raw code stream data is transmitted. Taking the process of collecting 40G remote sensing data during one orbit of the satellite as an example, the satellite sends the collected remote sensing data (satellite raw code stream data) to the ground station at 400Mb per second. The ground station sends the received remote sensing data in real time to the distributed messaging system. The data preprocessing device can acquire 400Mb remote sensing data per second from the distributed messaging system until the 40G remote sensing data is transmitted.
[0047] Since acquiring satellite raw code stream data is a continuous process, the present application can process the first acquired satellite raw code stream data after acquiring part of the satellite raw code stream data, without waiting until all satellite raw code stream data are transmitted before processing the data, thus achieving the effect of "processing while transmitting" the satellite raw code stream data, and effectively reducing the processing delay of the satellite raw code stream data (the processing delay refers to the time between the completion of data transmission and the completion of data processing). The method of processing the satellite raw code stream data can be referred to the following detailed description.
[0048] Step S102: Based on the stream merging operator in Flink, merge the first channel data and the second channel data to obtain merged data.
[0049] The first channel data and the second channel data both include a plurality of data packets.
[0050] In the implementation of the present application, after the first channel data and the second channel data are merged by the stream merging operator (connect), the merged data has the characteristic of state sharing. For example, in the merged data, the first channel data and the second channel data share a data packet consumption counter, wherein the data packet consumption counter of the first channel data is used to count the number of data packets output (consumed) from the first channel data; and the data packet consumption counter of the second channel data is used to count the number of data packets output (consumed) from the first channel data.
[0051] In the implementation of the present application, based on the stream merge operator in Flink, the first channel data and the second channel data are merged to obtain merged data. The first channel data and the second channel data in the merged data can share a state (such as the number of data packets consumed), thereby facilitating the balancing of the data packet consumption of the two channel data in subsequent processes.
[0052] Step S103: In the process of outputting the data packet based on the merged data, based on the data synchronization operator in Flink, control the absolute value of the difference between the consumption of the first data packet and the consumption of the second data packet to be no greater than a first threshold.
[0053] The first data packet consumption is used to indicate the consumption of data packets in the first channel data; the second data packet consumption is used to indicate the consumption of data packets in the second channel data. The first threshold is used to characterize the maximum allowable consumption difference threshold between the dual channel data. The specific value of the first threshold can be set according to the actual application, for example, it can be set to 5, or it can be set to 7, which is not specifically limited in the embodiments of the present application.
[0054] It should be noted that when the remote sensing satellite uses dual-channel polarization multiplexing to transmit data to the ground (mixed transmission mode), if the consumption speed difference of the dual-channel data is too large, it will often cause frame loss in subsequent sorting. Therefore, in the embodiment of the present application, in the process of outputting data packets based on the merged data, based on the data synchronization operator in Flink, the absolute value of the difference between the consumption of the first data packet and the consumption of the second data packet is controlled to be no greater than the first threshold value to balance the output number of data packets in the dual-channel data, which can effectively ensure the correctness of subsequent data sorting and avoid frame loss.
[0055] After the data packet is output from the dual-channel data, the data packet needs to be pre-processed to separate the AOS frame data from the data packet.
[0056] Step S104: Based on the preprocessing operator in Flink, perform data packet preprocessing on each output data packet to obtain multiple groups of AOS frame data.
[0057] Among them, data packet preprocessing includes de-interleaving processing, de-scrambling processing and classification processing.
[0058] Figure 2 A flowchart of a data packet preprocessing method provided in an embodiment of the present application. In one embodiment, Figure 2 As shown, based on the preprocessing operator in Flink, each output data packet is preprocessed to obtain multiple groups of AOS frame data, including: steps S1041 to S1043.
[0059] Step S1041: For each output data packet, deinterleave the data packet to obtain I-channel data and Q-channel data.
[0060] In the embodiment of the present application, when the satellite transmits data, it interleaves two data paths (I data path and Q data path) bit by bit to form a data packet. Therefore, for each output data packet, it can be deinterleaved alternately bit by bit according to IQ, so as to obtain I data path and Q data path. For example, a data packet is 2048 bytes. After the data packet is deinterleaved, 1024 bytes of I data path and 1024 bytes of Q data path are obtained.
[0061] Step S1042: Descramble the I-channel data and the Q-channel data based on the initial state of the IQ-channel scrambling code to obtain AOS frame data.
[0062] The initial state of the IQ scrambling code is used to indicate the decryption key of the I data and the Q data.
[0063] In an embodiment of the present application, I-channel data and Q-channel data are descrambled based on an initial state of an IQ-channel scrambling code to obtain AOS frame data, including: generating PN codes (Pseudo-Noise Code, which is a coding sequence composed of 0 and 1 having an autocorrelation property similar to white noise) for the I-channel data and the Q-channel data respectively based on the initial state of the IQ-channel scrambling code, descrambling the I-channel data based on the I-channel data to obtain AOS frame data corresponding to the I-channel data, and descrambling the Q-channel data based on the Q-channel data to obtain AOS frame data corresponding to the Q-channel data.
[0064] In an embodiment of the present application, the AOS frame data includes one or more of a virtual channel identifier, a frame count, a valid length, and valid data. Among them, the virtual channel identifier is an identifier of a virtual channel. The frame count is used to characterize the number of frame data in the virtual channel that the AOS frame data is. The valid length is used to indicate the data length of the valid data. The valid data includes the payload data in the frame data, for example, remote sensing satellite image data.
[0065] Step S1043: group the AOS frame data based on the virtual channel identifier to obtain multiple groups of AOS frame data.
[0066] In the embodiment of the present application, the AOS frame data is grouped based on the virtual channel identifier, so that the AOS frame data under different virtual channels can be separated, and the AOS frame data under each virtual channel is used as a partition.
[0067] Step S105: Buffering the multiple groups of AOS frame data into corresponding buffer areas respectively.
[0068] In this step, in order to improve data processing efficiency and facilitate parallel processing of each group of AOS frame data, each group of AOS frame data may be cached in a cache area, and the cache areas of each group of AOS frame data are different.
[0069] It can be understood that, based on the preprocessing operator in Flink, each output data packet is preprocessed to finally obtain multiple groups of AOS frame data. In the subsequent process, the multiple groups of AOS frame data can be processed in parallel, thereby improving the processing efficiency of satellite data.
[0070] Step S106: For any buffer area, sorting and output operations are performed based on the sorting output operator in Flink.
[0071] In an embodiment of the present application, after storing multiple groups of AOS frame data in the buffer areas respectively, sorting and output operations can be performed on each buffer area in parallel, thereby improving the efficiency of satellite raw data preprocessing.
[0072] The sorting and outputting operations include: the following steps S1061 to S1064.
[0073] Step S1061: Determine whether a preset condition is met.
[0074] The preset conditions include (1) or (2): (1) the amount of AOS frame data cached in the buffer is equal to or greater than a second threshold, wherein the second threshold is determined according to the capacity of the buffer, for example, the second threshold may be 90% of the buffer capacity, or 95% of the buffer capacity, which is not specifically limited in the embodiments of the present application. (2) The satellite original code stream data transmission ends. It is understandable that when the satellite original code stream data transmission ends, no new AOS frame data will be generated, and therefore the currently cached AOS frame data can be sorted.
[0075] The preset condition is a condition for indicating whether the AOS frame data buffered in the buffer area needs to be sorted.
[0076] If the preset condition is not met, the AOS frame data continues to be buffered, and the process returns to the step of determining whether the preset condition is met.
[0077] Step S1062: When a preset condition is met, sort the AOS frame data cached in the buffer area.
[0078] Step S1063: partially or completely output the sorted AOS frame data.
[0079] Step S1064 , re-caching the unoutputted AOS frame data into the corresponding buffer area, and returning to the step of determining whether the preset condition is met (the above-mentioned step S1061 ).
[0080] In the implementation of the present application, after the AOS frame data in the buffer area is sorted, not all of the sorted AOS frame data is necessarily output, but it is necessary to determine whether to leave a part of the AOS frame data to participate in the sorting again according to the actual situation to improve the accuracy of the sorting.
[0081] In the satellite raw data preprocessing method based on Flink in the mixed transmission mode provided in the embodiment of the present application, firstly, the satellite raw code stream data acquired in real time is combined with the first channel data and the second channel data in the satellite raw code stream data based on the stream merging operator in Flink to obtain the combined data, that is, in the embodiment of the present application, the first acquired satellite raw code stream data can be processed without waiting until all satellite raw code stream data are transmitted before processing the data, which can achieve the effect of "processing while transmitting" the satellite raw code stream data and effectively reduce the processing delay of the satellite raw code stream data; secondly, in the process of outputting data packets based on the combined data, based on the data synchronization operator in Flink, the consumption of data packets in the first channel data and the second channel data is controlled The absolute value of the difference is not greater than the first threshold value, so as to balance the number of data packets outputted by the dual-channel data, effectively ensure the correctness of the subsequent data sorting, and reduce the probability of frame loss; then, based on the preprocessing operator in Flink, perform data packet preprocessing on each output data packet, obtain multiple groups of AOS frame data, and cache the multiple groups of AOS frame data to the corresponding buffer area respectively; then, for any buffer area, based on the sorting output operator in Flink, sort the AOS frame data cached in the buffer area when the preset conditions are met, and output the sorted AOS frame data partially or completely; and re-cache the AOS frame data that has not been outputted to the corresponding buffer area, and re-monitor whether the preset conditions are met, thereby realizing the complete processing process of the satellite original code stream data. The satellite raw data preprocessing method based on Flink in the mixed transmission mode provided in the embodiment of the present application can not only improve the processing efficiency of satellite raw data, but also ensure the accuracy of the processing results at the same time.
[0082] In one embodiment, the data preprocessing device controls the absolute value of the difference between the consumption of the first data packet and the consumption of the second data packet to be no greater than the first threshold value based on the data synchronization operator in Flink during the process of outputting the data packet based on the merged data, thereby balancing the data of the dual-channel data including the output quantity, effectively ensuring the correctness of the subsequent data sorting, and reducing the probability of frame loss. Figure 3 The processing flow of the data synchronization operator is described in detail.
[0083] In the process of outputting data packets based on the merged data, based on the data synchronization operator in Flink, the step of controlling the absolute value of the difference between the first data packet consumption and the second data packet consumption to be not greater than the first threshold (the above-mentioned step S103) includes: performing data packet transmission control operations on the first channel data and the second channel data, respectively.
[0084] Figure 3 A flowchart of a data packet transmission control operation provided by an embodiment of the present application. Figure 3 The data packet transmission control operation includes the following steps S201-S211.
[0085] Step S201: When a data packet is received, determine whether the corresponding cache queue is empty.
[0086] The cache queue corresponding to the data packet in the first channel data is the first cache queue; the cache queue corresponding to the data packet in the first channel data is the second cache queue.
[0087] The data cache queue is used to cache data packets to be transmitted. The data cache queue has a first-in-first-out feature, that is, the data packet added to the data cache queue first is output first. In this step, the purpose of determining whether the corresponding cache queue is empty is to determine whether there is currently an untransmitted data packet in the corresponding cache queue.
[0088] In this step, taking the first channel as an example, when a data packet in the first channel data is received, it is determined whether the first cache queue is empty; taking the second channel as an example, when a data packet in the second channel data is received, it is determined whether the second cache queue is empty.
[0089] Step S202: When the corresponding cache queue is not empty, add the data packet to the corresponding cache queue.
[0090] Among them, when the corresponding cache queue is not empty, it means that there is currently an untransmitted data packet in the corresponding cache queue, and the untransmitted data packet needs to be sent before the current data packet. Therefore, the data packet is added to the corresponding cache queue to wait for transmission.
[0091] Step S203: Determine whether the data packet is the last data packet.
[0092] In the case that the data packet is not the last data packet, the process returns to the step of determining whether the corresponding buffer queue is empty when the data packet is received (the above step S201 ).
[0093] When the data packet is the last data packet, the data packet output of the channel data is terminated.
[0094] In one embodiment, the data packet includes a position identifier, and the position identifier is used to indicate whether the data packet is an intermediate data packet or a last data packet. Determining whether the data packet is the last data packet includes: determining whether the position identifier in the data packet is an end identifier; if the position identifier is an end identifier, determining that the data packet is the last data packet in the channel data; if the position identifier is not an end identifier, determining that the data packet is not the last data packet in the channel data.
[0095] It can be understood that the above-mentioned operation of receiving and outputting data packets from the first channel data or the second channel data can be considered as a consumption operation of data packets. The number of data packets output after receiving from the first channel can be considered as the consumption of data packets in the first channel data, that is, the first data packet consumption. The number of data packets output after receiving from the second channel can be considered as the consumption of data packets in the second channel data, that is, the second data packet consumption.
[0096] Step S204: When the corresponding cache queue is empty, determine whether the cache queue corresponding to another channel data is empty.
[0097] Among them, when the corresponding cache queue is empty, it means that the transmission channel is not blocked and the data packet can be output. However, in order to maintain the balance of data packet consumption, when transmitting this data packet, it is hoped that a data packet of another channel data is also transmitted synchronously. Therefore, it is necessary to first determine whether the cache queue corresponding to the data of another channel is empty, that is, to determine whether there is a data packet to be transmitted in the data of another channel.
[0098] In one embodiment, the cache queue corresponding to the data packet in the first channel data is the first cache queue, and the cache queue corresponding to another channel data is the second cache queue.
[0099] In another embodiment, the cache queue corresponding to the data packet in the first channel data is the second cache queue, and the cache queue corresponding to another channel data is the first cache queue.
[0100] Step S205: when the cache queue corresponding to the other channel data is not empty, output the data packet and the first data packet in the cache queue corresponding to the other channel data.
[0101] Among them, when the cache queue corresponding to the other channel data is not empty, it means that there is a data packet to be transmitted in the cache queue corresponding to the other channel data. Therefore, the data packet can be output together with the front data packet in the cache queue corresponding to the other channel data, thereby realizing the operation of synchronously outputting one data packet from each of the two channel data, and maintaining the balance of data packet consumption in the two channel data.
[0102] Step S206: Determine whether the data packet is the last data packet.
[0103] In the case that the data packet is not the last data packet, the process returns to the step of determining whether the corresponding buffer queue is empty when the data packet is received (the above step S201 ).
[0104] When the data packet is the last data packet, the data packet output of the channel data is terminated.
[0105] Step S207: when the cache queue corresponding to the other channel data is empty, determine whether the difference between the data packet consumption of the channel data and the data packet consumption of the other channel data is greater than or equal to the first threshold, and determine whether the data packet output of the other channel data is completed.
[0106] If the cache queue corresponding to the other channel data is empty, it means that there is no data packet to be transmitted in the cache queue corresponding to the other channel data, that is, it is currently impossible to implement the operation of outputting one data packet from each of the two channel data. At this time, the data packet needs to be cached to wait for the data packet to be transmitted to appear in the other cache queue, or the data packet needs to be directly output separately.
[0107] In order to determine whether the next step is to cache and wait for a data packet to be transmitted to appear in another cache queue, or to directly output the data packet separately, it is necessary to determine whether the difference between the data packet consumption of the channel data and the data packet consumption of another channel data is greater than or equal to a first threshold, and to determine whether the output of the data packet of the other channel data has been completed.
[0108] The first threshold is used to represent the maximum allowable consumption difference threshold between the dual-channel data.
[0109] In one embodiment, the first data packet consumption is Num1, the second data packet consumption is Num2, the first threshold is T, the end of the first channel data flow is represented by End1, and the end of the second channel data flow is represented by End2.
[0110] In this step, when the received data packet is a data packet in the first channel data, the judgment condition for determining whether the difference between the data packet consumption of the first channel data and the data packet consumption of the second channel data is greater than or equal to the first threshold value, and determining whether the output of the data packet of the second channel data is finished, can be expressed as: Num1-Num2≥T&&!end2. Among them, "&&" means "and", and "!" means "not". In the case that both "Num1-Num2≥T" and "!end2" are satisfied, the judgment condition output is yes; in the case that any one of "Num1-Num2≥T" and "!end2" is not satisfied, the judgment condition output is no.
[0111] When the received data packet is a data packet in the second channel data, whether the difference between the data packet consumption of the second channel data and the data packet consumption of the first channel data is greater than or equal to the first threshold value, and whether the output of the data packet of the first channel data is finished, can be expressed as: Num2-Num1>(T-1)&&!end1. When both "Num2-Num1>(T-1)" and "!end1" are satisfied, the judgment condition output is yes; when any one of "Num2-Num1>(T-1)" and "!end1" is not satisfied, the judgment condition output is no.
[0112] It should also be noted that since the first channel data and the second channel data are merged through the merge stream operator and can share a state, the processing module that processes the first channel data can synchronously obtain the data packet consumption of the second channel data, and the processing module that processes the second channel data can also synchronously obtain the data packet consumption of the first channel data.
[0113] Step S208: When the difference between the data packet consumption of the channel data and the data packet consumption of another channel data is greater than or equal to the first threshold, and the data packet of the other channel data has not been outputted, add the data packet to the corresponding cache queue.
[0114] Wherein, when the difference between the data packet consumption of the channel data and the data packet consumption of another channel data is greater than or equal to the first threshold value, and the data packet of the other channel data has not been outputted, it means that the difference between the data packet consumption of the channel data and the data packet consumption of the other channel data has reached the maximum allowable consumption difference threshold value, and there will be data packets coming from the other channel data later. Therefore, the data packet selected in step S201 should be cached to wait for the data packet to be transmitted to appear in another cache queue, so as to keep the consumption of the data packets in the two channel data balanced and avoid further aggravating the difference between the data packet consumption of the two channel data.
[0115] Step S209: Determine whether the data packet is the last data packet.
[0116] In the case that the data packet is not the last data packet, the process returns to the step of determining whether the corresponding buffer queue is empty when the data packet is received (the above step S201 ).
[0117] When the data packet is the last data packet, the data packet output of the channel data is terminated.
[0118] Step S210: When the difference between the data packet consumption of the channel data and the data packet consumption of another channel data is less than a first threshold, or when it is determined that the output of the data packet of another channel data is finished, output the data packet.
[0119] In one embodiment, when the difference between the data packet consumption of the channel data and the data packet consumption of another channel data is less than a first threshold, it means that the data packet consumption of the two channel data has not reached an unbalanced level, and the received data packet can be output, thereby avoiding the accumulation of data packets and speeding up the data processing process.
[0120] In another embodiment, when it is determined that the data packet output of another channel data has ended, the data packet received in step S201 needs to be output regardless of the difference in the number of data packet consumption of the two channel data.
[0121] Step S211: Determine whether the data packet is the last data packet.
[0122] In the case that the data packet is not the last data packet, the process returns to the step of determining whether the corresponding buffer queue is empty when the data packet is received (the above step S201 ).
[0123] When the data packet is the last data packet, the data packet output of the channel data is terminated.
[0124] In actual application, the data packet consumption control for the first channel data and the data packet consumption control for the second channel data are performed in parallel, and the two can be executed by different processing modules. The following takes the data packet consumption control for the first channel data as an example to illustrate the process of data packet consumption control.
[0125] Step 1: When a data packet is received from the first channel, determine whether the first cache queue is empty.
[0126] The cache queue corresponding to the data packet in the first channel data is the first queue; the cache queue corresponding to the data packet in the first channel data is the second queue.
[0127] Step 2: When the first cache queue is not empty, add the data packet to the first cache queue.
[0128] Step 3: Determine whether the data packet is the last data packet. If the data packet is not the last data packet, return to step 1.
[0129] When the data packet is the last data packet, the data packet output of the first channel data is terminated.
[0130] Step 4: When the first cache queue is empty, determine whether the second cache queue is empty.
[0131] Step 5: if the second cache queue is not empty, output the data packet and the first data packet in the second cache queue, and if the data packet is not the last data packet, return to step 1.
[0132] Step 6: When the second cache queue is empty, determine whether the difference between the first data packet consumption and the second data packet consumption is greater than or equal to the first threshold, and determine whether the data packet of the second channel data is outputted completely.
[0133] The difference between the first data packet consumption and the second data packet consumption is the result of subtracting the second data packet consumption from the first data packet consumption.
[0134] Step 7: When the difference between the first data packet consumption and the second data packet consumption is greater than or equal to the first threshold, and the data packet of the second channel data has not been outputted, add the data packet to the first cache queue, and when the data packet is not the last data packet, return to step 1.
[0135] Step 8: When the difference between the consumption of the first data packet and the consumption of the second data packet is less than the first threshold, or when it is determined that the output of the data packet of the second channel data has ended, output the data packet. And, when the data packet is not the last data packet, return to step 1.
[0136] It is understandable that the processing flow of controlling the consumption of data packets for the first channel data is similar to the processing flow of controlling the consumption of data packets for the second channel data. Therefore, the processing flow of controlling the consumption of data packets for the second channel data is not repeated in the embodiment of the present application. It should be noted that when controlling the consumption of data packets for the second channel data, the above step six is replaced by: when the first cache queue is empty, determining whether the difference between the consumption of the second data packet and the consumption of the first data packet (the consumption of the second data packet minus the consumption of the first data packet) is greater than or equal to the first threshold, and determining whether the output of the data packet of the first channel data is completed.
[0137] In an embodiment of the present application, the processing flow for controlling the data packet consumption of the first channel data is a parallel processing flow with the processing flow for controlling the data packet consumption of the second channel data, which can not only improve the efficiency of satellite raw data processing, but also balance the number of data packet outputs of the dual-channel data, effectively ensure the correctness of subsequent data sorting, reduce the probability of frame loss, and ensure the accuracy of the processing results.
[0138] In one embodiment, when the preset condition is met, sorting the AOS frame data cached in the buffer area (the above step S1062 ) includes the following step a1.
[0139] Step a1: when the satellite original code stream data transmission is completed, the AOS frame data cached in the buffer area is sorted.
[0140] Among them, when the transmission of the satellite original code stream data is completed, no new AOS frame data will appear, all AOS frame data have been stored in the corresponding buffer areas respectively, and the AOS frame data in each buffer area can be sorted respectively.
[0141] The AOS frame data includes a class object, which includes at least a frame count and valid data, and may also include a valid length. The frame count is used to indicate the number of frames of data in a virtual channel that the AOS frame data is. The valid length is used to indicate the data length of the valid data. The valid data includes the payload data in the frame data, such as remote sensing satellite image data; the valid length is used to indicate the length of the valid data in bytes.
[0142] Since the image data actually collected by the satellite is included in the valid data in the AOS frame data, some format data in the AOS frame data can be discarded when sorting the AOS frame data. In the above step a1, the step of sorting the AOS frame data cached in the buffer area includes: obtaining the class object corresponding to each AOS frame data; sorting the class objects corresponding to the AOS frame data in the order of frame count from small to large.
[0143] In some embodiments, after obtaining the class object corresponding to each AOS frame data, for each AOS frame, the class object corresponding to the AOS frame data can be placed in an array, and the array size defaults to 200*1024. When the class objects are subsequently sorted and output, the class objects can all exist in the form of an array.
[0144] In this implementation, after the class objects corresponding to the AOS frame data are sorted, the following step a2 is performed.
[0145] Step a2: Output the class objects corresponding to all AOS frame data in sorted order.
[0146] In this implementation, since the transmission of the satellite original code stream data is finished and no new AOS frame data will arrive afterwards, the class objects corresponding to all AOS frame data are output in sorted order, which can improve data processing efficiency.
[0147] In another embodiment, when the preset condition is met, sorting the AOS frame data cached in the buffer area (the above step S1062 ) includes the following step b1.
[0148] Step b1: When the amount of cached AOS frame data is equal to or greater than a second threshold, sort the AOS frame data cached in the cache area.
[0149] Among them, the second threshold is determined according to the size of the cache area capacity. For example, the second threshold may be 50% of the cache area capacity, or 90% of the cache area capacity, or 100% of the cache area capacity. No specific limitation is made in the embodiments of the present application.
[0150] In this embodiment, when a certain amount of AOS frame data is cached in the cache area, the cached AOS frame data is sorted. Sorting can be performed while ensuring that there is enough data to be sorted, thereby avoiding the situation where some AOS frame data is not extracted and most of the AOS frames before and after the part of the AOS frame data have already participated in the sorting, thereby causing inaccurate sorting.
[0151] The AOS frame data includes a class object, which includes at least a frame count and valid data, and may also include a valid length. Since the image data actually collected by the satellite is included in the valid data in the AOS frame data, some format data in the AOS frame data can be discarded when sorting the AOS frame data. In the above step b1, the AOS frame data cached in the buffer area is sorted, including: obtaining the class object corresponding to each AOS frame data; sorting the class objects corresponding to the AOS frame data in order from small to large according to the frame count.
[0152] In this embodiment, when the amount of the cached AOS frame data is equal to or greater than the second threshold, after sorting the AOS frame data cached in the buffer area, the following step b2 is performed.
[0153] Step b2: Output the class objects that rank in the top preset percentage according to the sorting order.
[0154] In this implementation, since the transmission of the satellite original code stream data has not yet ended, new AOS frame data may be cached in the buffer area later. A portion of the AOS frame data with a smaller frame count has basically all arrived and participated in this sorting process, while a portion of the AOS frame data with a larger frame count may not have arrived yet and cannot participate in this sorting process. Therefore, after the AOS frame data cached in the buffer area is currently sorted, in the sorting order, the sorting order accuracy of the AOS frames in the front part is higher, while the sorting order accuracy of the AOS frame data in the back part is lower. Therefore, when outputting the frame data, according to the sorting order, the class objects that are in the front of the preset percentage are output to improve the sorting accuracy of the output part.
[0155] The preset percentage can be set according to actual conditions, for example, 10%, 50%, or 70%, which is not specifically limited in the embodiments of the present application. The larger the value of the preset percentage setting, the higher the data processing efficiency; the smaller the value of the preset percentage setting, the higher the accuracy of the data processing result. In practical applications, the comprehensive data processing efficiency and the accuracy of the processing result can be considered to set the preset percentage.
[0156] In this implementation, when the satellite original code stream data transmission is not completed, after the class objects corresponding to the AOS frame data are sorted, the class objects that are ranked in the front by a preset percentage are output in the sorting order, which can improve the sorting accuracy of the output part.
[0157] In one embodiment, the AOS frame data may have a frame count reset. For example, if the maximum frame count is set to 90000, after the frame count in a certain frame of AOS frame data reaches 90000, the frame count in the next frame of AOS frame data will become 0. Although the AOS frame data with a frame count of 0 is the next frame of the AOS frame data with a frame count of 9000, when sorting from small to large according to the frame count, the AOS frame data with a frame count of 0 will be ranked before the AOS frame data with a frame count of 9000.
[0158] Figure 4 A schematic diagram of AOS frame data sorting under a frame count reset condition provided by an embodiment of the present application. Figure 4 As shown, in the case where the frame count is reset, the sorted AOS frame data includes two parts: a small frame part and a large frame part.
[0159] The AOS frame data included in the small frame part is sorted before the AOS frame data included in the large frame part. The AOS frame data included in the small frame part is the AOS frame data after the frame count is reset, for example, Figure 4The frame count of the first frame of AOS frame data in the small and medium frame part is 0. The AOS frame data contained in the large frame part is the AOS frame data before the frame count is reset, for example, Figure 4 The frame count of the last frame of AOS frame data in the medium and large frame part is the maximum frame count value X.
[0160] The difference between the frame count of the last frame of AOS frame data of the small frame part and the frame count of the first frame of AOS frame data of the large frame part is greater than the preset counting threshold. That is, the frame count difference between adjacent frames corresponding to the frame count reset position is greater than the counting threshold. The counting threshold can be set according to the actual application situation, for example, 5000.
[0161] It can be understood that although the AOS frame data contained in the small frame part is sorted before the AOS frame data contained in the large frame part, the AOS frame data contained in the small frame part is generated after the AOS frame data contained in the large frame part, and needs to be output after the AOS frame data contained in the large frame part to ensure the sorting accuracy of the output results.
[0162] Figure 5 A schematic diagram of an AOS frame data output method provided in an embodiment of the present application. Figure 5 Taking as an example, the step of outputting the class objects with a preset percentage in the sorting order in the above step b2 is described in detail. The step of outputting the class objects with a preset percentage in the sorting order includes: the following steps S501 to S505.
[0163] Step S501: Based on the sorting order, detect whether there is a frame count reset.
[0164] In one embodiment, based on the sorting order, detecting whether there is a frame count reset includes: detecting whether the difference between the frame counts contained in adjacent class objects is greater than the count threshold, and determining that there is a frame count reset if the difference between the frame counts contained in adjacent class objects is greater than the count threshold; otherwise, determining that there is no frame count reset.
[0165] In one embodiment, detecting whether the difference in frame counts included in adjacent class objects is greater than a counting threshold includes: excluding class objects sorted at a front preset position and a back preset position, and detecting whether the difference in frame counts included in remaining adjacent class objects is greater than the counting threshold.
[0166] In this embodiment, the ordering of the frame counts in the class objects arranged at the front preset position and the class objects arranged at the back preset position is unstable, and therefore, the elements arranged at the front preset position and the class objects arranged at the back preset position are defined as the bit error area. When detecting whether there is a frame count reset, the class objects in the bit error area are excluded, and it is detected whether the difference of the frame counts included in the remaining adjacent class objects is greater than the count threshold, so as to improve the monitoring accuracy of the frame count reset position.
[0167] Step S502: In the absence of a frame count reset, output the class objects that are ranked in the front by a preset percentage according to the sorting order.
[0168] Step S503: In the case where the frame count is reset, determine whether the first part meets the conditions for full output.
[0169] In the case of frame count reset, the class objects participating in the sorting are divided into a first part and a second part with the detected frame count reset position as the dividing point. The first part is the class object corresponding to the AOS frame data whose frame count is not reset, such as the aforementioned Figure 4 The second part is the class object corresponding to the AOS frame data whose frame count is reset, such as the aforementioned Figure 4 The small frame part in .
[0170] The condition for outputting all of the first part is that: during the output of the previous AOS frame data, a frame count reset is detected, and a preset percentage of class objects in the first part of the previous output are output.
[0171] Step S504: when the first part meets the conditions for full output, all class objects contained in the first part are output according to the sorting order of the first part.
[0172] Step S505: when the first part does not meet the conditions for outputting all of the objects, output the class objects that are ranked in the front by a preset percentage in the first part according to the sorting order of the first part.
[0173] The preset 100% may refer to the detailed description in the aforementioned embodiment, which will not be repeated here.
[0174] In this implementation, a "two-stage output" strategy is adopted for the frame count reset situation, so as to accurately separate the data before and after the frame count reset. When it is found that the frame count is reset in the sorted class object array, the elements with a preset percentage in the first part (large frame part) are output for the first time (to prevent the unsorted AOS frame data belonging to the first part in the subsequent data stream), and then the next round of sorting is performed. The AOS frame data of the first part (large frame part) is directly output for the second time (at this time, the AOS frame data of the first part is completely output, and there will be no subsequent data streams). After the first part is fully output, the AOS frame data of the second part (small frame part) can be output in the next round, so as to achieve accurate separation of the data before and after the frame count reset and improve the accuracy of the sorting of the output part.
[0175] Figure 6 A schematic diagram of an operator flow for satellite raw data processing provided in an embodiment of the present application.
[0176] In the embodiment of the present application, operator stream generation is performed: Flink operators are reconstructed to achieve real-time stream preprocessing of remote sensing satellite mixed transmission mode data. Figure 6 As shown, the generated operator flow for processing satellite raw data includes: a stream merging operator 61, a data synchronization operator 62, a preprocessing operator 63 and a sorting output operator 64.
[0177] The data source may input a satellite raw data stream into the stream merging operator, where the satellite raw data stream includes first channel data and second channel data.
[0178] The stream merging operator is used to receive the satellite original data stream sent by the data source, merge the first channel data and the second channel data in the satellite original data stream to obtain merged data, and input the merged data into the data synchronization operator.
[0179] The data synchronization operator is used to output a data packet to the preprocessing operator based on the merged data, and in the process of outputting the data packet, control the absolute value of the difference between the first data packet consumption and the second data packet consumption to be no greater than a first threshold.
[0180] The preprocessing operator is used to preprocess the data packet, and the preprocessing of the data packet includes deinterleaving, descrambling and AOS frame data classification, and is also used to cache multiple groups of AOS frame data into corresponding cache areas according to the categories of the AOS frame data.
[0181] The sorting output operator is used to perform sorting and output operations on the AOS frame data in each buffer in parallel.
[0182] In an embodiment of the present application, the satellite raw data processing flow is designed into multiple stream processing operators, and the conventional processing for the high-throughput batch processing mode of the entire track data is transformed into the pipeline processing of single-frame data in the real-time stream processing mode, thereby hiding the processing time and minimizing the processing delay.
[0183] Figure 7 Schematic diagram of the process of processing satellite raw data provided in the embodiment of the present application. In the satellite raw data preprocessing method provided in the embodiment of the present application, the transmission of satellite raw data is a continuous process. Figure 7 As shown, the satellite raw data transmission starts at time t1 and ends at t5. After a part of the satellite raw data is transmitted, at time t2, the part of the satellite raw data transmitted first can be merged and synchronized with the dual-channel data. The data merging is performed by the stream merging operator, and the dual-channel data synchronization is performed by the data synchronization operator. Please refer to the detailed description in the above embodiment, which will not be repeated here. At time t6, the process of data merging and dual-channel data synchronization ends.
[0184] After the data packets are outputted during the dual-channel data synchronization process, at time t3, the data packets can be pre-processed in the output order of the data packets to obtain AOS frame data; multiple data packets can also be pre-processed in parallel to obtain AOS frame data. At time t7, all data packets are outputted.
[0185] When the AOS frame data accumulates to a certain amount, for example, at time t4, the AOS frame data can be mixed and sorted and output. At time t8, the mixed and sorted frame and output are completed, and the transmitted satellite raw data has been processed. The delay of the data processing is t8-t5.
[0186] like Figure 7 As shown, the process of satellite raw data processing provided by the embodiment of the present application is a pipeline processing process, which can achieve the effect of "processing while transmitting" the satellite raw data, and there is overlap in processing time between each step, thereby hiding the overall data processing time and effectively reducing processing delays.
[0187] Figure 8a An example diagram of conventional satellite raw data processing time provided in an embodiment of the present application.
[0188] like Figure 8a As shown in the figure, the processing time of conventional satellite raw data is illustrated by taking the data collected by the 3876th orbit of the GF5A satellite as an example. Among them, the data transmission time from the satellite to the ground station is 14 minutes. After the ground station receives the complete collected data, it processes the data. The data processing time is 6 minutes, that is, the data processing delay (the time difference between the completion of data transmission and the completion of data processing) is 6 minutes, and the full link time (the time from satellite phase formation to the completion of data processing) is 20 minutes.
[0189] Figure 8b This is an example diagram of the satellite data preprocessing time of the present application provided in an embodiment of the present application.
[0190] like Figure 8b As shown, also taking the data collected by the 3876th orbit of the GF5A satellite as an example, the satellite raw data processing time of the satellite raw data method provided by the embodiment of the present application is exemplified. Among them, the data transmission time of the collected data from the satellite to the ground station is 14 minutes. The preprocessing device processes the data while receiving it, and the data processing delay (the time difference between the completion of data transmission and the completion of data processing) is 0.8 minutes, and the full link time (the time from satellite phase formation to the completion of data processing) is 14.8 minutes.
[0191] Comparison Figure 8a and Figure 8b It can be seen from the provided examples that the satellite raw data preprocessing method provided in the embodiments of the present application can effectively reduce data processing delays compared to conventional satellite raw data preprocessing methods, and basically achieve the goal of "processing while transmitting, and completing processing as soon as transmission is completed".
[0192] Figure 8c This is an example diagram of a processing process of satellite raw data preprocessing based on Flink in a hybrid transmission mode provided in an embodiment of the present application.
[0193] Take the dual-channel data of the DQ satellite 2363 orbits as an example. The data volume of each channel data is 27G, and the data volume of the two channels data is 2*27G=54G in total. The data transmission code rate of each channel is 450Mb / s, and the data transmission code rate in the mixed transmission mode is 900Mb / s. In the embodiment of the present application, the real-time stream preprocessing rate of the satellite raw data preprocessing based on Flink reaches 890Mb / s, and the processing time for processing the satellite raw data is 497s. It can be seen that in the satellite raw data preprocessing method based on Flink in the mixed transmission mode provided in the embodiment of the present application, data transmission and data processing are basically completed synchronously, which can improve the processing efficiency of satellite raw data and reduce processing delays.
[0194] Fig. 9 This is an example diagram of an application effect provided by the embodiment of the present application. Fig. 9 As shown, the Fig. 9 Includes (1) and (2), where (1) is a log and (2) is the output image corresponding to the log.
[0195] The log includes the frame count (AOS FrameNo) of the AOS frame data, for example, 8792974, 8792975, 8792976... The log also includes the sorting order of each AOS frame data. It can be seen from the log that the frame count of the output AOS frame data is continuous, and there is no frame loss or disorder. It can be seen from the output image corresponding to the log that the image data is output completely and orderly, and there are no flower blocks, dislocations, black blocks and other phenomena in the image. It can be seen that the satellite raw data preprocessing method based on Flink in the mixed transmission mode provided in the embodiment of the present application can not only improve the efficiency of satellite raw data preprocessing, but also ensure the accuracy of the processing results at the same time.
[0196] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the protection scope of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the protection scope of this patent.
[0197] In a second aspect, an embodiment of the present application provides a satellite raw data preprocessing device based on Flink in a hybrid transmission mode.
[0198] Fig.10 The structure diagram of a satellite raw data preprocessing device based on Flink in a mixed transmission mode provided by an embodiment of the present application is shown in FIG. Fig.10 As shown, the data preprocessing device includes: an acquisition module 1001, a merging module 1002, a synchronization module 1003, a preprocessing module 1004 and a sorting output module 1005.
[0199] The acquisition module 1001 is used to acquire satellite original code stream data in real time.
[0200] The satellite original code stream data includes first channel data and second channel data.
[0201] The merging module 1002 is used to merge the first channel data and the second channel data based on the stream merging operator in Flink to obtain merged data.
[0202] The first channel data and the second channel data both include a plurality of data packets.
[0203] The synchronization module 1003 is used to control the absolute value of the difference between the first data packet consumption and the second data packet consumption to be not greater than a first threshold value based on the data synchronization operator in Flink during the process of outputting the data packet based on the merged data.
[0204] The first data packet consumption is used to indicate the consumption of data packets in the first channel data; and the second data packet consumption is used to indicate the consumption of data packets in the second channel data.
[0205] The preprocessing module 1004 is used to perform data packet preprocessing on each output data packet based on the preprocessing operator in Flink, obtain multiple groups of AOS frame data, and cache the multiple groups of AOS frame data into corresponding cache areas respectively.
[0206] The sorting output module 1005 is used to execute the following steps for any buffer area based on the sorting output operator in Flink: determine whether the preset condition is met; if the preset condition is met, sort the AOS frame data cached in the buffer area; output part or all of the sorted AOS frame data; re-cache the unoutput AOS frame data to the corresponding buffer area, and return to the step of determining whether the preset condition is met.
[0207] It should be clear that the present application is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.
[0208] In the satellite raw data preprocessing device based on Flink in the mixed transmission mode provided in the embodiment of the present application, the acquisition module is used to acquire the satellite raw code stream data in real time, and the merging module is used to merge the first channel data and the second channel data in the satellite raw code stream data based on the stream merging operator in Flink to obtain the merged data. That is, in the embodiment of the present application, the data preprocessing device can process the first acquired satellite raw code stream data without waiting until all satellite raw code stream data are transmitted before processing the data, which can achieve the effect of "transmitting and processing" the satellite raw code stream data, and effectively reduce the processing delay of the satellite raw code stream data; the synchronization module is used to control the data in the first channel data and the second channel data based on the data synchronization operator in Flink in the process of outputting the data packet based on the merged data. The absolute value of the difference in the consumption of the packet is not greater than the first threshold value, so as to balance the number of data packets outputted by the dual-channel data, effectively ensure the correctness of the subsequent data sorting, and reduce the probability of frame loss; the preprocessing module is used to perform data packet preprocessing on each output data packet based on the preprocessing operator in Flink, obtain multiple groups of AOS frame data, and cache the multiple groups of AOS frame data to the corresponding buffer area respectively; the sorting output module is used for any buffer area, based on the sorting output operator in Flink, to sort the AOS frame data cached in the buffer area when the preset conditions are met, and partially or completely output the sorted AOS frame data; and re-caching the unoutputted AOS frame data to the corresponding buffer area, and re-monitoring whether the preset conditions are met, so as to realize the complete processing process of the satellite original code stream data. The satellite raw data preprocessing device based on Flink in the mixed transmission mode provided in the embodiment of the present application can not only improve the processing efficiency of satellite raw data and reduce processing delay, but also ensure the accuracy of the processing results at the same time.
[0209] Fig.11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11 The electronic device includes: one or more processors 1101; a memory 1102, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned satellite raw data preprocessing methods based on Flink in the hybrid transmission mode; one or more I / O interfaces 1103, connected between the processor and the memory, and configured to realize information interaction between the processor and the memory.
[0210] Among them, the processor 1101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 1102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 1103 is connected between the processor 1101 and the memory 1102, and can realize information interaction between the processor 1101 and the memory 1102, including but not limited to a data bus (Bus), etc.
[0211] In some embodiments, the processor 1101 , the memory 1102 , and the I / O interface 1103 are connected to each other via a bus, and further connected to other components of the computing device.
[0212] This embodiment further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the satellite raw data pre-processing method based on Flink in the hybrid transmission mode provided by this embodiment is implemented. To avoid repeated description, the specific steps of the satellite raw data pre-processing method based on Flink in the hybrid transmission mode are not repeated here.
[0213] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods invented above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0214] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0215] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.
[0216] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present application, but the present application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of the present application, and these modifications and improvements are also considered to be within the scope of protection of the present application.
Claims
1. A satellite raw data preprocessing method based on Flink in mixed transmission mode, characterized in that: The method comprises: Acquire satellite original code stream data in real time; the satellite original code stream data includes first channel data and second channel data; Based on the stream merging operator in the Flink, merge the first channel data and the second channel data to obtain merged data; the first channel data and the second channel data each include multiple data packets; In the process of outputting the data packet based on the merged data, based on the data synchronization operator in the Flink, controlling the absolute value of the difference between the first data packet consumption and the second data packet consumption to be not greater than a first threshold; the first data packet consumption is used to indicate the consumption of the data packet in the first channel data; the second data packet consumption is used to indicate the consumption of the data packet in the second channel data; Based on the preprocessing operator in Flink, each output data packet is preprocessed to obtain multiple groups of AOS frame data, and the multiple groups of AOS frame data are cached in corresponding cache areas respectively; For any of the buffers, based on the sort output operator in Flink, perform the following steps: Determine whether the preset conditions are met; When a preset condition is met, sorting the AOS frame data cached in the buffer area; Output the sorted AOS frame data partially or completely; The AOS frame data that has not been output is re-cached into the corresponding buffer area, and the process returns to the step of determining whether the preset condition is met.
2. According to the satellite raw data preprocessing method based on Flink in the mixed transmission mode of claim 1, it is characterized in that: In the process of outputting the data packet based on the merged data, based on the data synchronization operator in the Flink, controlling the absolute value of the difference between the first data packet consumption and the second data packet consumption to be not greater than a first threshold, including: For the first channel data and the second channel data, respectively, perform data packet transmission control operations; The data packet transmission control operation includes: When receiving a data packet, determine whether the corresponding cache queue is empty; If the corresponding cache queue is not empty, adding the data packet to the corresponding cache queue, and if the data packet is not the last data packet, returning to the step of determining whether the corresponding cache queue is empty when receiving the data packet; When the corresponding cache queue is empty, determining whether the cache queue corresponding to another channel data is empty; When the cache queue corresponding to the other channel data is not empty, output the data packet and the first data packet in the cache queue corresponding to the other channel data, and, when the data packet is not the last data packet, return to the step of determining whether the corresponding cache queue is empty when the data packet is received.
3. The satellite raw data preprocessing method based on Flink in the mixed transmission mode according to claim 2 is characterized in that: The data packet transmission control operation also includes: When the cache queue corresponding to the other channel data is empty, determining whether the difference between the data packet consumption of the channel data and the data packet consumption of the other channel data is greater than or equal to a first threshold, and determining whether the data packet of the other channel data is outputted; When the difference between the data packet consumption of the channel data and the data packet consumption of another channel data is greater than or equal to the first threshold value, and the data packet of the other channel data has not been outputted, the data packet is added to the corresponding cache queue, and when the data packet is not the last data packet, the step of determining whether the corresponding cache queue is empty when the data packet is received is returned; When the difference between the data packet consumption of the channel data and the data packet consumption of another channel data is less than a first threshold, or when it is determined that the output of the data packet of another channel data is finished, the data packet is output, and when the data packet is not the last data packet, the step of determining whether the corresponding cache queue is empty when the data packet is received is returned.
4. The satellite raw data preprocessing method based on Flink in the mixed transmission mode according to claim 1 is characterized in that: The preprocessing operator in Flink performs data packet preprocessing on each output data packet to obtain multiple groups of AOS frame data, including: For each outgoing packet: Deinterleaving the data packets to obtain I-channel data and Q-channel data; Descramble the I-channel data and the Q-channel data based on the initial state of the IQ-channel scrambling code to obtain AOS frame data; the AOS frame data includes a virtual channel identifier; The AOS frame data is grouped based on the virtual channel identifier.
5. The satellite raw data preprocessing method based on Flink in the mixed transmission mode according to claim 1 is characterized in that: When a preset condition is met, sorting the AOS frame data cached in the buffer area includes: When the amount of the cached AOS frame data is equal to or greater than a second threshold, sorting the AOS frame data cached in the cache area; or, When the transmission of the satellite original code stream data is completed, the AOS frame data buffered in the buffer area is sorted.
6. The satellite raw data preprocessing method based on Flink in the hybrid transmission mode according to claim 5 is characterized in that: The AOS frame data includes a class object, and the class object includes at least a frame count and valid data; and the sorting of the AOS frame data cached in the buffer area includes: The class objects corresponding to the AOS frame data are sorted in ascending order of the frame counts.
7. The satellite raw data preprocessing method based on Flink in the hybrid transmission mode according to claim 6 is characterized in that: When the transmission of the satellite original code stream data is completed, after sorting the AOS frame data cached in the buffer area, partially or completely outputting the sorted AOS frame data includes: Output the class objects corresponding to all the AOS frame data in sorted order.
8. The satellite raw data preprocessing method based on Flink in the hybrid transmission mode according to claim 6 is characterized in that: When the amount of the cached AOS frame data is equal to or greater than a second threshold, after sorting the AOS frame data cached in the buffer area, the partially or completely outputting the sorted AOS frame data includes: According to the sorting order, the objects of the class that rank in the top preset percentage are output.
9. The satellite raw data preprocessing method based on Flink in the hybrid transmission mode according to claim 8 is characterized in that: Outputting the class objects that are ranked in front of a preset percentage in the sorting order includes: Based on the sort order, detect whether there is a frame count reset; In the absence of a frame count reset, outputting the class objects that are ranked in the top preset percentage according to the sorting order; In the case where the frame count is reset, determining whether the first part meets the conditions for full output; the first part is a class object corresponding to the AOS frame data whose frame count is not reset; When the first part meets the conditions for full output, all class objects contained in the first part are output according to the sorting order of the first part; When the first part does not meet the conditions for full output, the class objects of the first part that are ranked in the front by a preset percentage are output according to the sorting order of the first part.
10. The satellite raw data preprocessing method based on Flink in the hybrid transmission mode according to claim 9 is characterized in that: The detecting whether there is a frame count reset based on the sorting order comprises: Detect whether the difference between the frame counts contained in the adjacent class objects is greater than the count threshold; In the case where the difference between the frame counts included in the objects of the adjacent classes is greater than the count threshold, it is determined that the frame count reset occurs.
