[go: up one dir, main page]

CN111800371A - Data processing method, sender and receiver - Google Patents

Data processing method, sender and receiver Download PDF

Info

Publication number
CN111800371A
CN111800371A CN201910606119.6A CN201910606119A CN111800371A CN 111800371 A CN111800371 A CN 111800371A CN 201910606119 A CN201910606119 A CN 201910606119A CN 111800371 A CN111800371 A CN 111800371A
Authority
CN
China
Prior art keywords
header
packet
compressed
data packet
ethernet frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910606119.6A
Other languages
Chinese (zh)
Other versions
CN111800371B (en
Inventor
张艳霞
吴昱民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910606119.6A priority Critical patent/CN111800371B/en
Publication of CN111800371A publication Critical patent/CN111800371A/en
Application granted granted Critical
Publication of CN111800371B publication Critical patent/CN111800371B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information

Landscapes

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

Abstract

本发明提供一种数据处理方法、发送端和接收端,其中发送端对应的方法包括:接收第一数据包,所述第一数据包包括以太帧头和IP系列包头;至少对所述第一数据包中的所述以太帧头进行压缩处理,得到第二数据包,所述第二数据包至少包括第一压缩包头;其中,所述第一压缩包头为对所述以太帧头进行压缩处理得到的压缩包头。本发明中,发送端至少可对以太帧数据中的以太帧头进行压缩处理,接收端可对经过压缩处理的以太帧数据进行解压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。

Figure 201910606119

The present invention provides a data processing method, a transmitting end and a receiving end, wherein the method corresponding to the transmitting end includes: receiving a first data packet, the first data packet including an Ethernet frame header and an IP series packet header; The Ethernet frame header in the data packet is compressed to obtain a second data packet, and the second data packet includes at least a first compressed packet header; wherein, the first compressed packet header is to perform compression processing on the Ethernet frame header The resulting compressed header. In the present invention, the transmitting end can at least compress the Ethernet frame header in the Ethernet frame data, and the receiving end can decompress the compressed Ethernet frame data. In this way, the Ethernet frame data is between the transmitting end and the receiving end. During transmission, the required transmission resources are reduced, so that the transmission resource overhead of the Ethernet frame data can be reduced.

Figure 201910606119

Description

数据处理方法、发送端和接收端Data processing method, sender and receiver

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种数据处理方法、发送端和接收端。The present invention relates to the field of communication technologies, and in particular, to a data processing method, a sending end and a receiving end.

背景技术Background technique

工业环境中,数据传输通常采用以太网封装技术,在以太网链路上传输的数据称为以太帧。以太帧包含以太帧头(Ethernet header)和携带有效数据的以太帧载荷(Ethernet payload),其中以太帧载荷中的有效数据可以是IP类型的数据,这类数据包含IP系列包头(例如IP(Internet Protocol,互联网协议)头、TCP(Transmission ControlProtocol,传输控制协议)头)。在某些情况下,以太帧数据中头所占据的长度较大,这使得以太帧数据传输时存在因头所占据长度较大而导致资源开销较大的问题。In an industrial environment, data transmission usually adopts the Ethernet encapsulation technology, and the data transmitted on the Ethernet link is called an Ethernet frame. An Ethernet frame includes an Ethernet header and an Ethernet payload that carries valid data. The valid data in the Ethernet frame payload can be IP type data, which includes IP series headers (such as IP (Internet Protocol, Internet Protocol) header, TCP (Transmission Control Protocol, Transmission Control Protocol) header). In some cases, the length occupied by the header in the Ethernet frame data is relatively large, which causes the problem of large resource overhead due to the large length occupied by the header during the transmission of the Ethernet frame data.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种数据处理方法、发送端和接收端,以解决以太帧数据传输时存在因头所占据长度较大而导致资源开销较大的问题。Embodiments of the present invention provide a data processing method, a sending end and a receiving end, so as to solve the problem of large resource overhead due to the large length occupied by the header during data transmission of the Ethernet frame.

为了解决上述技术问题,本发明是这样实现的:In order to solve the above-mentioned technical problems, the present invention is achieved in this way:

第一方面,本发明实施例提供一种数据处理方法,应用于发送端,所述方法包括:In a first aspect, an embodiment of the present invention provides a data processing method, which is applied to a sending end, and the method includes:

接收第一数据包,所述第一数据包包括以太帧头和IP系列包头;Receive a first data packet, where the first data packet includes an Ethernet frame header and an IP series header;

至少对所述第一数据包中的所述以太帧头进行压缩处理,得到第二数据包,所述第二数据包至少包括第一压缩包头;Perform compression processing on at least the Ethernet frame header in the first data packet to obtain a second data packet, and the second data packet includes at least the first compressed packet header;

其中,所述第一压缩包头为对所述以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

第二方面,本发明实施例提供一种数据处理方法,应用于接收端,所述方法包括:In a second aspect, an embodiment of the present invention provides a data processing method, which is applied to a receiving end, and the method includes:

接收第一数据包,所述第一数据包至少包括第一压缩包头;receiving a first data packet, the first data packet including at least a first compressed packet header;

对所述第一数据包中的压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包;Decompressing the compressed header in the first data packet to obtain the second data packet including the Ethernet frame header and the IP series header;

其中,所述第一压缩包头为对以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

第三方面,本发明实施例提供一种发送端,包括:In a third aspect, an embodiment of the present invention provides a transmitter, including:

接收模块,用于接收第一数据包,所述第一数据包包括以太帧头和IP系列包头;a receiving module, configured to receive a first data packet, where the first data packet includes an Ethernet frame header and an IP series packet header;

压缩模块,用于至少对所述第一数据包中的所述以太帧头进行压缩处理,得到第二数据包,所述第二数据包至少包括第一压缩包头;a compression module, configured to compress at least the Ethernet frame header in the first data packet to obtain a second data packet, where the second data packet includes at least the first compressed packet header;

其中,所述第一压缩包头为对所述以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

第四方面,本发明实施例提供一种接收端,包括:In a fourth aspect, an embodiment of the present invention provides a receiving end, including:

接收模块,用于接收第一数据包,所述第一数据包至少包括第一压缩包头;a receiving module, configured to receive a first data packet, where the first data packet includes at least a first compressed packet header;

解压缩模块,用于对所述第一数据包中的压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包;a decompression module, for decompressing the compressed header in the first data packet to obtain a second data packet including an Ethernet frame header and an IP series header;

其中,所述第一压缩包头为对以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

第五方面,本发明实施例提供另一种发送端,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现本发明实施例第一方面提供的数据处理方法中的步骤。In a fifth aspect, an embodiment of the present invention provides another sending end, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor When executed, the steps in the data processing method provided in the first aspect of the embodiments of the present invention are implemented.

第六方面,本发明实施例提供另一种接收端,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现本发明实施例第二方面提供的数据处理方法中的步骤。In a sixth aspect, an embodiment of the present invention provides another receiving end, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor When executed, the steps in the data processing method provided in the second aspect of the embodiments of the present invention are implemented.

第七方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例第一方面提供的数据处理方法中的步骤。In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the data provided in the first aspect of the embodiment of the present invention is implemented steps in the processing method.

第八方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例第二方面提供的数据处理方法中的步骤。In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the data provided in the second aspect of the embodiment of the present invention is implemented steps in the processing method.

本发明实施例中,发送端至少可对以太帧数据中的以太帧头进行压缩处理,接收端可对经过压缩处理的以太帧数据进行解压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。In the embodiment of the present invention, the sending end can at least perform compression processing on the Ethernet frame header in the Ethernet frame data, and the receiving end can perform decompression processing on the compressed Ethernet frame data. When transmitting between them, the required transmission resources are reduced, so that the transmission resource overhead of the Ethernet frame data can be reduced.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative labor.

图1是本发明实施例提供的一种网络系统的系统图;1 is a system diagram of a network system provided by an embodiment of the present invention;

图2是本发明实施例提供的应用于网络系统的数据处理方法的流程图;2 is a flowchart of a data processing method applied to a network system provided by an embodiment of the present invention;

图3是本发明实施例提供的以太帧数据的结构示意图;3 is a schematic structural diagram of Ethernet frame data provided by an embodiment of the present invention;

图4是本发明实施例提供的应用于发送端的数据处理方法的流程图;4 is a flowchart of a data processing method applied to a sending end provided by an embodiment of the present invention;

图5是本发明实施例提供的一种压缩处理方式的流程图;5 is a flowchart of a compression processing method provided by an embodiment of the present invention;

图6是本发明实施例提供的另一种压缩处理方式的流程图;6 is a flowchart of another compression processing method provided by an embodiment of the present invention;

图7是本发明实施例提供的应用于接收端的数据处理方法的流程图;7 is a flowchart of a data processing method applied to a receiving end provided by an embodiment of the present invention;

图8是本发明实施例提供的一种解压缩处理方式的流程图;8 is a flowchart of a decompression processing method provided by an embodiment of the present invention;

图9是本发明实施例提供的另一种解压缩处理方式的流程图;9 is a flowchart of another decompression processing method provided by an embodiment of the present invention;

图10是本发明实施例提供的发送端的结构图;10 is a structural diagram of a transmitter provided by an embodiment of the present invention;

图11是本发明实施例提供的接收端的结构图;11 is a structural diagram of a receiving end provided by an embodiment of the present invention;

图12是本发明实施例提供的终端的硬件结构图;12 is a hardware structure diagram of a terminal provided by an embodiment of the present invention;

图13是本发明实施例提供的网络侧设备的硬件结构图。FIG. 13 is a hardware structural diagram of a network side device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本申请的说明书和权利要求书中的术语“包括”以及它的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。此外,说明书以及权利要求中使用“和/或”表示所连接对象的至少其中之一,例如A和/或B,表示包含单独A,单独B,以及A和B都存在三种情况。The term "comprising" and any variations thereof in the description and claims of this application are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to the explicit Those steps or units are explicitly listed, but may include other steps or units not expressly listed or inherent to the process, method, product or apparatus. In addition, the use of "and/or" in the description and the claims indicates at least one of the connected objects, such as A and/or B, indicating that there are three cases including A alone, B alone, and both A and B.

在本发明实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本发明实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as an example, illustration or illustration. Any embodiments or designs described as "exemplary" or "such as" in the embodiments of the present invention should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.

下面结合附图介绍本发明的实施例。本发明实施例提供的数据处理方法可以应用于无线通信系统中。该无线通信系统可以为5G系统,或者演进型长期演进(Evolved LongTerm Evolution,eLTE)系统,或者后续演进通信系统。Embodiments of the present invention will be described below with reference to the accompanying drawings. The data processing method provided by the embodiment of the present invention can be applied to a wireless communication system. The wireless communication system may be a 5G system, or an evolved long-term evolution (Evolved Long Term Evolution, eLTE) system, or a subsequent evolution communication system.

图1是本发明实施例提供的一种网络系统的结构图,如图1所示,包括终端11和网络侧设备12。其中,上述终端可以是移动通信设备,例如:可以是手机、平板电脑(TabletPersonal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digitalassistant,简称PDA)、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。上述网络侧设备可以是5G网络侧设备(例如:gNB、5G NR NB),或者可以是4G网络侧设备(例如:eNB),或者可以是3G网络侧设备(例如:NB),或者后续演进通信系统中的网络侧设备,等等。FIG. 1 is a structural diagram of a network system provided by an embodiment of the present invention, as shown in FIG. 1 , including a terminal 11 and a network side device 12 . The above-mentioned terminal may be a mobile communication device, such as a mobile phone, a tablet computer (TabletPersonal Computer), a laptop computer (Laptop Computer), a personal digital assistant (PDA for short), a mobile Internet Device (Mobile Internet Device) , MID) or wearable device (Wearable Device), etc. The above-mentioned network side equipment may be 5G network side equipment (for example: gNB, 5G NR NB), or may be 4G network side equipment (for example: eNB), or may be 3G network side equipment (for example: NB), or subsequent evolution communication Network side devices in the system, etc.

其中,在上行传输时,终端11可作为本发明实施例的发送端,网络侧设备12可作为本发明实施例的接收端;在下行传输时,网络侧设备12可作为本发明实施例的发送端,终端11可作为本发明实施例的接收端。Wherein, during uplink transmission, the terminal 11 can be used as the sending end of the embodiment of the present invention, and the network-side device 12 can be used as the receiving end of the embodiment of the present invention; during downlink transmission, the network-side device 12 can be used as the sending end of the embodiment of the present invention. terminal, the terminal 11 may serve as the receiving terminal in this embodiment of the present invention.

本发明实施例提供一种应用于图1所示的网络系统的数据处理方法,如图2所示,该方法包括以下步骤:An embodiment of the present invention provides a data processing method applied to the network system shown in FIG. 1. As shown in FIG. 2, the method includes the following steps:

步骤201:发送端接收第一数据包,所述第一数据包包括以太帧头和IP系列包头;Step 201: the transmitting end receives a first data packet, where the first data packet includes an Ethernet frame header and an IP series packet header;

步骤202:发送端至少对所述第一数据包中的所述以太帧头进行压缩处理,得到第二数据包,所述第二数据包至少包括第一压缩包头;其中,所述第一压缩包头为对所述以太帧头进行压缩处理得到的压缩包头;Step 202: The sender compresses at least the Ethernet frame header in the first data packet to obtain a second data packet, and the second data packet includes at least a first compressed packet header; wherein, the first compressed packet The packet header is a compressed packet header obtained by compressing the Ethernet frame header;

步骤203:发送端将所述第二数据包发送至接收端;Step 203: the sender sends the second data packet to the receiver;

步骤204:接收端接收所述第二数据包;Step 204: the receiving end receives the second data packet;

步骤205:接收端对所述第二数据包中的压缩包头进行解压缩处理,得到包括所述以太帧头和所述IP系列包头的第三数据包。Step 205: The receiving end decompresses the compressed header in the second data packet to obtain a third data packet including the Ethernet frame header and the IP series header.

在LTE(Long Term Evolution,长期演进)和NR(New Radio,新空口)中,PDCP(Packet Data Convergence Protocol,分组数据汇聚协议)子层可执行头压缩和解压缩功能。因此,本发明实施例中,发送端可以是发送PDCP实体,接收端可以是接收PDCP实体。In LTE (Long Term Evolution, long term evolution) and NR (New Radio, new air interface), the PDCP (Packet Data Convergence Protocol, Packet Data Convergence Protocol) sublayer can perform header compression and decompression functions. Therefore, in this embodiment of the present invention, the transmitting end may be a transmitting PDCP entity, and the receiving end may be a receiving PDCP entity.

本发明实施例中,数据处理方法在数据处理过程中所涉及到的任何数据包(例如上述第一数据包、第二数据包等)由于包括以太帧头或压缩的以太帧头,这些数据包均可以理解为以太帧数据。以太帧数据携带的数据域既可以是IP类型的数据,也可用是非IP(non-IP)类型的数据。其中,图3是以太帧数据的数据域为IP类型的数据时,以太帧数据的结构示意图。In this embodiment of the present invention, any data packet (for example, the above-mentioned first data packet, second data packet, etc.) involved in the data processing process of the data processing method includes an Ethernet frame header or a compressed Ethernet frame header. All can be understood as Ethernet frame data. The data field carried by the Ethernet frame data can be either IP type data or non-IP (non-IP) type data. 3 is a schematic structural diagram of the Ethernet frame data when the data field of the Ethernet frame data is IP type data.

发送端接收的第一数据包包含以太帧,其中以太帧包含以太帧头和以太帧载荷(Ethernet payload)。以太帧载荷携带有效数据(如Ethernet data field),某些情况下,还携带填充域(Ethernet PAD field),以太帧载荷中的有效数据可以是包含了IP系列包头的数据。其中,IP系列包头可以是IP系列包头、TCP头、RTP(Real Time Protocol,实时协议)头等等。The first data packet received by the sender includes an Ethernet frame, wherein the Ethernet frame includes an Ethernet frame header and an Ethernet frame payload (Ethernet payload). The Ethernet frame payload carries valid data (eg, Ethernet data field), and in some cases, also carries a padding field (Ethernet PAD field). The valid data in the Ethernet frame payload may be data including IP series headers. The IP series packet headers may be IP series packet headers, TCP headers, RTP (Real Time Protocol, real-time protocol) headers, and the like.

第一数据包中还可以包括SDAP(Service Data Adaptation Protocol,服务数据适应协议)子头。若第一数据包包括SDAP子头,则发送端在对第一数据包进行压缩处理之前,可先从第一数据包中分离出(或移除或跳过)SDAP子头。发送端在对第一数据包压缩处理之后,可在具有压缩包头的数据包头部添加之前分离出的SDAP子头,并添加PDCP子头,以得到包括SDAP子头、PDCP子头、第一压缩包头、第二压缩包头的第二数据包,该第二数据包即为PDCP PDU(Protocol Data Unit,协议数据单元)。接收端在接收到第二数据包之后,在对第二数据包进行解压缩处理之前,也可以先从第二数据包中分离出SDAP子头和PDCP子头,再对第二数据包进行解压缩处理。接收端在解压缩处理之后,再将SDAP子头添加到不包含压缩包头的数据包头部即可。The first data packet may further include an SDAP (Service Data Adaptation Protocol, service data adaptation protocol) subheader. If the first data packet includes the SDAP subheader, the sending end may separate (or remove or skip) the SDAP subheader from the first data packet before compressing the first data packet. After compressing the first data packet, the transmitting end may add the previously separated SDAP subheader to the data packet header with the compressed packet header, and add the PDCP subheader to obtain the SDAP subheader, the PDCP subheader, and the first compressed header. The packet header and the second data packet of the second compressed packet header, the second data packet is a PDCP PDU (Protocol Data Unit, protocol data unit). After receiving the second data packet, the receiving end can also separate the SDAP subheader and the PDCP subheader from the second data packet before decompressing the second data packet, and then decompress the second data packet. Compression processing. After the decompression process, the receiving end can add the SDAP subheader to the header of the data packet that does not contain the compressed header.

需要说明的是,本发明实施例在于提供一种对以太帧数据进行压缩处理和解压缩处理的技术方案,主要体现如何对以太帧数据中的以太帧头和IP系列包头进行压缩处理和解压缩处理。因此,以太帧数据中的其他部分的相关处理可结合现有方案实现,在本发明实施例中不作重点描述。It should be noted that the embodiment of the present invention provides a technical solution for compressing and decompressing Ethernet frame data, which mainly reflects how to compress and decompress the Ethernet frame header and IP series packet header in the Ethernet frame data. Therefore, the related processing of other parts in the Ethernet frame data can be implemented in combination with the existing solution, which is not described in this embodiment of the present invention.

本发明实施例中,发送端至少可对以太帧数据中的以太帧头进行压缩处理,接收端可对经过压缩处理的以太帧数据进行解压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。In the embodiment of the present invention, the sending end can at least perform compression processing on the Ethernet frame header in the Ethernet frame data, and the receiving end can perform decompression processing on the compressed Ethernet frame data. When transmitting between them, the required transmission resources are reduced, so that the transmission resource overhead of the Ethernet frame data can be reduced.

图4是本发明实施例提供的一种数据处理方法的流程图。如图4所示,数据处理方法,应用于发送端,该方法包括以下步骤:FIG. 4 is a flowchart of a data processing method provided by an embodiment of the present invention. As shown in Figure 4, the data processing method, applied to the sending end, includes the following steps:

步骤401:接收第一数据包,所述第一数据包包括以太帧头和IP系列包头。Step 401: Receive a first data packet, where the first data packet includes an Ethernet frame header and an IP series header.

如前所述,本发明实施例中,发送端可以为发送PDCP实体,发送端可以对其接收的数据包进行压缩。上述第一数据包可以理解为以太帧数据,发送PDCP实体从上层接收第一数据包,该数据包中可能包含SDAP子头,也可能不包含SDAP子头。若第一数据包中包含SDAP子头,则发送端在对第一数据包进行压缩处理之前,可先从第一数据包中分离出SDAP子头。当然,也可不将SDAP子头从第一数据包中分离出,而直接对第一数据包中的以太帧头或IP系列包头进行压缩处理。As mentioned above, in this embodiment of the present invention, the sending end may be a sending PDCP entity, and the sending end may compress the data packets it receives. The above-mentioned first data packet may be understood as Ethernet frame data, and the sending PDCP entity receives the first data packet from the upper layer, and the data packet may or may not contain an SDAP subheader. If the first data packet contains the SDAP subheader, the sending end may separate the SDAP subheader from the first data packet before compressing the first data packet. Of course, the SDAP subheader may not be separated from the first data packet, but the Ethernet frame header or the IP series packet header in the first data packet may be directly compressed.

需要说明的是,从第一数据包中分离出SDAP子头,也可理解为,将SDAP子头从第一数据包中移除,或者,从第一数据包中移除SDAP子头。本发明实施例中所涉及到的“从数据包中分离出A”,均可理解为“将A从数据包中分离”,或“将A从数据包中移除”,或“从数据包中移除A”,后续不再重复说明。It should be noted that separating the SDAP subheader from the first data packet can also be understood as removing the SDAP subheader from the first data packet, or removing the SDAP subheader from the first data packet. "Separating A from the data packet" involved in the embodiments of the present invention can be understood as "separating A from the data packet", or "removing A from the data packet", or "removing A from the data packet" Remove A" from the middle, and the description will not be repeated in the future.

步骤402:至少对所述第一数据包中的所述以太帧头进行压缩处理,得到第二数据包,所述第二数据包至少包括第一压缩包头。Step 402: Compress at least the Ethernet frame header in the first data packet to obtain a second data packet, where the second data packet includes at least a first compressed packet header.

其中,所述第一压缩包头为对所述以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

在步骤402之后,发送端可将第二数据包发送至接收端,接收端在接收到第二数据包之后,可对第二数据包进行解压缩处理,得到不包括压缩包头的数据包。关于发送端向接收端发送以太帧数据的具体方式,将在下文进行具体说明。After step 402, the sending end may send the second data packet to the receiving end, and after receiving the second data packet, the receiving end may perform decompression processing on the second data packet to obtain a data packet not including a compressed packet header. The specific manner in which the transmitting end sends the Ethernet frame data to the receiving end will be described in detail below.

本发明实施例中,发送端至少可对以太帧数据中的以太帧头进行压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。In the embodiment of the present invention, the transmitting end can at least compress the Ethernet frame header in the Ethernet frame data. In this way, when the Ethernet frame data is transmitted between the transmitting end and the receiving end, the required transmission resources are reduced, so that the Ethernet frame data can be reduced. Transmission resource overhead of frame data.

本发明实施例中,发送端对第一数据包进行压缩处理的方式包括多种,以下分别就各种压缩处理方式进行一一说明。In this embodiment of the present invention, the sending end may perform compression processing on the first data packet in a variety of manners, and the various compression processing manners will be described one by one in the following.

方式一:发送端对第一数据包中的以太帧头和IP系列包头分别进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包。其中,第一压缩包头为对以太帧头进行压缩处理得到的压缩包头,第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头。Manner 1: The sending end compresses the Ethernet frame header and the IP series header in the first data packet respectively to obtain a second data packet including the first compressed header and the second compressed header. The first compressed packet header is a compressed packet header obtained by compressing an Ethernet frame header, and the second compressed packet header is a compressed packet header obtained by compressing an IP series packet header.

方式一中,发送端同时配置有以太帧头压缩功能和IP系列包头压缩功能,例如,发送端同时配置有以太帧压缩实体(或称以太帧压缩模块)和ROHC(RObust HeaderCompression,稳健头压缩)实体(或称ROHC模块),其中,发送端可通过以太帧压缩实体对第一数据包中的以太帧头进行压缩处理,发送端可通过ROHC实体对第一数据包中的IP系列包头进行压缩处理。In mode 1, the sender is configured with both the Ethernet frame header compression function and the IP series packet header compression function. For example, the sender is also configured with an Ethernet frame compression entity (or Ethernet frame compression module) and ROHC (RObust HeaderCompression, robust header compression) Entity (or ROHC module), in which the sending end can compress the Ethernet frame header in the first data packet through the Ethernet frame compression entity, and the sending end can compress the IP series header in the first data packet through the ROHC entity deal with.

方式一中,发送端对第一数据包中的以太帧头和IP系列包头分别进行压缩处理,又可包括并行的压缩处理方式和串行的压缩处理方式两种。In the first mode, the sending end performs compression processing on the Ethernet frame header and the IP series packet header in the first data packet respectively, and may also include parallel compression processing methods and serial compression processing methods.

对于并行的压缩处理方式来说,对以太帧头和IP系列包头分别进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包,可包括如下步骤:For the parallel compression processing method, the Ethernet frame header and the IP series packet header are respectively compressed to obtain a second data packet including the first compressed packet header and the second compressed packet header, which may include the following steps:

通过以太帧压缩实体对以太帧头进行压缩处理,得到包括第一压缩包头的第一子数据包;Performing compression processing on the Ethernet frame header by the Ethernet frame compression entity to obtain the first sub-data packet including the first compressed packet header;

通过ROHC实体对IP系列包头进行压缩处理,得到包括第二压缩包头的第二子数据包;The IP series packet header is compressed by the ROHC entity to obtain the second sub-data packet including the second compressed packet header;

将第一子数据包和第二子数据包组合,得到包括第一压缩包头和第二压缩包头的第二数据包。The first sub-data packet and the second sub-data packet are combined to obtain a second data packet including the first compressed packet header and the second compressed packet header.

该并行的压缩处理方式中,发送端可将第一数据包中的以太帧头和IP系列包头分别送至以太帧压缩实体和ROCH实体中,或者,通过以太帧压缩实体和ROHC实体分别从第一数据包中提取以太帧头部分和IP系列包头部分,以实现以太帧头和IP系列包头的并行压缩处理。由于并行的压缩处理,则以太帧压缩实体和ROCH实体各自进行压缩处理之后,会得到包括各自压缩包头的第一子数据包和第二子数据包,因此,在以太帧压缩实体和ROCH实体各自进行压缩处理之后,需要将第一子数据包和第二子数据包进行组合,得到包括第一压缩包头和第二压缩包头的第二数据包。这里,将第一子数据包和第二子数据包进行组合,可以理解为对数据按照特定格式进行重组,比如将第一压缩包头放置在第二压缩包头头部位置。In this parallel compression processing method, the sender can send the Ethernet frame header and the IP series header in the first data packet to the Ethernet frame compression entity and the ROCH entity, respectively, or, through the Ethernet frame compression entity and the ROHC entity, respectively The Ethernet frame header part and the IP series packet header part are extracted from a data packet, so as to realize parallel compression processing of the Ethernet frame header and the IP series packet header. Due to the parallel compression processing, the Ethernet frame compression entity and the ROCH entity will obtain the first sub-packet and the second sub-packet including their respective compressed headers after each compression processing. After the compression process is performed, the first sub-packet and the second sub-packet need to be combined to obtain a second data packet including the first compressed packet header and the second compressed packet header. Here, combining the first sub-packet and the second sub-packet can be understood as reorganizing the data according to a specific format, for example, placing the first compressed packet header at the position of the second compressed packet header.

可选的,在对以太帧头和IP系列包头进行压缩处理之前,方法还包括:Optionally, before compressing the Ethernet frame header and the IP series packet header, the method further includes:

将第一数据包分离成第三子数据包和第四子数据包,第三子数据包包括以太帧头,第四子数据包包括IP系列包头;The first data packet is separated into a third sub-data packet and a fourth sub-data packet, the third sub-data packet includes an Ethernet frame header, and the fourth sub-data packet includes an IP series header;

通过以太帧压缩实体对以太帧头进行压缩处理,得到包括第一压缩包头的第一子数据包,包括:The Ethernet frame header is compressed by the Ethernet frame compression entity to obtain the first sub-data package including the first compressed header, including:

通过以太帧压缩实体对第三子数据包中的以太帧头进行压缩处理,得到包括第一压缩包头的第一子数据包;Performing compression processing on the Ethernet frame header in the third sub-packet by the Ethernet frame compression entity to obtain the first sub-packet including the first compressed header;

通过ROHC实体对IP系列包头进行压缩处理,得到包括第二压缩包头的第二子数据包,包括:The IP series packet header is compressed by the ROHC entity to obtain a second sub-packet including the second compressed packet header, including:

通过ROHC实体对第四子数据包中的IP系列包头进行压缩处理,得到包括第二压缩包头的第二子数据包。The IP series header in the fourth sub-packet is compressed by the ROHC entity to obtain a second sub-packet including the second compressed header.

该可选的实施方式中,将第一数据包分离成第三子数据包和第四子数据包,以使第一数据包中的以太帧头和IP系列包头相分离,从而将分离出的以太帧头部分送至以太帧压缩实体中进行压缩处理,将分离出的IP系列包头部分送至ROHC实体中进行压缩处理。In this optional implementation manner, the first data packet is separated into a third sub-data packet and a fourth sub-data packet, so that the Ethernet frame header and the IP series packet header in the first data packet are separated, so that the separated The Ethernet frame header part is sent to the Ethernet frame compression entity for compression processing, and the separated IP series packet header part is sent to the ROHC entity for compression processing.

这里,将第一数据包分离成第三子数据包和第四子数据包,也可理解为,将第一数据包进行分割,以得到第三子数据包和第四子数据包,或者,将第一数据包进行分段,以得到第三子数据包和第四子数据包。Here, separating the first data packet into the third sub-data packet and the fourth sub-data packet can also be understood as dividing the first data packet to obtain the third sub-data packet and the fourth sub-data packet, or, The first data packet is segmented to obtain a third sub-packet and a fourth sub-packet.

需要说明的是,第三子数据包不仅限于包括以太帧头,第四子数据包也不仅限于包括IP系列包头,例如,第四子数据包中可以是以太帧载荷中的包含IP系列包头的有效数据(如Ethernet data field),也可以包含填充域(Ethernet PAD field)。It should be noted that the third sub-packet is not limited to including the Ethernet frame header, and the fourth sub-packet is not limited to including the IP series header. For example, the fourth sub-packet may be the Ethernet frame payload that includes the IP series header. Valid data (such as Ethernet data field) can also contain padding fields (Ethernet PAD field).

如图5所示,第一数据包包括以太帧头(E-Header)、IP系列包头(如IP)和载荷(payload)。需要说明的是,图5中的载荷与以太帧载荷存在区别,以太帧载荷实际上是指包含IP系列包头的数据;而图5中的载荷是不包含IP系列包头的数据。As shown in FIG. 5 , the first data packet includes an Ethernet frame header (E-Header), an IP series header (eg, IP) and a payload (payload). It should be noted that there is a difference between the payload in Figure 5 and the Ethernet frame payload. The Ethernet frame payload actually refers to the data including the IP series header, while the payload in Figure 5 is the data that does not include the IP series header.

发送端将第一数据包分离成第三子数据包和第四子数据包,其中,第三子数据包包括以太帧头,第四子数据包包括IP系列包头和载荷。发送端将第三子数据包送至以太帧压缩实体(EHC)中,通过以太帧压缩实体对以太帧头进行压缩处理,得到第一子数据包,即压缩的以太帧头(Compressed E-header)。相应的,发送端将第四子数据包送至ROHC实体中,通过ROHC实体对第四子数据包中的IP系列包头进行压缩处理,得到第二子数据包,该第二子数据包中包括压缩的IP系列包头(Compressed IP-header)和载荷。然后,发送端将第一子数据包和第二子数据包进行组合,得到包括压缩的以太帧头、压缩的IP系列包头和载荷的第二数据包。发送端在将第二数据包发送至接收端之前,还可在第二数据包的头部添加PDCP子头和SDAP子头(如果有SDAP子头)。The sending end separates the first data packet into a third sub-data packet and a fourth sub-data packet, wherein the third sub-data packet includes an Ethernet frame header, and the fourth sub-data packet includes an IP series header and a payload. The sender sends the third sub-data packet to the Ethernet frame compression entity (EHC), and compresses the Ethernet frame header through the Ethernet frame compression entity to obtain the first sub-data packet, that is, the compressed Ethernet frame header (Compressed E-header). ). Correspondingly, the sending end sends the fourth sub-data packet to the ROHC entity, and performs compression processing on the IP series header in the fourth sub-data packet through the ROHC entity to obtain a second sub-data packet, which includes: Compressed IP series header (Compressed IP-header) and payload. Then, the sending end combines the first sub-data packet and the second sub-data packet to obtain a second data packet including the compressed Ethernet frame header, the compressed IP series header and the payload. Before sending the second data packet to the receiving end, the sender may further add a PDCP subheader and an SDAP subheader (if there is an SDAP subheader) to the header of the second data packet.

需要说明的是,在上述并行的压缩处理方式中,以太帧压缩实体对以太帧头进行压缩处理,以及ROHC实体对IP系列包头进行压缩处理,两者属于同一时序,但执行的时间可以同步,也可以不同步。It should be noted that, in the above-mentioned parallel compression processing method, the Ethernet frame compression entity compresses the Ethernet frame header, and the ROHC entity compresses the IP series packet header. The two belong to the same time sequence, but the execution time can be synchronized. Can also be out of sync.

对于串行的压缩处理方式来说,又可包括两种可选的串行的压缩处理方式,以下一一进行详细说明。For the serial compression processing mode, two optional serial compression processing modes may be included, which will be described in detail below.

其中,第一种串行的压缩处理方式中,对以太帧头和IP系列包头分别进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包,可包括以下步骤:Wherein, in the first serial compression processing mode, the Ethernet frame header and the IP series packet header are respectively compressed to obtain a second data packet including the first compressed packet header and the second compressed packet header, which may include the following steps:

通过以太帧压缩实体对第一数据包中的以太帧头进行压缩处理,得到包括第一压缩包头和IP系列包头的第三数据包;Performing compression processing on the Ethernet frame header in the first data packet by the Ethernet frame compression entity to obtain a third data packet including the first compressed packet header and the IP series packet header;

通过ROHC实体对第三数据包中的IP系列包头进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包。The IP series packet header in the third data packet is compressed by the ROHC entity to obtain a second data packet including the first compressed packet header and the second compressed packet header.

该第一种串行的压缩处理方式中,先对以太帧头进行压缩处理,后对IP系列包头进行压缩处理。具体的,首先,将第一数据包送至以太帧压缩实体中,对第一数据包中的以太帧头进行压缩处理,得到包括第一压缩包头和IP系列包头的第三数据包。然后,将第三数据包整体送至ROHC实体中,ROHC实体从第三数据包中提取IP系列包头进行压缩处理;或者,将第三数据包整体送至ROHC实体中,ROHC实体跳过位于第三数据包头部的第一压缩包头,对IP系列包头进行压缩处理;或者,将第一压缩包头从第三数据包中分离,再将第三数据包送至ROHC实体中对IP系列包头进行压缩处理。至此,实现了以太帧头和IP系列包头依次串行压缩处理。In the first serial compression processing mode, the Ethernet frame header is first compressed, and then the IP series packet header is compressed. Specifically, first, the first data packet is sent to the Ethernet frame compression entity, and the Ethernet frame header in the first data packet is compressed to obtain a third data packet including the first compressed packet header and the IP series packet header. Then, the whole third data packet is sent to the ROHC entity, and the ROHC entity extracts the IP series header from the third data packet to perform compression processing; or, the third data packet is sent to the ROHC entity as a whole, and the ROHC entity skips The first compressed packet header of the three data packet headers is used to compress the IP series packet headers; or, the first compressed packet header is separated from the third data packet, and then the third data packet is sent to the ROHC entity to compress the IP series packet headers deal with. So far, the serial compression processing of the Ethernet frame header and the IP series packet header in sequence has been realized.

可选的,通过ROHC实体对第三数据包中的IP系列包头进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包,包括:Optionally, performing compression processing on the IP series header in the third data packet by the ROHC entity to obtain a second data packet including the first compressed header and the second compressed header, including:

从第三数据包中分离出第一压缩包头,得到包括IP系列包头的第四数据包;Separate the first compressed packet header from the third data packet to obtain the fourth data packet including the IP series packet header;

通过ROHC实体对第四数据包中的IP系列包头进行压缩处理,得到包括第二压缩包头的第五数据包;The IP series header in the fourth data packet is compressed by the ROHC entity to obtain the fifth data packet including the second compressed header;

在第五数据包的头部添加第一压缩包头,得到包括第一压缩包头和第二压缩包头的第二数据包。The first compressed packet header is added to the header of the fifth data packet to obtain a second data packet including the first compressed packet header and the second compressed packet header.

该可选的实施方式中,在将第一压缩包头从第三数据包中分离出之后,IP系列包头即可位于第三数据包的头部,从而便于ROHC实体直接对IP系列包头进行压缩处理。In this optional implementation manner, after the first compressed packet header is separated from the third data packet, the IP series packet header can be located at the head of the third data packet, so that the ROHC entity can directly compress the IP series packet header. .

如图6所示,第一数据包包括以太帧头、IP系列包头和载荷。As shown in FIG. 6 , the first data packet includes an Ethernet frame header, an IP series packet header and a payload.

需要说明的是,图6中的载荷与以太帧载荷存在区别,以太帧载荷实际上是指包含IP系列包头的数据;而图6中的载荷是不包含IP系列包头的数据。It should be noted that the payload in Figure 6 is different from the Ethernet frame payload. The Ethernet frame payload actually refers to the data including the IP series header; while the payload in Figure 6 is the data that does not include the IP series header.

发送端将第一数据包送至以太帧压缩实体中,通过以太帧压缩实体对第一数据包中的以太帧头进行压缩处理,得到包括压缩的以太帧头和未压缩的IP系列包头的第三数据包。发送端从第三数据包中分离出压缩的以太帧头,得到包括IP系列包头和载荷的第四数据包。发送端再将第四数据包送至ROHC实体中,通过ROHC实体对第四数据包中的IP系列包头进行压缩处理,得到包括压缩的IP系列包头和载荷的第五数据包。然后,发送端在第五数据包的头部添加之前分离出的压缩的以太帧头,得到包括压缩的以太帧头、压缩的IP系列包头和载荷的第二数据包。发送端在将第二数据包发送至接收端之前,还可在第二数据包的头部添加PDCP子头和SDAP子头(如果有SDAP子头)。The sender sends the first data packet to the Ethernet frame compression entity, and compresses the Ethernet frame header in the first data packet through the Ethernet frame compression entity to obtain the first data packet including the compressed Ethernet frame header and the uncompressed IP series header. Three packets. The sending end separates the compressed Ethernet frame header from the third data packet, and obtains a fourth data packet including the IP series packet header and the payload. The sending end then sends the fourth data packet to the ROHC entity, and the ROHC entity compresses the IP series packet header in the fourth data packet to obtain a fifth data packet including the compressed IP series packet header and the payload. Then, the sender adds the previously separated compressed Ethernet frame header to the header of the fifth data packet to obtain a second data packet including the compressed Ethernet frame header, the compressed IP series header and the payload. Before sending the second data packet to the receiving end, the sender may further add a PDCP subheader and an SDAP subheader (if there is an SDAP subheader) to the header of the second data packet.

其中,第二种串行的压缩处理中,对以太帧头和IP系列包头分别进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包,可包括以下步骤:Wherein, in the second type of serial compression processing, the Ethernet frame header and the IP series packet header are respectively compressed to obtain a second data packet including the first compressed packet header and the second compressed packet header, which may include the following steps:

通过ROHC实体对第一数据包中的IP系列包头进行压缩处理,得到包括以太帧头和第二压缩包头的第三数据包;The IP series header in the first data packet is compressed by the ROHC entity to obtain a third data packet including the Ethernet frame header and the second compressed header;

通过以太帧压缩实体对第三数据包中的以太帧头进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包。The Ethernet frame header in the third data packet is compressed by the Ethernet frame compression entity to obtain a second data packet including the first compressed packet header and the second compressed packet header.

该第二种串行的压缩处理方式中,先对IP系列包头进行压缩处理,后对以太帧头进行压缩处理。具体的,首先,将第一数据包整体送至ROHC实体中,ROHC实体从第一数据包中提取IP系列包头进行压缩处理;或者,第一数据包整体送至ROHC实体中,ROHC实体跳过位于第一数据包头部的以太帧头,对IP系列包头进行压缩处理;或者,将以太帧头从第一数据包中分离,再将第一数据包送至ROHC实体中对IP系列包头进行压缩处理。然后,将包括以太帧头和第二压缩包头的第三数据包送至以太帧压缩实体中,对以太帧头进行压缩处理。至此,实现了IP系列包头和以太帧头依次串行压缩处理。In the second serial compression processing mode, the IP series packet header is compressed first, and then the Ethernet frame header is compressed. Specifically, first, the entire first data packet is sent to the ROHC entity, and the ROHC entity extracts the IP series header from the first data packet to perform compression processing; or, the entire first data packet is sent to the ROHC entity, and the ROHC entity skips The Ethernet frame header located in the header of the first data packet compresses the IP series packet header; or, separates the Ethernet frame header from the first data packet, and then sends the first data packet to the ROHC entity to compress the IP series packet header deal with. Then, the third data packet including the Ethernet frame header and the second compressed packet header is sent to the Ethernet frame compression entity, and the Ethernet frame header is compressed. So far, the serial compression processing of IP series packet headers and Ethernet frame headers has been realized.

可选的,通过ROHC实体对第一数据包中的IP系列包头进行压缩处理,得到包括以太帧头和第二压缩包头的第三数据包,包括:Optionally, the ROHC entity compresses the IP series header in the first data packet to obtain a third data packet including the Ethernet frame header and the second compressed header, including:

从第一数据包中分离出以太帧头,得到包括IP系列包头的第四数据包;Separate the Ethernet frame header from the first data packet to obtain the fourth data packet including the IP series packet header;

通过ROHC实体对第四数据包中的IP系列包头进行压缩处理,得到包括第二压缩包头的第五数据包;The IP series header in the fourth data packet is compressed by the ROHC entity to obtain the fifth data packet including the second compressed header;

在第五数据包的头部添加以太帧头,得到包括以太帧头和第二压缩包头的第三数据包。The Ethernet frame header is added to the header of the fifth data packet to obtain a third data packet including the Ethernet frame header and the second compressed packet header.

该可选的实施方式中,从第一数据包中分离出以太帧头,这样,IP系列包头即可位于第四数据包的头部,从而便于ROHC实体直接对IP系列包头进行压缩处理。在IP系列包头压缩处理之后,再将之前分离出的以太帧头添加到数据包的头部,得到包括以太帧头和第二压缩包头的第三数据包,并将第三数据包整体送至以太帧压缩实体即可。由于以太帧头位于第三数据包头部,因此,以太帧压缩实体可直接对第三数据包中的以太帧头进行压缩处理。In this optional implementation manner, the Ethernet frame header is separated from the first data packet, so that the IP series packet header can be located at the head of the fourth data packet, so that the ROHC entity can directly compress the IP series packet header. After the IP series packet header is compressed, the previously separated Ethernet frame header is added to the header of the data packet to obtain a third data packet including the Ethernet frame header and the second compressed packet header, and the third data packet is sent as a whole to The Ethernet frame compression entity is sufficient. Since the Ethernet frame header is located in the header of the third data packet, the Ethernet frame compression entity can directly compress the Ethernet frame header in the third data packet.

该第二种串行的压缩处理方式与第一种串行的压缩处理方式的主要区别在于以太帧头和IP系列包头两者的压缩顺序,由于容易理解,本发明实施例不再对第二种串行的压缩处理方式作过多描述。The main difference between the second serial compression processing method and the first serial compression processing method lies in the compression sequence of both the Ethernet frame header and the IP series packet header. Because it is easy to understand, this embodiment of the present invention no longer complies with the second serial compression processing method. There are too many descriptions of serial compression processing methods.

方式二:对第一数据包的以太帧头进行压缩处理,得到包括第一压缩包头和IP系列包头的第二数据包。Mode 2: compressing the Ethernet frame header of the first data packet to obtain a second data packet including the first compressed packet header and the IP series packet header.

该方式中,发送端配置有以太帧头压缩功能,但未配置IP系列包头压缩功能,例如,发送端仅配置有以太帧压缩实体(或称以太帧压缩模块),发送端可通过以太帧压缩实体对第一数据包中的以太帧头进行压缩处理。In this method, the sender is configured with the Ethernet frame header compression function, but not configured with the IP series header compression function. For example, the sender is only configured with an Ethernet frame compression entity (or an Ethernet frame compression module), and the sender can use the Ethernet frame compression The entity compresses the Ethernet frame header in the first data packet.

此外,以太帧数据的压缩方式中,不排除只对IP系列包头进行压缩处理的方式,这样,可得到包括以太帧头和第二压缩包头的第二数据包。In addition, in the way of compressing the Ethernet frame data, the way of compressing only the IP series packet header is not excluded. In this way, the second data packet including the Ethernet frame header and the second compressed packet header can be obtained.

该方式中,发送端配置有IP系列包头压缩功能,但未配置以太帧头压缩功能,例如,发送端仅配置有ROHC实体(或称ROHC模块),发送端可通过ROHC实体对第一数据包中的IP系列包头进行压缩处理。In this method, the sender is configured with the IP series packet header compression function, but is not configured with the Ethernet frame header compression function. For example, the sender is only configured with a ROHC entity (or ROHC module), and the sender can use the ROHC entity to compress the first data packet. The IP series packet headers in the file are compressed.

综合上述各实施方式,本发明实施例中,发送端可以同时配置以太帧头压缩功能和IP系列包头压缩功能,发送端还可以单独配置以太帧头压缩功能,或者单独配置IP系列包头压缩功能。对于同时配置以太帧头压缩功能和IP系列包头压缩功能的方式来说,既可以并行的压缩处理以太帧头压缩和IP系列压缩,也可以串行的压缩处理以太帧头压缩和IP系列压缩。本发明实施例中,不论采取上述何种压缩处理方式,均能够降低以太帧数据的传输资源开销。Combining the above embodiments, in this embodiment of the present invention, the sending end can be configured with the Ethernet frame header compression function and the IP series packet header compression function at the same time. For the way of configuring the Ethernet frame header compression function and the IP series packet header compression function at the same time, the Ethernet frame header compression and IP series compression can be compressed in parallel, or the Ethernet frame header compression and IP series compression can be compressed in series. In the embodiment of the present invention, regardless of the above-mentioned compression processing method, the transmission resource overhead of the Ethernet frame data can be reduced.

本发明实施例中,以太帧数据在压缩处理之后,接收端需要对压缩的以太帧数据进行解压缩,为了使接收端更好地对压缩的以太帧数据进行解压缩,发送端可以在压缩的以太帧数据中添加一些指示信息。In the embodiment of the present invention, after the Ethernet frame data is compressed, the receiving end needs to decompress the compressed Ethernet frame data. In order to enable the receiving end to better decompress the compressed Ethernet frame data, the transmitting end can Add some indication information to the ether frame data.

本发明实施例中,发送端可在第一压缩包头中添加第一指示信息,该第一指示信息用于指示第一数据流对应的以太帧域组合方式或预设比特流,所述预设比特流用于关联所述第一数据流对应的以太帧域组合,所述第一数据流是一系列具有相同压缩特性的数据包集合。In this embodiment of the present invention, the sending end may add first indication information in the first compressed packet header, where the first indication information is used to indicate an Ethernet frame domain combination mode or a preset bit stream corresponding to the first data stream, the preset The bit stream is used to correlate the Ethernet frame domain combination corresponding to the first data stream, where the first data stream is a series of data packet sets with the same compression characteristic.

这里,相同的压缩特性可指相同的以太帧格式和相同的需要压缩的以太帧域,并且各个需要压缩的以太帧域取值相同。比如这些数据包都需要压缩以太帧源MAC(MediumAccess Control,媒体接入控制)地址(Ethernet sourcemac address field)和以太帧目的MAC地址(Ethernet destination mac address field),并且这些需要压缩的域的取值是相同的。进一步的,上述的“以太帧组合方式”可以理解为需要压缩的以太帧域以及各个需要压缩的以太帧域的具体取值。上述的“预设比特流”可以理解为需要压缩的各个以太帧域的具体取值串联起来的比特流。Here, the same compression characteristic may refer to the same Ethernet frame format and the same Ethernet frame field to be compressed, and each of the Ethernet frame fields to be compressed has the same value. For example, these data packets all need to compress the Ethernet frame source MAC (Medium Access Control, media access control) address (Ethernet sourcemac address field) and the Ethernet frame destination MAC address (Ethernet destination mac address field), and the values of these fields that need to be compressed Are the same. Further, the above-mentioned "Ether frame combination mode" can be understood as the Ethernet frame fields that need to be compressed and the specific values of each Ethernet frame field that needs to be compressed. The above-mentioned "preset bit stream" can be understood as a bit stream in which the specific values of each Ethernet frame field to be compressed are concatenated in series.

