Data processing method, device, electronic device and storage medium

By comparing and reconciling the target position field information in the data packet, the error problem caused by physical interference in data transmission is solved, and the real-time and efficiency of data transmission are improved.

CN116094655BActive Publication Date: 2024-11-12ACTIONS ZHUHAI TECH CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111280372.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2024-11-12
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

During data transmission, data errors caused by physical transmission interference are required for data retransmissions multiple times, resulting in poor real-time data transmission.

Method used

By comparing the received retransmission packet with the same position field in its corresponding historical packet, the target position field is determined, and the information of these position fields is synchronized through a preset adjustment method to generate error-free data packets .

Benefits of technology

It improves the real-time nature of data transmission, reduces the number of retransmissions, and improves the efficiency of packet correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116094655B_ABST
    Figure CN116094655B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data processing method, device, electronic device and storage medium, the method comprising: if a retransmitted data packet is received, and the retransmitted data packet has a code error, then any historical data packet corresponding to the retransmitted data packet is compared with the information in the same position field of the retransmitted data packet; based on the comparison result, the target position field in the retransmitted data packet and the historical data packet is determined; the information in part of the target position field of the retransmitted data packet and the historical data packet is swapped by a preset swap method, and it is determined whether there is no code error in the swapped data packet. In the above method, if the position field of an erroneous data packet has an error, and the same position field of another data packet it is compared with is correct, a swapped data packet without code errors can be obtained, thereby efficiently and accurately correcting the code errors in the data packet and improving the real-time performance of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a data processing method, device, electronic device, and storage medium. Background Art

[0002] During the data transmission process, factors such as physical transmission interference may cause data errors, and the receiver may receive data packets with errors.

[0003] In the related art, after receiving a data packet with code errors, the receiver can request the sender to retransmit the data packet corresponding to the same data until a data packet without code errors is received.

[0004] However, when the interference lasts for a long time, the above method may require multiple data packet retransmissions, resulting in a relatively long data transmission blocking time and poor real-time performance of data transmission. Summary of the invention

[0005] The embodiments of the present application provide a data processing method, device, electronic device and storage medium for efficiently and accurately correcting bit errors in data packets to improve the real-time performance of data transmission.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0007] If a retransmitted data packet is received and the retransmitted data packet has a code error, any historical data packet corresponding to the retransmitted data packet is compared with information in the same position field of the retransmitted data packet; wherein the historical data packet corresponding to the retransmitted data packet includes a data packet corresponding to the retransmitted data packet that previously had a code error;

[0008] Based on the comparison result, determine the target position field in the retransmitted data packet and the historical data packet; wherein the target position field is the same position field in which the information contained in the retransmitted data packet and the historical data packet is different;

[0009] The information in some target position fields of the retransmitted data packet and the historical data packet are swapped through a preset swapping method, and it is determined whether there are no errors in the swapped data packet; wherein the preset swapping method is to swap the information in the same position fields of the retransmitted data packet and the historical data packet.

[0010] The above scheme, when receiving a retransmitted data packet with errors, can determine which same position fields have different information between every two data packets with errors by comparing the information in the same position field of the retransmitted data packet with any corresponding historical data packet, and determine these position fields as target position fields. For every two data packets with errors, at least one of the target position fields of the data packet with errors has wrong information. By swapping the information in part of the target position fields of the two data packets with errors, if the position field of an error occurs in an error packet, but the same position field of the other data packet with which it is compared is correct, a swapped data packet without errors can be obtained, thereby efficiently and accurately correcting the errors in the data packets and improving the real-time performance of data transmission.

[0011] In some optional implementations, swapping information in some target location fields of the retransmitted data packet and the historical data packet in a preset swapping manner includes:

[0012] The information in any N target position fields of the retransmitted data packet and the historical data packet is swapped by a preset swapping method to obtain a plurality of swapped data packets; wherein N is a positive integer, and M is the total number of target location fields in the retransmitted data packet and the historical data packet, This is a floor operation.

[0013] The above scheme, by arbitrarily combining the target position fields of the above retransmitted data packets and less than half (rounded down) in the historical data packets, can obtain all possible reorganized data packets after the above retransmitted data packets and the historical data packets are swapped. In this way, as long as there is a data packet without bit errors in any position field, a swapped data packet without bit errors can be obtained, thereby maximizing the correction of bit errors in the data packets.

[0014] In some optional implementations, M≥2.

[0015] In some optional implementation manners, before comparing any historical data packet corresponding to the retransmitted data packet with information in the same position field of the retransmitted data packet, the method further includes:

[0016] Determine that the number of historical data packets corresponding to the retransmitted data packets does not exceed a preset number.

[0017] In the above scheme, if the number of historical data packets corresponding to the retransmitted data packet does not exceed the preset number, it means that the number of corresponding historical data packets is not too large, and the swap process and the verification process will not take too long. Therefore, in this scenario, information is swapped based on the retransmitted data packet and its corresponding historical data packets.

[0018] In some optional implementations, the method further comprises:

[0019] If the number of historical data packets corresponding to the retransmitted data packet exceeds a preset number, information is swapped based on the retransmitted data packet and the target historical data packet;

[0020] The target historical data packets are the preset number of data packets with the latest receiving time among the historical data packets corresponding to the retransmitted data packets.

[0021] In the above scheme, if the number of historical data packets corresponding to the retransmitted data packet exceeds the preset number, it means that the number of corresponding historical data packets is too large, and the swap process and verification process will take too long. Therefore, in this scenario, information is swapped based on the retransmitted data packet and its corresponding target historical data packets (preset number of historical data packets).

[0022] In some optional implementation manners, after determining whether there is no bit error in the swapped data packet, the method further includes:

[0023] If there are bit errors in all the swapped data packets, first information indicating a data reception error is sent to the other end, so that the other end continues to retransmit the data packet based on the first information; or

[0024] If there is no bit error in the swapped data packet, second information indicating that the data is received correctly is sent to the opposite end.

[0025] In the above scheme, if the swapped data packets all have bit errors, it means that the information in the non-target position field is wrong, or the information in the target position field in the two compared data packets is wrong, and it is necessary to request retransmission from the other end; if there are no bit errors in the swapped data packets, there is no need to request retransmission from the other end, thereby improving the real-time performance of data transmission.

[0026] In some optional implementations, the method further comprises:

[0027] If the retransmitted data packet has no bit errors, second information indicating that the data is received correctly is sent to the opposite end.

[0028] In the above scheme, if the retransmitted data packet has no bit errors, it means that the correct data has been received, and by sending the second information to the opposite end, the opposite end will no longer continue to send the data transmitted by the retransmitted data packet.

[0029] In a second aspect, an embodiment of the present application further provides a data processing device, including:

[0030] A comparison module, for comparing any historical data packet corresponding to the retransmitted data packet with information in the same position field of the retransmitted data packet if a retransmitted data packet is received and the retransmitted data packet has a code error; wherein the historical data packet corresponding to the retransmitted data packet includes a data packet corresponding to the retransmitted data packet that previously had a code error;

[0031] A position field processing module, used to determine the target position field in the retransmitted data packet and the historical data packet based on the comparison result; wherein the target position field is the same position field in which the information contained in the retransmitted data packet and the historical data packet is different;

[0032] The information swap module is used to swap the information in some target position fields of the retransmitted data packet and the historical data packet through a preset swap method, and determine whether there are no errors in the swapped data packet; wherein the preset swap method is to swap the information in the same position fields of the retransmitted data packet and the historical data packet.

[0033] In a third aspect, an embodiment of the present application provides an electronic device, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any data processing method described in the first aspect.

[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device executes any data processing method described in the first aspect above.

[0035] In addition, the technical effects brought about by any implementation method in the second to fourth aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A schematic diagram of a flow chart of a first data processing method provided in an embodiment of the present application;

[0038] Figure 2 A schematic diagram of a second data processing method provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0040] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0042] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0043] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0044] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal connection of two devices. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0045] During data transmission, physical transmission interference and other factors may cause data errors, and the receiver may receive a data packet with errors. In related technologies, after receiving a data packet with errors, the receiver can request the sender to retransmit the data packet corresponding to the same data until a data packet without errors is received.

[0046] However, when the interference lasts for a long time, the above method may require multiple data packet retransmissions, resulting in a relatively long data transmission blocking time and poor real-time performance of data transmission.

[0047] In some embodiments, after receiving a retransmitted data packet with errors, the receiver determines the target information in the corresponding position field based on the information that appears the most times in each position field of the retransmitted data packet and all its corresponding historical data packets, thereby splicing out a target data packet. If the target data packet does not have errors, the verification is passed and the sender does not need to continue to retransmit the data packet.

[0048] However, the above method requires a certain amount of erroneous data packets to be accumulated before the splicing operation can be performed. It takes a long time to correct the errors. Moreover, as the number of erroneous data packets gradually increases, the time taken to correct the errors will become longer and longer, and the real-time performance is poor. In addition, the above method determines the information that appears the most times in each position field in these erroneous data packets as the target information. When more erroneous data packets have errors in the same position field, more erroneous data packets are required to correct such errors. Therefore, the error correction effect of the above method is poor.

[0049] In view of this, an embodiment of the present application proposes a data processing method, device, electronic device and storage medium, the method comprising: if a retransmitted data packet is received and the retransmitted data packet has a code error, then any historical data packet corresponding to the retransmitted data packet is compared with the information in the same position field of the retransmitted data packet; wherein the historical data packet corresponding to the retransmitted data packet includes the data packet corresponding to the retransmitted data packet that previously had a code error; based on the comparison result, the target position field in the retransmitted data packet and the historical data packet is determined; wherein the target position field is the same position field that is different from the information contained in the retransmitted data packet and the historical data packet; the information in part of the target position fields of the retransmitted data packet and the historical data packet is swapped by a preset swap method, and it is determined whether there is no code error in the swapped data packet; wherein the preset swap method is to swap the information in the same position fields of the retransmitted data packet and the historical data packet with each other.

[0050] The above scheme, when receiving a retransmitted data packet with errors, can determine which same position fields have different information between every two data packets with errors by comparing the information in the same position field of the retransmitted data packet with any corresponding historical data packet, and determine these position fields as target position fields. For every two data packets with errors, at least one of the target position fields of the data packet with errors has wrong information. By swapping the information in part of the target position fields of the two data packets with errors, if the position field of an error occurs in an error packet, but the same position field of the other data packet with which it is compared is correct, a swapped data packet without errors can be obtained, thereby efficiently and accurately correcting the errors in the data packets and improving the real-time performance of data transmission.

[0051] The following will be combined with the accompanying drawings and specific embodiments to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0052] The present application embodiment provides a first data processing method, which is applied to an electronic device, such as Figure 1 As shown, the following steps are included:

[0053] Step S101: If a retransmitted data packet is received and the retransmitted data packet has errors, any historical data packet corresponding to the retransmitted data packet is compared with information in the same position field of the retransmitted data packet.

[0054] The historical data packets corresponding to the retransmitted data packets include the data packets previously having errors corresponding to the retransmitted data packets.

[0055] In this embodiment, after receiving a retransmitted data packet with errors, the opposite end is not requested to retransmit again. Instead, information is swapped based on the comparison result of the information in the same position field of the retransmitted data packet and its corresponding historical data packet. When there are no errors in the swapped data packet, there is no need to request retransmission again from the opposite end.

[0056] During implementation, the peer end can send data packets to the above-mentioned electronic devices through a variety of communication methods, such as Universal Asynchronous Receiver / Transmitter (Uart) communication, Serial Peripheral Interface (SPI) communication, Wireless-Fidelity (Wifi), Bluetooth, etc.

[0057] This embodiment does not specifically limit the division of the location field in the data packet, and the division method of the location field can be determined according to the characteristics of the physical communication. For example, in Bluetooth communication, data is usually transmitted in time slots as the time unit, and the data can be divided into location fields according to the amount of data transmitted in one time slot.

[0058] Step S102: Based on the comparison result, determine the target location fields in the retransmitted data packet and the historical data packet.

[0059] The target location field is the same location field in which the information contained in the retransmitted data packet is different from that contained in the historical data packet.

[0060] This embodiment does not specifically limit the above-mentioned information comparison method. Exemplarily, for the above-mentioned retransmitted data packet and any corresponding historical data packet, it is determined whether the information in the same position field of the two is the same. If different, the position field is determined as the target position field; otherwise, the field is determined as a non-target position field.

[0061] The following is a specific example:

[0062] The retransmitted data packet is recorded as data packet A, and its corresponding historical data packet is recorded as data packet B. The two data packets transmit the same data, so the division of the location field is also the same, including location field 1, location field 2, location field 3, location field 4 and location field 5, these five location fields;

[0063] The information in position field 1 of data packet A is information 1.1, the information in position field 2 is information 2.1, the information in position field 3 is information 3.1, the information in position field 4 is information 4.1, and the information in position field 5 is information 5.1;

[0064] The information in position field 1 of data packet B is information 1.2, the information in position field 2 is information 2.2, the information in position field 3 is information 3.2, the information in position field 4 is information 4.2, and the information in position field 5 is information 5.2;

[0065] Information 1.1 is the same as Information 1.2, Information 4.1 is the same as Information 4.2, Information 5.1 is the same as Information 5.2, but Information 2.1 is not the same as Information 2.2, and Information 3.1 is not the same as Information 3.2;

[0066] Therefore, for data packet A and data packet B, the target location fields are location field 2 and location field 3, which are the two location fields.

[0067] Another historical data packet corresponding to the data packet A is recorded as data packet C;

[0068] The information in position field 1 of data packet C is information 1.3, the information in position field 2 is information 2.3, the information in position field 3 is information 3.3, the information in position field 4 is information 4.3, and the information in position field 5 is information 5.3;

[0069] Information 1.1 is the same as Information 1.3, but Information 2.1 is different from Information 2.3, Information 3.1 is different from Information 3.3, Information 4.1 is different from Information 4.3, and Information 5.1 is different from Information 5.3;

[0070] Therefore, for data packet A and data packet C, the target location fields are location field 2, location field 3, location field 4, and location field 5, which are four location fields.

[0071] It can be understood that the above examples are only for explaining the target location field more clearly, and the present application is not limited thereto.

[0072] Step S103: swapping the information in some target position fields of the retransmitted data packet and the historical data packet in a preset swapping manner, and determining whether there is no error in the swapped data packet.

[0073] The preset swapping method is to swap the information of the same position fields of the retransmitted data packet and the historical data packet.

[0074] As described above, this embodiment needs to perform information swapping based on the comparison result of the information in the same position field of the retransmitted data packet and its corresponding historical data packet. Since the information in the target position field of at least one data packet is wrong in the two data packets with code errors, by swapping the information in part of the target position fields of the two data packets with code errors, if the position field of one data packet with code errors is wrong, the same position field of the other data packet with code errors is correct, and thus a swapped data packet without code errors can be obtained.

[0075] The preset swapping method in this embodiment is to swap the information of the same position field with each other, for example, to swap the information of field 4 in data packet A and data packet C, that is, to swap information 4.1 with information 4.3.

[0076] During implementation, corresponding methods can be used to determine whether there are no bit errors in the retransmitted data packets and the swapped data packets according to the actual application scenarios. For example, CRC check can be used to determine whether there are bit errors in each data packet, that is, the sender adds CRC check codes to the end, header and other areas of the data packet, and the receiver checks the data packet based on the CRC check code in the data packet to determine whether there are no bit errors.

[0077] The above scheme, when receiving a retransmitted data packet with errors, can determine which same position fields have different information between every two data packets with errors by comparing the information in the same position field of the retransmitted data packet with any corresponding historical data packet, and determine these position fields as target position fields. For every two data packets with errors, at least one of the target position fields of the data packet with errors has wrong information. By swapping the information in part of the target position fields of the two data packets with errors, if the position field of an error occurs in an error packet, but the same position field of the other data packet with which it is compared is correct, a swapped data packet without errors can be obtained, thereby efficiently and accurately correcting the errors in the data packets and improving the real-time performance of data transmission.

[0078] In some optional implementation manners, the above step S103 may be implemented by but not limited to the following methods:

[0079] The information in any N target position fields of the retransmitted data packet and the historical data packet is swapped by a preset swapping method to obtain a plurality of swapped data packets; wherein N is a positive integer, and M is the total number of target location fields in the retransmitted data packet and the historical data packet, This is a floor operation.

[0080] In addition, if M / 2 is an integer, the number of swaps

[0081] If M / 2 is not an integer, the number of swaps

[0082] Among them, the above The total number of swapped data packets T=2*Count.

[0083] Still taking the above data packet A, data packet B and data packet C as an example for explanation:

[0084] The target location fields between data packet A and data packet B are location field 2 and location field 3. The information in any one of the target location fields is swapped, that is, the information in location field 2 is swapped to obtain a swapped data packet 1 and a swapped data packet 2; the information in location field 1 of the swapped data packet 1 is information 1.1, the information in location field 2 is information 2.2, the information in location field 3 is information 3.1, the information in location field 4 is information 4.1, and the information in location field 5 is information 5.1; the information in location field 1 of the swapped data packet 2 is information 1.2, the information in location field 2 is information 2.1, the information in location field 3 is information 3.2, the information in location field 4 is information 4.2, and the information in location field 5 is information 5.2;

[0085] Alternatively, the information in the position field 3 is swapped to obtain a swapped data packet 1′ and a swapped data packet 2′; the information in the position field 1 in the swapped data packet 1′ is information 1.1, the information in the position field 2 is information 2.1, the information in the position field 3 is information 3.2, the information in the position field 4 is information 4.1, and the information in the position field 5 is information 5.1; the information in the position field 1 in the swapped data packet 2′ is information 1.2, the information in the position field 2 is information 2.2, the information in the position field 3 is information 3.1, the information in the position field 4 is information 4.2, and the information in the position field 5 is information 5.2;

[0086] It can be understood that since information 1.1 is the same as information 1.2, information 4.1 is the same as information 4.2, and information 5.1 is the same as information 5.2, the swapped data packet 1 is the same as the swapped data packet 2′, and the swapped data packet 2 is the same as the swapped data packet 1′.

[0087] The target location fields between data packet A and data packet C are location field 2, location field 3, location field 4, and location field 5. The information in any one of the target location fields is swapped, and the information in any two of the target location fields is swapped, that is:

[0088] Swap the information in the position field 2 to obtain a swapped data packet 3 and a swapped data packet 4; the information in the position field 1 of the swapped data packet 3 is information 1.1, the information in the position field 2 is information 2.3, the information in the position field 3 is information 3.1, the information in the position field 4 is information 4.1, and the information in the position field 5 is information 5.1; the information in the position field 1 of the swapped data packet 4 is information 1.3, the information in the position field 2 is information 2.1, the information in the position field 3 is information 3.3, the information in the position field 4 is information 4.3, and the information in the position field 5 is information 5.3;

[0089] Swap the information in the position field 3 to obtain a swapped data packet 5 and a swapped data packet 6; the information in the position field 1 of the swapped data packet 5 is information 1.1, the information in the position field 2 is information 2.1, the information in the position field 3 is information 3.3, the information in the position field 4 is information 4.1, and the information in the position field 5 is information 5.1; the information in the position field 1 of the swapped data packet 6 is information 1.3, the information in the position field 2 is information 2.3, the information in the position field 3 is information 3.1, the information in the position field 4 is information 4.3, and the information in the position field 5 is information 5.3;

[0090] The information in the position field 4 is swapped to obtain swapped data packets 7 and swapped data packets 8; the information in the position field 1 of the swapped data packet 7 is information 1.1, the information in the position field 2 is information 2.1, the information in the position field 3 is information 3.1, the information in the position field 4 is information 4.3, and the information in the position field 5 is information 5.1; the information in the position field 1 of the swapped data packet 8 is information 1.3, the information in the position field 2 is information 2.3, the information in the position field 3 is information 3.3, the information in the position field 4 is information 4.1, and the information in the position field 5 is information 5.3;

[0091] The information in the position field 5 is swapped to obtain swapped data packets 9 and 10; the information in the position field 1 in the swapped data packet 9 is information 1.1, the information in the position field 2 is information 2.1, the information in the position field 3 is information 3.1, the information in the position field 4 is information 4.1, and the information in the position field 5 is information 5.3; the information in the position field 1 in the swapped data packet 10 is information 1.3, the information in the position field 2 is information 2.3, the information in the position field 3 is information 3.3, the information in the position field 4 is information 4.3, and the information in the position field 5 is information 5.1;

[0092] Swap the information in the position fields 2 and 3 to obtain swapped data packets 11 and 12; in the swapped data packet 11, the information in the position field 1 is information 1.1, the information in the position field 2 is information 2.3, the information in the position field 3 is information 3.3, the information in the position field 4 is information 4.1, and the information in the position field 5 is information 5.1; in the swapped data packet 12, the information in the position field 1 is information 1.3, the information in the position field 2 is information 2.1, the information in the position field 3 is information 3.1, the information in the position field 4 is information 4.3, and the information in the position field 5 is information 5.3;

[0093] Swap the information in the position fields 2 and 4 to obtain swapped data packets 13 and 14; the information in the position field 1 in the swapped data packet 13 is information 1.1, the information in the position field 2 is information 2.3, the information in the position field 3 is information 3.1, the information in the position field 4 is information 4.3, and the information in the position field 5 is information 5.1; the information in the position field 1 in the swapped data packet 14 is information 1.3, the information in the position field 2 is information 2.1, the information in the position field 3 is information 3.3, the information in the position field 4 is information 4.1, and the information in the position field 5 is information 5.3;

[0094] The information in position fields 2 and 5 are swapped to obtain swapped data packets 15 and swapped data packets 16; in the swapped data packet 15, the information in position field 1 is information 1.1, the information in position field 2 is information 2.3, the information in position field 3 is information 3.1, the information in position field 4 is information 4.1, and the information in position field 5 is information 5.3; in the swapped data packet 16, the information in position field 1 is information 1.3, the information in position field 2 is information 2.1, the information in position field 3 is information 3.3, the information in position field 4 is information 4.3, and the information in position field 5 is information 5.1.

[0095] When the information in the other two position fields is swapped, the resulting data packet will be repeated with the swapped data packet, for example, swapping the information in position fields 2 and 3 is essentially the same as swapping the information in position fields 4 and 5; swapping the information in position fields 2 and 4 is essentially the same as swapping the information in position fields 3 and 5; swapping the information in position fields 2 and 5 is essentially the same as swapping the information in position fields 3 and 4. Therefore, in this example, a total of 16 swapped data packets are obtained.

[0096] The above examples are only intended to more clearly illustrate how to swap information, and this application is not limited thereto.

[0097] In addition, since the above embodiment swaps the information in some target location fields, and the partial target location is a positive integer greater than or equal to 1, when the total number of target location fields is less than 2, the information in some target location fields cannot be swapped. Therefore, the total number of target location fields in the above retransmission data packet and the above historical data packet is greater than or equal to 2.

[0098] The above scheme, by arbitrarily combining the target position fields of the above retransmitted data packets and less than half (rounded down) in the historical data packets, can obtain all possible reorganized data packets after swapping the above retransmitted data packets and the historical data. In this way, as long as there is a data packet without bit errors in any position field, a swapped data packet without bit errors can be obtained, thereby maximizing the correction of bit errors in the data packets.

[0099] In some optional implementation manners, after the above step S103, the following steps are further performed:

[0100] If there are bit errors in all the swapped data packets, first information indicating a data reception error is sent to the other end, so that the other end continues to retransmit the data packet based on the first information; or

[0101] If there is no bit error in the swapped data packet, second information indicating that the data is received correctly is sent to the opposite end.

[0102] This embodiment does not limit the specific implementation method of the first information and the second information. Exemplarily, the first information is a non-acknowledgement character (Non-Acknowledgement, NACK), and the second information is an acknowledgement character (Acknowledgement, ACK).

[0103] In the above scheme, if the swapped data packets all have bit errors, it means that the information in the non-target position field is wrong, or the information in the target position field in the two compared data packets is wrong, and it is necessary to request retransmission from the other end; if there are no bit errors in the swapped data packets, there is no need to request retransmission from the other end, thereby improving the real-time performance of data transmission.

[0104] The present application embodiment provides a second data processing method, such as Figure 2 As shown, the following steps are included:

[0105] Step S201: If a retransmitted data packet is received and the retransmitted data packet has a code error, it is determined whether the number of historical data packets corresponding to the retransmitted data packet exceeds a preset number.

[0106] Since this embodiment needs to compare the information in the same position field of the retransmitted data packet with each of its corresponding historical data packets one by one, if the number of corresponding historical data packets is too large, the swap process and the verification process of the swapped data packets will take too long.

[0107] Based on this, this embodiment determines whether the number of historical data packets corresponding to the retransmitted data packet exceeds the preset number. If the number of historical data packets corresponding to the retransmitted data packet does not exceed the preset number, it means that the number of corresponding historical data packets is not too large, and the above-mentioned swapping process and verification process will not take too long. Therefore, in this scenario, steps S202 to S204 are executed to swap information based on the retransmitted data packet and its corresponding historical data packets; if the number of historical data packets corresponding to the retransmitted data packet exceeds the preset number, it means that the number of corresponding historical data packets is too large, and the above-mentioned swapping process and verification process will take too long. Therefore, steps S205 to S207 are executed in this scenario to swap information based on the retransmitted data packet and its corresponding target historical data packets (preset number of historical data packets).

[0108] The above preset quantity can be set according to the actual application scenario.

[0109] Step S202: Compare any historical data packet corresponding to the retransmitted data packet with information in the same position field of the retransmitted data packet.

[0110] Step S203: Based on the comparison result, determine the target location fields in the retransmitted data packet and the historical data packet.

[0111] Step S204: swapping the information in some target location fields of the retransmitted data packet and the historical data packet in a preset swapping manner, and determining whether there is no error in the swapped data packet.

[0112] The steps S202 to S204 may refer to the above-mentioned embodiment and will not be described in detail here.

[0113] Step S205: Compare any target historical data packet corresponding to the retransmitted data packet with the information in the same position field of the retransmitted data packet.

[0114] The target historical data packets are the preset number of data packets with the latest receiving time among the historical data packets corresponding to the retransmitted data packets.

[0115] Step S206: Based on the comparison result, determine the target location field in the retransmitted data packet and the target historical data packet.

[0116] Step S207: swapping the information in the part of the target position fields of the retransmitted data packet and the target historical data packet in a preset swapping manner, and determining whether there is no error in the swapped data packet.

[0117] The following is a specific example:

[0118] In this example, the preset number is 3, and the retransmitted data packet is recorded as data packet A;

[0119] If data packet A corresponds to three historical data packets (data packet B, data packet C and data packet D), information is swapped based on data packet A and data packet B; information is swapped based on data packet A and data packet C; information is swapped based on data packet A and data packet D;

[0120] If data packet A corresponds to 4 historical data packets, these 4 historical data packets are sorted from earliest to latest according to the receiving time as data packet E, data packet F, data packet G and data packet H; wherein the target historical data packets are data packet F, data packet G and data packet H; information is swapped based on data packet A and data packet F; information is swapped based on data packet A and data packet G; information is swapped based on data packet A and data packet H;

[0121] The above examples are only intended to more clearly illustrate how to swap information in different scenarios, but this application does not limit its specific implementation.

[0122] In the above scheme, if the number of historical data packets corresponding to the retransmitted data packet does not exceed the preset number, it means that the number of corresponding historical data packets is not too large, and the swap process and the verification process will not take too long. Therefore, in this scenario, information is swapped based on the retransmitted data packet and its corresponding historical data packets; if the number of historical data packets corresponding to the retransmitted data packet exceeds the preset number, it means that the number of corresponding historical data packets is too large, and the swap process and the verification process will take too long. Therefore, in this scenario, information is swapped based on the retransmitted data packet and its corresponding target historical data packets (preset number of historical data packets) to meet the needs of different application scenarios.

[0123] In some optional implementation manners, the above method further comprises: if the retransmitted data packet has no bit errors, sending second information indicating that the data is received correctly to the opposite end.

[0124] The specific implementation method of the second information can refer to the above embodiment and will not be repeated here.

[0125] In this embodiment, if the retransmitted data packet has no bit errors, it means that the correct data has been received, and by sending the second information to the opposite end, the opposite end no longer continues to send the data transmitted by the retransmitted data packet.

[0126] Based on the same inventive concept, the present application embodiment provides a data processing device, referring to Figure 3 As shown, the data processing device 300 includes:

[0127] The comparison module 301 is used for comparing any historical data packet corresponding to the retransmitted data packet with information in the same position field of the retransmitted data packet if a retransmitted data packet is received and the retransmitted data packet has a code error; wherein the historical data packet corresponding to the retransmitted data packet includes a data packet corresponding to the retransmitted data packet that previously had a code error;

[0128] The position field processing module 302 is used to determine the target position field in the retransmitted data packet and the historical data packet based on the comparison result; wherein the target position field is the same position field in which the information contained in the retransmitted data packet and the historical data packet is different;

[0129] The information swap module 303 is used to swap the information in some target position fields of the retransmitted data packet and the historical data packet through a preset swap method, and determine whether there are no errors in the swapped data packet; wherein the preset swap method is to swap the information in the same position fields of the retransmitted data packet and the historical data packet.

[0130] In some optional implementation manners, the information exchange module 303 is specifically configured to:

[0131] The information in any N target position fields of the retransmitted data packet and the historical data packet is swapped by a preset swapping method to obtain a plurality of swapped data packets; wherein N is a positive integer, and M is the total number of target location fields in the retransmitted data packet and the historical data packet, This is a floor operation.

[0132] In some optional implementations, M≥2.

[0133] In some optional implementation manners, before comparing any historical data packet corresponding to the retransmitted data packet with the information in the same position field of the retransmitted data packet, the comparison module 301 is further configured to:

[0134] Determine that the number of historical data packets corresponding to the retransmitted data packets does not exceed a preset number.

[0135] In some optional implementations, the device further includes a data packet processing module 304, configured to:

[0136] If the number of historical data packets corresponding to the retransmitted data packet exceeds a preset number, information is swapped based on the retransmitted data packet and the target historical data packet;

[0137] The target historical data packets are the preset number of data packets with the latest receiving time among the historical data packets corresponding to the retransmitted data packets.

[0138] In some optional implementation manners, after determining whether there is no bit error in the swapped data packet, the information swap module 303 is further configured to:

[0139] If there are bit errors in all the swapped data packets, first information indicating a data reception error is sent to the other end, so that the other end continues to retransmit the data packet based on the first information; or

[0140] If there is no bit error in the swapped data packet, second information indicating that the data is received correctly is sent to the opposite end.

[0141] In some optional implementation manners, the information exchange module 303 is further used to:

[0142] If the retransmitted data packet has no bit errors, second information indicating that the data is received correctly is sent to the opposite end.

[0143] Since the device is the device in the method in the embodiment of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0144] Based on the same technical concept, the embodiment of the present application also provides an electronic device 400, such as Figure 4 As shown, it includes at least one processor 401 and a memory 402 connected to the at least one processor. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 For example, the processor 401 and the memory 402 are connected via a bus 403. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0145] Among them, the processor 401 is the control center of the electronic device, which can use various interfaces and lines to connect various parts of the electronic device, and realize data processing by running or executing instructions stored in the memory 402 and calling data stored in the memory 402. Optionally, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes the issuance of instructions. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0146] Processor 401 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the data processing method embodiment can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.

[0147] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0148] In the embodiment of the present application, the memory 402 stores a computer program. When the program is executed by the processor 401, the processor 401 executes:

[0149] If a retransmitted data packet is received and the retransmitted data packet has a code error, any historical data packet corresponding to the retransmitted data packet is compared with information in the same position field of the retransmitted data packet; wherein the historical data packet corresponding to the retransmitted data packet includes a data packet corresponding to the retransmitted data packet that previously had a code error;

[0150] Based on the comparison result, determining the target position field in the retransmitted data packet and the historical data packet; wherein the target position field is the same position field in which the information contained in the retransmitted data packet and the historical data packet is different;

[0151] The information in some target position fields of the retransmitted data packet and the historical data packet are swapped through a preset swapping method, and it is determined whether there are no errors in the swapped data packet; wherein the preset swapping method is to swap the information in the same position fields of the retransmitted data packet and the historical data packet.

[0152] In some optional implementation manners, the processor 401 specifically performs:

[0153] The information in any N target position fields of the retransmitted data packet and the historical data packet is swapped by a preset swapping method to obtain a plurality of swapped data packets; wherein N is a positive integer, and M is the total number of target location fields in the retransmitted data packet and the historical data packet, This is a floor operation.

[0154] In some optional implementations, M≥2.

[0155] In some optional implementation manners, before comparing any historical data packet corresponding to the retransmitted data packet with information in the same position field of the retransmitted data packet, the processor 401 further executes:

[0156] Determine that the number of historical data packets corresponding to the retransmitted data packets does not exceed a preset number.

[0157] In some optional implementations, the processor 401 further executes:

[0158] If the number of historical data packets corresponding to the retransmitted data packet exceeds a preset number, information is swapped based on the retransmitted data packet and the target historical data packet;

[0159] The target historical data packets are the preset number of data packets with the latest receiving time among the historical data packets corresponding to the retransmitted data packets.

[0160] In some optional implementation manners, after determining whether there is no bit error in the swapped data packet, the processor 401 further executes:

[0161] If there are bit errors in all the swapped data packets, first information indicating a data reception error is sent to the other end, so that the other end continues to retransmit the data packet based on the first information; or

[0162] If there is no bit error in the swapped data packet, second information indicating that the data is received correctly is sent to the opposite end.

[0163] In some optional implementations, the processor 401 further executes:

[0164] If the retransmitted data packet has no bit errors, second information indicating that the data is received correctly is sent to the opposite end.

[0165] Since the electronic device is the electronic device in the method in the embodiment of the present application, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0166] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program that can be executed by an electronic device. When the program runs on the electronic device, the electronic device executes the steps of the above-mentioned data processing method.

[0167] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0168] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0171] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0172] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A data processing method, It is characterized in that The method includes: If a retransmitted data packet is received and the retransmitted data packet has a code error, any historical data packet corresponding to the retransmitted data packet is compared with information in the same position field of the retransmitted data packet; wherein the historical data packet corresponding to the retransmitted data packet includes a data packet corresponding to the retransmitted data packet that previously had a code error; Based on the comparison result, determine the target position field in the retransmitted data packet and the historical data packet; wherein the target position field is the same position field in which the information contained in the retransmitted data packet and the historical data packet is different; The information in some target position fields of the retransmitted data packet and the historical data packet are swapped through a preset swapping method, and it is determined whether there are no errors in the swapped data packet; wherein the preset swapping method is to swap the information in the same position fields of the retransmitted data packet and the historical data packet.

2. The method according to claim 1, It is characterized in that Swapping information in some target location fields of the retransmitted data packet and the historical data packet in a preset swapping manner includes: The information in any N target position fields of the retransmitted data packet and the historical data packet is swapped by a preset swapping method to obtain a plurality of swapped data packets; wherein N is a positive integer, and M is the total number of target location fields in the retransmitted data packet and the historical data packet, This is a floor operation.

3. The method according to claim 2, It is characterized in that M≥2。 4. The method according to claim 1, It is characterized in that Before comparing any historical data packet corresponding to the retransmitted data packet with information in the same position field of the retransmitted data packet, the method further includes: Determine that the number of historical data packets corresponding to the retransmitted data packets does not exceed a preset number.

5. The method according to claim 4, It is characterized in that The method further comprises: If the number of historical data packets corresponding to the retransmitted data packet exceeds a preset number, information is swapped based on the retransmitted data packet and the target historical data packet; The target historical data packets are the preset number of data packets with the latest receiving time among the historical data packets corresponding to the retransmitted data packets.

6. The method according to claim 1, It is characterized in that After determining whether there is no bit error in the swapped data packet, the method further includes: If there are bit errors in all the swapped data packets, first information indicating a data reception error is sent to the other end, so that the other end continues to retransmit the data packet based on the first information; or If there is no bit error in the swapped data packet, second information indicating that the data is received correctly is sent to the opposite end.

7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises: If the retransmitted data packet has no bit errors, second information indicating that the data is received correctly is sent to the opposite end.

8. A data processing device, It is characterized in that include: A comparison module, for comparing any historical data packet corresponding to the retransmitted data packet with information in the same position field of the retransmitted data packet if a retransmitted data packet is received and the retransmitted data packet has a code error; wherein the historical data packet corresponding to the retransmitted data packet includes a data packet corresponding to the retransmitted data packet that previously had a code error; A position field processing module, used to determine the target position field in the retransmitted data packet and the historical data packet based on the comparison result; wherein the target position field is the same position field in which the information contained in the retransmitted data packet and the historical data packet is different; The information swap module is used to swap the information in some target position fields of the retransmitted data packet and the historical data packet through a preset swap method, and determine whether there are no errors in the swapped data packet; wherein the preset swap method is to swap the information in the same position fields of the retransmitted data packet and the historical data packet.

9. An electronic device, It is characterized in that The method comprises at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that It stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device executes the method according to any one of claims 1 to 7.