Data reorganization method and device, equipment, storage medium and computer program product
By setting a first substream buffer and a second reassembly buffer in the receiving device, and using sequence number information to sort and reassemble data packets, the problem of low reassembly efficiency caused by out-of-order arrival of data packets is solved, and the reassembly efficiency of the receiving end is improved.
Patent Information
- Application Number
- CN202411859587.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-12-12
AI Technical Summary
In actual data transmission, due to differences in path transmission performance and dynamic changes, data packets arrive at the receiving end out of order, reducing the receiver's reassembly efficiency.
The receiving device sets up a first sub-stream buffer and a second reassembly buffer. The lookup unit searches for reassembled data packets from the first sub-stream buffer when reassembly is required, and pushes them to the second reassembly buffer for data reassembly. Sequence information is used for sorting and reassembly.
It improves the efficiency of data reassembly at the receiving end, reduces the need for buffer size, and ensures that data packets are reassembled according to sequence number information.
Smart Images

Figure CN121125666A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of transmission technology, and in particular to a data reconstruction method, apparatus, device, storage medium, and computer program product. Background Technology
[0002] In related technologies, multiple paths are used simultaneously to transmit data. The sending end distributes the data to be transmitted to multiple paths, and the receiving end needs to reassemble the data packets received from multiple paths into a single data stream and submit it to the upper-layer application. In an ideal transmission process, the sending end sends data packets in an orderly manner, and the receiving end receives data packets in an orderly manner. However, in actual transmission, due to differences in path transmission performance and dynamic changes, data packets experience different transmission delays during transmission, and some data packets arrive at the receiving end out of order, resulting in low reassembly efficiency at the receiving end. Summary of the Invention
[0003] This application provides a data reconstruction method, apparatus, device, storage medium, and computer program product that can improve the reconstruction efficiency at the receiving end.
[0004] To achieve the above objectives, the technical solution of this application embodiment is implemented as follows:
[0005] In a first aspect, this application proposes a data reconstruction method applied to a receiving device, the receiving device comprising: a first substream buffer and a second reconstruction buffer; the method comprising:
[0006] When the second reassembly buffer sends a reassembly request to the first substream buffer, the first reassembly data packet is searched from a plurality of reassembly data packets stored in the first substream buffer according to the reassembly request; wherein, each of the plurality of reassembly data packets is a reassembly data packet obtained by reassembling the corresponding first data packet according to the corresponding first sequence number information; the first data packet and the corresponding first sequence number information are sent by the sending device and cached in the first substream buffer;
[0007] The first reassembled data packet is pushed to the second reassembled buffer to complete the data reassembly of the first reassembled data packet in the second reassembled buffer.
[0008] Secondly, this application proposes a data reconstruction apparatus applied to a receiving end device, the receiving end device comprising: at least one first substream buffer and a second reconstruction buffer; the apparatus comprising:
[0009] The lookup unit is configured to, when the second reassembly buffer sends a reassembly request to the first substream buffer, search for a first reassembled data packet from a plurality of reassembled data packets stored in the first substream buffer according to the reassembly request; wherein each of the plurality of reassembled data packets is a reassembled data packet obtained by reassembling the corresponding first data packet according to the corresponding first sequence number information; the first data packet and the corresponding first sequence number information are sent by the sending device and cached in the first substream buffer;
[0010] The data reassembly unit is used to push the first reassembled data packet to the second reassembly buffer so as to complete the data reassembly of the first reassembled data packet in the second reassembly buffer.
[0011] Thirdly, this application proposes a data reconstruction device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0012] Fourthly, this application proposes a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0013] Fifthly, this application proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the methods described above.
[0014] This application proposes a data reconstruction method, apparatus, device, storage medium, and computer program product, applied to a receiving end device. The receiving end device includes: a first substream buffer and a second reconstruction buffer. The method includes: when the second reconstruction buffer sends a reconstruction request to the first substream buffer, searching for a first reconstructed data packet from a plurality of reconstructed data packets stored in the first substream buffer according to the reconstruction request; wherein each of the plurality of reconstructed data packets is a reconstructed data packet obtained by reconstructing a corresponding first data packet according to corresponding first sequence number information; the first data packet and the corresponding first sequence number information are sent by the sending end device and buffered in the first substream buffer; and pushing the first reconstructed data packet to the second reconstruction buffer to complete the data reconstruction of the first reconstructed data packet in the second reconstruction buffer. By adopting the above implementation scheme, the requirement for buffer size can be reduced by setting a first sub-stream buffer and a second reassembly buffer in the receiving device. After the first sub-stream buffer receives the first data packet sent by the sending end, it completes data reassembly according to the first sequence number information corresponding to the first data packet. The reassembled data packet is then pushed to the second reassembly buffer according to the reassembly requirements sent by the second reassembly buffer, so that the data reassembly of the first reassembly data packet can be completed in the second reassembly buffer. This allows data packets to be reassembled according to the corresponding sequence number information, thereby improving the reassembly efficiency of the receiving device. Attached Figure Description
[0015] Figure 1 A flowchart illustrating a data reconstruction method provided in an embodiment of this application;
[0016] Figure 2 A schematic diagram illustrating the relationship between an exemplary sub-stream buffer and a reassembly buffer provided for embodiments of this application;
[0017] Figure 3 This is a schematic diagram illustrating an exemplary processing flow of a receiving end receiving a data packet, provided as an embodiment of this application.
[0018] Figure 4 This is a schematic diagram of the structure of a data reconstruction device provided in an embodiment of this application;
[0019] Figure 5 This is a schematic diagram of the structure of a data reconstruction device provided in an embodiment of this application. Detailed Implementation
[0020] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0022] In the following description, references to "some embodiments" are made, which describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first," "second," etc., may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0023] This application provides a data reconstruction method applied to a receiving device, the receiving device including: a first substream buffer and a second reconstruction buffer; Figure 1 A flowchart illustrating a data reconstruction method provided in this application embodiment; as shown Figure 1 As shown, the method includes:
[0024] S101. When the second reassembly buffer sends a reassembly request to the first substream buffer, the first reassembly data packet is searched from multiple reassembly data packets stored in the first substream buffer according to the reassembly request; wherein, each of the multiple reassembly data packets is a reassembly data packet obtained by reassembling the corresponding first data packet according to the corresponding first sequence number information; the first data packet and the corresponding first sequence number information are sent by the sending device and cached in the first substream buffer.
[0025] It should be noted that, in practical applications, this data reconstruction method can be understood as a real-time session-type service data reconstruction method based on multipath transmission.
[0026] It should be noted that the number of first sub-stream buffers can be one or more, the specific number being the same as the path along which the sending device transmits data packets, with each path corresponding to one sub-stream buffer. The number of second reassembly buffers is one, and each sub-stream buffer shares one reassembly buffer. The number of first data packets can be one or more, depending on the actual situation.
[0027] In this embodiment, the first sequence number information can be understood as the chunk sequence number (CSN) of the first data packet, and its specific value can be determined according to the actual situation. It should be noted that in the data packets sent by the sending device, the CSN increments sequentially, with an initial value of 1. A chunk is the smallest unit for upper-layer applications to divide data streams, and the specific division strategy is related to the service characteristics. For example, a video stream can choose to divide the data of the same frame into one chunk.
[0028] It should be noted that the sending device adds encoded information to the data packet. In addition to the first sequence number, the first data packet may also carry a Transmission Sequence Number (TSN) and a Flow Sequence Number (FSN). The TSN increments sequentially, with an initial value of 1, and is used to identify the relative position of the data packet within the entire session data stream. The FSN also increments sequentially, with an initial value of 1, and is used to identify the relative position of the data packet within the path. The specific values of TSN and FSN can be determined based on the actual situation.
[0029] It should be noted that the first data packet can be understood as the data sent by the sending device and buffered in the first sub-stream buffer; each sub-stream buffer receives the first data packet of the corresponding path, and each first data packet carries CSN, TSN, and FSN. Multiple first data packets in the first sub-stream buffer are ordered according to FSN, and after receiving the first data packet, the data is initially reassembled according to the first sequence number information (CSN) of the first data packet.
[0030] In this embodiment of the application, the process of searching for the first reassembled data packet from multiple reassembled data packets stored in the first sub-stream buffer according to the reassembly requirement specifically includes: when the reassembly requirement includes the first sequence number information corresponding to the first reassembled data packet, searching for the first reassembled data packet corresponding to the first sequence number information from the first sub-stream buffer according to the first sequence number information.
[0031] It should be noted that the reassembly requirement includes the first reassembled data packet, which can be understood as the second reassembly buffer containing the data packet with the first sequence number information. When the reassembly requirement includes the first sequence number information corresponding to the first reassembled data packet, the first reassembled data packet corresponding to the first sequence number information is searched from the first sub-stream buffer according to the first sequence number information. This can be understood as, when the second reassembly buffer contains the data packet with the first sequence number information, the first reassembled data packet corresponding to the first sequence number information is searched in the first sub-stream buffer, and the first reassembled data packet is pushed to the second reassembly buffer.
[0032] It should be noted that there are multiple first sub-stream buffers. If two or more first sub-stream buffers contain data packets with first sequence number information, the data packets with first sequence number information in the two or more first sub-stream buffers are pushed to the second reassembly buffer.
[0033] In this embodiment of the application, the process of searching for the first reassembled data packet from multiple reassembled data packets stored in the first substream buffer according to the reassembly requirement specifically includes: when the reassembly requirement does not include the first sequence number information corresponding to the first reassembled data packet, obtaining the quantity information and multiple second sequence number information of multiple reassembled data packets; when the quantity information is not within a preset range, pushing the multiple reassembled data packets to the second reassembly buffer in ascending order of the second sequence number information until the quantity information is within the preset range.
[0034] It should be noted that the number of reassembled data packets can be understood as the number of data packets buffered in the first sub-stream buffer. The preset range can be understood as the maximum number of data packets that the first sub-stream buffer can contain. The specific value can be determined according to the actual situation and is not limited here. As an example, the preset range can be 2. The second sequence number information can be understood as the CSN of the reassembled data packets. It should be noted that the reassembled data packets can also carry TSN and FSN. The meanings of CSN, TSN, and FSN have been explained above and will not be repeated here.
[0035] It should be noted that the situation where the quantity information is not within the preset range can be understood as the number of reassembled data packets buffered in the first sub-stream buffer exceeding two. Multiple reassembled data packets are pushed to the second reassembled buffer in ascending order of their second sequence number information until the quantity information is within the preset range. This can be understood as sorting the multiple reassembled data packets in the first sub-stream buffer according to their corresponding second sequence number information, with the second sequence number in ascending order, and then pushing the sorted multiple reassembled data packets to the second reassembled buffer until the number of reassembled data packets buffered in the second reassembled buffer is two.
[0036] For ease of understanding, here is an example: when the number of reassembled data packets buffered in the first sub-stream buffer is 3, and the first sub-stream buffer can buffer a maximum of 2 data packets, the CSN of the 3 reassembled data packets is obtained, and the reassembled data packet with the smallest CSN (i.e. the redundant reassembled data packet) is pushed to the second reassembled buffer.
[0037] S102. Push the first reassembled data packet to the second reassembled buffer to complete the data reassembly of the first reassembled data packet in the second reassembled buffer.
[0038] It should be noted that the second reassembly buffer completes the data reassembly of the first reassembled data packet after receiving it from the first substream buffer. The specific process of reassembling the first reassembled data packet is as follows: data reassembly is performed within the second reassembly buffer based on the first sequence number information (i.e., CSN) corresponding to the first reassembled data packet.
[0039] The solution in this application embodiment reduces the requirement for buffer size by setting a first substream buffer and a second reassembly buffer in the receiving device. After the first substream buffer receives the first data packet sent by the sending end, it completes data reassembly according to the first sequence number information corresponding to the first data packet. The reassembled data packet is then pushed to the second reassembly buffer according to the reassembly requirements sent by the second reassembly buffer, so that the data reassembly of the first reassembly data packet is completed in the second reassembly buffer. This allows the data packets to be reassembled according to the corresponding sequence number information, thereby improving the reassembly efficiency of the receiving device.
[0040] In this embodiment of the application, the method further includes: reconstructing the second data packet cached in the second reconstructing buffer at preset intervals.
[0041] The second data packet stored in the second reassembly buffer is reassembled at preset intervals. This can be understood as the second reassembly buffer actively triggering the reassembly. In practical applications, this can be referred to as the pull reassembly mode.
[0042] The preset time can be determined based on the actual situation, specifically according to the media data acquisition interval. As an example, for a video stream of 30 frames per second (fps), the trigger interval can be set to 1 / 30 of a second (s).
[0043] It should be noted that, due to the strict temporal relationship between the data, the second reorganization buffer periodically triggers data reorganization and submits data to the upper-layer application according to the relative temporal relationship between the data.
[0044] The solution in this application embodiment reassembles the second data packet stored in the second reassembly buffer at preset time intervals, which can prevent scenarios where no new data packets arrive for a long time. In this application embodiment, the method further includes: if the consumption deadline of the first data packet is within a preset time range, caching the first data packet in the first sub-stream buffer.
[0045] It should be noted that the preset time range can be determined according to the actual situation and is not limited here. If the consumption deadline of the first data packet is within the preset time range, the first data packet will be stored in the first sub-stream buffer.
[0046] In this embodiment of the application, the method further includes: if the consumption deadline of the first data packet is not within a preset time range, discarding the first data packet and removing the data packet with the same first sequence number information as the first data packet from the second reassembly buffer.
[0047] The consumption deadline of the first data packet is not within the preset time range, which can be understood as the consumption deadline of the first data packet exceeding the preset time range. The preset time can be determined according to the actual situation and is not limited here. If the consumption deadline of the first data packet is not within the preset time range, the first data packet is discarded, and data packets with the same sequence number information as the first data packet are removed from the second reassembly buffer. This can be understood as, if the consumption deadline of the first data packet exceeds the preset time range, the first data packet is discarded, and data packets with the same sequence number information as the first data packet, i.e., data packets belonging to the same flow block, are removed from the second reassembly buffer.
[0048] The solution in this application embodiment can check the rationality of the data packet by determining whether the consumption deadline of the first data packet is within a preset time, and can discard unreasonable data packets in a timely manner.
[0049] To facilitate understanding, the above scheme is illustrated here: the sending end adds numbering information to the data packets, and the receiving end reconstructs the original data stream from the sending end based on the numbering. The sending end sets the following three-dimensional sequence numbers to identify the relative position of data blocks / packets:
[0050] TSN, incremented sequentially, with an initial value of 1, is used to identify the relative position of a data packet within the entire session data stream.
[0051] CSN, incrementing sequentially, with an initial value of 1. A Chunk is the smallest unit for upper-layer applications to divide a data stream; the specific division strategy depends on the business characteristics. For example, a video stream may choose to divide the data of the same frame into one chunk.
[0052] FSN, incremented sequentially, with an initial value of 1, is used to identify the relative position of a data packet in the path.
[0053] Setting up a buffer at the receiving end is an effective method to eliminate jitter. This application proposes a two-layer receiving buffer model, including a sub-stream buffer and a reassembly buffer, to address intra-path jitter and inter-path jitter in multipath transmission.
[0054] The receiving end maintains a sub-stream buffer for each path. Data packets received from each path are first stored in the corresponding sub-stream buffer. Each sub-stream shares a reassembly buffer, and data packets are transferred from the sub-stream buffer to the reassembly buffer according to the reassembly requirements of the reassembly buffer.
[0055] Specifically, the receiver's receive buffer needs to perform the following functions:
[0056] (1) Receive data from each path, store the data in the corresponding sub-stream buffer, arrange the data in the sub-stream buffer in order according to FSN, and preliminarily complete the reorganization of the flow block according to CSN.
[0057] (2) The reassembly buffer pulls data from the sub-stream buffer according to the scheduling strategy, arranges data packets according to TSN, and reassembles the stream blocks that have not been reassembled in the sub-stream buffer based on CSN.
[0058] (3) In conjunction with the transmission control strategy, statistical data on the reception status of each path is collected, such as the size of the received valid data, the maximum TSN / FSN, the number of lost data packets, the reassembly status, etc., and reception confirmation, reception status report, reassembly status report, etc. are sent to the sending end according to the transmission control strategy.
[0059] (4) Perform data detection and other functions in conjunction with transmission control strategies. For example, packet loss detection, redundancy removal, etc.
[0060] For ease of understanding, Figure 2 A schematic diagram illustrating the relationship between an exemplary substream buffer and a reassembly buffer is provided for embodiments of this application, as shown below. Figure 2 As shown, the data stream is sent to the corresponding sub-stream buffers through three paths. Sub-stream buffer (a) receives the data stream from path 1, sub-stream buffer (b) receives the data stream from path 2, and sub-stream buffer (c) receives the data stream from path 3. As shown in path 3, the top 4 in the data packets in path 3 represents the FSN, the middle 8 represents the CSN, and the bottom 20 represents the TSN. The ordering of FSN, CSN, and TSN in the data packets in paths 1 and 2 is the same as in path 3, and will not be repeated here. The three sub-stream buffers share one reassembly buffer. In the reassembly buffer, data packets with the same CSN (such as two 5th flow blocks with CSN 5) are reassembled, and the reassembled data stream is output.
[0061] In session-based services, the sending end continuously produces media data, and the receiving end continuously consumes and displays media data, with each data segment having a strict consumption deadline. Therefore, the receive buffer needs to complete stream block reassembly as quickly as possible. Based on the triggering conditions, packet reassembly behavior can be divided into two cases (referred to as Push-Pull reassembly mode):
[0062] The first type (Pull): The reassembly buffer actively triggers data reassembly. Due to the strict timing relationship between data, the reassembly buffer periodically triggers data reassembly, submitting data to the upper-layer application according to the relative timing relationship between data. This method is mainly to prevent scenarios where no new data packets arrive for a long time. The trigger interval is set according to the media data acquisition interval; for example, for a video stream of 30fps, the trigger interval can be set to 1 / 30s.
[0063] The second type (Push): Data packet arrival triggers data reassembly. After processing each newly received data packet, the substream / reassembly buffer is triggered to reassemble the data.
[0064] To reduce buffer size requirements and improve reassembly efficiency, the scheduling strategy between the two buffer layers is also crucial. A newly received data packet that meets the delay constraints is first stored in the sub-stream buffer in order according to the FSN. The reassembly buffer issues a reassembly request to the sub-stream buffer; the sub-stream buffer pushes data packets that meet the reassembly request to the reassembly buffer. Figure 3 This application provides an exemplary flowchart illustrating the processing flow of a receiving end when receiving a data packet, as shown in the embodiments of this application. Figure 3 As shown, the specific steps are as follows:
[0065] 1. Start receiving data packets.
[0066] 2. Determine if the data packet has exceeded the consumption deadline.
[0067] It should be noted that if the data packet exceeds the consumption deadline, proceed to step 3; if the data packet does not exceed the consumption deadline, proceed to step 4.
[0068] 3. Discard data packets and remove data belonging to the same stream block from the buffer.
[0069] It should be noted that data belonging to the same flow block, i.e., data packets, have the same CSN.
[0070] 4. Store the data packets in the substream buffer.
[0071] 5. Determine whether the data packet meets the reassembly requirements of the reassembly buffer.
[0072] It should be noted that if the data packet meets the reassembly requirements of the reassembly buffer, step 6 is executed; if the data packet does not meet the reassembly requirements of the reassembly buffer, step 7 is executed.
[0073] 6. Push the data packet from the substream buffer to the reassembly buffer.
[0074] It should be noted that step 9 is executed after the data packet is pushed from the substream buffer to the reassembly buffer.
[0075] 7. Determine whether the data packet belongs to a new flow block.
[0076] It should be noted that if the data packet belongs to a new flow block, proceed to step 8; if the data packet does not belong to a new flow block, proceed to step 9.
[0077] 8. Push the overflow block of the sub-stream buffer to the reassembly buffer.
[0078] It should be noted that the overflowing stream block in the sub-stream buffer is the stream block with the smaller sequence number, and after pushing the overflowing stream block in the sub-stream buffer to the reassembly buffer, step 9 is executed.
[0079] 9. Reassemble data belonging to the same flow block.
[0080] It should be noted that if step 9 is executed after step 6 or 8, the data belonging to the same flow block is reassembled in the reassembly buffer; if the data packet does not belong to a new flow block and step 9 is executed, the data belonging to the same flow block is reassembled in the sub-flow buffer.
[0081] 10. Update the reorganization buffer update requirements.
[0082] 11. End.
[0083] This application provides a data reconstruction apparatus applied to a receiving device, the receiving device comprising: at least one first substream buffer and a second reconstruction buffer; Figure 4 This is a schematic diagram of the structure of a data reconstruction device provided in an embodiment of this application; as shown below. Figure 4 As shown, the data reconstruction apparatus 400 includes:
[0084] The lookup unit 401 is configured to, when the second reassembly buffer sends a reassembly request to the first substream buffer, search for a first reassembled data packet from a plurality of reassembled data packets stored in the first substream buffer according to the reassembly request; wherein each of the plurality of reassembled data packets is a reassembled data packet obtained by reassembling the corresponding first data packet according to the corresponding first sequence number information; the first data packet and the corresponding first sequence number information are sent by the sending device and cached in the first substream buffer;
[0085] The data reconstruction unit 402 is used to push the first reconstructed data packet to the second reconstruction buffer so as to complete the data reconstruction of the first reconstructed data packet in the second reconstruction buffer.
[0086] Optionally, the data reassembly unit 402 is further configured to reassemble the second data packet cached in the second reassembly buffer at preset intervals.
[0087] Optionally, the lookup unit 401 is further configured to, when the reassembly requirement includes the first sequence number information corresponding to the first reassembled data packet, look up the first reassembled data packet corresponding to the first sequence number information from the first sub-stream buffer according to the first sequence number information.
[0088] Optionally, the lookup unit 401 is further configured to, when the reassembly requirement does not include the first sequence number information corresponding to the first reassembly data packet, obtain the quantity information of the plurality of reassembly data packets and the plurality of second sequence number information; when the quantity information is not within a preset range, push the plurality of reassembly data packets to the second reassembly buffer in ascending order of the second sequence number information until the quantity information is within the preset range.
[0089] Optionally, the data reassembly device 400 further includes a caching unit for caching the first data packet in the first sub-stream buffer when the consumption deadline of the first data packet is within a preset time range.
[0090] Optionally, the data reconstruction device 400 further includes a discarding unit, configured to discard the first data packet if the consumption deadline of the first data packet is not within a preset time range, and to remove data packets with the same first sequence number information as the first data packet from the second reconstruction buffer.
[0091] This application also provides a data reconstruction device. Figure 5 This is a schematic diagram of the structure of a data reconstruction device provided in an embodiment of this application; as shown below. Figure 5 As shown, the data reconstruction device 500 includes a processor 501 and a memory 502. Optionally, the data reconstruction device 500 may also include a communication bus 503.
[0092] In specific embodiments, the processor 501 described above can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and this embodiment does not specifically limit it.
[0093] In this embodiment, the communication bus 503 is used to establish a connection between the processor 501 and the memory 502; when the processor 501 executes the running program stored in the memory 502, it implements the following data reassembly method:
[0094] When the second reassembly buffer sends a reassembly request to the first substream buffer, a first reassembly data packet is searched from a plurality of reassembly data packets stored in the first substream buffer according to the reassembly request; wherein, each of the plurality of reassembly data packets is a reassembly data packet obtained by reassembling the corresponding first data packet according to the corresponding first sequence number information; the first data packet and the corresponding first sequence number information are sent by the sending device and cached in the first substream buffer; the first reassembly data packet is pushed to the second reassembly buffer so that the data reassembly of the first reassembly data packet is completed in the second reassembly buffer.
[0095] Furthermore, the processor 501 is also used to reassemble the second data packet cached in the second reassembly buffer at preset intervals.
[0096] Furthermore, the processor 501 is also configured to, when the reassembly requirement includes the first sequence number information corresponding to the first reassembled data packet, search for the first reassembled data packet corresponding to the first sequence number information from the first sub-stream buffer according to the first sequence number information.
[0097] Furthermore, the processor 501 is also configured to, when the reassembly requirement does not include the first sequence number information corresponding to the first reassembly data packet, obtain the quantity information of the plurality of reassembly data packets and the plurality of second sequence number information; when the quantity information is not within a preset range, push the plurality of reassembly data packets to the second reassembly buffer in ascending order of the second sequence number information until the quantity information is within the preset range.
[0098] Furthermore, the processor 501 is also configured to cache the first data packet in the first sub-stream buffer when the consumption deadline of the first data packet is within a preset time range.
[0099] Furthermore, the processor 501 is also configured to discard the first data packet if the consumption deadline of the first data packet is not within a preset time range, and remove the data packet with the same first sequence number information as the first data packet from the second reassembly buffer.
[0100] This application provides a storage medium storing a computer program thereon. The computer-readable storage medium stores one or more programs, which can be executed by one or more processors. The computer program implements the data reassembly method described above.
[0101] Based on the above embodiments, this application provides a computer program product, including a computer program that can be executed by one or more processors, and the computer program implements the data reorganization method as described above.
[0102] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause an image display device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0104] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A method of data reorganization, characterized by, The method is applied to a receiving end device, and the receiving end device comprises a first sub-flow buffer and a second reorganization buffer. In a case where the second reorganization buffer sends a reorganization requirement to the first sub-flow buffer, a first reorganization data packet is searched from a plurality of reorganization data packets stored in the first sub-flow buffer according to the reorganization requirement, wherein each reorganization data packet in the plurality of reorganization data packets is a reorganization data packet obtained by performing data reorganization on a corresponding first data packet according to corresponding first sequence number information; the first data packet and the corresponding first sequence number information are sent by a sending end device and are buffered in the first sub-flow buffer. The first reorganization data packet is pushed to the second reorganization buffer to complete data reorganization of the first reorganization data packet in the second reorganization buffer.
2. The method of claim 1, wherein, The method further comprises: Every preset time, data reorganization is performed on a second data packet buffered in the second reorganization buffer.
3. The method of claim 1, wherein, The searching of the first reorganization data packet from the plurality of reorganization data packets stored in the first sub-flow buffer according to the reorganization requirement comprises: In a case where the reorganization requirement contains first sequence number information corresponding to the first reorganization data packet, the first reorganization data packet corresponding to the first sequence number information is searched from the first sub-flow buffer according to the first sequence number information.
4. The method of claim 1, wherein, The searching of the first reorganization data packet from the plurality of reorganization data packets stored in the first sub-flow buffer according to the reorganization requirement comprises: In a case where the reorganization requirement does not contain first sequence number information corresponding to the first reorganization data packet, quantity information of the plurality of reorganization data packets and a plurality of second sequence number information are obtained; In a case where the quantity information is not in a preset range, the plurality of reorganization data packets are pushed to the second reorganization buffer in a sequence from small to large according to the second sequence number information until the quantity information is in the preset range.
5. The method of claim 1, wherein, The method further comprises: In a case where a consumption deadline of the first data packet is in a preset time range, the first data packet is buffered in the first sub-flow buffer.
6. The method of claim 1, wherein, The method further comprises: In a case where the consumption deadline of the first data packet is not in the preset time range, the first data packet is discarded, and a data packet with the same first sequence number information as the first data packet is removed from the second reorganization buffer.
7. A data reorganizing apparatus, characterized by comprising: The device is applied to a receiving end device, and the receiving end device comprises a first sub-flow buffer and a second reorganization buffer. A searching unit is configured to, in a case where the second reorganization buffer sends a reorganization requirement to the first sub-flow buffer, search a first reorganization data packet from a plurality of reorganization data packets stored in the first sub-flow buffer according to the reorganization requirement, wherein each reorganization data packet in the plurality of reorganization data packets is a reorganization data packet obtained by performing data reorganization on a corresponding first data packet according to corresponding first sequence number information; the first data packet and the corresponding first sequence number information are sent by a sending end device and are buffered in the first sub-flow buffer. a data reassembly unit configured to push the first reassembled data packet to the second reassembly buffer to complete data reassembly of the first reassembled data packet in the second reassembly buffer.
8. A data reorganizing device, characterized by comprising: A computer program product comprising a memory, a processor and a computer program stored on the memory and loadable into the processor, the processor realizing the steps of the method according to any one of claims 1 to 6 when executing the program.
9. A storage medium having stored thereon a computer program, characterized in that The computer program product when executed by the processor realizes the steps of the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that, The computer program product when executed by the processor realizes the steps of the method according to any one of claims 1 to 6. The computer program product when executed by the processor realizes the steps of the method according to any one of claims 1 to 6.