A data processing method and apparatus

By determining whether data packets have expired in cloud gaming and deciding whether to consume them immediately based on their importance level, the latency problem caused by data packet loss in cloud gaming is solved, improving the game's response speed and smoothness.

CN114130008BActive Publication Date: 2026-01-13GUANGZHOU JIANYUE INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111174177.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2026-01-13
Estimated Expiration
2042-01-13

AI Technical Summary

Technical Problem

In cloud gaming, data packet loss can cause the cloud to be unable to respond to cloud gaming operation commands in a timely manner, affecting the smoothness of the game.

Method used

By determining whether a data packet has expired at the receiving end and deciding whether to consume the received data packet immediately based on its consumption importance level, the order of data packet consumption is ensured to match the order of transmission.

Benefits of technology

It improves the response speed and smoothness of cloud gaming, avoiding delays caused by waiting for lost data packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114130008B_ABST
    Figure CN114130008B_ABST
Patent Text Reader

Abstract

The application provides a data processing method and device. If a first data packet in a plurality of data packets sent by a sending end at a preset sending interval is received, it is determined whether a second data packet has been received by the receiving end. The first data packet comprises one data packet in the plurality of data packets, and the second data packet comprises a data packet in the plurality of data packets before the first data packet in the preset sending order. A consumption order in which the plurality of data packets are consumed matches the preset sending order. If the second data packet is not received and the second data packet has expired, it is determined whether a consumption importance level of the second data packet is a preset consumption importance level. In the case where the consumption importance level of the second data packet is the preset consumption importance level, the first data packet is consumed. Through the application, an application corresponding to the plurality of data packets can be responded in time, and the response of the application is avoided to be delayed, for example, the fluency of the application can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method and apparatus. Background Technology

[0002] Cloud technology, combined with cloud virtualization and streaming media encoding and transmission technologies, and leveraging increasingly sophisticated cloud infrastructure and mobile communication networks, makes games that were previously only available on high-configuration / high-resource consoles more accessible.

[0003] During cloud gaming, users interact with the game on their mobile phones (such as tapping or swiping the screen). These cloud gaming commands need to be transmitted quickly and accurately to the cloud so that the game screen can respond rapidly.

[0004] For a better gaming experience, the end-to-end latency of cloud gaming commands must be kept to a short time, such as 100ms, to ensure smooth gameplay.

[0005] The cloud gaming operation command includes multiple data packets with a preset sending order. That is, the mobile phone sends each data packet of the cloud gaming operation command to the cloud sequentially and at intervals according to the preset sending order. Correspondingly, the cloud receives each data packet sequentially and consumes them in a consumption order adapted to the preset sending order, thus completing the response to the cloud gaming operation command.

[0006] However, sometimes some data packets in multiple data packets may be lost during transmission, causing the cloud to be unable to receive those packets. In this case, even if a data packet that is after that part of the data packet in the preset sending order is received, it is not necessary to consume the data packet that is after that part of the data packet in the preset sending order. Instead, it can wait for that part of the data packet until it is received, then consume that part of the data packet, and then consume the data packet that is after that part of the data packet in the preset sending order.

[0007] However, while waiting for this part of the data packet, the delay of this part of the data packet and the data packets that are located after this part of the data packet in the preset sending order may all time out, for example, exceeding 100ms, causing the instruction to not be responded to in time and affecting the smoothness of the game. Summary of the Invention

[0008] To address the aforementioned technical problems, this application discloses a data processing method and apparatus.

[0009] In a first aspect, this application discloses a data processing method applied to a receiving end, the method comprising: upon receiving a first data packet from a plurality of data packets continuously and intermittently transmitted by a sending end in a preset transmission order, determining whether the receiving end has received a second data packet; the first data packet comprising one of the plurality of data packets, and the second data packet comprising a data packet from the plurality of data packets that precedes the first data packet in the preset transmission order; the consumption order of the plurality of data packets being consumed matching the preset transmission order; if the second data packet has not been received, determining whether the second data packet has expired; if the second data packet has expired, obtaining a consumption importance level of the second data packet; and if the consumption importance level of the second data packet is a preset consumption importance level, consuming the first data packet.

[0010] Secondly, this application discloses a data processing method applied to a sending end, the method comprising: when it is necessary to continuously and intermittently send each of a plurality of data packets to a receiving end in a preset sending order, for each of the plurality of data packets, setting at least one identifier in a specific field of the data packet to indicate the consumption importance level of a data packet preceding the data packet in the preset sending order; and setting a time interval in a preset field of the data packet; wherein the time interval includes: the time interval between the sending time when sending the data packet and the sending time when sending a data packet adjacent to and preceding the data packet in the preset sending order; and continuously and intermittently sending each of the plurality of data packets to the receiving end in accordance with the preset sending order and the time interval set in each data packet.

[0011] Thirdly, this application discloses a data processing method applied to a sending end. The method includes: when multiple data packets need to be sent to a receiving end continuously and at intervals according to a preset sending order, for each of the multiple data packets, obtaining the consumption importance level of the data packet; obtaining the effective lifetime corresponding to the consumption importance level of the data packet; wherein, the effective lifetime corresponding to a higher consumption importance level is greater than the effective lifetime corresponding to a lower consumption importance level; if the effective lifetime corresponding to the consumption importance level has not yet been sent to the receiving end, then sending the consumption importance level and the effective lifetime corresponding to the consumption importance level to the receiving end.

[0012] Fourthly, this application discloses a data processing apparatus applied at a receiving end, the apparatus comprising: a first determining module, configured to determine whether the receiving end has received a second data packet when a first data packet is received from a plurality of data packets continuously and intermittently transmitted by a sending end in a preset transmission order; the first data packet includes one of the plurality of data packets, and the second data packet includes a data packet from the plurality of data packets that precedes the first data packet in the preset transmission order; the consumption order of the plurality of data packets matches the preset transmission order; a second determining module, configured to determine whether the second data packet has expired when the second data packet has not been received; a first obtaining module, configured to obtain the consumption importance level of the second data packet when the second data packet has expired; and a first consuming module, configured to consume the first data packet when the consumption importance level of the second data packet is a preset consumption importance level.

[0013] Fifthly, this application discloses a data processing apparatus applied at a transmitting end, the apparatus comprising: a setting module, configured to, when it is necessary to continuously and intermittently transmit various data packets from a plurality of data packets to a receiving end in a preset transmission order, for each of the plurality of data packets, at least set an identifier in a specific field of the data packet indicating the consumption importance level of a data packet preceding the data packet in the preset transmission order; and set a time interval in a preset field of the data packet; wherein the time interval includes: a time interval between the transmission time when transmitting the data packet and the transmission time when transmitting a data packet adjacent to and preceding the data packet in the preset transmission order; and a first transmission module, configured to continuously and intermittently transmit various data packets from the plurality of data packets to the receiving end in accordance with the preset transmission order and the time interval set in each data packet.

[0014] Sixthly, this application discloses a data processing apparatus applied at a sending end, the apparatus comprising: a consumption importance level acquisition module, configured to acquire the consumption importance level of each of a plurality of data packets when it is necessary to continuously and intermittently send each data packet of a plurality of data packets to a receiving end in a preset sending order; an effective lifetime acquisition module, configured to acquire the effective lifetime corresponding to the consumption importance level of the data packet; wherein, the effective lifetime corresponding to a higher consumption importance level is greater than the effective lifetime corresponding to a lower consumption importance level; and an effective lifetime sending module, configured to send the consumption importance level and the effective lifetime corresponding to the consumption importance level to the receiving end if the effective lifetime corresponding to the consumption importance level has not yet been sent to the receiving end.

[0015] In a seventh aspect, this application discloses an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the methods shown in any of the foregoing aspects.

[0016] Eighthly, this application discloses a non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the methods shown in any of the foregoing aspects.

[0017] Ninthly, this application discloses a computer program product in which, when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the methods shown in any of the foregoing aspects.

[0018] Compared with the prior art, this application has the following advantages:

[0019] In this application, upon receiving a first data packet from a plurality of data packets sent consecutively at intervals according to a preset sending order by the sending end, it is determined whether the receiving end has received a second data packet. The first data packet includes one of the plurality of data packets, and the second data packet includes a data packet that precedes the first data packet in the preset sending order. The consumption order of the plurality of data packets matches the preset sending order. If the second data packet has not been received, it is determined whether the second data packet has expired. If the second data packet has expired, it is determined whether the consumption importance level of the second data packet is a preset consumption importance level. If the consumption importance level of the second data packet is a preset consumption importance level, the first data packet is consumed.

[0020] According to this application, if the consumption importance level of the received second data packet is the preset consumption importance level, it means that the second data packet has a very low or no impact on the consumption of other data packets in the multiple data packets, and consuming the data packets other than the second data packet does not affect the consumption result. In other words, the result obtained after consuming the data packets other than the second data packet is the same as or similar to the result obtained after consuming all the data packets in the multiple data packets. Therefore, in this case, in order to ensure that the application corresponding to the multiple data packets can be responded to in a timely manner, it is necessary to meet the real-time requirements of data packet consumption. It is not necessary to wait for the second data packet; instead, the first data packet, which is consumed after the second data packet in the consumption order, can be consumed directly. This allows for obtaining the consumption result as quickly as possible, for example, enabling the application corresponding to the multiple data packets to be responded to in a timely manner, avoiding application response delays, and improving application smoothness, for example. Attached Figure Description

[0021] Figure 1This is a structural block diagram of a data processing system according to this application.

[0022] Figure 2 This is a scenario illustration of this application.

[0023] Figure 3 This is a flowchart of the steps of a data processing method according to this application.

[0024] Figure 4 This is a flowchart of the steps of a method for determining whether a data packet has expired according to this application.

[0025] Figure 5 This is a flowchart of the steps of a method for determining whether a data packet has expired according to this application.

[0026] Figure 6 This is a flowchart of the steps of a data processing method according to this application.

[0027] Figure 7 This is a structural block diagram of a data processing device according to this application.

[0028] Figure 8 This is a structural block diagram of a data processing device according to this application.

[0029] Figure 9 This is a structural block diagram of a data processing device according to this application.

[0030] Figure 10 This is a structural block diagram of a device according to this application. Detailed Implementation

[0031] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] Reference Figure 1 This diagram illustrates a structural block diagram of a data processing system according to this application. The system includes a transmitter 01 and a receiver 02. The transmitter and receiver are communicatively connected and can interact with each other. The transmitter may include a front-end device or a back-end device, and the receiver may also include a front-end device or a back-end device. In one example, the transmitter may include a front-end device, and the receiver may include a back-end device. The front-end device may include a mobile phone, tablet computer, laptop computer, or desktop computer, etc. The back-end device may include a back-end server, etc.

[0033] See Figure 2In one possible scenario, the sending end can be a cloud gaming terminal, and the receiving end can be a cloud gaming server. During cloud gaming, the user can input cloud gaming operation commands on the cloud gaming terminal (such as clicking or swiping the screen). The cloud gaming terminal sends these commands to the cloud gaming server, which receives and responds to them, generating a new cloud gaming screen. The server then sends this new screen back to the cloud gaming terminal, which receives and displays it.

[0034] In one possible scenario, the sending end needs to send multiple data packets to the receiving end in a pre-defined sending order with continuous intervals. Typically, the receiving end receives and consumes each data packet in the pre-defined sending order in the corresponding receiving order. However, sometimes at least one data packet may be lost during transmission. In this case, the receiving end may receive only a portion of the multiple data packets.

[0035] For an example of how to handle the situation where the receiving end receives only a portion of a plurality of data packets, please refer to the embodiments shown below.

[0036] If the sending end determines that the receiving end has not received at least one of the multiple data packets, the following embodiments can be used as an example of how to handle the situation.

[0037] Reference Figure 3 This illustrates a flowchart of the steps of a data processing method according to this application, applied to... Figure 1 In the receiver shown, the method may specifically include the following steps:

[0038] In step S101, if the first data packet is received from a plurality of data packets sent by the sending end in a preset sending order at consecutive intervals, it is determined whether the receiving end has received the second data packet.

[0039] The first data packet includes one of a plurality of data packets. The second data packet includes a data packet that precedes the first data packet in the preset transmission order. The consumption order of the plurality of data packets matches the preset transmission order.

[0040] In this application, before the sending end sends multiple data packets consecutively at intervals according to a preset sending order, a preset sending order is set for each data packet. For example, the preset sending order is set in the form of numbers in each data packet. For instance, the data packet in the first position of the preset sending order is set with number 01, the data packet in the second position of the preset sending order is set with number 02, the data packet in the third position of the preset sending order is set with number 03, and so on, up to number N in the data packet in the Nth position of the preset sending order. N is the number of data packets.

[0041] Thus, for the receiving end, whenever it receives one of multiple data packets, it can extract the number from that data packet and extract the numbers from the other data packets received previously.

[0042] If the numbers smaller than the number in this data packet correspond one-to-one with the numbers in other data packets, it means that the data packets that are preceding this data packet in the preset sending order have all been received by the receiving end.

[0043] If there is a number other than the number in other data packets that is smaller than the number in the data packet, then the receiving end has not received the data packet corresponding to the other number.

[0044] For example, from the receiving end's perspective, when the receiving end receives the first data packet, it can extract the number from the first data packet and extract the numbers from other data packets among the multiple data packets received previously.

[0045] If the numbers smaller than the number in the first data packet correspond one-to-one with the numbers in other data packets, it means that all data packets preceding this data packet in the preset sending order have been received by the receiving end, and there is no second data packet. If there is a number smaller than the number in this data packet that is not among the numbers in other data packets, then the receiving end has not received the data packet corresponding to that other number, that is, it has received the second data packet.

[0046] If the second data packet is not received, in step S102, it is determined whether the second data packet has expired.

[0047] For any one of the multiple data packets, from the time the sender transmits the data packet to the receiver, the receiver must receive and consume the data packet within its valid lifetime. That is, if, after the data packet is sent from the sender to the receiver, the difference between the receiver's current time and the sending time is greater than the data packet's valid lifetime, and the receiver has not yet received the data packet, then the data packet has expired. Alternatively, if the difference between the receiver's current time and the sending time is less than or equal to the data packet's valid lifetime, then the data packet has not expired. The same applies to each of the other data packets in the multiple data packets.

[0048] For details on determining whether the second data packet has expired, please refer to the following example. Figure 4 The embodiments shown are not described in detail here.

[0049] In another embodiment of this application, when the second data packet has been received, since the sending time of the second data packet to the receiving end is earlier than the sending time of the first data packet to the receiving end, the second data packet will be received before the receiving end receives the first data packet. After the receiving end receives the second data packet, it will consume the second data packet. Thus, if the second data packet has already been received when the receiving end receives the first data packet, the second data packet has often been consumed by the receiving end. In this way, the receiving end can consume the first data packet and then continue to receive data packets located after the first data packet from the multiple data packets sent by the sending end in a preset sending order at consecutive intervals. Then, the process similar to step S101 can be performed on the received data packets located after the first data packet.

[0050] If the second data packet has expired, in step S103, the consumption importance level of the second data packet is obtained.

[0051] In one embodiment of this application, if the consumption importance level of the data packet that is the last one in the preset sending order among multiple data packets is a non-preset consumption importance level, then regardless of whether the first data packet is the last one in the preset sending order, the consumption importance level of the second data packet can be obtained as the preset consumption importance level.

[0052] In another embodiment of this application, for the first data packet, before sending the first data packet to the receiving end, the sending end sets an identifier set including multiple identifiers in a specific field of the first data packet. An identifier can be a character, etc.

[0053] The last identifier in the identifier set is used to indicate the consumption importance level of the first data packet. For example, when the identifier is 0, it indicates that the consumption importance level of the corresponding data packet is the preset consumption importance level, and when the identifier is 1, it indicates that the consumption importance level of the corresponding data packet is a non-preset consumption importance level.

[0054] The identifiers in the identifier set preceding the last identifier are used in sequence to indicate the consumption importance level of each data packet preceding the first data packet in the preset consumption order.

[0055] Then, a first data packet with the set of identifiers was sent to the receiving end.

[0056] Thus, in this step, the receiving end can extract the identifier set from a specific field in the first data packet, and then determine the identifier corresponding to the second data packet from the identifier set (for example, determine the identifier corresponding to the second data packet from the identifier set according to the number corresponding to the preset sending order set in the received data packet in step S101, etc.), and then obtain the consumption importance level of the second data packet according to the identifier corresponding to the second data packet.

[0057] For example, when the identifier corresponding to the second data packet is 0, the consumption importance level of the second data packet can be obtained as the preset consumption importance level; when the identifier corresponding to the second data packet is 1, the consumption importance level of the second data packet can be obtained as a non-preset consumption importance level.

[0058] In another embodiment of this application, if the second data packet has not expired, the execution step S102 is returned at intervals, or the execution step S102 is returned in real time until it is determined that the second data packet has expired before the receiving end receives the second data packet, or until the second data packet has been consumed, etc.

[0059] In step S104, if the consumption importance level of the second data packet is a preset consumption importance level, the first data packet is consumed.

[0060] This application includes consumption importance levels, including preset consumption importance and non-preset consumption importance levels.

[0061] In this application, the consumption importance levels of each data packet in the multiple data packets are not entirely the same. For example, some data packets have low consumption importance levels, and these data packets can have a preset consumption importance level. On the other hand, some data packets have high consumption importance levels, and these data packets can have a non-preset consumption importance level.

[0062] When dealing with multiple data packets, if the receiving end can receive all the data packets sent by the sending end, it needs to consume each data packet sequentially in the order of consumption. However, sometimes, at least one data packet may be lost during transmission, causing the receiving end to miss the lost packet. In this case, the receiving end receives only a portion of the data packets, failing to receive the at least one missing packet.

[0063] The consumption importance level of at least one lost data packet may be either the preset consumption importance level (low level) or a non-preset consumption importance level (high level).

[0064] If the consumption importance level of the at least one lost data packet is the preset consumption importance level, it means that the at least one lost data packet has a very low or no impact on the consumption of other data packets in the multiple data packets, and consuming some of the data packets in the multiple data packets does not affect the consumption result. In other words, the result obtained after consuming some of the data packets in the multiple data packets is the same as or similar to the result obtained after consuming all of the data packets in the multiple data packets. Therefore, in order to ensure that the application corresponding to the multiple data packets can be responded to in a timely manner, it is necessary to meet the real-time requirements of data packet consumption. It is not necessary to wait for the at least one lost data packet, but to directly consume some of the data packets in the multiple received data packets.

[0065] For example, if the consumption importance level of the second data packet is the preset consumption importance level, then we can directly consume the first data packet, which is consumed after the second data packet, without waiting for the second data packet, so that the consumption result can be obtained as soon as possible. For example, this allows the application corresponding to multiple data packets to be responded to in a timely manner.

[0066] In this application, upon receiving a first data packet from a plurality of data packets sent consecutively at intervals according to a preset sending order by the sending end, it is determined whether the receiving end has received a second data packet. The first data packet includes one of the plurality of data packets, and the second data packet includes a data packet that precedes the first data packet in the preset sending order. The consumption order of the plurality of data packets matches the preset sending order. If the second data packet has not been received, it is determined whether the second data packet has expired. If the second data packet has expired, it is determined whether the consumption importance level of the second data packet is a preset consumption importance level. If the consumption importance level of the second data packet is a preset consumption importance level, the first data packet is consumed.

[0067] According to this application, if the consumption importance level of the received second data packet is the preset consumption importance level, it means that the second data packet has a very low or no impact on the consumption of other data packets in the multiple data packets, and consuming the data packets other than the second data packet does not affect the consumption result. In other words, the result obtained after consuming the data packets other than the second data packet is the same as or similar to the result obtained after consuming all the data packets in the multiple data packets. Therefore, in this case, in order to ensure that the application corresponding to the multiple data packets can be responded to in a timely manner, it is necessary to meet the real-time requirements of data packet consumption. It is not necessary to wait for the second data packet; instead, the first data packet, which is consumed after the second data packet in the consumption order, can be consumed directly. This allows for obtaining the consumption result as quickly as possible, for example, enabling the application corresponding to the multiple data packets to be responded to in a timely manner, avoiding application response delays, and improving application smoothness, for example.

[0068] in, Figure 3 The purpose of the embodiment shown is that, if the consumption importance level of the second data packet is a preset consumption importance level, the first data packet can be consumed directly without waiting for the second data packet when the first data packet is received but the second data packet is not received, so that the application corresponding to multiple data packets can be responded to in a timely manner. However, sometimes there are data packets in the preset sending order that are located after the first data packet. After the first data packet is consumed, the data packets located after the first data packet need to be consumed in sequence before the application corresponding to multiple data packets can be responded to.

[0069] In one possible scenario, the importance level of the first data packet is not the preset consumption importance level, that is, the first data packet needs to be consumed in a timely manner (it cannot expire before being consumed).

[0070] Since the first data packet needs to be consumed in a timely manner (it cannot expire before being consumed), in this application, when the first data packet is received from multiple data packets sent by the sending end in a preset sending order at consecutive intervals, if the second data packet has not yet been received, step S102 needs to be executed immediately to consume the first data packet as early as possible, so that the application corresponding to the multiple data packets can be responded to in a timely manner.

[0071] In another possible scenario, the importance level of the first data packet is a non-preset consumption importance level, meaning that the first data packet does not need to be consumed immediately (it can be consumed after it expires). However, the importance level of the data packet following the first data packet is a non-preset consumption importance level, which requires to be consumed immediately (it cannot expire before it is consumed). But at this time, the receiving end has not yet received the data packet following the first data packet, and therefore cannot consume the data packet following the first data packet.

[0072] Since the first data packet does not need to be consumed immediately (it can be consumed after it expires), in this application, when the first data packet is received from a plurality of data packets sent by the sender in a preset sending order at consecutive intervals, if the second data packet has not yet been received, the sender can wait for the second data packet instead of immediately executing step S102. This allows the sender to consume the second data packet as much as possible without affecting the timely response of the applications corresponding to the plurality of data packets, thus satisfying the integrity and accuracy of the responses to the applications corresponding to the plurality of data packets.

[0073] Therefore, in Figure 3 Based on the illustrated embodiment, in another embodiment of this application, when a first data packet is received from a plurality of data packets sent continuously at intervals according to a preset sending order, until a second data packet is not received, the consumption importance of the first data packet is obtained; if the consumption importance level of the first data packet is not a preset consumption importance level, step S102 is then executed: determining whether the second data packet has expired.

[0074] In one embodiment of this application, if the consumption importance level of the data packet that is the last one in the preset sending order among multiple data packets is a non-preset consumption importance level, then if the first data packet is the last one in the preset sending order, the consumption importance level of the second data packet can be obtained as a non-preset consumption importance level. If the first data packet is a data packet that is not the last one in the preset sending order, then the consumption importance level of the second data packet can be obtained as the preset consumption importance level.

[0075] In another embodiment of this application, for the first data packet, before sending the first data packet to the receiving end, the sending end sets an identifier set including multiple identifiers in a specific field of the first data packet. An identifier can be a character, etc.

[0076] The last identifier in the identifier set is used to indicate the consumption importance level of the first data packet. For example, when the identifier is 0, it indicates that the consumption importance level of the corresponding data packet is the preset consumption importance level, and when the identifier is 1, it indicates that the consumption importance level of the corresponding data packet is a non-preset consumption importance level.

[0077] The identifiers in the identifier set preceding the last identifier are used in sequence to indicate the consumption importance level of each data packet preceding the first data packet in the preset consumption order.

[0078] Then, a first data packet with the set of identifiers was sent to the receiving end.

[0079] Thus, in this step, the receiving end can extract the identifier set from a specific field in the first data packet, and then determine the identifier corresponding to the first data packet in the identifier set (for example, determine the identifier corresponding to the first data packet in the identifier set according to the number corresponding to the preset sending order set in the received data packet in step S101, etc.), and then obtain the consumption importance level of the first data packet according to the identifier corresponding to the first data packet.

[0080] For example, when the identifier corresponding to the first data packet is 0, the consumption importance level of the first data packet can be obtained as the preset consumption importance level; when the identifier corresponding to the first data packet is 1, the consumption importance level of the first data packet can be obtained as a non-preset consumption importance level.

[0081] In another embodiment of this application, if the consumption importance level of the lost at least one data packet is not a preset consumption importance level, it means that the lost at least one data packet has a high impact on the consumption of other data packets among the multiple data packets, and the consumption of some data packets among the multiple data packets affects the consumption result. In other words, the result obtained after consuming some data packets among the multiple data packets is significantly different from the result obtained after consuming all data packets among the multiple data packets. Therefore, in order to meet the requirements of completeness and accuracy of the application response corresponding to the multiple data packets, it is possible to wait for the lost at least one data packet, wait for the at least one data packet to be obtained, and then consume all data packets among the multiple data packets in the consumption order.

[0082] For example, if the consumption importance level of the second data packet is not the preset consumption importance level, then we can wait for the second data packet until it is received before consuming it, and then consume the first data packet that is consumed after the second data packet in the consumption order, so that the application corresponding to multiple data packets can be responded to completely and accurately.

[0083] In this application, when the first data packet is received from a plurality of data packets sent by the sending end in a preset sending order at consecutive intervals, the process of steps S101 to S104 can be executed periodically. The period can be set to be short, that is, the frequency of executing steps S101 to S104 can be high. This can avoid the situation where data packets of non-preset consumption importance level (important) have expired before execution.

