WO2023098430A1 - 一种数据包的处理方法、通信装置及通信系统 - Google Patents

一种数据包的处理方法、通信装置及通信系统 Download PDF

Info

Publication number
WO2023098430A1
WO2023098430A1 PCT/CN2022/130825 CN2022130825W WO2023098430A1 WO 2023098430 A1 WO2023098430 A1 WO 2023098430A1 CN 2022130825 W CN2022130825 W CN 2022130825W WO 2023098430 A1 WO2023098430 A1 WO 2023098430A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
data
crc
packet
header
Prior art date
Application number
PCT/CN2022/130825
Other languages
English (en)
French (fr)
Inventor
程浩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023098430A1 publication Critical patent/WO2023098430A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to the technical field of communication, and in particular to a data packet processing method, a communication device and a communication system.
  • the first device sends data to the second device, or the second device sends data to the first device.
  • a service message is generally split into multiple data packets for transmission, and then the receiver assembles the received multiple data packets to obtain a complete service message.
  • FIG. 1 it is an example diagram of a service message.
  • a service packet is split into n data packets and sent sequentially, where n is an integer greater than 1.
  • the receiver In order to ensure the accuracy of data reception, the receiver needs to verify the data packet after receiving each data packet. When a data packet fails the verification, it indicates that an error occurred in the sending process of the data packet. For the data packets that fail the verification, they are generally discarded directly.
  • Embodiments of the present application provide a data packet processing method, a communication device, and a communication system, so as to improve data transmission efficiency and system capacity.
  • the embodiment of the present application provides a method for processing a data packet, and the method may be executed by a second device or a module (such as a chip) applied in the second device.
  • the method includes: receiving a data packet from a first device, the data packet includes a header, data, a first cyclic redundancy check (Cyclic Redundancy Check, CRC) and a second CRC; according to the first CRC in the data packet, Verifying the data packet; verifying the packet header of the data packet according to the second CRC in the data packet; processing the data packet according to the verification result of the data packet and/or the verification result of the packet header.
  • CRC Cyclic Redundancy Check
  • the processing the data packet according to the verification result of the data packet and/or the verification result of the packet header includes: if the verification of the data packet succeeds, or if the verification of the data packet success and the packet header verification is successful, then 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 If the verification of the header is successful, the data packet is processed according to the type of the data packet.
  • the data packet carries the first CRC used for checking the data packet and the second CRC used for checking the header of the data packet.
  • the second device may 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 loss can be reduced, thereby improving data transmission efficiency and system capacity.
  • the verification of the packet header of the data packet according to the second CRC in the data packet may be: if the verification of the data packet fails, the data is verified according to the second CRC in the data packet The header of the packet is verified. If the verification of the data packet fails, it indicates that an error occurs during the transmission of the data packet, and the header of the data packet is further checked according to the second CRC in the data packet to determine whether an error occurs in the header of the packet. If the verification of the data packet is successful, it indicates that there is no error in the transmission process of the data packet, and it is not necessary to verify the header of the data packet according to the second CRC, thereby reducing the number of times of verification and increasing the speed of verification.
  • the data packet if the data packet fails to be verified, the data packet is marked. That is, if the data packet verification fails, the data packet is not discarded, but the data packet is marked, for example, it can be marked with a special character or a specific bit (or bit position) to indicate that the data packet needs
  • the second CRC is used to verify the packet header of the data packet, and according to the verification result of the second CRC, it is decided whether to discard the data packet or not to discard the data packet.
  • the flag can also be used to indicate or prompt a module or device that processes the data packet in the next step that there is an error in the data in the data packet.
  • processing the data packet according to the type of the data packet may be: if the type of the data packet is user plane data, then not discarding the data packet; or, if the type of the data packet is control plane data, the packet is discarded.
  • the type of the data packet is user plane data
  • the header of the data packet is transmitted correctly, and the data in the data packet has a transmission error, and the data is user plane data.
  • the transmitted user plane data Some errors occur, but due to the correct transmission of the packet header, the user plane data can be processed correctly, and the error of the user plane data may slightly affect the user experience, but in fact it will not cause other more serious impacts, so the second device The data packet may not be discarded, and this method can improve data transmission efficiency and system capacity.
  • the type of the data packet is control plane data
  • the packet header is transmitted correctly, the data in the data packet has a transmission error, and the data is control plane data.
  • the second device discards the data packet.
  • before processing the data packet according to the type of the data packet first determine the type of the data packet according to the packet header.
  • the second device may further delete the second CRC from the data packet.
  • deleting the second CRC from the data packet can simplify the flow or complexity of subsequent processing, reduce the modification of the processing module, and also reduce the amount of data that needs to be transmitted inside the second device or that the second device needs to transmit to The data volume of other devices or modules.
  • 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.
  • the first CRC is generated according to the packet header of the data packet, the data of the data packet and the second CRC. Or, the first CRC is generated according to the header of the data packet and the data of the data packet.
  • the second CRC is generated according to the packet header of the data packet.
  • the second CRC since the second CRC is generated according to the packet header, the second CRC can be used to check the correctness of the packet header transmission, which can ensure the correct transmission of the packet header.
  • the second CRC is generated according to the header of the data packet and some data in the data packet.
  • the second CRC can be inserted at a fixed-length position after the start of the data packet, so the second CRC may divide the original data into the first part of data before the second CRC and the second part after the second CRC. Partial data, the second CRC may be generated according to the packet header before the second CRC and the first part of data. On the one hand, since the second CRC is generated according to the packet header and part of the data, the second CRC can be used to verify the correctness of the packet header transmission, which can ensure the correct transmission of the packet header. On the other hand, since the second CRC is inserted at a fixed position after the start position of the data packet, the generation and insertion of the second CRC can be simplified, thereby increasing the generation speed of the data packet.
  • the data packet is an enhanced common public radio interface (enhanced common public radio interface, eCPRI) data packet, and the data in the data packet includes eCPRI data.
  • enhanced common public radio interface enhanced common public radio interface, eCPRI
  • the embodiment of the present application provides a data packet processing method, which can be executed by the first device or a module (such as a chip) applied to the first device.
  • the method includes: generating a data packet, the data packet includes a header, data, a first CRC and a second CRC, the first CRC is used to check the data packet, and the second CRC is used to check the header ; Send the data packet to the second device.
  • the data packet carries the first CRC used for checking the data packet and the second CRC used for checking the header of the data packet. Therefore, after receiving the data packet, the second device can determine the processing mode of the data packet according to the first CRC and the second CRC.
  • the second CRC is generated according to the packet header.
  • the second CRC since the second CRC is generated according to the packet header, the second CRC can be used to check the correctness of the packet header transmission, which can ensure the correct transmission of the packet header.
  • generating the second CRC according to the packet header may specifically be: generating the second CRC according to part of the data in the data and the packet header.
  • the second CRC can be inserted at a fixed-length position after the start position of the data packet, so the second CRC may divide the original data into the first part of data before the second CRC and the second part after the second CRC. Partial data, the second CRC may be generated according to the packet header before the second CRC and the first part of data. On the one hand, since the second CRC is generated according to the packet header and part of the data, the second CRC can be used to verify the correctness of the packet header transmission, which can ensure the correct transmission of the packet header. On the other hand, since the second CRC is inserted at a fixed position after the start position of the data packet, the generation and insertion of the second CRC can be simplified, thereby increasing the generation speed of the data packet.
  • the first CRC is generated according to the packet header and data.
  • the first CRC is generated according to the packet header, the data, and the second CRC.
  • the first CRC since the first CRC is generated according to the packet header, the data and the second CRC, the first CRC can be used to check the correctness of the data packet transmission, which can ensure the correct transmission of the data packet.
  • 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.
  • the data packet is an eCPRI data packet
  • data in the data packet includes eCPRI data.
  • 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.
  • the embodiment of the present application provides a communication device, and the device may be a second device or a module (such as a chip) applied to the second device.
  • the device has the function of realizing any realization method of the first aspect above. This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the embodiment of the present application provides a communication device, and the device 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. This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the embodiment of the present application provides a communication device, including at least one processor, and the at least one processor is configured to be coupled with a memory, and read and execute instructions in the memory, so as to realize the above-mentioned first aspect to the second aspect Any implementation method in the two aspects.
  • the memory may be located within the device or external to the device.
  • the embodiment of the present application provides a communication device, including 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 first aspect to the second aspect above.
  • the embodiment of the present application provides a communication device, including a unit or means (means) for performing each step of any implementation method in the first aspect to the second aspect.
  • the embodiment of the present application provides a communication device, including a processor and an interface circuit, the processor is configured to communicate with other devices through the interface circuit, and execute any implementation method in the first aspect to the second aspect above.
  • the processor includes one or more.
  • the embodiment of the present application further provides a computer program product, the computer program product includes computer programs or instructions, and when the computer programs or instructions are run by the communication device, any of the above first to second aspects can be realized method is executed.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores instructions, and when it is run on the communication device, the above-mentioned first aspect to the second aspect Any implementation method is executed.
  • the embodiment of the present application further provides a chip system, including: a processor, configured to execute any implementation method in the first aspect to the second aspect above.
  • the embodiment of the present application also provides a communication system, including: a second device for performing any implementation method of the above-mentioned first aspect, and a first device for performing any implementation method of the above-mentioned second aspect .
  • FIG. 1 is an example diagram of a service message
  • FIG. 2 is a schematic flowchart of a data packet processing method provided by an embodiment of the present application
  • Fig. 3 (a) is a schematic diagram of the packet format provided by the embodiment of the present application.
  • Fig. 3 (b) is another schematic diagram of the packet format provided by the embodiment of the present application.
  • Figure 4(a) is an example diagram of an existing eCPRI-based service message
  • Fig. 4 (b) is a schematic diagram of inserting CRC in the service data packet provided by the embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a first device and a second device provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a communication device provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a communication device provided by an embodiment of the present application.
  • the first device acts as a sender
  • the second device acts as a receiver.
  • this method is also applicable when the second device is the sender and the first device is the receiver.
  • the first device may be a baseband unit (baseband unit, BBU), a centralized unit (Central Unit, CU) or a distributed unit (Distributed Unit, DU) or a communication device or a functional module having a baseband signal processing function
  • the second device is a radio unit (radio unit, RU).
  • the RU here can be, for example, a remote radio unit (radio remote unit, RRU) or an adaptive antenna unit (active antenna unit, AAU). Or a communication device or a functional module with a radio frequency signal processing function.
  • the first device is an RU
  • 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 this embodiment of the present application.
  • the method includes the following steps:
  • the first device In step 201, the first device generates a data packet, and the data packet includes a header, data, a first CRC, and a second CRC.
  • the first CRC is used to check the data packet.
  • the first device may generate the first CRC according to the packet header and the data, or, the first device may generate the first CRC according to the packet header, the data, and the second CRC.
  • the second CRC is used to check the packet header.
  • 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 some data in the data.
  • the packet header of the data packet indicates the type of the data packet, and the type of the data packet is user plane data or control plane data.
  • the type of the data packet is user plane data, which means that all data in the data packet is user plane data, or includes user plane data and other data.
  • the type of the data packet is control plane data, which means that all data in the data packet is control plane data, or includes control plane data and other 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.
  • user plane data refers to actual service data, such as voice data, packet service data, and the like.
  • Control plane data refers to control messages or signaling, such as cell establishment messages, cell release messages, or messages related to operation and maintenance.
  • the embodiment of the present application does not limit the packeting form of the data packet, that is, does not limit the mutual positional relationship among the packet header, data, first CRC, and second CRC in the data packet.
  • the first CRC is located at the end of the data packet
  • the second CRC is located after the header of the data packet.
  • the first CRC is located at the end of the data packet
  • the second CRC is located between the header and the data.
  • the data in the data packet includes key information that needs to be protected (for example, information that affects the way the data packet is processed) and service data, where the key information includes, for example, the eCPRI type.
  • the second CRC can be inserted after the packet header and the key information, and generated according to the packet header and the key information, so that the correct transmission of the key information can be guaranteed through the second CRC.
  • the data in the data packet includes eCPRI type and eCPRI data, then the second CRC may be inserted after the eCPRI type.
  • FIG. 3(a) it is a schematic diagram of a data packet format.
  • the second CRC is located between the header and the data, specifically, the second CRC is located after the header and before the data.
  • the first CRC is located at the end of the packet.
  • the second CRC is generated according to the packet header, and the first CRC is generated according to the packet header and data, or is generated according to the packet header, the second CRC, and data.
  • 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.
  • 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.
  • FIG. 3( b ) it is another schematic diagram of the data packet format.
  • the second CRC is located in the data, after inserting the second CRC, the original data is divided into two parts by the second CRC, the part of data before the second CRC is called data_1, and the part of data after the second CRC is called The combination of data_2, data_1 and data_2 is the original data.
  • the first CRC is located at the end of the packet.
  • the second CRC is generated based on the packet header and data_1, and the first CRC is generated based on the packet header and data, or is generated based on the packet header, the second CRC, and the data.
  • 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 from the packet header. position + preset length.
  • the preset length is greater than or equal to the first length, and the first length may be the maximum length among various known packet header lengths, so that it can be ensured that the second CRC can be inserted after the packet header without inserting the second CRC in the packet header. Inserting the second CRC can ensure the integrity of the packet header.
  • bit size of the data_1 before the second CRC may be different for different data packets. For example, if the preset length is 100 bits, and the header of data packet x is 60 bits, then the bit size of data_1 in data packet x is 40 bits, and the header of data packet y is 70 bits, then the data in packet y The bit size of _1 is 30 bits.
  • Step 202 the first device sends a data packet to the second device.
  • the second device receives the data packet.
  • the first device may send the data packet to the second device through the interface between the first device and the second device.
  • the first device sends the data packet to the second device through forwarding by one or more third-party devices.
  • Step 203 the second device checks the data packet according to the first CRC in the data packet.
  • the second device After the second device receives the data packet, it obtains the first CRC in the data packet, and generates a third CRC according to other parts (for example, packet header, second CRC, and data) in the data packet except the first CRC. CRC.
  • the data packet is verified successfully, indicating that no error occurs in the data packet during transmission.
  • the data packet check fails, indicating that an error occurred during transmission of the data packet.
  • the location where the error occurs may be in the packet header, in the second CRC, in the data or in the first CRC.
  • Step 204 the second device checks the header of the data packet according to the second CRC in the data packet.
  • the second device acquires the second CRC in the data packet, and generates a fourth CRC according to the part before the second CRC in the data packet.
  • the part before the second CRC may be the packet header, such as referring to the example of FIG. 3( a ), or the part before the second CRC may also be the packet header and data_1, such as referring to the example of FIG. 3( b ).
  • the verification of the packet header of the data packet is successful, indicating that no error occurs in the packet header of the data packet during transmission.
  • the second CRC is different from the fourth CRC
  • the verification of the packet header of the data packet fails, indicating that an error occurs in the packet header of the data packet during transmission.
  • the second CRC is different from the fourth CRC
  • the second CRC is different from the fourth CRC, it may be that there are transmission error bits in the packet header, or there may be transmission error bits in Data_1.
  • the proportion of data_1 in the data is very small, so for the example in Figure 3(b), if the second CRC is different from the fourth CRC, it indicates that an error occurred in the packet header or data_1 , but it is not necessary to make a distinction, and it is generally considered that the packet header verification of the data packet fails, that is, it is considered that there are bits in the packet header that have a transmission error.
  • 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.
  • the second device not only executes the above step 203 to obtain the verification result of the data packet, but also executes the above step 204 to obtain the verification result of the packet header, and according to the verification result of the data packet and/or the verification result of the packet header Packets are processed.
  • step 203 may be executed first and then step 204 may be executed, or step 204 may be executed first and then step 203 may be executed, or the two steps may be executed in parallel, in no particular order.
  • 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 cases 1 and 2.
  • the second device does not discard the data packet.
  • the "not discarding” described in the embodiment of the present application can be, for example, saving, retaining , continue processing, transfer to the next-level data processing module for further processing, etc.
  • the "discarding" mentioned in the embodiment of this application may include deletion, being overwritten by other data, not continuing processing, or not transmitting to the next-level data processing Modules, etc., are explained here in a unified manner, and will not be described in detail later.
  • the second device may obtain the data in the data packet after deleting the second CRC. For example, referring to FIG. 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.
  • the successful verification of the data packet means that neither the header nor the data has a transmission error, so it can be considered that the header will also be verified successfully. Therefore, the successful verification of the data packet can indicate that the verification of the data packet and the verification of the packet header are successful.
  • Case 2 if the data packet verification fails, it indicates that an error occurred during the transmission of the data packet.
  • the location of the error may be in the packet header, in the second CRC, in the data or in the first CRC.
  • the second device It is possible not to discard the data packet, but to decide how to process the data packet according to the verification result of the packet header. Therefore, the situation 2 can be further divided into the following situations 2.1 and 2.2.
  • the data packet verification fails but the header verification of the data packet succeeds, indicating that the data packet has a transmission error but the location of the error is not at the header, that is, there is no transmission error in the header.
  • This situation can be understood as the data of the packet A transmission error occurs, in which case the second device can process the data packet according to the type of the data packet.
  • a transmission error occurs in the data and/or the first CRC.
  • data_2 and/or the first CRC in the data have a transmission error.
  • the second device can determine the type of the data packet according to the packet header, for example, the packet header can contain the type of the data packet, or contain indication information for indicating the type of the data packet, or the packet header itself can correspond to the type of the data packet.
  • 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, then Drop packets.
  • the type of the data packet is user plane data
  • the data in the data packet has a transmission error
  • the data contains or all is user plane data.
  • the second device may not discard the data packet, which can improve data transmission efficiency and system capacity.
  • the second device may obtain the data in the data packet after deleting the second CRC. For example, referring to FIG.
  • the data in the data packet can be obtained according to data_1 and data_2.
  • the second device may process the data in the next step or send the data to a next-step data processing module for further processing.
  • the type of the data packet is control plane data
  • the packet header is transmitted correctly, errors occur in the transmitted control plane data, and the consequences of errors in the control plane data are relatively serious, so the second device discards the data packet.
  • the verification of the data packet fails and the verification of the packet header of the data packet fails, indicating that a transmission error occurs in the data packet and the location where the error occurs contains at least the packet header, that is, a transmission error occurs in the packet header.
  • the second device can discard the data Bag.
  • 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 crucial role in how the second device correctly processes the data packet. Therefore, if the packet header verification fails, the packet is discarded.
  • 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 situation 1 of the above implementation method 1. , and the above step 204 and step 205 will not be executed later. If the verification result of the data packet is that the data packet verification fails, then perform the above step 204 to obtain the verification result of the packet header, and process the data packet according to the verification result of the packet header, wherein, according to the verification result of the packet header, the The processing of the data packet includes two situations, which are respectively described in the situation 2.1 and the situation 2.2 in the first implementation method.
  • the packet header is no longer verified, so the number of times of verification can be reduced, thereby improving verification efficiency.
  • the data packet may be marked. That is, if the data packet verification fails, the data packet will not be discarded, but the data packet will be marked, for example, it can be marked with special characters or specific bits, etc., indicating that the data packet is a data packet that needs further judgment , and then use the second CRC to check the packet header of the data packet, and decide whether to discard the data packet or not to discard the data packet according to the verification result of the packet header.
  • the second device can also notify the first device to retransmit the data packet after discarding the data packet, so as to ensure that the data packet The correct reception helps to improve the user experience.
  • the second device carries the first CRC used for checking the data packet and the second CRC used for checking the header of the data packet in the data packet.
  • the second device may 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 loss can be reduced, thereby improving data transmission efficiency and system capacity.
  • the interface between the first device and the second device is eCPRI as an example for description.
  • the data packet sent by the first device to the second device may be called an eCPRI data packet, and the data in the data packet may be called eCPRI data.
  • the transmitted data is actually a 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 sampling points. Therefore, the tolerance of CPRI links to optical fiber bit errors relatively high.
  • a bit error will cause the CRC check of a data packet to fail, so the data packet will be discarded, and a data packet will be discarded It will cause the entire service packet to be discarded because all the data packets cannot be collected. Therefore, the data loss loss caused by a bit error is greatly magnified, resulting in a relative decline in service performance after switching from CPRI to eCPRI, affecting user experience.
  • a service packet includes one or more data packets, and each data packet includes a medium access control (medium access control, MAC) header, MAC data and CRC.
  • medium access control medium access control
  • the MAC header includes information such as a source MAC address and a destination MAC address.
  • the MAC data includes eCPRI type and eCPRI data
  • the eCPRI data includes user plane data or control plane data to be transmitted.
  • the CRC is used to check the correctness of the MAC header and the 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 erroneous bits in the MAC header and MAC data.
  • the existing eCPRI data packet is improved in combination with the method shown in FIG. 2 .
  • 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 a manner of processing the eCPRI data packet according to the first CRC and the second CRC in the eCPRI data packet.
  • the transmission and processing of the eCPRI packet includes the following steps:
  • step 1 the first device obtains a data packet a, and the data packet a includes a MAC header, an eCPRI type, and eCPRI data.
  • the MAC header here is a specific example of the packet header in the above embodiment of FIG. 2 .
  • the combination of the eCPRI type and the eCPRI data here is a specific example of the data in the above embodiment in FIG. 2 .
  • Step 2 the first device inserts CRC1 into data packet a to obtain data packet b.
  • the CRC1 here is a specific example of the second CRC in the above embodiment of FIG. 2 .
  • FIG. 4(b) is a schematic diagram of inserting a CRC into a service data packet.
  • the CRC1 is inserted at the first position, and after the CRC1 is inserted, the eCPRI data is divided into eCPRI data_1 and eCPRI data_2.
  • CRC1 is generated according to the MAC header, eCPRI type and eCPRI data_1, where the combination of eCPRI type and eCPRI data_1 is a specific example of data_1 in the embodiment of FIG. 2 above.
  • Step 3 the first device inserts CRC2 at the end of data packet b to obtain data packet c.
  • the CRC2 header here is a specific example of the first CRC in the above embodiment of FIG. 2 .
  • the CRC2 is generated according to the MAC header, eCPRI type, CRC1, eCPRI data_1 and eCPRI data_2.
  • Step 4 the first device sends the data packet c to the second device.
  • the data packet c here is a specific example of the data packet sent by the first device to the second device in the above embodiment of FIG. 2 .
  • Step 5 the second device checks the CRC2 in the data packet c, and optionally also checks the CRC1, which is divided into the following cases 1 and 2:
  • Case 1 if the CRC2 check is successful, indicating that the MAC header, eCPRI type and eCPRI data are all transmitted correctly, then the second device does not discard the data c. Optionally, the second device also deletes CRC1, obtains eCPRI data, and saves the eCPRI data.
  • Case 2.2 if the CRC1 check is successful, it is divided into the following cases 2.2.1 and 2.2.2:
  • the second device also deletes CRC1 to obtain eCPRI data.
  • the second device may determine the type of the eCPRI data according to the MAC header and/or the eCPRI type.
  • the transmission and processing of eCPRI data packets are realized, which can improve data transmission efficiency and system capacity, and help improve user experience.
  • FIG. 5 it is a schematic structural diagram of a first device and a second device provided in an embodiment of the present application. The following describes by taking the first device and the second device shown in FIG. 5 applied to the transmission and processing process of the eCPRI data packet as an example.
  • the first device includes a baseband processing unit, a header verification coding unit, and an Ethernet MAC layer packet sending unit, wherein:
  • baseband processing unit generate data packet a, data packet a includes MAC header, eCPRI type and eCPRI data;
  • header verification processing unit generate CRC1 according to MAC header, eCPRI type and eCPRI data_1, and insert CRC1 at the first position to obtain data packet b;
  • Ethernet MAC layer packet sending unit generate CRC2 according to MAC header, eCPRI type, CRC1 and eCPRI data, and add CRC2 at the end of data packet b to obtain data packet c, and pass between the first device and the second device
  • the eCPRI interface of the device sends the data packet c to the second device.
  • the second device includes an Ethernet MAC layer receiving unit, a header verification decoding unit and a baseband processing unit, wherein:
  • Ethernet MAC layer packet receiving unit receive data packet c, check the CRC2 in the data packet c, if the CRC2 verification is successful, then delete the CRC2 in the data packet c to obtain the data packet b, and generate mark information 1, mark Information 1 indicates that the data packet verification is successful, and then send data packet b and mark information 1 to the header verification unit; if CRC2 verification fails, delete CRC2 to obtain data packet b, and generate mark information 2, which indicates data If the packet verification fails, then the data packet b and the tag information 2 are sent to the header verification unit.
  • Head verification processing unit receiving data packet b, and receiving tag information 1 or tag information 2 . If the header verification processing unit receives the data packet b and the mark information 1, the data packet a is obtained after removing the CRC1, and generates the mark information 3, the mark information 3 indicates that the data packet verification is successful, and then the header verification processing unit sends The baseband processing unit sends data packet a and tag information 3 .
  • the header verification processing unit receives the data packet b and the tag information 2, it will verify the CRC1 in the data packet b, if the CRC1 verification is successful and the type of the data packet b is user plane data, then delete the CRC1 to obtain the data packet a , and generate flag information 3, flag information 3 indicates that the data packet verification is successful, and then send data packet a and flag 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 If the verification fails, the header verification processing unit deletes CRC1 to obtain data packet a, and generates marker information 4 indicating that the data packet verification fails, and then sends data packet a and marker information 4 to the baseband processing unit.
  • Baseband processing unit receiving the data packet a, and receiving the tag information 3 or the tag information 4 . If the data packet a and the tag information 3 are received, the data packet a will not be discarded, for example, the data packet a can be processed or sent to the next data processing model for processing. If packet a and tag information 4 are received, packet a is discarded.
  • the tag information 1, the tag information 2, the tag information 3, and the tag information 4 may not exist at the same time.
  • the Ethernet MAC layer packet receiving unit of the second device informs the header verification unit through the flag information 1: the data packet verification is successful, and informs the header verification unit through the flag information 2: the data packet Validation failed.
  • the packet receiving unit of the Ethernet MAC layer determines that the verification of the data packet c is successful
  • the data packet b and a mark information are sent to the header verification unit
  • the packet receiving unit of the Ethernet MAC layer determines that the packet c If the verification is successful, the data packet b will not be sent to the header verification unit, so when the header verification unit receives the data packet b and a tag information, it is determined that the data packet b is verified successfully, that is, the data packet b has not been transmitted Error, when the header verification unit receives the data packet b, the verification of the data packet b fails, that is, a transmission error occurs in the data packet b.
  • the packet receiving unit of the Ethernet MAC layer determines that the verification of the data packet c is successful
  • the data packet b is sent to the header verification unit
  • the packet receiving unit of the Ethernet MAC layer determines that the verification of the data packet c fails, it sends the packet b to the head verification unit.
  • the header checking unit sends data packet b and a tag information.
  • the header checking unit and the baseband processing unit may also process the data packet in the following manner: the header checking unit receives the data packet b, and receives the tag information 1 or the tag information 2 . If the header check processing unit receives the data packet b and the tag information 1, it deletes the CRC1 in the data packet b to obtain the data packet a and sends the data packet a to the baseband processing unit.
  • the header verification processing unit receives the data packet b and the tag information 2, it will verify the CRC1 in the data packet b, if the CRC1 verification is successful and the type of the data packet b is user plane data, then delete the CRC1 to obtain the data packet a , and send the data packet a to the baseband processing unit; if the CRC1 verification is successful but the type of the data packet b is control plane data, or the CRC1 verification fails, the header verification processing unit discards the data packet b.
  • the baseband processing unit receives the data packet a, and the baseband processing unit does not discard the data packet a, for example, it can process the data packet a or send it to the next data processing model for processing.
  • the first device or the second device includes corresponding hardware structures and/or software modules for performing respective functions.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software with reference to the units and method steps of the examples described in the embodiments disclosed in the present application. Whether a certain function is executed by hardware or computer software drives the hardware depends on the specific application scenario and design constraints of the technical solution.
  • FIG. 6 and FIG. 7 are schematic structural diagrams of possible communication devices provided by the embodiments of the present application. These communication apparatuses 600 can be used to implement the functions of the first device or the second device in the above method embodiments, and therefore can also realize the beneficial effects of the above method embodiments.
  • the communication device may be the first device or the second device, or may be a module (such as a chip) applied to the first device or the second device.
  • a communication device 600 includes a processing unit 610 and a transceiver unit 620 .
  • the communication apparatus 600 is configured to implement the functions of the first device or the second device in the foregoing method embodiments.
  • the processing unit 610 can be used to realize the functions of the baseband processing unit and the header verification processing unit in the first device, and the transceiver unit 620 It can be used to realize the function of the Ethernet MAC layer packet sending unit in the first device.
  • the processing unit 610 can be used to realize 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 realize the functions of the second device. 2.
  • the communication device is used to realize the operation of the second device in the method embodiment shown in FIG. Including packet header, data, first CRC and second CRC; processing unit 610, used to check the data packet according to the first CRC in the data packet; check the data packet according to the second CRC in the data packet verifying the packet header; and processing the data packet according to the verification result of the data packet and/or the verification result of the packet header.
  • 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 header verification is successful; if the data packet If the 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 succeeds, the data packet is processed according to the type of the data packet.
  • the processing unit 610 is specifically configured to, if the verification of the data packet fails, verify the packet header of the data packet according to the second CRC in the data packet.
  • the processing unit 610 is specifically configured to mark the data packet if the verification of the data packet fails.
  • the processing unit 610 is specifically configured to not discard the data packet if the type of the data packet is user plane data; or, if the type of the data packet is control plane data, discard the data Bag.
  • the processing unit 610 is further configured to determine the type of the data packet according to the packet header.
  • the processing unit 610 is further configured to delete the second CRC from the data packet.
  • 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.
  • the first CRC is generated according to the packet header of the data packet and the data of the data packet.
  • the first CRC is generated according to the packet header of the data packet, the data of the data packet, and the second CRC.
  • the second CRC is generated according to the packet header of the data packet.
  • the second CRC is generated according to the packet header of the data packet and some data in the data packet.
  • the data packet is an eCPRI data packet, and data in the data packet includes eCPRI data.
  • the communication device is used to realize the operation of the first device in the method embodiment shown in FIG.
  • a first CRC and a second CRC the first CRC is used to check the data packet, and the second CRC is used to check the packet header;
  • the transceiver unit 620 is configured to send the data packet to the second device.
  • the processing unit 610 is further configured to generate the second CRC according to the packet header.
  • the processing unit 610 is specifically configured to generate the second CRC according to part of the data in the data and the packet header.
  • the processing unit 610 is further configured to generate the first CRC according to the packet header, the data, and the second CRC.
  • 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.
  • the data packet is an eCPRI data packet, and data in the data packet includes eCPRI data.
  • 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.
  • processing unit 610 and the transceiver unit 620 can be directly obtained by referring to related descriptions in the above method embodiments, and details are not repeated here.
  • the communication device 700 includes at least one processor 710 and may further include an interface circuit 720 .
  • the processor 710 may be coupled to the interface circuit 720 .
  • the interface circuit 720 may be a transceiver or an input-output interface.
  • the communication device 700 may further include a memory 730 for storing instructions executed by the processor 710, or storing input data required by the processor 710 to execute the instructions, or storing data generated by the processor 710 after executing the instructions.
  • the processor 710 is used to implement the functions of the processing unit 610 described above, and the interface circuit 720 may be used to implement the functions of the transceiver unit 620 described above.
  • processor in the embodiments of the present application may be a central processing unit (central processing unit, CPU), and may also be other general processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
  • CPU central processing unit
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • a general-purpose processor can be a microprocessor, or any conventional processor.
  • the method steps in the embodiments of the present application may be implemented by means of hardware, or may be implemented by means of a processor executing software instructions.
  • Software instructions can be composed of corresponding software modules, and software modules can be stored in random access memory, flash memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only Memory, registers, hard disk, removable hard disk, CD-ROM or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
  • the storage medium may also be a component of the processor.
  • the processor and storage medium can be located in the ASIC.
  • the ASIC can be located in the base station or the terminal.
  • the processor and the storage medium may also exist in the base station or the terminal as discrete components.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product comprises one or more computer programs or instructions. When the computer program or instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are executed in whole or in part.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, a base station, user equipment or other programmable devices.
  • the computer program or instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instructions may be downloaded from a website, computer, A server or data center transmits 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 can be accessed by a computer, or a data storage device such as a server or a data center integrating one or more available media.
  • the available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; or it may be a semiconductor medium, such as a solid state disk.
  • the computer readable storage medium may be a volatile or a nonvolatile storage medium, or may include both volatile and nonvolatile types of storage media.
  • “at least one” means one or more, and “multiple” means two or more.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an “or” relationship; in the formulas of this application, the character “/” indicates that the contextual objects are a "division” Relationship.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