具体的,在第一压缩包头中添加标识某一数据流的压缩文件的第一指示信息,该第一指示信息标识的压缩文件关联一组特定的以太帧域组合或一组特定的比特流。例如,第一指示信息指示对数据包中的MAC source域(假设取值为“000000”,此处可理解该以太帧源Mac地址域关联的比特流为“000000”)、MAC destination域(假设取值为“000001”,此处可理解该以太帧Mac目的地址域关联的比特流为“000001”)以及Q-tag域(假设该域取值为“000010”,此处可以理解为以太帧中的Q-tag域关联的比特流为“000010”)进行压缩。在该举例中,“预设比特流”可理解为需要压缩的各个以太帧域的具体取值串联起来的比特流,即为“000000000001000010”。需要注意的是,上述例子中对以太帧域的取值仅为了便于理解,并不代表实际的对应以太帧帧域所占的字节大小。Specifically, first indication information identifying a compressed file of a certain data stream is added to the first compressed packet header, and the compressed file identified by the first indication information is associated with a specific set of Ethernet frame domain combinations or a specific set of bit streams. For example, the first indication information indicates that the MAC source field in the data packet (assuming the value is "000000", here it can be understood that the bit stream associated with the source Mac address field of the Ethernet frame is "000000"), the MAC destination field (assuming the value is "000000") The value is "000001", here it can be understood that the bit stream associated with the Mac destination address field of the Ethernet frame is "000001") and the Q-tag field (assuming the value of this field is "000010", it can be understood here as the Ethernet frame The bit stream associated with the Q-tag field in the "000010") is compressed. In this example, the "preset bit stream" can be understood as a bit stream in which the specific values of each Ethernet frame field to be compressed are concatenated, that is, "000000000001000010". It should be noted that the value of the Ethernet frame field in the above example is only for the convenience of understanding, and does not represent the actual size of bytes occupied by the corresponding Ethernet frame frame field.

进一步的,所述第一指示信息还用于指示所述第一数据流对应的以太帧头格式。Further, the first indication information is further used to indicate the Ethernet frame header format corresponding to the first data stream.

这样,接收端可根据第一指示信息确定压缩之前第一数据包的以太帧域组合方式或以太帧头格式,以有利于接收端更好地对以太帧数据进行解压缩。In this way, the receiving end may determine, according to the first indication information, the Ethernet frame domain combination mode or the Ethernet frame header format of the first data packet before compression, so as to facilitate the receiving end to better decompress the Ethernet frame data.

本发明实施例中,发送端还可在第二数据包中添加第二指示信息,该第二指示信息用于指示第一压缩包头的长度。该第二指示信息可在第二数据包中任何合适的位置添加,具体的,第二指示信息可在PDCP子头中添加。In this embodiment of the present invention, the sending end may further add second indication information to the second data packet, where the second indication information is used to indicate the length of the first compressed packet header. The second indication information may be added at any suitable position in the second data packet, and specifically, the second indication information may be added in the PDCP subheader.

这样,接收端可根据第二指示信息确定第一压缩包头的长度,从而能够更加准确、更加快速地从第二数据包中截取(或提取或识别出)第一压缩包头。In this way, the receiving end can determine the length of the first compressed packet header according to the second indication information, so that the first compressed packet header can be intercepted (or extracted or identified) from the second data packet more accurately and quickly.

本发明实施例中,若第一数据包中携带有长度域(length field)或填充域(PADfield),则发送端还可通过以太帧压缩实体移除第一数据包中携带的长度域和填充域中的至少一项。长度域和填充域是否移除可以是协议约定的,也可以是网络侧设备配置的。比如,协议约定对以太帧中的长度域和填充域进行移除处理,那么发送端在处理包含长度域和/或填充域的数据包时,总会对其进行处理。此外,对两个域的移除处理可以和其他以太帧域压缩是同时进行的,也可以是不同时进行的,比如,网络侧设备给发送端配置了以太帧压缩功能,那么在对某个数据流的数据包进行以太帧压缩处理时,就对该以太帧中包含的长度域和/或填充域进行移除处理。某些情况下,在对某个数据流真正进行以太帧压缩之前,可能会先发送几个不进行以太帧压缩的数据包,对于这样的数据包,可以进行或不进行长度域和/或填充域的移除处理,如果进行移除处理,可额外携带是否移除了长度域和/或填充域的指示信息。此外,在对第一数据包进行处理时,长度域或填充域的移除时机可在对第一数据包进行压缩处理之前,即,发送端在将长度域或填充域移除之后,再对第一数据包进行压缩处理。In this embodiment of the present invention, if the first data packet carries a length field or a padding field (PADfield), the sender may also remove the length field and padding carried in the first data packet through the Ethernet frame compression entity. At least one of the fields. Whether the length field and the padding field are removed may be agreed by the protocol or configured by the network side device. For example, the protocol stipulates that the length field and padding field in the Ethernet frame are removed, so the sender will always process the data packet containing the length field and/or the padding field. In addition, the removal processing of the two fields can be performed simultaneously with the compression of other Ethernet frame fields, or it can be performed at different times. When the data packet of the data stream is subjected to the Ethernet frame compression processing, the length field and/or the padding field contained in the Ethernet frame is removed. In some cases, several packets without Ethernet frame compression may be sent before a data stream is actually compressed. For such packets, length fields and/or padding may or may not be performed. Field removal processing, if the removal processing is performed, additional information indicating whether the length field and/or the padding field has been removed may be carried. In addition, when processing the first data packet, the timing of removing the length field or the padding field may be before the first data packet is compressed, that is, the sender removes the length field or the padding field before removing the length field or the padding field. The first data packet is compressed.

通过移除长度域或填充域,可进一步降低以太帧数据的传输资源开销。By removing the length field or the padding field, the transmission resource overhead of the Ethernet frame data can be further reduced.

本发明实施例中,发送端还可以在第二数据包中添加以下指示信息中的至少一项:In this embodiment of the present invention, the sender may also add at least one of the following indication information to the second data packet:

在所述第二数据包中添加第三指示信息,所述第三指示信息用于指示所述第一数据包中携带的长度域是否被移除;adding third indication information to the second data packet, where the third indication information is used to indicate whether the length field carried in the first data packet is removed;

在所述第二数据包中添加第四指示信息,所述第四指示信息用于指示所述第一数据包中携带的填充域是否被移除;adding fourth indication information to the second data packet, where the fourth indication information is used to indicate whether the padding field carried in the first data packet is removed;

在所述第二数据包中添加第五指示信息,所述第五指示信息用于指示所述第一数据包中携带的长度域和填充域是否被移除。Fifth indication information is added to the second data packet, where the fifth indication information is used to indicate whether the length field and the padding field carried in the first data packet are removed.

这样,接收端可根据上述任一指示信息确定长度域或填充域是否被移除,从而在解压缩过程中,能够更加准确、更加快速地确定是否需要添加被移除的长度域或填充域。In this way, the receiving end can determine whether the length field or the padding field is removed according to any of the above-mentioned indication information, so that during the decompression process, it can more accurately and quickly determine whether the removed length field or the padding field needs to be added.

上述应用于发送端的数据处理方法属于以太帧数据的压缩处理方法,以下将对以太帧数据的解压缩处理方法进行具体说明。The above data processing method applied to the transmitting end belongs to the compression processing method of the Ethernet frame data, and the decompression processing method of the Ethernet frame data will be specifically described below.

图7是本发明实施例提供的另一种数据处理方法的流程图。如图7所示,数据处理方法,应用于接收端,该方法包括以下步骤:FIG. 7 is a flowchart of another data processing method provided by an embodiment of the present invention. As shown in Figure 7, the data processing method is applied to the receiving end, and the method includes the following steps:

步骤501:接收第一数据包,所述第一数据包至少包括第一压缩包头。Step 501: Receive a first data packet, where the first data packet includes at least a first compressed packet header.

其中,第一压缩包头为对以太帧头进行压缩处理得到的压缩包头。The first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

如前所述,本发明实施例中,接收端可以为接收PDCP实体,接收端可以对其接收的具有压缩包头的数据包进行解压缩。上述第一数据包可以理解为具有压缩包头的以太帧数据,该第一数据包可认为是前述压缩处理方法中经过发送端压缩处理的第二数据包。As described above, in this embodiment of the present invention, the receiving end may be a receiving PDCP entity, and the receiving end may decompress the received data packet with a compressed packet header. The above-mentioned first data packet can be understood as Ethernet frame data with a compressed packet header, and the first data packet can be regarded as the second data packet compressed by the sender in the aforementioned compression processing method.

该步骤中,接收PDCP实体从下层接收上述第一数据包,该数据包中除了包括第一压缩包头或第二压缩包头,还可包含PDCP子头和SDAP子头(如果有SDAP子头)。若第一数据包中包含PDCP子头和SDAP子头,则接收端在对第一数据包进行解压缩处理之前,可先从第一数据包中分离出PDCP子头和SDAP子头。当然,也可不将PDCP子头和SDAP子头从第一数据包中分离出,而直接对第一数据包中的以太帧头或IP系列包头进行压缩处理。In this step, the receiving PDCP entity receives the above-mentioned first data packet from the lower layer, and the data packet includes the PDCP subheader and the SDAP subheader (if there is an SDAP subheader) in addition to the first compressed packet header or the second compressed packet header. If the first data packet includes the PDCP subheader and the SDAP subheader, the receiving end may separate the PDCP subheader and the SDAP subheader from the first data packet before decompressing the first data packet. Of course, the PDCP subheader and the SDAP subheader may not be separated from the first data packet, and the Ethernet frame header or the IP series packet header in the first data packet may be directly compressed.

需要说明的是,从第一数据包中分离出PDCP子头和SDAP子头,也可理解为,将PDCP子头和SDAP子头从第一数据包中移除,或者,从第一数据包中移除PDCP子头和SDAP子头。本发明实施例中所涉及到的“从数据包中分离出A”,均可理解为“将A从数据包中分离”,或“将A从数据包中移除”,或“从数据包中移除A”,后续不再重复说明。It should be noted that separating the PDCP subheader and the SDAP subheader from the first data packet can also be understood as removing the PDCP subheader and the SDAP subheader from the first data packet, or removing the PDCP subheader and the SDAP subheader from the first data packet Remove the PDCP subheader and SDAP subheader. "Separating A from the data packet" involved in the embodiments of the present invention can be understood as "separating A from the data packet", or "removing A from the data packet", or "removing A from the data packet" Remove A" from the middle, and the description will not be repeated in the future.

步骤502:对所述第一数据包中的压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包。Step 502: Perform decompression processing on the compressed header in the first data packet to obtain a second data packet including an Ethernet frame header and an IP series header.

本发明实施例中,发送端可对以太帧数据中的以太帧头和IP系列包头中的至少一项进行压缩处理,接收端可对经过压缩处理的以太帧数据进行解压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。In the embodiment of the present invention, the sending end can perform compression processing on at least one of the Ethernet frame header and the IP series packet header in the Ethernet frame data, and the receiving end can perform decompression processing on the compressed Ethernet frame data. When the frame data is transmitted between the sending end and the receiving end, the required transmission resources are reduced, so that the transmission resource overhead of the Ethernet frame data can be reduced.

本发明实施例中,第一数据包还可包括第二压缩包头,第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头。在第一数据包包括第一压缩包头和第二压缩包头的情况下,接收端可同时配置有以太帧头解压缩功能和IP系列包头解压缩功能,例如,接收端同时配置有以太帧解压缩实体(或称以太帧解压缩模块)和ROHC解压缩实体(或称ROHC解压缩模块),其中,接收端可通过以太帧解压缩实体对第一数据包中的以太帧头进行解压缩处理,接收端可通过ROHC解压缩实体对第一数据包中的IP系列包头进行解压缩处理。In the embodiment of the present invention, the first data packet may further include a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers. In the case where the first data packet includes the first compressed header and the second compressed header, the receiving end can be configured with both the Ethernet frame header decompression function and the IP series header decompression function. For example, the receiving end is also configured with the Ethernet frame decompression function entity (or called Ethernet frame decompression module) and ROHC decompression entity (or called ROHC decompression module), wherein the receiving end can decompress the Ethernet frame header in the first data packet through the Ethernet frame decompression entity, The receiving end may perform decompression processing on the IP series header in the first data packet through the ROHC decompression entity.

接收端对第一数据包中的第一压缩包头和第二压缩包头进行解压缩处理的方式包括多种,以下分别就各种解压缩处理方式进行一一说明。There are many ways for the receiving end to perform decompression processing on the first compressed packet header and the second compressed packet header in the first data packet, and the various decompression processing methods will be described one by one in the following.

方式一:对第一数据包中的第一压缩包头和第二压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包,包括:Manner 1: Decompress the first compressed packet header and the second compressed packet header in the first data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header, including:

通过以太帧解压缩实体对第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包;The first compressed packet header is decompressed by the Ethernet frame decompression entity to obtain the first sub-packet including the Ethernet frame header;

通过ROHC解压缩实体对第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包;The second compressed packet header is decompressed by the ROHC decompression entity to obtain the second sub-data packet including the IP series packet header;

将第一子数据包和第二子数据包组合,得到包括以太帧头和IP系列包头的第二数据包。The first sub-data packet and the second sub-data packet are combined to obtain the second data packet including the Ethernet frame header and the IP series packet header.

该方式为一种并行的解压缩处理方式,接收端可将第一数据包中的第一压缩包头和第二压缩包头分别送至以太帧解压缩实体和ROCH解压缩实体中,或者,通过以太帧解压缩实体和ROHC解压缩实体分别从第一数据包中提取第一压缩包头和第二压缩包头,以实现第一压缩包头和第二压缩包头的并行解压缩处理。由于并行的解压缩处理,则以太帧解压缩实体和ROCH解压缩实体各自进行解压缩处理之后,会得到各自解压缩之后的第一子数据包和第二子数据包,因此,在以太帧解压缩实体和ROCH解压缩实体各自进行解压缩处理之后,需要将第一子数据包和第二子数据包进行组合,得到包括以太帧头和IP系列包头的第二数据包。这里,将第一子数据包和第二子数据包进行组合,可以理解为对数据进行重组。This method is a parallel decompression processing method. The receiving end can send the first compressed packet header and the second compressed packet header in the first data packet to the Ethernet frame decompression entity and the ROCH decompression entity respectively, or, through the Ethernet frame decompression entity and ROCH decompression entity. The frame decompression entity and the ROHC decompression entity respectively extract the first compressed packet header and the second compressed packet header from the first data packet, so as to realize parallel decompression processing of the first compressed packet header and the second compressed packet header. Due to the parallel decompression process, the Ethernet frame decompression entity and the ROCH decompression entity will obtain the first sub-data packet and the second sub-data packet after decompression respectively after the decompression process of the Ethernet frame decompression entity and the ROCH decompression entity. After the compression entity and the ROCH decompression entity perform decompression processing respectively, the first sub-data packet and the second sub-data packet need to be combined to obtain the second data packet including the Ethernet frame header and the IP series header. Here, combining the first sub-packet and the second sub-packet can be understood as data reorganization.

可选的,在对所述第一压缩包头和所述第二压缩包头进行解压缩处理之前,所述方法还包括:Optionally, before decompressing the first compressed packet header and the second compressed packet header, the method further includes:

将所述第一数据包分离成第三子数据包和第四子数据包,所述第三子数据包包括所述第一压缩包头,所述第四子数据包包括所述第二压缩包头;Separating the first data packet into a third sub-data packet and a fourth sub-data packet, the third sub-data packet includes the first compressed packet header, and the fourth sub-data packet includes the second compressed packet header ;

通过以太帧解压缩实体对所述第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包,包括:The first compressed packet header is decompressed by the Ethernet frame decompression entity to obtain the first sub-packet including the Ethernet frame header, including:

通过以太帧解压缩实体对所述第三子数据包中的所述第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包;Perform decompression processing on the first compressed header in the third sub-packet by the Ethernet frame decompression entity to obtain the first sub-packet including the Ethernet frame header;

通过ROHC解压缩实体对所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包,包括:The second compressed packet header is decompressed by the ROHC decompression entity to obtain a second sub-data packet including the IP series packet header, including:

通过ROHC解压缩实体对所述第四子数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包。The second compressed header in the fourth sub-packet is decompressed by the ROHC decompression entity to obtain the second sub-packet including the IP series header.

该可选的实施方式中,将第一数据包分离成第三子数据包和第四子数据包,以使第一数据包中的第一压缩包头和第二压缩包头相分离,从而将分离出的第一压缩包头送至以太帧解压缩实体中进行解压缩处理,将分离出的第二压缩包头送至ROHC解压缩实体中进行解压缩处理。In this optional implementation manner, the first data packet is separated into a third sub-data packet and a fourth sub-data packet, so that the first compressed packet header and the second compressed packet header in the first data packet are separated, so that the separation The obtained first compressed packet header is sent to the Ethernet frame decompression entity for decompression processing, and the separated second compressed packet header is sent to the ROHC decompression entity for decompression processing.

这里,将第一数据包分离成第三子数据包和第四子数据包,也可理解为,将第一数据包进行分割,以得到第三子数据包和第四子数据包,或者,将第一数据包进行分段,以得到第三子数据包和第四子数据包。Here, separating the first data packet into the third sub-data packet and the fourth sub-data packet can also be understood as dividing the first data packet to obtain the third sub-data packet and the fourth sub-data packet, or, The first data packet is segmented to obtain a third sub-packet and a fourth sub-packet.

需要说明的是,第三子数据包不仅限于包括第一压缩包头,第四子数据包也不仅限于包括第二压缩包头,例如,第四子数据包中还可包括以太帧数据的载荷部分。It should be noted that the third sub-packet is not limited to including the first compressed header, and the fourth sub-packet is not limited to including the second compressed header. For example, the fourth sub-packet may also include the payload portion of the Ethernet frame data.

如图8所示,第一数据包包括压缩的以太帧头、压缩的IP系列包头(如压缩的IP系列包头)和载荷。As shown in FIG. 8 , the first data packet includes a compressed Ethernet frame header, a compressed IP series packet header (eg, a compressed IP series packet header) and a payload.

需要说明的是,图8中的载荷与以太帧载荷存在区别,以太帧载荷实际上是指包含IP系列包头的数据;而图8中的载荷是不包含IP系列包头的数据。It should be noted that there is a difference between the payload in Figure 8 and the Ethernet frame payload. The Ethernet frame payload actually refers to the data including the IP series header, while the payload in Figure 8 is the data that does not include the IP series header.

接收端将第一数据包分离成第三子数据包和第四子数据包,其中,第三子数据包包括压缩的以太帧头,第四子数据包包括压缩的IP系列包头和载荷。接收端将第三子数据包送至以太帧解压缩实体中,通过以太帧解压缩实体对以压缩的太帧头进行解压缩处理,得到第一子数据包,即未压缩的以太帧头。相应的,接收端将第四子数据包送至ROHC解压缩实体中,通过ROHC解压缩实体对第四子数据包中压缩的IP系列包头进行解压缩处理,得到第二子数据包,该第二子数据包中包括未压缩的IP和载荷。然后,接收端将第一子数据包和第二子数据包进行组合,得到包括以太帧头、IP系列包头和载荷的第二数据包。The receiving end separates the first data packet into a third sub-data packet and a fourth sub-data packet, wherein the third sub-data packet includes a compressed Ethernet frame header, and the fourth sub-data packet includes a compressed IP series packet header and a payload. The receiving end sends the third sub-data packet to the Ethernet frame decompression entity, and decompresses the compressed Ethernet frame header through the Ethernet frame decompression entity to obtain the first sub-data packet, that is, the uncompressed Ethernet frame header. Correspondingly, the receiving end sends the fourth sub-packet to the ROHC decompression entity, and decompresses the IP series header compressed in the fourth sub-packet by the ROHC decompression entity to obtain the second sub-packet, the first sub-packet. The second sub-packet includes uncompressed IP and payload. Then, the receiving end combines the first sub-data packet and the second sub-data packet to obtain a second data packet including the Ethernet frame header, the IP series packet header and the payload.

需要说明的是,在上述并行的解压缩处理方式中,以太帧解压缩实体对第一压缩包头进行解压缩处理,以及ROHC解压缩实体对第二压缩包头进行解压缩处理,两者属于同一时序,但执行的时间可以同步,也可以不同步。It should be noted that, in the above-mentioned parallel decompression processing method, the Ethernet frame decompression entity decompresses the first compressed packet header, and the ROHC decompression entity decompresses the second compressed packet header, and the two belong to the same time sequence. , but the execution time may or may not be synchronized.

还需要说明的是,若发送端采用并行的压缩处理方式,则接收端也可采用并行的解压缩处理方式;若发送端采用串行的压缩处理方式,则接收端还可采用并行的解压缩处理方式。也就是说,发送端所采用的压缩处理方式不会对接收端所采用的解压缩处理方式造成限定。It should also be noted that if the sending end adopts the parallel compression processing method, the receiving end can also adopt the parallel decompressing processing method; if the sending end adopts the serial compression processing method, the receiving end can also adopt the parallel decompression processing method. how to handle it. That is to say, the compression processing method adopted by the sender does not limit the decompression processing method adopted by the receiver.

方式二:对第一数据包中的第一压缩包头和第二压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包,包括:Mode 2: Decompress the first compressed packet header and the second compressed packet header in the first data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header, including:

通过ROHC解压缩实体对所述第一数据包中的所述第二压缩包头进行解压缩处理,得到包括所述第一压缩包头和IP系列包头的第三数据包;Perform decompression processing on the second compressed packet header in the first data packet by the ROHC decompression entity to obtain a third data packet including the first compressed packet header and the IP series packet header;

通过以太帧解压缩实体对所述第三数据包中的所述第一压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包。The first compressed packet header in the third data packet is decompressed by the Ethernet frame decompression entity to obtain a second data packet including the Ethernet frame header and the IP series packet header.

该方式为一种串行的解压缩处理方式,先对第二压缩包头进行解压缩处理,后对第一压缩包头进行解压缩处理。具体的,首先,将第一数据包整体送至ROHC解压缩实体中,ROHC解压缩实体从第一数据包中提取第二压缩包头进行解压缩处理;或者,第一数据包整体送至ROHC解压缩实体中,ROHC解压缩实体跳过位于第一数据包头部的第一压缩包头,对第二压缩包头进行解压缩处理;或者,将第一压缩包头从第一数据包中分离,再将第一数据包送至ROHC解压缩实体中对第二压缩包头进行解压缩处理。然后,将包括第一压缩包头和IP系列包头的第三数据包送至以太帧解压缩实体中,对第一压缩实体进行解压缩处理。至此,实现了第一压缩包头和第二压缩包头依次串行解压缩处理。This method is a serial decompression processing method. First, the second compressed packet header is decompressed, and then the first compressed packet header is decompressed. Specifically, first, the entire first data packet is sent to the ROHC decompression entity, and the ROHC decompression entity extracts the second compressed header from the first data packet for decompression processing; or, the entire first data packet is sent to the ROHC decompression entity. Among the compression entities, the ROHC decompression entity skips the first compressed header located in the header of the first data packet, and decompresses the second compressed header; or separates the first compressed header from the first data packet, and then decompresses the first compressed header. A data packet is sent to the ROHC decompression entity to decompress the second compressed packet header. Then, the third data packet including the first compressed packet header and the IP series packet header is sent to the Ethernet frame decompression entity, and the first compression entity is decompressed. So far, the sequential serial decompression process of the first compressed packet header and the second compressed packet header has been realized.

可选的,通过ROHC解压缩实体对所述第一数据包中的所述第二压缩包头进行解压缩处理,得到包括所述第一压缩包头和IP系列包头的第三数据包,包括:Optionally, perform decompression processing on the second compressed packet header in the first data packet by the ROHC decompression entity to obtain a third data packet including the first compressed packet header and the IP series packet header, including:

