WO2022228381A1 - 一种编码方法、一种解码方法、发送端设备以及接收端设备 - Google Patents

一种编码方法、一种解码方法、发送端设备以及接收端设备 Download PDF

Info

Publication number
WO2022228381A1
WO2022228381A1 PCT/CN2022/088971 CN2022088971W WO2022228381A1 WO 2022228381 A1 WO2022228381 A1 WO 2022228381A1 CN 2022088971 W CN2022088971 W CN 2022088971W WO 2022228381 A1 WO2022228381 A1 WO 2022228381A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
end device
original data
packet
repair
Prior art date
Application number
PCT/CN2022/088971
Other languages
English (en)
French (fr)
Inventor
刘少腾
缪丽华
陈祥玉
李宗鹏
韩磊
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022228381A1 publication Critical patent/WO2022228381A1/zh

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/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0041Arrangements at the transmitter end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0045Arrangements at the receiver end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/04Error control

Definitions

  • the embodiments of the present application relate to the field of data processing, and in particular, to an encoding method, a decoding method, a sending end device, and a receiving end device.
  • Forward Erasure Coding is a method for recovering lost data by encoding data.
  • the sending end device generates a repair packet according to the encoding of multiple original data packets. If the receiving end device finds that after receiving the multiple original data packets If there is data loss, the receiving end device can repair the lost original data packet according to the received repair packet.
  • one encoding method is to fill the longest data packet among the multiple data packets into the target row of the encoding matrix, and determine the length of the longest data packet as the length of each row in the encoding matrix. length, and then put other data packets into the remaining rows in the encoding matrix, and then fill the zero-padded packets of the corresponding length into the remaining rows, so that each row of the remaining rows in the encoding matrix has the total packet length Consistent with the length of the target row, and then generate the corresponding repair package according to the encoding matrix.
  • Embodiments of the present application provide an encoding method, a decoding method, a sending end device, and a receiving end device, which are used to improve the repair efficiency and repair capability of the repair package.
  • a first aspect of the embodiments of the present application provides an encoding method, which is applied to data transmission between any two network devices in a packet-switched network.
  • the method includes: the transmitting end device first obtains an encoding matrix, and the encoding matrix uses In order to fill in the data packet, the encoding matrix includes the target row, and then the sender device obtains the available space of the target row, that is, the target row can also be used to fill in the space of the data packet; when the sender device receives the original After the data packet, if the original data packet is smaller than the available space, the sender device fills the original data packet into the available space of the target row, and if the original data packet is larger than the available space, the sender device fills the available space with the original data packet.
  • the original data packet is filled into the available space of the row other than the target row in the encoding matrix, and then the sender device determines the repair packet according to the original data packet and the coordinate information of the original data packet, and the repair packet is used for the receiving end device to repair For the original data packet, the sender device sends the repair packet to the receiver device.
  • the sending end device does not fill the data packets into the encoding matrix according to the order of the data packets, but fills the original data packets into the available space of the target row in the encoding matrix according to the size of the original data packets, Therefore, the data packets can be filled in the optimal position in the coding matrix, so that the data packets of each row in the coding matrix are complete, and the coding matrix can be filled with as many original data packets as possible, so that the coding matrix can be filled with as many original data packets as possible.
  • the zero-padding is as little as possible.
  • the repair package is generated for each row in the encoding matrix, the less zero-padding data in each row, the more original data packets, and the higher the repair efficiency of the repair data packets. The stronger the ability. Therefore, the repair package in the embodiment of the present application has higher efficiency and stronger repair capability.
  • the method further includes: the sending end device generates a first data packet according to the original data packet and coordinate information of the original data packet in the encoding matrix, the first data packet The coordinate information is contained in the packet; the sending end device sends the first data packet to the receiving end device.
  • the sending end device will send the original data packet and the corresponding coordinate information together to the receiving end device in the form of a first data packet, so that the receiving end device can receive the first data packet and then
  • the original data packet can be filled into the encoding matrix according to the coordinate information, so that the receiving end device can process the received original data packet faster.
  • obtaining the available space of the target row by the sending end device includes: the sending end device generates an ordered array according to the available space of all rows in the encoding matrix; Determines the available space in the ordered array for the target row.
  • the sending end device sorts the available space of all rows in the encoding matrix in advance and generates an ordered array, so that the sending end device traverses the available space according to the size of the available space when filling in the original data packet. order array, so as to find the most suitable row of the original data packet, which makes the repairing packet more efficient and has stronger repairing ability.
  • a second aspect of the embodiments of the present application provides an encoding method, which is applied to data transmission between any two network devices in a packet-switched network, and the method includes: the sending end device receives a plurality of original data packets; If the sum of the number of multiple original data packets satisfies the preset condition, the sending end device is triggered to obtain the encoding matrix according to the multiple original data packets; if the size of the target data packet is larger than the preset value, the sending end device will set the target The data packet is filled in a blank row in the encoding matrix; if the size of the target packet is smaller than the preset value, the sender device fills the target packet into a non-blank row in the encoding matrix, and the target The data packet is any one of the multiple original data packets, the blank line is the row in the encoding matrix that is not filled with the data packet, and the non-blank line is the row that has been filled with the data packet in the encoding matrix; the sending
  • the sending end device first receives the original data packets that meet the preset number, then fills these original data packets into the encoding matrix, and finally combines the coordinate information corresponding to these original data packets with the repair package. sent to the receiving device.
  • These coordinate information is not sent one by one, but is sent as a whole together with the repair packet, thereby reducing the possibility of packet loss. And confirming its corresponding coordinate information according to all the data packets is more conducive to reducing the blank rate of the coding matrix and increasing the repairing efficiency and repairing capability of the repairing packets.
  • obtaining the encoding matrix according to the plurality of original data packets by the transmitting-end device includes: determining, by the transmitting-end device, that the length of the largest data packet among the plurality of data packets is The length of each row in the encoding matrix; the transmitting end device determines the encoding matrix according to the sum of the sizes of the plurality of original data packets and the length of each row in the encoding matrix.
  • the encoding matrix includes a target row, and the sending end device fills the target data packet into a non-blank row in the encoding matrix, including: the sending end device obtains the target data packet. The free space of the target row; if the target data packet is smaller than the free space, fill the target data packet into the free space; if the target data packet is larger than the free space, fill the original data packet into the encoding matrix in the available space on a row other than the target row.
  • the above-mentioned repair package includes coordinate information of the multiple original data packages.
  • a third aspect of the embodiments of the present application provides an encoding method, which is applied to data transmission between any two network devices in a packet-switched network.
  • the method includes: the sending end device obtains an encoding matrix, where the encoding matrix includes a target line, the sending end device receives the original data packet, the sending end device fills the original data packet into the target line, the target line includes at least two data packets and a zero-filling package, and the zero-filling package is that the data are all zero data packets, the zero-padding packets are used to compensate the data packets in the target row to a preset length, and the sending end device determines the repair packets according to the original data packets and the coordinate information of the original data packets in the encoding matrix,
  • the repair package can be used to repair the original data packet, and the sender device sends the repair package to the receiver device.
  • a fourth aspect of the embodiments of the present application provides a decoding method, which is applied to data transmission between any two network devices in a packet-switched network.
  • the method includes: a receiving end device receives a target data packet, the target data packet contains the corresponding coordinate information of the target data packet in the encoding matrix, the receiving end device fills the target data packet into the encoding matrix according to the coordinate information, and the receiving end device receives the repair packet, which can be used to repair the original data packet. If the receiving end device confirms that there is a lost data packet in the encoding matrix according to the repair packet, the receiving end device repairs the lost data packet according to the repair packet.
  • a fifth aspect of the embodiments of the present application provides a decoding method, which is applied to data transmission between any two network devices in a packet-switched network, and the method includes: a receiving end device receives a plurality of original data packets and repair packets , the repair package can be used to repair the original data package, the repair package contains the coordinate information corresponding to the multiple original data packages in the encoding matrix, and the receiving end device fills the multiple original data packages into the original data package according to the coordinate information Encoding matrix, if the receiving end device confirms that there is a lost data packet in the encoding matrix according to the repair packet, the receiving end device repairs the lost data packet according to the repair packet.
  • a sixth aspect of the present application provides a transmitting end device, the transmitting end device having the function of implementing the method of the first aspect or any of the possible implementation manners of the first aspect.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, an acquisition module.
  • a seventh aspect of the present application provides a transmitting end device, the transmitting end device having the function of implementing the method of the second aspect or any of the possible implementation manners of the second aspect.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, an acquisition module.
  • An eighth aspect of the present application provides a transmitting end device, where the transmitting end device has the function of implementing the method of the third aspect.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, an acquisition module.
  • a ninth aspect of the present application provides a receiving end device, where the receiving end device has the function of implementing the method of the fourth aspect.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, such as a receiving module.
  • a tenth aspect of the present application provides a receiving end device, where the receiving end device has the function of implementing the method of the fifth aspect.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, such as a receiving module.
  • An eleventh aspect of the present application provides a transmitting end device, the transmitting end device including at least one processor, a memory, an input/output (I/O) interface, and an input/output (I/O) interface, which is stored in the memory and can run on the processor.
  • computer-executable instructions when the computer-executable instructions are executed by the processor, the processor executes the first aspect or any possible implementation manner of the first aspect, the second aspect or any possible implementation manner of the second aspect, or method of the third aspect.
  • a twelfth aspect of the present application provides a receiving end device.
  • the controller includes at least one processor, a memory, an input/output (I/O) interface, and a device that is stored in the memory and can run on the processor.
  • the computer executes the instructions, and when the computer executes the instructions are executed by the processor, the processor executes the method of the fourth aspect or the fifth aspect above.
  • a thirteenth aspect of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions.
  • the processor executes the first aspect or any one of the possibilities of the first aspect.
  • a fourteenth aspect of the present application provides a computer-readable storage medium storing one or more computer-executable instructions.
  • the processor executes the method of the fourth or fifth aspect.
  • a fifteenth aspect of the present application provides a computer program product that stores one or more computer-executable instructions.
  • the processor executes the first aspect or any possible implementation of the first aspect. manner, any possible implementation manner of the second aspect or the second aspect or the method of the third aspect.
  • a sixteenth aspect of the present application provides a computer program product that stores one or more computer-executable instructions.
  • the processor executes the method of the fourth or fifth aspect.
  • a seventeenth aspect of the present application provides a chip system, where the chip system includes at least one processor, and the at least one processor is configured to implement the first aspect or any possible implementation manner of the first aspect, the second aspect or the second aspect Any of the possible implementations of the aspect or the functions involved in the method of the third aspect.
  • the chip system may further include a memory for storing necessary program instructions and data of the apparatus for processing the artificial intelligence model.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • An eighteenth aspect of the present application provides a chip system, where the chip system includes at least one processor, and the at least one processor is configured to implement the functions involved in the method of the fourth aspect or the fifth aspect.
  • the chip system may further include a memory for storing necessary program instructions and data of the apparatus for processing the artificial intelligence model.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • a nineteenth aspect of the present application provides a packet switching network device, where the packet switching network device includes a sending end device and a receiving end device, and the sending end device is used to implement the first aspect or any possible implementation of the first aspect manner, any possible implementation manner of the second aspect or the second aspect, or the method of the third aspect; the receiving end device is used to implement the method of the fourth aspect or the fifth aspect.
  • the embodiments of the present application have the following advantages:
  • the sender device does not fill the data packets into the encoding matrix according to the order of the data packets, but fills the original data packets into the available space of the target row in the encoding matrix according to the size of the original data packets, so that the data packets can be filled into the encoding matrix.
  • the optimal position in the matrix so that the data packets of each row in the encoding matrix are complete, and the encoding matrix can be filled with as many original data packets as possible, so that the zero-padding in the encoding matrix is as few as possible, Since the repair packet is generated for each row in the encoding matrix, the less zero-padding data in each row and the more original data packets, the higher the repair efficiency of the repair data packets and the stronger the repair ability. Therefore, the repair package in the embodiment of the present application has higher efficiency and stronger repair capability.
  • FIG. 1 is a schematic diagram of a scenario of a packet-switched network
  • Fig. 2 is a kind of schematic flow chart of forward erasure code
  • Fig. 3 is another kind of schematic flow chart of forward erasure code
  • FIG. 4 is a schematic flowchart of an encoding method in an embodiment of the present application.
  • FIG. 5 is another schematic flowchart of the encoding method in the embodiment of the present application.
  • FIG. 6 is a schematic flowchart of an encoding method in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an encoding matrix in an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of an encoding method in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a first data packet in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a repair package in an embodiment of the application.
  • FIG. 11 is another schematic flowchart of the encoding method in the embodiment of the present application.
  • FIG. 13 is a schematic flowchart of a decoding method in an embodiment of the present application.
  • FIG. 14 is another schematic flowchart of the decoding method in the embodiment of the present application.
  • FIG. 15 is another schematic flowchart of a decoding method in an embodiment of the present application.
  • 16 is a schematic diagram of the effect of the decoding method in the embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of a transmitting end device in an embodiment of the application.
  • FIG. 18 is another schematic structural diagram of a transmitting end device in an embodiment of the application.
  • FIG. 19 is another schematic structural diagram of a transmitting end device in an embodiment of the application.
  • FIG. 20 is another schematic structural diagram of a transmitting end device in an embodiment of the application.
  • 21 is a schematic structural diagram of a receiving end device in an embodiment of the application.
  • FIG. 22 is another schematic structural diagram of a receiving end device in an embodiment of the application.
  • FIG. 23 is another schematic structural diagram of a receiving end device in an embodiment of the application.
  • FIG. 24 is another schematic structural diagram of a receiving end device in an embodiment of the application.
  • FIG. 25 is another schematic structural diagram of a transmitting end device in an embodiment of the application.
  • FIG. 26 is another schematic structural diagram of a receiving end device in an embodiment of the application.
  • FIG. 27 is a schematic structural diagram of a packet switching network device in an embodiment of the present application.
  • Embodiments of the present application provide an encoding method and a sending end device, which are used to improve the repair efficiency of the repair package.
  • forward erasure coding is a method for recovering lost data by encoding data.
  • the sending end device generates a repair packet according to the encoding of multiple original data packets. If the receiving end device finds that there is data loss after receiving the multiple original data packets, and the lost data packet is less than the erasure threshold of the erasure code, it will receive the repair packet.
  • the end device can repair the lost original data packet according to the received repair packet, and the sending end device does not need to resend the original data packet to the receiving end device.
  • an encoding method is to fill the longest data packet among multiple data packets into the target row of the encoding matrix, and determine the length of the longest data packet as The length of each row in the encoding matrix, and then put other data packets into the remaining rows in the encoding matrix respectively, and then fill the zero-padded packets of the corresponding length into the remaining rows, so that each of the remaining rows in the encoding matrix is The total data packet length of a row is consistent with the target row length, and then a corresponding repair packet is generated according to the encoding matrix.
  • another encoding method is to fill the received original data packets into the encoding matrix closely in the order of reception. If the original data packets cannot be completely filled into the target row, the The excess portion of the original packet is filled into the next line.
  • the first method needs to fill in a large number of zero-padding packets for the remaining rows other than the target row of the longest data packet during the encoding process, because the repair packet is generated for the rows in the matrix and combined Data repair is performed for the rows in the matrix, but this encoding method fills in zero-padding packets in many rows of the encoding matrix, so the repair efficiency of the generated repair packets is very low.
  • the second method there will be a situation where one data packet is in two rows of the encoding matrix. Since the repairing packet is generated for the rows in the matrix and the data packet is repaired, at least two repairing packets are required during repairing, and it is possible There will be situations that cannot be repaired. For example, the data packets MP5 and MP6 in the coding matrix 2 shown in FIG. 3 cannot be repaired.
  • the transmitting end device when the transmitting end device in the packet switching network sends to the receiving end device, the transmitting end device obtains an encoding matrix, the encoding matrix includes a target row, and then the transmitting end device obtains the target row. If the original data packet is less than the available space, the sender device fills the original data packet into the available space of the target line. If the original data packet is larger than the available space, the sender The device fills the original data packet into the available space of rows other than the target row in the encoding matrix; the sender device determines the repair packet according to the original data packet and the coordinate information of the original data packet, and the repair packet can be used to repair the original data packet.
  • the coordinate information of the original data packet may be included in the target data packet and sent to the receiving end device separately, or the coordinate information of the original data packet belonging to one encoding group, that is, the same encoding matrix, may be added to the repair packet. It is uniformly sent to the receiving end device, and the following descriptions are given separately:
  • the coordinate information of the original data packet can be included in the target data packet and sent to the receiving end device separately.
  • a process of the encoding method in the embodiment of the present application includes:
  • the transmitting end device obtains the encoding matrix.
  • the sender device obtains an encoding matrix
  • the encoding matrix includes a target row
  • the length of each row in the encoding matrix is a preset value
  • each row in the encoding matrix can be filled with data package, which can be used to determine the coordinate information of the data package in the encoding matrix.
  • the target row can be any row in the encoding matrix.
  • each row of the encoding matrix can be filled with preset data, for example, all data zeros are filled in the encoding matrix, that is, the data filled in the encoding matrix All are zero, and when the sender device receives the original data packet, it will overwrite the preset data in the corresponding position with the original data packet; in addition, the encoding matrix may not be filled with any data, only The length of each line is preset to be the same fixed value, and the sender device directly fills in the encoding matrix after receiving the original data packet, which is not limited here.
  • the transmitting-end device may acquire the encoding matrix by acquiring the encoding matrix pre-stored by the transmitting-end device, or may generate the encoding matrix online, or may use a combination of the two to generate the matrix, which is not specifically limited here.
  • the sender device obtains the available space.
  • the sender device obtains the remaining free space of the target row in the encoding matrix, and the remaining free space of the target row refers to the remaining space in the target row that can be used to fill data packets.
  • the total available space of the target row that is, the row width is K
  • the total length of the data packets that have been filled in the target row is p.bytes
  • the target row is any row in the encoding matrix.
  • the sender device also obtains the remaining free space of all rows in the matrix, sorts all the remaining free space according to size, and generates an ordered array segment, each element in the ordered array indicates the number of segments in the encoding matrix, respectively.
  • the sender device can fill in the received data packets according to the size of the remaining free space in these lines.
  • the sender device receives the original data packet and fills in the encoding matrix.
  • the transmitting end device receives the original data packet, and generates a corresponding copy of the original data packet by copying the original data packet, and then the transmitting end device fills the copy of the original data packet into the original data packet of the encoding matrix in a suitable location.
  • the sending end device compares the remaining available space of the target row in the encoding matrix with the size of the original data packet, if the size of the original data packet is smaller than the size of the available space of the target row, Then the sender device fills the original data packet into the target line; if the size of the original data packet is larger than the size of the available space of the target line, that is, the available space of the target line is not enough to completely fill the original data packet into the target line. In the target row, the sender device fills the original data packet into the available space of the row other than the target row in the encoding matrix.
  • the sender device after receiving the original data packet MP1, the sender device determines that the data packet MP1 is smaller than the length of the available space in the first row of the encoding matrix, and then fills the data packet MP1 into the first row; after receiving the original data After packing MP2 and MP3, determine that the length of the available space in the first row of the encoding matrix is smaller than that of the original data packets MP2 and MP3, and then judge the second row.
  • the sender device After determining that the length of the available space in the second row is greater than that of the original data packets MP2 and MP3 After receiving the original data packet MP4, the sender device determines that the remaining free space in the second row of the encoding matrix is smaller than the original data packet MP4, and the remaining available space in the third row is smaller than the original data packet MP4. If the available space is larger than the original data package MP4, the original data package MP4 is filled in the third row, and the original data packages MP5, MP6, MP7, MP8, and MP9 are filled in the encoding matrix according to this method.
  • the target data packet when the sending end device fills the target data packet into the encoding matrix, the target data packet may be multiplied by a preset encoding coefficient and then filled into the encoding matrix, or may not be multiplied by the encoding coefficient.
  • a preset encoding coefficient There is no limitation here.
  • the sending end device generates and sends the first data packet.
  • the transmitting end device determines the first data packet according to the original data packet and the coordinate information of the copied original data packet in the encoding matrix.
  • the sending end device adds the coordinate information corresponding to the original data packet to the packet header of the data packet; then the sending end device sends the data packet with the coordinate information to the corresponding signal receiving device.
  • the packet header part in the first data packet includes an original packet header and an extended packet header, and the flag field in the original packet header can indicate whether the data packet is an original data packet or a repaired packet, that is, according to the original packet header Determine whether the data packet includes an extension header, that is, whether the data packet contains the coordinates of the data packet.
  • the extension header includes the FEC FPI, the Payload ID, and the EC FPI indicates the encoded packet of the target data packet and the order in the packet; the extension header also includes the coordinate information of the data packet. Since the decoding Due to factors such as complexity, delay and window size, the size of an encoding packet is usually between 10 and 20, generally not exceeding 50. Therefore, the corresponding encoding matrix has a maximum of 50 rows. Since the maximum data packet is 1280, each The maximum row size is 1280, so the maximum coordinate information coordinate is 16 bits.
  • the sender device generates a repair packet according to the original data packet and the coordinate information.
  • the sender device generates a repair packet according to the original data packet and the corresponding coordinate information, and the repair packet, that is, the redundant packet, can be used to repair the corresponding data packet.
  • the transmitting-end device multiplies each row in the encoding matrix by the corresponding encoding coefficient, thereby generating a corresponding encoding for each row.
  • Repair information that is, the data packet can be used to repair all data packets in the corresponding row; then the sender device generates corresponding information according to the number of data packets in each row of the encoding matrix and fills in the packet header of the repair data packet.
  • the transmitting end device If no data is filled in the encoding matrix, only the length of each row is preset to a same fixed value, and the transmitting end device directly fills in the encoding matrix after receiving the original data packet, and then the transmitting end device sends the target data packet to the After sending it to the receiving end device, before the sending end device determines the repair package according to the original data packet and the coordinate information of the original data packet, if the available space in any row in the encoding matrix is smaller than the smallest data packet, the sending end device will be triggered to The free space of all rows in the encoding matrix is filled with zero-padded packets, which are data packets whose internal data are all zeros.
  • the sender device sends a repair package to the receiver device.
  • the sending end device sends a repair packet to the receiving end device, so that the receiving end device can check whether there is a data packet loss according to the data packet, and repair the lost data packet according to the repair packet.
  • the coordinate information of the original data packet may be included in the target data packet and sent to the receiving end device separately.
  • the transmitting end device may also send the original data packets belonging to one encoding group, that is, the same encoding matrix.
  • the coordinate information is added to the repair package and sent to the receiving end device uniformly. The details are explained below:
  • the transmitting end device adds the coordinate information of the original data packets belonging to one encoding group, that is, the same encoding matrix, into the repairing packet and sends it to the receiving end device uniformly.
  • a process of the encoding method in the embodiment of the present application includes:
  • the sender device receives multiple original data packets.
  • the sending end device receives multiple original data packets, and generates corresponding copied original data packets by copying the original data packets, and sorts the received multiple copied original data packets according to the size. A copy of the packet The original packet is used to populate the appropriate positions in the encoding matrix.
  • the transmitting end device obtains the encoding matrix.
  • the sending end device If the sum of the numbers of the multiple original data packets received by the sending end device satisfies the preset condition, the sending end device is triggered to acquire the encoding matrix according to the multiple original data packets.
  • the sender device determines that the number of received multiple original data packets satisfies a preset condition, for example, it is greater than the preset number M, the sender device determines that the largest of the multiple data packets, that is, the longest The length of one data packet is the length of each row in the encoding matrix; then the sender device determines the encoding matrix according to the sum of the number of multiple original data packets and the length of each row in the encoding matrix.
  • a preset condition for example, it is greater than the preset number M
  • the encoding matrix includes target rows, and the length of each row in the encoding matrix is the length of the largest, ie, the longest, data packet among multiple data packets, and each row in the encoding matrix can be filled with data packets, that is, Can be used to determine the coordinate information of the data packet in the encoding matrix.
  • the target row can be any row in the encoding matrix.
  • each row of the encoding matrix can be filled with preset data, for example, all data zeros are filled in the encoding matrix, that is, the data filled in the encoding matrix All are zero, and when the sender device receives the original data packet, it will overwrite the preset data in the corresponding position with the original data packet; in addition, the encoding matrix may not be filled with any data, only The length of each line is preset to be the same fixed value, and the sender device directly fills in the encoding matrix after receiving the original data packet, which is not limited here.
  • the sender device fills the target data packet into the encoding matrix.
  • the sender device obtains the remaining space of the target row in the encoding matrix, and then the sender device fills a plurality of data packets sorted by size into the target row of the encoding matrix, where the target row is any row in the encoding matrix.
  • the transmitting end device first obtains the remaining available space of the target row in the encoding matrix, where the remaining available space of the target row refers to the remaining space in the target row that can be used to fill data packets.
  • the total available space of the target row that is, the row width is K
  • the total length of the data packets that have been filled in the target row is p.bytes
  • the target row is any row in the encoding matrix.
  • the sender device also obtains the remaining free space of all rows in the matrix, sorts all the remaining free space according to size, and generates an ordered array segment, each element in the ordered array indicates the number of segments in the encoding matrix, respectively.
  • the sender device can fill in the received data packets according to the size of the remaining free space in these lines.
  • the preset value can be changed to half the length of the largest data packet, that is, the longest data packet, and the sender device will fill the target data packet into the encoding matrix.
  • a blank row if the size of the target data packet is smaller than the preset value, the sender device fills the target data packet into a non-blank row in the encoding matrix, and the target data packet is any one of multiple original data packets. Blank rows are rows in the encoding matrix that are not populated with packets, and non-blank rows are rows in the encoding matrix that are populated with packets.
  • the sender device first obtains the free space of the target line. If the target data packet is smaller than the free space, the target data packet is filled in the free space. If the target data packet is larger than the free space, the original data Packets fill the available space for rows other than the target row in the encoding matrix.
  • the target data packet when the sending end device fills the target data packet into the encoding matrix, the target data packet may be multiplied by a preset encoding coefficient and then filled into the encoding matrix, or may not be multiplied by the encoding coefficient.
  • a preset encoding coefficient There is no limitation here.
  • the sender device generates a repair package.
  • the sending end device determines the repair packet according to the original data packet and the coordinate information of the original data packet in the encoding matrix.
  • the repair packet includes coordinate information of multiple original data packets, and the repair packet can be used to repair the original data packet.
  • the transmitting end device After the transmitting end device has enough data packets of one encoded group in the encoding matrix, the transmitting end device multiplies each row in the encoding matrix by the corresponding encoding coefficient, thereby generating repair information for each corresponding row; then the transmitting end device The device generates corresponding information according to the number of data packets in each row of the encoding matrix and fills in the packet header of the repair data packet.
  • the transmitting end device If no data is filled in the encoding matrix, only the length of each row is preset to a same fixed value, and the transmitting end device directly fills in the encoding matrix after receiving the original data packet, and then the transmitting end device sends the target data packet to the After sending it to the receiving end device, before the sending end device determines the repair package according to the original data packet and the coordinate information of the original data packet, if the available space in any row in the encoding matrix is smaller than the smallest data packet, the sending end device will be triggered to The free space of all rows in the encoding matrix is filled with zero-padded packets, which are data packets whose internal data are all zeros.
  • the sender device sends a repair packet to the receiver device.
  • the sending end device sends a repair packet to the receiving end device, so that the receiving end device can check whether a data packet is lost according to the data packet, and repair the lost data packet according to the repair packet.
  • the coordinate information of the original data packet may be included in the target data packet and sent to the receiving end device separately, or the coordinate information of the original data packet belonging to one encoding group, that is, the same encoding matrix, may be added to the repair packet. It is uniformly sent to the receiving end device, and the following descriptions are given separately:
  • the coordinate information of the original data packet can be included in the target data packet and sent to the receiving end device separately.
  • a process of the decoding method in the embodiment of the present application includes:
  • the receiving end device receives the first data packet.
  • the receiving end device receives the first data packet, where the first data packet includes coordinate information corresponding to the first data packet in the encoding matrix.
  • the receiving end device leaves the duplicated file of the first data packet, the original data packet of the first data packet is forwarded to the upper layer, and the duplicated file of the first data packet is used to fill in encoding matrix.
  • the receiving end device fills the first data packet into the encoding matrix.
  • the receiving end device fills the first data packet into the encoding matrix according to the coordinate information.
  • the receiving end device confirms the coded packet corresponding to the data packet according to the header of the first data packet, and then fills in the corresponding position in the coding matrix corresponding to the coded packet according to the coordinate information of the data packet. For example, the receiving end device can determine, according to the FEC_FPI in the header of the first data packet, that the encoding packet corresponding to the data packet is the first encoding packet, and then assign the first data packet to the encoding matrix corresponding to the first encoding packet for storage. . Then, the coordinate position of the data packet in the coding matrix corresponding to the first coding group is determined according to the coordinate in the header of the first data packet.
  • the receiver device receives the repair package.
  • the receiving end device receives the repair package, and the repair package can be used to revise the original data package.
  • the receiver device repairs the lost data packet according to the repair packet.
  • the receiving end device If the receiving end device confirms that there is a lost data packet in the coding matrix according to the repair packet, the receiving end device repairs the lost data packet according to the repair packet.
  • the receiving end device After the receiving end device receives the repair packet, the receiving end device records the number of data packets corresponding to each row in the repair packet and the number of data packets actually filled in the encoding matrix according to the number of data packets in the encoding matrix. If the number of data packets actually filled in the encoding matrix is less than the number of data packets corresponding to each row recorded in the repair packet, it is determined that the row is missing, such as Row2 and Row3 in Figure 14, Then, the receiving end device repairs the entire missing line according to the repair package. When the data of all rows is complete, all data packets are extracted from the encoding matrix in order.
  • the coordinate information of the original data packet may be included in the target data packet and sent to the receiving end device separately.
  • the transmitting end device may also send the original data packets belonging to one encoding group, that is, the same encoding matrix.
  • the coordinate information is added to the repair package and sent to the receiving end device uniformly. The details are explained below:
  • the transmitting end device adds the coordinate information of the original data packets belonging to one encoding group, that is, the same encoding matrix, into the repairing packet and sends it to the receiving end device uniformly.
  • a process of the decoding method in the embodiment of the present application includes:
  • the receiver device receives a plurality of original data packets and repair packets.
  • the receiving end device receives multiple original data packets and repaired packets, the repaired packets can be used to repair the original data packets, and the repaired packets contain the coordinate information corresponding to the multiple original data packets in the encoding matrix;
  • the receiving end device fills the encoding matrix with multiple original data packets.
  • the receiving end device fills the encoding matrix with multiple original data packets according to the coordinate information.
  • the receiving end device confirms the encoded packet corresponding to the data packet according to the packet header of the original data packet, and then fills in the corresponding position in the encoding matrix corresponding to the encoded packet according to the coordinate information of the data packet. For example, the receiving end device may determine that the encoded packet corresponding to the data packet is the first encoded packet according to the FEC_FPI in the header of the original data packet, and then assign the original data packet to the encoding matrix corresponding to the first encoded packet for storage. Then, the coordinate position of the data packet in the encoding matrix corresponding to the first encoding group is determined according to the coordinate in the repair packet.
  • the receiver device repairs the lost data packet according to the repair packet.
  • the receiving end device If the receiving end device confirms that there is a lost data packet in the coding matrix according to the repair packet, the receiving end device repairs the lost data packet according to the repair packet.
  • the receiving end device compares the number of data packets corresponding to each row recorded in the repair packet with the number of data packets actually filled in the encoding matrix. If the number of data packets actually filled in the encoding matrix is less than the number of data packets corresponding to each row recorded in the repair packet, it is determined that the row is missing, and the missing row is repaired according to the repair packet. When the data of all rows is complete, all data packets are extracted from the encoding matrix in order.
  • the sending end device does not fill the data packets into the encoding matrix according to the order of the data packets, but fills the original data packets into the available space of the target row in the encoding matrix according to the size of the original data packets, so that the The data packets can be filled in the optimal position in the encoding matrix, so that the data packets of each row in the encoding matrix are complete, and the encoding matrix can be filled with as many original data packets as possible, so that the complement of the encoding matrix can be filled.
  • the repair package in the embodiment of the present application has higher efficiency and stronger repair capability.
  • the solution of the embodiment of the present application ie, line 3 can greatly reduce the loss of loss. Packet rate and reduce the amount of lost data.
  • the sending end device in the embodiment of the present application will be described below.
  • a sending end device 1700 provided by the embodiment of the present application is described.
  • the sending end device 1700 may be the sending end device in the above-mentioned FIG. 5 .
  • 1700 includes:
  • the first obtaining module 1701 is used to obtain a coding matrix, and the coding matrix includes a target row; for a specific implementation method, please refer to step 501 in the embodiment shown in FIG.
  • the second obtaining module 1702 is used to obtain the available space of the target row; for a specific implementation method, please refer to step 502 in the embodiment shown in FIG. 5 : the sender device obtains the available space, which is not repeated here.
  • the receiving module 1703 is used to receive the original data packet; for a specific implementation, please refer to step 503 in the embodiment shown in FIG. 5 : the transmitting end device receives the original data packet and fills in the encoding matrix, which will not be repeated here.
  • Filling module 1704 for if the original data packet is smaller than the available space, the sender device fills the original data packet into the available space of the target row, and if the original data packet is larger than the available space, the sender device fills the original data packet into the available space.
  • the filling module can be a sender-side packet arrangement and redundant packet generator that can The coordinate information corresponding to the original data packet is calculated by the internal coordinate calculator, and the process can be controlled by the corresponding controller.
  • step 503 in the embodiment shown in FIG. 5 the transmitting end device receives the original data packet and fills it in the coding matrix, which will not be repeated here.
  • the determination module 1705 is used to determine the repaired packet according to the original data packet and the coordinate information of the original data packet, and the repaired packet can be used to repair the original data packet; as shown in FIG. 18 , the determination module can be a kind of sending end packet arrangement and redundancy Packet generator, the sender-side packet arrangement and redundant packet generator can determine repair packets according to original data packets and coding coefficients through an internal controller.
  • the sending end device generates a repair package according to the original data package and the coordinate information, which will not be repeated here.
  • the first sending module 1706 is configured to send the repair package to the receiving end device.
  • the repair package For a specific implementation manner, please refer to step 506 in the embodiment shown in FIG. 5 : sending a repair package to the receiving end device, which will not be repeated here.
  • the sender device further includes:
  • the generating module 1707 is used to generate a first data packet according to the original data packet and the coordinate information of the original data packet in the coding matrix, and the first data packet contains the coordinate information; for the specific implementation, please refer to the steps in the embodiment shown in FIG. 5 504: The sending end device generates and sends the first data packet, which is not repeated here.
  • the second sending module 1708 is configured to send the first data packet to the receiving end device.
  • the sending end device generates and sends the first data packet, which will not be repeated here.
  • the transmitting end device may perform the operations performed by the transmitting end device in any of the foregoing embodiments shown in FIG. 5 , and details are not repeated here.
  • a sending end device 1900 provided by an embodiment of the present application is described.
  • the sending end device 1900 may be the sending end device shown in FIG. 11 above. 1900 includes:
  • the receiving module 1901 is configured to receive multiple original data packets; for a specific implementation, please refer to step 1101 in the embodiment shown in FIG. 11 : the transmitting end device receives multiple original data packets, which will not be repeated here.
  • the obtaining module 1902 is configured to trigger the sending end device to obtain the encoding matrix according to the multiple original data packets if the sum of the number of the multiple original data packets satisfies the preset condition; for the specific implementation, please refer to step 1102 in the embodiment shown in FIG. 11 : The sender device obtains the encoding matrix, which will not be repeated here.
  • the obtaining module 1902 includes:
  • the first determining unit 1903 is used to determine that the length of the largest data packet in the multiple data packets is the length of each row in the encoding matrix; for the specific implementation, please refer to step 1102 in the embodiment shown in FIG. 11 : the transmitting end device obtains The encoding matrix is not repeated here.
  • the second determining unit 1904 is configured to determine the encoding matrix according to the sum of the sizes of multiple original data packets and the length of each row in the encoding matrix. For a specific implementation manner, please refer to step 1102 in the embodiment shown in FIG. 11 : the transmitting end device obtains a coding matrix, which will not be repeated here.
  • the sending end device fills the target data packet into a blank row in the encoding matrix; if the size of the target data packet is smaller than the preset value, the sending end device The device fills the target data packet into a non-blank row in the encoding matrix.
  • the target data packet is any one of multiple original data packets.
  • the blank row is the row of the encoding matrix that is not filled with the data packet, and the non-blank row is the encoding matrix.
  • the filling module can be a sender-side packet arrangement and redundant packet generator, the sender-side packet arrangement and redundant packet generator can be calculated by internal coordinates
  • the controller calculates the coordinate information corresponding to the original data packet, and the process can be controlled by the corresponding controller.
  • step 1102 in the embodiment shown in FIG. 11 the transmitting end device fills the target data packet into the encoding matrix, which will not be repeated here.
  • the filling module 1905 includes:
  • the obtaining unit 1906 is used to obtain the available space of the target row; for a specific implementation, please refer to step 1102 in the embodiment shown in FIG. 11 : the sending end device fills the target data packet into the encoding matrix, which will not be repeated here.
  • Filling unit 1907 is used to fill the target data packet into the available space if the target data packet is smaller than the available space, and if the target data packet is larger than the available space, then fill the original data packet into the rows other than the target row in the encoding matrix. available space.
  • the transmitting end device fills the target data packet into the encoding matrix, which will not be repeated here.
  • the determination module 1908 is used to determine the repaired packet according to the original data packet and the coordinate information of the original data packet in the encoding matrix, and the repaired packet can be used to repair the original data packet; as shown in FIG. 20 , the determination module can be a sending end packet Arrangement and redundancy packet generator, the sender-side packet arrangement and redundancy packet generator can determine repair packets according to original data packets and coding coefficients through an internal controller.
  • the sending end device generates a repair package, which will not be repeated here.
  • the sending module 1909 is configured to send the repair package to the receiving end device.
  • the sending end device sends a repair package to the receiving end device, which will not be repeated here.
  • the transmitting end device may perform the operations performed by the transmitting end device in any of the foregoing embodiments shown in FIG. 11 , and details are not repeated here.
  • a receiving end device 2100 is provided in the embodiment of the present application.
  • the receiving end device 2100 may be the receiving end device in the above-mentioned FIG. 13 .
  • 2100 includes:
  • the first receiving module 2101 is used to receive the first data packet, and the first data packet includes the coordinate information corresponding to the first data packet in the coding matrix; for the specific implementation, please refer to step 1301 in the embodiment shown in FIG. 13 : Receive The first data packet is not repeated here.
  • the filling module 2102 is used to fill the first data packet into the coding matrix according to the coordinate information; as shown in FIG. 22 , the filling module can be a line-by-line repairer for the receiving end packet arrangement, and the receiving end packet is arranged line by line The repairer can determine the coordinate information corresponding to the original data packet through the internal arranger, and the process can be controlled by the corresponding controller.
  • the receiving end device fills the first data packet into the coding matrix, which will not be repeated here.
  • the second receiving module 2103 is configured to receive a repair package, which can be used to repair the original data package; for a specific implementation, please refer to step 1303 in the embodiment shown in FIG.
  • the repair module 2104 is configured to repair the lost data packet according to the repair packet if the receiving end device confirms that there is a lost data packet in the coding matrix according to the repair packet.
  • the filling module can be a line-by-line repairer for packet arrangement at the receiving end, and the line-by-line repairer for packet arrangement at the receiving end can decode and repair the row of the lost data packet according to the redundant packet, that is, the repair packet, This process can be controlled by the corresponding controller.
  • step 1304 in the embodiment shown in FIG. 13 repair the lost data packet according to the repair packet, which will not be repeated here.
  • the receiving end device may perform the operations performed by the receiving end device in any of the foregoing embodiments shown in FIG. 13 , and details are not repeated here.
  • a receiving end device 2300 is provided in the embodiment of the present application.
  • the receiving end device 2300 may be the receiving end device in the above-mentioned FIG. 15 .
  • 2300 includes:
  • the receiving module 2301 is used to receive multiple original data packets and repaired packets, the repaired packets can be used to repair the original data packets, and the repaired packets include the coordinate information corresponding to the multiple original data packets in the encoding matrix; for the specific implementation, please refer to the figure Step 1501 in the embodiment shown in 15: The receiving end device receives a plurality of original data packets and repair packets, which will not be repeated here.
  • Filling module 2302 is used to fill a plurality of original data packets into the coding matrix according to the coordinate information; as shown in FIG. 24 , the filling module can be a line-by-line repairer for the receiving end packet arrangement, and the receiving end packet arrangement is line by line.
  • the line repairer can determine the coordinate information corresponding to the original data packet through the internal arranger, and the process can be controlled by the corresponding controller.
  • step 1502 in the embodiment shown in FIG. 15 the receiving end device fills a plurality of original data packets into the coding matrix, which will not be repeated here.
  • the repair module 2303 is configured to repair the lost data packet according to the repair packet if the receiving end device confirms that there is a lost data packet in the coding matrix according to the repair packet.
  • the filling module can be a line-by-line repairer for packet arrangement at the receiving end, and the line-by-line repairer for packet arrangement at the receiving end can decode and repair the row of the lost data packet according to the redundant packet, that is, the repair packet, This process can be controlled by the corresponding controller.
  • step 1503 in the embodiment shown in FIG. 15 the receiving end device repairs the lost data packet according to the repair packet, which will not be repeated here.
  • the receiving end device may perform the operations performed by the receiving end device in any of the foregoing embodiments shown in FIG. 15 , and details are not repeated here.
  • FIG. 25 is a schematic structural diagram of a transmitting end device provided by an embodiment of the present application.
  • the transmitting end device 2500 may include one or more central processing units (CPUs) 2501 and a memory 2505.
  • the memory 2505 stores a or more than one application or data.
  • the memory 2505 may be volatile storage or persistent storage.
  • the program stored in the memory 2505 may include one or more modules, and each module may include a series of instruction operations on the sender device.
  • the central processing unit 2501 may be configured to communicate with the memory 2505 to execute a series of instruction operations in the memory 2505 on the sender device 2500 .
  • the central processing unit 2501 is used for executing the computer program in the memory 2505, so that the sending end device 2500 is used to execute: the sending end device obtains the coding matrix, and the coding matrix includes the target row; the sending end device obtains the available space of the target row; The end device receives the original data packet. If the original data packet is smaller than the available space, the sender device fills the original data packet into the available space of the target row. If the original data packet is larger than the available space, the sender device fills the original data packet into the available space.
  • the sender device determines the repair packet according to the original data packet and the coordinate information of the original data packet, and the repair packet is used to repair the original data packet; the sender device sends the repair packet to the receiver device ; or the sending end device receives multiple original data packets; if the sum of the number of multiple original data packets satisfies the preset condition, the sending end device is triggered to obtain the encoding matrix according to the multiple original data packets; if the size of the target data packet is larger than the preset value, the sender device fills the target data packet into a blank row in the encoding matrix; if the size of the target packet is smaller than the preset value, the sender device fills the target packet into a non-blank row in the encoding matrix , the target data packet is any one of multiple original data packets, the blank behavior is the row of the coding matrix that is not filled with the data packet, and the non-blank behavior is the
  • the sender device 2500 can also include one or more power supplies 2502, one or more wired or wireless network interfaces 2503, one or more input and output interfaces 2504, and/or, one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • one or more operating systems such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the transmitting end device 2500 may perform the operations performed by the transmitting end device in the foregoing embodiment shown in FIG. 5 or FIG. 11 , and details are not described herein again.
  • the receiving end device 2600 may include one or more central processing units (central processing units, CPU) 2601 and a memory 2605, and the memory 2605 stores a or more than one application or data.
  • central processing units central processing units, CPU
  • the memory 2605 may be volatile storage or persistent storage.
  • the program stored in the memory 2605 may include one or more modules, and each module may include a series of instruction operations on the receiver device.
  • the central processing unit 2601 may be configured to communicate with the memory 2605 to execute a series of instruction operations in the memory 2605 on the receiver device 2600.
  • the central processing unit 2601 is used for executing the computer program in the memory 2605, so that the receiving end device 2600 is used for executing: the receiving end device receives the first data packet, and the first data packet includes the first data packet corresponding to the encoding matrix The receiving end device fills the first data packet into the encoding matrix according to the coordinate information; the receiving end device receives the repair package, and the repair package can be used to repair the original data packet; if the receiving end device confirms that there are missing data packets in the encoding matrix according to the repair package data packets, the receiving end device repairs the lost data packets according to the repair packets; or the receiving end device receives multiple original data packets and repair packets, the repair packets can be used to repair the original data packets, and the repair packets contain multiple original data packets.
  • the receiving end device fills multiple original data packets into the encoding matrix according to the coordinate information; if the receiving end device confirms that there are missing data packets in the encoding matrix according to the repair package, the receiving end device repairs the lost data packets according to the repair package. the data package.
  • steps 1301-1304 in the embodiment shown in FIG. 13 or steps 1501-1503 shown in FIG. 15 please refer to steps 1301-1304 in the embodiment shown in FIG. 13 or steps 1501-1503 shown in FIG. 15 , which will not be repeated here.
  • the receiver device 2600 may also include one or more power supplies 2602, one or more wired or wireless network interfaces 2603, one or more input and output interfaces 2604, and/or, one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • one or more operating systems such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the receiving end device 2600 may perform the operations performed by the receiving end device in the foregoing embodiment shown in FIG. 13 or FIG. 15 , and details are not repeated here.
  • FIG. 27 is a packet switching network device 2700 provided by an embodiment of the present application.
  • the packet switching network device 2700 may include a sending end device 2701 as shown in the figure and a receiving end device 2702 as shown in the figure.
  • the transmitting end device may perform the operations performed by the transmitting end device in the foregoing embodiment shown in FIG. 5 or FIG. 11 , and details are not repeated here.
  • the receiving end device may perform the operations performed by the receiving end device in the embodiment shown in the foregoing FIG. 13 or FIG. 15 , and details are not repeated here.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

本申请实施例公开了一种编码方法,用于提升修复包的修复效率和修复能力。本申请实施例方法包括:发送端设备获取编码矩阵,编码矩阵包括目标行,发送端设备获取目标行的可用空间,发送端设备接收原始数据包,若原始数据包小于可用空间,则发送端设备将原始数据包填入目标行的可用空间中,若原始数据包大于可用空间,则发送端设备将原始数据包填入编码矩阵中目标行以外的行的可用空间中,发送端设备根据原始数据包以及原始数据包的坐标信息确定修复包,修复包用于修复原始数据包,发送端设备向接收端设备发送修复包。

Description

一种编码方法、一种解码方法、发送端设备以及接收端设备
本申请要求于2021年04月29日提交中国专利局、申请号为202110474464.6、发明名称为“一种编码方法、一种解码方法、发送端设备以及接收端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及数据处理领域,具体涉及一种编码方法、一种解码方法、发送端设备以及接收端设备。
背景技术
前向纠删码是一种通过对数据编码从而进行丢失数据恢复的方法,发送端设备通过根据多个原始数据包编码生成修复包,若接收端设备在接收到该多个原始数据包后发现有数据丢失,则接收端设备就可以根据接收到的修复包对丢失的原始数据包进行修复。
在目前的编码方式中,一种编码方法是将多个数据包中最长的数据包填入编码矩阵的目标行中,并将该最长的数据包的长度确定为编码矩阵中每一行的长度,然后将其他的数据包分别放入编码矩阵中的剩余行,再将对应长度的补零包填入剩余行中,以使得编码矩阵中的剩余行的中的每一行总的数据包长度与目标行的长度一致,然后根据该编码矩阵生成对应的修复包。
对于目前的编码方法,由于在编码过程中需要对填入最长的数据包目标行之外的剩余行填入大量补零包,由于修复包是针对矩阵中的行生成的并针对矩阵中的行进行数据修复的,但是这种编码方式在编码矩阵的很多行中都填入了补零包,因此生成的修复包的修复效率非常低。
发明内容
本申请实施例提供了一种编码方法、一种解码方法、发送端设备以及接收端设备,用于提升修复包的修复效率和修复能力。
本申请实施例第一方面提供了一种编码方法,该方法应用于包交换网络中的任意两个网络设备之间的数据传输,该方法包括:发送端设备先获取编码矩阵,该编码矩阵用于填入数据包,该编码矩阵包括目标行,然后该发送端设备获取该目标行的可用空间,即该目标行中还可以用于填入数据包的空间;当该发送端设备接收到原始数据包后,如果该原始数据包小于该可用空间,发送端设备就将该原始数据包填入该目标行的可用空间中,如果该原始数据包大于该可用空间,则该发送端设备将该原始数据包填入该编码矩阵中目标行以外的行的可用空间中,然后该发送端设备根据该原始数据包以及该原始数据包的坐标信息确定修复包,该修复包用于接收端设备修复该原始数据包,该发送端设备再向该接收端设备发送该修复包。
该种可能的实现方式中,发送端设备并不根据数据包的次序来将数据包填入编码矩阵,而是根据原始数据包的大小将其填入编码矩阵中的目标行的可用空间中,从而使得数据包 可以填入编码矩阵中最优的位置,以使得编码矩阵中的每一行的数据包都是完整的,且编码矩阵中可以填入尽可能多的原始数据包,使得编码矩阵中的补零尽可能的少,由于修复包是针对编码矩阵中的每一行生成的,因此每一行中的补零数据越少,原始数据包越多,修复数据包的修复效率就越高,修复能力就越强。因此本申请实施例中的修复包的效率更高,具有更强的修复能力。
在第一方面的一种可能的实现方式中,该方法还包括:该发送端设备根据该原始数据包以及该原始数据包在该编码矩阵中的坐标信息生成第一数据包,该第一数据包中包含该坐标信息;该发送端设备将该第一数据包发送给接收端设备。
该种可能的实现方式中,发送端设备会将该原始数据包和对应的坐标信息一起以第一数据包的形式发给接收端设备,从而使得接收端设备可以接收到第一数据包后就可以根据坐标信息将原始数据包填入编码矩阵,从而使得接收端设备可以更快地处理接收到的原始数据包。
在第一方面的一种可能的实现方式中,上述发送端设备获取该目标行的可用空间包括:该发送端设备根据该编码矩阵中所有行的可用空间生成有序数组;该发送端设备在该有序数组中确定该目标行的可用空间。
该种可能的实现方式中,发送端设备提前将编码矩阵中所有行的可用空间进行了排序并生成有序数组,从而使得发送端设备在填入原始数据包时是按照可用空间的大小遍历有序数组,从而找到该原始数据包最合适的行,使得修复包的效率更高,具有更强的修复能力。
本申请实施例第二方面提供了一种编码方法,该方法应用于包交换网络中的任意两个网络设备之间的数据传输,该方法包括:发送端设备接收多个原始数据包;若该多个原始数据包的数量总和满足预设条件,则触发该发送端设备根据该多个原始数据包获取编码矩阵;若该目标数据包的大小大于预设值,则该发送端设备将该目标数据包填入该编码矩阵中一个空白行中;若该目标数据包的大小小于预设值,则该发送端设备将该目标数据包填入该编码矩阵中的一个非空白行中,该目标数据包为该多个原始数据包中的任意一个,该空白行为该编码矩阵中未填入数据包的行,该非空白行为该编码矩阵中已填入数据包的行;该发送端设备根据该原始数据包以及该原始数据包在该编码矩阵中的坐标信息确定修复包,该修复包可用于修复该原始数据包;该发送端设备向该接收端设备发送该修复包。
该种可能的实现方式中,发送端设备先接收到满足预设数量的原始数据包,然后再将这些原始数据包填入编码矩阵中,最后将这些原始数据包对应的坐标信息和修复包一起发送给接收设备。这些坐标信息不是一个一个发送的,而是和修复包一起整体发送的,从而减小了数据包丢失的可能性。并且根据所有的数据包确认其对应的坐标信息,更有利于减小编码矩阵的空白率,增加修复包的修复效率和修复能力。
在第二方面的一种可能的实现方式中,上述该发送端设备根据该多个原始数据包获取编码矩阵,包括:该发送端设备确定该多个数据包中最大的一个数据包的长度为该编码矩阵中每行的长度;该发送端设备根据该多个原始数据包的大小总和以及该编码矩阵中每行的长度确定该编码矩阵。
在第二方面的一种可能的实现方式中,该编码矩阵包括目标行,上述发送端设备将该目标数据包填入该编码矩阵中的一个非空白行中,包括:该发送端设备获取该目标行的可用空间;若该目标数据包小于该可用空间,则将该目标数据包填入该可用空间中,若该目标数据包大于该可用空间,则将该原始数据包填入该编码矩阵中目标行以外的行的可用空间中。
在第二方面的一种可能的实现方式中,上述修复包中包括该多个原始数据包的坐标信息。
本申请实施例第三方面提供了一种编码方法,该方法应用于包交换网络中的任意两个网络设备之间的数据传输,该方法包括:发送端设备获取编码矩阵,该编码矩阵包括目标行,该发送端设备接收原始数据包,该发送端设备将该原始数据包填入该目标行中,该目标行中包括至少两个数据包和补零包,该补零包为数据都为零的数据包,该补零包用于将目标行中的数据包补偿至预设长度,该发送端设备根据该原始数据包以及该原始数据包在该编码矩阵中的坐标信息确定修复包,该修复包可用于修复该原始数据包,该发送端设备向该接收端设备发送该修复包。
本申请实施例第四方面提供了一种解码方法,该方法应用于包交换网络中的任意两个网络设备之间的数据传输,该方法包括:接收端设备接收目标数据包,该目标数据包中包含该目标数据包在编码矩阵中对应的坐标信息,该接收端设备根据该坐标信息将该目标数据包填入该编码矩阵,该接收端设备接收修复包,该修复包可用于修复该原始数据包,若该接收端设备根据该修复包确认该编码矩阵中存在丢失的数据包,则该接收端设备根据该修复包修复该丢失的数据包。
本申请实施例第五方面提供了一种解码方法,该方法应用于包交换网络中的任意两个网络设备之间的数据传输,该方法包括:接收端设备接收多个原始数据包和修复包,该修复包可用于修复该原始数据包,该修复包中包含该多个原始数据包在编码矩阵中对应的坐标信息,该接收端设备根据该坐标信息将该多个原始数据包填入该编码矩阵,若该接收端设备根据该修复包确认该编码矩阵中存在丢失的数据包,则该接收端设备根据该修复包修复该丢失的数据包。
本申请第六方面提供一种发送端设备,该发送端设备具有实现上述第一方面或第一方面任意一种可能实现方式的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块,例如:获取模块。
本申请第七方面提供一种发送端设备,该发送端设备具有实现上述第二方面或第二方面任意一种可能实现方式的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块,例如:获取模块。
本申请第八方面提供一种发送端设备,该发送端设备具有实现上述第三方面的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块,例如:获取模块。
本申请第九方面提供一种接收端设备,该接收端设备具有实现上述第四方面的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块,例如:接收模块。
本申请第十方面提供一种接收端设备,该接收端设备具有实现上述第五方面的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块,例如:接收模块。
本申请第十一方面提供一种发送端设备,该发送端设备包括至少一个处理器、存储器、输入/输出(input/output,I/O)接口以及存储在存储器中并可在处理器上运行的计算机执行指令,当计算机执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式或第三方面的方法。
本申请第十二方面提供一种接收端设备,该控制器包括至少一个处理器、存储器、输入/输出(input/output,I/O)接口以及存储在存储器中并可在处理器上运行的计算机执行指令,当计算机执行指令被处理器执行时,处理器执行如上述第四方面或第五方面的方法。
本申请第十三方面提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当计算机执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式或第三方面的方法。
本申请第十四方面提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当计算机执行指令被处理器执行时,处理器执行如上述第四方面或第五方面的方法。
本申请第十五方面提供一种存储一个或多个计算机执行指令的计算机程序产品,当计算机执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式或第三方面的方法。
本申请第十六方面提供一种存储一个或多个计算机执行指令的计算机程序产品,当计算机执行指令被处理器执行时,处理器执行如上述第四方面或第五方面的方法。
本申请第十七方面提供了一种芯片系统,该芯片系统包括至少一个处理器,至少一个处理器用于实现上述第一方面或第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式或第三方面的方法中所涉及的功能。在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存处理人工智能模型的装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
本申请第十八方面提供了一种芯片系统,该芯片系统包括至少一个处理器,至少一个处理器用于实现上述第四方面或第五方面的方法中所涉及的功能。在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存处理人工智能模型的装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
本申请第十九方面提供了一种包交换网络设备,该包交换网络设备包括发送端设备和接收端设备,该发送端设备用来实现上述第一方面或第一方面任意一种可能的实现方式、第二方面或第二方面任意一种可能的实现方式或第三方面的方法;接收端设备用来实现上述第四方面或第五方面的方法。
从以上技术方案可以看出,本申请实施例具有以下优点:
发送端设备并不根据数据包的次序来将数据包填入编码矩阵,而是根据原始数据包的大小将其填入编码矩阵中的目标行的可用空间中,从而使得数据包可以填入编码矩阵中最优的位置,以使得编码矩阵中的每一行的数据包都是完整的,且编码矩阵中可以填入尽可能多的原始数据包,使得编码矩阵中的补零尽可能的少,由于修复包是针对编码矩阵中的每一行生成的,因此每一行中的补零数据越少,原始数据包越多,修复数据包的修复效率就越高,修复能力就越强。因此本申请实施例中的修复包的效率更高,具有更强的修复能力。
附图说明
图1为包交换网络的场景示意图;
图2为前向纠删码的一种流程示意图;
图3为前向纠删码的另一种流程示意图;
图4为本申请实施例中编码方法的一种流程示意图;
图5为本申请实施例中编码方法的另一种流程示意图;
图6为本申请实施例中编码方法的一种流程示意图;
图7为本申请实施例中编码矩阵的一种示意图;
图8为本申请实施例中编码方法的一种流程示意图;
图9为本申请实施例中第一数据包的一种示意图;
图10为本申请实施例中修复包的一种示意图;
图11为本申请实施例中编码方法的另一种流程示意图;
图12为本申请实施例中编码方法的另一种流程示意图;
图13为本申请实施例中解码方法的一种流程示意图;
图14为本申请实施例中解码方法的另一种流程示意图;
图15为本申请实施例中解码方法的另一种流程示意图;
图16为本申请实施例中解码方法的效果示意图;
图17为本申请实施例中发送端设备的一种结构示意图;
图18为本申请实施例中发送端设备的另一种结构示意图;
图19为本申请实施例中发送端设备的另一种结构示意图;
图20为本申请实施例中发送端设备的另一种结构示意图;
图21为本申请实施例中接收端设备的一种结构示意图;
图22为本申请实施例中接收端设备的另一种结构示意图;
图23为本申请实施例中接收端设备的另一种结构示意图;
图24为本申请实施例中接收端设备的另一种结构示意图;
图25为本申请实施例中发送端设备的另一种结构示意图;
图26为本申请实施例中接收端设备的另一种结构示意图;
图27为本申请实施例中包交换网络设备的一种结构示意图。
具体实施方式
本申请实施例提供了一种编码方法以及发送端设备,用于提升修复包的修复效率。
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
如图1所示,对于在包交换网络中的任意两个网络设备之间的数据传输过程中的丢包问题,前向纠删码是一种通过对数据编码从而进行丢失数据恢复的方法,发送端设备通过根据多个原始数据包编码生成修复包,若接收端设备在接收到该多个原始数据包发现有数据丢失,且丢失的数据包小于纠删码的纠删阈值时,则接收端设备就可以根据接收到的修复包对丢失的原始数据包进行修复,发送端设备也就不用重新向接收端设备重新发送该原始数据包。
在目前的编码方式中,如图2所示,一种编码方法是将多个数据包中最长的数据包填入编码矩阵的目标行中,并将该最长的数据包的长度确定为编码矩阵中每一行的长度,然后将其他的数据包分别放入编码矩阵中的剩余行,再将对应长度的补零包填入剩余行中,以使得编码矩阵中的剩余行的中的每一行总的数据包长度与目标行长度一致,然后根据该编码矩阵生成对应的修复包。如图3所示,另一种编码方式是将接收到的原始数据包按照接收的次序依次紧密的填入编码矩阵中,如果该原始数据包不能完整地填入该目标行中,就将该原始数据包的超出部分填入到下一行中。
对于目前的编码方法,第一种方法由于在编码过程中需要对填入最长的数据包目标行之外的剩余行填入大量补零包,由于修复包是针对矩阵中的行生成的并针对矩阵中的行进行数据修复的,但是这种编码方式在编码矩阵的很多行中都填入了补零包,因此生成的修复包的修复效率非常低。第二种方法由于会出现一个数据包在编码矩阵的两行的情况,由于修复包是针对矩阵中的行生成并进行数据包修复的,因此在修复时就需要至少两个修复包,并且可能会出现无法修复的情况,例如图3所示的编码矩阵二中的数据包MP5和数据包MP6就无法修复。
如图4所示,本申请实施例中,在包交换网络中的发送端设备向接收端设备发送时,发送端设备获取编码矩阵,该编码矩阵中包括目标行,然后发送端设备获取再目标行的可用空间,在发送端设备接收原始数据包,若原始数据包小于可用空间,则发送端设备将原始数据包填入目标行的可用空间中,若原始数据包大于可用空间,则发送端设备将原始数 据包填入编码矩阵中目标行以外的行的可用空间中;发送端设备根据原始数据包以及原始数据包的坐标信息确定修复包,修复包可用于修复原始数据包。
基于上述包交换网络,下面对本申请实施例中的编码方法进行描述:
本申请实施例中,原始数据包的坐标信息可以包含在目标数据包中单独发送给接收端设备,也可以将属于一个编码分组即同一个编码矩阵的原始数据包的坐标信息添加到修复包中统一发送给接收端设备,下面分别进行说明:
一、原始数据包的坐标信息可以包含在目标数据包中单独发送给接收端设备。
请参阅图5,本申请实施例中的编码方法的一个流程包括:
501.发送端设备获取编码矩阵。
如图6所示,发送端设备获取一个编码矩阵,该编码矩阵中包括目标行,该编码矩阵中的每一行的长度为一个预设的值,该编码矩阵中的每一行都可以填入数据包,即可用于确定该数据包在该编码矩阵中的坐标信息。该目标行可以是编码矩阵中的任意一行。
本申请实施例中,发送端设备获取的这个编码矩阵中,编码矩阵的每一行中可以填满预先设定的数据,例如将编码矩阵中全部填入数据零,即编码矩阵中填入的数据全部都是零,后面在发送端设备接收到原始数据包时,就用原始数据包覆盖掉对应位置的预先设定的数据;除此之外,编码矩阵中也可以不填入任何数据,只预设每一行的长度为一个相同的固定值,发送端设备接收到原始数据包后就直接填入编码矩阵,具体此处不做限定。
本申请实施例中,发送端设备获取编码矩阵可以是获取发送端设备预先存储好的编码矩阵,也可以在线生成编码矩阵,也可以采用两者结合的方式生成矩阵,具体此处不做限定。
502.发送端设备获取可用空间。
发送端设备获取编码矩阵中的目标行的剩余可用空间,该目标行的剩余可用空间是指该目标行中剩余的还可以用于填入数据包的空间。例如该目标行总的可用空间即行宽为K,该目标行中已经填入的数据包的总长度为p.bytes,则该目标行的剩余可用空间key1=K-p.bytes。该目标行是编码矩阵中的任意一行。
发送端设备还会获取该矩阵中所有行的剩余可用空间,并将所有的剩余可用空间按照大小进行排序并生成一个有序数组segments,该有序数组中的每个元素分别指示编码矩阵中的对应的每一行的可用空间的大小。发送端设备可以依据这些行的剩余可用空间的大小填入接收到的数据包。
503.发送端设备接收原始数据包并填入编码矩阵中。
如图7所示,发送端设备接收原始数据包,并且将该原始数据包通过复制拷贝生成相应地拷贝原始数据包,然后发送端设备将该原始数据包的拷贝原始数据包填入编码矩阵的合适的位置中。
具体地,发送端设备在获取到原始数据包之后,将编码矩阵中的目标行的剩余可用空间与原始数据包的大小进行对比,若该原始数据包的大小小于目标行的可用空间的大小,则发送端设备就将该原始数据包填入目标行中;若该原始数据包的大小大于目标行的可用空间的大小,即目标行的可用空间不足以将该原始数据包完整地填入该目标行中,则发送 端设备就将该原始数据包填入编码矩阵中目标行以外的行的可用空间中。
例如图7所示,发送端设备接收到原始数据包MP1后,确定数据包MP1小于编码矩阵第一行可用空间的长度,就将该数据包MP1填入第一行中;在接收到原始数据包MP2和MP3后,在确定编码矩阵第一行可用空间的长度小于原始数据包MP2和MP3,再去判断第二行,在确定第二行的可用空间的长度大于后原始数据包MP2和MP3后,就将原始数据包MP2和MP3填入第二行;在接收到原始数据包MP4之后,发送端设备确定编码矩阵第二行的剩余可用空间小于原始数据包MP4,且第三行的剩余可用空间大于原始数据包MP4,则将原始数据包MP4填入第三行,原始数据包MP5、MP6、MP7、MP8、和MP9按照此方法依次填入编码矩阵。
本申请实施例中,发送端设备将目标数据包填入编码矩阵中时,可以将该目标数据包乘以预设的编码系数后再填入编码矩阵中,也可以不乘以编码系数,具体此处不做限定。
504.发送端设备生成第一数据包并发送。
如图8所示,发送端设备根据原始数据包以及拷贝的原始数据包的在编码矩阵中的坐标信息确定第一数据包。发送端设备将该原始数据包所对应的坐标信息添加到该数据包的包头中;然后发送端设备将该带有坐标信息的数据包发送给相应的信号接收设备。
具体地,如图9所示,该第一数据包中的包头部分包括原包头和扩展包头,在原包头中的flag field可以指示该数据包为原始数据包还是修复包,即可以根据该原包头确定该数据包中是否包括扩展包头,即该数据包中是否包含有该数据包的坐标。在QUIC协议中,该扩展包头中包括FEC FPI即Payload ID,EC FPI指示该目标数据包的编码分组以及在该分组中的次序;该扩展包头中还包括该数据包的坐标信息coordinate,由于解码的复杂度、延迟和窗口大小等因素的限制,一个编码分组的大小通常在10至20之间,一般不超过50,因此对应的编码矩阵最多有50行,由于数据包最大为1280,因此每行的大小最大为1280,所以坐标信息coordinate最大为16 bits。
505.发送端设备根据原始数据包和坐标信息生成修复包。
发送端设备根据原始数据包和对应的坐标信息生成修复包,该修复包即冗余包可用于修复对应的数据包。
具体地,如图10所示,发送端设备在编码矩阵之中足够一个编码分组的数据包之后,发送端设备将编码矩阵中每一行乘以对应的编码系数,从而生成针对对应的每一行的修复信息,即该数据包可以用于修复对应的行的所有数据包;然后发送端设备根据编码矩阵每一行的数据包的个数生成对应的信息并填入修复数据包的包头中。
若编码矩阵中不填入任何数据,只预设每一行的长度为一个相同的固定值,发送端设备接收到原始数据包后就直接填入编码矩阵,则在发送端设备将目标数据包发送给接收端设备之后,在发送端设备根据原始数据包以及原始数据包的坐标信息确定修复包之前,若编码矩阵中的任意一行中的可用空间都小于最小的数据包,则触发发送端设备将编码矩阵中的所有行的可用空间填入补零包,补零包为内部数据全是零的数据包。
506.发送端设备向接收端设备发送修复包。
发送端设备向接收端设备发送修复包,以使得接收端设备可以根据该数据包检查是否 有数据包丢失,并根据该修复包对丢失的数据包进行修复。
本申请实施例中,原始数据包的坐标信息可以包含在目标数据包中单独发送给接收端设备,除此之外,发送端设备也可以将属于一个编码分组即同一个编码矩阵的原始数据包的坐标信息添加到修复包中统一发送给接收端设备,下面具体进行说明:
二、发送端设备将属于一个编码分组即同一个编码矩阵的原始数据包的坐标信息添加到修复包中统一发送给接收端设备。
请参阅图11,本申请实施例中的编码方法的一个流程包括:
1101.发送端设备接收多个原始数据包。
如图12所示,发送端设备接收多个原始数据包,并且将该原始数据包通过复制拷贝生成相应地拷贝原始数据包,并将接收到的多个拷贝原始数据包按照大小排序,该原始数据包的拷贝原始数据包用于填入编码矩阵的合适的位置中。
1102.发送端设备获取编码矩阵。
若发送端设备接收到的多个原始数据包的数量总和满足预设条件,则触发该发送端设备根据多个原始数据包获取编码矩阵。
具体地,若发送端设备确定接收到的多个原始数据包的数量满足预设的条件,例如大于预设的数量M个,则该发送端设备确定上述多个数据包中最大的即最长的一个数据包的长度为编码矩阵中每行的长度;然后发送端设备根据多个原始数据包的数量总和以及编码矩阵中每行的长度确定编码矩阵。
该编码矩阵中包括目标行,该编码矩阵中的每一行的长度为多个数据包中最大的即最长的一个数据包的长度,该编码矩阵中的每一行都可以填入数据包,即可用于确定该数据包在该编码矩阵中的坐标信息。该目标行可以是编码矩阵中的任意一行。
本申请实施例中,发送端设备获取的这个编码矩阵中,编码矩阵的每一行中可以填满预先设定的数据,例如将编码矩阵中全部填入数据零,即编码矩阵中填入的数据全部都是零,后面在发送端设备接收到原始数据包时,就用原始数据包覆盖掉对应位置的预先设定的数据;除此之外,编码矩阵中也可以不填入任何数据,只预设每一行的长度为一个相同的固定值,发送端设备接收到原始数据包后就直接填入编码矩阵,具体此处不做限定。
1103.发送端设备将目标数据包填入编码矩阵中。
发送端设备获取编码矩阵中目标行的剩余空间,然后发送端设备将多个按照大小排序的数据包填入编码矩阵的目标行中,目标行是编码矩阵中的任意一行。
具体地,发送端设备先获取编码矩阵中的目标行的剩余可用空间,该目标行的剩余可用空间是指该目标行中剩余的还可以用于填入数据包的空间。例如该目标行总的可用空间即行宽为K,该目标行中已经填入的数据包的总长度为p.bytes,则该目标行的剩余可用空间key1=K-p.bytes。该目标行是编码矩阵中的任意一行。
发送端设备还会获取该矩阵中所有行的剩余可用空间,并将所有的剩余可用空间按照大小进行排序并生成一个有序数组segments,该有序数组中的每个元素分别指示编码矩阵中的对应的每一行的可用空间的大小。发送端设备可以依据这些行的剩余可用空间的大小填入接收到的数据包。
若目标数据包的大小大于预设值,例如改预设值可以为多个数据包中最大的即最长的一个数据包的长度的一半,则发送端设备将目标数据包填入编码矩阵中一个空白行中;若目标数据包的大小小于预设值,则发送端设备将目标数据包填入编码矩阵中的一个非空白行中,目标数据包为多个原始数据包中的任意一个,空白行是编码矩阵中未填入数据包的行,非空白行是编码矩阵中已填入数据包的行。若目标行为非空白行,则发送端设备先获取目标行的可用空间,若目标数据包小于可用空间,则将目标数据包填入可用空间中,若目标数据包大于可用空间,则将原始数据包填入编码矩阵中目标行以外的行的可用空间中。
本申请实施例中,发送端设备将目标数据包填入编码矩阵中时,可以将该目标数据包乘以预设的编码系数后再填入编码矩阵中,也可以不乘以编码系数,具体此处不做限定。
1104.发送端设备生成修复包。
发送端设备根据原始数据包以及原始数据包在编码矩阵中的坐标信息确定修复包,修复包中包括多个原始数据包的坐标信息,修复包可用于修复原始数据包。
具体地,发送端设备在编码矩阵之中足够一个编码分组的数据包之后,发送端设备将编码矩阵中每一行乘以对应的编码系数,从而生成针对对应的每一行的修复信息;然后发送端设备根据编码矩阵每一行的数据包的个数生成对应的信息并填入修复数据包的包头中。
若编码矩阵中不填入任何数据,只预设每一行的长度为一个相同的固定值,发送端设备接收到原始数据包后就直接填入编码矩阵,则在发送端设备将目标数据包发送给接收端设备之后,在发送端设备根据原始数据包以及原始数据包的坐标信息确定修复包之前,若编码矩阵中的任意一行中的可用空间都小于最小的数据包,则触发发送端设备将编码矩阵中的所有行的可用空间填入补零包,补零包为内部数据全是零的数据包。
1105.发送端设备向接收端设备发送修复包。
发送端设备向接收端设备发送修复包,以使得接收端设备可以根据该数据包检查是否有数据包丢失,并根据该修复包对丢失的数据包进行修复。
基于上述包交换网络,下面对本申请实施例中的解码方法进行描述:
本申请实施例中,原始数据包的坐标信息可以包含在目标数据包中单独发送给接收端设备,也可以将属于一个编码分组即同一个编码矩阵的原始数据包的坐标信息添加到修复包中统一发送给接收端设备,下面分别进行说明:
一、原始数据包的坐标信息可以包含在目标数据包中单独发送给接收端设备。
请参阅图13,本申请实施例中的解码方法的一个流程包括:
1301.接收端设备接收第一数据包。
接收端设备接收第一数据包,第一数据包中包含第一数据包在编码矩阵中对应的坐标信息。
具体地,接收端设备接收到第一数据包后,将第一数据包的复制文件留下,该第一数据包的原始数据包向上层转交,该第一数据包的复制文件用于填入编码矩阵。
1302.接收端设备将第一数据包填入编码矩阵。
接收端设备根据坐标信息将第一数据包填入编码矩阵。
具体地,该接收端设备根据第一数据包的包头确认该数据包所对应的编码分组,然后根据该数据包的坐标信息将其填入该编码分组所对应的编码矩阵中的对应位置。例如接收端设备可以根据该第一数据包的包头中的FEC_FPI确定该数据包所对应的编码分组为第一编码分组,则将该第一数据包分给第一编码分组对应的编码矩阵去存储。然后再根据该第一数据包的包头中的coordinate确定该数据包在第一编码分组对应的编码矩阵中的坐标位置,例如对应的列信息col可以为col=mod(coordinate,K);对应的行信息row可以为row=|coordinate/K|;该K为编码矩阵的行的长度,然后根据该行信息row确定该数据包的编码系数,接收端设备将该数据包乘以该编码系数后填入编码矩阵中对应的位置,同时记录每一行中以及填入的数据包的个数。
1303.接收端设备接收修复包。
接收端设备接收修复包,修复包可用于修述原始数据包。
1304.接收端设备根据修复包修复丢失的数据包。
若接收端设备根据修复包确认编码矩阵中存在丢失的数据包,则接收端设备根据修复包修复丢失的数据包。
请参阅图14,具体地,当接收端设备接收到该修复包后,接收端设备根据修复包中记录的每行所对应的数据包的个数与编码矩阵中实际填入的数据包的个数进行对比,若编码矩阵中实际填入的数据包的个数小于修复包中记录的每行所对应的数据包的个数,则确定该行缺失行,例如图14中的Row2和Row3,则接收端设备根据修复包对该缺失行整行进行修复。当所有行的数据完整后,就将所有的数据包按次序从编码矩阵中提取出来。
本申请实施例中,原始数据包的坐标信息可以包含在目标数据包中单独发送给接收端设备,除此之外,发送端设备也可以将属于一个编码分组即同一个编码矩阵的原始数据包的坐标信息添加到修复包中统一发送给接收端设备,下面具体进行说明:
二、发送端设备将属于一个编码分组即同一个编码矩阵的原始数据包的坐标信息添加到修复包中统一发送给接收端设备。
请参阅图15,本申请实施例中的解码方法的一个流程包括:
1501.接收端设备接收多个原始数据包和修复包。
接收端设备接收多个原始数据包和修复包,修复包可用于修复原始数据包,修复包中包含多个原始数据包在编码矩阵中对应的坐标信息;
1502.接收端设备将多个原始数据包填入编码矩阵。
接收端设备根据坐标信息将多个原始数据包填入编码矩阵。
具体地,该接收端设备根据原始数据包的包头确认该数据包所对应的编码分组,然后根据该数据包的坐标信息将其填入该编码分组所对应的编码矩阵中的对应位置。例如接收端设备可以根据该原始数据包的包头中的FEC_FPI确定该数据包所对应的编码分组为第一编码分组,则将该原始数据包分给第一编码分组对应的编码矩阵去存储。然后再根据该修复包中的coordinate确定该数据包在第一编码分组对应的编码矩阵中的坐标位置,例如对应的列信息col可以为col=mod(coordinate,K);对应的行信息row可以为 row=|coordinate/K|;该K为编码矩阵的行的长度,然后根据该行信息row确定该数据包的编码系数,接收端设备将该数据包乘以该编码系数后填入编码矩阵中对应的位置,同时记录每一行中以及填入的数据包的个数。
1503.接收端设备根据修复包修复丢失的数据包。
若接收端设备根据修复包确认编码矩阵中存在丢失的数据包,则接收端设备根据修复包修复丢失的数据包。
具体地,当接收端设备接收到该修复包后,接收端设备根据修复包中记录的每行所对应的数据包的个数与编码矩阵中实际填入的数据包的个数进行对比,若编码矩阵中实际填入的数据包的个数小于修复包中记录的每行所对应的数据包的个数,则确定该行缺失行,则根据修复包修复该缺失行。当所有行的数据完整后,就将所有的数据包按次序从编码矩阵中提取出来。
本申请实施例中,发送端设备并不根据数据包的次序来将数据包填入编码矩阵,而是根据原始数据包的大小将其填入编码矩阵中的目标行的可用空间中,从而使得数据包可以填入编码矩阵中最优的位置,以使得编码矩阵中的每一行的数据包都是完整的,且编码矩阵中可以填入尽可能多的原始数据包,使得编码矩阵中的补零尽可能的少,由于修复包是针对编码矩阵中的每一行生成的,因此每一行中的补零数据越少,原始数据包越多,修复数据包的修复效率就越高,修复能力就越强。达到最小化补零,最大修复效率。因此本申请实施例中的修复包的效率更高,具有更强的修复能力。如图16所示,本申请实施例的方案(即线条3)在相同的编码分组大小和修复包(即冗余包)数目相同的情况下,本申请实施例的方案可以极大的降低丢包率,且降低丢失数据的量。
下面对本申请实施例中的发送端设备进行描述,请参阅图17,本申请实施例提供的一种发送端设备1700,该发送端设备1700可以为上述图5中发送端设备,该发送端设备1700包括:
第一获取模块1701,用于获取编码矩阵,编码矩阵包括目标行;具体实现方式,请参考图5所示实施例中步骤501:发送端设备获取编码矩阵,这里不再赘述。
第二获取模块1702,用于获取目标行的可用空间;具体实现方式,请参考图5所示实施例中步骤502:发送端设备获取可用空间,这里不再赘述。
接收模块1703,用于接收原始数据包;具体实现方式,请参考图5所示实施例中步骤503:发送端设备接收原始数据包并填入编码矩阵中,这里不再赘述。
填入模块1704,用于若原始数据包小于可用空间,则发送端设备将原始数据包填入目标行的可用空间中,若原始数据包大于可用空间,则发送端设备将原始数据包填入编码矩阵中目标行以外的行的可用空间中;如图18所示,该填入模块可以是一种发送端包排列和冗余包生成器,该发送端包排列和冗余包生成器可以通过内部的坐标计算器计算出原始数据包所对应的坐标信息,该过程可由对应的控制器控制。具体实现方式,请参考图5所示实施例中步骤503:发送端设备接收原始数据包并填入编码矩阵中,这里不再赘述。
确定模块1705,用于根据原始数据包以及原始数据包的坐标信息确定修复包,修复包可用于修复原始数据包;如图18所示,该确定模块可以是一种发送端包排列和冗余包生 成器,该发送端包排列和冗余包生成器可以通过内部的控制器根据原始数据包和编码系数确定修复包。具体实现方式,请参考图5所示实施例中步骤505:发送端设备根据原始数据包和坐标信息生成修复包,这里不再赘述。
第一发送模块1706,用于向接收端设备发送修复包。具体实现方式,请参考图5所示实施例中步骤506:向接收端设备发送修复包,这里不再赘述。
一种可能的实现方式中,该发送端设备还包括:
生成模块1707,用于根据原始数据包以及原始数据包在编码矩阵中的坐标信息生成第一数据包,第一数据包中包含坐标信息;具体实现方式,请参考图5所示实施例中步骤504:发送端设备生成第一数据包并发送,这里不再赘述。
第二发送模块1708,用于将第一数据包发送给接收端设备。具体实现方式,请参考图5所示实施例中步骤504:发送端设备生成第一数据包并发送,这里不再赘述。
本实施例中,发送端设备可以执行前述图5中任一项所示实施例中发送端设备所执行的操作,具体此处不再赘述。
下面对本申请实施例中的发送端设备进行描述,请参阅图19,本申请实施例提供的一种发送端设备1900,该发送端设备1900可以为上述图11中发送端设备,该发送端设备1900包括:
接收模块1901,用于接收多个原始数据包;具体实现方式,请参考图11所示实施例中步骤1101:发送端设备接收多个原始数据包,这里不再赘述。
获取模块1902,用于若多个原始数据包的数量总和满足预设条件,则触发发送端设备根据多个原始数据包获取编码矩阵;具体实现方式,请参考图11所示实施例中步骤1102:发送端设备获取编码矩阵,这里不再赘述。
具体地,该获取模块1902包括:
第一确定单元1903,用于确定多个数据包中最大的一个数据包的长度为编码矩阵中每行的长度;具体实现方式,请参考图11所示实施例中步骤1102:发送端设备获取编码矩阵,这里不再赘述。
第二确定单元1904,用于根据多个原始数据包的大小总和以及编码矩阵中每行的长度确定编码矩阵。具体实现方式,请参考图11所示实施例中步骤1102:发送端设备获取编码矩阵,这里不再赘述。
填入模块1905,用于若目标数据包的大小大于预设值,则发送端设备将目标数据包填入编码矩阵中一个空白行中;若目标数据包的大小小于预设值,则发送端设备将目标数据包填入编码矩阵中的一个非空白行中,目标数据包为多个原始数据包中的任意一个,空白行为编码矩阵中未填入数据包的行,非空白行为编码矩阵中已填入数据包的行;如图20所示,该填入模块可以是一种发送端包排列和冗余包生成器,该发送端包排列和冗余包生成器可以通过内部的坐标计算器计算出原始数据包所对应的坐标信息,该过程可由对应的控制器控制。具体实现方式,请参考图11所示实施例中步骤1102:发送端设备将目标数据包填入编码矩阵中,这里不再赘述。
具体地,该填入模块1905包括:
获取单元1906,用于获取目标行的可用空间;具体实现方式,请参考图11所示实施例中步骤1102:发送端设备将目标数据包填入编码矩阵中,这里不再赘述。
填入单元1907,用于若目标数据包小于可用空间,则将目标数据包填入可用空间中,若目标数据包大于可用空间,则将原始数据包填入编码矩阵中目标行以外的行的可用空间中。具体实现方式,请参考图11所示实施例中步骤1102:发送端设备将目标数据包填入编码矩阵中,这里不再赘述。
确定模块1908,用于根据原始数据包以及原始数据包在编码矩阵中的坐标信息确定修复包,修复包可用于修复原始数据包;如图20所示,该确定模块可以是一种发送端包排列和冗余包生成器,该发送端包排列和冗余包生成器可以通过内部的控制器根据原始数据包和编码系数确定修复包。具体实现方式,请参考图11所示实施例中步骤1104:发送端设备生成修复包,这里不再赘述。
发送模块1909,用于向接收端设备发送修复包。具体实现方式,请参考图11所示实施例中步骤1105:发送端设备向接收端设备发送修复包,这里不再赘述。
本实施例中,发送端设备可以执行前述图11中任一项所示实施例中发送端设备所执行的操作,具体此处不再赘述。
下面对本申请实施例中的接收端设备进行描述,请参阅图21,本申请实施例提供的一种接收端设备2100,该接收端设备2100可以为上述图13中接收端设备,该接收端设备2100包括:
第一接收模块2101,用于接收第一数据包,第一数据包中包含第一数据包在编码矩阵中对应的坐标信息;具体实现方式,请参考图13所示实施例中步骤1301:接收第一数据包,这里不再赘述。
填入模块2102,用于根据坐标信息将第一数据包填入编码矩阵;如图22所示,该填入模块可以是一种接收端包排列逐行修复器,该接收端包排列逐行修复器可以通过内部的排列器确定出原始数据包所对应的坐标信息,该过程可由对应的控制器控制。具体实现方式,请参考图13所示实施例中步骤1302:接收端设备将第一数据包填入编码矩阵,这里不再赘述。
第二接收模块2103,用于接收修复包,修复包可用于修复原始数据包;具体实现方式,请参考图13所示实施例中步骤1303:接收端设备接收数据包,这里不再赘述。
修复模块2104,用于若接收端设备根据修复包确认编码矩阵中存在丢失的数据包,则接收端设备根据修复包修复丢失的数据包。如图22所示,该填入模块可以是一种接收端包排列逐行修复器,该接收端包排列逐行修复器可以根据冗余包即修复包对丢失数据包的行进行解码修复,该过程可由对应的控制器控制。具体实现方式,请参考图13所示实施例中步骤1304:根据修复包修复丢失的数据包,这里不再赘述。
本实施例中,接收端设备可以执行前述图13中任一项所示实施例中接收端设备所执行的操作,具体此处不再赘述。
下面对本申请实施例中的接收端设备进行描述,请参阅图23,本申请实施例提供的一种接收端设备2300,该接收端设备2300可以为上述图15中接收端设备,该接收端设备 2300包括:
接收模块2301,用于接收多个原始数据包和修复包,修复包可用于修复原始数据包,修复包中包含多个原始数据包在编码矩阵中对应的坐标信息;具体实现方式,请参考图15所示实施例中步骤1501:接收端设备接收多个原始数据包和修复包,这里不再赘述。
填入模块2302,用于根据坐标信息将多个原始数据包填入编码矩阵;如图24所示,该填入模块可以是一种接收端包排列逐行修复器,该接收端包排列逐行修复器可以通过内部的排列器确定出原始数据包所对应的坐标信息,该过程可由对应的控制器控制。具体实现方式,请参考图15所示实施例中步骤1502:接收端设备将多个原始数据包填入编码矩阵,这里不再赘述。
修复模块2303,用于若接收端设备根据修复包确认编码矩阵中存在丢失的数据包,则接收端设备根据修复包修复丢失的数据包。如图24所示,该填入模块可以是一种接收端包排列逐行修复器,该接收端包排列逐行修复器可以根据冗余包即修复包对丢失数据包的行进行解码修复,该过程可由对应的控制器控制。具体实现方式,请参考图15所示实施例中步骤1503:接收端设备根据修复包修复丢失的数据包,这里不再赘述。
本实施例中,接收端设备可以执行前述图15中任一项所示实施例中接收端设备所执行的操作,具体此处不再赘述。
图25是本申请实施例提供的一种发送端设备结构示意图,该发送端设备2500可以包括一个或一个以上中央处理器(central processing units,CPU)2501和存储器2505,该存储器2505中存储有一个或一个以上的应用程序或数据。
其中,存储器2505可以是易失性存储或持久存储。存储在存储器2505的程序可以包括一个或一个以上模块,每个模块可以包括对发送端设备中的一系列指令操作。更进一步地,中央处理器2501可以设置为与存储器2505通信,在发送端设备2500上执行存储器2505中的一系列指令操作。
其中,中央处理器2501用于执行存储器2505中的计算机程序,以使得发送端设备2500用于执行:发送端设备获取编码矩阵,编码矩阵包括目标行;发送端设备获取目标行的可用空间;发送端设备接收原始数据包,若原始数据包小于可用空间,则发送端设备将原始数据包填入目标行的可用空间中,若原始数据包大于可用空间,则发送端设备将原始数据包填入编码矩阵中目标行以外的行的可用空间中;发送端设备根据原始数据包以及原始数据包的坐标信息确定修复包,修复包用于修复原始数据包;发送端设备向接收端设备发送修复包;或发送端设备接收多个原始数据包;若多个原始数据包的数量总和满足预设条件,则触发发送端设备根据多个原始数据包获取编码矩阵;若目标数据包的大小大于预设值,则发送端设备将目标数据包填入编码矩阵中一个空白行中;若目标数据包的大小小于预设值,则发送端设备将目标数据包填入编码矩阵中的一个非空白行中,目标数据包为多个原始数据包中的任意一个,空白行为编码矩阵中未填入数据包的行,非空白行为编码矩阵中已填入数据包的行;发送端设备根据原始数据包以及原始数据包在编码矩阵中的坐标信息确定修复包,修复包可用于修复原始数据包;发送端设备向接收端设备发送修复包。具体实现方式,请参考图5所示实施例中步骤501-506或图11所示步骤1101-1104, 此处不再赘述。
发送端设备2500还可以包括一个或一个以上电源2502,一个或一个以上有线或无线网络接口2503,一个或一个以上输入输出接口2504,和/或,一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等。
该发送端设备2500可以执行前述图5或图11所示实施例中发送端设备所执行的操作,具体此处不再赘述。
图26是本申请实施例提供的一种接收端设备结构示意图,该接收端设备2600可以包括一个或一个以上中央处理器(central processing units,CPU)2601和存储器2605,该存储器2605中存储有一个或一个以上的应用程序或数据。
其中,存储器2605可以是易失性存储或持久存储。存储在存储器2605的程序可以包括一个或一个以上模块,每个模块可以包括对接收端设备中的一系列指令操作。更进一步地,中央处理器2601可以设置为与存储器2605通信,在接收端设备2600上执行存储器2605中的一系列指令操作。
其中,中央处理器2601用于执行存储器2605中的计算机程序,以使得接收端设备2600用于执行:接收端设备接收第一数据包,第一数据包中包含第一数据包在编码矩阵中对应的坐标信息;接收端设备根据坐标信息将第一数据包填入编码矩阵;接收端设备接收修复包,修复包可用于修复原始数据包;若接收端设备根据修复包确认编码矩阵中存在丢失的数据包,则接收端设备根据修复包修复丢失的数据包;或接收端设备接收多个原始数据包和修复包,修复包可用于修复原始数据包,修复包中包含多个原始数据包在编码矩阵中对应的坐标信息;接收端设备根据坐标信息将多个原始数据包填入编码矩阵;若接收端设备根据修复包确认编码矩阵中存在丢失的数据包,则接收端设备根据修复包修复丢失的数据包。
具体实现方式,请参考图13所示实施例中步骤1301-1304或图15所示步骤1501-1503,此处不再赘述。
接收端设备2600还可以包括一个或一个以上电源2602,一个或一个以上有线或无线网络接口2603,一个或一个以上输入输出接口2604,和/或,一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等。
该接收端设备2600可以执行前述图13或图15所示实施例中接收端设备所执行的操作,具体此处不再赘述。
图27是本申请实施例提供的一种包交换网络设备2700,该包交换网络设备2700可以包括如图所示的发送端设备2701和如图所示的接收端设备2702。该发送端设备可以执行前述图5或图11所示实施例中发送端设备所执行的操作,具体此处不再赘述。该接收端设备可以执行前述图13或图15所示实施例中接收端设备所执行的操作,具体此处不再赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通 过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-only memory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。

Claims (24)

  1. 一种编码方法,其特征在于,所述方法包括:
    发送端设备获取编码矩阵,所述编码矩阵包括目标行;
    所述发送端设备获取所述目标行的可用空间;
    所述发送端设备接收原始数据包,若所述原始数据包小于所述可用空间,则所述发送端设备将所述原始数据包填入所述目标行的可用空间中,若所述原始数据包大于所述可用空间,则所述发送端设备将所述原始数据包填入所述编码矩阵中目标行以外的行的可用空间中;
    所述发送端设备根据所述原始数据包以及所述原始数据包的坐标信息确定修复包,所述修复包用于修复所述原始数据包;
    所述发送端设备向所述接收端设备发送所述修复包。
  2. 根据权利要求1所述的方法,其特征在于,在所述发送端设备根据所述原始数据包以及所述原始数据包的坐标信息确定修复包之前,所述方法还包括:
    所述发送端设备根据所述原始数据包以及所述原始数据包在所述编码矩阵中的坐标信息生成第一数据包,所述第一数据包中包含所述坐标信息;
    所述发送端设备将所述第一数据包发送给接收端设备。
  3. 根据权利要求1所述的方法,其特征在于,所述发送端设备获取所述目标行的可用空间包括:
    所述发送端设备根据所述编码矩阵中所有行的可用空间生成有序数组;
    所述发送端设备在所述有序数组中确定所述目标行的可用空间。
  4. 一种编码方法,其特征在于,所述方法包括:
    发送端设备接收多个原始数据包;
    若所述多个原始数据包的数量总和满足预设条件,则触发所述发送端设备根据所述多个原始数据包获取编码矩阵;
    若所述目标数据包的大小大于预设值,则所述发送端设备将所述目标数据包填入所述编码矩阵中一个空白行中;若所述目标数据包的大小小于预设值,则所述发送端设备将所述目标数据包填入所述编码矩阵中的一个非空白行中,所述目标数据包为所述多个原始数据包中的任意一个,所述空白行为所述编码矩阵中未填入数据包的行,所述非空白行为所述编码矩阵中已填入数据包的行;
    所述发送端设备根据所述原始数据包以及所述原始数据包在所述编码矩阵中的坐标信息确定修复包,所述修复包可用于修复所述原始数据包;
    所述发送端设备向所述接收端设备发送所述修复包。
  5. 根据权利要求4所述的方法,其特征在于,所述发送端设备根据所述多个原始数据包获取编码矩阵,包括:
    所述发送端设备确定所述多个数据包中最大的一个数据包的长度为所述编码矩阵中每行的长度;
    所述发送端设备根据所述多个原始数据包的大小总和以及所述编码矩阵中每行的长度 确定所述编码矩阵。
  6. 根据权利要求4所述的方法,其特征在于,所述编码矩阵包括目标行,所述发送端设备将所述目标数据包填入所述编码矩阵中的一个非空白行中,包括:
    所述发送端设备获取所述目标行的可用空间;
    若所述目标数据包小于所述可用空间,则将所述目标数据包填入所述可用空间中,若所述目标数据包大于所述可用空间,则将所述原始数据包填入所述编码矩阵中目标行以外的行的可用空间中。
  7. 根据权利要求4至6任一项所述的方法,其特征在于,所述修复包中包括所述多个原始数据包的坐标信息。
  8. 一种编码方法,其特征在于,所述方法包括:
    发送端设备获取编码矩阵,所述编码矩阵包括目标行;
    所述发送端设备接收原始数据包;
    所述发送端设备将所述原始数据包填入所述目标行中,所述目标行中包括至少两个数据包和补零包,所述补零包为数据都为零的数据包,所述补零包用于将目标行中的数据包补偿至预设长度;
    所述发送端设备根据所述原始数据包以及所述原始数据包在所述编码矩阵中的坐标信息确定修复包,所述修复包可用于修复所述原始数据包;
    所述发送端设备向所述接收端设备发送所述修复包。
  9. 一种解码方法,其特征在于,所述方法包括:
    接收端设备接收第一数据包,所述第一数据包中包含所述第一数据包在编码矩阵中对应的坐标信息;
    所述接收端设备根据所述坐标信息将所述第一数据包填入所述编码矩阵;
    所述接收端设备接收修复包,所述修复包可用于修复所述原始数据包;
    若所述接收端设备根据所述修复包确认所述编码矩阵中存在丢失的数据包,则所述接收端设备根据所述修复包修复所述丢失的数据包。
  10. 一种解码方法,其特征在于,所述方法包括:
    接收端设备接收多个原始数据包和修复包,所述修复包可用于修复所述原始数据包,所述修复包中包含所述多个原始数据包在编码矩阵中对应的坐标信息;
    所述接收端设备根据所述坐标信息将所述多个原始数据包填入所述编码矩阵;
    若所述接收端设备根据所述修复包确认所述编码矩阵中存在丢失的数据包,则所述接收端设备根据所述修复包修复所述丢失的数据包。
  11. 一种发送端设备,其特征在于,所述发送端设备包括:
    第一获取模块,用于获取编码矩阵,所述编码矩阵包括目标行;
    第二获取模块,用于获取所述目标行的可用空间;
    接收模块,用于接收原始数据包;
    填入模块,用于若所述原始数据包小于所述可用空间,则所述发送端设备将所述原始数据包填入所述目标行的可用空间中,若所述原始数据包大于所述可用空间,则所述发送 端设备将所述原始数据包填入所述编码矩阵中目标行以外的行的可用空间中;
    确定模块,用于根据所述原始数据包以及所述原始数据包的坐标信息确定修复包,所述修复包可用于修复所述原始数据包;
    第一发送模块,用于向所述接收端设备发送所述修复包。
  12. 根据权利要求11所述的发送端设备,其特征在于,所述发送端设备还包括:
    生成模块,用于根据所述原始数据包以及所述原始数据包在所述编码矩阵中的坐标信息生成第一数据包,所述第一数据包中包含所述坐标信息;
    第二发送模块,用于将所述第一数据包发送给接收端设备。
  13. 一种发送端设备,其特征在于,所述发送端设备包括:
    接收模块,用于接收多个原始数据包;
    获取模块,用于若所述多个原始数据包的数量总和满足预设条件,则触发所述发送端设备根据所述多个原始数据包获取编码矩阵;
    填入模块,用于若所述目标数据包的大小大于预设值,则所述发送端设备将所述目标数据包填入所述编码矩阵中一个空白行中;若所述目标数据包的大小小于预设值,则所述发送端设备将所述目标数据包填入所述编码矩阵中的一个非空白行中,所述目标数据包为所述多个原始数据包中的任意一个,所述空白行为所述编码矩阵中未填入数据包的行,所述非空白行为所述编码矩阵中已填入数据包的行;
    确定模块,用于根据所述原始数据包以及所述原始数据包在所述编码矩阵中的坐标信息确定修复包,所述修复包可用于修复所述原始数据包;
    发送模块,用于向所述接收端设备发送所述修复包。
  14. 根据权利要求13所述的发送端设备,其特征在于,所述获取模块包括:
    第一确定单元,用于确定所述多个数据包中最大的一个数据包的长度为所述编码矩阵中每行的长度;
    第二确定单元,用于根据所述多个原始数据包的大小总和以及所述编码矩阵中每行的长度确定所述编码矩阵。
  15. 根据权利要求13所述的发送端设备,其特征在于,所述填入模块包括:
    获取单元,用于获取所述目标行的可用空间;
    填入单元,用于若所述目标数据包小于所述可用空间,则将所述目标数据包填入所述可用空间中,若所述目标数据包大于所述可用空间,则将所述原始数据包填入所述编码矩阵中目标行以外的行的可用空间中。
  16. 一种接收端设备,其特征在于,所述接收端设备包括:
    第一接收模块,用于接收第一数据包,所述第一数据包中包含所述第一数据包在编码矩阵中对应的坐标信息;
    填入模块,用于根据所述坐标信息将所述第一数据包填入所述编码矩阵;
    第二接收模块,用于接收修复包,所述修复包可用于修复所述原始数据包;
    修复模块,用于若所述接收端设备根据所述修复包确认所述编码矩阵中存在丢失的数据包,则根据所述修复包修复所述丢失的数据包。
  17. 一种接收端设备,其特征在于,所述接收端设备包括:
    接收模块,用于接收多个原始数据包和修复包,所述修复包可用于修复所述原始数据包,所述修复包中包含所述多个原始数据包在编码矩阵中对应的坐标信息;
    填入模块,用于根据所述坐标信息将所述多个原始数据包填入所述编码矩阵;
    修复模块,用于若所述接收端设备根据所述修复包确认所述编码矩阵中存在丢失的数据包,则根据所述修复包修复所述丢失的数据包。
  18. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-8任一项所述的方法。
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求9或10所述的方法。
  20. 一种发送端设备,其特征在于,包括处理器和存储有计算机程序的计算机可读存储介质;
    所述处理器与所述计算机可读存储介质耦合,所述计算机程序被所述处理器执行时实现如权利要求1-8任一项所述的方法。
  21. 一种接收端设备,其特征在于,包括处理器和存储有计算机程序的计算机可读存储介质;
    所述处理器与所述计算机可读存储介质耦合,所述计算机程序被所述处理器执行时实现如权利要求9或10所述的方法。
  22. 一种芯片系统,其特征在于,包括处理器,所述处理器被调用用于执行如权利要求1-8任一项所述的方法。
  23. 一种芯片系统,其特征在于,包括处理器,所述处理器被调用用于执行如权利要求9或10所述的方法。
  24. 一种无线通信系统,其特征在于,所述无线通信系统包括权利要求11至15任一项所述的发送端设备和权利要求16或17所述的接收端设备。