[0084] Furthermore, in order to enable the application corresponding to multiple data packets to be responded to in a timely manner, in another embodiment of this application, when a third data packet is received, after consuming the first data packet, the third data packet can be consumed in the consumption order. The third data packet includes: a data packet that is located after the first data packet in the preset sending order among the multiple data packets already received by the receiving end.

[0085] Furthermore, in another embodiment of this application, if a second data packet is received after the receiving end has consumed the first data packet (which may be because the second data packet is still being transmitted to the receiving end even though the receiving end has determined that the second data packet has expired), the second data packet can be discarded because the first data packet has already been consumed, and there is a consumption order among the multiple data packets. Also, since not consuming the second data packet usually does not significantly affect the integrity and accuracy of the application response corresponding to the multiple data packets, the second data packet can be discarded.

[0086] In one embodiment of this application, participants Figure 4 Step S102 includes:

[0087] In step S201, the delayed duration of the first data packet is obtained, and the effective lifetime of the first data packet is obtained.

[0088] In one embodiment of this application, when obtaining the delayed duration of the first data packet, the current time of the receiving end can be obtained, the receiving time of the receiving end when the first data packet is received can be obtained, and the transmission time consumed by the first data packet in the process of being transmitted from the sending end to the receiving end can be obtained.

[0089] Then, based on the current time of the receiving end, the receiving time when the receiving end receives the first data packet, and the transmission time consumed in the process of the first data packet being transmitted from the sending end to the receiving end, the delayed duration of the first data packet can be obtained. For example, the difference between the current time of the receiving end and the receiving time when the receiving end receives the first data packet can be calculated, and then the sum of the difference and the transmission time consumed in the process of the first data packet being transmitted from the sending end to the receiving end can be calculated and used as the delayed duration of the first data packet.

[0090] In this application, the round-trip time (RTT) between the sending and receiving ends of the data packet is defined as the round-trip time (RTT).

[0091] The receiving end can calculate the RTT through the process of "the receiving end sends a test packet to the sending end, the sending end receives the test packet and returns the corresponding feedback packet to the receiving end, and the receiving end sends the feedback packet". Then, it calculates the ratio between the RTT and the value 2, and uses it as the transmission time of a data packet from the sending end to the receiving end. Finally, the receiving end stores the ratio between the RTT and the value 2.

[0092] Thus, when obtaining the transmission time of the first data packet from the sending end to the receiving end, the ratio between the RTT stored in the receiving end and the value 2 can be obtained and used as the transmission time of the first data packet from the sending end to the receiving end.

[0093] Specifically, when obtaining the effective lifetime of the first data packet, the effective lifetime of the first data packet can be obtained according to the consumption importance level of the first data packet.

[0094] In this application, the higher the consumption importance level of a data packet, the more important the data packet is, and the more important it is to consume the data packet as much as possible. Otherwise, it may not be possible to meet the integrity and accuracy of the response to the application corresponding to multiple data packets. Therefore, the effective lifespan of the data packet can be set to be longer.

[0095] When the consumption importance level of a data packet is lower, it is often because the data packet is less important. It is possible to not consume the data packet and still meet the integrity and accuracy requirements of the responses to multiple data packets. Therefore, the effective lifespan of the data packet can be set to be shorter.

[0096] The mapping between consumption importance levels and effective lifetimes can be pre-defined in the receiving end. This mapping records the effective lifetime corresponding to each consumption importance level. The effective lifetime for each consumption importance level can be pre-negotiated between the receiving and sending ends.

[0097] For example, in another embodiment of this application, when the sending end needs to continuously and intermittently send multiple data packets to the receiving end in a preset sending order, for any one of the multiple data packets, the consumption importance level of the data packet is obtained; the effective lifetime corresponding to the consumption importance level of the data packet is obtained; wherein, the effective lifetime corresponding to a higher consumption importance level is greater than the effective lifetime corresponding to a lower consumption importance level; if the effective lifetime corresponding to the consumption importance level has not yet been sent to the receiving end, then the consumption importance level and the effective lifetime corresponding to the consumption importance level are sent to the receiving end. This allows the receiving end to obtain the consumption importance level and the effective lifetime corresponding to the consumption importance level, and thus record the consumption importance level and the effective lifetime corresponding to the consumption importance level in the correspondence between consumption importance levels and effective lifetimes. The same applies to each of the other data packets in the multiple data packets.

[0098] Therefore, when obtaining the effective lifetime of the first data packet based on its consumption importance level, the effective lifetime corresponding to the consumption importance level of the first data packet can be found in the correspondence between consumption importance levels and effective lifetimes. In this correspondence, higher consumption importance levels correspond to longer effective lifetimes, and lower consumption importance levels correspond to shorter effective lifetimes.

[0099] In step S202, if the difference between the effective lifetime of the first data packet and the delayed duration of the first data packet is less than a preset duration, it is determined that the second data packet has expired.

[0100] The preset duration can be determined according to the actual situation, such as 5ms, 10ms, 15ms or 20ms, etc., and this application does not limit it.

[0101] Since the sending time of the second data packet to the receiving end is earlier than the sending time of the first data packet to the receiving end, when both the first and second data packets have expired, the second data packet usually expires first, followed by the first data packet.

[0102] Thus, if the difference between the effective lifetime of the first data packet and the delayed duration of the first data packet is equal to zero, it means that the first data packet is on the verge of expiration and is about to expire. At this time, the second data packet is likely to have expired. In this application, the second data packet can be regarded as having expired.

[0103] For example, in one instance, if the preset duration is the same as or less than the transmission time interval (between the sending time of the first data packet and the sending time of the second data packet), and the difference between the effective lifetime of the first data packet and the delayed duration of the first data packet is less than the preset duration, it can be determined that the second data packet has expired.

[0104] In one embodiment of this application, participants Figure 5 Step S102 includes:

[0105] In step S301, the delayed duration of the second data packet is obtained, and the effective lifetime of the second data packet is obtained.

[0106] The process of obtaining the delayed duration of the second data packet can be achieved through the following steps:

[0107] 21) Obtain the delayed duration of the first data packet, and obtain the transmission time interval between the sending time of the sending end when sending the first data packet and the sending time of the sending end when sending the second data packet.

[0108] The delay duration of the first data packet can be found in the relevant description of the previous step S201, and will not be detailed here.

[0109] In this application, the sending end sends each data packet to the sending end continuously and at intervals according to a preset sending order among the data packets in the multiple data packets.

[0110] Thus, there is a time interval between the sending times of two adjacent data packets in the preset sending order. The time interval between the sending times of two adjacent data packets in the preset sending order may be the same or different.

[0111] Therefore, before sending any one of the multiple data packets to the receiver, the sending end can obtain the difference between "the sending time when the data packet is to be sent" and "the sending time when a data packet adjacent to and preceding the data packet in the preset sending order is sent," and use this difference as the time interval between "the sending time when the data packet is sent" and "the sending time when a data packet adjacent to and preceding the data packet in the preset sending order is sent"; store this time interval in the data packet, and then send the data packet to the receiver. The sending end does the same before sending each of the other multiple data packets to the receiver.

[0112] Thus, when obtaining the transmission time interval between "the sending time when the sender sends the first data packet" and "the sending time when the sender sends the second data packet," if the second data packet and the first data packet are adjacent in a preset transmission order, the time interval recorded in a preset field of the first data packet can be obtained. This time interval in the preset field of the first data packet is obtained by the sender before sending the first data packet to the receiver and recorded in the preset field of the first data packet. The transmission time interval between "the sending time when the sender sends the first data packet" and "the sending time when the sender sends the second data packet" can be obtained based on the time interval recorded in the preset field of the first data packet. For example, the time interval recorded in the preset field of the first data packet can be used as the transmission time interval between "the sending time when the sender sends the first data packet" and "the sending time when the sender sends the second data packet."

[0113] Alternatively, if the second data packet and the first data packet are not adjacent in the preset transmission order, the time interval recorded in the preset field of the first data packet is obtained. The time interval in the preset field of the first data packet is obtained by the sending end before sending the first data packet to the receiving end and recorded in the preset field of the first data packet. An intermediate data packet located between the second data packet and the first data packet in the preset transmission order is determined, and the time interval recorded in the preset field of the intermediate data packet is obtained. The time interval in the preset field of the intermediate data packet is obtained by the sending end before sending the intermediate data packet to the receiving end and recorded in the preset field of the intermediate data packet. Based on the time interval recorded in the preset fields of the first data packet and the intermediate data packet, the transmission time interval between "the sending time when the sending end sends the first data packet" and "the sending time when the sending end sends the second data packet" is obtained. For example, the time interval recorded in the preset fields of the first data packet and the intermediate data packet can be summed to obtain the transmission time interval between "the sending time when the sending end sends the first data packet" and "the sending time when the sending end sends the second data packet".

[0114] 22) Obtain the delay duration of the second data packet based on the delay duration of the first data packet and the transmission time interval between "the sending time of the sending end when sending the first data packet" and "the sending time of the sending end when sending the second data packet".

[0115] In this application, the delayed duration of the first data packet and the transmission time interval can be summed to obtain the delayed duration of the second data packet.

[0116] When obtaining the effective lifetime of the second data packet, refer to the process for obtaining the effective lifetime of the first data packet described in step S201, which will not be detailed here.

[0117] In step S302, if the delayed duration of the second data packet is greater than the effective lifetime of the second data packet, it is determined that the second data packet has expired.

[0118] Alternatively, in another embodiment of this application, if the delayed duration of the second data packet is less than or equal to the effective lifetime of the second data packet, it is determined that the second data packet has not expired.

[0119] In one example, the second data packet can be determined to have expired if the following formula is met.

[0120] SentGap+current_time-receive_time+rtt / 2>TTL.

[0121] SentGap is the time interval between the sending time when the sender sends the first data packet and the sending time when the sender sends the second data packet.

[0122] current_time is the current time at the receiving end.

[0123] receive_time is the time when the receiver receives the first data packet.

[0124] rtt / 2 is the transmission time of the second data packet from the sender to the receiver.

[0125] TTL is the effective lifespan of the second data packet.

[0126] In one example, suppose there are 11 data packets, numbered 1 through 11.

[0127] The sending order of data packets 1 to 11 from the sending end to the receiving end is as follows: data packet 1 before data packet 2, data packet 2 before data packet 3, ... data packet 10 before data packet 11.

[0128] The order in which the receiving end consumes data packets 1 through 11 is as follows: data packet 1 before data packet 2, data packet 2 before data packet 3, and so on, until data packet 10 before data packet 11.

[0129] The time interval between sending any two data packets that are sent sequentially adjacently from the sending end to the receiving end is 10ms.

[0130] Each data packet takes 60ms to transmit from the sender to the receiver.

[0131] The consumption delay of data packets 1 to 11 must be less than or equal to 100ms, that is, the effective lifetime is 100ms.

[0132] Under normal circumstances, when data packets are transmitted normally, the sending time of data packets 1 to 11, the receiving time of data packets 1 to 11, the consumption time of data packets 1 to 11, and the delay of data packets 1 to 11 can be seen in Table 1 below.

[0133] Table 1

[0134] Sending time Reception time Consumption Moment Delay Data packet 1 0ms 60ms 60ms 60ms Data packet 2 10ms 70ms 70ms 60ms Data packet 3 20ms 80ms 80ms 60ms Data packet 4 30ms 90ms 90ms 60ms Data packet 5 40ms 100ms 100ms 60ms Data packet 6 50ms 110ms 110ms 60ms Data packet 7 60ms 120ms 120ms 60ms Data packet 8 70ms 130ms 130ms 60ms Data packet 9 80ms 140ms 140ms 60ms Data packet 10 90ms 150ms 150ms 60ms Data packet 11 100ms 160ms 160ms 60ms

[0135] In this case, it is assumed that data packet 6 is lost during transmission from the sender to the receiver.

[0136] If the receiving end does not receive data packet 6 within 110ms, it will send a notification to the sending end to inform it that the receiving end did not receive data packet 6. The sending end will then resend data packet 6 to the receiving end based on this notification. The transmission time for this notification from the receiving end to the sending end is 60ms. The transmission time for data packet 6 from the sending end to the receiving end is also 60ms.

[0137] Therefore, if the receiving end receives data packet 6 resent by the sending end, it will also receive it in 230ms and consume data packet 6 in 230ms. Data packets 7 to 11 can also be consumed as early as 230ms.

[0138] Thus, the sending times of data packets 1 to 11 at the sending end, the receiving times of data packets 1 to 11 at the receiving end, the consumption times of data packets 1 to 11 at the receiving end, and the delays of data packets 1 to 11 can be seen in Table 2 below.

[0139] Table 2

[0140] Sending time Reception time Consumption Moment Delay Data packet 1 0ms 60ms 60ms 60ms Data packet 2 10ms 70ms 70ms 60ms Data packet 3 20ms 80ms 80ms 60ms Data packet 4 30ms 90ms 90ms 60ms Data packet 5 40ms 100ms 100ms 60ms Data packet 6 50ms 230ms 230ms 180ms Data packet 7 60ms 120ms 230ms 170ms Data packet 8 70ms 130ms 230ms 160ms Data packet 9 80ms 140ms 230ms 150ms Data packet 10 90ms 150ms 230ms 140ms Data packet 11 100ms 160ms 230ms 130ms

[0141] Because the consumption delay of data packets 1 to 11 needs to be less than or equal to 100ms, etc.

[0142] As can be seen from Table 2, the consumption delay of data packets 6 to 11 all exceed 100ms, which does not meet the delay requirements.

[0143] If the consumption importance level of data packet 6 is the preset consumption importance level, that is, when data packets 1 to 11 are consumed in the consumption order, if data packet 6 does not necessarily need to be consumed, then when the delay of data packet 7 is about to exceed 100ms, data packets 7 to 11 can be consumed directly in the consumption order, so that the delay of data packets 7 to 11 is less than or equal to 100ms.

[0144] Specifically, the sending times of data packets 1 to 11, the receiving times of data packets 1 to 11, the consumption times of data packets 1 to 11, and the delays of data packets 1 to 11 can be found in Table 3 below.

[0145] Table 3

[0146] Sending time Reception time Consumption Moment Delay Data packet 1 0ms 60ms 60ms 60ms Data packet 2 10ms 70ms 70ms 60ms Data packet 3 20ms 80ms 80ms 60ms Data packet 4 30ms 90ms 90ms 60ms Data packet 5 40ms 100ms 100ms 60ms Data packet 6 50ms 230ms 230ms 180ms Data packet 7 60ms 120ms 160ms 100ms Data packet 8 70ms 130ms 160ms 90ms Data packet 9 80ms 140ms 160ms 80ms Data packet 10 90ms 150ms 160ms 90ms Data packet 11 100ms 160ms 160ms 60ms

[0147] Reference Figure 6 This illustrates a flowchart of the steps of a data processing method according to this application, applied to... Figure 1In the sending end shown, the method may specifically include the following steps:

[0148] In step S401, when it is necessary to continuously and intermittently send each of the multiple data packets to the receiving end in a preset sending order, for each data packet, an identifier is set in a specific field of the data packet to indicate the consumption importance level of the data packet that precedes the data packet in the preset sending order; and a time interval is set in a preset field of the data packet; the time interval includes: the time interval between the sending time when the data packet is sent and the sending time when the data packet that is adjacent to the data packet and precedes the data packet in the preset sending order is sent.

[0149] In step S402, according to the preset sending order and the time interval set in each data packet, the data packets in the multiple data packets are continuously and intermittently sent to the receiving end.

[0150] This application enables the determination of whether a second data packet has been received by the receiving end when it receives a first data packet from a plurality of data packets sent sequentially and at intervals according to a preset sending order. The first data packet includes one of the plurality of data packets, and the second data packet includes a data packet that precedes the first data packet in the preset sending order. The consumption order of the plurality of data packets matches the preset sending order. If the second data packet is not received, it can be determined whether the second data packet has expired, at least by the time interval specified in a preset field in the first data packet. If the second data packet has expired, the consumption importance level of the second data packet can be determined based on an identifier set in a specific field of the first data packet to indicate the consumption importance level of data packets (including the second data packet) preceding the first data packet in the preset sending order. If the consumption importance level of the second data packet is the preset consumption importance level, the first data packet is consumed.

[0151] If the consumption importance level of the second data packet received by the receiving end is the preset consumption importance level, it means that the second data packet has a very low or no impact on the consumption of other data packets in the multiple data packets, and consuming the data packets other than the second data packet does not affect the consumption result. In other words, the result obtained after consuming the data packets other than the second data packet is the same as or similar to the result obtained after consuming all the data packets in the multiple data packets. Therefore, in order to ensure that the application corresponding to the multiple data packets can be responded to in a timely manner, the real-time requirement of data packet consumption needs to be met. It is not necessary to wait for the second data packet; instead, the first data packet, which is consumed after the second data packet in the consumption order, can be consumed directly. This is to obtain the consumption result as quickly as possible, such as ensuring that the application corresponding to the multiple data packets can be responded to in a timely manner, avoiding application response delays, and improving application smoothness, for example.

[0152] In this application, for each of the multiple data packets, if the data packet has already been sent to the receiving end, the data packet can be buffered in the retransmission queue so that if it is determined later that the data packet was lost during transmission and thus cannot be received by the receiving end, the data packet can be retransmitted to the receiving end.

[0153] For example, if the sending end receives a reception response from the receiving end indicating that the data packet has been received within a certain period of time after sending the data packet to the receiving end, then it is no longer necessary to resend the data packet to the receiving end.

[0154] If the sending end does not receive a reception response from the receiving end indicating that the data packet has been received within a certain period of time after sending the data packet to the receiving end, then it is no longer necessary to resend the data packet to the receiving end, and the sending end may resend the data packet to the receiving end.

[0155] Secondly, the sending end can also record the sending time when sending data packets to the receiving end.

[0156] The data packet also includes a specific field that contains an identifier to indicate the consumption importance level of the data packet.

[0157] If the identifier used to indicate the consumption importance level of the data packet in a specific field of the data packet is a preset consumption importance level identifier, it can be determined whether the first difference between the current time of the sender and the sending time is greater than the second difference between the effective lifetime of the data packet and the transmission time, the transmission time including the time consumed by the data packet in the process of being transmitted from the sender to the receiver.

[0158] If the first difference is greater than the second difference, even if the data packet is immediately retransmitted to the receiving end, the data packet will expire before the receiving end receives the retransmitted data packet because the process of transmitting the data packet from the sending end to the receiving end still takes transmission time. In this application, the receiving end consumes the data packet that is located after the data packet in the preset transmission order before the data packet is about to expire, and will not consume the data packet again. Therefore, the sending end does not need to retransmit the data packet to the receiving end, otherwise it would waste network resources. Therefore, the sending end can delete the data packet in the duplicate queue.

[0159] In addition, if the first difference is less than or equal to the second difference, the data packet can be resent to the receiving end. In this way, the data packet will not expire before the receiving end receives the resent data packet. In this application, the receiving end will not consume the data packet that is located after the data packet in the preset sending order before the data packet expires, but will wait to consume the data packet. Therefore, the sending end can resend the data packet to the receiving end to make the receiving end able to obtain and consume the data packet as much as possible.

[0160] The sending end determines whether it has received a reception response from the receiving end indicating that the data packet has been received. If no reception response is received, the sending end sends the data packet to the receiving end.

[0161] If a response has been received, it means that the receiving end has already received the data packet, and there is no need to send the data packet back to the receiving end.

[0162] In another embodiment of this application, when the sending end needs to send multiple data packets from a plurality of data packets to the receiving end in a preset sending order at continuous intervals, for any one of the multiple data packets, the consumption importance level of the data packet can be obtained; then, the coding redundancy corresponding to the consumption importance level of the data packet can be obtained; wherein, the coding redundancy corresponding to a higher consumption importance level is higher than that corresponding to a lower consumption importance level; then, the multiple data packets are encoded based on the coding redundancy to obtain the redundant packet corresponding to the data packet; and the redundant packet corresponding to the data packet is sent to the receiving end. In this way, the receiving end can receive the redundant packet corresponding to the data packet. The same applies to each of the other data packets in the plurality of data packets.

[0163] Thus, if the receiving end receives the first data packet from a set of data packets sent consecutively at intervals in a preset sending order, and if the second data packet is not received and has not expired, the receiving end can determine whether it has received the redundant packet corresponding to the second data packet.

[0164] If a redundant packet corresponding to the second data packet sent by the sender is received, the receiver can attempt to recover the second data packet based on the redundant packet and the received data packets. The redundant packet corresponding to the second data packet is obtained by the receiver encoding the multiple data packets based on the encoding redundancy corresponding to the consumption importance level of the second data packet.

[0165] If the second data packet is recovered, it can be consumed, followed by the consumption of the first data packet. If the second data packet is not recovered, the process returns to the steps to determine if the second data packet has expired.

[0166] In this embodiment, when the receiving end receives the second data packet, if it also receives the redundant packet corresponding to the second data packet, it can attempt to recover the second data packet based on the redundant packet, thereby increasing the likelihood that the receiving end can obtain the second data packet and thus increasing the likelihood that the receiving end can consume the second data packet.

[0167] Secondly, since data packets with higher consumption importance have a greater demand for consumption, while data packets with lower consumption importance have a smaller demand for consumption (e.g., they can be ignored), the coding redundancy corresponding to higher consumption importance is higher than that of lower consumption importance. Thus, it is easier to recover higher consumption importance data packets from the redundant packets corresponding to higher consumption importance, thereby increasing the likelihood that higher consumption importance data packets can be consumed by the receiving end.

[0168] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by this application.

[0169] Reference Figure 7 The diagram shows a structural block diagram of a data processing apparatus according to this application, which is applied at a receiving end. The apparatus may specifically include the following modules:

[0170] The first determining module 11 is used to determine whether the receiving end has received a second data packet when a first data packet is received from a plurality of data packets sent consecutively at intervals according to a preset sending order; the first data packet includes one of the plurality of data packets, and the second data packet includes a data packet that is located before the first data packet in the preset sending order; the consumption order of the plurality of data packets matches the preset sending order; the second determining module 12 is used to determine whether the second data packet has expired when the second data packet has not been received; the first obtaining module 13 is used to obtain the consumption importance level of the second data packet when the second data packet has expired; the first consuming module 14 is used to consume the first data packet when the consumption importance level of the second data packet is a preset consumption importance level.

[0171] In an optional implementation, the first acquisition module includes: a first acquisition unit, configured to acquire an identifier recorded in a specific field of the first data packet that indicates the consumption importance level of the second data packet; and a second acquisition unit, configured to acquire the consumption importance level of the second data packet based on the identifier.

[0172] In an optional implementation, the apparatus further includes: a second acquisition module, configured to acquire the consumption importance level of the first data packet when the second data packet is not received; the second determination module is further configured to: determine whether the second data packet has expired when the consumption importance level of the first data packet is not a preset consumption importance level.

[0173] In an optional implementation, the second acquisition module includes: a third acquisition unit, configured to acquire an identifier recorded in a specific field of the first data packet that indicates the consumption importance level of the first data packet; and a fourth acquisition unit, configured to acquire the consumption importance level of the first data packet based on the identifier.

[0174] In an optional implementation, the second determining module includes: a fifth obtaining unit, used to obtain the delayed duration of the first data packet; and a sixth obtaining unit, used to obtain the effective lifetime of the first data packet; and a first determining unit, used to determine that the second data packet has expired if the difference between the effective lifetime of the first data packet and the delayed duration of the first data packet is less than a preset duration.

[0175] In an optional implementation, the second determining module includes: a seventh obtaining unit for obtaining the delayed duration of the second data packet; and an eighth obtaining unit for obtaining the effective lifetime of the second data packet; and a second determining unit for determining that the second data packet has expired if the delayed duration of the second data packet is greater than the effective lifetime of the second data packet.

[0176] In an optional implementation, the seventh acquisition unit includes: a first acquisition subunit, configured to acquire the delayed duration of the first data packet; a second acquisition subunit, configured to acquire the transmission time interval between the transmission time of the sending end when sending the first data packet and the transmission time of the sending end when sending the second data packet; and a third acquisition subunit, configured to acquire the delayed duration of the second data packet based on the delayed duration of the first data packet and the transmission time interval.

[0177] In an optional implementation, the first acquisition subunit is specifically used to: acquire the current time of the receiving end, acquire the receiving time when the receiving end receives the first data packet, and acquire the transmission time consumed by the first data packet in the process of being transmitted from the sending end to the receiving end; and acquire the delayed duration of the first data packet based on the current time, the receiving time, and the transmission time.

[0178] In an optional implementation, the second acquisition subunit is specifically used to: when the second data packet and the first data packet are adjacent in the preset transmission order, acquire the time interval recorded in the preset field of the first data packet, wherein the time interval in the preset field of the first data packet is acquired by the sending end before sending the first data packet to the receiving end and recorded in the preset field of the first data packet; and acquire the transmission time interval according to the time interval recorded in the preset field of the first data packet.

[0179] Alternatively, if the second data packet and the first data packet are not adjacent in the preset transmission order, the time interval recorded in the preset field of the first data packet is obtained. The time interval in the preset field of the first data packet is obtained by the sending end before sending the first data packet to the receiving end and recorded in the preset field of the first data packet. An intermediate data packet located between the second data packet and the first data packet in the preset transmission order is determined, and the time interval recorded in the preset field of the intermediate data packet is obtained. The time interval in the preset field of the intermediate data packet is obtained by the sending end before sending the intermediate data packet to the receiving end and recorded in the preset field of the intermediate data packet. The transmission time interval is obtained based on the time interval recorded in the preset field of the first data packet and the time interval recorded in the preset field of the intermediate data packet.

[0180] In an optional implementation, the eighth acquisition unit includes: a fourth acquisition subunit, used to acquire the effective lifetime of the second data packet based on the consumption importance level of the second data packet.

[0181] In an optional implementation, the fourth acquisition subunit is specifically used to: find the effective lifetime corresponding to the consumption importance level of the second data packet in the correspondence between consumption importance level and effective lifetime; wherein, in the correspondence, the higher the consumption importance level, the longer the effective lifetime, and the lower the consumption importance level, the shorter the effective lifetime.

[0182] In an optional implementation, the apparatus further includes: a second consumption module, configured to, upon receiving a third data packet, consume the third data packet according to the consumption order after consuming the first data packet, wherein the third data packet includes: a data packet that is located after the first data packet in a preset transmission order among the plurality of data packets already received by the receiving end.

[0183] In this application, upon receiving a first data packet from a plurality of data packets sent consecutively at intervals according to a preset sending order by the sending end, it is determined whether the receiving end has received a second data packet. The first data packet includes one of the plurality of data packets, and the second data packet includes a data packet that precedes the first data packet in the preset sending order. The consumption order of the plurality of data packets matches the preset sending order. If the second data packet has not been received, it is determined whether the second data packet has expired. If the second data packet has expired, it is determined whether the consumption importance level of the second data packet is a preset consumption importance level. If the consumption importance level of the second data packet is a preset consumption importance level, the first data packet is consumed.

[0184] According to this application, if the consumption importance level of the received second data packet is the preset consumption importance level, it means that the second data packet has a very low or no impact on the consumption of other data packets in the multiple data packets, and consuming the data packets other than the second data packet does not affect the consumption result. In other words, the result obtained after consuming the data packets other than the second data packet is the same as or similar to the result obtained after consuming all the data packets in the multiple data packets. Therefore, in this case, in order to ensure that the application corresponding to the multiple data packets can be responded to in a timely manner, it is necessary to meet the real-time requirements of data packet consumption. It is not necessary to wait for the second data packet; instead, the first data packet, which is consumed after the second data packet in the consumption order, can be consumed directly. This allows for obtaining the consumption result as quickly as possible, for example, enabling the application corresponding to the multiple data packets to be responded to in a timely manner, avoiding application response delays, and improving application smoothness, for example.

[0185] Reference Figure 8 The diagram shows a structural block diagram of a data processing apparatus according to this application, applied at a transmitting end. The apparatus may specifically include the following modules:

[0186] Setting module 21 is configured to, when it is necessary to continuously and intermittently send each of the multiple data packets to the receiving end in a preset sending order, set at least an identifier in a specific field of the data packet to indicate the consumption importance level of the data packet preceding the data packet in the preset sending order; and set a time interval in a preset field of the data packet; wherein the time interval includes: the time interval between the sending time when sending the data packet and the sending time when sending the data packet adjacent to the data packet and preceding the data packet in the preset sending order; and first sending module 22 is configured to continuously and intermittently send each of the multiple data packets to the receiving end in the preset sending order and the time interval set in each data packet.

[0187] In an optional implementation, the apparatus further includes: a caching module for caching each of the plurality of data packets in a retransmission queue after the data packet has been sent to the receiving end; and a recording module for recording the transmission time when the data packet is sent to the receiving end; wherein a specific field in the data packet is further provided with an identifier for indicating the consumption importance level of the data packet.

[0188] The third determining module is used to determine whether, when the identifier for indicating the consumption importance level of the data packet, set in a specific field in the data packet, is a preset consumption importance level identifier, a first difference between the current time of the sending end and the sending time is greater than a second difference between the effective lifetime of the data packet and the transmission time, wherein the transmission time includes the time consumed by the data packet in the process of being transmitted from the sending end to the receiving end; the deletion module is used to delete the data packet in the duplicate queue when the first difference is greater than the second difference.

[0189] In an optional implementation, the apparatus further includes: a fourth determining module, configured to determine whether a receiving response indicating that the data packet has been received has been received from the receiving end if the first difference is less than or equal to the second difference; and a second sending module, configured to send the data packet to the receiving end if the receiving response has not been received.

[0190] This application enables the determination of whether a second data packet has been received by the receiving end when it receives a first data packet from a plurality of data packets sent consecutively at intervals in a preset sending order. The first data packet includes one of the plurality of data packets, and the second data packet includes a data packet that precedes the first data packet in the preset sending order. The consumption order of the plurality of data packets matches the preset sending order. If the second data packet is not received, it can be determined whether the second data packet has expired, at least by the sending time interval in a preset field of the first data packet. If the second data packet has expired, the consumption importance level of the second data packet can be determined based on an identifier set in a specific field of the first data packet to indicate the consumption importance level of data packets (including the second data packet) preceding the first data packet in the preset sending order. If the consumption importance level of the second data packet is the preset consumption importance level, the first data packet is consumed.

[0191] If the consumption importance level of the second data packet received by the receiving end is the preset consumption importance level, it means that the second data packet has a very low or no impact on the consumption of other data packets in the multiple data packets, and consuming the data packets other than the second data packet does not affect the consumption result. In other words, the result obtained after consuming the data packets other than the second data packet is the same as or similar to the result obtained after consuming all the data packets in the multiple data packets. Therefore, in order to ensure that the application corresponding to the multiple data packets can be responded to in a timely manner, the real-time requirement of data packet consumption needs to be met. It is not necessary to wait for the second data packet; instead, the first data packet, which is consumed after the second data packet in the consumption order, can be consumed directly. This is to obtain the consumption result as quickly as possible, such as ensuring that the application corresponding to the multiple data packets can be responded to in a timely manner, avoiding application response delays, and improving application smoothness, for example.

[0192] Reference Figure 9 This diagram illustrates a structural block diagram of a data processing apparatus according to this application, applied to a sending end. Specifically, the apparatus may include the following modules: a consumption importance level acquisition module 21, used to acquire the consumption importance level of each of a plurality of data packets when multiple data packets need to be sent to a receiving end continuously and at intervals according to a preset sending order; an effective lifetime acquisition module 23, used to acquire the effective lifetime corresponding to the consumption importance level of the data packet; wherein, the effective lifetime corresponding to a higher consumption importance level is greater than the effective lifetime corresponding to a lower consumption importance level; and an effective lifetime sending module 33, used to send the consumption importance level and the effective lifetime corresponding to the consumption importance level to the receiving end if the effective lifetime corresponding to the consumption importance level has not yet been sent to the receiving end.

[0193] This allows the receiving end to obtain the consumption importance level and the corresponding effective lifetime, and thus record the consumption importance level and the corresponding effective lifetime in the correspondence between consumption importance level and effective lifetime.

[0194] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0195] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.

[0196] This application provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments. In this application, the electronic device includes servers, gateways, sub-devices, etc., with the sub-devices being devices such as Internet of Things (IoT) devices.

[0197] Embodiments of this disclosure can be implemented as an apparatus with any suitable hardware, firmware, software, or any combination thereof, configured as desired. This apparatus may include electronic devices such as servers (clusters) and terminal devices such as IoT devices.

[0198] Figure 10 An exemplary apparatus 1300 is schematically shown that can be used to implement the various embodiments described in this application.

[0199] In one embodiment, Figure 10 An exemplary device 1300 is provided, which includes one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processors 1302, a memory 1306 coupled to the control module 1304, a non-volatile memory (NVM) / storage device 1308 coupled to the control module 1304, one or more input / output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304.

[0200] Processor 1302 may include one or more single-core or multi-core processors, and processor 1302 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 1300 can serve as a server device such as a gateway as described in the embodiments of this application.

[0201] In some embodiments, apparatus 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM / storage device 1308) having instructions 1314 and one or more processors 1302 that are combined with the one or more computer-readable media and configured to execute instructions 1314 to implement modules and thus perform the actions described in this disclosure.

[0202] In one embodiment, the control module 1304 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1302 and / or any suitable device or component communicating with the control module 1304.

[0203] The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0204] Memory 1306 may be used, for example, to load and store data and / or instructions 1314 for device 1300. In one embodiment, memory 1306 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 1306 may include double data rate quad synchronous dynamic random access memory (DDR4 SDRAM).

[0205] In one embodiment, the control module 1304 may include one or more input / output controllers to provide interfaces to the NVM / storage device 1308 and (one or more) input / output devices 1310.

[0206] For example, NVM / storage device 1308 may be used to store data and / or instructions 1314. NVM / storage device 1308 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).

[0207] NVM / storage device 1308 may include storage resources that are physically part of a device on which device 1300 is mounted, or that can be accessed by the device without needing to be part of the device. For example, NVM / storage device 1308 may be accessed via a network via one or more input / output devices 1310.

[0208] One or more input / output devices 1310 may provide an interface for device 1300 to communicate with any other suitable device. Input / output devices 1310 may include communication components, pinyin components, sensor components, etc. Network interface 1312 may provide an interface for device 1300 to communicate via one or more networks. Device 1300 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, etc., or combinations thereof.

[0209] In one embodiment, at least one of the processors 1302 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 1304. In one embodiment, at least one of the processors 1302 may be logically packaged with one or more controllers of the control module 1304 to form a system-in-package (SiP). In one embodiment, at least one of the processors 1302 may be integrated with the logic of one or more controllers of the control module 1304 on the same die. In one embodiment, at least one of the processors 1302 may be integrated with the logic of one or more controllers of the control module 1304 on the same die to form a system-on-a-chip (SoC).

[0210] In various embodiments, device 1300 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, device 1300 may have more or fewer components and / or different architectures. For example, in some embodiments, device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0211] This application provides an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the electronic device to perform one or more of the methods described in this application.

[0212] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0213] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0214] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (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 program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable information processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable information processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0215] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable information processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0216] These computer program instructions can also be loaded onto a computer or other programmable information processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0217] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0218] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device 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 terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0219] The data processing method and apparatus provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data processing method, characterized in that, Applied to the receiving end, the method includes: Upon receiving a first data packet from a plurality of data packets sent consecutively at intervals in a preset sending order by the sending end, it is determined whether the receiving end has received a second data packet. The first data packet includes one of the plurality of data packets, and the second data packet includes a data packet that precedes the first data packet in the preset sending order. The consumption order of the plurality of data packets matches the preset sending order. The consumption importance levels of each data packet in the plurality of data packets are not entirely the same. The receiving end needs to consume each data packet in the plurality of data packets sequentially according to the consumption order. If the second data packet is not received, it is determined whether the second data packet has expired; wherein, whether the second data packet has expired is determined by whether the difference between the effective lifespan of the first data packet and the delayed duration of the first data packet is less than a preset duration; If the second data packet has expired, obtain the consumption importance level of the second data packet; If the consumption importance level of the second data packet is a preset consumption importance level, then consume the first data packet; The preset consumption importance level of data packets does not affect the consumption of data packets other than those with the preset consumption importance level. The result obtained after consuming the data packets other than those with the preset consumption importance level is the same as the result obtained after consuming all data packets in the multiple data packets.

2. The method according to claim 1, characterized in that, The method further includes: If the second data packet has not expired, and a redundant packet corresponding to the second data packet sent by the sending end is received, the second data packet is restored based on the redundant packet corresponding to the second data packet and the received data packets; the redundant packet corresponding to the second data packet is obtained by the receiving end after encoding the multiple data packets based on the encoding redundancy corresponding to the consumption importance level of the second data packet. If the second data packet is recovered, consume the second data packet; If the second data packet is not recovered, return to the step of determining whether the second data packet has expired.

3. The method according to claim 1, characterized in that, The method further includes: If the second data packet is not received, obtain the consumption importance level of the first data packet; If the consumption importance level of the first data packet is not a preset consumption importance level, then the step of determining whether the second data packet has expired is performed.

4. The method according to claim 1, characterized in that, Determining whether the second data packet has expired includes: Obtain the elapsed duration of the first data packet, and obtain the effective lifetime of the first data packet; If the difference between the effective lifetime of the first data packet and the delayed duration of the first data packet is less than a preset duration, the second data packet is determined to have expired.

5. The method according to claim 1, characterized in that, Determining whether the second data packet has expired includes: Obtain the elapsed duration of the second data packet; and obtain the effective lifetime of the second data packet; If the delayed duration of the second data packet is greater than the effective lifetime of the second data packet, the second data packet is determined to have expired.

6. The method according to claim 5, characterized in that, The step of obtaining the delayed duration of the second data packet includes: Obtain the delayed duration of the first data packet, and obtain the transmission time interval between the transmission time of the sending end when sending the first data packet and the transmission time of the sending end when sending the second data packet; The delay duration of the second data packet is obtained based on the delay duration of the first data packet and the transmission time interval.

7. The method according to claim 6, characterized in that, The step of obtaining the delayed duration of the first data packet includes: The current time of the receiving end is obtained, the receiving time of the receiving end when it receives the first data packet is obtained, and the transmission time of the first data packet in the process of being transmitted from the sending end to the receiving end is obtained. The delayed duration of the first data packet is obtained based on the current time, the receiving time, and the transmission duration.

8. The method according to claim 6, characterized in that, The step of obtaining the effective lifetime of the second data packet includes: The effective lifetime of the second data packet is obtained based on its consumption importance level.

9. The method according to claim 8, characterized in that, The step of obtaining the effective lifetime of the second data packet based on its consumption importance level includes: In the correspondence between consumption importance level and effective lifetime, find the effective lifetime corresponding to the consumption importance level of the second data packet; In the aforementioned correspondence, higher consumption importance levels correspond to longer effective survival times, while lower consumption importance levels correspond to shorter effective survival times.

10. A data processing method, characterized in that, Applied to the sending end, the method includes: In cases where multiple data packets need to be continuously and intermittently sent to a receiving end in a preset sending order, for each of the multiple data packets, at least one identifier is set in a specific field of the data packet to indicate the consumption importance level of the data packet preceding the data packet in the preset sending order; and a time interval is set in a preset field of the data packet; wherein the time interval includes: the time interval between the sending time when the data packet is sent and the time interval between the sending time when the data packet is sent and the time interval between the sending time when the data packet is sent and the time interval between the sending time when the data packet is adjacent to the data packet and preceding the data packet in the preset sending order; the consumption importance levels of the multiple data packets are not the same; the receiving end needs to consume each of the multiple data packets in the consumption order; the receiving end is also used to determine whether a second data packet has expired based on whether the difference between the effective lifetime of the first data packet and the delayed duration of the first data packet is less than a preset duration, wherein the second data packet is located after the first data packet in the preset sending order; According to the preset sending order and the time interval set in each data packet, the data packets are continuously and intermittently sent to the receiving end. The consumption importance level of the data packet is either the preset consumption importance level or a non-preset consumption importance level; The preset consumption importance level of data packets does not affect the consumption of data packets other than those with the preset consumption importance level. The result obtained after consuming the data packets other than those with the preset consumption importance level is the same as the result obtained after consuming all data packets in the multiple data packets.

11. The method according to claim 10, characterized in that, The method further includes: In cases where multiple data packets need to be sent to the receiving end in a preset sending order at continuous intervals, the consumption importance level of each data packet is obtained for each of the multiple data packets. Obtain the coding redundancy corresponding to the consumption importance level of the data packet; wherein, the coding redundancy corresponding to a higher consumption importance level is higher than the coding redundancy corresponding to a lower consumption importance level. Encode multiple data packets based on the aforementioned coding redundancy to obtain the redundant packets corresponding to the data packets; Send the redundant packet corresponding to the data packet to the receiving end.

12. A data processing method, characterized in that, Applied to the sending end, the method includes: In cases where multiple data packets need to be sent to the receiving end in a preset sending order at continuous intervals, the consumption importance level of each data packet is obtained; the consumption importance levels of the data packets in the multiple data packets are not the same. Obtain the effective lifetime corresponding to the consumption importance level of the data packet; wherein, the effective lifetime corresponding to a higher consumption importance level is greater than the effective lifetime corresponding to a lower consumption importance level; If the effective lifetime corresponding to the consumption importance level has not yet been sent to the receiving end, then send the consumption importance level and the effective lifetime corresponding to the consumption importance level to the receiving end. The consumption importance level of the data packet is either the preset consumption importance level or a non-preset consumption importance level; The preset consumption importance level of data packets does not affect the consumption of data packets other than the preset consumption importance level of data packets. The result obtained after consuming the data packets other than the preset consumption importance level of data packets is the same as the result obtained after consuming all data packets of data packets. The receiving end needs to consume each data packet in the plurality of data packets in the consumption order; the receiving end is also used to determine whether the second data packet has expired based on whether the difference between the effective life-time of the first data packet and the delayed time of the first data packet is less than a preset time, wherein the second data packet is located in the preset sending order of the first data packet.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 12.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Data packet transmission method and apparatus

    CN107864084A

  • Packet loss processing method and device

    CN111246312A

  • Data retransmission method, device, and system

    WO2020125647A1