从所述第一数据包中分离出所述第一压缩包头,得到包括所述第二压缩包头的第四数据包;Separating the first compressed packet header from the first data packet to obtain a fourth data packet including the second compressed packet header;

通过ROHC解压缩实体对所述第四数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第五数据包;The second compressed header in the fourth data packet is decompressed by the ROHC decompression entity to obtain the fifth data packet including the IP series header;

在所述第五数据包的头部添加所述第一压缩包头,得到包括所述第一压缩包头和所述IP系列包头的第三数据包。The first compressed packet header is added to the header of the fifth data packet to obtain a third data packet including the first compressed packet header and the IP series packet header.

该可选的实施方式中,从第一数据包中分离出第一压缩包头,这样,第二压缩包头即可位于第四数据包的头部,从而便于ROHC解压缩实体直接对第二压缩包头进行解压缩处理。在第二压缩包头解压缩处理之后,再将之前分离出的第一压缩包头添加到数据包的头部,得到包括第一压缩包头和IP系列包头的第三数据包,并将第三数据包整体送至以太帧解压缩实体即可。由于第一压缩包头位于第三数据包头部,因此,以太帧解压缩实体可直接对第三数据包中的第一压缩包头进行解压缩处理。In this optional implementation manner, the first compressed packet header is separated from the first data packet, so that the second compressed packet header can be located at the head of the fourth data packet, so that the ROHC decompression entity can directly decompress the second compressed packet header Perform decompression processing. After the second compressed packet header is decompressed, the previously separated first compressed packet header is added to the header of the data packet to obtain a third data packet including the first compressed packet header and the IP series packet header, and the third data packet is The whole can be sent to the Ethernet frame decompression entity. Since the first compressed packet header is located in the third data packet header, the Ethernet frame decompression entity can directly perform decompression processing on the first compressed packet header in the third data packet.

如图9所示,第一数据包包括第一压缩包头、第二压缩包头和载荷。As shown in FIG. 9 , the first data packet includes a first compressed packet header, a second compressed packet header and a payload.

需要说明的是,图9中的载荷与以太帧载荷存在区别,以太帧载荷实际上是指包含IP系列包头的数据;而图9中的载荷是不包含IP系列包头的数据。It should be noted that there is a difference between the payload in Figure 9 and the Ethernet frame payload. The Ethernet frame payload actually refers to data that includes IP series headers; while the payload in Figure 9 is data that does not include IP series headers.

接收端从第一数据包中分离出第一压缩包头,得到包括第二压缩包头和载荷的第四数据包,接收端再将第四数据包送至ROHC解压缩实体中,通过ROHC解压缩实体对第四数据包中的第二压缩包头进行解压缩处理,得到包括未压缩的IP系列包头和载荷的第五数据包。然后,接收端在第五数据包的头部添加之前分离出的第一压缩包头,得到包括第一压缩包头、未压缩的IP系列包头和载荷的第三数据包。接收端将第三数据包送至以太帧解压缩实体中,通过以太帧解压缩实体对第三数据包中的第一压缩包头进行解压缩处理,得到包括以太帧头、IP系列包头和载荷的第二数据包。The receiving end separates the first compressed packet header from the first data packet to obtain a fourth data packet including the second compressed packet header and the payload, and the receiving end sends the fourth data packet to the ROHC decompression entity, and uses the ROHC decompression entity The second compressed header in the fourth data packet is decompressed to obtain a fifth data packet including the uncompressed IP series header and the payload. Then, the receiving end adds the first compressed packet header separated before the header of the fifth data packet to obtain a third data packet including the first compressed packet header, the uncompressed IP series packet header and the payload. The receiving end sends the third data packet to the Ethernet frame decompression entity, and decompresses the first compressed packet header in the third data packet through the Ethernet frame decompression entity, and obtains a packet including the Ethernet frame header, the IP series packet header and the payload. second data packet.

方式三:对第一数据包中的第一压缩包头和第二压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包,包括:Mode 3: Decompress the first compressed packet header and the second compressed packet header in the first data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header, including:

通过以太帧解压缩实体对所述第一数据包中的所述第一压缩包头进行解压缩处理,得到包括以太帧头和所述第二压缩包头的第三数据包;Perform decompression processing on the first compressed packet header in the first data packet by the Ethernet frame decompression entity to obtain a third data packet including the Ethernet frame header and the second compressed packet header;

通过ROHC解压缩实体对所述第三数据包中的所述第二压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包。The ROHC decompression entity performs decompression processing on the second compressed packet header in the third data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header.

该方式为另一种串行的解压缩处理方式,先对第一压缩包头进行解压缩处理,后对第二压缩包头进行解压缩处理。具体的,首先,将第一数据包送至以太帧解压缩实体中,对第一数据包中的第一压缩包头进行解压缩处理,得到包括以太帧头和第二压缩包头的第三数据包。然后,将第三数据包整体送至ROHC解压缩实体中,ROHC解压缩实体从第三数据包中提取第二压缩包头进行解压缩处理;或者,将第三数据包整体送至ROHC解压缩实体中,ROHC解压缩实体跳过位于第三数据包头部的以太帧头,对第二压缩包头进行解压缩处理;或者,将以太帧头从第三数据包中分离,再将第三数据包送至ROHC解压缩实体中对第二压缩包头进行解压缩处理。至此,实现了第一压缩包头和第二压缩包头依次串行解压缩处理。This method is another serial decompression processing method. First, the first compressed packet header is decompressed, and then the second compressed packet header is decompressed. Specifically, first, the first data packet is sent to the Ethernet frame decompression entity, and the first compressed packet header in the first data packet is decompressed to obtain a third data packet including the Ethernet frame header and the second compressed packet header . Then, the whole third data packet is sent to the ROHC decompression entity, and the ROHC decompression entity extracts the second compressed header from the third data packet for decompression processing; or, the whole third data packet is sent to the ROHC decompression entity , the ROHC decompression entity skips the Ethernet frame header located in the header of the third data packet, and decompresses the second compressed packet header; or separates the Ethernet frame header from the third data packet, and then sends the third data packet to the The second compressed packet header is decompressed in the ROHC decompression entity. So far, the sequential serial decompression process of the first compressed packet header and the second compressed packet header has been realized.

可选的,通过ROHC解压缩实体对所述第三数据包中的所述第二压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包,包括:Optionally, perform decompression processing on the second compressed packet header in the third data packet by a ROHC decompression entity, to obtain a second data packet including the Ethernet frame header and the IP series packet header, including:

从所述第三数据包中分离出所述以太帧头,得到包括所述第二压缩包头的第四数据包;Separate the Ethernet frame header from the third data packet to obtain a fourth data packet including the second compressed packet header;

通过ROHC解压缩实体对所述第四数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第五数据包;The second compressed header in the fourth data packet is decompressed by the ROHC decompression entity to obtain the fifth data packet including the IP series header;

在所述第五数据包的头部添加所述以太帧头,得到包括所述以太帧头和所述IP系列包头的第二数据包。The Ethernet frame header is added to the header of the fifth data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header.

该可选的实施方式中,在将以太帧头从第三数据包中分离出之后,第二压缩包头即可位于第三数据包的头部,从而便于ROHC解压缩实体直接对第二压缩包头进行解压缩处理。In this optional implementation manner, after the Ethernet frame header is separated from the third data packet, the second compressed packet header can be located at the head of the third data packet, so that the ROHC decompression entity can directly decompress the second compressed packet header Perform decompression processing.

上述两种串行的解压缩处理方式的主要区别在于第一压缩包头和第二压缩包头两者的解压缩顺序,由于容易理解,本发明实施例不再对第二种串行的解压缩处理方式作过多描述。The main difference between the above two serial decompression processing methods is the decompression sequence of the first compressed packet header and the second compressed packet header. Because it is easy to understand, the embodiment of the present invention no longer performs the second serial decompression processing. way to describe too much.

需要说明的是,若发送端采用并行的压缩处理方式,则接收端可采用串行的解压缩处理方式;若发送端采用串行的压缩处理方式,则接收端还可采用串行的解压缩处理方式。并且,接收端可采用两种串行的解压缩处理方式中的任一种。也就是说,发送端所采用的压缩处理方式不会对接收端所采用的解压缩处理方式造成限定。It should be noted that if the sending end adopts the parallel compression processing method, the receiving end can adopt the serial decompressing processing method; if the sending end adopts the serial compression processing method, the receiving end can also adopt the serial decompressing processing method. how to handle it. In addition, the receiving end can adopt any one of two serial decompression processing methods. That is to say, the compression processing method adopted by the sender does not limit the decompression processing method adopted by the receiver.

可选的,所述第一数据包包括第一压缩包头;Optionally, the first data packet includes a first compressed header;

对所述第一压缩包头进行解压缩处理之前,所述方法还包括:Before decompressing the first compressed packet header, the method further includes:

确定所述第一压缩包头的长度;determining the length of the first compressed packet header;

根据所述第一压缩包头的长度,确定所述第一数据包中的所述第一压缩包头。The first compressed packet header in the first data packet is determined according to the length of the first compressed packet header.

可选的,所述第一压缩包头的长度通过以下至少之一确定:Optionally, the length of the first compressed packet header is determined by at least one of the following:

所述第一数据包中携带的第一指示信息,所述第一指示信息用于指示所述第一压缩包头的长度;the first indication information carried in the first data packet, where the first indication information is used to indicate the length of the first compressed packet header;

基于协议约定的与所述第一数据包的以太帧头格式相对应的第一压缩包头的长度。The length of the first compressed packet header corresponding to the format of the Ethernet frame header of the first data packet based on the protocol agreement.

可选的,所述第一压缩包头中携带有第二指示信息,所述第二指示信息用于指示第一数据流对应的以太帧域组合方式或预设比特流,所述预设比特流用于关联所述第一数据流对应的以太帧域组合,所述第一数据流是一系列具有相同压缩特性的数据包集合。Optionally, the first compressed packet header carries second indication information, where the second indication information is used to indicate an Ethernet frame domain combination mode or a preset bit stream corresponding to the first data stream, and the preset bit stream uses Corresponding to the Ethernet frame domain combination corresponding to the first data stream, the first data stream is a series of data packet sets with the same compression characteristics.

这里,相同的压缩特性可指相同的以太帧格式和相同的需要压缩的以太帧域,并且各个需要压缩的以太帧域取值相同。比如这些数据包都需要压缩以太帧源MAC(MediumAccess Control,媒体接入控制)地址(Ethernet sourcemac address field)和以太帧目的MAC地址(Ethernet destination mac address field),并且这些需要压缩的域的取值是相同的。进一步的,上述的“以太帧组合方式”可以理解为需要压缩的以太帧域以及各个需要压缩的以太帧域的具体取值。上述的“预设比特流”可以理解为需要压缩的各个以太帧域的具体取值串联起来的比特流。Here, the same compression characteristic may refer to the same Ethernet frame format and the same Ethernet frame field to be compressed, and each of the Ethernet frame fields to be compressed has the same value. For example, these data packets all need to compress the Ethernet frame source MAC (Medium Access Control, media access control) address (Ethernet sourcemac address field) and the Ethernet frame destination MAC address (Ethernet destination mac address field), and the values of these fields that need to be compressed Are the same. Further, the above-mentioned "Ether frame combination mode" can be understood as the Ethernet frame fields that need to be compressed and the specific values of each Ethernet frame field that needs to be compressed. The above-mentioned "preset bit stream" can be understood as a bit stream in which the specific values of each Ethernet frame field to be compressed are concatenated in series.

具体的,所述第二指示信息所标识的压缩文件关联特定的以太帧域组合或特定的比特流。例如,第二指示信息指示对数据包中的MAC source域(假设取值为“000000”,此处可理解该以太帧源Mac地址域关联的比特流为“000000”)、MAC destination域(假设取值为“000001”,此处可理解该以太帧Mac目的地址域关联的比特流为“000001”)以及Q-tag域(假设该域取值为“000010”,此处可以理解为以太帧中的Q-tag域关联的比特流为“000010”)进行压缩。在该举例中,“预设比特流”可理解为需要压缩的各个以太帧域的具体取值串联起来的比特流,即为“000000000001000010”。需要注意的是,上述例子中对以太帧域的取值仅为了便于理解,并不代表实际的对应以太帧帧域所占的字节大小。Specifically, the compressed file identified by the second indication information is associated with a specific Ethernet frame domain combination or a specific bit stream. For example, the second indication information indicates that the MAC source field in the data packet (assuming the value is "000000", here it can be understood that the bit stream associated with the source Mac address field of the Ethernet frame is "000000"), the MAC destination field (assuming the value is "000000") The value is "000001", here it can be understood that the bit stream associated with the Mac destination address field of the Ethernet frame is "000001") and the Q-tag field (assuming the value of this field is "000010", it can be understood here as the Ethernet frame The bitstream associated with the Q-tag field in '000010') is compressed. In this example, the "preset bit stream" can be understood as a bit stream in which the specific values of each Ethernet frame field to be compressed are concatenated, that is, "000000000001000010". It should be noted that the value of the Ethernet frame field in the above example is only for the convenience of understanding, and does not represent the actual size of bytes occupied by the corresponding Ethernet frame frame field.

进一步的,所述第二指示信息还用于指示所述第一数据流对应的以太帧头格式。Further, the second indication information is further used to indicate the Ethernet frame header format corresponding to the first data stream.

可选的,在对所述第一数据包中的压缩包头进行解压缩处理之后,所述方法还包括:Optionally, after decompressing the compressed header in the first data packet, the method further includes:

根据所述第二指示信息,确定所述第二数据包中是否需要添加长度域;According to the second indication information, determine whether a length field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的特定位置添加所述长度域;If so, add the length field at a specific position of the second data packet through the Ethernet frame decompression entity;

其中,所述特定位置基于所述第二指示信息确定,所述特定位置是根据高数据包的以太帧格式确定的。Wherein, the specific position is determined based on the second indication information, and the specific position is determined according to the Ethernet frame format of the high data packet.

可选的,在对所述第一数据包中的压缩包头进行解压缩处理之后,所述方法还包括:Optionally, after decompressing the compressed header in the first data packet, the method further includes:

根据所述第一数据包中携带的第三指示信息,确定所述第二数据包中是否需要添加长度域;determining, according to the third indication information carried in the first data packet, whether a length field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的特定位置添加所述长度域;If so, add the length field at a specific position of the second data packet through the Ethernet frame decompression entity;

其中,所述第三指示信息用于指示所述第一数据包在压缩之前是否移除了所述长度域。Wherein, the third indication information is used to indicate whether the length field is removed before the first data packet is compressed.

可选的,在对所述第一数据包中的压缩包头进行解压缩处理之后,所述方法还包括:Optionally, after decompressing the compressed header in the first data packet, the method further includes:

根据协议约定的最小以太帧大小,或者,根据所述第一数据包中携带的第四指示信息,确定所述第二数据包中是否需要添加填充域;According to the minimum Ethernet frame size agreed in the protocol, or, according to the fourth indication information carried in the first data packet, determine whether a padding field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的尾部添加填充域;If so, add a padding field at the end of the second data packet through the Ethernet frame decompression entity;

其中,所述第四指示信息用于指示所述第一数据包在压缩之前是否移除了所述填充域。Wherein, the fourth indication information is used to indicate whether the padding field is removed before the first data packet is compressed.

需要说明的是,由于以太帧中的长度域指示的是以太帧载荷中有效数据(即Ethernet data field,即包含IP系列包头的数据)的长度,以太帧解压缩实体需要在IP系列包头解压缩之后确定长度域指示的具体数值,此处可能涉及以太帧解压缩实体和ROHC解压缩实体的交互,比如ROCH解压缩实体将解压后的包含IP系列包头的数据(即Ethernetdata field)的长度指示给以太帧解压缩实体,但不并限制一定需要两个解压缩实体的交互,可取决于实现。另外,对于填充域,由于以太帧数据包有最小字节限制(如64字节),因此填充域具体需要占多少字节需要在解压缩之后且长度域添加之后(如果需要添加)确定。It should be noted that, since the length field in the Ethernet frame indicates the length of the valid data in the Ethernet frame payload (that is, the Ethernet data field, that is, the data including the IP series header), the Ethernet frame decompression entity needs to decompress the IP series header. Then determine the specific value indicated by the length field, which may involve the interaction between the Ethernet frame decompression entity and the ROHC decompression entity. For example, the ROCH decompression entity indicates the length of the decompressed data including the IP series header (that is, the Ethernetdata field) to The ether frame decompression entity, but does not necessarily require the interaction of two decompression entities, may depend on the implementation. In addition, for the padding field, since the Ethernet frame data packet has a minimum byte limit (such as 64 bytes), how many bytes the padding field needs to occupy needs to be determined after decompression and after the length field is added (if necessary).

为了更清楚地理解本发明实施例的技术方案,以下从发送端对以太帧数据进行压缩处理到接收端对以太帧数据进行解压缩处理的整个过程进行示例说明。In order to understand the technical solutions of the embodiments of the present invention more clearly, the following describes the entire process from the sending end compressing the Ethernet frame data to the receiving end decompressing the Ethernet frame data.

示例一:发送PDCP实体对数据包中的以太帧头和IP系列包头进行并行的压缩处理,接收PDCP实体对数据包中的第一压缩包头和第二压缩包头进行并行的解压缩处理。Example 1: The sending PDCP entity performs parallel compression processing on the Ethernet frame header and the IP series header in the data packet, and the receiving PDCP entity performs parallel decompression processing on the first compressed header and the second compressed header in the data packet.

步骤S1:发送PDCP实体从上层接收包含包头的数据包,对数据包中包含的SDAP子头(如果有SDAP子头)进行移除,对移除了SDAP子头的数据包的压缩处理行为包括:Step S1: The sending PDCP entity receives the data packet containing the packet header from the upper layer, removes the SDAP subheader (if there is an SDAP subheader) contained in the data packet, and the compression processing behavior of the data packet with the SDAP subheader removed includes: :

通过以太帧压缩实体对移除了SDAP子头的数据包中的以太帧头进行压缩处理,得到压缩的以太帧头;在所述得到的压缩的以太帧头中添加标识某一数据流的压缩文件的指示信息,该指示信息标识的压缩文件关联一组特定的以太帧域组合或一组特定的比特流(如特定的以太帧域组合为MAC source=000000、MAC destination=000001和Q-tag=000010,或特定的比特流为000000000001000010),进一步的,该指示信息还可以指示该数据流对应的以太帧格式或以太帧头格式;The Ethernet frame header in the data packet from which the SDAP subheader has been removed is compressed by the Ethernet frame compression entity to obtain a compressed Ethernet frame header; the compressed Ethernet frame header that identifies a certain data stream is added to the compressed Ethernet frame header. The indication information of the file, the compressed file identified by the indication information is associated with a specific set of Ethernet frame domain combinations or a specific set of bit streams (for example, a specific Ethernet frame domain combination is MAC source=000000, MAC destination=000001 and Q-tag =000010, or the specific bit stream is 000000000001000010), further, the indication information may also indicate the corresponding Ethernet frame format or the Ethernet frame header format of the data stream;

通过ROHC实体对移除了SDAP子头的数据包中的载荷部分进行压缩处理,得到具有第二压缩包头的数据包;The payload part in the data packet with the SDAP subheader removed is subjected to compression processing by the ROHC entity to obtain the data packet with the second compressed packet header;

在所述得到的具有第二压缩包头的数据包头部添加压缩后的以太帧头,得到具有第一压缩包头和第二压缩包头的数据包。A compressed Ethernet frame header is added to the obtained data packet header with the second compressed header to obtain a data packet with the first compressed header and the second compressed header.

额外的,若协议约定或网络配置对数据包中携带的长度域和/或填充域进行移除处理,则在进行压缩处理之前,以太帧实体对移除了SDAP子头的数据包的压缩处理行为还包括:In addition, if the protocol agreement or network configuration removes the length field and/or padding field carried in the data packet, the Ethernet frame entity compresses the data packet with the SDAP subheader removed before performing the compression process. Behavior also includes:

对移除了SDAP子头的数据包中携带的长度域和/或填充域进行移除处理。The length field and/or the padding field carried in the data packet from which the SDAP subheader has been removed is removed.

步骤S2:在具有第一压缩包头和第二压缩包头的数据包头部添加之前移除的SDAP子头,并添加PDCP子头,得到PDCP PDU递交下层传输。Step S2: Add the SDAP subheader removed before to the data packet header having the first compressed packet header and the second compressed packet header, and add the PDCP subheader to obtain a PDCP PDU and submit it to the lower layer for transmission.

额外的,在PDCP PDU中还可以携带以下信息(如在PDCP子头中携带):In addition, the following information can also be carried in the PDCP PDU (for example, carried in the PDCP subheader):

以太帧头的长度指示信息,该指示信息用于指示压缩后的以太帧头的长度;length indication information of the Ethernet frame header, the indication information is used to indicate the length of the compressed Ethernet frame header;

步骤S3:接收PDCP实体从下层接收包含压缩包头的数据包,对数据包中的PDCP子头和SDAP子头(如果有SDAP子头)进行移除处理,对移除了PDCP子头和SDAP子头的数据包的解压缩处理行为包括:Step S3: The receiving PDCP entity receives the data packet containing the compressed packet header from the lower layer, removes the PDCP subheader and the SDAP subheader (if there is an SDAP subheader) in the data packet, and removes the PDCP subheader and SDAP subheader. The decompression processing behavior of the header packet includes:

确定压缩后的以太帧头的长度,通过以太帧解压缩实体对确定的压缩后的以太帧头进行解压缩处理,得到未被压缩的以太帧头;Determine the length of the compressed Ethernet frame header, and perform decompression processing on the determined compressed Ethernet frame header through the Ethernet frame decompression entity to obtain an uncompressed Ethernet frame header;

通过ROCH解压缩实体对以太帧的载荷部分进行解压缩处理,得到未被压缩的以太帧载荷部分;The payload part of the Ethernet frame is decompressed by the ROCH decompression entity to obtain the uncompressed payload part of the Ethernet frame;

在未被压缩的以太帧头尾部添加未被压缩的以太帧载荷部分,得到不包含压缩包头的数据包。Add the uncompressed Ethernet frame payload part at the end of the uncompressed Ethernet frame header to obtain a data packet that does not contain the compressed header.

其中,确定压缩后的以太帧头的长度,可包括以下方式:Wherein, determining the length of the compressed Ethernet frame header may include the following methods:

基于从接收到的PDCP PDU中携带的以太帧头的长度指示信息;Based on the length indication information of the Ethernet frame header carried in the received PDCP PDU;

基于协议约定的某种以太帧格式压缩后的以太帧长度信息。Length information of an Ethernet frame compressed based on a certain Ethernet frame format agreed upon in the protocol.

额外的,若协议约定或网络配置对数据包中携带的长度域和/或填充域进行移除处理,则以太帧解压缩实体对不包含压缩包头的数据包的处理行为还包括:In addition, if the protocol agreement or network configuration removes the length field and/or padding field carried in the data packet, the processing behavior of the Ethernet frame decompression entity to the data packet that does not contain the compressed packet header also includes:

以太帧解压缩实体基于压缩包头中携带的数据流的压缩文件标识信息判断解压后的数据包是否应该有长度域,如果有则根据数据流的压缩文件所关联的以太帧格式在特定的位置添加长度域,其中,该长度域指示的是ROHC解压缩实体指示给以太帧解压缩实体其解压后的数据包的长度值;The Ethernet frame decompression entity determines whether the decompressed data packet should have a length field based on the compressed file identification information of the data stream carried in the compressed packet header. Length field, where the length field indicates the length value of the decompressed data packet indicated by the ROHC decompression entity to the Ethernet frame decompression entity;

根据协议约定的最小以太帧大小判断是否应该携带填充域,如果有,则在解压缩后的数据包的尾部添加填充域,其中,填充域的长度为协议约定的最小数据域长度减去实际以太帧载荷的长度。Determine whether the padding field should be carried according to the minimum Ethernet frame size agreed in the protocol. If so, add a padding field at the end of the decompressed data packet. The length of the padding field is the minimum data field length agreed in the protocol minus the actual Ethernet The length of the frame payload.

步骤S4:在不包含压缩包头的的数据包的头部添加之前移除的SDAP子头(如果有SDAP子头),递交上层。Step S4: Add the SDAP subheader (if there is an SDAP subheader) removed before to the header of the data packet that does not contain the compressed header, and submit it to the upper layer.