PCT/CN2022/088971 2021-04-29 2022-04-25 一种编码方法、一种解码方法、发送端设备以及接收端设备 WO2022228381A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110474464.6A CN115276885A (zh) 2021-04-29 2021-04-29 一种编码方法、一种解码方法、发送端设备以及接收端设备
CN202110474464.6 2021-04-29

Publications (1)

Publication Number Publication Date
WO2022228381A1 true WO2022228381A1 (zh) 2022-11-03

Family

ID=83745494

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/088971 WO2022228381A1 (zh) 2021-04-29 2022-04-25 一种编码方法、一种解码方法、发送端设备以及接收端设备

Country Status (2)

Country Link
CN (1) CN115276885A (zh)
WO (1) WO2022228381A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552661A (zh) * 2009-03-26 2009-10-07 吕晓雯 一种差错控制方法
CN103856287A (zh) * 2012-12-03 2014-06-11 电信科学技术研究院 一种无线通信数据包传输方法和设备
US20170117987A1 (en) * 2015-10-22 2017-04-27 Hongik University Industry-Academia Cooperation Foundation Data transmission system, encoding apparatus and encoding method
CN111935485A (zh) * 2020-08-10 2020-11-13 北京佳讯飞鸿电气股份有限公司 一种rs码前向纠错方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552661A (zh) * 2009-03-26 2009-10-07 吕晓雯 一种差错控制方法
CN103856287A (zh) * 2012-12-03 2014-06-11 电信科学技术研究院 一种无线通信数据包传输方法和设备
US20170117987A1 (en) * 2015-10-22 2017-04-27 Hongik University Industry-Academia Cooperation Foundation Data transmission system, encoding apparatus and encoding method
CN111935485A (zh) * 2020-08-10 2020-11-13 北京佳讯飞鸿电气股份有限公司 一种rs码前向纠错方法及装置

Also Published As

Publication number Publication date
CN115276885A (zh) 2022-11-01

Similar Documents

Publication Publication Date Title
US10848268B2 (en) Forward packet recovery with constrained network overhead
US10270468B2 (en) Method for file updating and version control for linear erasure coded and network coded storage
US6411223B1 (en) Generating high weight encoding symbols using a basis
KR101366332B1 (ko) 통신 시스템에서의 데이터 블록 재전송 방법
WO2021209037A1 (zh) 数据恢复方法及装置
WO2021139751A1 (zh) 数据处理方法、配置方法及通信设备
US10210044B2 (en) Storage controller, data processing chip, and data processing method
EP3474474B1 (en) Encoding method and device
JP5397179B2 (ja) データ符号化プログラム、データ復号化プログラムおよび方法
KR20110025740A (ko) 전송 에러를 복원하는 방법, 전송 에러를 복원하는 장치 및 투과성 프로토콜 계층 디코더
WO2015006947A1 (zh) 一种低码率的编码方法和设备
US20210288946A1 (en) Methods and apparatuses for oblivious transfer using trusted environment
KR101118194B1 (ko) 손실된 패킷 재건을 위한 방법 및 상기 방법을 수행하기 위한 디바이스
CN105740088A (zh) 闪存数据纠错方法及装置
JP2020511051A (ja) データ処理方法およびデバイス
WO2022228381A1 (zh) 一种编码方法、一种解码方法、发送端设备以及接收端设备
WO2019085634A1 (zh) 以太网中处理数据的方法、物理层芯片及存储介质
US20140064097A1 (en) Method for optimizing the resources of a data transmission at the level of the mac layer and device implementing the method
WO2019214265A1 (zh) 计算循环冗余校验crc编码的方法及装置
CN104471888A (zh) 突发数据块中的空闲块idle的处理方法、设备及系统
US20190230184A1 (en) Communication device and communication system
WO2018133415A1 (zh) 一种物理编码子层的数据编解码方法和装置、存储介质
WO2017041233A1 (zh) 一种功能修复再生码的编码和存储节点修复方法
WO2018210216A1 (zh) 传输数据的方法、芯片、收发机和计算机可读存储介质
CN103532666B (zh) 提高分布式传输中数据传输效率和lt码性能的方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22794851

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22794851

Country of ref document: EP

Kind code of ref document: A1