Packet loss prediction method and device, electronic equipment and storage medium
By determining the time difference and quantity information of acknowledged and unacknowledged data packets in the data packet sequence and inputting it into a trained packet loss prediction model, the problem of low packet loss prediction accuracy in existing technologies is solved, achieving higher packet loss prediction accuracy and data transmission adaptability.
Patent Information
- Application Number
- CN202210345539.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In existing technologies, packet loss prediction methods that rely on fixed time intervals have a high misjudgment rate, resulting in low packet loss prediction accuracy and affecting data transmission performance.
By identifying confirmed and unconfirmed data packets from the data packet sequence, time difference information and quantity information are generated and input into a packet loss prediction model trained based on historical data packets for prediction, thereby improving accuracy.
It improves the accuracy and reliability of packet loss prediction, adapts to different network environments, and enhances data transmission performance.
Smart Images

Figure CN116938765B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet communication technology, and in particular to a packet loss prediction method, device, electronic device and storage medium. Background Technology
[0002] With the development of internet communication technology, related products are emerging in large numbers. The functionality of these products requires data transmission, such as data packets being sent from the sender to the receiver. Due to various factors, packet loss occurs frequently. Related technologies often combine the latest confirmed data packet with a fixed time interval to calculate a target time interval. If an unconfirmed data packet's transmission time falls within the target time interval, it is considered lost. However, relying on a fixed time interval method results in a high false positive rate, and the relatively low accuracy of packet loss prediction also affects data transmission performance. Therefore, a more accurate packet loss prediction solution is needed. Summary of the Invention
[0003] To address at least one of the aforementioned technical problems, this application provides a packet loss prediction method, apparatus, electronic device, and storage medium: According to a first aspect of this application, a packet loss prediction method is provided, the method comprising: From the sequence of data packets sent from the data transmitter to the data receiver within the first time interval, at least one first data packet and one second data packet are identified; the first data packet is a received data packet, and the second data packet is a received data packet. When there is a target first data packet whose transmission time is later than that of the second data packet, time difference information is generated based on the transmission time of the target first data packet and the transmission time of the second data packet; The first quantity information is obtained based on the number of data packets located between the target first data packet and the second data packet in the data packet sequence; The time difference information and the first quantity information are input into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet; the packet loss prediction model is trained based on at least one sample, which is obtained according to the historical data packets sent by the data sending end in the second time interval, wherein the maximum time in the second time interval is earlier than the first time interval and the difference between the maximum time in the second time interval and the minimum time in the first time interval is less than a preset threshold.
[0004] According to a second aspect of this application, a packet loss prediction apparatus is provided, the apparatus comprising: The data packet determination module is used to determine at least one first data packet and a second data packet from the data packet sequence sent from the data sender to the data receiver within a first time interval; the first data packet is a received data packet, and the second data packet is an unreceived data packet; Information generation module: used to generate time difference information based on the sending time of the target first data packet and the sending time of the second data packet when there is a target first data packet whose sending time is later than the sending time of the second data packet; Information acquisition module: used to obtain first quantity information based on the number of data packets located between the target first data packet and the second data packet in the data packet sequence; Packet loss prediction module: used to input the time difference information and the first quantity information into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet; the packet loss prediction model is trained based on at least one sample, the at least one sample is obtained according to the historical data packets sent by the data sending end in the second time interval, the maximum time in the second time interval is earlier than the first time interval and the difference between the maximum time and the minimum time in the first time interval is less than a preset threshold.
[0005] According to a third aspect of this application, an electronic device is provided, the electronic device including at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the at least one processor to implement the packet loss prediction method as described in the first aspect.
[0006] According to a fourth aspect of this application, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or at least one program being loaded and executed by a processor to implement the packet loss prediction method as described in the first aspect.
[0007] According to a fifth aspect of this application, a computer program product is provided, the computer program product comprising at least one instruction or at least one program segment, the at least one instruction or at least one program segment being loaded and executed by a processor to implement the packet loss prediction method as described in the first aspect.
[0008] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application.
[0009] Implementing this application will have the following beneficial effects: This application improves the accuracy of packet loss prediction and enhances the adaptability of the data sender for effective data transmission. When a previously sent data packet is not received while a later sent data packet is received, information on the transmission time and data packet quantity is input into the packet loss prediction model to predict whether the previously sent data packet was lost. The generalization ability of the packet loss prediction model ensures both accuracy and reliability. Furthermore, the training data for the packet loss prediction model is taken from historical data packets sent by the same data sender that meet the transmission time requirements, allowing for better adaptation to network environments at different times, thereby improving data transmission efficiency.
[0010] Other features and aspects of this application will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0011] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This diagram illustrates an application environment according to an embodiment of the present application. Figure 2 A flowchart illustrating a packet loss prediction method according to an embodiment of this application is shown. Figure 3 A flowchart illustrating the process of determining the target first data packet according to an embodiment of this application is shown; Figure 4 A schematic diagram illustrating the process of training a packet loss prediction model according to an embodiment of this application is shown. Figure 5 A schematic diagram illustrating the structure of a data packet sequence according to an embodiment of this application is shown; Figure 6 A schematic diagram illustrating log reporting according to an embodiment of this application is shown; Figure 7 A schematic diagram illustrating the process of generating tags according to an embodiment of this application is shown; Figure 8 This diagram illustrates the application of a packet loss prediction model according to an embodiment of this application. Figure 9 This diagram illustrates a device block diagram according to an embodiment of the present application; Figure 10 A schematic diagram of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0015] Various exemplary embodiments, features, and aspects of this application will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0016] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0017] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0018] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed description. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.
[0019] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0020] TCP (Transmission Control Protocol): Transmission Control Protocol.
[0021] UDP (User Datagram Protocol): User Datagram Protocol.
[0022] QUIC (Quick UDP Internet Connections): A low-latency Internet transport layer protocol based on UDP.
[0023] Please see Figure 1 , Figure 1 The diagram illustrates an application environment according to an embodiment of this application. The application environment may include a data transmitter 10 and a data receiver 20. The data transmitter 10 and the data receiver 20 can be directly or indirectly connected via wired or wireless communication. For the data transmitter 10, it can determine at least one first data packet (a received data packet) and a second data packet (an unreceived data packet) from the sequence of data packets sent from the data transmitter 10 to the data receiver 20 within a first time interval. Then, when there is a target first data packet whose transmission time is later than that of the second data packet, time difference information is generated based on the transmission time of the target first data packet and the transmission time of the second data packet. Furthermore, first quantity information is obtained based on the number of data packets located between the target first data packet and the second data packet in the data packet sequence. Finally, the time difference information and the first quantity information are input into a packet loss prediction model to obtain a first packet loss prediction result for the second data packet. It should be noted that... Figure 1 This is just one example.
[0024] Data sending end 10 can be either a client or a server. Data receiving end 20 can also be either a client or a server. Clients can be physical devices such as smartphones, computers (e.g., desktops, tablets, laptops), augmented reality (AR) / virtual reality (VR) devices, digital assistants, smart voice interaction devices (e.g., smart speakers), smart wearable devices, smart home appliances, and in-vehicle terminals; they can also be software running on these physical devices, such as computer programs. The operating system corresponding to the client can be Android, iOS (a mobile operating system developed by Apple), Linux, or Microsoft Windows. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Servers may include network communication units, processors, and memory, etc. The server can provide background services for the corresponding clients.
[0025] In practical applications, the aforementioned packet loss prediction steps ("determining at least one first data packet and one second data packet from the sequence of data packets sent from data sender 10 to data receiver 20 within the first time interval" to "inputting the time difference information and the first quantity information into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet") can be executed independently by data sender 10, specifically by an internal unit of data sender 10; or independently by another module A besides data sender 10; or by data sender 10 interacting with other module A. Other module A can be a client or a server. Furthermore, the execution entity for training the packet loss prediction model can be data sender 10, another module B besides data sender 10, or data sender 10 and other module B. Other module B can be a client or a server. Of course, other module A and other module B can be the same module or different modules.
[0026] The packet loss prediction scheme provided in this application embodiment can utilize cloud computing technologies. Cloud computing refers to the delivery and usage model of IT infrastructure, which means obtaining the required resources in an on-demand and easily scalable manner through the network; broadly speaking, cloud computing refers to the delivery and usage model of services, which means obtaining the required services in an on-demand and easily scalable manner through the network. Such services can be IT and software, Internet-related, or other services. Cloud computing is a product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.
[0027] The packet loss prediction scheme provided in this application embodiment can be used in related Internet products, which can provide application download services, streaming media services, etc. The data transmission involved in the related Internet products can use communication protocols such as TCP, UDP, and QUIC.
[0028] It should be noted that for data packets, time difference information, quantity information, samples, etc. that are related to user information, when the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0029] Figure 2 This diagram illustrates a flowchart of a packet loss prediction method according to an embodiment of this application. Figure 2 As shown, the method includes: S201: From the sequence of data packets sent from the data transmitter to the data receiver within the first time interval, determine at least one first data packet and one second data packet; the first data packet is a received data packet, and the second data packet is an unreceived data packet; In the embodiments of this application, ideally, the sequence of data packets sent from the data sender to the data receiver within the first time interval should arrive at the data receiver sequentially according to the order of their transmission time. That is, the data packets sent first should be received by the data receiver first, and the data packets sent later should be received later. However, in reality, the data packets sent first may not be received by the data receiver, while the data packets sent later may have already been received by the data receiver.
[0030] refer to Figure 5Here, the first data packet is defined as one that has been received by the data receiving end in the data packet sequence, and the second data packet is defined as one that has not been received by the data receiving end in the data packet sequence. The first and second data packets defined here can satisfy the ideal situation described above, that is, the transmission time of the first data packet is earlier than the transmission time of the second data packet. Alternatively, the first and second data packets defined here can satisfy the actual situation described above, that is, there exists a first data packet whose transmission time is later than the transmission time of the second data packet.
[0031] When determining the first and second data packets, the acknowledgment information returned by the data receiver can be used as a reference. (Based on the data packet sequence...) For example, if the data packet with the smaller index i in the data packet sequence is sent first, then if the data receiver sends an indication to the data sender... If the confirmation information is received, then proceed according to the instructions. The confirmation information can determine If it is a confirmed received data packet, otherwise determine This is an unacknowledged data packet. A third time interval can be set. The minimum time of the third time interval can be the sending time of the relevant data packet, or it can be the relevant sending time of the data packet sequence (such as the earliest sending time, the latest sending time, the median of all sending times, the average time of all sending times, etc.). The duration of the third time interval can be preset. If the data sender does not receive an indication from the data receiver within the third time interval... If the confirmation information is received, then the judgment is made. This is an unacknowledged data packet.
[0032] In practical applications, 1) step S201 can be executed by the data sending end (e.g., an internal unit of the data sending end). In this case, the first and second data packets can be determined from the data packet sequence based on whether the data sending end has received confirmation information indicating the relevant data packets. Alternatively, step S201 can be executed by another module A besides the data sending end. In this case, the data packet sequence sent by the data sending end to the data receiving end within the first time interval can be obtained from the data sending end, confirmation information indicating the relevant data packets can be obtained from either the data sending end or the data receiving end, and the first and second data packets can be determined from the data packet sequence based on the obtained confirmation information indicating the relevant data packets. 2) The number of determined second data packets can be greater than or equal to 1. 3) There can be multiple data receiving ends that interact with the data sending end. It can be understood that data packet sequence 1 is sent from the data sending end to data receiving end 1. When determining the received and unreceived data packets from data packet sequence 1, the confirmation information returned by data receiving end 2 is referenced. Furthermore, data packet sequence 2 sent from the data sending end to data receiving end 2 can be the same as data packet sequence 1.
[0033] S202: When there is a target first data packet whose transmission time is later than that of the second data packet, time difference information is generated based on the transmission time of the target first data packet and the transmission time of the second data packet; In this embodiment of the application, a data packet sequence is used. For example, if the data packet with the smaller index i in the data packet sequence is sent first, then the first data packet includes... , , and The second data packet is ,So The first data packet is the target. Because... Sending time Later Sending time Correspondingly, it can be based on Sending time and Sending time ratio Generate time difference information. It can also be based on... Sending time and Sending time The difference Generate time difference information.
[0034] Furthermore, using data packet sequences For example, if the data packet with the smaller index i in the data packet sequence is sent first, then the first data packet includes... , , and The second data packet includes , , and So for , , In other words, The first data packet is the target. Because... Sending time Later Sending time Later Sending time Later Sending time Correspondingly, it can be based on Sending time and Sending time ratio Generate targeting Time difference information; or it can be based on Sending time and Sending time The difference Generate targeting Time difference information. This can be based on... Sending time and Sending time ratio Generate targeting Time difference information; or it can be based on Sending time and Sending time The difference Generate targeting Time difference information. This can be based on... Sending time and Sending time ratio Generate targeting Time difference information; or it can be based on Sending time and Sending time The difference Generate targeting The time difference information. Of course, this applies to the second data packet. Time difference information can also come from .in, Indicates no second data packet Sending time, Indicates the second data packet The corresponding target first data packet Sending time, , These represent the ratio coefficient and the difference coefficient, respectively.
[0035] Considering the differences in confirmation information or confirmation rules, received data packets can be classified into two categories: base packets and option packets. 1) The data sender sequentially sends packets 1 through n to the data receiver. After receiving packets 1 through n, the data receiver returns a first-type confirmation message to the data sender indicating packets 1 through n. This first-type confirmation message indicates that packets 1 through n are all received. Packet n can be considered the base packet, and packets preceding it in the relevant packet sequence are all received. 2) The data sender sequentially sends packets 1 through n to the data receiver. After receiving packets 1 through i, the data receiver does not receive packets i+1 and i+2, but instead receives packets i+3 and i+4. The data receiver returns a first-type confirmation message indicating packets 1 through i, a second-type confirmation message indicating packets i+3, and a second-type confirmation message indicating packets i+4 to the data sender. This first-type confirmation message indicates that packets 1 through i are all received. Data packet i can be considered the base packet, and all packets preceding it in the relevant packet sequence are acknowledged packets. The two second-type acknowledgment messages indicate that data packets i+3 and i+4 are acknowledged packets, respectively. Data packets i+3 and i+4 can be considered option packets. The option packets are sent later than the base packet. In practical applications, an acknowledgment packet returned by the data receiver may include a first-type acknowledgment message (e.g., ACK) and at least one second-type acknowledgment message (e.g., SACK).
[0036] The determination of the target first data packet will be described below, based on the baseline data packet and option data packet mentioned above: 1) If at least one first data packet includes a base data packet and an option data packet, then the option data packet is a candidate for the target first data packet. If the transmission time of the option data packet is later than the transmission time of the second data packet, then the candidate data packet is determined to be the target first data packet. It should be noted that when the number of second data packets is greater than 1, the option data packet can be used as the target first data packet for second data packets with transmission times earlier than it. It can be understood that in this case, packet loss prediction is not performed on second data packets with transmission times later than the option data packet.
[0037] 2) If at least one first data packet includes a base data packet and at least two option data packets, then as follows Figure 3 As shown, when there is a target first data packet whose transmission time is later than that of the second data packet, before generating time difference information based on the transmission time of the target first data packet and the transmission time of the second data packet, the method further includes: S301: Determine the candidate data packet as the one with the latest transmission time among the at least two option data packets; S302: When the sending time of the candidate data packet is later than the sending time of the second data packet, the candidate data packet is determined to be the target first data packet.
[0038] Referring to the statement "After receiving data packet 1-data packet i, the data receiver did not receive data packets i+1 and i+2, but instead received data packets i+3 and i+4", then at least two option data packets include data packets i+3 and i+4, with the one sent latest being data packet i+4. Therefore, data packet i+4 is determined as a candidate data packet. At this point, the sending time of data packet i+4 is later than the sending time of data packet i+1, making data packet i+1 a second data packet; the sending time of data packet i+4 is later than the sending time of data packet i+2, making data packet i+2 a second data packet. Thus, data packet i+4, as a candidate data packet, is the target first data packet. Combining the characteristics of the baseline data packet and option data packets ("the sending time of the baseline data packet is earlier than the sending times of the at least two option data packets respectively, and the baseline data packet indicates that all data packets preceding it in the data packet sequence are confirmed received data packets"), using option data packets as the screening object for the target first data packet can effectively improve the efficiency of locating the target first data packet. By selecting the latest sent data packet as a candidate for the first target data packet and verifying it, we can ensure that the determined first target data packet is qualified to participate in packet loss prediction ("the data packet sent earlier has not been received, and the data packet sent later has been received") and can also provide the latest sequence position interval to avoid misjudgment of packet loss.
[0039] It should be noted that: a) When the number of second data packets is equal to 1, we can first filter out option data packets whose sending time is later than the second data packet from at least two option data packets, and then determine the latest sending time among the filtered option data packets as the target first data packet. b) When the number of second data packets is greater than 1, we can still determine the latest sending time among at least two option data packets as a candidate data packet. This candidate data packet can be used as the target first data packet for second data packets whose sending time is earlier than it. It can be understood that in this case, packet loss prediction is not performed on second data packets whose sending time is later than the candidate data packets. c) In practice, second data packets whose sending time is earlier than the option data packets generally exist, so we can directly determine the latest sending time among at least two option data packets as the target first data packet.
[0040] S203: Obtain first quantity information based on the number of data packets located between the target first data packet and the second data packet in the data packet sequence; In this embodiment of the application, a data packet sequence is used. For example, if the data packet with the smaller index i in the data packet sequence is sent first, then the first data packet includes... , , and The second data packet is ,So The first data packet is the target. It can be based on... and The first quantity information is generated by the number of data packets between them being 0, or it can be based on... and The subscript difference of 1 generates the first quantity information.
[0041] Furthermore, using data packet sequences For example, if the data packet with the smaller index i in the data packet sequence is sent first, then the first data packet includes... , , and The second data packet includes , , and So for , , In other words, The first data packet is the target. It can be based on... and The number of data packets between them is 2, generating a target The first quantity information; or it can be based on and The subscript difference of 3 generates a value for... The first quantity information. It can be based on... and The number of data packets between them is 1, generating a target The first quantity information; or it can be based on and The subscript difference of 2 generates a value for... The first quantity information. It can be based on... and The number of data packets between them is 0, generating a target The first quantity information; or it can be based on and The subscript difference of 1 generates a value for... The first quantity information.
[0042] S204: Input the time difference information and the first quantity information into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet; the packet loss prediction model is trained based on at least one sample, the at least one sample is obtained according to the historical data packets sent by the data sending end in the second time interval, the maximum time in the second time interval is earlier than the first time interval and the difference between the maximum time and the minimum time in the first time interval is less than a preset threshold.
[0043] In this embodiment, using time difference information and first quantity information as input, a first packet loss prediction result for the second data packet output by the packet loss prediction model is obtained. When the number of the second data packet is greater than 1, using time difference information and first quantity information for the specific second data packet as input, a first packet loss prediction result for that specific second data packet output by the packet loss prediction model is obtained.
[0044] The packet loss prediction model is obtained by training at least one sample using machine learning and adjusting the model parameters during training. At least one sample is obtained based on historical data packets sent by the data sender within a second time interval. A sample includes time difference information and a first quantity information for a specific historical data packet. The generation or acquisition of the time difference information and the first quantity information for a specific historical data packet can be referred to the aforementioned steps S202-S203, and will not be repeated here. The maximum time in the second time interval is earlier than the first time interval, and the difference between the maximum time and the minimum time in the first time interval is less than a preset threshold. It can be understood that if the historical time before the first time interval is divided into multiple historical time intervals, then the second time interval is the one closest to the first time interval among these multiple historical time intervals. The maximum time in the historical time before the first time interval can be earlier than or equal to the minimum time in the first time interval. The training data for the packet loss prediction model is taken from historical data packets sent by the same data sender that meet the sending time requirements, which can improve adaptability to the network environment in which the same data sender is located and effectively cope with changes in the network environment in which the same data sender is located. For example, changes between at least two types of networks: cellular networks, Wi-Fi networks, and fixed networks.
[0045] In an exemplary embodiment, referring to the relevant descriptions in steps S301-S302 above, before inputting the time difference information and the first quantity information into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet, the method may further include the following step: obtaining second quantity information based on the number of optional data packets. Accordingly, the time difference information, the first quantity information, and the second quantity information are input into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet.
[0046] Referring to the statement "After receiving data packet 1-data packet i, the data receiver did not receive data packets i+1 and i+2, but instead received data packets i+3 and i+4," then at least two option data packets include data packets i+3 and i+4. Therefore, the second quantity information can be obtained based on the number 2 of at least two option data packets. The data input to the packet loss prediction model includes not only time difference information and the first quantity information, but also this second quantity information. When the number of second data packets is greater than 1, the data input to the packet loss prediction model includes not only time difference information and the first quantity information for the specific second data packet, but also this second quantity information. For at least one sample on which the packet loss prediction model is trained, a sample includes time difference information, the first quantity information, and the second quantity information for a specific historical data packet. Generally, packet loss prediction is not performed on unacknowledged data packets whose transmission time is later than the option data packets. To a certain extent, the number of option data packets can also play a role in packet loss prediction. This increases the input data participating in model training and prediction, and the accuracy of packet loss prediction can be improved by increasing the information dimensionality of the input data.
[0047] In an exemplary embodiment, after inputting the time difference information and the first quantity information into the packet loss prediction model to obtain a first packet loss prediction result indicating the second data packet, the method may further include the following steps: when the first packet loss prediction result indicates that the second data packet is lost, generating a retransmission instruction for the second data packet.
[0048] If the loss of the second data packet is predicted, a retransmission instruction is generated, which guides the data sender to retransmit the second data packet to the data receiver. Timely retransmission improves data transmission performance. For example, if the execution entity of steps S201-S204 is the data sender (e.g., the packet loss prediction unit of the data sender), the retransmission instruction is generated by the data sender (e.g., the sending unit of the data sender), triggering the data sender (e.g., the sending unit of the data sender) to retransmit the second data packet to the data receiver. If the execution entity of steps S201-S204 is another module A besides the data sender, the retransmission instruction is generated by the other module A, and the retransmission instruction is sent to the data sender. In response to the received retransmission instruction, the data sender retransmits the second data packet to the data receiver.
[0049] The following section will describe the process of training and obtaining the packet loss prediction model: 1) such as Figure 4 As shown, the process may include the following steps: S401: In response to a model update instruction, acquire at least one sample; each sample carries a label indicating whether packet loss has occurred; S402: Input the sample into the machine learning model to obtain the second packet loss prediction result of the historical data packets corresponding to the sample; S403: Based on the matching result between the second packet loss prediction result and the label carried by the sample, adjust the parameters of the machine learning model until the model convergence condition is met; S404: The machine learning model that satisfies the model convergence condition is determined as the packet loss prediction model.
[0050] The training of the model is continuous, and the model is constantly being updated. It can be understood that the packet loss prediction model here is both the result of the previous training and the basis for the next training. The initial model used to train the packet loss prediction model can be a decision tree model, a binary classification model (such as a support vector machine), a recurrent neural network (RNN) model, etc., and the packet loss prediction model can be trained under supervised learning conditions.
[0051] For example, sample j is obtained based on historical data packet j, and sample j includes time difference information j and first quantity information j for historical data packet j. Sample j carries a label j indicating that historical data packet j is lost. Taking the time difference information j and the first quantity information j as input, the machine learning model outputs a second packet loss prediction result for historical data packet j. If the second packet loss prediction result indicates that historical data packet j is lost, then the second packet loss prediction result matches the label j, the reward function value can be updated, and the parameters of the machine learning model can be adjusted based on the reward function value. If the second packet loss prediction result indicates that historical data packet j is not lost, then the second packet loss prediction result does not match the label j, the penalty function value can be updated, and the parameters of the machine learning model can be adjusted based on the penalty function value.
[0052] (ii) Source of the sample: The step of obtaining the at least one sample in response to the model update instruction may include the following steps: First, in response to the model update instruction, determine the second time interval and at least one historical data packet whose transmission time is within the second time interval; then, obtain log information corresponding to each historical data packet; the log information describes the transmission trajectory of the historical data packet; furthermore, obtain the at least one sample based on the log information corresponding to each historical data packet.
[0053] It is understandable that the log server stores log information corresponding to each data packet sent by the data sender. Each log information may include time difference information, first quantity information, and second quantity information for a specific data packet. Each log information may also include the number of times the specific data packet was sent, relevant information about the data receiver (such as identification information, IP address, and communication protocol used), and transmission flags (such as flags indicating the first type of acknowledgment information, flags indicating the second type of acknowledgment information, and false retransmission flags). It should be noted that the relevant data packets are those that were not acknowledged in their respective data packet sequences. The time difference information, first quantity information, and second quantity information in the log information can be taken from the generation or acquisition result of the specific data packet being the first unacknowledged data packet in its respective data packet sequence.
[0054] The model update instruction specifies a time (e.g., instruction generation time, instruction sending time, instruction receiving time). The log server currently stores log information corresponding to each relevant data packet sent by the data sender before a reference time, which is a historical time with a time difference threshold from the specified time. For ease of distinction, we call this relevant data packet the candidate data packet set. At least one historical data packet is determined from the candidate data packet set based on a second time interval. Based on this, the log information corresponding to each historical data packet is obtained from the log server, thus obtaining at least one sample. The training data for the packet loss prediction model is taken from log information, ensuring acquisition efficiency and thus ensuring model update efficiency.
[0055] In practical applications, log servers can store massive amounts of log information pointing to a vast number of data packets. These massive data packets inevitably involve packets sent from different network environments. Training data extracted from this massive log information has strong representative significance, thus ensuring the effectiveness of the packet loss prediction model. See also... Figure 6 Log information can be reported to the log server via user objects or CDN servers; it can also be obtained by processing log files, which are reported to the log server via user objects or CDN servers. Each log file reported by a user object indicates an IP address. The log information stored on the log server is constantly updated, even in real time.
[0056] Log information includes relevant protocol stack statistics, such as Round-Trip Time (RTT), Ratio_time (corresponding to the time difference information above: ratio), Order_out (corresponding to the first quantity information above: index difference), and Sacked_out (corresponding to the second quantity information above). Generally speaking, the larger the Order_out value, the higher the probability of packet loss; the larger the Ratio_time, the higher the probability of packet loss. The sample obtained based on the log information can be a...<Ratio_time,Order_out,Sacked_out> The triplets formed.
[0057] See Figure 8 Considering the consumption of computing resources, the instruction generation time can be timed, such as generating a model update instruction every 4-5 hours. In response to the model update instruction, the current batch of samples is obtained from the log information updated in the last 4-5 hours in the log server, and then the current batch of samples is used to update the model so that the updated model is more in line with the current network environment.
[0058] (iii) Tag generation: Based on the description in section (ii) above, each log entry includes a transmission count and at least one transmission flag. The tag generation process may include the following steps: 1) comparing the transmission count with a quantity threshold; 2.1) when the transmission count is less than or equal to the quantity threshold, generating a tag indicating that the historical data packet was not lost; 2.2) when the transmission count is greater than the quantity threshold and the at least one transmission flag contains a false retransmission flag, generating a tag indicating that the historical data packet was not lost; 2.3) when the transmission count is greater than the quantity threshold and the at least one transmission flag does not contain a false retransmission flag, generating a tag indicating that the historical data packet was lost. This process can be referenced... Figure 7 In this system, the server is the data sender and the client is the data receiver.
[0059] The number threshold can be set to 1. If the number of transmissions is equal to 1, it can be considered that the historical data packets have not been retransmitted or lost, and a label indicating that the historical data packets have not been lost can be generated. If the number of transmissions is greater than 1, it can be considered that the historical data packets have been retransmitted to a certain extent. However, in order to improve the accuracy of the retransmission determination, it is necessary to check whether at least one transmission flag contains a false retransmission flag (Dsack flag). A false retransmission flag indicates that the historical data packets have not been lost. Therefore, if a false retransmission flag is present, it can be considered that the historical data packets have not been lost, and a label indicating that the historical data packets have not been lost can be generated; if a false retransmission flag is not present, it can be considered that the historical data packets have been lost, and a label indicating that the historical data packets have been lost can be generated. Based on the relationship between the number of transmissions and the number threshold (1), and whether a false retransmission flag is present, a label for result matching during training is generated, which can ensure the convenience and effectiveness of model training.
[0060] In practical applications, log servers are used to store log information corresponding to the relevant data packets sent by the data sender. Relevant data packets are unacknowledged data packets that have passed through their respective data packet sequences. Based on the relationship between the number of transmissions and the quantity threshold (1), and whether a false retransmission flag is present, some data packets in the relevant data packets can be filtered out (the number of transmissions is less than or equal to the quantity threshold; the number of transmissions is greater than the quantity threshold and at least one transmission flag does not contain a false retransmission flag). Accordingly, the training data for the packet loss prediction model is obtained from the filtered relevant data packets, which can improve the prediction accuracy of the model.
[0061] For the filtered relevant data packets, tags can be generated using a fixed duration. The time difference information, first quantity information, and second quantity information in the log information can be taken from the generation or acquisition results of the specific data packet when it first appears as an unacknowledged data packet in its sequence. When a specific data packet first appears as an unacknowledged data packet in its sequence, if its transmission time is earlier than the transmission time of the reference data packet, and the difference is greater than or equal to the fixed duration, then a tag indicating its loss is generated. The reference data packet is the target first data packet when the specific data packet first appears as an unacknowledged data packet in its sequence. The fixed duration can be one-quarter of a minimum RTT.
[0062] The packet loss prediction scheme provided in this application can be used for real-time packet loss prediction. For example... Figure 8As shown, if the server is the data sender, after receiving the acknowledgment packet, the server generates or obtains the time difference information (Ratio_time), the first quantity information (Order_out), and even the second quantity information (Sacked_out) of the second data packet, and inputs it into the packet loss prediction model running on the server. The server determines whether the second data packet is lost based on the packet loss prediction result output by the packet loss prediction model. If it is determined to be lost, the second data packet is immediately retransmitted. If the prediction is not accurate enough, RTO (Retransmission Timeout) is used to supplement it. Regarding the application of RTO, it can be understood that there is a time interval, which can be set for specific data packets. If a data packet is not acknowledged within this time interval after it is sent, RTO will be triggered; if a data packet is not acknowledged within this time interval and is actively retransmitted, RTO will also be triggered. Corresponding packet loss prediction models can be built for different data senders, and the models can be periodically updated using historical data packets that meet the sending time requirements to better adapt to the network environment and ensure data transmission performance.
[0063] As can be seen from the technical solutions provided in the embodiments of this application above, the embodiments of this application improve the accuracy of packet loss prediction and enhance the adaptability of the data sender to perform effective data transmission. When there is a situation where a previously sent data packet has not been received, while a subsequently sent data packet has been received, information in the dimensions of sending time and data packet quantity is input into the packet loss prediction model to predict whether the previously sent data packet has been lost. By leveraging the generalization ability of the packet loss prediction model, the accuracy and reliability of packet loss prediction are ensured. Simultaneously, the training data for the packet loss prediction model is taken from historical data packets sent by the same data sender that meet the sending time requirements, which can better adapt to the network environment of data senders at different times, thereby improving data transmission efficiency.
[0064] This application also provides a packet loss prediction device, such as... Figure 9 As shown, the packet loss prediction device 100 includes: The data packet determination module 1001 is used to determine at least one first data packet and a second data packet from the data packet sequence sent from the data transmitter to the data receiver within a first time interval; the first data packet is a received data packet, and the second data packet is an unreceived data packet; Information generation module 1002: When there is a target first data packet whose transmission time is later than the transmission time of the second data packet, it generates time difference information based on the transmission time of the target first data packet and the transmission time of the second data packet; Information acquisition module 1003: used to obtain first quantity information based on the number of data packets located between the target first data packet and the second data packet in the data packet sequence; Packet loss prediction module 1004: used to input the time difference information and the first quantity information into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet; the packet loss prediction model is trained based on at least one sample, the at least one sample is obtained according to the historical data packets sent by the data sending end in the second time interval, the maximum moment in the second time interval is earlier than the first time interval and the difference between the maximum moment and the minimum moment in the first time interval is less than a preset threshold.
[0065] It should be noted that the apparatus and method embodiments described in the device embodiments are based on the same inventive concept.
[0066] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0067] This application also provides a computer-readable storage medium storing at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the above-described method. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0068] This application also provides an electronic device, which includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the at least one processor to implement the above method.
[0069] Electronic devices can be provided as terminals, servers, or other forms of devices.
[0070] Figure 10 A block diagram of an electronic device according to an embodiment of this application is shown. For example, electronic device 1900 may be provided as a server. (Refer to...) Figure 10 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0071] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output (I / O) interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0072] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.
[0073] This application may be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this application.
[0074] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0075] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0076] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C+, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via 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). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing the status information of the computer-readable program instructions. These electronic circuits can execute the computer-readable program instructions to implement various aspects of this application.
[0077] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0078] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0079] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which includes one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions specified in the blocks may occur in a different order than those specified in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0081] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technological improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A packet loss prediction method, characterized in that, The method includes: From the sequence of data packets sent from the data transmitter to the data receiver within the first time interval, at least one first data packet and one second data packet are identified; the first data packet is a received data packet, and the second data packet is a received data packet. When there is a target first data packet whose transmission time is later than that of the second data packet, time difference information is generated based on the transmission time of the target first data packet and the transmission time of the second data packet; The first quantity information is obtained based on the number of data packets located between the target first data packet and the second data packet in the data packet sequence; The time difference information and the first quantity information are input into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet; the packet loss prediction model is trained based on at least one sample, which is obtained according to the historical data packets sent by the data sending end in the second time interval, wherein the maximum time in the second time interval is earlier than the first time interval and the difference between the maximum time in the second time interval and the minimum time in the first time interval is less than a preset threshold.
2. The method according to claim 1, characterized in that, The at least one first data packet includes a base data packet and at least two option data packets, wherein the base data packet is sent earlier than the respective sending times of the at least two option data packets, and the base data packet indicates that all data packets preceding it in the data packet sequence are confirmed data packets; Before generating time difference information based on the sending time of the first data packet and the second data packet when there is a target first data packet whose sending time is later than that of the second data packet, the method further includes: The packet with the latest sending time among the at least two option packets is determined as the candidate packet; When the sending time of the candidate data packet is later than the sending time of the second data packet, the candidate data packet is determined to be the target first data packet.
3. The method according to claim 2, characterized in that: Before inputting the time difference information and the first quantity information into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet, the method further includes: Based on the number of option data packets, obtain the second quantity information; The step of inputting the time difference information and the first quantity information into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet includes: The time difference information, the first quantity information, and the second quantity information are input into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet.
4. The method according to any one of claims 1-3, characterized in that, After inputting the time difference information and the first quantity information into the packet loss prediction model to obtain a first packet loss prediction result indicating the second data packet, the method further includes: When the first packet loss prediction result indicates that the second data packet is lost, a retransmission instruction for the second data packet is generated.
5. The method according to any one of claims 1-3, characterized in that, The method further includes: In response to a model update instruction, at least one sample is acquired; each sample carries a label indicating whether packet loss has occurred. The sample is input into a machine learning model to obtain the second packet loss prediction result of the historical data packets corresponding to the sample. Based on the matching result between the second packet loss prediction result and the label carried by the sample, the parameters of the machine learning model are adjusted to meet the model convergence condition. The machine learning model that satisfies the model convergence condition is determined as the packet loss prediction model.
6. The method according to claim 5, characterized in that, The step of obtaining the at least one sample in response to a model update instruction includes: In response to the model update instruction, the second time interval and at least one of the historical data packets whose transmission time falls within the second time interval are determined; Log information corresponding to each of the historical data packets is obtained; the log information describes the transmission trajectory of the historical data packets. The at least one sample is obtained based on the log information corresponding to each historical data packet.
7. The method according to claim 6, characterized in that, The log information includes the number of transmissions and at least one transmission flag, and the method further includes: Compare the number of transmissions with the quantity threshold; When the number of transmissions is less than or equal to the quantity threshold, a tag indicating that the historical data packets have not been lost is generated; When the number of transmissions exceeds the quantity threshold and at least one transmission flag contains a false retransmission flag, a tag indicating that the historical data packet was not lost is generated. When the number of transmissions exceeds the quantity threshold and the at least one transmission flag does not contain a false retransmission flag, a tag indicating the loss of the historical data packet is generated.
8. A packet loss prediction device, characterized in that, The device includes: The data packet determination module is used to determine at least one first data packet and a second data packet from the data packet sequence sent from the data sender to the data receiver within a first time interval; the first data packet is a received data packet, and the second data packet is an unreceived data packet; Information generation module: used to generate time difference information based on the sending time of the target first data packet and the sending time of the second data packet when there is a target first data packet whose sending time is later than the sending time of the second data packet; Information acquisition module: used to obtain first quantity information based on the number of data packets located between the target first data packet and the second data packet in the data packet sequence; Packet loss prediction module: used to input the time difference information and the first quantity information into the packet loss prediction model to obtain the first packet loss prediction result of the second data packet; the packet loss prediction model is trained based on at least one sample, the at least one sample is obtained according to the historical data packets sent by the data sending end in the second time interval, the maximum time in the second time interval is earlier than the first time interval and the difference between the maximum time and the minimum time in the first time interval is less than a preset threshold.
9. An electronic device, characterized in that, The electronic device includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the at least one processor to implement the packet loss prediction method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the packet loss prediction method as described in any one of claims 1-7.
11. A computer program product, characterized in that, The computer program product includes at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the packet loss prediction method as described in any one of claims 1-7.
Citation Information
Patent Citations
Voice data transmission method and device
CN109218083A
Packet loss coping method and device, electronic equipment and storage medium
CN110677355A