CN114884625A - Data packet error correction method and device and computer equipment - Google Patents

Data packet error correction method and device and computer equipment Download PDF

Info

Publication number
CN114884625A
CN114884625A CN202210801258.6A CN202210801258A CN114884625A CN 114884625 A CN114884625 A CN 114884625A CN 202210801258 A CN202210801258 A CN 202210801258A CN 114884625 A CN114884625 A CN 114884625A
Authority
CN
China
Prior art keywords
error correction
packet
information
packets
preset number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210801258.6A
Other languages
Chinese (zh)
Inventor
夏浩
张延�
闵伟
赵亚坤
施杰
沈国斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Koubei Network Technology Co Ltd
Original Assignee
Zhejiang Koubei Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Koubei Network Technology Co Ltd filed Critical Zhejiang Koubei Network Technology Co Ltd
Priority to CN202210801258.6A priority Critical patent/CN114884625A/en
Publication of CN114884625A publication Critical patent/CN114884625A/en
Pending legal-status Critical Current

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
    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1864ARQ related signaling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end

Abstract

The present specification provides a data packet error correction method, apparatus and computer device, which, firstly, through the setting of a first error correction packet, enables that when a first preset number of information packets are in error or have lost in the transmission process of the information packets, the error correction or recovery can be completed in time through the first error correction packet; even if errors or packet loss of the information packets easily occur in the UDP or wireless transmission process, the error correction or recovery can be completed through the first error correction area in the first error correction packet, and the first error correction packet is a data packet independent of the information packets, so that the effect of improving the transmission stability of the information packets for transmitting the original data is realized on one hand; on the other hand, the method of the present disclosure does not need to change the encoding or decoding process of the packet, and achieves the effect of maintaining the encoding or decoding speed of the packet because the packet is generated and the corresponding first error correction packet is generated at the same time, but the error correction encoding is not added to the packet.

Description

Data packet error correction method and device and computer equipment
Technical Field
The present disclosure relates to the field of data transmission technologies, and in particular, to a method and an apparatus for error correction of data packets, and a computer device.
Background
The network Protocol is a set of conventions and communication rules that must be followed by both parties of communication in terms of how to communicate, and the two parties of communication on the network can correctly communicate information only if they follow the same Protocol, and there are widely used TCP (transmission Control Protocol) and UDP (User datagram Protocol), where the UDP communication Protocol employs an unreliable connectionless transmission method, and therefore has a packet loss probability.
In the process of wireless transmission, due to the characteristic that wireless transmission is easily interfered, certain packet loss probability exists in wireless transmission, so that the problems of higher packet loss probability and unstable transmission exist in the process of wireless transmission by using a UDP protocol compared with wired transmission or TCP transmission.
Disclosure of Invention
To overcome the problems in the related art, the present specification provides a method, an apparatus, and a computer device for packet error correction.
According to a first aspect of the embodiments of the present specification, a data packet error correction method is provided, which is applied to a sending end; the method comprises the following steps:
acquiring data to be transmitted, and encoding the data to be transmitted; wherein, in the encoding process:
after a first preset number of information packets are generated each time, generating a first error correction packet based on the first preset number of information packets; the information packet is a data packet obtained by encoding data to be transmitted, and the first error correction packet is used for correcting errors of a first preset number of information packets;
the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in the first preset number; and each bit encoding information of the first error correction area is determined based on the bit encoding information of the same sequence of each information packet in the first preset number.
According to a second aspect of the embodiments of the present specification, there is provided a data packet error correction method, which is applied to a receiving end; the method comprises the following steps:
receiving a data packet sent by a sending end; the data packets comprise information packets and first error correction packets, the information packets are data packets obtained by encoding data to be transmitted by a transmitting end, and the first error correction packets are used for carrying out error correction on a first preset number of information packets; the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in the first preset number; the bit encoding information of each first error correction area is determined based on the bit encoding information of the same sequence of each information packet in the first preset number;
when the first error correction packet is received, whether the received information packet needs error correction is determined according to the indication of the first error correction packet.
According to a third aspect of the embodiments of the present specification, there is provided a data packet error correction apparatus, which is applied to a transmitting end; the device comprises:
an encoding module configured to start encoding to-be-transmitted data; the encoding module comprises a first generating module;
a first generation module configured to generate a first error correction packet based on a first preset number of packets every time the first preset number of packets are generated; the information packet is data obtained by encoding data to be transmitted, and the first error correction packet is used for correcting errors of a first preset number of information packets;
the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in the first preset number; and each bit encoding information of the first error correction area is determined based on the bit encoding information of the same sequence of each information packet in the first preset number.
According to a fourth aspect of the embodiments of the present specification, there is provided a data packet error correction apparatus, which is applied to a receiving end; the device comprises:
the receiving module is configured to receive a data packet sent by a sending end; the data packet comprises an information packet and a first error correction packet, wherein the information packet is obtained by encoding data to be transmitted by a transmitting end, and the first error correction packet is used for correcting errors of a first preset number of information packets; the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in the first preset number; the bit encoding information of each first error correction area is determined based on the bit encoding information of the same sequence of each information packet in the first preset number;
a determining module configured to determine, when the first error correction packet is received, whether the received information packet requires error correction according to an indication of the first error correction packet.
According to a fifth aspect of embodiments herein, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements a method as in the first or second aspect.
The technical scheme provided by the embodiment of the specification can have the following beneficial effects: firstly, through the setting of a first error correction packet, when a first preset number of information packets are in error or have lost in the transmission process of the information packets, the error correction or recovery can be completed through the first error correction packet in time; even if errors or packet loss of the information packets easily occur in the UDP or wireless transmission process, the error correction or recovery can be completed through the first error correction area in the first error correction packet, and the first error correction packet is a data packet independent of the information packets, so that the effect of improving the transmission stability of the information packets for transmitting the original data is realized on one hand;
on the other hand, the method of the present disclosure does not need to change the encoding or decoding process of the packet, and achieves the effect of maintaining the encoding or decoding speed of the packet because the packet is generated and the corresponding first error correction packet is generated at the same time, but the error correction encoding is not added to the packet.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1A is a flow chart illustrating a method of packet error correction according to an exemplary embodiment of the present description.
Fig. 1B is a flow chart illustrating a method of packet error correction according to another exemplary embodiment of the present description.
Fig. 2 is a diagram illustrating an application scenario of a method for packet error correction according to an exemplary embodiment.
Fig. 3 is a schematic diagram of a first error correction packet shown in this specification according to an example embodiment.
FIG. 4 is a schematic diagram of first identification hint information shown in the present specification according to an exemplary embodiment.
Fig. 5 is another schematic diagram of the first error correction packet shown in this specification according to an example embodiment.
FIG. 6 is a schematic diagram of a first quantity prompt shown in the present specification according to an exemplary embodiment.
Fig. 7 is a flow chart illustrating another method of packet error correction according to an exemplary embodiment of the present description.
FIG. 8 is a flow chart illustrating another method of packet error correction according to yet another exemplary embodiment of the present description.
FIG. 9 is a flow chart illustrating another method of packet error correction according to an exemplary embodiment of the present description.
Fig. 10A block diagram for an apparatus is shown in the present specification according to an exemplary embodiment.
Fig. 10B illustrates a block diagram for an apparatus in accordance with another exemplary embodiment.
FIG. 11 illustrates a block diagram for an apparatus in accordance with an exemplary embodiment.
FIG. 12 is a schematic diagram of a computer device structure shown in the present specification according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Various network communication protocols are often required in wireless network Transmission, wherein a TCP/IP (Transmission Control Protocol/Internet Protocol ) is currently used as a main stream, and a TCP/IP reference model is a network architecture used by ARPANET, and is divided into four layers: a network interface layer (also called a link layer), a network layer (also called an interconnection layer), a transmission layer and an application layer, wherein each layer calls a network provided by the next layer to fulfill the requirement; the transmission layer comprises two communication protocols of TCP and UDP, wherein TCP is a connection-oriented reliable process-to-process and is a reliable transmission layer protocol, and UDP is a connectionless transmission layer protocol which does not guarantee reliability; when TCP and UDP are used in wireless transmission, due to the nature of wireless communication, such as susceptibility to interference and poor stability, transmission errors tend to occur more easily than in wired transmission, such as packet loss, while the concept of wireless transmission did not exist or became popular at the time of TCP and UDP development, it was primarily targeted at wired transmission, therefore, the communication protocol is a solution that does not exist for the packet loss easily during wireless transmission, and stable connection is established through the three-way handshake step in the TCP transmission protocol, so that the stability of data packet transmission is ensured, the UPD transmission protocol is a connectionless transmission protocol without reliability guarantee, so the packet loss probability of the UPD is higher, the wireless transmission also increases the packet loss probability, so the packet loss probability is obviously higher when the wireless transmission is performed by using UDP than that of the wired transmission.
However, in the conventional technology, the solution of the problem of easy packet loss without transmission is realized by adding error correction coding, and the basic concept of the error correction coding includes: information code element-refers to the original information coding sent before error coding; the parity code element refers to a redundant code element which is added on the basis of the information code element after error coding; code word (group) -a coded combination of information symbols and parity symbols having a certain length; code set-a set of multiple codeword combinations formed after error encoding of different information symbols; code weight-weight of a codeword, i.e., the number of "1" codes in a codeword; code distance-the code element distance is the number (also called Hamming distance) of different code elements on the corresponding code bits in two code groups, and the code distance reflects the difference degree between the code groups; therefore, the error correction coding is a rule showing amount of coding attributes in the data packet, whether the code elements in the data packet are consistent with the record or not is judged by analyzing the code elements based on the error correction coding, and if the code elements are inconsistent with the record, the code elements in the data packet are correspondingly recovered based on the rule of the error correction coding, so that the effect of error correction is achieved.
The specific implementation process is as follows: when a sending end carries out coding, a plurality of redundant bytes are added at the last bit of a data packet, error correction coding is added in the redundant bytes, a plurality of byte bits are added at the tail end of the data packet which is finished by the original coding and used for storing and increasing the error correction coding, for example, one picture is transmitted, the picture is coded by the sending end to generate a 10-byte data packet, if the redundant bytes are increased, two bytes are added on the basis of 10 bytes and used for filling the corresponding error correction coding based on the logic of the error correction coding to form 12 direct data packets, then the data packets are encrypted and packaged and are sent to a receiving end through wireless transmission, the receiving end carries out decoding processing to obtain the coding and the error correction coding of image information, the decoding process can judge whether the coding corresponding to the image information has transmission errors based on the error correction coding, if the errors occur, the coding of the image information is corrected and recovered based on the rules of the error correction coding, and error correction is carried out in time, so that the problem of data packet errors in the transmission process is solved.
The conventional technical scheme has two problems: on one hand, since the error correction coding is written in the original data packet, when the data packet is lost, the error correction coding is also lost together, so the scheme of the traditional technology can not solve the problem of the data packet loss; on the other hand, redundant bytes need to be added to each original data packet to implement writing of error correction coding, that is, the length of each data packet is increased, complexity in the coding process is increased, a longer data packet needs to be decoded after the data packet is received at a receiving end, and each data packet needs to be checked based on the error correction coding to judge whether an error occurs, so that coding and decoding speeds are greatly reduced, and output transmission efficiency is also reduced.
The following provides a detailed description of examples of the present specification.
As shown in fig. 1A, fig. 1A is a flow chart illustrating a method for packet error correction according to an exemplary embodiment.
A data packet error correction method is applied to a sending end; the method comprises the following steps:
step S100: acquiring data to be transmitted, and encoding the data to be transmitted; wherein, in the encoding process:
step S110: after a first preset number of information packets are generated each time, generating a first error correction packet based on the first preset number of information packets; the information packet is a data packet obtained by encoding data to be transmitted, and the first error correction packet is used for correcting errors of a first preset number of information packets;
the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in the first preset number; and each bit encoding information of the first error correction area is determined based on the bit encoding information of the same sequence of each information packet in the first preset number.
Exemplarily, in combination with the above, when a connectionless and unreliability-guaranteed transmission protocol is used for transmission, for example, a UDP communication protocol is mainly applied in some scenes with high real-time requirements; for example: in the application of real-time communication, voice chat or video chat of chat software, a sender and a receiver need to interact in real time, and usually a long delay is not allowed, so that even if a UDP communication protocol with unstable transmission is adopted in the existing real-time communication, so that the situation that voice cannot be heard clearly or a picture drops due to packet loss occurs, a TCP communication protocol with stable transmission cannot be selected for use, because the TCP communication protocol is adopted, the receiver continuously waits for the sender to retransmit a data packet when packet loss occurs, so that the waiting time is too long, namely the situation that voice or picture delay occurs, and the use experience of a user is greatly reduced; or, in multicast or broadcast communication, such as a multimedia computer room in a school, a computer screen of a teacher needs to be shared with a student computer in a classroom, multimedia classroom server-side software is installed on the computer of the teacher, multimedia classroom client-side software is installed on the computer of the student, the computer of the teacher uses a multicast address or a broadcast address to send a message to the computer of the student, so that the computer of the student displays the computer screen content of the teacher, in such a situation, a picture is often required to be matched with the lecture content of the teacher, therefore, the computer screen of the teacher needs to be displayed on the computer of the student in real time, at this time, if TCP communication is used, a lost message needs to be waited for retransmission when transmission errors occur, because the content of the lecture of the teacher is not matched with the computer display content of the student due to too long waiting time, so under the above scenes with high real-time requirements, usually, a transmission protocol which is mainly UDP, has no connection and does not ensure reliability is used for transmission; however, the problem of pursuit of real-time performance is that transmission errors are easy to occur, and transmission errors of data packets, such as symbol errors or packet loss of the data packets, often occur.
In this embodiment, the above problem is solved by generating the first error correction packet in the information packet during the encoding process; in the data transmission process, a sending end encodes data to be sent, which is also a process of generating a data packet, for example, the sending end needs to send an image, one image may generate a plurality of data packets, each data packet is composed of a plurality of binary data 0 and 1, and the data packet obtained by encoding the data to be sent in this embodiment is called an information packet and is used for representing the data to be sent or data encrypted by some codes; the information packet generation is a continuous process, and after a first preset number of information packets are generated each time, a first error correction packet is generated, wherein the first error correction packet is a data packet generated based on a preamble first preset number of information packets, and a generation rule of the first error correction packet is generated based on an error correction coding rule, namely the first error correction packet includes error correction coding aiming at all the information packets in the first preset number, so that the first error correction packet plays a role in correcting errors of the first preset number of information packets; and after the first error correction packet is generated, continuously encoding the data to be transmitted to generate an information packet.
In this embodiment, the encoding information of the first error correction region may be used to correct errors or recover information packets within a first preset number; the coding information of the first error correction area is determined and generated based on the bit coding information of the same sequence of each information packet in the first preset number, so that the bit number of the first error correction area is the same as that of the information packet with the longest bit number in the first preset number, and when the information packet in the first preset number has an error, the corresponding error correction or recovery is carried out through the coding information of each bit in the first error correction area, so that the effect of carrying out overall protection on the information packets in the first preset number is realized; therefore, the method is different from the traditional method that the error correction coding information is arranged at the tail end of the data packet to be protected and is packed together with the original data packet, and the method does not need to add extra coding information in the information packet, plays a role in protecting the error correction of the information packet and simultaneously keeps the coding rate and the coding stability of the information packet; moreover, the first error correction packet of the present disclosure is generated after the first preset number of information packets are generated, that is, the corresponding first error correction packet is generated according to the preset position, so that the redundant information required by the first error correction packet is placed at the end of the first preset number of information packets that is protected by the redundant information. Therefore, the first error correction packet in the present disclosure has the following beneficial effects for the scheme of adding error correction packet coding at the end of the data packet to protect the stability of the data packet in the conventional technology: the first error correction packet is an independent data packet relative to the application packet, so that the first error correction packet can be added under the condition of not modifying the coding or decoding logic of the original application packet, and the effect of keeping the coding or decoding speed of the information packet is realized.
As shown in fig. 1B, fig. 1B is a flow chart illustrating a method for error correction of a data packet according to another exemplary embodiment.
In another embodiment, the method in the present disclosure further comprises:
step S120: generating a second error correction packet based on a second preset number of information packets after generating the second preset number of information packets each time; the second preset number is larger than the first preset number, and the second error correction packets are used for correcting errors of the information packets of the second preset number;
the second error correction packet comprises a second error correction area, and the bit number of the second error correction area is the same as the information packet with the longest bit number in the second preset number; and each bit encoding information of the second error correction area is determined based on the bit encoding information of the same sequence of each information packet in the second preset number.
In this embodiment, similar to the logic for generating the first error correction packet, after a second preset number of packets are generated each time, a second error correction packet is generated, where the second preset number is greater than the first preset number, that is, the second preset number of packets at least includes one first preset number of packets; the second error correction packet is generated based on a preamble of a second preset number of information packets, a second error correction area in the second error correction packet is similar to the logic of the first error correction area and is determined and generated based on bit encoding information in the same sequence of each information packet in the second preset number, so that the bit number of the second error correction area is the same as that of the information packet with the longest bit number in the second preset number, and when an error occurs in an information packet in the second preset number, corresponding error correction or recovery is performed through the encoding information of each bit in the second error correction area, so that the effect of performing overall protection on the encoding information of each bit number in the information packets in the first preset number is realized; the redundant information required by the error correction packet is arranged at the end of the information packet which protects the second preset number of information packets, namely, extra coding information is not required to be added in the information packet, so that the error correction protection of the information packet is realized, and meanwhile, the coding rate and the coding stability of the information packet are also kept; through the arrangement of the first error correction packet and the second error correction packet, each information packet is protected by the corresponding first error correction packet and the corresponding second error correction packet, and the effect of multi-level protection of the information packets is achieved.
In addition, the encoding rule of the first error correction region in the present disclosure is merely exemplary, and the encoding rule of the first error correction region may also be generated based on other rules of error correction encoding; and the generation logic of the first error correction packet and the second error correction packet may be independent of each other, and both have no influence.
As an example, referring to fig. 2, for example, one data needs to generate 10 packets by encoding, which are packet 1, packet 2, packet 3, packet 4, packet 5, packet 6, packet 7, packet 8, packet 9, and packet 10; assume that the first predetermined number is 2 and the second predetermined number is 10.
When the sending end encodes the data, the process is as follows:
generating an information packet 1 and an information packet 2;
generating a first error correction packet 1 based on the information packet 1 and the information packet 2;
generating an information packet 3 and an information packet 4;
generating a first error correction packet 2 based on the information packet 1 and the information packet 2;
generating an information packet 5;
generating a second error correction packet 1 based on the packet 1, the packet 2, the packet 3, the packet 4, and the packet 5;
generating an information packet 6;
generating a first error correction packet 3 based on the packets 5 and 6;
generating an information packet 7 and an information packet 8;
generating a first error correction packet 4 based on the information packet 7 and the information packet 8;
generating an information packet 9 and an information packet 10;
generating a first error correction packet 5 based on the information packets 9 and 10;
the second error correction packet 2 is generated based on the packet 6, the packet 7, the packet 8, the packet 9, and the packet 10.
In another embodiment, after M information packets are sent, the ith first error correction packet is sent, where M = i × M, and M is a first preset number;
sending a jth second error correction packet after sending N information packets, wherein N = j × N, and N is a second preset number; n, i, M, j, M and N are positive integers.
In this embodiment, in order to ensure real-time data transmission, the sending end directly sends the data packet to the receiving end after generating one data packet, so as to speed up the data transmission rate, and therefore, the sending end directly sends the data packet to the receiving end after generating one information packet, one first error correction packet, or one second error correction packet, so that 1 first error correction packet is sent after sending M information packets, that is, the ith first error correction packet is sent after sending M information packets, where M = i M, and M is a first preset number; sending 1 second error correction packet after sending N information packets, namely sending a jth second error correction packet after sending N information packets, wherein N = j × N, and N is a second preset number; n, i, M, j, M and N are positive integers, and M is greater than N; because the information packet is generated by encoding based on the data to be sent, the positions of the first error correction packet and the second error correction packet are both at the ends of a plurality of information packets, that is, redundant information required by the error correction packets is arranged at the ends of the corresponding information packets, and because the types of the error correction packets are different from the information packets, the information packets used for transmitting the original data to be sent are transmitted without changing the original state, and the mutual position relationship among the information packets is also unchanged. Taking the above example as an example, the sequence of the data packets sent by the sending end to the receiving end is: the information packet comprises a packet 1, a packet 2, a first error correction packet 1, a packet 3, a packet 4, a first error correction packet 2, a packet 5, a second error correction packet 1, a packet 6, a first error correction packet 3, a packet 7, a packet 8, a first error correction packet 4, a packet 9, a packet 10, a first error correction packet 5, and a second error correction packet 2.
In another embodiment, since the method of the present disclosure is applied to a transport layer protocol, during packet transmission, before passing through a transport layer, the packet may pass through a lower layer, such as a physical layer, a link layer, etc., and the physical layer may analyze the packet to determine whether the packet is abnormal, and if the abnormality may be directly discarded, the packet is not continuously transmitted to the transport layer, so that the packet abnormality occurring in the transport layer is often a packet loss abnormality, that is, the first error correction packet and the second error correction packet in the present disclosure basically perform error correction and recovery for a case where the packet is lost in the transport layer, and therefore, the adopted error correction coding rules may also be but not limited to Reed Solomon coding or linear block coding, and the respective coding modes of the first error correction packet and the second error correction packet may be the same or different, that is, referring to the above example, each error correction packet of the first error correction packet 1, the first error correction packet 2, the first error correction packet 3, the first error correction packet 4, the second error correction packet 1, and the second error correction packet 2 may adopt different rules of error correction coding according to different requirements.
In an embodiment, the number of bits of the first error correction region is the same as the information packet with the longest bit number in the first preset number, and the information packet includes 0-k bits;
the coding information of the xth bit in the first error correction area is generated based on the coding information of the xth bit of each information packet in the first preset number, wherein x is less than or equal to k; and/or the presence of a gas in the atmosphere,
the bit number of the second error correction packet is the same as the information packet with the longest bit number in the second preset number, and the information packet comprises 0-z bits;
the coding information of the ith bit in the second error correction packet is generated based on the coding information of the ith bit of each information packet in a second preset number, wherein y is less than or equal to z; x, y, z and k are integers which are more than or equal to 1.
Illustratively, the first error correction region of the present embodiment includes 0-k bits; the rule of error correction coding in the first error correction region is longitudinal coding, that is, the coding information of the xth bit in the first error correction region is generated based on the coding information of the xth bit of each information packet in the first preset number; because the lengths of the packets may be different, only the coded information on the xth bit of the first error correction region is generated based on the packet having information on the xth bit, so that the coded information on each bit of the first error correction region is the coded information for protecting the corresponding bit of the first preset number of packets; as an example, when the xth bit of the first error correction region is used to describe the parity of 1 of the xth bit in the first predetermined number of packets, when 1 of the xth bit in the first predetermined number of packets is an odd number, the xth bit of the first error correction region is 1, and when 1 of the xth bit in the first predetermined number of packets is an even number, the xth bit of the first error correction region is 0; when the transmission errors occur in the information packets with the first preset number, the error correction or recovery of the information of each bit is carried out on the basis of the first preset number; the encoding mode of the second error correction packet is similar to that of the first error correction area, and is not described herein again; the above is merely an illustrative example, and other encoding modes can be performed according to requirements in specific implementation.
After a first error correction packet and a second error correction packet are generated and received by a receiving end, there is a problem how the receiving end determines which information packets each error correction packet is directed to, and a conventional means may determine by adding protocol content, for example, adding a first preset number of information packets corresponding to preambles of the first error correction packet at the receiving end, or other logic limitations, but since a transmission protocol without connection and without reliability is often disordered in the sequence of received data packets, it is difficult to solve the problem how the receiving end determines which information packets each error correction packet is directed to by increasing the protocol content through the logic sequence of the data packets at this time.
Referring to fig. 3, fig. 3 is a schematic diagram of a first error correction packet shown in accordance with an exemplary embodiment of the present description, with identification in each packet in some embodiments;
the first error correction packet 1 further includes first identification indication information 11; the first identification indication information 11 is used for indicating the identifications of a first preset number of packets; and/or the presence of a gas in the gas,
the second error correction packet further includes second identification indication information, and the second identification indication information is used for indicating the identifications of the second preset number of information packets.
For example, in this embodiment, the identifier of the information packet is basic information carried by the information packet, and in the process of encoding data to be transmitted to generate the information packet, an identifier must be set in each information packet to indicate a sequence, so that a receiving end can sort and order the information packets based on the identifier when receiving the disordered information packets; in this embodiment, first identification indication information 11 is set in a first error correction packet 1, second identification indication information is set in second error correction packets, and the first identification indication information 11 indicates identifications of first predetermined number of packets and the second identification indication information indicates second predetermined number of packets, so that a receiving end can determine, when receiving the first error correction packet 1, that the first error correction packet 1 is for the first predetermined number of packets through the first identification indication information 11, and similarly, when receiving the second error correction packet, can determine, through the second identification indication information, that the second error correction packet is for the second predetermined number of packets; therefore, limitation is not required to be added to extra content of the protocol, and even when the receiving end receives the disordered information packet, the first error correction packet 1 and the second error correction packet, the corresponding information packet can be accurately determined through the first identification indication information 11 and the second identification indication information, and the effect of accurately determining the information packet corresponding to each error correction packet is achieved.
In still another embodiment, in the first error correction packet 1, the first error correction area is located after the first identification indication information 11; and/or the presence of a gas in the gas,
in the second error correction packet, the second error correction area is located after the second identification indication information.
In this embodiment, the first identification information and the second identification information in the first error correction packet 1 and the second error correction packet serve as information packets for indicating the current error correction packet, when the first identification information and the second identification information are applied to a case where only a packet loss error occurs and an intra-packet coding information error does not occur, in a process of decoding the first error correction packet 1 and the second error correction packet, whether protected information packets have a loss or not may be determined through the first identification information and the second identification information, if no loss occurs, it is determined that the corresponding information packets have no error, and at this time, it is not necessary to decode the first error correction area or the second error correction area; therefore, the following advantages are provided when the first identification indication information 11 is disposed before the first error correction area and the second identification indication information is disposed before the second error correction area: when no packet loss error occurs, only the first identification information and the second identification information need to be decoded, and the first error correction area or the second error correction area does not need to be decoded, so that the decoding process is accelerated, and the transmission efficiency is improved.
The first identification indication information 11 and the second identification indication information are used to indicate the information packets to which the information packets are addressed, so that the identifiers of the addressed information packets can be all written into the first identification indication information 11 and the second identification indication information, so that the receiving end can search one by one, but in this way, a large amount of content needs to be written into the first identification indication information 11 and the second identification indication information, which undoubtedly increases the coding lengths of the first error correction packet 1 and the second error correction packet, that is, there is a problem of reducing the transmission rate.
Referring to FIG. 4, FIG. 4 is a schematic diagram of a first identification hint shown in accordance with an exemplary embodiment of the present description;
in another embodiment, the first flag indicating information 11 includes a first packet number 111, a last packet number 112, and an order relation 113 in a first preset number of packets; and/or the presence of a gas in the gas,
and the second identification indication information comprises a first information packet number 111, a last information packet number 112 and an order relation 113 in a second preset number of information packets.
Illustratively, because the identifiers of a plurality of packets generated by encoding the data to be transmitted by the transmitting end are ordered, the receiving end can finish packet ordering according to the identifiers and decode the data to be transmitted, and based on the condition that the identifiers of the packets are ordered, in this embodiment, the first identifier indication information 11 is set as the first packet number 111, the last packet number 112 and the order relation 113 in the first preset number of packets, and the second identifier indication information is set as the first packet number 111, the last packet number 112 and the order relation 113 in the second preset number of packets; the sequence relation 113, even if the relation identified in each packet, may be, but is not limited to, increasing, decreasing, etc.; by way of example, in combination with the foregoing example, the second identification indication information of the second error correction packet 2 includes a first packet number 111 (packet 6), a last packet number 112 (packet 10), and an order relation 113 (with one as an increasing base), and the packets for which the second error correction packet 1 can be explicit include the packet 6, the packet 7, the packet 8, the packet 9, and the packet 10; other cases and the first flag indication information 11 are similar, and are not described herein again. Therefore, when receiving the first error correction packet and the second error correction packet, the receiving end can determine the information packet corresponding to each error correction packet through the first information packet number 111, the last information packet number 112 and the sequence relation 113, and complete the indicating function through a smaller information amount, thereby achieving the effect of completing the indicating of the corresponding information packet by the error correction packet with the smaller information amount.
In an embodiment, the first error correction packet and the second error correction packet generated each time may include a plurality of data packets, for example, in the above example, the first error correction packet 1 may include a first error correction packet 1-1 and a first error correction packet 1-2, and at this time, the first preset number of information packets of the preamble are error corrected by two first error correction packets; so that other first error correction packets can also have a plurality of data packets; similarly, the error correction of the second error correction packet generated each time may also include a plurality of data packets; the number of data packets within the first error correction packet and the second error correction packet generated at a time may be determined based on a specific usage scenario, including but not limited to stability of a communication environment, type of data to be transmitted, and the like.
In an embodiment, the first preset number and the second preset number may be adaptively modified according to a specific usage scenario, and since the first preset number and the second preset number are numbers used to indicate that the first error correction packet and the second error correction packet respectively aim at error correction, that is, when data transmission is stable, the packet loss probability and the communication environment stability may become relevant, when the communication environment stability is lower, the packet loss probability is larger, at this time, the first preset number and the second preset number are set smaller, when the communication environment stability is higher, the packet loss probability is smaller, at this time, the first preset number and the second preset number are set larger; therefore, the first preset quantity and the second preset quantity are denser under the condition that the probability of packet loss is larger, and the effect of improving the stability of data transmission is achieved.
After the first error correction packet 1 and the second error correction packet can specify the information packets to which the first error correction packet 1 and the second error correction packet are directed, when the first error correction packet 1 and the second error correction packet are required to be used for error correction, because the first error correction area is only formed as a part of the first error correction packet 1, the first error correction packet 1 may further include other information, the other information may be packed into one data packet with the first error correction area, or may be packed into a different data packet with the first error correction area, so the first error correction packet 1 may include one or more data packets, and the second error correction packet is also the same; the first error correction packet 1 then has a problem how to determine how the first error correction packet 1 and the second error correction packet themselves comprise several data packets.
Referring to fig. 5, fig. 5 is another schematic diagram of the first error correction packet shown in accordance with an exemplary embodiment of the present description; in one embodiment, the generating the first error correction packet 1 based on the first predetermined number of packets includes: generating at least one first error correction packet 1 based on a first preset number of packets;
the first error correction packet 1 further includes first number indication information 12, where the first number indication information 12 is used to indicate the number of the first error correction packets 1 generated based on the first preset number of packets; and/or the presence of a gas in the gas,
generating a second error correction packet based on a second preset number of packets, comprising: generating at least one second error correction packet based on a second preset number of information packets;
the second error correction packet also comprises second quantity indication information; the second number indication information indicates the number of second error correction packets generated based on the second preset number of packets.
Illustratively, in the present embodiment, when at least one first error correction packet 1 is generated for a first preset number of packets, the first error correction packet 1 includes first number indication information 12, where the first number indication information 12 is used to indicate the number of first error correction packets 1 generated based on the first preset number of packets; when a receiving end needs to correct a first preset number of information packets through the first error correction packet 1, the first error correction packet 1 corresponding to the first number indication information 12 includes several data packets, so as to obtain all corresponding first error correction packets 1 for error correction of the first preset number of information packets, and the implementation principle of the second error correction packet is similar, which is not described herein again; thus, the first quantity indicating information 12 and the second quantity indicating information function to determine the complete first error correction packet 1 and the complete second error correction packet, and also function to determine whether the first error correction packet 1 and the complete second error correction packet are complete, thereby achieving an effect of improving the stability of the first error correction packet 1 and the complete second error correction packet.
The first quantity indication information 12 and the second quantity indication information are used to indicate the functions of the plurality of data packets corresponding to the first error correction packet 1 and the second error correction packet, so that all the identifiers of the plurality of corresponding data packets may be written into the first quantity indication information 12 and the second quantity indication information, so that the receiving end may perform search one by one, but this method needs to write a large amount of content into the first quantity indication information 12 and the second quantity indication information, which undoubtedly increases the encoding lengths of the first error correction packet 1 and the second error correction packet, that is, there is a problem of reducing the transmission rate.
In still another embodiment, in the first error correction packet 1, the first error correction area is located after the first quantity indication information 12; and/or the presence of a gas in the gas,
in the second error correction packet, the second error correction area is located after the second quantity indication information.
In this embodiment, the first quantity indication information 12 and the second quantity indication information are used to indicate the number of corresponding error correction packets, and therefore it is necessary to determine whether an error correction packet itself is missing before error correction or recovery is performed on the packet through the first error correction area and the second error correction area, so it is necessary to set the first quantity indication information 12 before the first error correction area and the second quantity indication information before the second error correction area, and only when there is no missing of the first error correction packet 1 and the second error correction packet, error correction and recovery can be completed, and an effect of verifying whether the first error correction packet 1 and the second error correction packet are missing is achieved.
Referring to FIG. 6, FIG. 6 is a schematic illustration of a first quantity prompt message shown in accordance with an exemplary embodiment of the present description; in one embodiment, the first quantity indication information 12 includes the first error correction packet number 121, the last error correction packet number 122 and the order relation 123 in the first error correction packet; and/or the presence of a gas in the gas,
and the second quantity indicating information comprises a first second error correction packet number in the second error correction packet, a last second error correction packet number and an order relation 123.
For example, in this embodiment, the first error correction packet and the second error correction packet generated by the sending end both have numbers, which are similar to the identifiers in the information packets and are basic information generated in the encoding generation process, and are used to indicate the sequence, so that the receiving end can perform sorting based on the numbers when receiving the out-of-sequence first error correction packet or the second error correction packet, and thus the numbers are basic information having the sequence and indicating functions.
In this embodiment, the first quantity indicating information 12 is set as the first error correction packet number 121, the last first error correction packet number 122 and the order relation 123 in the first error correction packets, and the second quantity indicating information is set as the first second error correction packet number, the last second error correction packet number and the order relation 123 in the second preset number of packets; the sequence relation 123, even if the number relation in each error correction packet, may be, but is not limited to, increasing, decreasing, etc.; for example, 3 first error correction packets are set as the first error correction packet 1, the first error correction packet 2, and the first error correction packet 3, respectively, and at this time, for the first error correction packet number 121 (the first error correction packet 1), the last first error correction packet number 122 (the first error correction packet 3), and the order relation 123 (with one as an increasing base number) in the first error correction packets in the first quantity indication information 12, it can be definitely determined that the first error correction packet includes the first error correction packet 1, the first error correction packet 2, and the first error correction packet 3; when the number of the first error correction packets is 1, the first error correction packet number 121 is the same as the last error correction packet number 122, and the order relation 123 may be null or 0, which can achieve the effect of indicating when a single first error correction packet is received; other cases and the second quantity indication information are similar, and are not described herein again. Therefore, when the receiving end receives the first error correction packet and the second error correction packet, the receiving end can determine that the error correction packet is composed of a plurality of error correction packets through the first error correction packet number 121, the last error correction packet number 122 and the sequence relation 123 in the first error correction packet, and the effect of finishing the indication of the corresponding information packet by the error correction packet with smaller information amount is realized.
In an embodiment, to ensure real-time data transmission, each time the sending end generates an information packet and an error correction packet, the information packet and the error correction packet are directly sent to the receiving end.
According to a second aspect of the embodiments of the present specification, as shown in fig. 7, fig. 7 is a flowchart of another data packet error correction method shown in the present specification according to an exemplary embodiment, and is applied to a receiving end; the method comprises the following steps:
step S210: receiving a data packet sent by a sending end; the data packet comprises an information packet and a first error correction packet, wherein the information packet is obtained by encoding data to be transmitted by a transmitting end, and the first error correction packet is used for correcting errors of a first preset number of information packets; the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in the first preset number; the bit encoding information of each first error correction area is determined based on the bit encoding information of the same sequence of each information packet in the first preset number;
step S220: when the first error correction packet is received, whether the received information packet needs error correction is determined according to the indication of the first error correction packet.
In yet another embodiment, the method further comprises:
step S230: if the received information packet is determined to have deficiency and needs error correction, recovering the deficient information packet based on the first error correction area;
step S240: if the missing packet is not successfully recovered based on the first error correction region, the missing packet is recovered based on the second error correction region.
Exemplarily, the receiving end in this embodiment receives the information packet, the first error correction packet, and the second error correction packet sent by the sending end one by one; when a first error correction packet is received, whether the received information packet is missing or not is determined according to an indication of the first error correction packet, wherein the indication of the first error correction packet may be first identification indication information arranged in the first error correction packet, the first identification indication information includes a first information packet number, a last information packet number and an order relation in a first preset number of information packets, and a receiving end can determine each information packet targeted by the first error correction packet by combining the first identification indication information and then determine whether the received information packet is missing or not by combining the received information packet information in a manner that the content of the first aspect is known.
Referring to FIG. 8, FIG. 8 is a flow chart illustrating another method of error correction of a data packet according to yet another exemplary embodiment of the present description; after step S220, step S221 is further included: if the received information packet is determined not to be missing and not to be corrected, the first error correction packet is discarded and not analyzed, so that the processing time of the first error correction packet is greatly reduced, and the decoding rate of the information packet is accelerated.
Step S230: if the received information packet is determined to have deficiency and needs error correction, recovering the deficient information packet based on the first error correction area; the first error correction area comprises a first error correction area, and missing information packets can be recovered through the first error correction area and the content of the received information packets within the first preset number.
Step S230 is followed by:
step S231: and judging whether to recover the missing information packet or not.
Step S232: if the missing information is recovered, the first error correction packet is discarded.
In this embodiment, when the first error correction packet is lost, or when all the information packets within the first preset number are lost, the first error correction packet cannot recover the lost information packets; at this time, the missing packet needs to be recovered based on the second error correction region.
Step S233: judging whether a second error correction packet is received or not; the second error correction packet is used for correcting errors of a second preset number of information packets; the second error correction packet comprises a second error correction area, and the bit number of the second error correction area is the same as the information packet with the longest bit number in the second preset number; and each bit encoding information of the second error correction area is determined based on the bit encoding information of the same sequence of each information packet in the second preset number.
Step S234: if the second error correction packet is not received, the determination of step S233 is continued.
Step S240: if the second error correction packet is received and the missing information packet is not successfully recovered based on the first error correction area, the missing information packet is recovered based on the second error correction area.
Exemplarily, similar to the first error correction packet, the second error correction packet includes second identification indication information, the second identification indication information is used for indicating an identification of a second preset number of packets, the second identification indication information includes a first packet number, a last packet number and an order relationship among the second preset number of packets, a missing packet can be determined according to a received packet and the second identification indication information, the second error correction packet includes a second error correction region, and the missing packet can be recovered through the second error correction region and by combining contents of the received packets in the first preset number; therefore, when the first error correction packet cannot recover the missing information packet, the second error correction packet can recover the missing information packet; similar to the first error correction packet, if the received information packet is determined to be not missing based on the second identification indication information of the second error correction packet, the second error correction packet can be discarded and not analyzed, so that the processing time of the second error correction packet is greatly reduced, and the decoding rate of the information packet is accelerated; therefore, under the condition that no packet is lost when the receiving end normally receives the information packet, the first error correction packet and the second error correction packet can be discarded without excessively analyzing the contents of the first error correction packet and the second error correction packet, and the effect of no extra delay and high real-time performance equivalent to the transmission and the analysis of the information packet is realized; and the recovery of the missing information packet can be completed through two opportunities of the first error correction packet and the second error correction packet under the condition that the missing information packet occurs, so that the effect of ensuring high reliability of data transmission is realized.
Referring to FIG. 9, FIG. 9 is a flow chart illustrating another method of error correction of a data packet according to an exemplary embodiment of the present description; since there is a possibility that various data packets are lost during data transmission, if the second error correction packet is lost or the second error correction packet cannot recover the missing packet, it is difficult for the receiving end itself to complete the recovery of the missing packet.
That is, after step S240, the method further includes:
step S241: judging whether to recover the missing information packet;
step S242: discarding the second error correction if the missing packet has been recovered;
in one embodiment, step S250: and if the missing information packet cannot be recovered based on the second error correction packet, generating a retransmission instruction and sending the retransmission instruction to the sending end so that the sending end sends the missing information packet.
Step S260: and receiving the retransmission data packet.
For example, in this embodiment, for a receiving end that cannot recover a missing information packet in both a first error correction packet and a second error correction packet, a corresponding retransmission instruction is generated based on the missing information packet and is sent to the receiving end, a sending end receives the retransmission instruction of the receiving end, determines a corresponding retransmission information packet based on the retransmission instruction, sends the retransmission information packet to the receiving end, and the receiving end decodes the retransmission information packet as the missing information packet, so as to achieve an effect of ensuring that data of the receiving end can be kept complete.
Corresponding to the embodiments of the method, the present specification also provides embodiments of the apparatus and the terminal applied thereto.
The embodiment of the document processing device in the specification can be applied to computer equipment, such as a server or terminal equipment. The apparatus embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor in which the file processing is located. From a hardware aspect, as shown in fig. 3, which is a hardware structure diagram of a computer device in which a file processing apparatus is located in an embodiment of the present disclosure, except for the processor 310, the memory 330, the network interface 320, and the nonvolatile memory 340 shown in fig. 3, a server or an electronic device in which an apparatus 331 is located in an embodiment may also include other hardware according to an actual function of the computer device, and details of this are not described again.
In an embodiment, the first error correction packet further includes first number indication information for indicating the number of the first error correction packet, the first identification indication information of the first error correction packet is disposed at the head of the first error correction packet, and the first number indication information is disposed behind the first identification indication information, so that the receiving end performs S220: when a first error correction packet is received, according to the indication of the first error correction packet, determining whether the received information packet has a missing part, only checking the first identification indication information of the head part of the first error correction packet, when the first error correction packet is needed to recover the missing information packet, checking the first quantity indication information behind the first identification indication information, and determining that all corresponding first error correction packets recover the missing information packet; similarly, the second error correction packet is similar to the first error correction packet, the second error correction packet further includes second quantity indication information for indicating the quantity of the second error correction packet, the second identification indication information of the second error correction packet sets the header of the second error correction packet, and the second quantity indication information is set behind the second identification indication information, so as to achieve the effect similar to the first error correction identification, which is not described again here; the sequential arrangement realizes the effect of accelerating the analysis rate of the error correction packet by the receiving end.
According to a third aspect of embodiments of the present specification, as shown in fig. 10A, fig. 10A is a data packet error correction apparatus shown in the present specification according to an exemplary embodiment.
A data packet error correction device is applied to a sending end; the device comprises:
an encoding module 1010 configured to start encoding to-be-transmitted data; the encoding module 1010 includes a first generation module 1020;
a first generation module 1020 configured to generate a first error correction packet based on a first preset number of packets every time the first preset number of packets are generated; the information packets are data obtained by encoding data to be transmitted, and the first error correction packets are used for correcting errors of a first preset number of information packets;
the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in the first preset number; and each bit encoding information of the first error correction area is determined based on the bit encoding information of the same sequence of each information packet in the first preset number.
As shown in fig. 10B, in yet another embodiment, the encoding module 1010 includes a second generating module 1030;
a second generating module 1030 configured to generate a second error correction packet based on a second preset number of packets after each second preset number of packets is generated; the second preset number is larger than the first preset number, and the second error correction packets are used for correcting errors of the information packets of the second preset number;
the second error correction packet comprises a second error correction area, and the bit number of the second error correction area is the same as the information packet with the longest bit number in the second preset number; and each bit encoding information of the second error correction area is determined based on the bit encoding information of the same sequence of each information packet in the second preset number.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement without inventive effort.
According to a fourth aspect of the embodiments of the present specification, as shown in fig. 11, fig. 11 is a block diagram illustrating a packet error correction apparatus according to an exemplary embodiment of the present specification, applied to a receiving end; the device comprises:
a receiving module 1110 configured to receive a data packet sent by a sending end; the data packet comprises an information packet and a first error correction packet, wherein the information packet is obtained by encoding data to be transmitted by a transmitting end, and the first error correction packet is used for correcting errors of a first preset number of information packets; the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in the first preset number; the bit encoding information of each first error correction area is determined based on the bit encoding information of the same sequence of each information packet in the first preset number;
a determining module 1120 configured to determine, when the first error correction packet is received, whether the received information packet requires error correction according to an indication of the first error correction packet.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the present specification. One of ordinary skill in the art can understand and implement it without inventive effort.
According to a fifth aspect of embodiments herein, with reference to FIG. 12, FIG. 12 is a schematic diagram of a computer device structure shown in accordance with an exemplary embodiment; a computer device is provided comprising a memory 1202, a processor 1201 and a computer program stored on the memory 1202 and executable on the processor 1201, wherein the processor 1201 performs the method as the first and second aspect when executing the program.
The apparatus may include: a processor 1201, a memory 1202, an input/output interface 1203, a communication interface 1204, and a bus 1205. Wherein the processor 1201, the memory 1202, the input/output interface 1203 and the communication interface 1204 enable communication connections with each other within the device via the bus 1205.
The processor 1201 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 1202 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1202 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1202 and called to be executed by the processor 1201.
The input/output interface 1203 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1204 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
The bus 1205 includes a path to transfer information between the various components of the device, such as the processor 1201, memory 1202, input/output interface 1203, and communications interface 1204.
It should be noted that although the above-mentioned device only shows the processor 1201, the memory 1202, the input/output interface 1203, the communication interface 1204 and the bus 1205, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the embodiments or some parts of the embodiments of the present specification.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (15)

1. A data packet error correction method is applied to a sending end; the method comprises the following steps:
acquiring data to be transmitted, and encoding the data to be transmitted; wherein, in the encoding process:
after a first preset number of information packets are generated each time, generating a first error correction packet based on the first preset number of information packets; the information packet is a data packet obtained by encoding the data to be transmitted, and the first error correction packet is used for correcting errors of the information packets of the first preset number;
the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in a first preset number; and each bit encoding information of the first error correction area is determined based on the bit encoding information of the same sequence of each information packet in a first preset number.
2. The method of claim 1, further comprising:
generating a second error correction packet based on a second preset number of information packets after generating the second preset number of information packets each time; the second preset number is greater than the first preset number, and the second error correction packet is used for correcting errors of the information packets of the second preset number;
the second error correction packet comprises a second error correction area, and the bit number of the second error correction area is the same as the information packet with the longest bit number in a second preset number; and each bit encoding information of the second error correction area is determined based on the bit encoding information of the same sequence of each information packet in a second preset number.
3. The method of claim 2, the information packet having an identification;
the first error correction packet further comprises first identification indication information; the first identification indication information is used for indicating the identifications of the first preset number of information packets; and/or the presence of a gas in the gas,
the second error correction packet further includes second identification indication information, where the second identification indication information is used to indicate the identifications of the second preset number of information packets.
4. The method of claim 3, wherein the first identification indication information includes a first packet number, a last packet number and an order relationship among a first preset number of packets; and/or the presence of a gas in the gas,
the second identification indication information comprises a first information packet number, a last information packet number and an order relation in a second preset number of information packets.
5. The method of claim 3, wherein the first error correction packet is preceded by the first identification indication information by the first error correction zone; and/or the presence of a gas in the gas,
in the second error correction packet, the second error correction area is located after the second identification indication information.
6. The method of claim 2, the generating a first error correction packet based on the first preset number of packets comprising: generating at least one first error correction packet based on the first preset number of information packets;
the first error correction packet further comprises first quantity indication information, and the first quantity indication information is used for indicating the quantity of the first error correction packets generated based on the first preset quantity of information packets; and/or the presence of a gas in the gas,
generating a second error correction packet based on the second preset number of information packets comprises: generating at least one second error correction packet based on the second preset number of information packets;
the second error correction packet also comprises second quantity indication information; the second number indication information is used to indicate the number of the second error correction packets generated based on the second preset number of information packets.
7. The method of claim 6, wherein the first quantity indication information comprises a first error correction packet number in the first error correction packet, a last error correction packet number and an order relation; and/or the presence of a gas in the gas,
and the second quantity indicating information comprises a first second error correction packet number, a last second error correction packet number and an order relation in the second error correction packet.
8. The method of claim 6, wherein the first error correction packet has the first error correction region located after the first quantity indication information; and/or the presence of a gas in the gas,
in the second error correction packet, the second error correction area is located after the second quantity indication information.
9. The method of claim 1, further comprising:
and if a retransmission instruction of a receiving end is received, determining a corresponding retransmission information packet based on the retransmission instruction, and sending the retransmission information packet to the receiving end.
10. The method of claim 2, further comprising:
sending the ith first error correction packet after sending the M information packets, wherein M = i × M, and M is the first preset number;
sending the jth second error correction packet after sending the N information packets, where N = j × N, and N is the second preset number; n, i, M, j, M and N are positive integers.
11. The method of claim 2, the first error correction region comprising 0-k bits;
the coding information of the xth bit in the first error correction area is generated based on the coding information of the xth bit of each information packet in the first preset number, wherein x is less than or equal to k; and/or the presence of a gas in the gas,
the second error correction region comprises 0-z bits;
the coding information of the ith bit in the second error correction area is generated based on the coding information of the ith bit of each information packet in the second preset number, wherein y is less than or equal to z; x, y, z and k are integers which are more than or equal to 1.
12. A data packet error correction method is applied to a receiving end; the method comprises the following steps:
receiving a data packet sent by a sending end; the data packets comprise information packets and first error correction packets, the information packets are data packets obtained by encoding data to be transmitted by a transmitting end, and the first error correction packets are used for carrying out error correction on a first preset number of information packets; the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in a first preset number; the bit encoding information of the first error correction area is determined based on the bit encoding information of the same sequence of the information packets in a first preset number;
when a first error correction packet is received, determining whether the received information packet needs error correction according to the indication of the first error correction packet.
13. A data packet error correction device is applied to a sending end; the device comprises:
an encoding module configured to start encoding to-be-transmitted data; the encoding module comprises a first generating module;
the first generation module is configured to generate a first error correction packet based on a first preset number of information packets after each generation of the first preset number of information packets; the information packet is data obtained by encoding the data to be transmitted, and the first error correction packet is used for correcting errors of the information packets with the first preset number;
the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in a first preset number; and each bit encoding information of the first error correction area is determined based on the bit encoding information of the same sequence of each information packet in a first preset number.
14. A data packet error correction device is applied to a receiving end; the device comprises:
the receiving module is configured to receive a data packet sent by a sending end; the data packets comprise information packets and first error correction packets, the information packets are data packets obtained by encoding data to be transmitted by a transmitting end, and the first error correction packets are used for correcting errors of a first preset number of the information packets; the first error correction packet comprises a first error correction area, and the bit number of the first error correction area is the same as the information packet with the longest bit number in a first preset number; the bit encoding information of the first error correction area is determined based on the bit encoding information of the same sequence of the information packets in a first preset number;
a determining module configured to determine, when a first error correction packet is received, whether the received information packet requires error correction according to an indication of the first error correction packet.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1-11 or 12 when executing the program.
CN202210801258.6A 2022-07-08 2022-07-08 Data packet error correction method and device and computer equipment Pending CN114884625A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210801258.6A CN114884625A (en) 2022-07-08 2022-07-08 Data packet error correction method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210801258.6A CN114884625A (en) 2022-07-08 2022-07-08 Data packet error correction method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN114884625A true CN114884625A (en) 2022-08-09

Family

ID=82683537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210801258.6A Pending CN114884625A (en) 2022-07-08 2022-07-08 Data packet error correction method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN114884625A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030005387A1 (en) * 1997-06-04 2003-01-02 Kabushiki Kaisha Toshiba Code transmission scheme for communication system using error correcting codes
CN101834700A (en) * 2010-05-12 2010-09-15 北京邮电大学 Unidirectional reliable transmission method and transceiving device based on data packets
CN106130696A (en) * 2016-09-22 2016-11-16 杭州龙境科技有限公司 A kind of method of forward error correction, device and electronic equipment
CN107276722A (en) * 2017-06-21 2017-10-20 北京奇艺世纪科技有限公司 A kind of data transmission method and system based on UDP
CN109547467A (en) * 2018-12-19 2019-03-29 北京东土科技股份有限公司 Media data error correction transmission and error correction method, device, equipment and storage medium
CN110213259A (en) * 2019-05-29 2019-09-06 武汉大学 The UDP transmission method of electric power observation and control message sends terminal and receives terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030005387A1 (en) * 1997-06-04 2003-01-02 Kabushiki Kaisha Toshiba Code transmission scheme for communication system using error correcting codes
CN101834700A (en) * 2010-05-12 2010-09-15 北京邮电大学 Unidirectional reliable transmission method and transceiving device based on data packets
CN106130696A (en) * 2016-09-22 2016-11-16 杭州龙境科技有限公司 A kind of method of forward error correction, device and electronic equipment
CN107276722A (en) * 2017-06-21 2017-10-20 北京奇艺世纪科技有限公司 A kind of data transmission method and system based on UDP
CN109547467A (en) * 2018-12-19 2019-03-29 北京东土科技股份有限公司 Media data error correction transmission and error correction method, device, equipment and storage medium
CN110213259A (en) * 2019-05-29 2019-09-06 武汉大学 The UDP transmission method of electric power observation and control message sends terminal and receives terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王安生: "《软件工程专业导论》", 30 June 2022, 北京邮电大学出版社 *

Similar Documents

Publication Publication Date Title
CN110971704B (en) Data transmission method and device based on JSON configuration file
US6421803B1 (en) System and method for implementing hybrid automatic repeat request using parity check combining
US7003710B2 (en) Communications method, communications apparatus and communications system using same communications apparatus
US11191049B1 (en) Systems and methods for improving wireless performance
RU2234806C2 (en) Error preventing device for multimedia system
EP2166687B1 (en) A method and apparatus for transmiting and receiving data packets
US20070165673A1 (en) Method for reconstructing lost packets using a binary parity check
US20040117722A1 (en) Performance of communication systems using forward error correction
JP2009510923A (en) Error correction in packet communication networks using data integrity check
CN106656424B (en) Data transmission verification method
JP2009510924A (en) Error correction in packet communication networks using verification sets
CN108600124B (en) Network unpacking and packing method based on safety protocol
CN112839003A (en) Data verification method and system
CN111082896A (en) Data transmission method and transmitting and receiving device
US9866350B2 (en) Streaming media packet processing method, WiFi chip, and mobile terminal
JP2009509480A (en) Apparatus and method for error correction in mobile wireless applications incorporating erasure table data
US20160277151A1 (en) Transmission method and device based on management data input/output multi-source agreements
CN114884625A (en) Data packet error correction method and device and computer equipment
US6802038B1 (en) Cyclic redundancy check computation algorithm
CN112532359A (en) Method and device for content merging at receiving end based on data retransmission data
CN110381056B (en) Netty-based private protocol coding and decoding method and apparatus
WO2023098430A1 (en) Data packet processing method, communication apparatus and communication system
US20060200731A1 (en) System and method of error detection for unordered data delivery
CN114513418A (en) Data processing method and related equipment
US6948110B2 (en) Transmission data loss detection system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220809