本申请实施例提供一种数据包的处理方法、通信装置及通信系统。该方法包括:接收来自第一设备的数据包;根据数据包中的第一CRC,对数据包进行校验;根据数据包中的第二CRC对数据包的包头进行校验;若数据包校验失败且包头校验失败,则丢弃数据包;或者,若数据包校验失败但包头校验成功,则根据数据包的类型处理数据包。该方案,数据包中携带用于对数据包进行校验的第一CRC和用于对数据包的包头进行校验的第二CRC。当数据包校验失败但包头校验成功,表明包头传输正确但数据传输错误,则第二设备可以根据数据包的类型处理该数据包,而不是直接丢弃该数据包。如此可以减少丢包次数,从而可以提升数据传输效率和系统容量。

Description

一种数据包的处理方法、通信装置及通信系统
相关申请的交叉引用
本申请要求在2021年11月30日提交中国专利局、申请号为202111450373.5、申请名称为“一种数据包的处理方法、通信装置及通信系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种数据包的处理方法、通信装置及通信系统。
背景技术
当设备之间进行通信,设备之间需要进行数据收发。比如第一设备向第二设备发送数据,或者第二设备向第一设备发送数据。
为了提升数据发送速率,一个业务报文一般会拆分为多个数据包进行发送,然后由接收方对收到的多个数据包进行组装,得到完整的业务报文。如图1所示,为业务报文的示例图。一个业务报文拆分为n个数据包依次进行发送,其中n为大于1的整数。
为了保证数据接收的准确性,接收方在每收到一个数据包后,需要对该数据包进行校验。当一个数据包校验失败,表明该数据包在发送过程中发生错误。对于校验失败的数据包,一般直接丢弃。
发明内容
本申请实施例提供一种数据包的处理方法、通信装置及通信系统,用以提升数据传输效率和系统容量。
第一方面,本申请实施例提供一种数据包的处理方法,该方法可以由第二设备或应用于第二设备中的模块(如芯片)来执行。该方法包括:接收来自第一设备的数据包,该数据包包括包头、数据、第一循环冗余校验(Cyclic Redundancy Check,CRC)和第二CRC;根据该数据包中的第一CRC,对该数据包进行校验;根据该数据包中的第二CRC对该数据包的包头进行校验;根据数据包的校验结果和/或包头的校验结果对该数据包进行处理。
在一种可能的实现方法中,所述根据数据包的校验结果和/或包头的校验结果对该数据包进行处理,包括:若所述数据包校验成功,或者若数据包校验成功且包头校验成功,则不丢弃所述数据包;或者,若所述数据包校验失败且所述包头校验失败,则丢弃所述数据包;或者,若所述数据包校验失败但所述包头校验成功,则根据所述数据包的类型处理所述数据包。
根据上述方案,数据包中携带用于对数据包进行校验的第一CRC和用于对数据包的包头进行校验的第二CRC。当数据包校验失败但包头校验成功,表明包头传输正确但数据传输错误。此时,第二设备可以根据数据包的类型处理该数据包,而不是直接丢弃该数据包。如此可以减少丢包次数,从而可以提升数据传输效率和系统容量。
在一种可能的实现方法中,所述根据数据包中的第二CRC对数据包的包头进行校验,可以是:若数据包校验失败,则根据该数据包中的第二CRC对数据包的包头进行校验。若数据包校验失败,表明该数据包传输过程中发生错误,则进一步根据数据包中的第二CRC对数据包的包头进行校验,以判断包头是否发生错误。若数据包校验成功,表明该数据包传输过程中没有发生错误,则可以无需再根据第二CRC对数据包的包头进行校验,从而减少校验次数,提升校验的速度。
在一种可能的实现方法中,若数据包校验失败,则标记该数据包。也即若数据包校验失败,则不丢弃该数据包,而是对该数据包进行标记,例如可以用特殊字符进行标记或特定比特(或比特位置)进行标记等,表明该数据包是需要进一步判断的数据包,后续再使用第二CRC对数据包的包头进行校验,并根据第二CRC的校验结果,决定丢弃该数据包还是不丢弃该数据包。该标记也可以用于指示或者提示对此数据包进行下一步处理的模块或者设备,该数据包中的数据存在错误。
在一种可能的实现方法中,根据该数据包的类型处理该数据包,可以是:若该数据包的类型是用户面数据,则不丢弃该数据包;或者,若该数据包的类型是控制面数据,则丢弃该数据包。
根据上述方案,如果数据包的类型是用户面数据,意味着数据包的包头传输正确,数据包中的数据发生传输错误,且该数据是用户面数据,该情形下,虽然传输的用户面数据发生一些错误,但由于包头传输正确,因此该用户面数据可以被正确处理,并且用户面数据的错误可能会稍微影响用户体验,但实际上不会造成其他更为严重的影响,因此第二设备可以不丢弃该数据包,该方式可以提升数据传输效率和系统容量。如果数据包的类型是控制面数据,意味着数据包的包头传输正确,数据包中的数据发生传输错误,且该数据是控制面数据,该情形下,尽管包头传输正确,但传输的控制面数据发生错误,由于控制面数据发生错误带来的后果相对比较严重,因此第二设备丢弃该数据包。
在一种可能的实现方法中,根据该数据包的类型处理该数据包之前,先根据该包头,确定该数据包的类型。
在一种可能的实现方法中,第二设备如果确定不丢弃该数据包,则还可以从该数据包中删除该第二CRC。
根据上述方式,从数据包中删除第二CRC,可以简化后续处理的流程或者复杂度,减少了对处理模块的改动,也减少了第二设备内部需要传输的数据量或者第二设备需要传输给其他设备或者模块的数据量。
在一种可能的实现方法中,该第一CRC位于该数据包的尾部,该第二CRC位于该数据包的包头之后。
在一种可能的实现方法中,该第一CRC是根据该数据包的包头、该数据包的数据和该第二CRC生成的。或者,该第一CRC是根据该数据包的包头、该数据包的数据生成的。
在一种可能的实现方法中,该第二CRC是根据该数据包的包头生成的。
该方案,由于根据该包头生成该第二CRC,因此该第二CRC可以用于对包头的传输正确性进行校验,可以保证包头的正确传输。
在一种可能的实现方法中,该第二CRC是根据该数据包的包头和该数据包中的部分数据生成的。
该方案,可以在数据包的起始位置之后的固定长度位置插入第二CRC,因此第二CRC 可能将原来的数据分割成位于第二CRC之前的第一部分数据和位于第二CRC之后的第二部分数据,则第二CRC可以是根据位于第二CRC之前的包头和第一部分数据生成的。一方面,由于根据该包头和部分数据生成该第二CRC,因此该第二CRC可以用于对包头的传输正确性进行校验,可以保证包头的正确传输。另一方面,由于是在数据包的起始位置之后的固定位置插入第二CRC,因此可以简化第二CRC的生成和插入方式,从而提升数据包的生成速度。
在一种可能的实现方法中,该数据包是增强通用公共无线接口(enhancedcommon public radio interface,eCPRI)数据包,该数据包中的数据包括eCPRI数据。
第二方面,本申请实施例提供一种数据包的处理方法,该方法可以由第一设备或应用于第一设备中的模块(如芯片)来执行。该方法包括:生成数据包,该数据包包括包头、数据、第一CRC和第二CRC,该第一CRC用于对该数据包进行校验,该第二CRC用于对该包头进行校验;向第二设备发送该数据包。
根据上述方案,数据包中携带用于对数据包进行校验的第一CRC和用于对数据包的包头进行校验的第二CRC。从而第二设备收到该数据包后,可以根据第一CRC和第二CRC确定该数据包的处理方式。
在一种可能的实现方法中,根据该包头,生成该第二CRC。
该方案,由于根据该包头生成该第二CRC,因此该第二CRC可以用于对包头的传输正确性进行校验,可以保证包头的正确传输。
在一种可能的实现方法中,根据该包头,生成该第二CRC,具体可以是:根据该数据中的部分数据和该包头,生成该第二CRC。
该方案,可以在数据包的起始位置之后的固定长度位置插入第二CRC,因此第二CRC可能将原来的数据分割成位于第二CRC之前的第一部分数据和位于第二CRC之后的第二部分数据,则第二CRC可以是根据位于第二CRC之前的包头和第一部分数据生成的。一方面,由于根据该包头和部分数据生成该第二CRC,因此该第二CRC可以用于对包头的传输正确性进行校验,可以保证包头的正确传输。另一方面,由于是在数据包的起始位置之后的固定位置插入第二CRC,因此可以简化第二CRC的生成和插入方式,从而提升数据包的生成速度。
在一种可能的实现方法中,根据该包头和数据,生成该第一CRC。
在一种可能的实现方法中,根据该包头、该数据和该第二CRC,生成该第一CRC。
该方案,由于根据该包头、该数据和该第二CRC生成该第一CRC,因此该第一CRC可以用于对数据包的传输正确性进行校验,可以保证数据包的正确传输。
在一种可能的实现方法中,该第一CRC位于该数据包的尾部,该第二CRC位于该数据包的包头之后。
在一种可能的实现方法中,该数据包是eCPRI数据包,该数据包中的数据包括eCPRI数据。
在一种可能的实现方法中,该包头指示了该数据包的类型,该数据包的类型为用户面数据或控制面数据。
第三方面,本申请实施例提供一种通信装置,该装置可以是第二设备或应用于第二设备中的模块(如芯片)。该装置具有实现上述第一方面的任意实现方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与 上述功能相对应的模块。
第四方面,本申请实施例提供一种通信装置,该装置可以是第一设备或应用于第一设备中的模块(如芯片)。该装置具有实现上述第二方面的任意实现方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第五方面,本申请实施例提供一种通信装置,包括至少一个处理器,所述至少一个处理器用于与存储器耦合,读取并执行所述存储器中的指令,以实现上述第一方面至第二方面中的任意实现方法。该存储器可以位于该装置之内,也可以位于该装置之外。
第六方面,本申请实施例提供一种通信装置,包括处理器和存储器;该存储器用于存储计算机指令,当该装置运行时,该处理器执行该存储器存储的计算机指令,以使该装置执行上述第一方面至第二方面中的任意实现方法。
第七方面,本申请实施例提供一种通信装置,包括用于执行上述第一方面至第二方面中的任意实现方法的各个步骤的单元或手段(means)。
第八方面,本申请实施例提供一种通信装置,包括处理器和接口电路,所述处理器用于通过接口电路与其它装置通信,并执行上述第一方面至第二方面中的任意实现方法。该处理器包括一个或多个。
第九方面,本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序或指令,当计算机程序或指令被通信装置运行时,使得上述第一方面至第二方面中的任意实现方法被执行。
第十方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在通信装置上运行时,使得上述第一方面至第二方面中的任意实现方法被执行。
第十一方面,本申请实施例还提供一种芯片系统,包括:处理器,用于执行上述第一方面至第二方面中的任意实现方法。
第十二方面,本申请实施例还提供一种通信系统,包括:用于执行上述第一方面的任意实现方法的第二设备,和用于执行上述第二方面的任意实现方法的第一设备。
附图说明
图1为业务报文的示例图;
图2为本申请实施例提供的一种数据包的处理方法的流程示意图;
图3(a)为本申请实施例提供的数据包格式的一个示意图;
图3(b)为本申请实施例提供的数据包格式的另一个示意图;
图4(a)为现有的基于eCPRI的业务报文的示例图;
图4(b)为本申请实施例提供的在业务数据包中插入CRC的一个示意图;
图5为本申请实施例提供的第一设备和第二设备的结构示意图;
图6为本申请实施例提供的一种通信装置示意图;
图7为本申请实施例提供的一种通信装置示意图。
具体实施方式
参考图2,为本申请实施例提供的一种数据包的处理方法的流程示意图。该实施例中,第一设备作为发送方,第二设备作为接收方。当然,在第二设备作为发送方,第一设备作为接收方的情况下,该方法也适用。示例性的,第一设备可以是基带单元(baseband unit,BBU)、集中式单元(Central Unit,CU)或者分布式单元(Distributed Unit,DU)等具有基带信号处理功能的通信设备或者功能模块,第二设备是射频单元(radio unit,RU),这里的RU比如可以是远端射频单元(radio remote unit,RRU)或自适应天线单元(active antenna unit,AAU)等具有处理中频信号、射频信号或者中射频信号处理功能的通信设备或者功能模块。或者,第一设备是RU,第二设备是BBU。其中,第一设备与第二设备之间的接口可以是eCPRI或其他类型接口,本申请实施例不做限定。
该方法包括以下步骤:
步骤201,第一设备生成数据包,该数据包包括包头、数据、第一CRC和第二CRC。
该第一CRC用于对该数据包进行校验。可选的,第一设备可以根据包头和数据生成第一CRC,或者,第一设备根据包头、该数据和第二CRC,生成第一CRC。
该第二CRC用于对包头进行校验。可选的,第一设备根据包头生成第二CRC,或者,第一设备根据包头和该数据中的部分数据生成第二CRC。
该数据包的包头指示了数据包的类型,该数据包的类型为用户面数据或控制面数据。数据包的类型为用户面数据,指的是该数据包的数据全部是用户面数据,或者包含用户面数据以及其他数据。数据包的类型为控制面数据,指的是该数据包的数据全部是控制面数据,或者包含控制面数据以及其他数据。可选的,如果数据包中包含有控制面数据,则该数据包的类型是控制面数据。数据包的类型也可以理解为是数据包的中的数据的类型。
其中,用户面数据指的是实际业务数据,例如语音数据、分组业务数据等。控制面数据指的是控制消息或信令,例如小区建立消息、小区释放消息、或者操作与维护相关的消息等。
本申请实施例对于该数据包的组包形式不做限定,也即不限定数据包中的包头、数据、第一CRC、第二CRC之间的相互位置关系。比如,第一CRC位于数据包的尾部,第二CRC位于数据包的包头之后。再比如,第一CRC位于数据包的尾部,第二CRC位于包头和数据之间。
可选的,数据包中的数据包括需要被保护的关键信息(例如会影响数据包处理方式的信息)以及业务数据,这里的关键信息例如包括eCPRI类型。在该情形下,第二CRC可以插入在包头和关键信息之后,并根据包头和所述关键信息来生成,从而可以通过第二CRC来保障该关键信息的正确传输。示例性的,数据包中的数据包括eCPRI类型和eCPRI数据,则第二CRC可以插入在eCPRI类型之后的位置。
下面结合附图,对该数据包的组包形式进行举例说明。
参考图3(a),为数据包格式的一个示意图。其中,第二CRC位于包头和数据之间,具体的,第二CRC位于包头之后、且位于数据之前。第一CRC位于数据包的尾部。第二CRC是根据包头生成的,第一CRC是根据包头和数据生成的,或者是根据包头、第二CRC和数据生成的。需要说明的是,对于不同的数据包,其包头的大小可能不同,因此不同数据包中的第二CRC的起始位置与包头的起始位置之间的距离可能不同。基于该实现方法,可以预先获知包头的大小,从而可以根据包头的大小,在包头之后插入第二CRC。
参考图3(b),为数据包格式的另一个示意图。其中,第二CRC位于数据中,插入该第二CRC之后,原来的数据被第二CRC分割成两部分,第二CRC之前的部分数据称为数据_1,第二CRC之后的部分数据称为数据_2,数据_1与数据_2的组合即为原数据。第一CRC位于数据包的尾部。第二CRC是根据包头和数据_1生成的,第一CRC是根据包头和数据生成的,或者是根据包头、第二CRC和数据生成的。基于该实现方法,可以预先设定一个长度(以下称为预设长度),第二CRC的插入位置(即第二CRC的起始位置,以下称为第一位置)即为从包头的起始位置+预设长度。示例性,该预设长度大于或等于第一长度,该第一长度可以为已知的各种包头长度中的最大长度,如此可以保证可以在包头之后插入第二CRC,而不会在包头中插入第二CRC,可以保证包头的完整性。需要说明的是,由于不同的数据包的包头的长度可能不同,因此对于不同的数据包,第二CRC之前的数据_1的比特大小可能不同。比如,预设长度为100比特,数据包x的包头为60比特,则数据包x中的数据_1的比特大小为40比特,数据包y的包头为70比特,则数据包y中的数据_1的比特大小为30比特。
步骤202,第一设备向第二设备发送数据包。相应地,第二设备接收该数据包。
第一设备可以通过第一设备与第二设备之间的接口,向第二设备发送该数据包。或者,第一设备通过一个或多个第三方设备的转发,将该数据包发送至第二设备。
步骤203,第二设备根据数据包中的第一CRC,对数据包进行校验。
比如,第二设备收到数据包后,获取该数据包中的第一CRC,以及根据数据包中的除第一CRC之外的其它部分(例如,包头、第二CRC和数据)生成第三CRC。
如果第一CRC与第三CRC相同,则该数据包校验成功,表明该数据包在传输过程中没有发生错误。
如果第一CRC与第三CRC不同,则该数据包校验失败,表明该数据包在传输过程中发生错误。其中发生错误的位置可能是在包头中、第二CRC中、数据中或者是第一CRC中。
步骤204,第二设备根据数据包中的第二CRC对数据包的包头进行校验。
第二设备获取该数据包中的第二CRC,以及根据数据包中的位于第二CRC之前的部分生成第四CRC。其中,位于第二CRC之前的部分可能是包头,比如参考图3(a)的示例,或者位于第二CRC之前的部分也可能是包头和数据_1,比如参考图3(b)的示例。
如果第二CRC与第四CRC相同,则对该数据包的包头校验成功,表明该数据包的包头在传输过程中没有发生错误。
如果第二CRC与第四CRC不同,则对该数据包的包头校验失败,表明该数据包的包头在传输过程中发生错误。其中,针对图3(a)的示例,如果第二CRC与第四CRC不同,则表明对该数据包的包头校验失败,也即包头中存在传输发生错误的比特。针对图3(b)的示例,如果第二CRC与第四CRC不同,则可能是包头中存在发生传输发生错误的比特,也可能是数据_1中存在传输发生错误的比特。但在实际应用中,一般地,数据_1在数据中的占比很小,因此对于该图3(b)的示例,如果第二CRC与第四CRC不同,表明包头或数据_1发生错误,但可以不做区分,统一认为是对该数据包的包头校验失败,也即认为是包头中存在传输发生错误的比特。
步骤205,第二设备根据数据包的校验结果和/或包头的校验结果对该数据包进行处理。
下面介绍该步骤203至步骤205的两种不同具体实现方法。
实现方法一,第二设备既执行上述步骤203得到数据包的校验结果,也执行上述步骤204得到包头的校验结果,并根据数据包的校验结果和/或包头的校验结果对该数据包进行处理。
其中,上述步骤203和步骤204的执行顺序不限,比如可以先执行步骤203再执行步骤204,或者先执行步骤204再执行步骤203,或者这两个步骤并行执行,不分先后。
该实现方法一中,第二设备根据数据包的校验结果和/或包头的校验结果对该数据包进行处理,具体可以分为以下情形1和情形2。
情形1,若数据包校验成功,表明该数据包在传输过程中没有发生错误,则第二设备不丢弃该数据包,本申请实施例中所述的“不丢弃”比如可以是保存、保留、继续处理、传输至下一级数据处理模块继续处理等等,本申请实施例中所述的“丢弃”可以包括删除、被其他数据覆盖、不继续处理、或者不传输至下一级数据处理模块等等,这里统一说明,后面不再赘述。可选的,如果第二CRC是位于数据中,则第二设备可以在删除第二CRC之后得到数据包中的数据。比如参考图3(b),第二设备删除第二CRC之后,根据数据_1和数据_2可以得到数据包中的数据。
其中,数据包校验成功,意味着包头和数据都没有发生传输错误,因此可以认为包头也会校验成功。因此数据包校验成功,可以表明数据包校验成功以及包头校验成功。
情形2,若数据包校验失败,表明该数据包在传输过程中发生错误,发生错误的位置可能是在包头中、第二CRC中、数据中或者是第一CRC中,此时第二设备可以也不丢弃该数据包,而是根据包头的校验结果再决定如何处理该数据包。因此该情形2又可以分为以下情形2.1和情形2.2。
情形2.1,数据包校验失败但数据包的包头校验成功,表明数据包发生传输错误但发生错误的位置不在包头,也即包头没有发生传输错误,这种情况可以理解为是数据包的数据发生传输错误,该情形下,第二设备可以根据数据包的类型处理该数据包。针对图3(a)的示例,意味着数据和/或第一CRC发生传输错误。针对图3(b)的示例,意味着数据中的数据_2和/或第一CRC发生传输错误。
其中,第二设备可以根据包头确定数据包的类型,比如包头中可以包含数据包的类型,或者包含用于指示数据包的类型的指示信息,或者是该包头本身可以对应数据包的类型。
作为一种实现方法,第二设备根据数据包的类型处理数据包,比如可以是:若数据包的类型是用户面数据,则不丢弃该数据包,若数据包的类型是控制面数据,则丢弃数据包。
具体的,如果数据包的类型是用户面数据,意味着数据包的包头传输正确,数据包中的数据发生传输错误,且该数据包含或者全部是用户面数据。该情形下,虽然传输的用户面数据发生一些错误,但由于包头传输正确,因此该用户面数据可以被正确处理,并且用户面数据的错误可能会稍微影响用户体验,但实际上不会造成其他更为严重的影响,因此第二设备可以不丢弃该数据包,该方式可以提升数据传输效率和系统容量。可选的,如果第二CRC是位于数据中,则第二设备可以在删除第二CRC之后得到数据包中的数据。比如参考图3(b),第二设备删除第二CRC之后,根据数据_1和数据_2可以得到数据包中的数据。可选的,第二设备在删除第二CRC得到数据之后,可以对数据进行下一步处理或者发送给下一步数据处理模块进行继续处理。
如果数据包的类型是控制面数据,意味着数据包的包头传输正确,数据包中的数据发生传输错误,且该数据是控制面数据。该情形下,尽管包头传输正确,但传输的控制面数 据发生错误,由于控制面数据发生错误带来的后果相对比较严重,因此第二设备丢弃该数据包。
情形2.2,数据包校验失败且数据包的包头校验失败,表明数据包发生传输错误且发生错误的位置至少包含包头,也即包头发生传输错误,该情形下,第二设备可以丢弃该数据包。
由于包头中包含有源地址、目的地址、源端口号、目的端口号、协议信息等中的一个或多个,因此包头对于第二设备如何正确处理该数据包起到至关重要的作用。因而如果包头校验失败,则丢弃数据包。
实现方法二,第二设备先执行上述步骤203得到数据包的校验结果,如果数据包的校验结果为数据包校验成功,则不丢弃该数据包,具体参考上述实现方法一的情形1的描述,并且后面也不再执行上述步骤204和步骤205。如果数据包的校验结果为数据包校验失败,则再执行上述步骤204得到包头的校验结果,并根据包头的校验结果对该数据包进行处理,其中,根据包头的校验结果对该数据包进行处理包括两种情形,分别如上述实现方法一中的情形2.1和情形2.2的描述。
基于该实现方法二,如果数据包校验成功,则不再校验包头,因此可以减少校验次数,从而提升校验效率。
基于该实现方法二,可选的,若数据包校验失败,可以标记该数据包。也即若数据包校验失败,则不丢弃该数据包,而是对该数据包进行标记,例如可以用特殊字符进行标记或特定比特进行标记等,表明该数据包是需要进一步判断的数据包,后续再使用第二CRC对数据包的包头进行校验,并根据包头校验结果,决定丢弃该数据包还是不丢弃该数据包。
作为一种实现方法,在上述任意实现方法中,如果第二设备丢弃收到的数据包,则第二设备在丢弃数据包之后,还可以通知第一设备重传该数据包,从而保证数据包的正确接收,有助于提升用户体验。
根据上述方案,第二设备在数据包中携带用于对数据包进行校验的第一CRC和用于对数据包的包头进行校验的第二CRC。当数据包校验失败但包头校验成功,表明包头传输正确但数据传输错误。此时,第二设备可以根据数据包的类型处理该数据包,而不是直接丢弃该数据包。如此可以减少丢包次数,从而可以提升数据传输效率和系统容量。
本申请实施例提供的上述方案,可以应用于各种场景,对此本申请不做限定。下面结合一个具体应用场景进行说明。
以下示例中,以第一设备与第二设备之间的接口是eCPRI为例进行说明。该示例下,第一设备向第二设备发送的数据包可以称为eCPRI数据包,数据包中的数据可以称为eCPRI数据。
目前,在传统的CPRI上,传输的数据实际是空口数据的数字采样信号,个别误码只是影响这一个采样数据的数值精度,不影响其他样点,因此CPRI链路对光纤误码的容忍度比较高。无线前传从CPRI切换到eCPRI之后,由于前传链路上存在误码,按照目前处理机制,一个比特的错误会导致一个数据包CRC校验失败,从而该数据包被丢弃,而一个数据包被丢弃将导致整个业务报文因无法收齐所有的数据包而被丢弃。因此,一个比特的误码导致的数据丢失损失急剧放大,导致从CPRI切换到eCPRI之后,业务性能相对下 降,影响用户体验。
参考图4(a),为现有的基于eCPRI的业务报文格式示意图。其中,一个业务报文包括一个或多个数据包,每个数据包包括媒体接入控制(medium access control,MAC)头、MAC数据和CRC。
其中,MAC头包括源MAC地址、目的MAC地址等信息。
MAC数据包括eCPRI类型和eCPRI数据,eCPRI数据包括待传输的用户面数据或控制面数据。
CRC用于对MAC头和MAC数据的正确性进行校验。如果接收端对该CRC校验成功,表明该MAC头和MAC数据均传输正确,没有错误比特。如果对该CRC校验失败,表明该MAC头和MAC数据中存在错误的比特。
以图4(a)为例,假设数据包3中的某个比特或某些比特发生传输错误,则接收端对业务数据包3的CRC校验失败,则按照目前处理机制,接收端将会丢弃该数据包3。同时,由于接收端未能正确接收该数据包3,因而导致整个业务报文因无法收齐所有的数据包也将被丢弃。这意味着即使接收端正确接收了除数据包3之外的其它n-1个数据包,接收端也会丢弃这n-1个数据包,因而造成业务性能相对下降,影响用户体验。
下面结合图2所示的方法,对现有的eCPRI数据包进行改进,具体的,第一设备生成的eCPRI数据包包括两个CRC,分别为第一CRC和第二CRC。然后第一设备将该eCPRI数据包发送给第二设备,第二设备可以根据该eCPRI数据包中的第一CRC和第二CRC,确定处理该eCPRI数据包的方式。
该eCPRI数据包的传输和处理过程包括以下步骤:
步骤1,第一设备获取数据包a,该数据包a包括MAC头、eCPRI类型和eCPRI数据。
这里的MAC头即为上述图2的实施例中的包头的一个具体示例。
这里的eCPRI类型和eCPRI数据的组合即为上述图2的实施例中的数据的一个具体示例。
步骤2,第一设备在数据包a中插入CRC1,得到数据包b。
这里的CRC1即为上述图2的实施例中的第二CRC的一个具体示例。
其中,图4(b)为在业务数据包中插入CRC的示意图。该示例中,是在第一位置插入CRC1,且插入CRC1之后,eCPRI数据被划分为eCPRI数据_1和eCPRI数据_2。其中,CRC1是根据MAC头、eCPRI类型和eCPRI数据_1生成的,这里的eCPRI类型和eCPRI数据_1的组合即为上述图2的实施例中的数据_1的一个具体示例。
步骤3,第一设备在数据包b的尾部插入CRC2,得到数据包c。
这里的CRC2头即为上述图2的实施例中的第一CRC的一个具体示例。
该CRC2是根据MAC头、eCPRI类型、CRC1、eCPRI数据_1以及eCPRI数据_2生成的。
步骤4,第一设备向第二设备发送数据包c。
这里的数据包c即为上述图2的实施例中第一设备向第二设备发送的数据包的一个具体示例。
步骤5,第二设备对数据包c中的CRC2进行校验,可选的,还对CRC1进行校验,分为以下情形1和情形2:
情形1,如果CRC2校验成功,表明MAC头、eCPRI类型以及eCPRI数据均传输正 确,则第二设备不丢弃该数据c。可选的,第二设备还删除CRC1,得到eCPRI数据并保存eCPRI数据。
情形2,如果CRC2校验失败,则进一步对CRC1进行校验,分为以下情形2.1和情形2.2:
情形2.1,如果CRC1校验失败,则丢弃数据包c。
情形2.2,如果CRC1校验成功,则分为以下情形2.2.1和情形2.2.2:
情形2.2.1,如果eCPRI数据的类型是用户面数据,则不丢弃该数据包c。可选的,第二设备还删除CRC1,得到eCPRI数据。
情形2.2.2,如果eCPRI数据的类型是控制面数据,则丢弃该数据包c。
其中,第二设备可以根据MAC头和/或eCPRI类型,确定该eCPRI数据的类型。
通过上述方法,实现了对eCPRI数据包的传输和处理,可以提升数据传输效率和系统容量,有助于提升用户体验。
示例性的,下面给出上述第一设备、第二设备的一种实现方式。参考图5,为本申请实施例提供的第一设备和第二设备的结构示意图。下面以将该图5所示的第一设备、第二设备应用于上述eCPRI数据包的传输和处理过程为例进行说明。
第一设备包括基带处理单元、头部校验编码单元和以太网MAC层发包单元,其中:
1)、基带处理单元:产生数据包a,数据包a包括MAC头、eCPRI类型和eCPRI数据;
2)、头部校验处理单元:根据MAC头、eCPRI类型和eCPRI数据_1生成CRC1,并在第一位置插入CRC1,得到数据包b;
3)、以太网MAC层发包单元:根据MAC头、eCPRI类型、CRC1和eCPRI数据生成CRC2,并在数据包b的尾部添加CRC2,得到数据包c,并通过第一设备与第二设备之间的eCPRI接口向第二设备发送数据包c。
第二设备包括以太网MAC层收包单元、头部校验译码单元和基带处理单元,其中:
1)、以太网MAC层收包单元:接收数据包c,校验数据包c中的CRC2,如果CRC2校验成功则删除数据包c中的CRC2得到数据包b,并生成标记信息1,标记信息1指示数据包校验成功,然后将数据包b和标记信息1发送给头部校验单元;如果CRC2校验失败则删除CRC2得到数据包b,并生成标记信息2,标记信息2指示数据包校验失败,然后将数据包b和标记信息2发送给头部校验单元。
2)、头部校验处理单元:接收数据包b,以及接收标记信息1或标记信息2。如果头部校验处理单元接收到数据包b和标记信息1,则去除CRC1后得到数据包a,并生成标记信息3,标记信息3指示数据包校验成功,然后头部校验处理单元向基带处理单元发送数据包a和标记信息3。如果头部校验处理单元接收到数据包b和标记信息2,则校验数据包b中的CRC1,如果CRC1校验成功且数据包b的类型是用户面数据,则删除CRC1得到数据包a,并生成标记信息3,标记信息3指示数据包校验成功,然后将数据包a和标记信息3发送给基带处理单元;如果CRC1校验成功但数据包b的类型是控制面数据,或者CRC1校验失败,则头部校验处理单元删除CRC1得到数据包a,并生成标记信息4,标记信息4指示数据包校验失败,然后将数据包a和标记信息4发送给基带处理单元。
3)、基带处理单元:接收数据包a,以及接收标记信息3或标记信息4。如果收到数据包a和标记信息3,则不丢弃该数据包a,比如可以对数据包a进行处理或者发送给下一步数据处理模型进行处理等。如果收到数据包a和标记信息4,则丢弃该数据包a。
上述实现中,标记信息1、标记信息2、标记信息3以及标记信息4可以不同时存在。在上述给出的实现中,第二设备的以太网MAC层收包单元通过标记信息1告知头部校验单元:数据包校验成功,以及通过标记信息2告知头部校验单元:数据包校验失败。作为另一种实现,当以太网MAC层收包单元确定数据包c校验成功,则向头部校验单元发送数据包b和一个标记信息,当以太网MAC层收包单元确定数据包c校验成功,则不向头部校验单元发送数据包b,因此当头部校验单元收到数据包b和一个标记信息,则确定数据包b校验成功,即数据包b没有发生传输错误,当头部校验单元收到数据包b,则数据包b校验失败,即数据包b发生传输错误。或者反过来,当以太网MAC层收包单元确定数据包c校验成功,则向头部校验单元发送数据包b,当以太网MAC层收包单元确定数据包c校验失败,则向头部校验单元发送数据包b和一个标记信息。
作为一种实现,头部校验单元和基带处理单元也可以按照以下处理方式处理数据包:头部校验单元接收数据包b,以及接收标记信息1或标记信息2。如果头部校验处理单元接收到数据包b和标记信息1,则删除数据包b中的CRC1后得到数据包a并向基带处理单元发送数据包a。如果头部校验处理单元接收到数据包b和标记信息2,则校验数据包b中的CRC1,如果CRC1校验成功且数据包b的类型是用户面数据,则删除CRC1得到数据包a,并将数据包a发送给基带处理单元;如果CRC1校验成功但数据包b的类型是控制面数据,或者CRC1校验失败,则头部校验处理单元丢弃该数据包b。相应的,基带处理单元接收数据包a,基带处理单元不丢弃该数据包a,比如可以对数据包a进行处理或者发送给下一步数据处理模型进行处理等。
可以理解的,上述功能单元的划分以及名称仅为示例,上述示例中在同一个单元中实现的功能也可以由不同的功能模块或功能单元来实现,类似的,上述实例中在不同单元中实现的功能,也可以根据需要由同一个功能模块或单元来实现,本申请对此不做限定。
通过上述方案,可以挽回存在误码比特的大部分携带用户面数据的数据包,可以提高前传链路误码状态下的系统性能。
可以理解的是,为了实现上述实施例中功能,第一设备或第二设备包括了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本申请中所公开的实施例描述的各示例的单元及方法步骤,本申请能够以硬件或硬件和计算机软件相结合的形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用场景和设计约束条件。
图6和图7为本申请的实施例提供的可能的通信装置的结构示意图。这些通信装置600可以用于实现上述方法实施例中第一设备或第二设备的功能,因此也能实现上述方法实施例所具备的有益效果。在本申请的实施例中,该通信装置可以是第一设备或第二设备,也可以是应用于第一设备或第二设备的模块(如芯片)。如图6所示,通信装置600包括处理单元610和收发单元620。通信装置600用于实现上述方法实施例中第一设备或第二设备的功能。示例性的,当通信装置600用于实现上述图5中的第一设备的功能,则处理单元610可用于实现第一设备中的基带处理单元和头部校验处理单元的功能,收发单元620 可用于实现第一设备中的以太网MAC层发包单元的功能。当通信装置600用于实现上述图5中的第二设备的功能,则处理单元610可用于实现第二设备中的基带处理单元和头部校验处理单元的功能,收发单元620可用于实现第二设备中的以太网MAC层收包单元的功能。
在第一个实施例中,该通信装置用于实现上述方法图2所示的方法实施例中的第二设备的操作,收发单元620,用于接收来自第一设备的数据包,该数据包包括包头、数据、第一CRC和第二CRC;处理单元610,用于根据该数据包中的第一CRC,对该数据包进行校验;根据该数据包中的第二CRC对该数据包的包头进行校验;以及根据数据包的校验结果和/或包头的校验结果对该数据包进行处理。
在一种可能的实现中,处理单元610,具体用于若所述数据包校验成功,或者若数据包校验成功且包头校验成功,则不丢弃所述数据包;若所述数据包校验失败且所述包头校验失败,则丢弃所述数据包;或者,若所述数据包校验失败但所述包头校验成功,则根据所述数据包的类型处理所述数据包。
在一种可能的实现中,处理单元610,具体用于若数据包校验失败,则根据该数据包中的第二CRC对数据包的包头进行校验。
在一种可能的实现中,处理单元610,具体用于若数据包校验失败,则标记该数据包。
在一种可能的实现中,处理单元610,具体用于若该数据包的类型是用户面数据,则不丢弃该数据包;或者,若该数据包的类型是控制面数据,则丢弃该数据包。
在一种可能的实现中,处理单元610,还用于根据该包头,确定该数据包的类型。
在一种可能的实现中,处理单元610,还用于从该数据包中删除该第二CRC。
在一种可能的实现中,该第一CRC位于该数据包的尾部,该第二CRC位于该数据包的包头之后。
在一种可能的实现中,该第一CRC是根据该数据包的包头和该数据包的数据生成的。
在一种可能的实现中,该第一CRC是根据该数据包的包头、该数据包的数据和该第二CRC生成的。
在一种可能的实现中,该第二CRC是根据该数据包的包头生成的。
在一种可能的实现中,该第二CRC是根据该数据包的包头和该数据包中的部分数据生成的。
在一种可能的实现中,该数据包是eCPRI数据包,该数据包中的数据包括eCPRI数据。
在第二个实施例中,该通信装置用于实现上述方法图2所示的方法实施例中的第一设备的操作,处理单元610,用于生成数据包,该数据包包括包头、数据、第一CRC和第二CRC,该第一CRC用于对该数据包进行校验,该第二CRC用于对该包头进行校验;收发单元620,用于向第二设备发送该数据包。
在一种可能的实现中,处理单元610,还用于根据该包头,生成该第二CRC。
在一种可能的实现中,处理单元610,具体用于根据该数据中的部分数据和该包头,生成该第二CRC。
在一种可能的实现中,处理单元610,还用于根据该包头、该数据和该第二CRC,生成该第一CRC。
在一种可能的实现中,该第一CRC位于该数据包的尾部,该第二CRC位于该数据包的包头之后。
在一种可能的实现中,该数据包是eCPRI数据包,该数据包中的数据包括eCPRI数据。
在一种可能的实现中,该包头指示了该数据包的类型,该数据包的类型为用户面数据或控制面数据。
有关上述处理单元610和收发单元620更详细的描述可以直接参考上述方法实施例中相关描述直接得到,这里不加赘述。
如图7所示,通信装置700包括至少一个处理器710,还可以包括接口电路720。处理器710可以和接口电路720之间相互耦合。可以理解的是,接口电路720可以为收发器或输入输出接口。可选的,通信装置700还可以包括存储器730,用于存储处理器710执行的指令或存储处理器710运行指令所需要的输入数据或存储处理器710运行指令后产生的数据。
当通信装置700用于实现上述方法实施例时,处理器710用于实现上述处理单元610的功能,接口电路720可以用于实现上述收发单元620的功能。
可以理解的是,本申请的实施例中的处理器可以是中央处理单元(central processing unit,CPU),还可以是其它通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其它可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。
本申请的实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器、闪存、只读存储器、可编程只读存储器、可擦除可编程只读存储器、电可擦除可编程只读存储器、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于基站或终端中。当然,处理器和存储介质也可以作为分立组件存在于基站或终端中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序或指令。在计算机上加载和执行所述计算机程序或指令时,全部或部分地执行本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、基站、用户设备或者其它可编程装置。所述计算机程序或指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序或指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是集成一个或多个可用介质的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,例如,软盘、硬盘、磁带;也可以是光介质,例如,数字视频光盘;还可以是半导体介质,例如,固态硬盘。该计算机可读存储介质可以是易失性或非易失性存储介质,或可包括易失性和非易失性两种类型的存储介质。
在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑 关系可以组合形成新的实施例。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。在本申请的文字描述中,字符“/”,一般表示前后关联对象是一种“或”的关系;在本申请的公式中,字符“/”,表示前后关联对象是一种“相除”的关系。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定。

Claims (23)

  1. 一种数据包的处理方法,其特征在于,包括:
    接收来自第一设备的数据包;
    根据所述数据包中的第一循环冗余校验CRC,对所述数据包进行校验;
    根据所述数据包中的第二CRC对所述数据包的包头进行校验;
    若所述数据包校验失败且所述包头校验失败,则丢弃所述数据包;或者,
    若所述数据包校验失败但所述包头校验成功,则根据所述数据包的类型处理所述数据包。
  2. 如权利要求1所述的方法,其特征在于,所述根据所述数据包中的第二CRC对所述数据包的包头进行校验,包括:
    若所述数据包校验失败,则根据所述数据包中的所述第二CRC对所述数据包的包头进行校验。
  3. 如权利要求1或2所述的方法,其特征在于,所述方法还包括:
    若所述数据包校验失败,则标记所述数据包。
  4. 如权利要求1至3中任一项所述的方法,其特征在于,所述根据所述数据包的类型处理所述数据包,包括:
    若所述数据包的类型是用户面数据,则不丢弃所述数据包;或者,
    若所述数据包的类型是控制面数据,则丢弃所述数据包。
  5. 如权利要求4所述的方法,其特征在于,所述方法还包括:
    根据所述包头,确定所述数据包的类型。
  6. 如权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:
    从所述数据包中删除所述第二CRC。
  7. 如权利要求1至6中任一项所述的方法,其特征在于,所述第一CRC位于所述数据包的尾部,所述第二CRC位于所述数据包的包头之后。
  8. 如权利要求1至7中任一项所述的方法,其特征在于,所述第一CRC是根据所述数据包的包头、所述数据包的数据和所述第二CRC生成的。
  9. 如权利要求1至8中任一项所述的方法,其特征在于,所述第二CRC是根据所述数据包的包头生成的。
  10. 如权利要求9所述的方法,其特征在于,所述第二CRC是根据所述数据包的包头和所述数据包中的部分数据生成的。
  11. 如权利要求1至10中任一项所述的方法,其特征在于,所述数据包是增强通用公共无线接口eCPRI数据包,所述数据包中的数据包括eCPRI数据。
  12. 一种数据包的处理方法,其特征在于,包括:
    生成数据包,所述数据包包括包头、数据、第一循环冗余校验CRC和第二CRC,所述第一CRC用于对所述数据包进行校验,所述第二CRC用于对所述包头进行校验;
    向第二设备发送所述数据包。
  13. 如权利要求12所述的方法,其特征在于,所述方法还包括:
    根据所述包头,生成所述第二CRC。
  14. 如权利要求13所述的方法,其特征在于,所述根据所述包头,生成所述第二CRC, 包括:
    根据所述数据中的部分数据和所述包头,生成所述第二CRC。
  15. 如权利要求12至14中任一项所述的方法,其特征在于,所述方法还包括:
    根据所述包头、所述数据和所述第二CRC,生成所述第一CRC。
  16. 如权利要求12至15中任一项所述的方法,其特征在于,
    所述第一CRC位于所述数据包的尾部,所述第二CRC位于所述包头之后。
  17. 如权利要求12至16中任一项所述的方法,其特征在于,所述数据包是增强通用公共无线接口eCPRI数据包,所述数据包中的数据包括eCPRI数据。
  18. 如权利要求12至17中任一项所述的方法,其特征在于,所述包头指示了所述数据包的类型,所述数据包的类型为用户面数据或控制面数据。
  19. 一种通信装置,其特征在于,包括用于执行如权利要求1至11中任一项所述方法的模块,或用于执行如权利要求12至18中任一项所述方法的模块。
  20. 一种通信装置,其特征在于,包括至少一个处理器,所述至少一个处理器用于与存储器耦合,读取并执行所述存储器中的指令,以实现:如权利要求1至11中任一项所述的方法,或如权利要求12至18中任一项所述的方法。
  21. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被通信装置执行时,实现如权利要求1至18中任一项所述的方法。
  22. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有计算机程序或指令,当所述计算机程序或指令被通信装置执行时,实现如权利要求1至18中任一项所述的方法。
  23. 一种通信系统,其特征在于,包括用于执行如权利要求1至11中任一项所述方法的第二设备,和用于执行如权利要求12至18中任一项所述方法的第一设备。