示例二:发送PDCP实体对数据包中的以太帧头和IP系列包头进行串行的压缩处理,接收PDCP实体对数据包中的第一压缩包头和第二压缩包头进行串行的解压缩处理。Example 2: The sending PDCP entity performs serial compression processing on the Ethernet frame header and the IP series header in the data packet, and the receiving PDCP entity performs serial decompression processing on the first compressed header and the second compressed header in the data packet.

步骤S1:发送PDCP实体从上层接收包含包头的数据包,对数据包中包含的SDAP子头(如果有SDAP子头)进行移除,对移除了SDAP子头的数据包进行压缩处理。Step S1: the sending PDCP entity receives the data packet including the packet header from the upper layer, removes the SDAP subheader (if there is an SDAP subheader) contained in the data packet, and compresses the data packet from which the SDAP subheader is removed.

步骤S1.1:通过以太帧压缩实体对移除了SDAP子头的数据包中的以太帧头进行压缩处理,得到包含压缩的以太帧头的数据包;在压缩的以太帧头中添加标识某一数据流的压缩文件的指示信息,该指示信息标识的压缩文件关联一组特定的以太帧域组合或一组特定的比特流(如特定的以太帧域组合为MAC source=000000、MAC destination=000001和Q-tag=000010,或特定的比特流为000000000001000010),额外的,该指示信息还可以指示该数据流对应的以太帧格式或以太帧头格式。Step S1.1: compressing the Ethernet frame header in the data packet with the SDAP subheader removed by the Ethernet frame compression entity to obtain a data packet containing the compressed Ethernet frame header; Indication information of a compressed file of a data stream, the compressed file identified by the indication information is associated with a specific set of Ethernet frame field combinations or a specific set of bit streams (for example, a specific Ethernet frame field combination is MAC source=000000, MAC destination= 000001 and Q-tag=000010, or the specific bit stream is 000000000001000010), additionally, the indication information may also indicate the Ethernet frame format or the Ethernet frame header format corresponding to the data stream.

额外的,若协议约定或网络配置对数据包中携带的长度域和/或填充域进行移除处理,则以太帧压缩实体对移除了SDAP子头的数据包的压缩处理行为还包括:In addition, if the protocol agreement or network configuration removes the length field and/or padding field carried in the data packet, the compression processing behavior of the Ethernet frame compression entity for the data packet from which the SDAP subheader has been removed also includes:

对移除了SDAP子头的数据包中携带的长度域和/或填充域进行移除处理。The length field and/or the padding field carried in the data packet from which the SDAP subheader has been removed is removed.

步骤S1.2:从步骤S1.1得到的数据包中移除压缩的以太帧头,通过ROHC压缩实体对不包含压缩的以太帧头的数据包进行压缩处理,得到包含第二压缩包头的数据包;在包含第二压缩包头的数据包头部添加压缩的以太帧头,得到具有第一压缩包头和第二压缩包头的数据包。Step S1.2: remove the compressed Ethernet frame header from the data packet obtained in step S1.1, perform compression processing on the data packet that does not contain the compressed Ethernet frame header by the ROHC compression entity, and obtain data including the second compressed packet header Packet; adding a compressed Ethernet frame header to the header of the data packet including the second compressed header to obtain a data packet with the first compressed header and the second compressed header.

步骤S2:在具有第一压缩包头和第二压缩包头的数据包头部添加之前移除的SDAP子头,并添加PDCP子头,得到PDCP PDU递交下层传输。Step S2: Add the SDAP subheader removed before to the data packet header having the first compressed packet header and the second compressed packet header, and add the PDCP subheader to obtain a PDCP PDU and submit it to the lower layer for transmission.

额外的,在PDCP PDU中还可以携带以下信息(如在PDCP子头中携带):In addition, the following information can also be carried in the PDCP PDU (for example, carried in the PDCP subheader):

以太帧头的长度指示信息,该指示信息用于指示压缩后的以太帧头的长度。Length indication information of the Ethernet frame header, the indication information is used to indicate the length of the compressed Ethernet frame header.

步骤S3:接收PDCP实体从下层接收包含第一压缩包头和第二压缩包头的数据包,对数据包中的PDCP子头和SDAP子头(如果有SDAP子头)进行移除处理,对移除了PDCP子头和SDAP子头的数据包进行解压缩处理。Step S3: the receiving PDCP entity receives the data packet containing the first compressed packet header and the second compressed packet header from the lower layer, removes the PDCP subheader and the SDAP subheader (if there is an SDAP subheader) in the data packet, and removes the data packet. The data packets containing the PDCP subheader and the SDAP subheader are decompressed.

步骤S3.1:确定压缩后的以太帧头的长度并移除压缩的以太帧头,通过ROHC解压缩实体对移除了压缩的以太帧头的数据包进行解压缩处理,得到包含未被压缩的IP系列包头的数据包;在包含未被压缩的IP系列包头的数据包的头部添加之前移除的压缩的以太帧头,得到仅包含压缩的以太帧头的数据包,并递交以太帧解压缩实体。Step S3.1: Determine the length of the compressed Ethernet frame header and remove the compressed Ethernet frame header, and perform decompression processing on the data packet with the compressed Ethernet frame header removed by the ROHC decompression entity, and obtain an uncompressed Ethernet frame header. The data packet of the IP series header; the compressed Ethernet frame header removed before the header of the packet containing the uncompressed IP series header is added to obtain a packet containing only the compressed Ethernet frame header, and the Ethernet frame is delivered Unpack the entity.

步骤S3.2:以太帧解压缩实体对从ROHC实体接收到的数据包中的以太帧头基于其所关联的压缩文件进行解压缩处理,恢复被压缩的以太帧域,得到不包含压缩包头的数据包。Step S3.2: The Ethernet frame decompression entity performs decompression processing on the Ethernet frame header in the data packet received from the ROHC entity based on its associated compressed file, restores the compressed Ethernet frame field, and obtains an Ethernet frame that does not contain the compressed packet header. data pack.

其中,确定压缩后的以太帧头的长度,可包括以下方式:Wherein, determining the length of the compressed Ethernet frame header may include the following methods:

基于从接收到的PDCP PDU中携带的以太帧头的长度指示信息;Based on the length indication information of the Ethernet frame header carried in the received PDCP PDU;

基于协议约定的某种以太帧格式压缩后的以太帧长度信息,如可根据压缩的以太帧头中携带标识某一个数据流的压缩文件指示信息,知道该以太帧的包头格式,进而根据协议约定确定该类格式的以太帧头压缩后所占的字节数,即压缩后的以太帧头长度。Length information of an Ethernet frame after being compressed by a certain Ethernet frame format agreed upon by the protocol. For example, the packet header format of the Ethernet frame can be known according to the compressed file indication information that identifies a certain data stream carried in the compressed Ethernet frame header, and then according to the protocol agreement Determine the number of bytes occupied by the compressed Ethernet frame header of this type of format, that is, the length of the compressed Ethernet frame header.

额外的,若协议约定或网络配置对数据包中携带的长度域和/或填充域进行移除处理,则以太帧解压缩实体对从ROCH实体接收到的数据包的处理行为还包括:In addition, if the protocol agreement or network configuration removes the length field and/or padding field carried in the data packet, the processing behavior of the Ethernet frame decompression entity on the data packet received from the ROCH entity also includes:

基于第一压缩包头中携带的标识某数据流的压缩文件的指示信息判断以太帧头是否应该有长度域,如果有则根据数据流的压缩文件所关联的以太帧格式在特定的位置添加长度域,其中,长度域指示的是以太帧中的数据域的长度;Determine whether the Ethernet frame header should have a length field based on the indication information carried in the first compressed packet header that identifies the compressed file of a certain data stream, and if so, add a length field at a specific position according to the Ethernet frame format associated with the compressed file of the data stream , where the length field indicates the length of the data field in the Ethernet frame;

根据协议约定的最小以太帧确定是否有填充域,如果有,则在解压缩后的数据包的尾部添加填充域,其中,填充域的长度为协议约定的最小数据域长度减去实际数据域的长度。Determine whether there is a padding field according to the minimum Ethernet frame agreed in the protocol. If there is, add a padding field at the end of the decompressed data packet. The length of the padding field is the minimum data field length agreed in the protocol minus the actual data field. length.

步骤S4:在不包含压缩包头的数据包的头部添加之前移除的SDAP子头(如果有SDAP子头),递交上层。Step S4: Add the SDAP subheader (if there is an SDAP subheader) removed before to the header of the data packet that does not contain the compressed header, and submit it to the upper layer.

示例三:发送PDCP实体对数据包中的以太帧头进行压缩处理,未配置IP系列包头压缩功能;接收PDCP实体对数据包中的第一压缩包头进行解压缩处理。Example 3: The sending PDCP entity compresses the Ethernet frame header in the data packet, and the IP series header compression function is not configured; the receiving PDCP entity decompresses the first compressed header in the data packet.

步骤S1:发送PDCP实体从上层接收包含包头的数据包,对数据包中包含的SDAP子头(如果有SDAP子头)进行移除后,通过以太帧头压缩实体对移除了SDAP子头的数据包中的以太帧子头进行处理,得到具有第一压缩包头的数据包;在第一压缩包头中携带标识数据流的压缩文件的指示信息,该指示信息标识的压缩文件关联一组特定的以太帧域组合或一组特定的比特流(如特定的以太帧域组合为MAC source=000000、MAC destination=000001和Q-tag=000010,或特定的比特流为000000000001000010),额外的,该指示信息还可以指示该数据流的以太帧格式。Step S1: The sending PDCP entity receives the data packet including the packet header from the upper layer, removes the SDAP subheader (if there is an SDAP subheader) contained in the data packet, and compresses the data packet with the SDAP subheader removed by the Ethernet frame header compression entity. The Ethernet frame subheader in the data packet is processed to obtain a data packet with a first compressed packet header; the first compressed packet header carries indication information identifying the compressed file of the data stream, and the compressed file identified by the indication information is associated with a group of specific. Ethernet frame field combination or a specific set of bitstreams (such as a specific Ethernet frame field combination of MAC source=000000, MAC destination=000001 and Q-tag=000010, or a specific bitstream of 000000000001000010), additionally, the indication The information may also indicate the Ethernet frame format of the data stream.

额外的,若协议约定或网络配置对数据包中携带的长度域和/或填充域进行移除处理,则以太帧压缩实体对移除了SDAP子头的数据包的压缩处理行为还包括:In addition, if the protocol agreement or network configuration removes the length field and/or padding field carried in the data packet, the compression processing behavior of the Ethernet frame compression entity for the data packet from which the SDAP subheader has been removed also includes:

对移除了SDAP子头的数据包中携带的长度域和/或填充域进行移除处理。The length field and/or the padding field carried in the data packet from which the SDAP subheader has been removed is removed.

步骤S2:在具有第一压缩包头的数据包头部添加之前移除的SDAP子头,并添加PDCP子头,得到PDCP PDU并递交下层。Step S2: Add the SDAP subheader removed before to the data packet header with the first compressed packet header, and add the PDCP subheader to obtain the PDCP PDU and submit it to the lower layer.

额外的,在PDCP PDU中还可以携带(如在PDCP子头中携带)以太帧包头的长度指示信息,该指示信息用于指示压缩后的以太帧包头的长度。In addition, the PDCP PDU may also carry (for example, carried in the PDCP subheader) length indication information of the Ethernet frame header, where the indication information is used to indicate the length of the compressed Ethernet frame header.

步骤S3:接收PDCP实体从下层接收包含第一压缩包头的数据包,对数据包中的PDCP子头和SDAP子头(如果有SDAP子头)进行移除处理,以太帧解压缩实体基于该包所关联的压缩文件对移除了PDCP子头和SDAP子头的数据包中的以太帧包头进行解压缩处理,恢复被压缩的以太帧域,得到不包含压缩包头的数据包。Step S3: the receiving PDCP entity receives the data packet including the first compressed packet header from the lower layer, and removes the PDCP subheader and the SDAP subheader (if there is an SDAP subheader) in the data packet, and the Ethernet frame decompression entity is based on the packet. The associated compressed file decompresses the Ethernet frame header in the data packet from which the PDCP subheader and the SDAP subheader are removed, restores the compressed Ethernet frame field, and obtains a data packet that does not contain the compressed header.

额外的,若协议约定或网络配置对数据包中携带的长度域和/或填充域进行移除处理,则以太帧解压缩实体对移除了PDCP子头和SDAP子头的数据包的处理行为还包括:In addition, if the protocol agreement or network configuration removes the length field and/or padding field carried in the data packet, the Ethernet frame decompression entity will process the data packet with the PDCP subheader and SDAP subheader removed. Also includes:

基于压缩包头中携带的标识某数据流的压缩文件的指示信息,判断以太帧包头是否应该有长度域,如果有则根据数据流的压缩文件所关联的以太帧格式在特定的位置添加长度域,其中,长度域指示的是以太帧中的数据域的长度;Based on the indication information that identifies the compressed file of a data stream carried in the compressed packet header, determine whether the Ethernet frame header should have a length field, and if so, add a length field at a specific position according to the Ethernet frame format associated with the compressed file of the data stream. Wherein, the length field indicates the length of the data field in the Ethernet frame;

根据协议约定的最小以太帧确定是否有填充域,如果有,则在解压缩后的数据包的尾部添加填充域,其中,填充域的长度为协议约定的最小数据域长度减去实际数据域的长度。Determine whether there is a padding field according to the minimum Ethernet frame agreed in the protocol. If there is, add a padding field at the end of the decompressed data packet. The length of the padding field is the minimum data field length agreed in the protocol minus the actual data field. length.

步骤S4:在解压后的数据包头部添加之前移除的SDAP子头(如果有SDAP子头),递交上层。Step S4: Add the previously removed SDAP subheader (if there is an SDAP subheader) to the decompressed data packet header, and submit it to the upper layer.

示例四:发送PDCP实体对数据包中的IP系列包头进行压缩处理,未配置以太帧头压缩功能;接收PDCP实体对数据包中的第二压缩包头进行解压缩处理。Example 4: The sending PDCP entity compresses the IP series header in the data packet, and the Ethernet frame header compression function is not configured; the receiving PDCP entity decompresses the second compressed header in the data packet.

步骤S1:发送PDCP实体从上层接收包含包头的数据包,对数据包中的SDAP子头(如果有SDAP子头)和以太帧子头进行移除处理,通过ROHC实体对移除了SDAP子头和/或以太帧子头的数据包进行压缩处理,得到具有第二压缩包头的数据包。Step S1: The sending PDCP entity receives the data packet containing the packet header from the upper layer, removes the SDAP subheader (if there is an SDAP subheader) and the Ethernet frame subheader in the data packet, and removes the SDAP subheader through the ROHC entity pair. And/or the data packet of the Ethernet frame subheader is compressed to obtain the data packet with the second compressed packet header.

步骤S2:在具有第二压缩包头的数据包头部添加之前移除的SDAP子头(如果有SDAP子头)和以太帧子头,并添加PDCP子头,得到PDCP PDU并递交下层。Step S2: Add the SDAP subheader (if there is an SDAP subheader) and the Ethernet frame subheader removed before the header of the data packet with the second compressed header, and add the PDCP subheader to obtain the PDCP PDU and submit it to the lower layer.

步骤S3:接收PDCP实体从下层接收包含第二压缩包头的数据包,对数据包中的PDCP子头、SDAP子头(如果有SDAP子头)以及以太帧子头进行移除处理,通过ROHC解压缩实体对移除了PDCP子头、SDAP子头以及以太帧子头的数据包进行解压缩处理,得到解压后的数据包。Step S3: the receiving PDCP entity receives the data packet containing the second compressed packet header from the lower layer, removes the PDCP subheader, the SDAP subheader (if there is an SDAP subheader) and the Ethernet frame subheader in the data packet, and decomposes the data packet by ROHC. The compression entity decompresses the data packet from which the PDCP subheader, the SDAP subheader and the Ethernet frame subheader are removed to obtain a decompressed data packet.

步骤S4:在解压后的数据包头部添加之前移除的SDAP子头和以太帧子头,递交上层。Step S4: Add the SDAP subheader and the Ethernet frame subheader that were removed before to the decompressed data packet header, and submit it to the upper layer.

综上可知,采用本发明实施例中所提供的上述任一数据处理方法,可实现对以太帧数据进行压缩处理,能降低以太帧数据的传输资源开销。此外,还提供了发送端和接收端对压缩包以及压缩反馈的处理行为,可提升压缩效率和解压缩效率。From the above, it can be seen that, by using any of the above data processing methods provided in the embodiments of the present invention, the compression processing of the Ethernet frame data can be implemented, and the transmission resource overhead of the Ethernet frame data can be reduced. In addition, it also provides the processing behavior of the sender and the receiver for compressed packets and compression feedback, which can improve the compression efficiency and decompression efficiency.

图10是本发明实施例提供的一种发送端的结构图,如图10所示,发送端600包括:FIG. 10 is a structural diagram of a transmitter according to an embodiment of the present invention. As shown in FIG. 10 , the transmitter 600 includes:

接收模块601,用于接收第一数据包,所述第一数据包包括以太帧头和IP系列包头;A receiving module 601, configured to receive a first data packet, where the first data packet includes an Ethernet frame header and an IP series packet header;

压缩模块602,用于至少对所述第一数据包中的所述以太帧头进行压缩处理,得到第二数据包,所述第二数据包至少包括第一压缩包头;A compression module 602, configured to compress at least the Ethernet frame header in the first data packet to obtain a second data packet, where the second data packet at least includes a first compressed packet header;

其中,所述第一压缩包头为对所述以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

可选的,压缩模块602包括以下之一:Optionally, the compression module 602 includes one of the following:

第一压缩子模块,用于对所述以太帧头和所述IP系列包头分别进行压缩处理,得到包括所述第一压缩包头和第二压缩包头的第二数据包;a first compression submodule, configured to compress the Ethernet frame header and the IP series header respectively, to obtain a second data packet including the first compressed header and the second compressed header;

第二压缩子模块,用于对所述以太帧头进行压缩处理,得到包括所述第一压缩包头和所述IP系列包头的第二数据包;a second compression submodule, configured to compress the Ethernet frame header to obtain a second data packet including the first compressed header and the IP series header;

其中,所述第二压缩包头为对所述IP系列包头进行压缩处理得到的压缩包头。Wherein, the second compressed packet header is a compressed packet header obtained by compressing the IP series packet header.

可选的,所述第一压缩子模块包括:Optionally, the first compression submodule includes:

第一压缩单元,用于通过以太帧压缩实体对所述以太帧头进行压缩处理,得到包括所述第一压缩包头的第一子数据包;a first compression unit, configured to perform compression processing on the Ethernet frame header by an Ethernet frame compression entity to obtain a first sub-packet including the first compressed header;

第二压缩单元,用于通过稳健性头压缩ROHC实体对所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第二子数据包;a second compression unit, configured to perform compression processing on the IP series header by the robust header compression ROHC entity to obtain a second sub-packet including the second compressed header;

组合单元,用于将所述第一子数据包和所述第二子数据包组合,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包。A combining unit, configured to combine the first sub-packet and the second sub-packet to obtain a second data packet including the first compressed packet header and the second compressed packet header.

可选的,所述第一压缩子模块还包括:Optionally, the first compression submodule further includes:

分离单元,用于将所述第一数据包分离成第三子数据包和第四子数据包,所述第三子数据包包括所述以太帧头,所述第四子数据包包括所述IP系列包头;a separation unit, configured to separate the first data packet into a third sub-data packet and a fourth sub-data packet, where the third sub-data packet includes the Ethernet frame header, and the fourth sub-data packet includes the IP series header;

所述第一压缩单元具体用于:The first compression unit is specifically used for:

通过以太帧压缩实体对所述第三子数据包中的所述以太帧头进行压缩处理,得到包括所述第一压缩包头的第一子数据包;Performing compression processing on the Ethernet frame header in the third sub-packet by an Ethernet frame compression entity to obtain a first sub-packet including the first compressed header;

所述第二压缩单元具体用于:The second compression unit is specifically used for:

通过ROHC实体对所述第四子数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第二子数据包。The IP series header in the fourth sub-packet is compressed by the ROHC entity to obtain a second sub-packet including the second compressed header.

可选的,所述第一压缩子模块包括:Optionally, the first compression submodule includes:

第三压缩单元,用于通过以太帧压缩实体对所述第一数据包中的所述以太帧头进行压缩处理,得到包括所述第一压缩包头和所述IP系列包头的第三数据包;a third compression unit, configured to perform compression processing on the Ethernet frame header in the first data packet by an Ethernet frame compression entity, to obtain a third data packet including the first compressed packet header and the IP series packet header;

第四压缩单元,用于通过ROHC实体对所述第三数据包中的所述IP系列包头进行压缩处理,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包。The fourth compression unit is configured to perform compression processing on the IP series header in the third data packet by using the ROHC entity to obtain a second data packet including the first compressed packet header and the second compressed packet header.

可选的,所述第四压缩单元具体用于:Optionally, the fourth compression unit is specifically used for:

从所述第三数据包中移除分离出所述第一压缩包头,得到包括所述IP系列包头的第四数据包;Remove and separate the first compressed packet header from the third data packet to obtain a fourth data packet including the IP series packet header;

通过ROHC实体对所述第四数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第五数据包;Perform compression processing on the IP series header in the fourth data packet by the ROHC entity, to obtain a fifth data packet including the second compressed header;

在所述第五数据包的头部添加所述第一压缩包头,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包。The first compressed packet header is added to the header of the fifth data packet to obtain a second data packet including the first compressed packet header and the second compressed packet header.

可选的,所述第一压缩子模块包括:Optionally, the first compression submodule includes:

第五压缩单元,用于通过ROHC实体对所述第一数据包中的所述IP系列包头进行压缩处理,得到包括所述以太帧头和所述第二压缩包头的第三数据包;a fifth compression unit, configured to perform compression processing on the IP series header in the first data packet by the ROHC entity, to obtain a third data packet including the Ethernet frame header and the second compressed header;

第六压缩单元,用于通过以太帧压缩实体对所述第三数据包中的所述以太帧头进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包。A sixth compression unit, configured to compress the Ethernet frame header in the third data packet by using the Ethernet frame compression entity to obtain a second data packet including a first compressed packet header and a second compressed packet header.

可选的,所述第五压缩单元具体用于:Optionally, the fifth compression unit is specifically used for:

从所述第一数据包中移除分离出所述以太帧头,得到包括所述IP系列包头的第四数据包;Remove and separate the Ethernet frame header from the first data packet to obtain a fourth data packet including the IP series packet header;

通过ROHC实体对所述第四数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第五数据包;Perform compression processing on the IP series header in the fourth data packet by the ROHC entity, to obtain a fifth data packet including the second compressed header;

在所述第五数据包的头部添加所述以太帧头,得到包括所述以太帧头和所述第二压缩包头的第三数据包。The Ethernet frame header is added to the header of the fifth data packet to obtain a third data packet including the Ethernet frame header and the second compressed packet header.

可选的,发送端600还包括:Optionally, the sending end 600 further includes:

第一添加模块,用于在所述第一压缩包头中添加第一指示信息;所述第一指示信息用于指示第一数据流对应的以太帧域组合方式或预设比特流,所述预设比特流用于关联所述第一数据流对应的以太帧域组合,所述第一数据流为具有相同压缩特性的数据包集合。The first adding module is configured to add first indication information in the first compressed packet header; the first indication information is used to indicate the Ethernet frame domain combination mode or preset bit stream corresponding to the first data stream, and the pre- It is assumed that the bit stream is used to associate the Ethernet frame domain combination corresponding to the first data stream, and the first data stream is a set of data packets with the same compression characteristics.

可选的,所述第一指示信息还用于指示所述第一数据流对应的以太帧头格式。Optionally, the first indication information is further used to indicate an Ethernet frame header format corresponding to the first data stream.

可选的,发送端600还包括:Optionally, the sending end 600 further includes:

第二添加模块,用于在所述第二数据包中添加第二指示信息,所述第二指示信息用于指示所述第一压缩包头的长度。A second adding module, configured to add second indication information to the second data packet, where the second indication information is used to indicate the length of the first compressed packet header.

可选的,发送端600还包括:Optionally, the sending end 600 further includes:

移除模块,用于通过以太帧压缩实体移除所述第一数据包中携带的长度域和填充域中的至少一项。A removing module, configured to remove at least one of the length field and the padding field carried in the first data packet by using the Ethernet frame compression entity.

可选的,发送端600还包括第三添加模块,所述第三添加模块用于以下至少之一:Optionally, the sending end 600 further includes a third adding module, and the third adding module is used for at least one of the following:

在所述第二数据包中添加第三指示信息,所述第三指示信息用于指示所述第一数据包中携带的长度域是否被移除;adding third indication information to the second data packet, where the third indication information is used to indicate whether the length field carried in the first data packet is removed;

在所述第二数据包中添加第四指示信息,所述第四指示信息用于指示所述第一数据包中携带的填充域是否被移除;adding fourth indication information to the second data packet, where the fourth indication information is used to indicate whether the padding field carried in the first data packet is removed;

在所述第二数据包中添加第五指示信息,所述第五指示信息用于指示所述第一数据包中携带的长度域和填充域是否被移除。Fifth indication information is added to the second data packet, where the fifth indication information is used to indicate whether the length field and the padding field carried in the first data packet are removed.

需要说明的是,本发明实施例中上述发送端600可以是方法实施例中任意实施方式的发送端,方法实施例中发送端的任意实施方式都可以被本发明实施例中的上述发送端600所实现,并达到相同的有益效果,为避免重复,此处不再赘述。It should be noted that, in this embodiment of the present invention, the above-mentioned transmitting end 600 may be a transmitting end of any implementation manner in the method embodiment, and any implementation of the transmitting end in the method embodiment may be used by the above-mentioned transmitting end 600 in this embodiment of the present invention. and achieve the same beneficial effect, in order to avoid repetition, details are not repeated here.

图11是本发明实施例提供的一种接收端的结构图,如图11所示,接收端700包括:FIG. 11 is a structural diagram of a receiving end provided by an embodiment of the present invention. As shown in FIG. 11 , the receiving end 700 includes:

接收模块701,用于接收第一数据包,所述第一数据包至少包括第一压缩包头;a receiving module 701, configured to receive a first data packet, where the first data packet includes at least a first compressed packet header;

解压缩模块702,用于对所述第一数据包中的压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包;A decompression module 702, configured to decompress the compressed header in the first data packet to obtain a second data packet including an Ethernet frame header and an IP series header;

其中,所述第一压缩包头为对以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

解压缩模块702包括:The decompression module 702 includes:

第一解压缩子模块,用于通过以太帧解压缩实体对所述第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包;a first decompression submodule, configured to perform decompression processing on the first compressed packet header by the Ethernet frame decompression entity to obtain the first sub-data packet including the Ethernet frame header;

第二解压缩子模块,用于通过稳健性头压缩ROHC解压缩实体对所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包;The second decompression submodule is used for decompressing the second compressed packet header through the robustness header compression ROHC decompression entity to obtain the second sub-data packet including the IP series packet header;

组合子模块,用于将所述第一子数据包和所述第二子数据包组合,得到包括所述以太帧头和所述IP系列包头的第二数据包。A combining submodule is configured to combine the first sub-data packet and the second sub-data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header.

可选的,解压缩模块702还包括:Optionally, the decompression module 702 further includes:

分离子模块,用于将所述第一数据包分离成第三子数据包和第四子数据包,所述第三子数据包包括所述第一压缩包头,所述第四子数据包包括所述第二压缩包头;A separation sub-module, configured to separate the first data packet into a third sub-data packet and a fourth sub-data packet, where the third sub-data packet includes the first compressed header, and the fourth sub-data packet includes the second compressed packet header;

第一解压缩子模块具体用于:The first decompression submodule is specifically used for:

通过以太帧解压缩实体对所述第三子数据包中的所述第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包;Perform decompression processing on the first compressed header in the third sub-packet by the Ethernet frame decompression entity to obtain the first sub-packet including the Ethernet frame header;

第二解压缩子模块具体用于:The second decompression submodule is specifically used for:

通过ROHC解压缩实体对所述第四子数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包。The second compressed header in the fourth sub-packet is decompressed by the ROHC decompression entity to obtain the second sub-packet including the IP series header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

解压缩模块702包括:The decompression module 702 includes:

第三解压缩子模块,用于通过ROHC解压缩实体对所述第一数据包中的所述第二压缩包头进行解压缩处理,得到包括所述第一压缩包头和IP系列包头的第三数据包;A third decompression submodule, configured to decompress the second compressed header in the first data packet by using the ROHC decompression entity to obtain third data including the first compressed header and the IP series header Bag;

第四解压缩子模块,用于通过以太帧解压缩实体对所述第三数据包中的所述第一压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包。The fourth decompression submodule is used for decompressing the first compressed packet header in the third data packet by using the Ethernet frame decompression entity to obtain the second data including the Ethernet frame header and the IP series packet header Bag.

可选的,第三解压缩子模块具体用于:Optionally, the third decompression submodule is specifically used for:

从所述第一数据包中分离出所述第一压缩包头,得到包括所述第二压缩包头的第四数据包;Separating the first compressed packet header from the first data packet to obtain a fourth data packet including the second compressed packet header;

通过ROHC解压缩实体对所述第四数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第五数据包;The second compressed header in the fourth data packet is decompressed by the ROHC decompression entity to obtain the fifth data packet including the IP series header;

在所述第五数据包的头部添加所述第一压缩包头,得到包括所述第一压缩包头和所述IP系列包头的第三数据包。The first compressed packet header is added to the header of the fifth data packet to obtain a third data packet including the first compressed packet header and the IP series packet header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

解压缩模块702包括:The decompression module 702 includes:

第五解压缩子模块,用于通过以太帧解压缩实体对所述第一数据包中的所述第一压缩包头进行解压缩处理,得到包括以太帧头和所述第二压缩包头的第三数据包;The fifth decompression sub-module is used for decompressing the first compressed packet header in the first data packet by using the Ethernet frame decompression entity to obtain a third compressed packet header including the Ethernet frame header and the second compressed packet header. data pack;

第六解压缩子模块,用于通过ROHC解压缩实体对所述第三数据包中的所述第二压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包。The sixth decompression submodule is used for decompressing the second compressed packet header in the third data packet through the ROHC decompression entity to obtain the second data packet including the Ethernet frame header and the IP series packet header .

可选的,第六解压缩子模块具体用于:Optionally, the sixth decompression submodule is specifically used for:

从所述第三数据包中分离出所述以太帧头,得到包括所述第二压缩包头的第四数据包;Separate the Ethernet frame header from the third data packet to obtain a fourth data packet including the second compressed packet header;

通过ROHC解压缩实体对所述第四数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第五数据包;The second compressed header in the fourth data packet is decompressed by the ROHC decompression entity to obtain the fifth data packet including the IP series header;

在所述第五数据包的头部添加所述以太帧头,得到包括所述以太帧头和所述IP系列包头的第二数据包。The Ethernet frame header is added to the header of the fifth data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header.

可选的,所述第一数据包包括第一压缩包头;Optionally, the first data packet includes a first compressed header;

接收端700还包括:The receiving end 700 also includes:

第一确定模块,用于确定所述第一压缩包头的长度;a first determining module, configured to determine the length of the first compressed packet header;

第二确定模块,用于根据所述第一压缩包头的长度,确定所述第一数据包中的所述第一压缩包头。A second determining module, configured to determine the first compressed packet header in the first data packet according to the length of the first compressed packet header.

可选的,所述第一压缩包头的长度通过以下至少之一确定:Optionally, the length of the first compressed packet header is determined by at least one of the following:

所述第一数据包中携带的第一指示信息,所述第一指示信息用于指示所述第一压缩包头的长度;the first indication information carried in the first data packet, where the first indication information is used to indicate the length of the first compressed packet header;

基于协议约定的与所述第一数据包的以太帧头格式相对应的第一压缩包头的长度。The length of the first compressed packet header corresponding to the format of the Ethernet frame header of the first data packet based on the protocol agreement.

可选的,所述第一压缩包头中携带有第二指示信息,所述第二指示信息用于指示第一数据流对应的以太帧域组合方式或预设比特流,所述预设比特流用于关联所述第一数据流对应的以太帧域组合,所述第一数据流为具有相同压缩特性的数据包集合。Optionally, the first compressed packet header carries second indication information, where the second indication information is used to indicate an Ethernet frame domain combination mode or a preset bit stream corresponding to the first data stream, and the preset bit stream uses For associating the Ethernet frame domain combination corresponding to the first data stream, the first data stream is a set of data packets with the same compression characteristics.

可选的,所述第二指示信息还用于指示所述第一数据流对应的以太帧头格式。Optionally, the second indication information is further used to indicate the Ethernet frame header format corresponding to the first data stream.

可选的,接收端700还包括:Optionally, the receiving end 700 further includes:

第三确定模块,用于根据所述第二指示信息,确定所述第二数据包中是否需要添加长度域;a third determining module, configured to determine, according to the second indication information, whether a length field needs to be added to the second data packet;

第一添加模块,用于若是,则通过以太帧解压缩实体在所述第二数据包的特定位置添加所述长度域;a first adding module, configured to add the length field at a specific position of the second data packet through an Ethernet frame decompression entity;

其中,所述特定位置基于所述第二指示信息确定。Wherein, the specific location is determined based on the second indication information.

可选的,接收端700还包括:Optionally, the receiving end 700 further includes:

第四确定模块,用于根据所述第一数据包中携带的第三指示信息,确定所述第二数据包中是否需要添加长度域;a fourth determining module, configured to determine whether a length field needs to be added to the second data packet according to the third indication information carried in the first data packet;

第二添加模块,用于若是,则通过以太帧解压缩实体在所述第二数据包的特定位置添加所述长度域;a second adding module, configured to add the length field at a specific position of the second data packet through the Ethernet frame decompression entity;

其中,所述第三指示信息用于指示所述第一数据包在压缩之前是否移除了所述长度域。Wherein, the third indication information is used to indicate whether the length field is removed before the first data packet is compressed.

可选的,接收端700还包括:Optionally, the receiving end 700 further includes:

第五确定模块,用于根据协议约定的最小以太帧大小,或者,根据所述第一数据包中携带的第四指示信息,确定所述第二数据包中是否需要添加填充域;a fifth determination module, configured to determine whether a padding field needs to be added to the second data packet according to the minimum Ethernet frame size agreed upon in the protocol, or according to the fourth indication information carried in the first data packet;

第三添加模块,用于若是,则通过以太帧解压缩实体在所述第二数据包的尾部添加填充域;The third adding module is used to add a padding field at the end of the second data packet through the Ethernet frame decompression entity;

其中,所述第四指示信息用于指示所述第一数据包在压缩之前是否移除了所述填充域。Wherein, the fourth indication information is used to indicate whether the padding field is removed before the first data packet is compressed.

需要说明的是,本发明实施例中上述接收端900可以是方法实施例中任意实施方式的接收端,方法实施例中接收端的任意实施方式都可以被本发明实施例中的上述接收端700所实现,并达到相同的有益效果,为避免重复,此处不再赘述。It should be noted that, in this embodiment of the present invention, the above-mentioned receiving end 900 may be a receiving end of any implementation manner in the method embodiment, and any implementation of the receiving end in the method embodiment may be recognized by the above-mentioned receiving end 700 in this embodiment of the present invention. and achieve the same beneficial effect, in order to avoid repetition, details are not repeated here.

图12为实现本发明各个实施例的一种终端的硬件结构示意图,该终端800包括但不限于:射频单元801、网络模块802、音频输出单元803、输入单元804、传感器805、显示单元806、用户输入单元807、接口单元808、存储器809、处理器810、以及电源811等部件。本领域技术人员可以理解,图12中示出的结构并不构成对发送端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,终端包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。12 is a schematic diagram of the hardware structure of a terminal implementing various embodiments of the present invention. The terminal 800 includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, User input unit 807, interface unit 808, memory 809, processor 810, power supply 811 and other components. Those skilled in the art can understand that the structure shown in FIG. 12 does not constitute a limitation on the sending end, and the terminal may include more or less components than the one shown, or combine some components, or arrange different components. In the embodiment of the present invention, the terminal includes but is not limited to a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.

该终端800既可以作为本发明实施例中的发送端,也可以作为本发明实施例中的接收端。在上行传输时,终端800可作为发送端;在下行传输时,终端800可作为接收端。The terminal 800 may serve as both a sending end in this embodiment of the present invention and a receiving end in this embodiment of the present invention. During the uplink transmission, the terminal 800 may serve as the sending end; during the downlink transmission, the terminal 800 may serve as the receiving end.

在上行传输时,终端800作为发送端,执行如下数据处理方法。During uplink transmission, the terminal 800 acts as a transmitting end and executes the following data processing method.

射频单元801用于:The radio frequency unit 801 is used for:

接收第一数据包,所述第一数据包包括以太帧头和IP系列包头;Receive a first data packet, where the first data packet includes an Ethernet frame header and an IP series header;

处理器810用于:Processor 810 is used to:

至少对所述第一数据包中的所述以太帧头进行压缩处理,得到第二数据包,所述第二数据包至少包括第一压缩包头;Perform compression processing on at least the Ethernet frame header in the first data packet to obtain a second data packet, and the second data packet includes at least the first compressed packet header;

其中,所述第一压缩包头为对所述以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

可选的,处理器810具体用于以下之一:Optionally, the processor 810 is specifically used for one of the following:

对所述以太帧头和所述IP系列包头分别进行压缩处理,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包;compressing the Ethernet frame header and the IP series packet header respectively to obtain a second data packet including the first compressed packet header and the second compressed packet header;

对所述以太帧头进行压缩处理,得到包括所述第一压缩包头和所述IP系列包头的第二数据包;compressing the Ethernet frame header to obtain a second data packet including the first compressed packet header and the IP series packet header;

其中,所述第二压缩包头为对所述IP系列包头进行压缩处理得到的压缩包头。Wherein, the second compressed packet header is a compressed packet header obtained by compressing the IP series packet header.

可选的,处理器810具体用于:Optionally, the processor 810 is specifically configured to:

通过以太帧压缩实体对所述以太帧头进行压缩处理,得到包括所述第一压缩包头的第一子数据包;Performing compression processing on the Ethernet frame header by the Ethernet frame compression entity to obtain a first sub-packet including the first compressed header;

通过稳健性头压缩ROHC实体对所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第二子数据包;The IP series packet header is compressed by the robustness header compression ROHC entity to obtain a second sub-data packet including the second compressed packet header;

将所述第一子数据包和所述第二子数据包组合,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包。The first sub-packet and the second sub-packet are combined to obtain a second data packet including the first compressed packet header and the second compressed packet header.

可选的,处理器810还用于:Optionally, the processor 810 is further configured to:

将所述第一数据包分离成第三子数据包和第四子数据包,所述第三子数据包包括所述以太帧头,所述第四子数据包包括所述IP系列包头;Separating the first data packet into a third sub-data packet and a fourth sub-data packet, the third sub-data packet includes the Ethernet frame header, and the fourth sub-data packet includes the IP series header;

处理器810具体用于:The processor 810 is specifically used for:

通过以太帧压缩实体对所述第三子数据包中的所述以太帧头进行压缩处理,得到包括所述第一压缩包头的第一子数据包;Performing compression processing on the Ethernet frame header in the third sub-packet by an Ethernet frame compression entity to obtain a first sub-packet including the first compressed header;

通过ROHC实体对所述第四子数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第二子数据包。The IP series header in the fourth sub-packet is compressed by the ROHC entity to obtain a second sub-packet including the second compressed header.

可选的,处理器810具体用于:Optionally, the processor 810 is specifically configured to:

通过以太帧压缩实体对所述第一数据包中的所述以太帧头进行压缩处理,得到包括所述第一压缩包头和所述IP系列包头的第三数据包;Performing compression processing on the Ethernet frame header in the first data packet by the Ethernet frame compression entity to obtain a third data packet including the first compressed packet header and the IP series packet header;

通过ROHC实体对所述第三数据包中的所述IP系列包头进行压缩处理,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包。The IP series header in the third data packet is compressed by the ROHC entity to obtain a second data packet including the first compressed header and the second compressed header.

可选的,处理器810具体用于:Optionally, the processor 810 is specifically configured to:

从所述第三数据包中分离出所述第一压缩包头,得到包括所述IP系列包头的第四数据包;Separating the first compressed packet header from the third data packet to obtain a fourth data packet including the IP series packet header;

通过ROHC实体对所述第四数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第五数据包;Perform compression processing on the IP series header in the fourth data packet by the ROHC entity, to obtain a fifth data packet including the second compressed header;

在所述第五数据包的头部添加所述第一压缩包头,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包。The first compressed packet header is added to the header of the fifth data packet to obtain a second data packet including the first compressed packet header and the second compressed packet header.

可选的,处理器810具体用于:Optionally, the processor 810 is specifically configured to:

通过ROHC实体对所述第一数据包中的所述IP系列包头进行压缩处理,得到包括所述以太帧头和所述第二压缩包头的第三数据包;Perform compression processing on the IP series header in the first data packet by the ROHC entity, to obtain a third data packet including the Ethernet frame header and the second compressed header;

通过以太帧压缩实体对所述第三数据包中的所述以太帧头进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包。The Ethernet frame header in the third data packet is compressed by the Ethernet frame compression entity to obtain a second data packet including a first compressed packet header and a second compressed packet header.

可选的,处理器810具体用于:Optionally, the processor 810 is specifically configured to:

从所述第一数据包中分离出所述以太帧头,得到包括所述IP系列包头的第四数据包;Separate the Ethernet frame header from the first data packet to obtain a fourth data packet including the IP series packet header;

通过ROHC实体对所述第四数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第五数据包;Perform compression processing on the IP series header in the fourth data packet by the ROHC entity, to obtain a fifth data packet including the second compressed header;

在所述第五数据包的头部添加所述以太帧头,得到包括所述以太帧头和所述第二压缩包头的第三数据包。The Ethernet frame header is added to the header of the fifth data packet to obtain a third data packet including the Ethernet frame header and the second compressed packet header.

可选的,处理器810还用于:Optionally, the processor 810 is further configured to:

在所述第一压缩包头中添加第一指示信息;所述第一指示信息用于指示第一数据流对应的以太帧域组合方式或预设比特流,所述预设比特流用于关联所述第一数据流对应的以太帧域组合,所述第一数据流为具有相同压缩特性的数据包集合。First indication information is added to the first compressed packet header; the first indication information is used to indicate an Ethernet frame domain combination mode or a preset bit stream corresponding to the first data stream, and the preset bit stream is used to associate the An Ethernet frame domain combination corresponding to a first data stream, where the first data stream is a set of data packets with the same compression characteristics.

可选的,所述第一指示信息还用于指示所述第一数据流对应的以太帧头格式。Optionally, the first indication information is further used to indicate an Ethernet frame header format corresponding to the first data stream.

可选的,处理器810还用于:Optionally, the processor 810 is further configured to:

在所述第二数据包中添加第二指示信息,所述第二指示信息用于指示所述第一压缩包头的长度。Adding second indication information to the second data packet, where the second indication information is used to indicate the length of the first compressed packet header.

可选的,处理器810还用于:Optionally, the processor 810 is further configured to:

通过以太帧压缩实体移除所述第一数据包中携带的长度域和填充域中的至少一项。At least one of the length field and the padding field carried in the first data packet is removed by using the Ethernet frame compression entity.

可选的,处理器810还用于以下至少之一:Optionally, the processor 810 is also used for at least one of the following:

在所述第二数据包中添加第三指示信息,所述第三指示信息用于指示所述第一数据包中携带的长度域是否被移除;adding third indication information to the second data packet, where the third indication information is used to indicate whether the length field carried in the first data packet is removed;

在所述第二数据包中添加第四指示信息,所述第四指示信息用于指示所述第一数据包中携带的填充域是否被移除;adding fourth indication information to the second data packet, where the fourth indication information is used to indicate whether the padding field carried in the first data packet is removed;

在所述第二数据包中添加第五指示信息,所述第五指示信息用于指示所述第一数据包中携带的长度域和填充域是否被移除。Fifth indication information is added to the second data packet, where the fifth indication information is used to indicate whether the length field and the padding field carried in the first data packet are removed.

本发明实施例中,发送端至少可对以太帧数据中的以太帧头进行压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。In the embodiment of the present invention, the transmitting end can at least compress the Ethernet frame header in the Ethernet frame data. In this way, when the Ethernet frame data is transmitted between the transmitting end and the receiving end, the required transmission resources are reduced, so that the Ethernet frame data can be reduced. Transmission resource overhead of frame data.

在下行传输时,终端800作为接收端,执行如下数据处理方法。During downlink transmission, the terminal 800 acts as a receiving end and executes the following data processing method.

射频单元801用于:The radio frequency unit 801 is used for:

接收第一数据包,所述第一数据包至少包括第一压缩包头;receiving a first data packet, the first data packet including at least a first compressed packet header;

处理器810用于:Processor 810 is used to:

对所述第一数据包中的压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包;Decompressing the compressed header in the first data packet to obtain the second data packet including the Ethernet frame header and the IP series header;

其中,所述第一压缩包头为对以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

处理器810具体用于:The processor 810 is specifically used for:

通过以太帧解压缩实体对所述第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包;Perform decompression processing on the first compressed packet header by the Ethernet frame decompression entity to obtain the first sub-packet including the Ethernet frame header;

通过稳健性头压缩ROHC解压缩实体对所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包;The second compressed packet header is decompressed by the robustness header compression ROHC decompression entity to obtain the second sub-data packet including the IP series packet header;

将所述第一子数据包和所述第所述以太帧头和所述IP系列包头的第二数据包。The first sub-data packet and the second data packet of the first Ethernet frame header and the IP series packet header.

可选的,处理器810还用于:Optionally, the processor 810 is further configured to:

将所述第一数据包分离成第三子数据包和第四子数据包,所述第三子数据包包括所述第一压缩包头,所述第四子数据包包括所述第二压缩包头;Separating the first data packet into a third sub-data packet and a fourth sub-data packet, the third sub-data packet includes the first compressed packet header, and the fourth sub-data packet includes the second compressed packet header ;

处理器810具体用于:The processor 810 is specifically used for:

通过以太帧解压缩实体对所述第三子数据包中的所述第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包;Perform decompression processing on the first compressed header in the third sub-packet by the Ethernet frame decompression entity to obtain the first sub-packet including the Ethernet frame header;

通过ROHC解压缩实体对所述第四子数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包。The second compressed header in the fourth sub-packet is decompressed by the ROHC decompression entity to obtain the second sub-packet including the IP series header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

处理器810具体用于:The processor 810 is specifically used for:

通过ROHC解压缩实体对所述第一数据包中的所述第二压缩包头进行解压缩处理,得到包括所述第一压缩包头和IP系列包头的第三数据包;Perform decompression processing on the second compressed packet header in the first data packet by the ROHC decompression entity to obtain a third data packet including the first compressed packet header and the IP series packet header;

通过以太帧解压缩实体对所述第三数据包中的所述第一压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包。The first compressed packet header in the third data packet is decompressed by the Ethernet frame decompression entity to obtain a second data packet including the Ethernet frame header and the IP series packet header.

可选的,处理器810具体用于:Optionally, the processor 810 is specifically configured to:

从所述第一数据包中分离出所述第一压缩包头,得到包括所述第二压缩包头的第四数据包;Separating the first compressed packet header from the first data packet to obtain a fourth data packet including the second compressed packet header;

通过ROHC解压缩实体对所述第四数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第五数据包;The second compressed header in the fourth data packet is decompressed by the ROHC decompression entity to obtain the fifth data packet including the IP series header;

在所述第五数据包的头部添加所述第一压缩包头,得到包括所述第一压缩包头和所述IP系列包头的第三数据包。The first compressed packet header is added to the header of the fifth data packet to obtain a third data packet including the first compressed packet header and the IP series packet header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

处理器810具体用于:The processor 810 is specifically used for:

通过以太帧解压缩实体对所述第一数据包中的所述第一压缩包头进行解压缩处理,得到包括以太帧头和所述第二压缩包头的第三数据包;Perform decompression processing on the first compressed packet header in the first data packet by the Ethernet frame decompression entity to obtain a third data packet including the Ethernet frame header and the second compressed packet header;

通过ROHC解压缩实体对所述第三数据包中的所述第二压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包。The ROHC decompression entity performs decompression processing on the second compressed packet header in the third data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header.

可选的,处理器810具体用于:Optionally, the processor 810 is specifically configured to:

从所述第三数据包中分离出所述以太帧头,得到包括所述第二压缩包头的第四数据包;Separate the Ethernet frame header from the third data packet to obtain a fourth data packet including the second compressed packet header;

通过ROHC解压缩实体对所述第四数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第五数据包;The second compressed header in the fourth data packet is decompressed by the ROHC decompression entity to obtain the fifth data packet including the IP series header;

在所述第五数据包的头部添加所述以太帧头,得到包括所述以太帧头和所述IP系列包头的第二数据包。The Ethernet frame header is added to the header of the fifth data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header.

可选的,所述第一数据包包括第一压缩包头;Optionally, the first data packet includes a first compressed header;

处理器810还用于:Processor 810 is also used to:

确定所述第一压缩包头的长度;determining the length of the first compressed packet header;

根据所述第一压缩包头的长度,确定所述第一数据包中的所述第一压缩包头。The first compressed packet header in the first data packet is determined according to the length of the first compressed packet header.

可选的,所述第一压缩包头的长度通过以下至少之一确定:Optionally, the length of the first compressed packet header is determined by at least one of the following:

所述第一数据包中携带的第一指示信息,所述第一指示信息用于指示所述第一压缩包头的长度;the first indication information carried in the first data packet, where the first indication information is used to indicate the length of the first compressed packet header;

基于协议约定的与所述第一数据包的以太帧头格式相对应的第一压缩包头的长度。The length of the first compressed packet header corresponding to the format of the Ethernet frame header of the first data packet based on the protocol agreement.

可选的,所述第一压缩包头中携带有第二指示信息,所述第二指示信息用于指示第一数据流对应的以太帧域组合方式或预设比特流,所述预设比特流用于关联所述第一数据流对应的以太帧域组合,所述第一数据流为具有相同压缩特性的数据包集合。Optionally, the first compressed packet header carries second indication information, where the second indication information is used to indicate an Ethernet frame domain combination mode or a preset bit stream corresponding to the first data stream, and the preset bit stream uses For associating the Ethernet frame domain combination corresponding to the first data stream, the first data stream is a set of data packets with the same compression characteristics.

可选的,所述第二指示信息还用于指示所述第一数据流对应的以太帧头格式。Optionally, the second indication information is further used to indicate the Ethernet frame header format corresponding to the first data stream.

可选的,处理器810还用于:Optionally, the processor 810 is further configured to:

根据所述第二指示信息,确定所述第二数据包中是否需要添加长度域;According to the second indication information, determine whether a length field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的特定位置添加所述长度域;If so, add the length field at a specific position of the second data packet through the Ethernet frame decompression entity;

其中,所述特定位置基于所述第二指示信息确定。Wherein, the specific location is determined based on the second indication information.

可选的,处理器810还用于:Optionally, the processor 810 is further configured to:

根据所述第一数据包中携带的第三指示信息,确定所述第二数据包中是否需要添加长度域;determining, according to the third indication information carried in the first data packet, whether a length field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的特定位置添加所述长度域;If so, add the length field at a specific position of the second data packet through the Ethernet frame decompression entity;

其中,所述第三指示信息用于指示所述第一数据包在压缩之前是否移除了所述长度域。Wherein, the third indication information is used to indicate whether the length field is removed before the first data packet is compressed.

可选的,处理器810还用于:Optionally, the processor 810 is further configured to:

根据协议约定的最小以太帧大小,或者,根据所述第一数据包中携带的第四指示信息,确定所述第二数据包中是否需要添加填充域;According to the minimum Ethernet frame size agreed in the protocol, or, according to the fourth indication information carried in the first data packet, determine whether a padding field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的尾部添加填充域;If so, add a padding field at the end of the second data packet through the Ethernet frame decompression entity;

其中,所述第四指示信息用于指示所述第一数据包在压缩之前是否移除了所述填充域。Wherein, the fourth indication information is used to indicate whether the padding field is removed before the first data packet is compressed.

本发明实施例中,发送端至少可对以太帧数据中的以太帧头进行压缩处理,接收端可对经过压缩处理的以太帧数据进行解压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。In the embodiment of the present invention, the sending end can at least perform compression processing on the Ethernet frame header in the Ethernet frame data, and the receiving end can perform decompression processing on the compressed Ethernet frame data. When transmitting between them, the required transmission resources are reduced, so that the transmission resource overhead of the Ethernet frame data can be reduced.

应理解的是,本发明实施例中,射频单元801可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自网络侧设备的下行数据接收后,给处理器810处理;另外,将上行的数据发送给网络侧设备。通常,射频单元801包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元801还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the radio frequency unit 801 can be used for receiving and sending signals during sending and receiving of information or during a call. Specifically, after receiving the downlink data from the network side device, it is processed by the processor 810; , and send the uplink data to the network side device. Generally, the radio frequency unit 801 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 801 can also communicate with the network and other devices through a wireless communication system.

发送端通过网络模块802为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The sending end provides the user with wireless broadband Internet access through the network module 802, such as helping the user to send and receive emails, browse web pages, and access streaming media.

音频输出单元803可以将射频单元801或网络模块802接收的或者在存储器809中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元803还可以提供与终端800执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元803包括扬声器、蜂鸣器以及受话器等。The audio output unit 803 may convert audio data received by the radio frequency unit 801 or the network module 802 or stored in the memory 809 into audio signals and output as sound. Also, the audio output unit 803 may also provide audio output related to a specific function performed by the terminal 800 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 803 includes a speaker, a buzzer, a receiver, and the like.

输入单元804用于接收音频或视频信号。输入单元804可以包括图形处理器(Graphics Processing Unit,GPU)8041和麦克风8042,图形处理器8041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元806上。经图形处理器8041处理后的图像帧可以存储在存储器809(或其它存储介质)中或者经由射频单元801或网络模块802进行发送。麦克风8042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元801发送到移动通信网络侧设备的格式输出。The input unit 804 is used to receive audio or video signals. The input unit 804 may include a graphics processor (Graphics Processing Unit, GPU) 8041 and a microphone 8042, and the graphics processor 8041 captures images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode data is processed. The processed image frames may be displayed on the display unit 806 . The image frames processed by the graphics processor 8041 may be stored in the memory 809 (or other storage medium) or transmitted via the radio frequency unit 801 or the network module 802 . The microphone 8042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to the device on the mobile communication network side via the radio frequency unit 801 for output in the case of a telephone call mode.

终端800还包括至少一种传感器805,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板8061的亮度,接近传感器可在终端800移动到耳边时,关闭显示面板8061以及背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别发送端姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器805还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The terminal 800 also includes at least one sensor 805, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 8061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 8061 and the backlight when the terminal 800 is moved to the ear . As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the sender (such as horizontal and vertical screen switching, related games , magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 805 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, Infrared sensors, etc., are not repeated here.

显示单元806用于显示由用户输入的信息或提供给用户的信息。显示单元806可包括显示面板8061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板8061。The display unit 806 is used to display information input by the user or information provided to the user. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

用户输入单元807可用于接收输入的数字或字符信息,以及产生与发送端的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元807包括触控面板8071以及其他输入设备8072。触控面板8071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板8071上或在触控面板8071附近的操作)。触控面板8071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器810,接收处理器810发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板8071。除了触控面板8071,用户输入单元807还可以包括其他输入设备8072。具体地,其他输入设备8072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 807 can be used for receiving inputted numerical or character information, and generating key signal input related to user setting and function control of the transmitting end. Specifically, the user input unit 807 includes a touch panel 8071 and other input devices 8072 . The touch panel 8071, also referred to as a touch screen, collects the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable object or accessory on or near the touch panel 8071). operate). The touch panel 8071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 810, the command sent by the processor 810 is received and executed. In addition, the touch panel 8071 can be realized by various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 8071 , the user input unit 807 may also include other input devices 8072 . Specifically, other input devices 8072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.

进一步的,触控面板8071可覆盖在显示面板8071上,当触控面板8071检测到在其上或附近的触摸操作后,传送给处理器810以确定触摸事件的类型,随后处理器810根据触摸事件的类型在显示面板8061上提供相应的视觉输出。虽然在图9中,触控面板8071与显示面板8061是作为两个独立的部件来实现发送端的输入和输出功能,但是在某些实施例中,可以将触控面板8071与显示面板8061集成而实现发送端的输入和输出功能,具体此处不做限定。Further, the touch panel 8071 can be covered on the display panel 8071. When the touch panel 8071 detects a touch operation on or near it, it transmits it to the processor 810 to determine the type of the touch event, and then the processor 810 determines the type of the touch event according to the touch The type of event provides a corresponding visual output on the display panel 8061. Although in FIG. 9, the touch panel 8071 and the display panel 8061 are used as two independent components to realize the input and output functions of the transmitting end, in some embodiments, the touch panel 8071 and the display panel 8061 can be integrated to form Realize the input and output functions of the sending end, which is not limited here.

接口单元808为外部装置与终端800连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元808可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到终端800内的一个或多个元件或者可以用于在终端800和外部装置之间传输数据。The interface unit 808 is an interface for connecting an external device to the terminal 800 . For example, external devices may include wired or wireless headset ports, external power (or battery charger) ports, wired or wireless data ports, memory card ports, ports for connecting devices with identification modules, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 808 may be used to receive input (eg, data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 800 or may be used to communicate between the terminal 800 and the external device. transfer data between.

存储器809可用于存储软件程序以及各种数据。存储器809可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器809可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 809 may be used to store software programs as well as various data. The memory 809 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc. Additionally, memory 809 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

处理器810是发送端的控制中心,利用各种接口和线路连接整个发送端的各个部分,通过运行或执行存储在存储器809内的软件程序以及模块,以及调用存储在存储器809内的数据,执行发送端的各种功能和处理数据,从而对发送端进行整体监控。处理器810可包括一个或多个处理单元;优选的,处理器810可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器810中。The processor 810 is the control center of the sending end, uses various interfaces and lines to connect various parts of the entire sending end, and executes the sending end by running or executing the software programs and modules stored in the memory 809, and calling the data stored in the memory 809. Various functions and processing data for overall monitoring of the sender. The processor 810 may include one or more processing units; preferably, the processor 810 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 810.

终端800还可以包括给各个部件供电的电源811(比如电池),优选的,电源811可以通过电源管理系统与处理器810逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The terminal 800 may also include a power supply 811 (such as a battery) for supplying power to various components. Preferably, the power supply 811 may be logically connected to the processor 810 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. Function.

另外,终端800包括一些未示出的功能模块,在此不再赘述。In addition, the terminal 800 includes some unshown functional modules, which are not repeated here.

优选的,本发明实施例还提供一种终端,包括处理器810,存储器809,存储在存储器809上并可在所述处理器810上运行的计算机程序,该计算机程序被处理器810执行时实现上述数据处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, an embodiment of the present invention further provides a terminal, including a processor 810, a memory 809, a computer program stored in the memory 809 and running on the processor 810, and the computer program is implemented when the processor 810 executes it. The various processes of the above data processing method embodiments can achieve the same technical effect, and are not repeated here in order to avoid repetition.

需要说明的是,本实施例中上述终端800可以是本发明实施例中方法实施例中任意实施方式的发送端,也可以是本发明实施例中方法实施例中任意实施方式的接收端,本发明实施例中方法实施例中发送端或接收端的任意实施方式都可以被本实施例中的上述终端800所实现,以及达到相同的有益效果,此处不再赘述。It should be noted that, in this embodiment, the above-mentioned terminal 800 may be a sending end of any implementation in the method embodiments in the embodiments of the present invention, or may be a receiving end in any implementation in the method embodiments in the embodiments of the present invention. Any implementation of the transmitting end or the receiving end in the method embodiment in the embodiment of the present invention can be implemented by the above-mentioned terminal 800 in this embodiment, and achieve the same beneficial effects, which will not be repeated here.

图13是本发明实施例提供的一种网络侧设备的结构图。如图13所示,网络侧设备900包括:处理器901、收发机902、存储器903和总线接口。FIG. 13 is a structural diagram of a network side device according to an embodiment of the present invention. As shown in FIG. 13 , the network side device 900 includes: a processor 901 , a transceiver 902 , a memory 903 and a bus interface.

该网络侧设备900既可以作为本发明实施例中的发送端,也可以作为本发明实施例中的接收端。在上行传输时,网络侧设备900可作为接收端;在下行传输时,网络侧设备900可作为发送端。The network-side device 900 may serve as both a sending end in this embodiment of the present invention and a receiving end in this embodiment of the present invention. During uplink transmission, the network-side device 900 may serve as a receiving end; during downlink transmission, the network-side device 900 may serve as a sending end.

在上行传输时,网络侧设备900作为接收端,执行如下数据处理方法。During uplink transmission, the network-side device 900 acts as a receiving end and executes the following data processing method.

收发机902用于:Transceiver 902 is used to:

接收第一数据包,所述第一数据包至少包括第一压缩包头;receiving a first data packet, the first data packet including at least a first compressed packet header;

处理器901用于:Processor 901 is used to:

对所述第一数据包中的压缩包头进行解压缩处理,得到包括以太帧头和IP系列包头的第二数据包;Decompressing the compressed header in the first data packet to obtain the second data packet including the Ethernet frame header and the IP series header;

其中,所述第一压缩包头为对以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

处理器901具体用于:The processor 901 is specifically used for:

通过以太帧解压缩实体对所述第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包;Perform decompression processing on the first compressed packet header by the Ethernet frame decompression entity to obtain the first sub-packet including the Ethernet frame header;

通过稳健性头压缩ROHC解压缩实体对所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包;The second compressed packet header is decompressed by the robustness header compression ROHC decompression entity to obtain the second sub-data packet including the IP series packet header;

将所述第一子数据包和所述第可选的,处理器901还用于:Using the first sub-packet and the optional first sub-packet, the processor 901 is further configured to:

将所述第一数据包分离成第三子数据包和第四子数据包,所述第三子数据包包括所述第一压缩包头,所述第四子数据包包括所述第二压缩包头;Separating the first data packet into a third sub-data packet and a fourth sub-data packet, the third sub-data packet includes the first compressed packet header, and the fourth sub-data packet includes the second compressed packet header ;

处理器901具体用于:The processor 901 is specifically used for:

通过以太帧解压缩实体对所述第三子数据包中的所述第一压缩包头进行解压缩处理,得到包括以太帧头的第一子数据包;Perform decompression processing on the first compressed header in the third sub-packet by the Ethernet frame decompression entity to obtain the first sub-packet including the Ethernet frame header;

通过ROHC解压缩实体对所述第四子数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第二子数据包。The second compressed header in the fourth sub-packet is decompressed by the ROHC decompression entity to obtain the second sub-packet including the IP series header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

处理器901具体用于:The processor 901 is specifically used for:

通过ROHC解压缩实体对所述第一数据包中的所述第二压缩包头进行解压缩处理,得到包括所述第一压缩包头和IP系列包头的第三数据包;Perform decompression processing on the second compressed packet header in the first data packet by the ROHC decompression entity to obtain a third data packet including the first compressed packet header and the IP series packet header;

通过以太帧解压缩实体对所述第三数据包中的所述第一压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包。The first compressed packet header in the third data packet is decompressed by the Ethernet frame decompression entity to obtain a second data packet including the Ethernet frame header and the IP series packet header.

可选的,处理器901具体用于:Optionally, the processor 901 is specifically used for:

从所述第一数据包中分离出所述第一压缩包头,得到包括所述第二压缩包头的第四数据包;Separating the first compressed packet header from the first data packet to obtain a fourth data packet including the second compressed packet header;

通过ROHC解压缩实体对所述第四数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第五数据包;The second compressed header in the fourth data packet is decompressed by the ROHC decompression entity to obtain the fifth data packet including the IP series header;

在所述第五数据包的头部添加所述第一压缩包头,得到包括所述第一压缩包头和所述IP系列包头的第三数据包。The first compressed packet header is added to the header of the fifth data packet to obtain a third data packet including the first compressed packet header and the IP series packet header.

可选的,所述第一数据包还包括第二压缩包头,所述第二压缩包头为对IP系列包头进行压缩处理得到的压缩包头;Optionally, the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet headers;

处理器901具体用于:The processor 901 is specifically used for:

通过以太帧解压缩实体对所述第一数据包中的所述第一压缩包头进行解压缩处理,得到包括以太帧头和所述第二压缩包头的第三数据包;Perform decompression processing on the first compressed packet header in the first data packet by the Ethernet frame decompression entity to obtain a third data packet including the Ethernet frame header and the second compressed packet header;

通过ROHC解压缩实体对所述第三数据包中的所述第二压缩包头进行解压缩处理,得到包括所述以太帧头和IP系列包头的第二数据包。The ROHC decompression entity performs decompression processing on the second compressed packet header in the third data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header.

可选的,处理器901具体用于:Optionally, the processor 901 is specifically used for:

从所述第三数据包中分离出所述以太帧头,得到包括所述第二压缩包头的第四数据包;Separate the Ethernet frame header from the third data packet to obtain a fourth data packet including the second compressed packet header;

通过ROHC解压缩实体对所述第四数据包中的所述第二压缩包头进行解压缩处理,得到包括IP系列包头的第五数据包;The second compressed header in the fourth data packet is decompressed by the ROHC decompression entity to obtain the fifth data packet including the IP series header;

在所述第五数据包的头部添加所述以太帧头,得到包括所述以太帧头和所述IP系列包头的第二数据包。The Ethernet frame header is added to the header of the fifth data packet to obtain a second data packet including the Ethernet frame header and the IP series packet header.

可选的,所述第一数据包包括第一压缩包头;Optionally, the first data packet includes a first compressed header;

处理器901还用于:Processor 901 is also used to:

确定所述第一压缩包头的长度;determining the length of the first compressed packet header;

根据所述第一压缩包头的长度,确定所述第一数据包中的所述第一压缩包头。The first compressed packet header in the first data packet is determined according to the length of the first compressed packet header.

可选的,所述第一压缩包头的长度通过以下至少之一确定:Optionally, the length of the first compressed packet header is determined by at least one of the following:

所述第一数据包中携带的第一指示信息,所述第一指示信息用于指示所述第一压缩包头的长度;the first indication information carried in the first data packet, where the first indication information is used to indicate the length of the first compressed packet header;

基于协议约定的与所述第一数据包的以太帧头格式相对应的第一压缩包头的长度。The length of the first compressed packet header corresponding to the format of the Ethernet frame header of the first data packet based on the protocol agreement.

可选的,所述第一压缩包头中携带有第二指示信息,所述第二指示信息用于指示第一数据流对应的以太帧域组合方式或预设比特流,所述预设比特流用于关联所述第一数据流对应的以太帧域组合,所述第一数据流为具有相同压缩特性的数据包集合。Optionally, the first compressed packet header carries second indication information, where the second indication information is used to indicate an Ethernet frame domain combination mode or a preset bit stream corresponding to the first data stream, and the preset bit stream uses For associating the Ethernet frame domain combination corresponding to the first data stream, the first data stream is a set of data packets with the same compression characteristics.

可选的,所述第二指示信息还用于指示所述第一数据流对应的以太帧头格式。Optionally, the second indication information is further used to indicate the Ethernet frame header format corresponding to the first data stream.

可选的,处理器901还用于:Optionally, the processor 901 is further configured to:

根据所述第二指示信息,确定所述第二数据包中是否需要添加长度域;According to the second indication information, determine whether a length field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的特定位置添加所述长度域;If so, add the length field at a specific position of the second data packet through the Ethernet frame decompression entity;

其中,所述特定位置基于所述第二指示信息确定。Wherein, the specific location is determined based on the second indication information.

可选的,处理器901还用于:Optionally, the processor 901 is further configured to:

根据所述第一数据包中携带的第三指示信息,确定所述第二数据包中是否需要添加长度域;determining, according to the third indication information carried in the first data packet, whether a length field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的特定位置添加所述长度域;If so, add the length field at a specific position of the second data packet through the Ethernet frame decompression entity;

其中,所述第三指示信息用于指示所述第一数据包在压缩之前是否移除了所述长度域。Wherein, the third indication information is used to indicate whether the length field is removed before the first data packet is compressed.

可选的,处理器901还用于:Optionally, the processor 901 is further configured to:

根据协议约定的最小以太帧大小,或者,根据所述第一数据包中携带的第四指示信息,确定所述第二数据包中是否需要添加填充域;According to the minimum Ethernet frame size agreed in the protocol, or, according to the fourth indication information carried in the first data packet, determine whether a padding field needs to be added to the second data packet;

若是,则通过以太帧解压缩实体在所述第二数据包的尾部添加填充域;If so, add a padding field at the end of the second data packet through the Ethernet frame decompression entity;

其中,所述第四指示信息用于指示所述第一数据包在压缩之前是否移除了所述填充域。Wherein, the fourth indication information is used to indicate whether the padding field is removed before the first data packet is compressed.

本发明实施例中,发送端至少可对以太帧数据中的以太帧头进行压缩处理,接收端可对经过压缩处理的以太帧数据进行解压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。In the embodiment of the present invention, the sending end can at least perform compression processing on the Ethernet frame header in the Ethernet frame data, and the receiving end can perform decompression processing on the compressed Ethernet frame data. When transmitting between them, the required transmission resources are reduced, so that the transmission resource overhead of the Ethernet frame data can be reduced.

在下行传输时,网络侧设备900作为发送端,执行如下数据处理方法。During downlink transmission, the network-side device 900 acts as a sender and executes the following data processing methods.

收发机902用于:Transceiver 902 is used to:

接收第一数据包,所述第一数据包包括以太帧头和IP系列包头;Receive a first data packet, where the first data packet includes an Ethernet frame header and an IP series header;

处理器901用于:Processor 901 is used to:

至少对所述第一数据包中的所述以太帧头进行压缩处理,得到第二数据包,所述第二数据包至少包括第一压缩包头;Perform compression processing on at least the Ethernet frame header in the first data packet to obtain a second data packet, and the second data packet includes at least the first compressed packet header;

其中,所述第一压缩包头为对所述以太帧头进行压缩处理得到的压缩包头。Wherein, the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.

可选的,处理器901具体用于以下之一:Optionally, the processor 901 is specifically used for one of the following:

对所述以太帧头和所述IP系列包头分别进行压缩处理,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包;compressing the Ethernet frame header and the IP series packet header respectively to obtain a second data packet including the first compressed packet header and the second compressed packet header;

对所述以太帧头进行压缩处理,得到包括所述第一压缩包头和所述IP系列包头的第二数据包;compressing the Ethernet frame header to obtain a second data packet including the first compressed packet header and the IP series packet header;

其中,所述第二压缩包头为对所述IP系列包头进行压缩处理得到的压缩包头。Wherein, the second compressed packet header is a compressed packet header obtained by compressing the IP series packet header.

可选的,处理器901具体用于:Optionally, the processor 901 is specifically used for:

通过以太帧压缩实体对所述以太帧头进行压缩处理,得到包括所述第一压缩包头的第一子数据包;Performing compression processing on the Ethernet frame header by the Ethernet frame compression entity to obtain a first sub-packet including the first compressed header;

通过稳健性头压缩ROHC实体对所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第二子数据包;The IP series packet header is compressed by the robustness header compression ROHC entity to obtain a second sub-data packet including the second compressed packet header;

将所述第一子数据包和所包括所述第一压缩包头和所述第二压缩包头的第二数据包。Combining the first sub-packet with the second data packet including the first compressed packet header and the second compressed packet header.

可选的,处理器901还用于:Optionally, the processor 901 is further configured to:

将所述第一数据包分离成第三子数据包和第四子数据包,所述第三子数据包包括所述以太帧头,所述第四子数据包包括所述IP系列包头;Separating the first data packet into a third sub-data packet and a fourth sub-data packet, the third sub-data packet includes the Ethernet frame header, and the fourth sub-data packet includes the IP series header;

处理器901具体用于:The processor 901 is specifically used for:

通过以太帧压缩实体对所述第三子数据包中的所述以太帧头进行压缩处理,得到包括所述第一压缩包头的第一子数据包;Performing compression processing on the Ethernet frame header in the third sub-packet by an Ethernet frame compression entity to obtain a first sub-packet including the first compressed header;

通过ROHC实体对所述第四子数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第二子数据包。The IP series header in the fourth sub-packet is compressed by the ROHC entity to obtain a second sub-packet including the second compressed header.

可选的,处理器901具体用于:Optionally, the processor 901 is specifically used for:

通过以太帧压缩实体对所述第一数据包中的所述以太帧头进行压缩处理,得到包括所述第一压缩包头和所述IP系列包头的第三数据包;Performing compression processing on the Ethernet frame header in the first data packet by the Ethernet frame compression entity to obtain a third data packet including the first compressed packet header and the IP series packet header;

通过ROHC实体对所述第三数据包中的所述IP系列包头进行压缩处理,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包。The IP series header in the third data packet is compressed by the ROHC entity to obtain a second data packet including the first compressed header and the second compressed header.

可选的,处理器901具体用于:Optionally, the processor 901 is specifically used for:

从所述第三数据包中分离出所述第一压缩包头,得到包括所述IP系列包头的第四数据包;Separating the first compressed packet header from the third data packet to obtain a fourth data packet including the IP series packet header;

通过ROHC实体对所述第四数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第五数据包;Perform compression processing on the IP series header in the fourth data packet by the ROHC entity, to obtain a fifth data packet including the second compressed header;

在所述第五数据包的头部添加所述第一压缩包头,得到包括所述第一压缩包头和所述第二压缩包头的第二数据包。The first compressed packet header is added to the header of the fifth data packet to obtain a second data packet including the first compressed packet header and the second compressed packet header.

可选的,处理器901具体用于:Optionally, the processor 901 is specifically used for:

通过ROHC实体对所述第一数据包中的所述IP系列包头进行压缩处理,得到包括所述以太帧头和所述第二压缩包头的第三数据包;Perform compression processing on the IP series header in the first data packet by the ROHC entity, to obtain a third data packet including the Ethernet frame header and the second compressed header;

通过以太帧压缩实体对所述第三数据包中的所述以太帧头进行压缩处理,得到包括第一压缩包头和第二压缩包头的第二数据包。The Ethernet frame header in the third data packet is compressed by the Ethernet frame compression entity to obtain a second data packet including a first compressed packet header and a second compressed packet header.

可选的,处理器901具体用于:Optionally, the processor 901 is specifically used for:

从所述第一数据包中分离出所述以太帧头,得到包括所述IP系列包头的第四数据包;Separate the Ethernet frame header from the first data packet to obtain a fourth data packet including the IP series packet header;

通过ROHC实体对所述第四数据包中的所述IP系列包头进行压缩处理,得到包括所述第二压缩包头的第五数据包;Perform compression processing on the IP series header in the fourth data packet by the ROHC entity, to obtain a fifth data packet including the second compressed header;

在所述第五数据包的头部添加所述以太帧头,得到包括所述以太帧头和所述第二压缩包头的第三数据包。The Ethernet frame header is added to the header of the fifth data packet to obtain a third data packet including the Ethernet frame header and the second compressed packet header.

可选的,处理器901还用于:Optionally, the processor 901 is further configured to:

在所述第一压缩包头中添加第一指示信息;所述第一指示信息用于指示第一数据流对应的以太帧域组合方式或预设比特流,所述预设比特流用于关联所述第一数据流对应的以太帧域组合,所述第一数据流为具有相同压缩特性的数据包集合。First indication information is added to the first compressed packet header; the first indication information is used to indicate an Ethernet frame domain combination mode or a preset bit stream corresponding to the first data stream, and the preset bit stream is used to associate the An Ethernet frame domain combination corresponding to a first data stream, where the first data stream is a set of data packets with the same compression characteristics.

可选的,所述第一指示信息还用于指示所述第一数据流对应的以太帧头格式。Optionally, the first indication information is further used to indicate an Ethernet frame header format corresponding to the first data stream.

可选的,处理器901还用于:Optionally, the processor 901 is further configured to:

在所述第二数据包中添加第二指示信息,所述第二指示信息用于指示所述第一压缩包头的长度。Adding second indication information to the second data packet, where the second indication information is used to indicate the length of the first compressed packet header.

可选的,处理器901还用于:Optionally, the processor 901 is further configured to:

通过以太帧压缩实体移除所述第一数据包中携带的长度域和填充域中的至少一项。At least one of the length field and the padding field carried in the first data packet is removed by using the Ethernet frame compression entity.

可选的,处理器901还用于以下至少之一:Optionally, the processor 901 is also used for at least one of the following:

在所述第二数据包中添加第三指示信息,所述第三指示信息用于指示所述第一数据包中携带的长度域是否被移除;adding third indication information to the second data packet, where the third indication information is used to indicate whether the length field carried in the first data packet is removed;

在所述第二数据包中添加第四指示信息,所述第四指示信息用于指示所述第一数据包中携带的填充域是否被移除;adding fourth indication information to the second data packet, where the fourth indication information is used to indicate whether the padding field carried in the first data packet is removed;

在所述第二数据包中添加第五指示信息,所述第五指示信息用于指示所述第一数据包中携带的长度域和填充域是否被移除。Fifth indication information is added to the second data packet, where the fifth indication information is used to indicate whether the length field and the padding field carried in the first data packet are removed.

本发明实施例中,发送端至少可对以太帧数据中的以太帧头进行压缩处理,这样,以太帧数据在发送端与接收端之间传输时,所需的传输资源减少,从而能够降低以太帧数据的传输资源开销。In the embodiment of the present invention, the transmitting end can at least compress the Ethernet frame header in the Ethernet frame data. In this way, when the Ethernet frame data is transmitted between the transmitting end and the receiving end, the required transmission resources are reduced, so that the Ethernet frame data can be reduced. Transmission resource overhead of frame data.

在图13中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器901代表的一个或多个处理器和存储器903代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。收发机902可以是多个元件,即包括发送机和接收机,提供用于在传输介质上与各种其他装置通信的单元。针对不同的终端,用户接口904还可以是能够外接内接需要设备的接口,连接的设备包括但不限于小键盘、显示器、扬声器、麦克风、操纵杆等。In FIG. 13, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 901 and various circuits of memory represented by memory 903 linked together. The bus architecture may also link together various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known in the art and, therefore, will not be described further herein. The bus interface provides the interface. Transceiver 902 may be a number of elements, including a transmitter and a receiver, that provide a means for communicating with various other devices over a transmission medium. For different terminals, the user interface 904 may also be an interface capable of externally connecting a required device, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.

处理器901负责管理总线架构和通常的处理,存储器903可以存储处理器901在执行操作时所使用的数据。The processor 901 is responsible for managing the bus architecture and general processing, and the memory 903 may store data used by the processor 901 in performing operations.

需要说明的是,本实施例中上述网络侧设备900可以是本发明实施例中方法实施例中任意实施方式的发送端,也可以是本发明实施例中方法实施例中任意实施方式的接收端,本发明实施例中方法实施例中发送端或接收端的任意实施方式都可以被本实施例中的上述网络侧设备900所实现,以及达到相同的有益效果,此处不再赘述。It should be noted that, in this embodiment, the above-mentioned network-side device 900 may be a sending end of any implementation of the method embodiments in the embodiments of the present invention, or may be a receiving end of any implementation of the method embodiments in the embodiments of the present invention , any implementation of the transmitting end or the receiving end in the method embodiment in the embodiment of the present invention can be implemented by the network side device 900 in this embodiment, and achieve the same beneficial effect, which is not repeated here.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述对应于发送端或者接收端的实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random AccessMemory,简称RAM)、磁碟或者光盘等。Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, each process of the foregoing embodiment corresponding to the sending end or the receiving end is implemented, and can To achieve the same technical effect, in order to avoid repetition, details are not repeated here. The computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present invention.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (32)

1. A data processing method is applied to a sending end, and is characterized in that the method comprises the following steps:
receiving a first data packet, wherein the first data packet comprises an Ethernet frame header and an IP series packet header;
compressing at least the Ethernet frame header in the first data packet to obtain a second data packet, wherein the second data packet at least comprises a first compressed packet header;
and the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.
2. The method of claim 1, wherein compressing at least the ethernet header in the first packet to obtain a second packet comprises one of:
respectively compressing the Ethernet frame header and the IP series packet header to obtain a second data packet comprising the first compressed packet header and a second compressed packet header;
compressing the Ethernet frame header to obtain a second data packet comprising the first compressed packet header and the IP series packet header;
and the second compressed packet header is a compressed packet header obtained by compressing the IP series packet header.
3. The method according to claim 2, wherein compressing the ethernet header and the IP-based packet header respectively to obtain a second packet including the first compressed packet header and a second compressed packet header comprises:
compressing the Ethernet frame header through an Ethernet frame compression entity to obtain a first sub-packet comprising the first compressed packet header;
compressing the IP series packet header through a robustness header compression ROHC entity to obtain a second sub-packet comprising a second compressed packet header;
and combining the first sub data packet and the second sub data packet to obtain a second data packet comprising the first compressed packet header and the second compressed packet header.
4. The method according to claim 3, wherein before the compressing the Ethernet header and the IP-series header, the method further comprises:
separating the first data packet into a third data packet and a fourth data packet, wherein the third data packet comprises the Ethernet header, and the fourth data packet comprises the IP series packet header;
compressing the ethernet header by an ethernet frame compression entity to obtain a first sub-packet including the first compressed header, including:
compressing the ethernet header in the third sub-packet by an ethernet frame compression entity to obtain a first sub-packet including the first compressed header;
compressing the IP series packet header by the ROHC entity to obtain a second sub packet including the second compressed packet header, including:
and compressing the IP series packet header in the fourth sub-packet through an ROHC entity to obtain a second sub-packet comprising the second compressed packet header.
5. The method according to claim 2, wherein compressing the ethernet header and the IP-based packet header respectively to obtain a second packet including the first compressed packet header and a second compressed packet header comprises:
compressing the Ethernet frame header in the first data packet by an Ethernet frame compression entity to obtain a third data packet comprising the first compressed packet header and the IP series packet header;
and compressing the IP series packet header in the third data packet through an ROHC entity to obtain a second data packet comprising the first compressed packet header and the second compressed packet header.
6. The method according to claim 5, wherein compressing the IP-based packet header in the third data packet by an ROHC entity to obtain a second data packet including the first compressed packet header and the second compressed packet header comprises:
separating the first compressed packet header from the third data packet to obtain a fourth data packet including the IP series packet header;
compressing the IP series packet header in the fourth data packet through an ROHC entity to obtain a fifth data packet comprising the second compressed packet header;
and adding the first compressed packet header to the header of the fifth data packet to obtain a second data packet comprising the first compressed packet header and the second compressed packet header.
7. The method according to claim 2, wherein compressing the ethernet header and the IP-based packet header respectively to obtain a second packet including the first compressed packet header and a second compressed packet header comprises:
compressing the IP series packet header in the first data packet through an ROHC entity to obtain a third data packet comprising the Ethernet header and the second compressed packet header;
and compressing the Ethernet frame header in the third data packet through an Ethernet frame compression entity to obtain a second data packet comprising a first compressed packet header and a second compressed packet header.
8. The method according to claim 7, wherein compressing the IP-based header of the first packet by an ROHC entity to obtain a third packet including the ethernet header and the second compressed header comprises:
separating the Ethernet frame header from the first data packet to obtain a fourth data packet comprising the IP series packet header;
compressing the IP series packet header in the fourth data packet through an ROHC entity to obtain a fifth data packet comprising the second compressed packet header;
and adding the Ethernet frame header to the head of the fifth data packet to obtain a third data packet comprising the Ethernet frame header and the second compressed packet header.
9. The method according to any one of claims 1 to 8, further comprising:
adding first indication information in the first compressed packet header; the first indication information is used to indicate an ethernet frame domain combination mode or a preset bit stream corresponding to a first data stream, where the preset bit stream is used to associate the ethernet frame domain combination corresponding to the first data stream, and the first data stream is a data packet set with the same compression characteristic.
10. The method of claim 9, wherein the first indication information is further used for indicating an ethernet frame header format corresponding to the first data stream.
11. The method according to any one of claims 1 to 8, further comprising:
and adding second indication information in the second data packet, wherein the second indication information is used for indicating the length of the first compressed packet header.
12. The method according to any one of claims 1 to 8, further comprising:
removing at least one of a length field and a padding field carried in the first packet by an Ethernet frame compression entity.
13. The method according to any one of claims 1 to 8, further comprising at least one of:
adding third indication information in the second data packet, wherein the third indication information is used for indicating whether a length field carried in the first data packet is removed or not;
adding fourth indication information in the second data packet, wherein the fourth indication information is used for indicating whether the padding field carried in the first data packet is removed or not;
and adding fifth indication information in the second data packet, wherein the fifth indication information is used for indicating whether the length field and the padding field carried in the first data packet are removed or not.
14. A data processing method is applied to a receiving end, and is characterized by comprising the following steps:
receiving a first data packet, wherein the first data packet at least comprises a first compressed packet header;
decompressing the compressed packet header in the first data packet to obtain a second data packet comprising an Ethernet frame header and an IP series packet header;
the first compressed packet header is obtained by compressing an ethernet header.
15. The method according to claim 14, wherein the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing an IP-series packet header;
decompressing the compressed packet header in the first data packet to obtain a second data packet including an ethernet header and an IP-series packet header, including:
decompressing the first compressed packet header through an ethernet frame decompressing entity to obtain a first sub packet including an ethernet frame header;
decompressing the second compressed packet header through a robust header compression ROHC decompression entity to obtain a second sub packet including an IP series packet header;
and combining the first sub data packet and the second sub data packet to obtain a second data packet comprising the Ethernet header and the IP series header.
16. The method of claim 15, wherein before decompressing the first compressed packet header and the second compressed packet header, the method further comprises:
separating the first data packet into a third sub data packet and a fourth sub data packet, wherein the third sub data packet comprises the first compressed packet header, and the fourth sub data packet comprises the second compressed packet header;
decompressing the first compressed packet header by an ethernet frame decompressing entity to obtain a first sub packet including the ethernet frame header, including:
decompressing the first compressed packet header in the third sub packet by an ethernet frame decompressing entity to obtain a first sub packet including an ethernet frame header;
decompressing the second compressed packet header by an ROHC decompressing entity to obtain a second sub packet including an IP series packet header, including:
decompressing the second compressed packet header in the fourth sub packet by an ROHC decompressing entity to obtain a second sub packet including an IP series packet header.
17. The method according to claim 14, wherein the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing an IP-series packet header;
decompressing the compressed packet header in the first data packet to obtain a second data packet including an ethernet header and an IP-series packet header, including:
decompressing the second compressed packet header in the first data packet by an ROHC decompressing entity to obtain a third data packet including the first compressed packet header and an IP-series packet header;
and decompressing the first compressed packet header in the third data packet by an ethernet frame decompressing entity to obtain a second data packet comprising the ethernet frame header and the IP series packet header.
18. The method according to claim 17, wherein decompressing, by an ROHC decompression entity, the second compressed packet header in the first packet to obtain a third packet including the first compressed packet header and an IP-series packet header, comprises:
separating the first compressed packet header from the first data packet to obtain a fourth data packet including the second compressed packet header;
decompressing the second compressed packet header in the fourth data packet by an ROHC decompressing entity to obtain a fifth data packet including an IP series packet header;
and adding the first compressed packet header to the header of the fifth data packet to obtain a third data packet comprising the first compressed packet header and the IP series packet header.
19. The method according to claim 14, wherein the first data packet further includes a second compressed packet header, and the second compressed packet header is a compressed packet header obtained by compressing an IP-series packet header;
decompressing the compressed packet header in the first data packet to obtain a second data packet including an ethernet header and an IP-series packet header, including:
decompressing the first compressed packet header in the first data packet by an ethernet frame decompressing entity to obtain a third data packet including an ethernet frame header and the second compressed packet header;
and decompressing the second compressed packet header in the third data packet by an ROHC decompression entity to obtain a second data packet comprising the Ethernet header and the IP series packet header.
20. The method according to claim 19, wherein decompressing, by an ROHC decompression entity, the second compressed packet header in the third packet to obtain a second packet including the ethernet header and an IP-series packet header, comprises:
separating the ethernet header from the third data packet to obtain a fourth data packet including the second compressed packet header;
decompressing the second compressed packet header in the fourth data packet by an ROHC decompressing entity to obtain a fifth data packet including an IP series packet header;
and adding the Ethernet frame header to the header of the fifth data packet to obtain a second data packet comprising the Ethernet frame header and the IP series packet header.
21. The method of any one of claims 14 to 20, wherein the first data packet comprises a first compressed packet header;
before decompressing the first compressed packet header, the method further includes:
determining the length of the first compressed packet header;
and determining the first compressed packet header in the first data packet according to the length of the first compressed packet header.
22. The method of claim 21, wherein the length of the first compressed packet header is determined by at least one of:
first indication information carried in the first data packet, wherein the first indication information is used for indicating the length of the first compressed packet header;
a length of a first compressed packet header corresponding to an Ethernet frame header format of the first packet based on protocol conventions.
23. The method according to any one of claims 14 to 20, wherein the first compressed packet header carries second indication information, the second indication information is used to indicate an ethernet frame domain combination mode or a preset bit stream corresponding to a first data stream, the preset bit stream is used to associate the ethernet frame domain combination corresponding to the first data stream, and the first data stream is a set of data packets with the same compression characteristic.
24. The method of claim 23, wherein the second indication information is further used for indicating an ethernet frame header format corresponding to the first data stream.
25. The method of claim 23, wherein after decompressing the compressed header of the first packet, the method further comprises:
determining whether a length field needs to be added in the second data packet according to the second indication information;
if yes, adding the length field at a specific position of the second data packet through an Ethernet frame decompression entity;
wherein the specific location is determined based on the second indication information.
26. The method according to any one of claims 14 to 20, wherein after decompressing the compressed header in the first data packet, the method further comprises:
determining whether a length field needs to be added in the second data packet according to third indication information carried in the first data packet;
if yes, adding the length field at a specific position of the second data packet through an Ethernet frame decompression entity;
wherein the third indication information is used to indicate whether the length field is removed from the first packet before compression.
27. The method according to any one of claims 14 to 20, wherein after decompressing the compressed header in the first data packet, the method further comprises:
determining whether a padding field needs to be added in the second data packet according to a minimum Ethernet frame size agreed by a protocol or according to fourth indication information carried in the first data packet;
if yes, adding a filling domain at the tail part of the second data packet through an Ethernet frame decompression entity;
wherein the fourth indication information is used to indicate whether the padding field is removed from the first packet before compression.
28. A transmitting end, comprising:
a receiving module, configured to receive a first data packet, where the first data packet includes an ethernet header and an IP-series header;
a compressing module, configured to compress at least the ethernet header in the first data packet to obtain a second data packet, where the second data packet at least includes a first compressed packet header;
and the first compressed packet header is a compressed packet header obtained by compressing the Ethernet frame header.
29. A receiving end, comprising:
a receiving module, configured to receive a first data packet, where the first data packet at least includes a first compressed packet header;
a decompression module, configured to decompress the compressed packet header in the first data packet to obtain a second data packet including an ethernet frame header and an IP-series packet header;
the first compressed packet header is obtained by compressing an ethernet header.
30. A transmitting end, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps in the data processing method according to any one of claims 1 to 13.
31. A receiving end, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps in the data processing method according to any one of claims 14 to 27.
32. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps in the data processing method according to any one of claims 1 to 13; or implementing steps in a data processing method according to any of claims 14 to 27.
CN201910606119.6A 2019-07-05 2019-07-05 Data processing method, sending end and receiving end Active CN111800371B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910606119.6A CN111800371B (en) 2019-07-05 2019-07-05 Data processing method, sending end and receiving end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910606119.6A CN111800371B (en) 2019-07-05 2019-07-05 Data processing method, sending end and receiving end

Publications (2)

Publication Number Publication Date
CN111800371A true CN111800371A (en) 2020-10-20
CN111800371B CN111800371B (en) 2022-10-28

Family

ID=72805766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910606119.6A Active CN111800371B (en) 2019-07-05 2019-07-05 Data processing method, sending end and receiving end

Country Status (1)

Country Link
CN (1) CN111800371B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002030043A2 (en) * 2000-10-03 2002-04-11 Telefonaktiebolaget Lm Ericsson (Publ) Context identification using header compression key
US20030005001A1 (en) * 2001-06-28 2003-01-02 International Business Machines Corporation Data processing method, and encoder, decoder and XML parser for encoding and decoding an XML document
CN101184030A (en) * 2007-11-06 2008-05-21 浙江工业大学 Ethernet Interface Driver Based on FPGA
CN103369593A (en) * 2012-04-05 2013-10-23 中兴通讯股份有限公司 Method for compressing and decompressing Ethernet message and network element equipment
CN104079488A (en) * 2014-07-22 2014-10-01 武汉虹信通信技术有限责任公司 Ethernet two-layer head compression based transmission device and method
US20140369365A1 (en) * 2013-06-14 2014-12-18 Texas Instruments Incorporated Header Compression for Wireless Backhaul Systems
WO2016191990A1 (en) * 2015-05-30 2016-12-08 华为技术有限公司 Packet conversion method and device
CN108632901A (en) * 2017-03-24 2018-10-09 维沃移动通信有限公司 A kind of data transmission method and terminal
US20190116521A1 (en) * 2017-10-16 2019-04-18 Weihua QIAO Header Compression for Ethernet Frame

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002030043A2 (en) * 2000-10-03 2002-04-11 Telefonaktiebolaget Lm Ericsson (Publ) Context identification using header compression key
US20030005001A1 (en) * 2001-06-28 2003-01-02 International Business Machines Corporation Data processing method, and encoder, decoder and XML parser for encoding and decoding an XML document
CN101184030A (en) * 2007-11-06 2008-05-21 浙江工业大学 Ethernet Interface Driver Based on FPGA
CN103369593A (en) * 2012-04-05 2013-10-23 中兴通讯股份有限公司 Method for compressing and decompressing Ethernet message and network element equipment
US20140369365A1 (en) * 2013-06-14 2014-12-18 Texas Instruments Incorporated Header Compression for Wireless Backhaul Systems
CN104079488A (en) * 2014-07-22 2014-10-01 武汉虹信通信技术有限责任公司 Ethernet two-layer head compression based transmission device and method
WO2016191990A1 (en) * 2015-05-30 2016-12-08 华为技术有限公司 Packet conversion method and device
CN108632901A (en) * 2017-03-24 2018-10-09 维沃移动通信有限公司 A kind of data transmission method and terminal
US20190116521A1 (en) * 2017-10-16 2019-04-18 Weihua QIAO Header Compression for Ethernet Frame

Also Published As

Publication number Publication date
CN111800371B (en) 2022-10-28

Similar Documents

Publication Publication Date Title
CN112423076B (en) Audio screen-throwing synchronous control method, equipment and computer readable storage medium
CN110475340A (en) DCI transmission method, terminal and base station
US12224792B2 (en) Audio transmission method and electronic device
CN111836280A (en) A data transmission method and terminal
CN111182580B (en) Service transmission method, terminal and network side equipment
CN111278090A (en) Transmission method of indication signal, terminal and network equipment
CN110621071B (en) Processing method of measurement interval, terminal and network node
CN110324851B (en) A receiving method and communication device
CN110311751A (en) A kind of sending method and terminal of data
JP7170119B2 (en) Random access method, terminal device and network device
US11622296B2 (en) Data sending method and receiving method and user equipment
CN107682360B (en) A method for processing a voice call and a mobile terminal
CN110034873B (en) Reconfiguration method, terminal and base station
CN111800826B (en) ROHC feedback processing method and user equipment
KR102557147B1 (en) Data transmission method and terminal device
CN110505279A (en) The method and apparatus of delay is set
CN110475303A (en) A data transmission method and terminal equipment
CN108259808A (en) A kind of video frame compression method and mobile terminal
CN110290559B (en) Data transmission method and terminal
CN111800371B (en) Data processing method, sending end and receiving end
CN109005377B (en) A video processing method and terminal device
CN110971357B (en) Information indication method, indication receiving method, terminal and network side device
CN110831250B (en) A processing method and terminal
CN111800372A (en) Data transmission method and device
CN109981218A (en) Data transmission method and communication equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant