A data packet processing method, communication device and communication system
By using the first CRC and the second CRC in the data packet for verification and processing the data packet according to the verification results of the packet header, the problem of low processing efficiency of verification failed packets in the prior art is solved, and higher data transmission efficiency and system capacity are achieved.
Patent Information
- Application Number
- CN202111450373.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-11-30
Smart Images

Figure CN114499750B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data packet processing method, a communication device and a communication system. Background Art
[0002] When devices communicate with each other, they need to send and receive data, for example, a first device sends data to a second device, or a second device sends data to a first device.
[0003] In order to increase the data transmission rate, a business message is generally split into multiple data packets for transmission, and then the receiver assembles the multiple received data packets to obtain a complete business message. Figure 1 The figure shows an example of a service message. A service message is split into n data packets and sent in sequence, where n is an integer greater than 1.
[0004] In order to ensure the accuracy of data reception, the receiver needs to verify each data packet after receiving it. If a data packet fails to be verified, it indicates that an error occurred during the transmission of the data packet. For data packets that fail to be verified, they are generally discarded directly. Summary of the invention
[0005] The embodiments of the present application provide a data packet processing method, a communication device, and a communication system to improve data transmission efficiency and system capacity.
[0006] In a first aspect, an embodiment of the present application provides a method for processing a data packet, which can be executed by a second device or a module (such as a chip) applied to the second device. The method includes: receiving a data packet from a first device, the data packet including a header, data, a first cyclic redundancy check (CRC) and a second CRC; verifying the data packet according to the first CRC in the data packet; verifying the header of the data packet according to the second CRC in the data packet; and processing the data packet according to the verification result of the data packet and / or the verification result of the header.
[0007] In a possible implementation method, the data packet is processed according to the verification result of the data packet and / or the verification result of the packet header, including: if the data packet verification is successful, or if the data packet verification is successful and the packet header verification is successful, the data packet is not discarded; or, if the data packet verification fails and the packet header verification fails, the data packet is discarded; or, if the data packet verification fails but the packet header verification is successful, the data packet is processed according to the type of the data packet.
[0008] According to the above scheme, the data packet carries a first CRC for verifying the data packet and a second CRC for verifying the header of the data packet. When the data packet verification fails but the header verification succeeds, it indicates that the header transmission is correct but the data transmission is wrong. At this time, the second device can process the data packet according to the type of the data packet instead of directly discarding the data packet. In this way, the number of packet losses can be reduced, thereby improving data transmission efficiency and system capacity.
[0009] In a possible implementation method, the packet header of the data packet is checked according to the second CRC in the data packet, which may be: if the packet check fails, the packet header of the data packet is checked according to the second CRC in the data packet. If the packet check fails, indicating that an error occurred during the transmission of the data packet, the packet header of the data packet is further checked according to the second CRC in the data packet to determine whether an error occurred in the packet header. If the packet check succeeds, indicating that no error occurred during the transmission of the data packet, it is no longer necessary to check the packet header of the data packet according to the second CRC, thereby reducing the number of checks and improving the speed of the check.
[0010] In one possible implementation method, if the data packet verification fails, the data packet is marked. That is, if the data packet verification fails, the data packet is not discarded, but marked, for example, it can be marked with special characters or specific bits (or bit positions), etc., indicating that the data packet is a data packet that needs further judgment, and then the second CRC is used to verify the header of the data packet, and based on the verification result of the second CRC, it is decided whether to discard the data packet or not. The mark can also be used to indicate or prompt the module or device that performs the next step of processing on this data packet that there is an error in the data in the data packet.
[0011] In a possible implementation method, the data packet is processed according to its type, which may be: if the type of the data packet is user plane data, the data packet is not discarded; or if the type of the data packet is control plane data, the data packet is discarded.
[0012] According to the above scheme, if the type of the data packet is user-plane data, it means that the packet header of the data packet is transmitted correctly, the data in the data packet has a transmission error, and the data is user-plane data. In this case, although some errors occur in the transmitted user-plane data, since the packet header is transmitted correctly, the user-plane data can be processed correctly, and the error in the user-plane data may slightly affect the user experience, but will not actually cause other more serious effects. Therefore, the second device may not discard the data packet, and this method can improve data transmission efficiency and system capacity. If the type of the data packet is control-plane data, it means that the packet header of the data packet is transmitted correctly, the data in the data packet has a transmission error, and the data is control-plane data. In this case, although the packet header is transmitted correctly, the transmitted control-plane data has an error. Since the consequences of the error in the control-plane data are relatively serious, the second device discards the data packet.
[0013] In a possible implementation method, before processing the data packet according to the type of the data packet, the type of the data packet is first determined according to the packet header.
[0014] In a possible implementation method, if the second device determines not to discard the data packet, it may also delete the second CRC from the data packet.
[0015] According to the above method, deleting the second CRC from the data packet can simplify the process or complexity of subsequent processing, reduce changes to the processing module, and reduce the amount of data that needs to be transmitted within the second device or the amount of data that the second device needs to transmit to other devices or modules.
[0016] In a possible implementation method, the first CRC is located at the end of the data packet, and the second CRC is located after the header of the data packet.
[0017] In a possible implementation method, the first CRC is generated based on the header of the data packet, the data of the data packet and the second CRC. Alternatively, the first CRC is generated based on the header of the data packet and the data of the data packet.
[0018] In a possible implementation method, the second CRC is generated according to the header of the data packet.
[0019] In this solution, since the second CRC is generated according to the packet header, the second CRC can be used to verify the transmission correctness of the packet header, thereby ensuring the correct transmission of the packet header.
[0020] In a possible implementation method, the second CRC is generated according to the header of the data packet and part of the data in the data packet.
[0021] This solution can insert the second CRC at a fixed length position after the starting position of the data packet. Therefore, the second CRC may divide the original data into a first part of data before the second CRC and a second part of data after the second CRC. The second CRC can be generated based on the packet header and the first part of data before the second CRC. On the one hand, since the second CRC is generated based on the packet header and part of the data, the second CRC can be used to verify the transmission correctness of the packet header, thereby ensuring the correct transmission of the packet header. On the other hand, since the second CRC is inserted at a fixed position after the starting position of the data packet, the generation and insertion method of the second CRC can be simplified, thereby increasing the generation speed of the data packet.
[0022] In a possible implementation method, the data packet is an enhanced common public radio interface (eCPRI) data packet, and the data in the data packet includes eCPRI data.
[0023] In a second aspect, an embodiment of the present application provides a method for processing a data packet, which can be performed by a first device or a module (such as a chip) applied to the first device. The method includes: generating a data packet, the data packet including a header, data, a first CRC and a second CRC, the first CRC is used to verify the data packet, and the second CRC is used to verify the header; sending the data packet to a second device.
[0024] According to the above solution, the data packet carries a first CRC for verifying the data packet and a second CRC for verifying the header of the data packet. Therefore, after receiving the data packet, the second device can determine the processing method of the data packet according to the first CRC and the second CRC.
[0025] In a possible implementation method, the second CRC is generated according to the packet header.
[0026] In this solution, since the second CRC is generated according to the packet header, the second CRC can be used to verify the transmission correctness of the packet header, thereby ensuring the correct transmission of the packet header.
[0027] In a possible implementation method, the second CRC is generated according to the packet header, which may be specifically: the second CRC is generated according to part of the data and the packet header.
[0028] This solution can insert the second CRC at a fixed length position after the starting position of the data packet. Therefore, the second CRC may divide the original data into a first part of data before the second CRC and a second part of data after the second CRC. The second CRC can be generated based on the packet header and the first part of data before the second CRC. On the one hand, since the second CRC is generated based on the packet header and part of the data, the second CRC can be used to verify the transmission correctness of the packet header, thereby ensuring the correct transmission of the packet header. On the other hand, since the second CRC is inserted at a fixed position after the starting position of the data packet, the generation and insertion method of the second CRC can be simplified, thereby increasing the generation speed of the data packet.
[0029] In a possible implementation method, the first CRC is generated according to the packet header and the data.
[0030] In a possible implementation method, the first CRC is generated according to the packet header, the data and the second CRC.
[0031] In this solution, since the first CRC is generated according to the packet header, the data and the second CRC, the first CRC can be used to verify the transmission correctness of the data packet, thereby ensuring the correct transmission of the data packet.
[0032] In a possible implementation method, the first CRC is located at the end of the data packet, and the second CRC is located after the header of the data packet.
[0033] In a possible implementation method, the data packet is an eCPRI data packet, and the data in the data packet includes eCPRI data.
[0034] In a possible implementation method, the packet header indicates the type of the data packet, and the type of the data packet is user plane data or control plane data.
[0035] In a third aspect, an embodiment of the present application provides a communication device, which may be a second device or a module (such as a chip) applied to a second device. The device has the function of implementing any implementation method of the first aspect described above. The function may be implemented by hardware, or by hardware executing corresponding software implementation. The hardware or software includes one or more modules corresponding to the above functions.
[0036] In a fourth aspect, an embodiment of the present application provides a communication device, which may be a first device or a module (such as a chip) applied to the first device. The device has the function of implementing any implementation method of the second aspect above. The function may be implemented by hardware, or by hardware executing corresponding software implementation. The hardware or software includes one or more modules corresponding to the above functions.
[0037] In a fifth aspect, an embodiment of the present application provides a communication device, comprising at least one processor, wherein the at least one processor is used to couple with a memory, read and execute instructions in the memory, so as to implement any implementation method in the first aspect to the second aspect. The memory may be located inside the device or outside the device.
[0038] In a sixth aspect, an embodiment of the present application provides a communication device, comprising a processor and a memory; the memory is used to store computer instructions, and when the device is running, the processor executes the computer instructions stored in the memory so that the device executes any implementation method in the above-mentioned first aspect to the second aspect.
[0039] In a seventh aspect, an embodiment of the present application provides a communication device, comprising a unit or means for executing each step of any implementation method in the first to second aspects above.
[0040] In an eighth aspect, an embodiment of the present application provides a communication device, including a processor and an interface circuit, wherein the processor is used to communicate with other devices through the interface circuit and execute any implementation method in the first to second aspects above. The processor includes one or more.
[0041] In the ninth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a communication device, any implementation method in the above-mentioned first to second aspects is executed.
[0042] In the tenth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a communication device, any implementation method in the above-mentioned first to second aspects is executed.
[0043] In the eleventh aspect, an embodiment of the present application further provides a chip system, comprising: a processor, configured to execute any implementation method in the above-mentioned first aspect to the second aspect.
[0044] In a twelfth aspect, an embodiment of the present application further provides a communication system, comprising: a second device for executing any implementation method of the above-mentioned first aspect, and a first device for executing any implementation method of the above-mentioned second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is an example diagram of a business message;
[0046] Figure 2 A flowchart of a method for processing a data packet provided in an embodiment of the present application;
[0047] FIG3( a) is a schematic diagram of a data packet format provided in an embodiment of the present application;
[0048] FIG3( b ) is another schematic diagram of a data packet format provided in an embodiment of the present application;
[0049] FIG4( a ) is an example diagram of an existing eCPRI-based service message;
[0050] FIG4( b) is a schematic diagram of inserting a CRC into a service data packet according to an embodiment of the present application;
[0051] Figure 5 A schematic diagram of the structure of the first device and the second device provided in the embodiment of the present application;
[0052] Figure 6 A schematic diagram of a communication device provided in an embodiment of the present application;
[0053] Figure 7 A schematic diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] refer to Figure 2 , is a flow chart of a method for processing a data packet provided in an embodiment of the present application. In this embodiment, the first device acts as a sender and the second device acts as a receiver. Of course, the method is also applicable when the second device acts as a sender and the first device acts as a receiver. Exemplarily, the first device may be a baseband unit (BBU), a centralized unit (CU) or a distributed unit (DU) and other communication devices or functional modules having a baseband signal processing function, and the second device is a radio unit (RU), where the RU may be, for example, a remote radio unit (RRU) or an adaptive antenna unit (AAU) and other communication devices or functional modules having a function of processing intermediate frequency signals, radio frequency signals or intermediate radio frequency signals. Alternatively, the first device is an RU and the second device is a BBU. The interface between the first device and the second device may be an eCPRI or other type of interface, which is not limited in the embodiment of the present application.
[0055] The method comprises the following steps:
[0056] Step 201: A first device generates a data packet, which includes a header, data, a first CRC, and a second CRC.
[0057] The first CRC is used to verify the data packet. Optionally, the first device may generate the first CRC based on the packet header and the data, or the first device may generate the first CRC based on the packet header, the data and the second CRC.
[0058] The second CRC is used to verify the packet header. Optionally, the first device generates the second CRC according to the packet header, or the first device generates the second CRC according to the packet header and part of the data.
[0059] The packet header of the data packet indicates the type of the data packet, which is user plane data or control plane data. The type of the data packet is user plane data, which means that the data of the data packet is all user plane data, or contains user plane data and other data. The type of the data packet is control plane data, which means that the data of the data packet is all control plane data, or contains control plane data and other data. Optionally, if the data packet contains control plane data, the type of the data packet is control plane data. The type of the data packet can also be understood as the type of data in the data packet.
[0060] The user plane data refers to actual service data, such as voice data, packet service data, etc. The control plane data refers to control messages or signaling, such as cell establishment messages, cell release messages, or messages related to operation and maintenance, etc.
[0061] The embodiment of the present application does not limit the packetization form of the data packet, that is, it does not limit the relative positional relationship between the header, data, first CRC, and second CRC in the data packet. For example, the first CRC is located at the end of the data packet, and the second CRC is located after the header of the data packet. For another example, the first CRC is located at the end of the data packet, and the second CRC is located between the header and the data.
[0062] Optionally, the data in the data packet includes critical information that needs to be protected (e.g., information that affects the way the data packet is processed) and business data, where the critical information includes, for example, the eCPRI type. In this case, the second CRC can be inserted after the packet header and the critical information, and generated based on the packet header and the critical information, so that the correct transmission of the critical information can be guaranteed by the second CRC. Exemplarily, the data in the data packet includes the eCPRI type and the eCPRI data, then the second CRC can be inserted after the eCPRI type.
[0063] The following is an example of the packaging form of the data packet with reference to the accompanying drawings.
[0064] Refer to Figure 3(a), which is a schematic diagram of the data packet format. Among them, the second CRC is located between the packet header and the data, specifically, the second CRC is located after the packet header and before the data. The first CRC is located at the end of the data packet. The second CRC is generated based on the packet header, the first CRC is generated based on the packet header and the data, or based on the packet header, the second CRC and the data. It should be noted that for different data packets, the size of the packet header may be different, so the distance between the starting position of the second CRC and the starting position of the packet header in different data packets may be different. Based on this implementation method, the size of the packet header can be known in advance, so that the second CRC can be inserted after the packet header according to the size of the packet header.
[0065] Refer to Figure 3 (b), which is another schematic diagram of the data packet format. Among them, the second CRC is located in the data. After the second CRC is inserted, the original data is divided into two parts by the second CRC. The part of the data before the second CRC is called data_1, and the part of the data after the second CRC is called data_2. The combination of data_1 and data_2 is the original data. The first CRC is located at the end of the data packet. The second CRC is generated based on the header and data_1, and the first CRC is generated based on the header and data, or based on the header, the second CRC and data. Based on the implementation method, a length (hereinafter referred to as the preset length) can be preset, and the insertion position of the second CRC (that is, the starting position of the second CRC, hereinafter referred to as the first position) is the starting position of the header + the preset length. Exemplarily, the preset length is greater than or equal to the first length, and the first length can be the maximum length of various known header lengths, so that it can be ensured that the second CRC can be inserted after the header, and the second CRC will not be inserted in the header, so that the integrity of the header can be guaranteed. It should be noted that, since the length of the header of different data packets may be different, the bit size of data_1 before the second CRC may be different for different data packets. For example, the preset length is 100 bits, the header of data packet x is 60 bits, then the bit size of data_1 in data packet x is 40 bits, the header of data packet y is 70 bits, then the bit size of data_1 in data packet y is 30 bits.
[0066] Step 202: The first device sends a data packet to the second device. Correspondingly, the second device receives the data packet.
[0067] The first device may send the data packet to the second device through an interface between the first device and the second device, or the first device may send the data packet to the second device through forwarding by one or more third-party devices.
[0068] Step 203: The second device checks the data packet according to the first CRC in the data packet.
[0069] For example, after receiving the data packet, the second device obtains the first CRC in the data packet, and generates a third CRC according to other parts of the data packet except the first CRC (for example, the header, the second CRC and the data).
[0070] If the first CRC is the same as the third CRC, the data packet is successfully verified, indicating that no error occurs during the transmission of the data packet.
[0071] If the first CRC is different from the third CRC, the data packet verification fails, indicating that an error occurred in the data packet during transmission, wherein the error may be in the packet header, in the second CRC, in the data, or in the first CRC.
[0072] Step 204: The second device checks the header of the data packet according to the second CRC in the data packet.
[0073] The second device obtains the second CRC in the data packet, and generates a fourth CRC according to the portion of the data packet before the second CRC. The portion before the second CRC may be a packet header, such as the example of reference FIG3(a), or the portion before the second CRC may be a packet header and data_1, such as the example of reference FIG3(b).
[0074] If the second CRC is the same as the fourth CRC, the header check of the data packet is successful, indicating that no error occurs in the header of the data packet during transmission.
[0075] If the second CRC is different from the fourth CRC, the header check of the data packet fails, indicating that an error occurred in the header of the data packet during transmission. Among them, for the example of Figure 3(a), if the second CRC is different from the fourth CRC, it indicates that the header check of the data packet fails, that is, there are bits in the header where transmission errors occurred. For the example of Figure 3(b), if the second CRC is different from the fourth CRC, it may be that there are bits in the header where transmission errors occurred, or there may be bits in the data_1 where transmission errors occurred. However, in actual applications, generally, data_1 accounts for a very small proportion of the data. Therefore, for the example of Figure 3(b), if the second CRC is different from the fourth CRC, it indicates that an error occurred in the header or data_1, but no distinction can be made. It is uniformly considered that the header check of the data packet failed, that is, it is considered that there are bits in the header where transmission errors occurred.
[0076] Step 205: The second device processes the data packet according to the verification result of the data packet and / or the verification result of the packet header.
[0077] Two different specific implementation methods of step 203 to step 205 are introduced below.
[0078] Implementation method 1: The second device executes the above step 203 to obtain the verification result of the data packet, and also executes the above step 204 to obtain the verification result of the packet header, and processes the data packet according to the verification result of the data packet and / or the verification result of the packet header.
[0079] The execution order of the above steps 203 and 204 is not limited. For example, step 203 may be executed first and then step 204, or step 204 may be executed first and then step 203, or these two steps may be executed in parallel in no particular order.
[0080] In the first implementation method, the second device processes the data packet according to the verification result of the data packet and / or the verification result of the packet header, which can be specifically divided into the following situation 1 and situation 2.
[0081] Scenario 1: If the data packet verification is successful, indicating that no error occurred during the transmission of the data packet, the second device does not discard the data packet. The "not discarding" described in the embodiments of the present application may be, for example, saving, retaining, continuing to process, transmitting to the next level data processing module for further processing, etc. The "discarding" described in the embodiments of the present application may include deletion, being overwritten by other data, not continuing to process, or not transmitting to the next level data processing module, etc., which are uniformly explained here and will not be repeated later. Optionally, if the second CRC is located in the data, the second device can obtain the data in the data packet after deleting the second CRC. For example, referring to Figure 3(b), after the second device deletes the second CRC, the data in the data packet can be obtained according to data_1 and data_2.
[0082] Among them, the successful verification of the data packet means that there is no transmission error in the packet header and the data, so it can be considered that the packet header will also be successfully verified. Therefore, the successful verification of the data packet can indicate that the verification of the data packet is successful and the verification of the packet header is successful.
[0083] In case 2, if the packet verification fails, it indicates that an error occurred in the transmission of the packet. The error may be in the packet header, the second CRC, the data, or the first CRC. In this case, the second device may not discard the packet, but decide how to process the packet based on the verification result of the packet header. Therefore, case 2 can be divided into the following cases 2.1 and 2.2.
[0084] In case 2.1, the data packet verification fails but the packet header verification succeeds, indicating that a transmission error occurs in the data packet but the location of the error is not in the packet header, that is, no transmission error occurs in the packet header. This situation can be understood as a transmission error in the data of the data packet. In this case, the second device can process the data packet according to the type of the data packet. For the example of Figure 3(a), it means that a transmission error occurs in the data and / or the first CRC. For the example of Figure 3(b), it means that a transmission error occurs in the data_2 and / or the first CRC in the data.
[0085] The second device may determine the type of the data packet based on the packet header. For example, the packet header may include the type of the data packet, or include indication information for indicating the type of the data packet, or the packet header itself may correspond to the type of the data packet.
[0086] As an implementation method, the second device processes the data packet according to the type of the data packet, for example: if the type of the data packet is user plane data, the data packet is not discarded; if the type of the data packet is control plane data, the data packet is discarded.
[0087] Specifically, if the type of the data packet is user plane data, it means that the header of the data packet is transmitted correctly, a transmission error occurs in the data in the data packet, and the data contains or is entirely user plane data. In this case, although some errors occur in the transmitted user plane data, since the header is transmitted correctly, the user plane data can be processed correctly, and the error in the user plane data may slightly affect the user experience, but will not actually cause other more serious effects. Therefore, the second device may not discard the data packet, and this method can improve data transmission efficiency and system capacity. Optionally, if the second CRC is located in the data, the second device can obtain the data in the data packet after deleting the second CRC. For example, referring to Figure 3(b), after the second device deletes the second CRC, the data in the data packet can be obtained according to data_1 and data_2. Optionally, after deleting the second CRC to obtain the data, the second device can perform the next step of processing on the data or send it to the next step of data processing module for further processing.
[0088] If the type of the data packet is control plane data, it means that the packet header of the data packet is transmitted correctly, but the data in the data packet is transmitted incorrectly, and the data is control plane data. In this case, although the packet header is transmitted correctly, the transmitted control plane data is erroneous. Since the consequences of the control plane data error are relatively serious, the second device discards the data packet.
[0089] Situation 2.2, the data packet verification fails and the packet header verification fails, indicating that a transmission error occurs in the data packet and the location where the error occurs at least includes the packet header, that is, a transmission error occurs in the packet header. In this case, the second device can discard the data packet.
[0090] Since the packet header contains one or more of the source address, destination address, source port number, destination port number, protocol information, etc., the packet header plays a vital role in how the second device correctly processes the data packet. Therefore, if the packet header check fails, the data packet is discarded.
[0091] In the second implementation method, the second device first executes the above step 203 to obtain the verification result of the data packet. If the verification result of the data packet is that the data packet verification is successful, the data packet is not discarded. For details, refer to the description of scenario 1 of the first implementation method, and the above steps 204 and 205 are no longer executed. If the verification result of the data packet is that the data packet verification fails, the above step 204 is executed again to obtain the verification result of the packet header, and the data packet is processed according to the verification result of the packet header. There are two scenarios for processing the data packet according to the verification result of the packet header, which are described in scenarios 2.1 and 2.2 of the first implementation method.
[0092] Based on the second implementation method, if the data packet verification is successful, the packet header is no longer verified, so the number of verifications can be reduced, thereby improving the verification efficiency.
[0093] Based on the second implementation method, if the data packet verification fails, the data packet can be marked. That is, if the data packet verification fails, the data packet is not discarded, but marked, for example, with a special character or a specific bit, indicating that the data packet is a data packet that needs further judgment, and then the second CRC is used to verify the header of the data packet, and according to the header verification result, it is decided whether to discard the data packet or not.
[0094] As an implementation method, in any of the above implementation methods, if the second device discards the received data packet, the second device may also notify the first device to retransmit the data packet after discarding the data packet, thereby ensuring the correct reception of the data packet and helping to improve the user experience.
[0095] According to the above scheme, the second device carries a first CRC for verifying the data packet and a second CRC for verifying the header of the data packet in the data packet. When the data packet verification fails but the header verification succeeds, it indicates that the header transmission is correct but the data transmission is wrong. At this time, the second device can process the data packet according to the type of the data packet instead of directly discarding the data packet. In this way, the number of packet losses can be reduced, thereby improving data transmission efficiency and system capacity.
[0096] The above solution provided in the embodiment of the present application can be applied to various scenarios, which are not limited in the present application.
[0097] In the following examples, the interface between the first device and the second device is eCPRI. In this example, the data packet sent by the first device to the second device can be called an eCPRI data packet, and the data in the data packet can be called eCPRI data.
[0098] At present, on the traditional CPRI, the transmitted data is actually the digital sampling signal of the air interface data. Individual bit errors only affect the numerical accuracy of this sampled data and do not affect other sample points. Therefore, the CPRI link has a high tolerance for fiber bit errors. After the wireless fronthaul is switched from CPRI to eCPRI, due to the bit errors on the fronthaul link, according to the current processing mechanism, a one-bit error will cause a data packet CRC check to fail, and the data packet will be discarded. The discarding of a data packet will cause the entire service message to be discarded because all data packets cannot be collected. Therefore, the data loss caused by a one-bit bit error is sharply amplified, resulting in a relative decline in service performance after switching from CPRI to eCPRI, affecting the user experience.
[0099] Referring to Fig. 4(a), it is a schematic diagram of the existing service message format based on eCPRI, wherein a service message includes one or more data packets, each of which includes a medium access control (MAC) header, MAC data and CRC.
[0100] The MAC header includes information such as the source MAC address and the destination MAC address.
[0101] The MAC data includes an eCPRI type and eCPRI data, and the eCPRI data includes user plane data or control plane data to be transmitted.
[0102] CRC is used to check the correctness of the MAC header and MAC data. If the receiving end successfully checks the CRC, it indicates that the MAC header and MAC data are transmitted correctly without error bits. If the CRC check fails, it indicates that there are error bits in the MAC header and MAC data.
[0103] Taking Figure 4(a) as an example, if a bit or some bits in data packet 3 are transmitted incorrectly, the receiving end fails the CRC check of service data packet 3. According to the current processing mechanism, the receiving end will discard data packet 3. At the same time, since the receiving end fails to correctly receive data packet 3, the entire service message will also be discarded because all data packets cannot be received. This means that even if the receiving end correctly receives the other n-1 data packets except data packet 3, the receiving end will discard these n-1 data packets, resulting in a relative decrease in service performance and affecting user experience.
[0104] Combine the following Figure 2 The method shown improves the existing eCPRI data packet. Specifically, the eCPRI data packet generated by the first device includes two CRCs, namely, a first CRC and a second CRC. Then the first device sends the eCPRI data packet to the second device, and the second device can determine the method of processing the eCPRI data packet according to the first CRC and the second CRC in the eCPRI data packet.
[0105] The transmission and processing of the eCPRI data packet includes the following steps:
[0106] Step 1: The first device obtains data packet a, which includes a MAC header, an eCPRI type, and eCPRI data.
[0107] The MAC header here is the above Figure 2 A specific example of a packet header in an embodiment of the present invention.
[0108] The combination of eCPRI type and eCPRI data here is the above Figure 2 A specific example of data in an embodiment.
[0109] Step 2: The first device inserts CRC1 into data packet a to obtain data packet b.
[0110] Here CRC1 is the above Figure 2 A specific example of the second CRC in an embodiment of the present invention.
[0111] FIG4(b) is a schematic diagram of inserting CRC into a service data packet. In this example, CRC1 is inserted at the first position, and after CRC1 is inserted, the eCPRI data is divided into eCPRI data_1 and eCPRI data_2. CRC1 is generated based on the MAC header, eCPRI type, and eCPRI data_1. The combination of eCPRI type and eCPRI data_1 is the above Figure 2 A specific example of data_1 in the embodiment.
[0112] Step 3: The first device inserts CRC2 at the end of data packet b to obtain data packet c.
[0113] The CRC2 header here is the above Figure 2 A specific example of the first CRC in an embodiment of the present invention.
[0114] The CRC2 is generated based on the MAC header, the eCPRI type, the CRC1, the eCPRI data_1, and the eCPRI data_2.
[0115] Step 4: The first device sends data packet c to the second device.
[0116] The data packet c here is the above Figure 2 A specific example of a data packet sent by a first device to a second device in an embodiment of the present invention.
[0117] Step 5: The second device verifies CRC2 in data packet c, and optionally, also verifies CRC1, which is divided into the following case 1 and case 2:
[0118] Case 1: If CRC2 check succeeds, indicating that the MAC header, eCPRI type and eCPRI data are all transmitted correctly, the second device does not discard the data c. Optionally, the second device also deletes CRC1, obtains the eCPRI data and saves the eCPRI data.
[0119] Case 2: If CRC2 fails, CRC1 is further checked, which is divided into the following cases 2.1 and 2.2:
[0120] Case 2.1, if the CRC1 check fails, packet c is discarded.
[0121] Case 2.2: If the CRC1 check succeeds, it is divided into the following cases 2.2.1 and 2.2.2:
[0122] Scenario 2.2.1: if the type of the eCPRI data is user plane data, the data packet c is not discarded. Optionally, the second device further deletes CRC1 to obtain the eCPRI data.
[0123] Case 2.2.2: If the type of the eCPRI data is control plane data, the packet c is discarded.
[0124] The second device may determine the type of the eCPRI data according to the MAC header and / or the eCPRI type.
[0125] Through the above method, the transmission and processing of eCPRI data packets are realized, which can improve data transmission efficiency and system capacity, and help improve user experience.
[0126] For example, an implementation of the first device and the second device is given below. Figure 5 , is a schematic diagram of the structure of the first device and the second device provided in the embodiment of the present application. Figure 5 The first device and the second device shown are applied to the transmission and processing of the above-mentioned eCPRI data packet for description as an example.
[0127] The first device includes a baseband processing unit, a header check encoding unit and an Ethernet MAC layer packet sending unit, wherein:
[0128] 1) Baseband processing unit: generates data packet a, which includes a MAC header, an eCPRI type, and eCPRI data;
[0129] 2) Header check processing unit: Generate CRC1 according to the MAC header, eCPRI type and eCPRI data_1, and insert CRC1 at the first position to obtain data packet b;
[0130] 3) Ethernet MAC layer packet sending unit: Generate CRC2 according to the MAC header, eCPRI type, CRC1 and eCPRI data, and add CRC2 to the end of data packet b to obtain data packet c, and send data packet c to the second device through the eCPRI interface between the first device and the second device.
[0131] The second device includes an Ethernet MAC layer packet receiving unit, a header check decoding unit and a baseband processing unit, wherein:
[0132] 1) Ethernet MAC layer packet receiving unit: receive data packet c, check CRC2 in data packet c, if CRC2 check succeeds, delete CRC2 in data packet c to obtain data packet b, and generate tag information 1, tag information 1 indicates that the data packet check succeeds, and then send data packet b and tag information 1 to the header check unit; if CRC2 check fails, delete CRC2 to obtain data packet b, and generate tag information 2, tag information 2 indicates that the data packet check fails, and then send data packet b and tag information 2 to the header check unit.
[0133] 2) Header verification processing unit: receiving data packet b, and receiving tag information 1 or tag information 2. If the header verification processing unit receives data packet b and tag information 1, it removes CRC1 to obtain data packet a, and generates tag information 3, which indicates that the data packet verification is successful, and then the header verification processing unit sends data packet a and tag information 3 to the baseband processing unit. If the header verification processing unit receives data packet b and tag information 2, it verifies CRC1 in data packet b. If CRC1 verification is successful and the type of data packet b is user plane data, it deletes CRC1 to obtain data packet a, and generates tag information 3, which indicates that the data packet verification is successful, and then sends data packet a and tag information 3 to the baseband processing unit; if CRC1 verification is successful but the type of data packet b is control plane data, or CRC1 verification fails, the header verification processing unit deletes CRC1 to obtain data packet a, and generates tag information 4, which indicates that the data packet verification fails, and then sends data packet a and tag information 4 to the baseband processing unit.
[0134] 3) Baseband processing unit: receives data packet a, and receives tag information 3 or tag information 4. If data packet a and tag information 3 are received, data packet a is not discarded, for example, data packet a can be processed or sent to the next data processing model for processing. If data packet a and tag information 4 are received, data packet a is discarded.
[0135] In the above implementation, tag information 1, tag information 2, tag information 3 and tag information 4 may not exist at the same time. In the above implementation, the Ethernet MAC layer packet receiving unit of the second device informs the header verification unit through tag information 1: the packet verification is successful, and informs the header verification unit through tag information 2: the packet verification fails. As another implementation, when the Ethernet MAC layer packet receiving unit determines that the packet c is successfully verified, it sends the packet b and a tag information to the header verification unit. When the Ethernet MAC layer packet receiving unit determines that the packet c is successfully verified, it does not send the packet b to the header verification unit. Therefore, when the header verification unit receives the packet b and a tag information, it determines that the packet b is successfully verified, that is, there is no transmission error in the packet b. When the header verification unit receives the packet b, the packet b fails to be verified, that is, a transmission error occurs in the packet b. Or conversely, when the Ethernet MAC layer packet receiving unit determines that the packet c is successfully verified, it sends the packet b to the header verification unit. When the Ethernet MAC layer packet receiving unit determines that the packet c fails to be verified, it sends the packet b and a tag information to the header verification unit.
[0136] As an implementation, the header verification unit and the baseband processing unit may also process the data packet in the following manner: the header verification unit receives data packet b, and receives tag information 1 or tag information 2. If the header verification processing unit receives data packet b and tag information 1, it deletes CRC1 in data packet b to obtain data packet a and sends data packet a to the baseband processing unit. If the header verification processing unit receives data packet b and tag information 2, it verifies CRC1 in data packet b. If CRC1 verification succeeds and the type of data packet b is user plane data, it deletes CRC1 to obtain data packet a and sends data packet a to the baseband processing unit; if CRC1 verification succeeds but the type of data packet b is control plane data, or CRC1 verification fails, the header verification processing unit discards data packet b. Accordingly, the baseband processing unit receives data packet a, and the baseband processing unit does not discard data packet a. For example, data packet a may be processed or sent to the next data processing model for processing.
[0137] It can be understood that the division and names of the above functional units are only examples. The functions implemented in the same unit in the above examples can also be implemented by different functional modules or functional units. Similarly, the functions implemented in different units in the above examples can also be implemented by the same functional module or unit as needed. This application does not limit this.
[0138] Through the above solution, most of the data packets carrying user plane data with erroneous bits can be recovered, and the system performance in the forward transmission link erroneous state can be improved.
[0139] It is understandable that, in order to implement the functions in the above embodiments, the first device or the second device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0140] Figure 6 and Figure 7 Schematic diagram of the structure of possible communication devices provided for embodiments of the present application. These communication devices 600 can be used to implement the functions of the first device or the second device in the above method embodiments, and thus can also achieve the beneficial effects possessed by the above method embodiments. In the embodiments of the present application, the communication device can be the first device or the second device, or a module (such as a chip) applied to the first device or the second device. Figure 6 As shown, the communication device 600 includes a processing unit 610 and a transceiver unit 620. The communication device 600 is used to implement the functions of the first device or the second device in the above method embodiment. Figure 5 If the communication device 600 is used to implement the functions of the first device, the processing unit 610 can be used to implement the functions of the baseband processing unit and the header verification processing unit in the first device, and the transceiver unit 620 can be used to implement the function of the Ethernet MAC layer packet sending unit in the first device. Figure 5 If the function of the second device is realized, the processing unit 610 can be used to implement the functions of the baseband processing unit and the header verification processing unit in the second device, and the transceiver unit 620 can be used to implement the function of the Ethernet MAC layer packet receiving unit in the second device.
[0141] In a first embodiment, the communication device is used to implement the above method Figure 2The operation of the second device in the method embodiment shown, the transceiver unit 620 is used to receive a data packet from the first device, the data packet including a header, data, a first CRC and a second CRC; the processing unit 610 is used to verify the data packet according to the first CRC in the data packet; verify the header of the data packet according to the second CRC in the data packet; and process the data packet according to the verification result of the data packet and / or the verification result of the header.
[0142] In one possible implementation, the processing unit 610 is specifically configured to not discard the data packet if the data packet verification is successful, or if the data packet verification is successful and the packet header verification is successful; discard the data packet if the data packet verification fails and the packet header verification fails; or, if the data packet verification fails but the packet header verification is successful, process the data packet according to the type of the data packet.
[0143] In a possible implementation, the processing unit 610 is specifically configured to verify the header of the data packet according to the second CRC in the data packet if the data packet verification fails.
[0144] In a possible implementation, the processing unit 610 is specifically configured to mark the data packet if the data packet verification fails.
[0145] In a possible implementation, the processing unit 610 is specifically configured to: if the type of the data packet is user plane data, then not discard the data packet; or, if the type of the data packet is control plane data, then discard the data packet.
[0146] In a possible implementation, the processing unit 610 is further configured to determine the type of the data packet according to the packet header.
[0147] In a possible implementation, the processing unit 610 is further configured to delete the second CRC from the data packet.
[0148] In a possible implementation, the first CRC is located at the end of the data packet, and the second CRC is located after the header of the data packet.
[0149] In a possible implementation, the first CRC is generated according to the header of the data packet and the data of the data packet.
[0150] In a possible implementation, the first CRC is generated according to the header of the data packet, the data of the data packet and the second CRC.
[0151] In a possible implementation, the second CRC is generated according to a header of the data packet.
[0152] In a possible implementation, the second CRC is generated according to the header of the data packet and part of the data in the data packet.
[0153] In a possible implementation, the data packet is an eCPRI data packet, and the data in the data packet includes eCPRI data.
[0154] In a second embodiment, the communication device is used to implement the above method Figure 2 The operation of the first device in the method embodiment shown, the processing unit 610 is used to generate a data packet, the data packet includes a header, data, a first CRC and a second CRC, the first CRC is used to verify the data packet, and the second CRC is used to verify the header; the transceiver unit 620 is used to send the data packet to the second device.
[0155] In a possible implementation, the processing unit 610 is further configured to generate the second CRC according to the packet header.
[0156] In a possible implementation, the processing unit 610 is specifically configured to generate the second CRC according to part of the data and the packet header.
[0157] In a possible implementation, the processing unit 610 is further configured to generate the first CRC according to the packet header, the data and the second CRC.
[0158] In a possible implementation, the first CRC is located at the end of the data packet, and the second CRC is located after the header of the data packet.
[0159] In a possible implementation, the data packet is an eCPRI data packet, and the data in the data packet includes eCPRI data.
[0160] In a possible implementation, the packet header indicates the type of the data packet, and the type of the data packet is user plane data or control plane data.
[0161] A more detailed description of the processing unit 610 and the transceiver unit 620 can be directly obtained by referring to the relevant description in the above method embodiment, which will not be repeated here.
[0162] like Figure 7 As shown, the communication device 700 includes at least one processor 710 and may also include an interface circuit 720. The processor 710 may be coupled to the interface circuit 720. It is understood that the interface circuit 720 may be a transceiver or an input / output interface. Optionally, the communication device 700 may also include a memory 730 for storing instructions executed by the processor 710 or storing input data required by the processor 710 to execute instructions or storing data generated after the processor 710 executes instructions.
[0163] When the communication device 700 is used to implement the above method embodiment, the processor 710 is used to implement the function of the above processing unit 610, and the interface circuit 720 can be used to implement the function of the above transceiver unit 620.
[0164] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0165] The method steps in the embodiments of the present application can be implemented by hardware, or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a base station or a terminal. Of course, the processor and the storage medium can also be present in a base station or a terminal as discrete components.
[0166] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a base station, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc; it may also be a semiconductor medium, for example, a solid-state hard disk. The computer-readable storage medium may be a volatile or nonvolatile storage medium, or may include both volatile and nonvolatile types of storage media.
[0167] In the various embodiments of the present application, unless otherwise specified or provided for in any logical conflict, the terms and / or descriptions between the different embodiments are consistent and may be referenced to each other, and the technical features in the different embodiments may be combined to form new embodiments according to their inherent logical relationships.
[0168] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of this application, the character " / " indicates that the previous and next associated objects are in a "division" relationship.
[0169] It is understood that the various numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic.
Claims
1. A method for processing a data packet, characterized in that: include: receiving a data packet from a first device; Checking the data packet according to a first cyclic redundancy check CRC in the data packet; Checking a header of the data packet according to a second CRC in the data packet; If the data packet verification fails and the packet header verification fails, discarding the data packet; or, If the data packet verification fails but the packet header verification succeeds, and the type of the data packet is user plane data, the data packet is not discarded; or, if the data packet verification fails but the packet header verification succeeds, and the type of the data packet is control plane data, the data packet is discarded, wherein the type of the data packet is indicated by the packet header.
2. The method according to claim 1, characterized in that The checking the header of the data packet according to the second CRC in the data packet includes: If the data packet verification fails, the header of the data packet is verified according to the second CRC in the data packet.
3. The method according to claim 1, characterized in that The method further comprises: If the data packet fails verification, the data packet is marked.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The second CRC is deleted from the data packet without discarding the data packet.
5. The method according to any one of claims 1 to 3, characterized in that The first CRC is located at the end of the data packet, and the second CRC is located after the header of the data packet.
6. The method according to any one of claims 1 to 3, characterized in that The first CRC is generated based on the header of the data packet, the data of the data packet and the second CRC.
7. The method according to any one of claims 1 to 3, characterized in that The second CRC is generated according to the header of the data packet.
8. The method according to claim 7, characterized in that The second CRC is generated according to the header of the data packet and part of the data in the data packet.
9. The method according to any one of claims 1 to 3 and 8, characterized in that: The data packet is an enhanced common public radio interface eCPRI data packet, and the data in the data packet includes eCPRI data.
10. A method for processing a data packet, characterized in that: include: Generate a data packet, the data packet including a packet header, data, a first cyclic redundancy check CRC and a second CRC, the first CRC is used to check the data packet, the second CRC is used to check the packet header, the packet header indicates a type of the data packet, and the type of the data packet is user plane data or control plane data; The data packet is sent to the second device.
11. The method according to claim 10, characterized in that The method further comprises: The second CRC is generated according to the packet header.
12. The method according to claim 11, characterized in that The step of generating the second CRC according to the packet header includes: The second CRC is generated according to part of the data and the packet header.
13. The method according to any one of claims 10 to 12, characterized in that The method further comprises: The first CRC is generated according to the packet header, the data and the second CRC.
14. The method according to any one of claims 10 to 12, characterized in that The first CRC is located at the end of the data packet, and the second CRC is located after the packet header.
15. The method according to any one of claims 10 to 12, characterized in that The data packet is an enhanced common public radio interface eCPRI data packet, and the data in the data packet includes eCPRI data.
16. A communication device, characterized in that: The method comprises a module for executing the method as claimed in any one of claims 1 to 9, or a module for executing the method as claimed in any one of claims 10 to 15.
17. A communication device, characterized in that: The invention comprises at least one processor, wherein the at least one processor is used to be coupled with a memory, read and execute instructions in the memory, so as to implement: the method according to any one of claims 1 to 9, or the method according to any one of claims 10 to 15.
18. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a communication device, implements the method according to any one of claims 1 to 15.
19. A computer-readable storage medium, characterized in that: The storage medium stores a computer program or an instruction. When the computer program or the instruction is executed by the communication device, the method according to any one of claims 1 to 15 is implemented.
20. A communication system, characterized in that: The method comprises a second device for executing the method as claimed in any one of claims 1 to 9, and a first device for executing the method as claimed in any one of claims 10 to 15.
Citation Information
Patent Citations
One-way data transmission method
CN102611531A
Streaming media message processing method, WiFi chip and mobile terminal
CN104717031A