Data packet sorting method, device, equipment and product for satellite communication system
By using data link lists and pointer link lists for sorting in high and low rail fusion communication systems, the problem of low efficiency of sorting algorithm when the sorting window is large is solved, and efficient data packet sorting is achieved.
Patent Information
- Application Number
- CN202411676562.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-22
AI Technical Summary
In high and low rail fusion communication systems, when the sorting window is large, the traditional sorting algorithm is less efficient and cannot effectively solve the problem of low packet sorting efficiency.
By receiving the numbered service data packets transmitted by the sending end through the high-rail link and the low-rail link, the data packets are merged, and the merged data packets are sorted and outputted through the sorting strategy to obtain the sorting results.
This method simplifies the sorting process, saves a lot of search and comparison operations, improves sorting efficiency, and maintains efficient performance when the sorting window is large.
Smart Images

Figure CN119182497B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of satellite communication technology, and in particular to a method, device, equipment and product for sorting data packets in a satellite communication system. Background Art
[0002] At present, satellite communications mainly include high-orbit satellite communications and low-orbit satellite communications. High-orbit satellites have a wide coverage range and stable signals, but the bandwidth is usually small. Low-orbit satellites have a small coverage range and a short overhead time, but the bandwidth is usually large. In order to make up for the shortcomings of high-orbit satellite communications and low-orbit satellite communications, a high-orbit and low-orbit fusion communication system can be used. Under normal circumstances, stable high-orbit satellites are used to transmit data. When low-orbit satellites pass overhead, high-orbit satellites and low-orbit satellites are used to transmit data at the same time.
[0003] In the high-orbit and low-orbit fusion communication system, the transmitter reasonably distributes data packets to the high-orbit link and the low-orbit link according to the link bandwidth and delay. When the receiver merges the data packets of the two links, the order of the packets needs to be consistent with that of the transmitter. The complexity of the traditional sorting algorithm is related to the size of the sorting window. When the sorting window is large, the efficiency of the traditional sorting algorithm is low.
[0004] Therefore, how to improve the efficiency of the sorting algorithm when the sorting window is large is a problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of the present application is to provide a method, device, equipment and product for sorting data packets in a satellite communication system, aiming to solve the technical problem of low efficiency of the sorting algorithm when the sorting window is large.
[0006] To achieve the above object, the present application proposes a method for sorting data packets in a satellite communication system, the method comprising:
[0007] Receiving numbered service data packets transmitted by a transmitter through a high-orbit link and a low-orbit link, wherein the numbered service data packets are data packets obtained by the transmitter by sequentially numbering the service data packets;
[0008] Merging the numbered service data packets to obtain a merged data packet;
[0009] Based on the data linked list and the pointer linked list, the merged data packet is sorted and outputted through a sorting strategy to obtain a sorting result, wherein the data linked list is used to store the received merged data packet, and the pointer linked list is used to store a pointer pointing to a location where a data packet in the data linked list is missing.
[0010] In one embodiment, the data linked list is represented as a linked list , the length of the data linked list is expressed as , the data linked list is used to receive the merged data packet, and the merged data packet is represented as , To represent a linked list Middle elements, the pointer list is represented as a linked list , the length of the pointer linked list is expressed as , the pointer list is used to point to the linked list Pointer to the data packet in Representing a linked list Middle elements;
[0011] The step of sorting and outputting the merged data packets based on the data linked list and the pointer linked list by a sorting strategy to obtain a sorting result includes:
[0012] Initialize the linked list and the linked list Empty and receive the current merged data packet ;
[0013] Judgment Link List Length Is it 0, and judge Is the sequence number smaller than the linked list The first element in Serial number;
[0014] If the linked list Length is not 0, and the The sequence number is less than the linked list The first element in , then discard the , and end the sorting, and output the corresponding sorting results.
[0015] In one embodiment, the judgment linked list Length Is it 0, and judge Is the sequence number smaller than the linked list The first element in After the sequence number steps, it also includes:
[0016] If the linked list Length Not 0 and The sequence number is not less than the linked list The first element in Serial number Or the linked list Length is 0 but Said Is the sequence number equal to the linked list The serial number of the last element in is increased by 1;
[0017] If the The sequence number is equal to the linked list The last element in the sequence number is increased by 1, then Inserting into a linked list , and ends the sorting, outputting the corresponding sorting result.
[0018] In one embodiment, the Said Is the sequence number equal to the linked list After the last element in the sequence is incremented by 1, it also includes:
[0019] If the The sequence number is not equal to the linked list The index of the last element in the array is increased by 1, and the search variable is set. is 0, and determines the search variable Is it greater than ;
[0020] If the search variable Greater than , create a new pointer Pointing to linked list The last element in Inserting into a linked list The end of Inserting into a linked list The end of the sorting is reached, and the sorting is ended, and the corresponding sorting result is output;
[0021] If the search variable No more than , search the linked list Elements in , and point it to the linked list The elements in are denoted as ,judge Serial number, Serial number, The size relationship of the serial number is based on the Serial number, Serial number, The order of the serial numbers is sorted and output to obtain the sorting result.
[0022] In one embodiment, the Serial number, Serial number, The steps of sorting and outputting the sequence numbers according to the size relationship to obtain the sorting result include:
[0023] like The serial number is equal to The serial number of is increased by 1 and is equal to The serial number of is reduced by 1, then insert and Between, delete , end the sorting and output the corresponding sorting results;
[0024] like The serial number is equal to The serial number is increased by 1, but it is not equal to The serial number is reduced by 1, insert and Between, create a new pointer point to ,Will Insert to Afterwards, delete , end the sorting and output the corresponding sorting results;
[0025] like The serial number is not equal to The serial number is increased by 1, but it is equal to The serial number is reduced by 1, insert and End the sorting and output the corresponding sorting results;
[0026] like The serial number is not equal to The serial number of is increased by 1 and is not equal to The serial number is reduced by 1, insert and Between, create a new pointer point to ,Will Insert to After that, the sorting is ended and the corresponding sorting result is output.
[0027] In one embodiment, the data linked list is represented as a linked list , the length of the data linked list is expressed as , the data linked list is used to receive the merged data packet, and the merged data packet is represented as , To represent a linked list Middle elements, the pointer list is represented as a linked list , the length of the pointer linked list is expressed as , the pointer list is used to point to the linked list Pointer to the data packet in Representing a linked list Middle elements;
[0028] The step of sorting and outputting the merged data packets based on the data linked list and the pointer linked list by a sorting strategy to obtain a sorting result also includes:
[0029] If the linked list Length If it is 0, the linked list Output and delete all the elements in to get the corresponding sorting result;
[0030] If the linked list Length Not 0, search the linked list The first element in , the linked list it points to The elements in are denoted as , the linked list Center front Output and delete the elements to get the corresponding sorting result.
[0031] In one embodiment, the search list The first element in , the linked list it points to The elements in are denoted as , the linked list Center front After the steps of outputting and deleting the elements, it also includes:
[0032] Determine the linked list Length and the size of the sort window;
[0033] If the linked list Length Larger than the sorting window, output linked list The first element in , delete the linked list The first element in And linked lists The first element in , and get the corresponding sorting results.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a data packet sorting device for a satellite communication system, the data packet sorting device for the satellite communication system comprising:
[0035] A receiving module, used to receive numbered service data packets transmitted by a transmitting end through a high orbit link and a low orbit link, wherein the numbered service data packets are data packets obtained by the transmitting end by sequentially numbering the service data packets;
[0036] A merging module, used for merging the numbered service data packets to obtain a merged data packet;
[0037] A sorting module is used to sort and output the merged data packets through a sorting strategy based on a data linked list and a pointer linked list to obtain a sorting result, wherein the data linked list is used to store the received merged data packets, and the pointer linked list is used to store pointers pointing to the missing locations of the data linked list data packets.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a data packet sorting device for a satellite communication system, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data packet sorting method for the satellite communication system as described above.
[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the data packet sorting method of the satellite communication system as described above.
[0040] One or more technical solutions proposed in this application have at least the following technical effects:
[0041] The numbered service data packets transmitted by the transmitter through the high-orbit link and the low-orbit link are received, wherein the numbered service data packets are data packets obtained by the transmitter by sequentially numbering the service data packets; the numbered service data packets are merged to obtain a merged data packet; based on the data linked list and the pointer linked list, the merged data packets are sorted and output by a sorting strategy to obtain a sorting result, the data linked list is used to store the received merged data packets, and the pointer linked list is used to store the pointer pointing to the missing location of the data linked list data packet. By receiving the numbered service data packets transmitted by the transmitter through the high-orbit link and the low-orbit link, the bandwidth and transmission capacity of different links can be fully utilized, thereby speeding up the data transmission speed. By uniformly sorting the merged data packets, the increased processing complexity caused by different data packet sources can be avoided. The received merged data packets are stored by the data linked list, and the pointer linked list is used to track the missing location of the data packet, which helps to effectively recover and sort when the data packet is lost or out of order, simplifies the sorting process, saves a lot of search and comparison operations, and improves the sorting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 A schematic flow chart of a first embodiment of a method for sorting data packets in a satellite communication system of the present application;
[0045] Figure 2 This is a block diagram of the high-orbit and low-orbit fusion communication system of an embodiment of the present application;
[0046] Figure 3 A schematic flow chart of a second embodiment of a method for sorting data packets in a satellite communication system of the present application;
[0047] Figure 4 Output an operation flow diagram for the embodiment of the present application;
[0048] Figure 5 This is a schematic diagram of the sorting operation flow of the embodiment of the present application;
[0049] Figure 6 This is a schematic diagram of the module structure of a data packet sorting device of a satellite communication system according to an embodiment of the present application;
[0050] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the data packet sorting method of the satellite communication system in the embodiment of the present application.
[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] At present, satellite communications mainly include high-orbit satellite communications and low-orbit satellite communications. High-orbit satellites have a wide coverage range and stable signals, but the bandwidth is usually small. Low-orbit satellites have a small coverage range and a short overhead time, but the bandwidth is usually large. In order to make up for the shortcomings of high-orbit satellite communications and low-orbit satellite communications, a high-orbit and low-orbit fusion communication system can be used. Under normal circumstances, stable high-orbit satellites are used to transmit data. When low-orbit satellites pass overhead, high-orbit satellites and low-orbit satellites are used to transmit data at the same time.
[0055] In a high-orbit and low-orbit fusion communication system, ideally, the transmitter reasonably distributes data packets to the high-orbit link and the low-orbit link according to the link bandwidth and delay, so that when the receiver merges the data packets of the two links, the order of the packets is consistent with that of the transmitter. However, in practical applications, due to abnormal conditions such as link jitter and link errors, the data packets at the receiving end may be out of order. Therefore, the receiving end also needs to open a sorting window to sort the received data packets and restore their order. In order to ensure that out-of-order packets are received, it is usually necessary to set the sorting window larger. The complexity of the traditional sorting algorithm is related to the size of the sorting window. When the sorting window is larger, the algorithm needs to perform more comparisons.
[0056] The present application provides a solution, receiving the numbered service data packets transmitted by the transmitter through the high-orbit link and the low-orbit link, wherein the numbered service data packets are data packets obtained by the transmitter by sequentially numbering the service data packets; merging the numbered service data packets to obtain a merged data packet; based on the data linked list and the pointer linked list, the merged data packets are sorted and output by a sorting strategy to obtain a sorting result, the data linked list is used to store the received merged data packets, and the pointer linked list is used to store the pointer pointing to the missing location of the data linked list data packet. By receiving the numbered service data packets transmitted by the transmitter through the high-orbit link and the low-orbit link, the bandwidth and transmission capacity of different links can be fully utilized, thereby speeding up the data transmission speed. By uniformly sorting the merged data packets, the increased processing complexity caused by different sources of the data packets can be avoided. The received merged data packets are stored by the data linked list, and the pointer linked list is used to track the location of the missing data packets, which helps to effectively recover and sort when the data packets are lost or disordered, simplifies the sorting process, saves a lot of search and comparison operations, and improves the sorting efficiency.
[0057] Based on this, the embodiment of the present application provides a method for sorting data packets in a satellite communication system, referring to Figure 1 , Figure 1 This is a flow chart of a first embodiment of a method for sorting data packets in a satellite communication system of the present application.
[0058] In this embodiment, the data packet sorting method of the satellite communication system includes steps S10 to S30:
[0059] Step S10, receiving the numbered service data packets transmitted by the transmitter through the high orbit link and the low orbit link.
[0060] It should be noted that the numbered business data packet is the data packet obtained by the sender by numbering the business data packet in sequence. Satellite communications mainly include high-orbit satellite communications and low-orbit satellite communications. High-orbit satellites have a wide coverage range and stable signals, but the bandwidth is usually small. Low-orbit satellites have a small coverage range and a short overhead time, but the bandwidth is usually large. In order to make up for the respective shortcomings of high-orbit satellite communications and low-orbit satellite communications, a high-orbit and low-orbit fusion communication system can be used. Under normal circumstances, stable high-orbit satellites are used to transmit data. When low-orbit satellites pass overhead, high-orbit and low-orbit satellites are used to transmit data at the same time. It can be understood that the numbered business data packet contains business data and a number used to identify its sequence.
[0061] Step S20, merging the numbered service data packets to obtain a merged data packet.
[0062] For example, the numbered service data packets received through the high-orbit link and the low-orbit link may be merged to form a complete data packet set, namely, a merged data packet. Merging data packets may include deduplication and integration of data.
[0063] Step S30, based on the data linked list and the pointer linked list, the merged data packets are sorted and outputted by a sorting strategy to obtain a sorting result.
[0064] It should be noted that the data linked list is used to store the received merged data packets, and the pointer linked list is used to store pointers to the missing locations of the data linked list data packets. When data packets are lost during transmission or arrive out of order, the pointers in the pointer linked list will point to the locations of these missing data packets in the data linked list. The sorting strategy can be a sorting algorithm or method for sorting the merged data packets to restore their original order. Based on the information of the data linked list and the pointer linked list, the sorting strategy can identify missing or out-of-order data packets and rearrange them into the correct order. The sorting result can be the final result obtained by sorting and outputting the merged data packets after applying the sorting strategy. The data packets in the sorting result should be arranged in their original order to ensure the integrity and order of the data.
[0065] For example, the block diagram of the high-orbit and low-orbit fusion communication system can be as follows: Figure 2 As shown in the figure, the sender numbers the service data packets in sequence, adds sequence numbers and distributes the data packets to the high-orbit link and the low-orbit link for transmission. At the receiving end, the data packets of the high-orbit link and the low-orbit link are first merged, and the merged data packets are sorted according to the sorting strategy. The output sorting result is removed from the sequence number to restore the original service data.
[0066] In this embodiment, by receiving the numbered service data packets transmitted by the transmitter through the high-orbit link and the low-orbit link, the bandwidth and transmission capacity of different links can be fully utilized, thereby speeding up the data transmission speed. By uniformly sorting the merged data packets, the increased processing complexity caused by different data packet sources can be avoided. The received merged data packets are stored in a data linked list, and the pointer linked list is used to track the location of missing data packets, which helps to effectively recover and sort when data packets are lost or out of order, simplifies the sorting process, saves a lot of search and comparison operations, and improves sorting efficiency.
[0067] In order to make the following embodiments clearer, it should be noted that the data linked list is represented as a linked list. , the length of the data linked list is expressed as , the data linked list is used to receive the merged data packet, and the merged data packet is represented as , To represent a linked list Middle elements, the pointer list is represented as a linked list , the length of the pointer list is expressed as , pointer lists are used to point to linked lists Pointer to the data packet in Representing a linked list Middle elements.
[0068] Reference Figure 3 , Figure 3 This is a flow chart of a second embodiment of a method for sorting data packets in a satellite communication system of the present application. Figure 1 The first embodiment shown is a second embodiment of the data packet sorting method of the satellite communication system of the present application.
[0069] In the second embodiment, the step S20 includes:
[0070] Step S201, initialize the linked list and linked list Empty and receive the current merged data packet .
[0071] It should be noted that after the system is started, the linked list and linked list Initialized to empty, the currently received data packet is recorded as .
[0072] Step S202, determine the linked list Length Is it 0, and judge Is the sequence number smaller than the linked list The first element in Serial number.
[0073] It should be noted that the linked list Length Is it 0 including linked lists? Length 0 and linked list Length There are two cases where it is not 0. Is the sequence number smaller than the linked list The first element in The serial numbers include The sequence number is less than the linked list The first element in The serial number and The sequence number is not less than the linked list The first element in Among them, when the linked list Length When it is 0, the linked list There are no elements in the Is the sequence number smaller than the linked list The first element in Serial number.
[0074] Step S203, if the linked list Length is not 0, and The sequence number is less than the linked list The first element in The sequence number is discarded , and end the sorting, and output the corresponding sorting results.
[0075] It should be noted that when the linked list Length is not 0, and The sequence number is less than the linked list The first element in If the sequence number is repeated, it means that a duplicate sequence number has appeared and needs to be discarded. , and the sorting ends.
[0076] In this embodiment, by simply comparing the sequence numbers, invalid data packets that do not meet the conditions can be quickly discarded, useless data packets are prevented from participating in the sorting, and unnecessary computing and storage resource consumption is reduced. If there is already a data packet with a larger sequence number in the linked list, the new data packet with a smaller sequence number is directly discarded, saving storage space. Especially when the data flow is large, this optimization can significantly improve the system performance and memory utilization.
[0077] In one implementation, based on the second embodiment, the step of sorting and outputting the merged data packets based on the data linked list and the pointer linked list by a sorting strategy to obtain the sorting result further includes: if the linked list Length If it is 0, the linked list Output and delete all the elements in to get the corresponding sorting result; if the linked list Length Not 0, search the linked list The first element in , the linked list it points to The elements in are denoted as , the linked list Center front Output and delete the elements to get the corresponding sorting result.
[0078] It should be noted that the output operation can be performed after the sorting operation is completed. For example, Figure 4 As shown, if the linked list Length If it is 0, the linked list Output and delete all elements in the output, otherwise, retrieve the linked list The first element in , the linked list it points to The elements in are denoted as , the linked list Center front Elements ~ Output and delete; continue to judge the linked list Length Is it larger than the sort window? , if the linked list Length Larger than sort window , the linked list The first element in Output and delete, the linked list The first element in Delete, output ends.
[0079] It should be noted that the search list The first element in , the linked list it points to The elements in are denoted as , the linked list Center front After the steps of outputting and deleting the elements, it also includes: judging the linked list Length and the size of the sorting window; if the linked list Length Larger than the sorting window, output linked list The first element in , delete the linked list The first element in And linked lists The first element in , and get the corresponding sorting results.
[0080] In this implementation, the data packet sorting and output can be efficiently managed through the dual structure based on the data linked list and the pointer linked list. When the linked list length is 0, all elements in the linked list are directly output and deleted. This approach ensures that the linked list can be quickly emptied in an empty state, thereby simplifying the management logic of the linked list. When the linked list length exceeds the sorting window, the redundant elements are automatically output and deleted, ensuring that the system only processes data that meets the window size, thereby effectively controlling the capacity of the linked list, preventing data backlog, and ensuring real-time performance.
[0081] Based on the above embodiments and implementation methods, in one implementation method, after step S202, the method further includes: if the linked list Length Not 0 and The sequence number is not less than the linked list The first element in Serial number or linked list Length is 0 Then judge Is the sequence number equal to the linked list The serial number of the last element in is increased by 1; if The sequence number is equal to the linked list The last element in the sequence number is increased by 1, then Inserting into a linked list , and ends the sorting, outputting the corresponding sorting result.
[0082] It should be noted that the judgment condition in this embodiment is another case parallel to step S203. It can be understood that whether the linked list Length Not 0 and The sequence number is not less than the linked list The first element in The sequence number or linked list Length If it is 0, further judgment is required. Is the sequence number equal to the linked list The serial number of the last element in is increased by 1. The last element in can be expressed as .
[0083] Based on the above embodiments and implementations, for example, assuming that the size of the sorting window is 10000, two linked lists are maintained during the sorting process, one is a data linked list , the other is a pointer list . Linked List The element in is the received data packet, To represent a linked list Middle elements. Linked list The element in the list points to Pointer to the data packet in To represent a linked list Middle After the system starts, the linked list and linked list is initialized to empty. Assume that the sequence numbers of the first 10,000 packets received are 1, 2, 3, 5, ..., 500, 502, 503, ..., 10,000, 4, 501. It can be seen that most of the packets arrive in order, only the packets with sequence numbers 4 and 501 are out of order and received at the end. When the packet with sequence number 1 is received, the sorting operation is performed. The length of is 0, The sequence number is equal to the linked list The serial number of the last element in is increased by 1, so the data packet with serial number 1 is directly inserted into the linked list At the end of the linked list, the sorting operation ends and the output operation is performed. The length of the linked list is 0, but There is only the last element in , so there is no output, and the output operation ends. At this point, the linked list There is a data packet with sequence number 1, the linked list When the data packet with sequence number 2 is received, the sorting operation continues. Since the sequence number of the received data packet is greater than the linked list The sequence number of the first element in the linked list, and the sequence number of the received data packet is equal to The serial number of the last element in the list is increased by 1, and the data packet with serial number 2 is directly inserted into the linked list At the end of the linked list, the sorting operation ends and the output operation is performed. The length of the linked list is 0. All elements except the last element in are output and deleted, so the data packet with sequence number 1 is output and deleted, and the output operation ends. At this time, the linked list There is a data packet with sequence number 2, linked list Similarly, after receiving the data packet with sequence number 3, the operation performed is similar to the operation for the data packet with sequence number 2. After processing the data packet with sequence number 3, the linked list There is a data packet with sequence number 3 in the linked list It is understandable that when the sequence number of a data packet is sequentially increased by 1, the subsequent operations are similar to the operations on the data packet with the sequence number of 2.
[0084] In this implementation, by introducing conditional judgment, the system can perform additional checks when encountering out-of-order data packets. The data packet is inserted into the linked list only when the out-of-order data packet meets certain conditions (such as the sequence number is 1 more than the sequence number of the last element in the linked list). This can effectively handle the situation of a small number of out-of-order data packets and avoid the insertion of out-of-order data from interfering with the orderliness of the entire linked list. When the sequence numbers of the data packets are continuous and increase in sequence, each time you simply need to append the data packet to the end of the linked list and output it immediately. The simplified operation process significantly improves the speed of the system in processing sequential data packets and is suitable for scenarios with large-scale data flows.
[0085] In one embodiment, in the determination Is the sequence number equal to the linked list After the step of adding 1 to the serial number of the last element in , the following steps are also included: The sequence number is not equal to the linked list The index of the last element in the search is increased by 1, and the search variable is set is 0, and determines the search variable Is it greater than ; If the search variable Greater than , create a new pointer Pointing to linked list The last element in Inserting into a linked list The end of Inserting into a linked list The end of the sorting is ended and the corresponding sorting result is output; if the search variable No more than , search the linked list Elements in , and point it to the linked list The elements in are denoted as ,judge Serial number, Serial number, The size relationship of the serial number is based on Serial number, Serial number, The order of the serial numbers is sorted and output to obtain the sorting result.
[0086] For example, it is still assumed that the sequence numbers of the first 10,000 received data packets are 1, 2, 3, 5, ..., 500, 502, 503, ..., 10,000, 4, 501. After processing the data packet with sequence number 3, the linked list There is a data packet with sequence number 3 in the linked list After receiving the data packet with sequence number 5, the sorting operation is performed. Since the sequence number of the received data packet is greater than the sequence number of the linked list The sequence number of the first element in the linked list. Since the sequence number of the received data packet is not equal to Add 1 to the last element in the sequence and set the search variable is 0, because Greater than , create a new pointer Pointing to linked list The last element in the linked list, and insert the data packet with sequence number 5 into the linked list The end of Inserting into a linked list At the end of the linked list, the sorting operation ends and the output operation begins. The length of is not 0, the linked list The first element points to the linked list In , the first 0 packets are output and deleted, that is, no output. Further, due to the linked list The length of is not greater than the sorting window 10000, so no operation is performed and the output operation ends. After processing the data packet with sequence number 5, the linked list There are data packets with sequence numbers 3 and 5, linked list There is a pointer to the data packet with sequence number 3. When the data packet with sequence number 6 is received, the sorting operation is performed. Since the sequence number of the received data packet is greater than the sequence number of the linked list The sequence number of the first element in the linked list. The sequence number of the received data packet is equal to The serial number of the last element in the list is increased by 1, and the data packet with serial number 2 is directly inserted into the linked list At the end of the linked list, the sorting operation ends and the output operation is performed. The length of is not 0, the linked list The first element points to the linked list In , the first 0 packets are output and deleted, that is, there is no output. The length of is not greater than the sorting window 10000, no operation is performed, and the output operation ends. After processing the data packet with sequence number 6, the linked list There are data packets with sequence numbers 3, 5, and 6 in the linked list There is a pointer to the data packet with sequence number 3. Similarly, when the data packets with sequence numbers 7 to 500 are received, the operation performed is similar to the operation of the data packet with sequence number 6. After processing the data packet with sequence number 500, the status is: linked list There are data packets with sequence numbers 3, 5, 6, ..., 500, linked list There is a pointer to the data packet with sequence number 3. When the data packet with sequence number 502 is received, the sorting operation is performed. Since the sequence number of the received data packet is greater than the sequence number of the linked list The sequence number of the first element in the linked list. The sequence number of the received data packet is not equal to Add 1 to the last element in the sequence and set the search variable is 0. Furthermore, due to No more than , the sequence number of the received data packet is greater than The serial number of the search variable Incremented by 1. Greater than , create a new pointer Pointing to linked list The last element in the linked list is inserted into the data packet with sequence number 502. The end of Inserting into a linked list At the end of the linked list, the sorting operation ends and the output operation is performed. The length of is not 0, because the linked list The first element points to the linked list In , the first 0 packets are output and deleted, that is, there is no output. The length of is not greater than the sorting window 10000, no operation is performed, and the output operation is terminated. After processing the data packet with sequence number 502, the linked list There are data packets with serial numbers 3, 5, 6, ..., 500, 502, linked list There is a pointer to the data packet with sequence number 3 and a pointer to the data packet with sequence number 500.
[0087] Similarly, after receiving the data packets with sequence numbers 503 to 10000, the operations performed are similar to those for the data packet with sequence number 6. After processing the data packet with sequence number 10000, the linked list There are data packets with sequence numbers 3, 5, 6, ..., 500, 502, ..., 10000, linked list There is a pointer to the data packet with sequence number 3 and a pointer to the data packet with sequence number 500.
[0088] For example, after receiving a data packet with sequence number 4, a sorting operation is performed. Since the sequence number of the received data packet is greater than the sequence number of the linked list The sequence number of the first element in the linked list. Since the sequence number of the received data packet is not equal to Add 1 to the last element in the sequence and set the search variable is 0. No more than , then according to Serial number, Serial number, The order of the serial numbers is sorted and output to obtain the sorting result.
[0089] It should be noted that the Serial number, Serial number, The steps of sorting and outputting the order of the sequence numbers to obtain the sorting result include: if The serial number is equal to The serial number of is increased by 1 and is equal to The serial number of is reduced by 1, then insert and Between, delete , end the sorting and output the corresponding sorting result; if The serial number is equal to The serial number is increased by 1, but it is not equal to The serial number is reduced by 1, insert and Between, create a new pointer point to ,Will Insert to Afterwards, delete , end the sorting and output the corresponding sorting result; if The serial number is not equal to The serial number is increased by 1, but it is equal to The serial number is reduced by 1, insert and , end the sorting and output the corresponding sorting result; if The serial number is not equal to The serial number of is increased by 1 and is not equal to The serial number is reduced by 1, insert and Between, create a new pointer point to ,Will Insert to After that, the sorting is finished and the corresponding sorting results are output. The whole sorting process is as follows: Figure 5 shown.
[0090] For example, after receiving a data packet with sequence number 4, a sorting operation is performed. Since the sequence number of the received data packet is greater than the sequence number of the linked list The sequence number of the first element in the linked list. Since the sequence number of the received data packet is not equal to Add 1 to the last element in the sequence and set the search variable is 0. No more than , then Serial number, Serial number, Since the sequence number of the received packet is equal to The serial number of is increased by 1 and is equal to The sequence number is reduced by 1, and the data packet with sequence number 4 is inserted and Between, delete , end the sorting operation and execute the output operation. The length of is not 0, the linked list The first element points to the linked list In Therefore, the first 497 packets are output and deleted, that is, the data packets with sequence numbers 3, 4, 5, 6, ..., 499 are output and deleted. The length of is not greater than the sorting window 10000, no operation is performed, and the output operation ends. After processing the data packet with sequence number 4, the linked list There are data packets with sequence numbers 500, 502, ..., 10000, linked list There is a pointer to the data packet with sequence number 500.
[0091] It can be understood that after receiving the data packet with sequence number 501, the operation performed is similar to the operation of the data packet with sequence number 4. After processing the data packet with sequence number 501, the linked list There is a data packet with sequence number 10000, linked list It can be seen that the sorting module outputs the data packets with sequence numbers 1 to 9999 in order, and the data packet with sequence number 10000 will continue to be output in the subsequent operation process. In this process, the data packets with sequence numbers 1, 2, 3, 5, ..., 500, 502, 503, ..., 10000 are directly inserted into the linked list. At the end, the data packet with sequence number 4,501 is in the query list The exact insertion position is found after one element.
[0092] In this embodiment, by dynamically judging the order relationship of the data packet sequence number and introducing a search variable mechanism, out-of-order data packets can be flexibly processed. For data packets that arrive out of order (such as data packets with sequence numbers 4 or 501), the system can intelligently insert the data packet into the correct position based on the relationship between the sequence number and the sequence number of the existing data packets in the linked list. When the sequential requirements are not met, the search variables are used for step-by-step inspection, and the insertion position is determined based on the sequence number relationship of the existing elements in the linked list. The use of pointer linked lists can reduce the complexity of linked list operations and the number of linked list traversals, thereby speeding up sorting operations, ensuring that the appropriate position can be quickly found to insert the data packet in different situations, effectively improving the efficiency of data packet processing.
[0093] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data packet sorting method of the satellite communication system of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0094] The present application also provides a data packet sorting device for a satellite communication system, please refer to Figure 6 , the data packet sorting device of the satellite communication system comprises:
[0095] The receiving module 10 is used to receive the numbered service data packets transmitted by the transmitting end through the high orbit link and the low orbit link, wherein the numbered service data packets are data packets obtained by the transmitting end by sequentially numbering the service data packets;
[0096] A merging module 20, configured to merge the numbered service data packets to obtain a merged data packet;
[0097] The sorting module 30 is used to sort and output the merged data packet based on the data linked list and the pointer linked list through a sorting strategy to obtain a sorting result. The data linked list is used to store the received merged data packet, and the pointer linked list is used to store a pointer to the missing location of the data linked list data packet.
[0098] The data packet sorting device of the satellite communication system provided by the present application adopts the data packet sorting method of the satellite communication system in the above embodiment, which can solve the technical problem of low efficiency of the sorting algorithm when the sorting window is large. Compared with the prior art, the beneficial effects of the data packet sorting device of the satellite communication system provided by the present application are the same as the beneficial effects of the data packet sorting method of the satellite communication system provided by the above embodiment, and other technical features of the data packet sorting device of the satellite communication system are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0099] The present application provides a data packet sorting device for a satellite communication system, the data packet sorting device for the satellite communication system comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data packet sorting method for the satellite communication system in the above-mentioned embodiment 1.
[0100] Reference below Figure 7 , which shows a schematic diagram of the structure of a data packet sorting device of a satellite communication system suitable for implementing an embodiment of the present application. The data packet sorting device of the satellite communication system in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The data packet sorting device of the satellite communication system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0101] like Figure 7 As shown, the data packet sorting device of the satellite communication system may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data packet sorting device of the satellite communication system are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the packet sequencing device of the satellite communication system to communicate with other devices wirelessly or by wire to exchange data. Figure 7 The packet sequencing device of the satellite communication system with various systems is shown, but it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0102] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0103] The data packet sorting device of the satellite communication system provided by the present application adopts the data packet sorting method of the satellite communication system in the above embodiment, which can solve the technical problem of low efficiency of the sorting algorithm when the sorting window is large. Compared with the prior art, the beneficial effects of the data packet sorting device of the satellite communication system provided by the present application are the same as the beneficial effects of the data packet sorting method of the satellite communication system provided by the above embodiment, and other technical features of the data packet sorting device of the satellite communication system are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0104] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0105] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0106] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0107] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0108] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0109] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the data packet sorting method of the satellite communication system as described above are implemented.
[0110] The computer program product provided by the present application can solve the technical problem that the efficiency of the sorting algorithm is low when the sorting window is large. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data packet sorting method of the satellite communication system provided by the above embodiment, and will not be repeated here.
[0111] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for sorting data packets in a satellite communication system, characterized in that: The method includes: Receiving numbered service data packets transmitted by a transmitter through a high-orbit link and a low-orbit link, wherein the numbered service data packets are data packets obtained by the transmitter by sequentially numbering the service data packets; Merging the numbered service data packets to obtain a merged data packet; Based on a data linked list and a pointer linked list, the merged data packet is sorted and outputted by a sorting strategy to obtain a sorting result, wherein the data linked list is used to store the received merged data packet, and the pointer linked list is used to store a pointer pointing to a location where a data packet in the data linked list is missing; Wherein, the data linked list is represented as a linked list , the length of the data linked list is expressed as , the data linked list is used to receive the merged data packet, and the merged data packet is represented as , To represent a linked list Middle elements, the pointer list is represented as a linked list , the length of the pointer linked list is expressed as , the pointer list is used to point to the linked list Pointer to the data packet in Representing a linked list Middle elements; The step of sorting and outputting the merged data packets based on the data linked list and the pointer linked list by a sorting strategy to obtain a sorting result includes: Initialize the linked list and the linked list Empty and receive the current merged data packet ; Judgment Link List Length Is it 0, and judge Is the sequence number smaller than the linked list The first element in Serial number; If the linked list Length is not 0, and the The sequence number is less than the linked list The first element in , then discard the , and end the sorting, and output the corresponding sorting results.
2. The method according to claim 1, characterized in that The judgment linked list Length Is it 0, and judge Is the sequence number smaller than the linked list The first element in After the sequence number steps, it also includes: If the linked list Length Not 0 and The sequence number is not less than the linked list The first element in The sequence number, or the linked list Length is 0, then the Is the sequence number equal to the linked list The serial number of the last element in is increased by 1; If the The sequence number is equal to the linked list The last element in the sequence number is increased by 1, then Inserting into a linked list , and ends the sorting, outputting the corresponding sorting result.
3. The method according to claim 2, characterized in that Said Said Is the sequence number equal to the linked list After the last element in the sequence is incremented by 1, it also includes: If the The sequence number is not equal to the linked list The index of the last element in the array is increased by 1, and the search variable is set. is 0, and determines the search variable Is it greater than ; If the search variable Greater than , create a new pointer Pointing to linked list The last element in Inserting into a linked list The end of Inserting into a linked list The end of the sorting is reached, and the sorting is ended, and the corresponding sorting result is output; If the search variable No more than , search the linked list Elements in , and point it to the linked list The elements in are denoted as ,judge Serial number, Serial number, The size relationship of the serial number is based on the Serial number, Serial number, The order of the serial numbers is sorted and output to obtain the sorting result.
4. The method according to claim 3, characterized in that According to the Serial number, Serial number, The steps of sorting and outputting the sequence numbers according to the size relationship to obtain the sorting result include: like The serial number is equal to The serial number of is increased by 1 and is equal to The serial number of is reduced by 1, then insert and Between, delete , end the sorting and output the corresponding sorting results; like The serial number is equal to The serial number is increased by 1, but it is not equal to The serial number is reduced by 1, insert and Between, create a new pointer point to ,Will Insert to Afterwards, delete , end the sorting and output the corresponding sorting results; like The serial number is not equal to The serial number is increased by 1, but it is equal to The serial number is reduced by 1, insert and End the sorting and output the corresponding sorting results; like The serial number is not equal to The serial number of is increased by 1 and is not equal to The serial number is reduced by 1, insert and Between, create a new pointer point to ,Will Insert to After that, the sorting is ended and the corresponding sorting result is output.
5. The method according to any one of claims 1 to 3, characterized in that The step of sorting and outputting the merged data packets based on the data linked list and the pointer linked list by a sorting strategy to obtain a sorting result also includes: If the linked list Length If it is 0, the linked list Output and delete all the elements in to get the corresponding sorting result; If the linked list Length Not 0, search the linked list The first element in , the linked list it points to The elements in are denoted as , the linked list Center front Output and delete the elements to get the corresponding sorting result.
6. The method according to claim 5, characterized in that The search list The first element in , the linked list it points to The elements in are denoted as , the linked list Center front After the steps of outputting and deleting the elements, it also includes: Determine the linked list Length and the size of the sort window; If the linked list Length Larger than the sorting window, output linked list The first element in , delete the linked list The first element in And linked lists The first element in , and get the corresponding sorting results.
7. A data packet sorting device for a satellite communication system, characterized in that: The device comprises: A receiving module, used to receive numbered service data packets transmitted by a transmitting end through a high orbit link and a low orbit link, wherein the numbered service data packets are data packets obtained by the transmitting end by sequentially numbering the service data packets; A merging module, used for merging the numbered service data packets to obtain a merged data packet; A sorting module is used to sort and output the merged data packets through a sorting strategy based on a data linked list and a pointer linked list to obtain a sorting result, wherein the data linked list is used to store the received merged data packets, and the pointer linked list is used to store a pointer pointing to a location where the data packets in the data linked list are missing, wherein the data linked list is represented as a linked list , the length of the data linked list is expressed as , the data linked list is used to receive the merged data packet, and the merged data packet is represented as , To represent a linked list Middle elements, the pointer list is represented as a linked list , the length of the pointer linked list is expressed as , the pointer list is used to point to the linked list Pointer to the data packet in Representing a linked list Middle elements; The sorting module is also used to initialize the linked list and the linked list Empty and receive the current merged data packet ; Judge the linked list Length Is it 0, and judge Is the sequence number smaller than the linked list The first element in ; if the linked list Length is not 0, and the The sequence number is less than the linked list The first element in , then discard the , and end the sorting, and output the corresponding sorting results.
8. A data packet sorting device for a satellite communication system, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data packet sorting method for a satellite communication system according to any one of claims 1 to 6.
9. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data packet sorting method for a satellite communication system according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Systems and methods for sorting data elements with approximation to o(1)
WO2021083492A1