PCT/CN2022/130825 2021-11-30 2022-11-09 一种数据包的处理方法、通信装置及通信系统 WO2023098430A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111450373.5 2021-11-30
CN202111450373.5A CN114499750A (zh) 2021-11-30 2021-11-30 一种数据包的处理方法、通信装置及通信系统

Publications (1)

Publication Number Publication Date
WO2023098430A1 true WO2023098430A1 (zh) 2023-06-08

Family

ID=81492080

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/130825 WO2023098430A1 (zh) 2021-11-30 2022-11-09 一种数据包的处理方法、通信装置及通信系统

Country Status (2)

Country Link
CN (1) CN114499750A (zh)
WO (1) WO2023098430A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114499750A (zh) * 2021-11-30 2022-05-13 华为技术有限公司 一种数据包的处理方法、通信装置及通信系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001067715A1 (en) * 2000-03-07 2001-09-13 Telefonaktiebolaget Lm Ericsson (Publ) Pre-verification of checksums used with checksum-based header compression
CN102611531A (zh) * 2012-03-12 2012-07-25 成都龙冠科技实业有限公司 一种单向数据传输方法
CN104717031A (zh) * 2013-12-12 2015-06-17 华为终端有限公司 流媒体报文的处理方法、WiFi芯片及移动终端
CN112350798A (zh) * 2019-08-08 2021-02-09 华为技术有限公司 分组传输方法和装置
CN114499750A (zh) * 2021-11-30 2022-05-13 华为技术有限公司 一种数据包的处理方法、通信装置及通信系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155141A (zh) * 2006-09-29 2008-04-02 华为技术有限公司 分组语音数据包传输方法及其系统
CN104935408B (zh) * 2015-06-04 2018-09-28 深圳市吉芯微半导体有限公司 数据传输方法及装置
CN111328104B (zh) * 2018-12-14 2022-03-04 华为技术有限公司 数据包的解压缩方法和装置
CN112019485A (zh) * 2019-05-31 2020-12-01 华为技术有限公司 一种报文的生成、校验方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001067715A1 (en) * 2000-03-07 2001-09-13 Telefonaktiebolaget Lm Ericsson (Publ) Pre-verification of checksums used with checksum-based header compression
CN102611531A (zh) * 2012-03-12 2012-07-25 成都龙冠科技实业有限公司 一种单向数据传输方法
CN104717031A (zh) * 2013-12-12 2015-06-17 华为终端有限公司 流媒体报文的处理方法、WiFi芯片及移动终端
CN112350798A (zh) * 2019-08-08 2021-02-09 华为技术有限公司 分组传输方法和装置
CN114499750A (zh) * 2021-11-30 2022-05-13 华为技术有限公司 一种数据包的处理方法、通信装置及通信系统

Also Published As

Publication number Publication date
CN114499750A (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
CN108600124B (zh) 基于安全协议的网络拆包和组包方法
US20030023915A1 (en) Forward error correction system and method for packet based communication systems
CN106656424B (zh) 一种数据传输的校验方法
JP2011504314A (ja) 部分的に崩壊したデータパケットからの値の抽出方法
WO2018171641A1 (zh) 网络管理信息的收发方法、装置、发送设备和接收设备
WO2023098430A1 (zh) 一种数据包的处理方法、通信装置及通信系统
CN113079074A (zh) 一种基于can总线的协议栈通信方法、装置和存储介质
CN110545161B (zh) 一种具有冗余的多媒体数据实时传输方法
CN110138635B (zh) 一种支持fc与以太网的协议转换功能验证装置及方法
WO2022042543A1 (zh) 一种以太网错误帧的重传方法及相关装置
WO2021208694A1 (zh) 一种数据传输方法及网络设备
WO2018133020A1 (zh) 数据传输方法、装置、发送端、接收端及系统
EP4175210A1 (en) Rate adaptation method and apparatus
CN110149242B (zh) 一种支持srio与以太网的协议转换功能验证装置及方法
WO2018137218A1 (zh) 一种数据传输方法、数据接收设备及数据发送设备
US11868209B2 (en) Method and system for sequencing data checks in a packet
US20230261795A1 (en) Method for Retransmitting Data and Apparatus
CN113973091A (zh) 一种报文处理方法、网络设备以及相关设备
CN109756306B (zh) 信息传输方法和通信设备
WO2019034061A1 (zh) 数据传输方法、装置及系统
CN115714991A (zh) 时间明晰网络数据包的传输方法、设备及存储介质
EP2306666B1 (en) Reduction of frame error rate in a node of a wireless packet-switched communication network
WO2022022727A1 (zh) 比特块的发送方法及装置
CN117834095B (zh) 一种重传报文的方法、电子设备及存储介质
CN114614877B (zh) 基于tdm/tdma体制的卫星通信数据封装系统及其封装方法

Legal Events

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

Ref document number: 22900235

Country of ref document: EP

Kind code of ref document: A1