CN111245566B - Method and device for preventing packet loss of unreliable network, storage medium and electronic equipment - Google Patents

Method and device for preventing packet loss of unreliable network, storage medium and electronic equipment Download PDF

Info

Publication number
CN111245566B
CN111245566B CN202010022079.3A CN202010022079A CN111245566B CN 111245566 B CN111245566 B CN 111245566B CN 202010022079 A CN202010022079 A CN 202010022079A CN 111245566 B CN111245566 B CN 111245566B
Authority
CN
China
Prior art keywords
packet loss
numbers
loss rate
data packets
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010022079.3A
Other languages
Chinese (zh)
Other versions
CN111245566A (en
Inventor
郑轶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chuangshi Cloud Technology Co ltd
Original Assignee
Beijing Chuangshi Cloud Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chuangshi Cloud Technology Co ltd filed Critical Beijing Chuangshi Cloud Technology Co ltd
Priority to CN202010022079.3A priority Critical patent/CN111245566B/en
Publication of CN111245566A publication Critical patent/CN111245566A/en
Application granted granted Critical
Publication of CN111245566B publication Critical patent/CN111245566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0009Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the channel coding
    • H04L1/0011Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the channel coding applied to payload information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0033Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the transmitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0036Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the receiver
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/20Arrangements for detecting or preventing errors in the information received using signal quality detector
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss

Abstract

The invention provides a packet loss resistant method, a device, a storage medium and electronic equipment of an unreliable network, wherein the method comprises the following steps: determining a plurality of first effective data packets containing corresponding first numbers, and sequentially sending the first effective data packets to first target equipment according to a sending sequence; and if the first packet loss rate fed back by the first target equipment is obtained, determining a plurality of second effective data packets containing corresponding second numbers according to the first packet loss rate, and sequentially sending the second effective data packets to the first target equipment according to the sending sequence. In this embodiment, the data packet sent to the target device includes the sequentially generated numbers, so that the target device can calculate the packet loss rate in real time, and the server can adjust the encoding strategy in real time based on the packet loss rate, thereby implementing dynamic encoding according to the network state, improving the packet loss resistance, and ensuring the quality of data transmission; and the low-quality data can be provided under the unreliable network environment with high packet loss rate.

Description

Method and device for preventing packet loss of unreliable network, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of network communication, in particular to a packet loss resisting method and device for an unreliable network, a storage medium and electronic equipment.
Background
In an application scenario of real-time audio and video communication, a network state is transient, and a packet loss situation often occurs in a data transmission process, so that in order to provide low-delay high-quality communication quality, a packet loss resisting technology is required to be used when data is transmitted, and the quality of received data is improved.
At present, a sending end mainly realizes packet loss compensation through an encoding and decoding technology, and a common scheme includes: media independent forward error correction, media dependent forward error correction, audio network open source Agora SOLO, etc. The traditional schemes are passive coding and decoding schemes, real-time dynamic coding cannot be performed according to the network state, and different compensation strategy schemes are implemented according to the state of each channel.
Disclosure of Invention
To solve the above problem, an object of the embodiments of the present invention is to provide a method, an apparatus, a storage medium, and an electronic device for packet loss prevention of an unreliable network.
In a first aspect, an embodiment of the present invention provides a method for packet loss prevention in an unreliable network, including:
determining a plurality of first effective data packets containing corresponding first numbers, sequentially sending the first effective data packets to first target equipment according to a sending sequence, and indicating the first target equipment to determine a first packet loss rate according to the missing condition of the first numbers, wherein the first numbers are numbers sequentially generated according to the sending sequence;
if a first packet loss rate fed back by the first target device is obtained, determining a plurality of second effective data packets containing corresponding second numbers according to the first packet loss rate, and sequentially sending the second effective data packets to the first target device according to a sending sequence; the second number is a number sequentially generated according to a transmission order, and the second number is a number following the first number or a number unrelated to the first number.
In a possible implementation manner, the determining, according to the first packet loss rate, a plurality of second valid data packets including corresponding second numbers includes:
dividing an original data packet to be transmitted into N complementary second effective data packets according to the first packet loss rate, distributing a corresponding second number to each second effective data packet according to a sending sequence, and adding the second number to the corresponding second effective data packet;
and the first packet loss rate and N are in a positive correlation relationship, and N is more than or equal to 2.
In a possible implementation manner, the determining a plurality of first valid data packets containing corresponding first numbers includes:
and if the packet loss rate fed back by the first target device is not obtained, dividing the original data to be transmitted into two complementary first effective data packets.
In one possible implementation, the method further includes:
acquiring a plurality of third effective data packets which are sent by second target equipment and contain corresponding third numbers, wherein the third numbers are numbers which are sequentially generated by the second target equipment according to a sending sequence;
and determining a second packet loss rate according to the missing condition of the third number, feeding the second packet loss rate back to the second target device, and indicating the second target device to change the coding strategy.
In a possible implementation manner, after obtaining a plurality of third valid data packets containing corresponding third numbers sent by the second target device, the method further includes:
and decoding one or more third effective data packets to generate an original data packet to be transmitted.
In a second aspect, an embodiment of the present invention further provides a device for resisting packet loss in an unreliable network, including:
the first processing module is used for determining a plurality of first valid data packets containing corresponding first numbers, sequentially sending the first valid data packets to first target equipment according to a sending sequence, and indicating the first target equipment to determine a first packet loss rate according to the missing condition of the first numbers, wherein the first numbers are numbers sequentially generated according to the sending sequence;
the second processing module is configured to determine, according to a first packet loss rate fed back by the first target device, a plurality of second valid data packets including corresponding second numbers if the first packet loss rate is obtained, and sequentially send the second valid data packets to the first target device according to a sending order; the second number is a number sequentially generated according to a transmission order, and the second number is a number following the first number or a number unrelated to the first number.
In a possible implementation manner, the determining, by the second processing module according to the first packet loss rate, a plurality of second valid data packets including corresponding second numbers includes:
dividing an original data packet to be transmitted into N complementary second effective data packets according to the first packet loss rate, distributing a corresponding second number to each second effective data packet according to a sending sequence, and adding the second number to the corresponding second effective data packet;
and the first packet loss rate and N are in a positive correlation relationship, and N is more than or equal to 2.
In a possible implementation manner, the apparatus further includes a third processing module, where the third processing module is configured to:
acquiring a plurality of third effective data packets which are sent by second target equipment and contain corresponding third numbers, wherein the third numbers are numbers which are sequentially generated by the second target equipment according to a sending sequence;
and determining a second packet loss rate according to the missing condition of the third number, feeding the second packet loss rate back to the second target device, and indicating the second target device to change the coding strategy.
In a third aspect, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions are used in any one of the above packet loss prevention methods for an unreliable network.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a packet loss resilience method for an unreliable network according to any of the above.
In the solution provided by the first aspect of the embodiments of the present invention, the data packet sent to the target device includes the sequentially generated numbers, so that the target device can calculate the packet loss rate in real time based on the missing condition of the obtained numbers, and further, the server serving as the sender can adjust the coding policy in real time based on the real-time packet loss rate, and generate the data packet matched with the coding policy in real time, thereby implementing dynamic coding according to the network state, improving the packet loss resistance, and ensuring the quality of data transmission; and the low-quality data can be provided under the unreliable network environment with high packet loss rate, and the data flow property can be ensured. Meanwhile, different target devices can respectively acquire the corresponding packet loss rates, so that different encoding strategies can be allocated to the different target devices, and the optimal data transmission quality can be provided.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 shows a flowchart of a method for packet loss resistance of an unreliable network according to an embodiment of the present invention;
fig. 2 shows a detailed flowchart of a packet loss prevention method for an unreliable network according to an embodiment of the present invention;
fig. 3 is a schematic view illustrating an application scenario of a packet loss prevention method for an unreliable network according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating a packet loss prevention apparatus of an unreliable network according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for performing a packet loss prevention method for an unreliable network according to an embodiment of the present invention.
Detailed Description
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
According to the method for resisting packet loss of the unreliable network provided by the embodiment of the invention, the coding strategy can be adjusted in real time based on the packet loss rate fed back by the target equipment, so that the packet loss resistance is effectively realized. Referring to fig. 1, the method may be performed by a server, comprising:
step 101: determining a plurality of first effective data packets containing corresponding first numbers, sequentially sending the first effective data packets to a first target device according to a sending sequence, and indicating the first target device to determine a first packet loss rate according to the missing condition of the first numbers, wherein the first numbers are numbers sequentially generated according to the sending sequence.
In the embodiment of the present invention, when the server sends data to the first target device, the encoding policy may be adjusted in real time, and specifically, the server may generate a plurality of effective data packets according to the current encoding policy; meanwhile, a corresponding number, that is, a first number, may be allocated to each valid data packet based on a transmission sequence in which the valid data packet is transmitted to the first target device, and then the first number is added to the valid data packet generated based on the current coding policy code, so that a first valid data packet including the corresponding first number may be generated, and the first valid data packet may be sequentially transmitted to the first target device. After the first target device receives the first valid data packets, the first numbers of the first valid data packets are sequentially generated, and the first numbers can be serial numbers or numbers generated according to other regular arrangements, so that the first target device can determine which first valid data packets are lost based on the missing condition of the first numbers, and further can conveniently and quickly determine the current packet loss rate, namely the first packet loss rate.
The "transmission order" in this embodiment generally refers to an order in which one device transmits a packet to another device. For example, if the server currently generates three valid packets A, B, C and valid packets A, B, C are sequentially sent to the first target device, the first number of valid packet a may be (i), the first number of valid packet B may be (ii), and the first number of valid packet C may be (iii). Correspondingly, the first target device may receive the valid data packet A, B, C sent by the server, and if the first target device only receives the valid data packets a and C due to a network reason, the first target device may only obtain the first numbers (i) and (iii), so that the first target device may determine that the first number (i) is lost, that is, the valid data packet B is lost, based on all the first numbers, and may further determine the current first packet loss rate, where the packet loss rate is 33%. Specifically, the first target device may calculate a packet loss rate within a preset time period (e.g., 1 second), and the first target device may acquire a plurality of first valid data packets within the preset time period, so that the current first packet loss rate may be calculated relatively accurately. The first target device may be a smart phone, a tablet computer, a personal computer, or the like, which is not limited in this embodiment.
Step 102: if a first packet loss rate fed back by the first target equipment is obtained, determining a plurality of second effective data packets containing corresponding second numbers according to the first packet loss rate, and sequentially sending the second effective data packets to the first target equipment according to a sending sequence; the second number is a number sequentially generated according to the transmission order, and the second number is a number following the first number or a number unrelated to the first number.
In the embodiment of the present invention, after calculating a current first packet loss rate, a first target device feeds back the first packet loss rate to a server in real time; after the server obtains the first packet loss rate sent by the first target device, the server may adjust the coding strategy in real time according to the current first packet loss rate. In this embodiment, the server may determine a plurality of second valid data packets according to the first packet loss rate; similar to the first valid data packet, the second valid data packet also includes a corresponding number, that is, a second number, and the second number is also a number sequentially generated in the transmission order. For example, after sending the first valid data packet with the first number (c), the server receives the first packet loss rate and determines a corresponding second valid data packet, and at this time, the number of the second valid data packet to be sent may be (r), that is, the second number (r) is a number sequentially arranged in sequence following the first number (c). Alternatively, the second number may be a number unrelated to the first number, for example, the first number is (r), (c), or (c), and the second number is (11), (12), or (13). After the server sends the second valid data packet containing the second number to the first target device, the first target device may continue to determine the current packet loss rate in real time based on the second number (refer to the previously obtained first number, etc.), so that the server can obtain the real-time packet loss rate of the data packet sent by the server to the first target device in real time, and thus the server may adjust the encoding policy in real time, that is, the above steps 101 and 102 are executed in a loop, so as to avoid packet loss as much as possible.
In this embodiment, if the encoding policy determined based on the first packet loss rate is the same as the encoding policy adopted when the first valid data packet is generated in step 101, the encoding policy may not be changed currently, that is, the second valid data packet is still generated according to the previous encoding policy; meanwhile, the second number in the second valid packet generated at this time may be a number subsequent to the first number. If the coding strategy is changed based on the first packet loss rate in step 102, generating a second valid data packet based on the new coding strategy; meanwhile, the second number may be a regenerated number or a number following the first number.
Those skilled in the art can understand that, in this embodiment, the "first valid packet" and the "second valid packet" are both packets sent by the server to the first target device, only the time points when the two packets (i.e., the first valid packet and the second valid packet) are sent to the first target device are different, the two packets respectively include corresponding first numbers and second numbers, and the two packets may be generated by encoding with different encoding strategies.
According to the method for preventing packet loss of the unreliable network, provided by the embodiment of the invention, the data packet sent to the target device comprises the sequentially generated numbers, so that the target device can calculate the packet loss rate in real time based on the missing condition of the obtained numbers, and further the server serving as a sender can adjust the coding strategy in real time based on the real-time packet loss rate and generate the data packet matched with the coding strategy in real time, thereby realizing dynamic coding according to the network state, improving the capability of preventing packet loss and ensuring the quality of data transmission; and the low-quality data can be provided under the unreliable network environment with high packet loss rate, and the data flow property can be ensured. Meanwhile, different target devices can respectively acquire the corresponding packet loss rates, so that different encoding strategies can be allocated to the different target devices, and the optimal data transmission quality can be provided.
On the basis of the foregoing embodiment, the step 102 "determining a plurality of second valid data packets containing corresponding second numbers according to the first packet loss rate" includes:
step A1: dividing an original data packet to be transmitted into N complementary second effective data packets according to the first packet loss rate, distributing a corresponding second number to each second effective data packet according to a sending sequence, and adding the second number to the corresponding second effective data packet; wherein, the first packet loss rate and N are in positive correlation, and N is more than or equal to 2.
In the embodiment of the invention, the server adopts the coding strategy of dividing the original data packet to be transmitted into a plurality of complementary effective data packets, and different coding strategies can be divided into different numbers of effective data packets. For the first target device receiving the valid data packet, the first target device may generate a corresponding original data packet based on how many complementary valid data packets are restored (i.e., decoded), and the more valid data packets, the more valid data packets can be restored to the original data packet without distortion. For example, the original data packet is an audio signal of 16kbps, if the server divides the audio signal into two (i.e., N ═ 2) valid data packets a and B to be sent to the first target device, if the first target device receives only the valid data packet a, it may decode a narrowband audio signal of 8 kbps; if the first target device receives only valid data packet B, it can also decode a narrowband audio signal of 8 kbps; but if the first target device receives two valid data packets a and B it can resume decoding a 16kbps wideband high quality audio signal.
Specifically, in this embodiment, the original data is divided into N complementary second valid data packets based on the first packet loss rate, and the first packet loss rate and N are in a positive correlation relationship, that is, the larger the first packet loss rate is, the larger N is. For example, the first packet loss rate is 10%, and N may be 2; if the first packet loss rate is 40%, N may be 4. The corresponding relation between the packet loss rate and the N can be preset, the server can conveniently and directly determine the N after obtaining the packet loss rate, and then the operation of subpackage coding is executed.
Optionally, in this embodiment, each time the valid data packet may be generated based on the current encoding policy, and the step 101 "determining a plurality of first valid data packets including corresponding first numbers" includes:
step B1: if the packet loss rate fed back by the first target device is not obtained, dividing the original data to be transmitted into 2 complementary first effective data packets.
In step 101, if the packet loss rate fed back by the first target device is also currently obtained, the first valid data packet may also be determined based on the currently obtained packet loss rate, similar to step 102. If any packet loss rate fed back by the first target device is not obtained currently, a default coding strategy can be adopted at this time, and original data to be transmitted are divided into 2 complementary first effective data packets, namely N is 2; when the packet loss rate is obtained, the corresponding coding strategy can be determined based on the packet loss rate, and the N is adjusted in real time.
On the basis of the above embodiment, the method further includes a process of receiving data, that is, the server may also serve as a receiving end of the data; at this time, the process of receiving data includes:
step C1: and acquiring a plurality of third effective data packets which are sent by the second target equipment and contain corresponding third numbers, wherein the third numbers are numbers which are sequentially generated by the second target equipment according to the sending sequence.
Step C2: and determining a second packet loss rate according to the missing condition of the third number, feeding the second packet loss rate back to the second target equipment, and indicating the second target equipment to change the coding strategy.
In the embodiment of the present invention, a second target device may serve as a sending end to send a data packet to a server, where a processing procedure when the second target device serves as the sending end is substantially similar to a processing procedure when the server serves as the sending end; accordingly, the process when the server acts as the receiving end is basically similar to the process when the first target device acts as the receiving end. Specifically, when the second target device needs to send an original data packet to the server, the second target device may select a corresponding encoding policy according to the packet loss rate fed back by the server, and generate a third valid data packet including a third number based on the original data packet that needs to be sent at this time, for example, a processing procedure similar to step a1 may be performed, and the third valid data packet is divided into N complementary third valid data packets. When the server receives the third valid data packet, the current packet loss rate can be determined based on the actual situation of the third number, and the calculated packet loss rate is fed back to the second target device at this time, so that the second target device can change the encoding strategy in real time based on the packet loss rate.
Optionally, after step C1 "acquiring a plurality of third valid packets containing corresponding third numbers sent by the second target device", the server may further perform a decoding process to generate original packets that need to be sent to other target devices (e.g., the first target device). Specifically, after step C1, the method further includes:
step C3: and decoding one or more third effective data packets to generate an original data packet to be transmitted.
In the embodiment of the present invention, the data packet sent by the server to the first target device may be locally stored, or may be a data packet sent by the second target device to the server, so that the data packet sent by the second target device is forwarded to the first target device based on the server, and the forwarding process has a higher packet loss resistance capability.
The detailed flow of the packet loss prevention method is described in detail below by an embodiment.
In this embodiment of the present invention, the target device 1 is a first target device, the target device 2 is a second target device, and the target device 1 may obtain the data packet sent by the target device 2 based on a server. Referring to fig. 2, the method includes:
step 201: the target device 2 determines an original data packet a to be sent, and divides the original data packet a into a plurality of complementary valid data packets ai according to the packet loss rate fed back by the server, wherein the valid data packets ai contain corresponding numbers.
In this embodiment, data transmission is performed between the target device 2 and the server, and the server calculates a current packet loss rate based on a loss condition of a current number, that is, the second packet loss rate, so that the target device 2 can divide the original data packet a into a plurality of complementary valid data packets ai (that is, the third valid data packet described above) based on the second packet loss rate. For example, the second packet loss rate is 15%, and the target device 2 may divide the original packet a into two valid packets a1 and a2, where the two valid packets include corresponding numbers 1 and 2.
Step 202: the target device 2 sends the valid data packets ai to the server in order.
In this embodiment, the destination device 2 transmits the valid packet a1 first and then transmits the valid packet a2 in the same order as the numbers.
Step 203: after receiving the effective data packet ai, the server calculates a packet loss rate according to the missing condition of the serial number in the effective data packet ai, and feeds the packet loss rate back to the target device 2 in real time.
In this embodiment, the packet loss rate is fed back to the target device 2 in real time, so that the target device 2 can determine the encoding policy in real time, and then continue to send other original data packets to the server.
Step 204: the server decodes the effective data packet ai, determines a corresponding original data packet B, and divides the original data packet B into a plurality of complementary effective data packets bi according to the current coding strategy, wherein the effective data packets bi contain corresponding numbers.
In this embodiment, the server may restore the received valid data packet ai to obtain a corresponding original data packet. Specifically, if the valid data packets include a1 and a2, and the server receives two valid data packets a1 and a2, the original data packet B restored by the server is the original data packet a; if the server receives only one valid data packet of a1 or a2 due to network reasons, the original data packet B obtained by restoration is the original data packet a with low bit rate.
If the current server does not receive the packet loss rate fed back by the target device 1, the current coding strategy is to divide the original data packet B into two complementary effective data packets; if the current server receives the packet loss rate (i.e., the first packet loss rate) fed back by the target device 1, the corresponding encoding policy may be determined according to the packet loss rate. In this embodiment, the original data packet B is divided into two valid data packets B1 and B2 by the server, and the numbers (i.e., the first numbers) contained in the two valid data packets B1 and B2 are 1-1 and 1-2, respectively.
Step 205: the server sends the valid data packets bi to the target device 1 in order.
In this embodiment, the server first sends the valid data packet b1 with the number 1-1, and then sends the valid data packet b2 with the number 1-2.
Step 206: the target device 1 calculates the current packet loss rate according to the missing condition of the serial number in the received valid data packet bi, and feeds back the packet loss rate to the server.
In this embodiment, the packet loss rate fed back to the server by the target device 1 is the first packet loss rate. Meanwhile, the target device 1 may calculate the current packet loss rate based on all the valid packets (including the valid packet bi) received within a preset period (e.g., 1 second).
Step 207: the target device 1 decodes the received valid data packet bi to generate a corresponding original data packet C, and performs corresponding processing on the original data packet C.
In this embodiment, similar to the decoding process in step 204, if no packet loss occurs in the data transmission process, the original data packet C is the original data packet B, otherwise, the original data packet C is the original data packet B with a low bit rate. After the target device 1 decodes the original data packet C, corresponding processing can be performed. For example, if the original data packet a sent by the target device 2 is audio/video data, the target device 1 may play the corresponding original data packet C for the user at the side of the target device 1 to watch.
Step 208: the server determines an original data packet D that needs to be continuously transmitted, and divides the original data packet D into a plurality of complementary valid data packets di according to the packet loss rate fed back by the target device 2, where the valid data packets di also contain corresponding numbers.
In this embodiment, after step 203, the target device 2 may continue to send the data packet to the server based on step 201 and step 202, so that the server may decode the original data packet D. Meanwhile, the server may adjust the encoding strategy accordingly based on the packet loss rate fed back by the target device 1. In this embodiment, the packet loss rate fed back by the target device 1 in step 206 is 40%, at this time, the server divides the original data packet D into four valid data packets D1, D2, D3, and D4, and the numbers (i.e., the second numbers) of the four valid data packets may be 2-1, 2-2, 2-3, and 2-4 in sequence.
Step 209: the server sends the valid data packet di to the target device 1.
In this embodiment, the step 209 is the same as the step 206, and accordingly, the target device 1 may repeatedly execute the steps 206 and 207 after receiving the valid data packet di. The packet loss resisting method is executed in real time, so that the two target devices realize data transmission under the condition of high packet loss resisting capability. Specifically, if the target device 1 receives 4 packets (i.e., valid packets d1, d2, d3, d4), it can decode to obtain high-quality data; if the destination device 1 receives 2 packets (e.g., valid packets d1, d2, or d1, d3, etc.), normal quality data can be obtained; if the target device 1 receives only 1 packet (e.g., valid packet d1 or d2, etc.), lower quality data may be obtained. If the original data packet is audio/video data, although the definition is influenced to a certain extent, the smooth effect of low delay can be ensured.
Optionally, the packet loss prevention method may be applied to the live broadcast field, and based on the packet loss prevention method, the packet loss prevention capability in the live broadcast process is improved. Referring to fig. 3, the second target device is a device used by the anchor side, which can provide corresponding audio-video data. The server can be specifically divided into a stream pushing server and a stream pulling server, and the second target device pushes the audio and video data to the stream pushing server to realize a stream pushing process; meanwhile, the first target devices are devices used by the audience, and the plurality of first target devices can respectively pull the audio and video data of the second target device from the pull streaming server, so that the first target devices can play the pulled audio and video data.
The above describes in detail the flow of the packet loss prevention method for the unreliable network, and this method can also be implemented by a corresponding apparatus, and the structure and function of this apparatus are described in detail below.
An apparatus for resisting packet loss in an unreliable network according to an embodiment of the present invention, referring to fig. 4, includes:
a first processing module 41, configured to determine a plurality of first valid data packets including corresponding first numbers, and sequentially send the first valid data packets to a first target device according to a sending order, to instruct the first target device to determine a first packet loss rate according to a missing condition of the first numbers, where the first numbers are numbers sequentially generated according to the sending order;
a second processing module 42, configured to determine, according to a first packet loss rate fed back by the first target device, a plurality of second valid data packets including corresponding second numbers if the first packet loss rate is obtained, and sequentially send the second valid data packets to the first target device according to a sending order; the second number is a number sequentially generated according to a transmission order, and the second number is a number following the first number or a number unrelated to the first number.
On the basis of the foregoing embodiment, the determining, by the second processing module 42, a plurality of second valid data packets including corresponding second numbers according to the first packet loss rate includes:
dividing an original data packet to be transmitted into N complementary second effective data packets according to the first packet loss rate, distributing a corresponding second number to each second effective data packet according to a sending sequence, and adding the second number to the corresponding second effective data packet;
and the first packet loss rate and N are in a positive correlation relationship, and N is more than or equal to 2.
In a possible implementation manner, the determining, by the first processing module 41, a plurality of first valid data packets containing respective first numbers includes:
and if the packet loss rate fed back by the first target device is not obtained, dividing the original data to be transmitted into two complementary first effective data packets.
On the basis of the above embodiment, the apparatus further includes a third processing module, where the third processing module is configured to:
acquiring a plurality of third effective data packets which are sent by second target equipment and contain corresponding third numbers, wherein the third numbers are numbers which are sequentially generated by the second target equipment according to a sending sequence;
and determining a second packet loss rate according to the missing condition of the third number, feeding the second packet loss rate back to the second target device, and indicating the second target device to change the coding strategy.
On the basis of the above embodiment, the apparatus further comprises a decoding module; after the third processing module obtains a plurality of third valid data packets containing corresponding third numbers sent by the second target device, the decoding module is configured to:
and decoding one or more third effective data packets to generate an original data packet to be transmitted.
According to the packet loss resistant device for the unreliable network, the data packet sent to the target device comprises the sequentially generated numbers, so that the target device can calculate the packet loss rate in real time based on the missing condition of the obtained numbers, the server serving as the sender can adjust the coding strategy in real time based on the real-time packet loss rate, and generate the data packet matched with the coding strategy in real time, thereby realizing dynamic coding according to the network state, improving the packet loss resistance and ensuring the quality of data transmission; and the low-quality data can be provided under the unreliable network environment with high packet loss rate, and the data flow property can be ensured. Meanwhile, different target devices can respectively acquire the corresponding packet loss rates, so that different encoding strategies can be allocated to the different target devices, and the optimal data transmission quality can be provided.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer-executable instructions, which include a program for executing the packet loss prevention method for an unreliable network, and the computer-executable instructions may execute the method in any method embodiment.
The computer storage media may be any available media or data storage device that can be accessed by a computer, including but not limited to magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
Fig. 5 shows a block diagram of an electronic device according to another embodiment of the present invention. The electronic device 1100 may be a host server with computing capabilities, a personal computer PC, or a portable computer or terminal that is portable, or the like. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
The electronic device 1100 includes at least one processor (processor)1110, a Communications Interface 1120, a memory 1130, and a bus 1140. The processor 1110, the communication interface 1120, and the memory 1130 communicate with each other via the bus 1140.
The communication interface 1120 is used for communicating with network elements including, for example, virtual machine management centers, shared storage, etc.
Processor 1110 is configured to execute programs. Processor 1110 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention.
The memory 1130 is used for executable instructions. The memory 1130 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1130 may also be a memory array. The storage 1130 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules. The instructions stored by the memory 1130 are executable by the processor 1110 to enable the processor 1110 to perform a packet loss resilience method for an unreliable network in any of the above-described method embodiments.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the modifications or alternative embodiments within the technical scope of the present invention, and shall be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (8)

1. A method for preventing packet loss of an unreliable network is applied to a scene of real-time audio and video communication, and is characterized by comprising the following steps:
determining a plurality of first effective data packets containing corresponding first numbers, sequentially sending the first effective data packets to first target equipment according to a sending sequence, and indicating the first target equipment to determine a first packet loss rate according to the missing condition of the first numbers, wherein the first numbers are numbers sequentially generated according to the sending sequence;
if a first packet loss rate fed back by the first target device is obtained, determining a plurality of second effective data packets containing corresponding second numbers according to the first packet loss rate, and sequentially sending the second effective data packets to the first target device according to a sending sequence; the second number is a number sequentially generated according to a sending sequence, and the second number is a number following the first number or a number unrelated to the first number;
wherein, the determining a plurality of second valid data packets containing corresponding second numbers according to the first packet loss rate includes:
dividing an original data packet to be transmitted into N complementary second effective data packets according to the first packet loss rate, distributing a corresponding second number to each second effective data packet according to a sending sequence, and adding the second number to the corresponding second effective data packet;
wherein each of the second valid data packets is capable of being restored to a lower quality original data packet; the first packet loss rate and N are in a positive correlation relationship, and N is more than or equal to 2.
2. The method of claim 1, wherein determining a plurality of first valid packets containing respective first numbers comprises:
and if the packet loss rate fed back by the first target device is not obtained, dividing the original data to be transmitted into two complementary first effective data packets.
3. The method of claim 1 or 2, further comprising:
acquiring a plurality of third effective data packets which are sent by second target equipment and contain corresponding third numbers, wherein the third numbers are numbers which are sequentially generated by the second target equipment according to a sending sequence;
and determining a second packet loss rate according to the missing condition of the third number, feeding the second packet loss rate back to the second target device, and indicating the second target device to change the coding strategy.
4. The method according to claim 3, further comprising, after obtaining a plurality of third valid packets containing corresponding third numbers sent by the second target device:
and decoding one or more third effective data packets to generate an original data packet to be transmitted.
5. An anti-packet loss device of an unreliable network is applied to a scene of real-time audio and video communication, and is characterized by comprising the following components:
the first processing module is used for determining a plurality of first valid data packets containing corresponding first numbers, sequentially sending the first valid data packets to first target equipment according to a sending sequence, and indicating the first target equipment to determine a first packet loss rate according to the missing condition of the first numbers, wherein the first numbers are numbers sequentially generated according to the sending sequence;
the second processing module is configured to determine, according to a first packet loss rate fed back by the first target device, a plurality of second valid data packets including corresponding second numbers if the first packet loss rate is obtained, and sequentially send the second valid data packets to the first target device according to a sending order; the second number is a number sequentially generated according to a sending sequence, and the second number is a number following the first number or a number unrelated to the first number;
wherein, the determining, by the second processing module according to the first packet loss rate, a plurality of second valid data packets including corresponding second numbers includes:
dividing an original data packet to be transmitted into N complementary second effective data packets according to the first packet loss rate, distributing a corresponding second number to each second effective data packet according to a sending sequence, and adding the second number to the corresponding second effective data packet;
wherein each of the second valid data packets is capable of being restored to a lower quality original data packet; the first packet loss rate and N are in a positive correlation relationship, and N is more than or equal to 2.
6. The apparatus of claim 5, further comprising a third processing module configured to:
acquiring a plurality of third effective data packets which are sent by second target equipment and contain corresponding third numbers, wherein the third numbers are numbers which are sequentially generated by the second target equipment according to a sending sequence;
and determining a second packet loss rate according to the missing condition of the third number, feeding the second packet loss rate back to the second target device, and indicating the second target device to change the coding strategy.
7. A computer storage medium having stored thereon computer-executable instructions for performing the method of packet loss resilience for an unreliable network according to any of claims 1-4.
8. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of packet loss resistance for an unreliable network according to any of claims 1-4.
CN202010022079.3A 2020-01-09 2020-01-09 Method and device for preventing packet loss of unreliable network, storage medium and electronic equipment Active CN111245566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010022079.3A CN111245566B (en) 2020-01-09 2020-01-09 Method and device for preventing packet loss of unreliable network, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010022079.3A CN111245566B (en) 2020-01-09 2020-01-09 Method and device for preventing packet loss of unreliable network, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111245566A CN111245566A (en) 2020-06-05
CN111245566B true CN111245566B (en) 2021-09-21

Family

ID=70878166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010022079.3A Active CN111245566B (en) 2020-01-09 2020-01-09 Method and device for preventing packet loss of unreliable network, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111245566B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112968813A (en) * 2021-02-25 2021-06-15 中煤科工集团上海有限公司 Method for calculating communication packet loss number in real time on line

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101287120A (en) * 2008-05-22 2008-10-15 腾讯科技(深圳)有限公司 Method for video sequence generating and coding the video sequence
CN101777960A (en) * 2008-11-17 2010-07-14 华为终端有限公司 Audio encoding method, audio decoding method, related device and communication system
CN110336645A (en) * 2019-07-17 2019-10-15 广州市百果园信息技术有限公司 Data transmission method, device, system, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716718B (en) * 2013-12-16 2017-03-01 广州华多网络科技有限公司 The transmission method of packet and device
US10595025B2 (en) * 2015-09-08 2020-03-17 Microsoft Technology Licensing, Llc Video coding
CN108011686B (en) * 2016-10-31 2020-07-14 腾讯科技(深圳)有限公司 Information coding frame loss recovery method and device
CN110391879B (en) * 2019-07-15 2020-08-18 湖南大学 Packet loss recovery method and device for data transmission network and computer equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101287120A (en) * 2008-05-22 2008-10-15 腾讯科技(深圳)有限公司 Method for video sequence generating and coding the video sequence
CN101777960A (en) * 2008-11-17 2010-07-14 华为终端有限公司 Audio encoding method, audio decoding method, related device and communication system
CN110336645A (en) * 2019-07-17 2019-10-15 广州市百果园信息技术有限公司 Data transmission method, device, system, equipment and storage medium

Also Published As

Publication number Publication date
CN111245566A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
US11349900B2 (en) Voice encoding and sending method and apparatus
US10361810B2 (en) Data packet transmission/reception apparatus and method
JP6476197B2 (en) Congestion control bit rate algorithm
JP4980567B2 (en) Multimedia server with simple adaptation to dynamic network loss conditions
US10348454B2 (en) Error resilience for interactive real-time multimedia application
CN102648584B (en) Use the system of forward error correction inspection available bandwidth, method and medium
CN109951254B (en) Data processing method and device and computer readable storage medium
KR102251278B1 (en) Fec mechanism based on media contents
WO2019119950A1 (en) Video coding processing method and apparatus, and application having video coding function
US20130294447A1 (en) Apparatus and method of transmitting and receiving packet in a broadcasting and communication system
CN112751644B (en) Data transmission method, device and system and electronic equipment
CN101854224B (en) Error correcting coding method, device and system, and forwarding control method and device
CN108259998B (en) Player, play control method and device, electronic equipment and play system
CN111245566B (en) Method and device for preventing packet loss of unreliable network, storage medium and electronic equipment
KR20050091054A (en) Device and process for adjusting the bit rate of a stream of contents and associated products
CN109327283B (en) Network self-adaptive packet loss resisting method and device and terminal equipment
CN112187817B (en) Streaming media data transmission method, device, equipment and storage medium
CN116318545A (en) Video data transmission method, device, equipment and storage medium
CN115037416A (en) Data forward error correction processing method, device, electronic equipment and storage medium
WO2021164405A1 (en) Data encoding and decoding methods, and related device and system
CN114286132A (en) Method for video transmission fault tolerance in wireless network
TW202201962A (en) Method for image transmitting, transmitting device and receiving device
CN114900716A (en) Cloud video data transmission method, cloud platform, cloud terminal and medium
CN116962307A (en) Data transmission method and device, electronic equipment and storage medium
CN116866676A (en) Cross-network screen throwing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 804, 8th floor, building D, 2-2, Beijing Shichuang hi tech Development Corporation

Applicant after: Beijing Chuangshi cloud Technology Co.,Ltd.

Address before: 100085 room 804, Zhongguancun International Incubator, No.2, shangdixinxi Road, Haidian District, Beijing

Applicant before: Beijing chuangshiyun Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant