Ethernet header compression method and device, storage medium and user equipment

By monitoring the number of EHC contexts and calculating the compression gain, Ethernet header compression resources are reasonably allocated, solving the problem of limited EHC contexts in user devices and improving Ethernet transmission efficiency.

CN114205872BActive Publication Date: 2025-10-24SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010872656.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-26
Publication Date
2025-10-24
Estimated Expiration
2040-08-26

AI Technical Summary

Technical Problem

In the prior art, the number of EHC contexts of user equipment is limited. When there are a large number of Ethernet flows, the contexts are easily exhausted or used inefficiently, resulting in low transmission efficiency.

Method used

By judging the number of remaining EHC contexts, it is determined whether to perform Ethernet header compression on the new Ethernet flow, including calculating the compression gain and selectively releasing inefficient contexts to reasonably allocate context resources.

Benefits of technology

Improves the efficiency of EHC context usage and Ethernet transmission efficiency, ensuring that Ethernet flows with large data volumes or large header overheads can be given priority for header compression, reducing the amount of transmitted data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114205872B_ABST
    Figure CN114205872B_ABST
Patent Text Reader

Abstract

An Ethernet header compression method and device, a storage medium and user equipment are provided. The Ethernet header compression method comprises the following steps: when a new Ethernet flow needs to be transmitted, determining the number of remaining EHC contexts, and the Ethernet header of the new Ethernet flow is inconsistent with the Ethernet header of the saved EHC context; and determining whether to perform Ethernet header compression on the new Ethernet flow according to at least the number of the remaining EHC contexts. The technical scheme can ensure the reasonable use of the EHC context by the user equipment in the uplink Ethernet header compression, and improve the transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and particularly relates to an Ethernet header compression method and device, a storage medium and user equipment. BACKGROUND

[0002] The third generation partnership project (3GPP) release 16 (R16) introduces Ethernet header compression (EHC). The transmission of Ethernet frames is supported in both 4th generation mobile networks or 4th generation wireless systems (4G) and 5th generation mobile networks or 5th generation wireless systems (5G) systems. EHC is a method to reduce the overhead caused by the transmission of Ethernet headers. EHC is introduced in both long term evolution (LTE) and new radio (NR) systems. EHC is mainly defined in packet data convergence protocol (PDCP). EHC is configured per data radio bearer (DRB) and is configured separately for uplink and downlink.

[0003] 3GPP TS 38.323 introduces the principle of EHC. The compressed fields are: DESTINATION ADDRESS, SOURCE ADDRESS, 802.1Q TAG and LENGTH / TYPE. The EHC compressor and EHC decompressor store the original header field information as an EHC context. Each EHC context is identified by a unique identifier, called context ID (CID). The EHC context must be synchronized between the compressor and the decompressor.

[0004] For an Ethernet packet stream, the compressor establishes an EHC context and associates it with a CID. Then, the compressor sends a full header (FH) packet containing the CID to the decompressor. The compressor continues to send FH packets until it receives an EHC feedback from the decompressor. If the maximum number of EHC contexts has been established, and a new Ethernet stream does not match any of the established EHC contexts, the compressor should either associate (override) the new Ethernet stream with one of the allocated EHC CIDs, or send the new Ethernet stream as an uncompressed packet. When the decompressor receives a FH packet, the decompressor establishes an EHC context and sends an EHC feedback to the compressor to indicate that the EHC context is successfully established in the decompressor. After receiving the EHC feedback, the compressor starts to send compressed header (CH) packets to the decompressor, including the associated CID. The CH packet does not contain the header fields stored in the EHC context. When receiving a CH packet, the decompressor recovers the original header fields based on the EHC context identified by the associated CID.

[0005] However, the memory resource of the UE is limited, so is the number of EHC contexts. According to the prior art, for uplink EHC, if the header compression is performed for each stream without judgment when the number of Ethernet streams is large, the EHC contexts can be used up. Then, if the header compression is not performed for a new stream, the EHC contexts can be used inefficiently, for example, almost all of the EHC contexts are used for Ethernet streams with small traffic, and Ethernet streams with large data volume (or large header overhead) cannot perform header compression due to lack of EHC contexts. If the header compression is performed for the new stream to override the existing EHC context, the EHC context can be repeatedly overridden, or the EHC context is used for an Ethernet stream with small header compression gain, and the transmission efficiency is low. SUMMARY

[0006] The technical problem solved by the present application is how to ensure the reasonable use of the EHC context by the user equipment in the uplink Ethernet header compression and improve the transmission efficiency.

[0007] To solve the above technical problem, an Ethernet header compression method is provided in an embodiment of the present application. The Ethernet header compression method comprises: when a new Ethernet stream needs to be sent, judging the number of remaining EHC contexts, and the Ethernet header of the new Ethernet stream being inconsistent with the Ethernet header of the saved EHC context; and determining whether to perform Ethernet header compression on the new Ethernet stream according to at least the number of the remaining EHC contexts.

[0008] Optionally, the determining whether to perform the Ethernet header compression on the new Ethernet flow according to the current remaining number of EHC contexts comprises: if the current remaining number of EHC contexts is higher than a preset threshold, creating an EHC context of the new Ethernet flow and performing an Ethernet header compression process for the new Ethernet flow.

[0009] Optionally, the determining whether to perform the Ethernet header compression on the new Ethernet flow according to the current remaining number of EHC contexts comprises: if the current remaining number of EHC contexts is lower than a preset threshold, calculating a compression gain of the new Ethernet flow, the compression gain representing transmission resources saved by performing compression on the new Ethernet flow; and determining whether to perform the Ethernet header compression on the new Ethernet flow according to the compression gain.

[0010] Optionally, the determining whether to perform the Ethernet header compression on the new Ethernet flow according to the compression gain comprises: if the current remaining number of EHC contexts is greater than 0 and the compression gain is higher than a first preset threshold, creating an EHC context of the new Ethernet flow and performing an Ethernet header compression process for the new Ethernet flow.

[0011] Optionally, the calculating the compression gain of the new Ethernet flow comprises: determining a number of data packets transmitted by the new Ethernet flow in a preset time period and a size of an Ethernet header of each data packet; and calculating a product of the number of data packets and the size of the Ethernet header as the compression gain.

[0012] Optionally, the determining whether to perform the Ethernet header compression on the new Ethernet flow according to the compression gain comprises: if the current remaining number of EHC contexts is 0 and the compression gain is higher than a first preset threshold, determining compression gains corresponding to the saved EHC contexts, selecting a first EHC context with a compression gain lower than a second preset threshold to release, creating an EHC context of the new Ethernet flow, and performing an Ethernet header compression process for the new Ethernet flow.

[0013] Optionally, the selecting the first EHC context with the compression gain lower than the second preset threshold to release comprises: selecting a first EHC context with a compression gain lower than a second preset threshold; and judging a creation time of the first EHC context, and releasing the first EHC context if the creation time is greater than a preset time length.

[0014] Optionally, the determining whether to perform the Ethernet header compression on the new Ethernet flow according to the current remaining EHC context quantity further comprises: determining whether an EHC context of the new Ethernet flow is released within a preset time length before the current time; and if not, determining whether to perform the Ethernet header compression on the new Ethernet flow according to the current remaining EHC context quantity.

[0015] Optionally, the determining the current remaining EHC context quantity further comprises: releasing a second EHC context if there is no corresponding Ethernet packet transmitted within a preset time length; or determining a compression gain corresponding to the saved EHC context, and releasing a third EHC context if the compression gain corresponding to the third EHC context is lower than a third preset threshold.

[0016] To solve the above technical problems, the embodiment of the present application further discloses an Ethernet header compression device, which comprises: a quantity determining module configured to determine a current remaining EHC context quantity when a new Ethernet flow needs to be transmitted, the Ethernet header of the new Ethernet flow being inconsistent with the Ethernet header of a saved EHC context; and a compression determining module configured to determine whether to perform Ethernet header compression on the new Ethernet flow according to the current remaining EHC context quantity.

[0017] The embodiment of the present application further discloses a storage medium having a computer program stored thereon, the computer program being executed by a processor to perform the steps of the Ethernet header compression method.

[0018] The embodiment of the present application further discloses a user equipment comprising a memory and a processor, the memory having a computer program stored thereon and executable on the processor, the processor being executed to perform the steps of the Ethernet header compression method.

[0019] Compared with the prior art, the technical scheme of the embodiment of the present application has the following beneficial effects:

[0020] In the technical scheme of the present application, when a new Ethernet flow needs to be transmitted, the current remaining EHC context quantity is determined, the Ethernet header of the new Ethernet flow being inconsistent with the Ethernet header of a saved EHC context; and whether to perform Ethernet header compression on the new Ethernet flow is determined according to the current remaining EHC context quantity. In the technical scheme of the present application, whether to perform Ethernet header compression on the new Ethernet flow is determined according to the current remaining context data, which can ensure that the EHC context is reasonably used and improve the Ethernet transmission efficiency.

[0021] Further, if the current remaining EHC context quantity is lower than a preset threshold, a compression gain of the new Ethernet flow is calculated, the compression gain representing transmission resources saved by compressing the new Ethernet flow; and it is determined whether to compress the new Ethernet flow according to the compression gain. In the technical scheme, when the current remaining EHC context quantity is not large, the compression gain of the new Ethernet flow is used to selectively compress the Ethernet header, so that the Ethernet flow with large data quantity (or large header overhead) can be preferentially compressed, the transmission data quantity is greatly reduced relative to the data quantity before the Ethernet header compression, and the use efficiency of the EHC context and the Ethernet transmission efficiency are improved.

[0022] Further, if the current remaining EHC context quantity is 0, a compression gain corresponding to the saved EHC context is determined, a first EHC context with a compression gain lower than a second preset threshold is selected for release; an EHC context of the new Ethernet flow is created, and an Ethernet header compression process for the new Ethernet flow is performed. In the technical scheme, by selecting the first EHC context with the compression gain lower than the second preset threshold for release, it can be ensured that the EHC context can be used for the Ethernet flow with large header compression gain, and the transmission efficiency is improved.

[0023] Further, the first EHC context with the compression gain lower than the second preset threshold is selected; and it is determined whether a creation time of the first EHC context is greater than a preset time length, and if the creation time is greater than the preset time length, the first EHC context is released. In the technical scheme, the EHC context with the creation time less than the preset time length will not be released, so that the context repeatedly covering situation can be avoided, and the use efficiency of the context is further improved. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 is a flowchart of an Ethernet header compression method according to an embodiment of the present application;

[0025] Figure 2 is a flowchart of a specific implementation of step S102 shown in Figure 1

[0026] Figure 3 is a flowchart of a specific implementation of step S202 shown in Figure 2

[0027] Figure 4 is a structural schematic diagram of an Ethernet header compression device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] ​​As described in the background, according to the prior art, for uplink EHC, if the number of Ethernet flows is large, and if header compression is performed for each flow without judgment, the context can be used up. Then, if header compression is not performed for a new flow, the EHC context can be used inefficiently, for example, almost all of the context is used for an Ethernet flow with small traffic, and an Ethernet flow with large data volume (or large header overhead) cannot perform header compression due to lack of context. If header compression is performed for the new flow to cover the existing context, the context can be repeatedly covered, or the context can be used for an Ethernet flow with small header compression gain, and the transmission efficiency is low.

[0029] In the technical solution of the present application, whether to perform Ethernet header compression for a new Ethernet flow is determined based on the current remaining context data, so that the EHC context can be used reasonably, and the Ethernet transmission efficiency is improved.

[0030] Further, if the number of the current remaining EHC contexts is lower than a preset threshold, a compression gain of the new Ethernet flow is calculated, the compression gain representing transmission resources saved by performing compression on the new Ethernet flow; and whether to perform Ethernet header compression on the new Ethernet flow is determined according to the compression gain. In the technical solution of the present application, when the number of the current remaining EHC contexts is not large, the new Ethernet flow is selectively compressed by header compression, so that an Ethernet flow with large data volume (or large header overhead) can be preferentially compressed, the transmission data volume is greatly reduced relative to the data volume before the Ethernet header compression, and the use efficiency of the EHC context and the Ethernet transmission efficiency are improved.

[0031] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0032] Figure 1 is a flowchart of an Ethernet header compression method according to an embodiment of the present application.

[0033] The Ethernet header compression method according to the embodiment of the present application can be used in a user equipment side, and the user equipment can perform transmission of an Ethernet flow. The user equipment includes, but is not limited to, a terminal device such as a mobile phone, a computer, a tablet computer, etc. The Ethernet flow according to the embodiment of the present application can include a plurality of Ethernet data packets, and the Ethernet headers of the data packets in the Ethernet flow are consistent.

[0034] The Ethernet header compression method can specifically include the following steps:

[0035] Step S101: When there is a new Ethernet flow to be transmitted, it is determined whether the number of currently remaining EHC contexts is greater than a preset threshold.

[0036] Step S102: It is determined whether to perform Ethernet header compression on the new Ethernet flow according to the number of currently remaining EHC contexts.

[0037] It should be noted that the sequence numbers of the steps in the embodiment do not represent a limitation on the execution sequence of the steps.

[0038] Since the number of EHC contexts in the user equipment is limited, the use of the EHC contexts needs to be monitored to ensure that the EHC contexts are used efficiently.

[0039] In the embodiment, for an Ethernet flow to be transmitted, the user equipment first matches the Ethernet header of the Ethernet flow to be transmitted with the saved EHC contexts. If the Ethernet header of the Ethernet flow to be transmitted can be matched to the saved EHC contexts, it is determined that the Ethernet flow to be transmitted is not a new Ethernet flow, and a new EHC context does not need to be created. The existing EHC context is used to perform header compression. Otherwise, it is determined that the Ethernet flow to be transmitted is a new Ethernet flow, and steps S101 to S102 are continued. In a specific implementation, the user equipment can determine the number of currently remaining EHC contexts to determine whether to perform Ethernet header compression on the new Ethernet flow.

[0040] The Ethernet header compression referred to in the embodiment is to create an EHC context and perform an Ethernet header compression process. For a specific implementation of performing the Ethernet header compression process, reference can be made to the prior art, and the embodiment will not be described here.

[0041] In one non-limiting embodiment, Figure 1 The step S102 can specifically include the following steps: if the number of currently remaining EHC contexts is greater than the preset threshold, an EHC context of the new Ethernet flow is created, and an Ethernet header compression process for the new Ethernet flow is performed.

[0042] In the embodiment, the number of currently remaining EHC contexts being greater than the preset threshold indicates that the currently idle contexts are relatively sufficient, and the Ethernet header compression is performed on the new Ethernet flow.

[0043] It should be noted that the specific value of the preset threshold can be adaptively configured according to the actual application environment, and the embodiment does not limit this.

[0044] In another non-limiting embodiment, please refer to Figure 2 , Figure 1The step S102 can specifically include the following steps:

[0045] Step S201: If the current remaining EHC context quantity is lower than a preset threshold, calculate a compression gain of the new Ethernet flow, the compression gain representing transmission resources saved by compressing the new Ethernet flow.

[0046] Step S202: Determine whether to perform Ethernet header compression on the new Ethernet flow according to the compression gain.

[0047] The current remaining EHC context quantity being lower than a preset threshold indicates that the current idle context is insufficient, and the new Ethernet flow needs to be selectively compressed. In this embodiment, the compression gain of the new Ethernet flow is calculated to represent the transmission resources saved by compressing the new Ethernet flow. And the new Ethernet flow is selectively compressed according to the size of the compression gain.

[0048] Further, if the current remaining EHC context quantity is greater than 0 and the compression gain is higher than a first preset threshold, an EHC context of the new Ethernet flow is created, and an Ethernet header compression process for the new Ethernet flow is performed.

[0049] Specifically, the judgment of the compression gain can consider the frequency of data packets in the Ethernet flow (such as the number of packets per second), the size of the data packets, the size of the Ethernet header, and the like. When the compression gain brought by the header compression is large, the Ethernet flow is compressed. Otherwise, the Ethernet flow is not allocated a context and is not compressed.

[0050] Further, Figure 2 The step S201 can include the following steps: determining the number of data packets transmitted by the new Ethernet flow in a preset time period and the size of the Ethernet header of each data packet; and calculating the product of the number of data packets and the size of the Ethernet header as the compression gain.

[0051] In a specific implementation, the user equipment can perform a period of statistics on the new data flow to determine the number of data packets transmitted by the new Ethernet flow in a preset time period and the size of the Ethernet header of each data packet.

[0052] Alternatively, the user equipment can also predict the number of data packets transmitted by the Ethernet flow in a preset time period and the size of the Ethernet header of each data packet, so as to calculate the compression gain when the first data packet of the Ethernet flow is received. Specifically, the user equipment can use a pre-trained neural network model to predict the data amount of the Ethernet flow, and the training data of the neural network model can be a large number of Ethernet flows.

[0053] For example, if an Ethernet flow has 50 packets per second, and each packet has an Ethernet header of 18 bytes, then the compression gain of the Ethernet flow can be calculated as 900 bytes, i.e. the transmission is reduced by about 900 bytes per second after Ethernet header compression.

[0054] In one specific example, a user equipment performs data statistics on an uplink Ethernet flow, including the time distribution of the packets of the Ethernet flow, the size of the packets, and the size of the Ethernet header. Assume that the user equipment has 10 contexts in total, and initially all of the contexts are idle. A threshold of the number of contexts (i.e. a preset threshold) is set as 4. When the number of remaining EHC contexts is greater than or equal to 4, it is considered that the contexts are sufficient. In this case, for a new Ethernet flow, a context is allocated, and header compression is performed. If the number of idle contexts decreases to less than 4, then for a new Ethernet flow, it is necessary to determine whether it is worth creating a context. The user equipment can calculate the compression gain of the new Ethernet flow as 900 bytes per second according to the statistical data of the new Ethernet flow. Assume that when the contexts are insufficient, it is required that the transmission is reduced by more than 500 bytes per second (i.e. a first preset threshold) to perform header compression, then the user equipment creates a context for the Ethernet flow to perform header compression.

[0055] In one non-limiting embodiment of the present application, Figure 2 The step S202 can specifically include the following steps:

[0056] Step S301: If the number of remaining EHC contexts is 0 and the compression gain is higher than a first preset threshold, the compression gain corresponding to the saved EHC context is determined, and a first EHC context with a compression gain lower than a second preset threshold is selected for release.

[0057] Step S302: An EHC context of the new Ethernet flow is created, and an Ethernet header compression process for the new Ethernet flow is performed.

[0058] The number of remaining EHC contexts being 0 indicates that the EHC contexts of the user equipment have been used up. If Ethernet header compression is performed on a new Ethernet flow, the saved EHC context needs to be released, and the new Ethernet flow is associated with (i.e. covered by) one of the allocated EHC CIDs.

[0059] In the embodiment, when selecting the EHC context to be released, the first EHC context with the compression gain lower than the second preset threshold is selected. That is, when the contexts of the user equipment have been allocated, if there is a new uplink Ethernet flow, the UE needs to determine how to handle. The basis for the determination is the compression gain brought by the header compression of the new Ethernet flow. If the compression gain is large (i.e. higher than the first preset threshold), the Ethernet flow is subjected to header compression. Since the contexts have been allocated, the user equipment selects an existing context to be overwritten. The selection criterion is the context with a lower compression gain (i.e. lower than the second preset threshold). After the user equipment selects the context to be overwritten, the context is initialized and used to store the Ethernet header of the new Ethernet flow.

[0060] In a specific example, the user equipment performs data statistics on the uplink Ethernet flow. When the contexts of the user equipment have been allocated and there is one or more Ethernet flows without allocated contexts, the user equipment calculates the Ethernet header compression gain of each Ethernet flow (including the Ethernet flow with allocated context and the Ethernet flow without allocated context) according to the statistical data. The basis for the calculation is the product of the number of data packets of each flow in a period of time (e.g. 5 seconds) and the Ethernet header size. This reflects the header compression gain of the Ethernet flow. Among the Ethernet flows with allocated contexts, the Ethernet flow with smaller header compression gain is selected, and the context is released. Among the Ethernet flows without allocated contexts, the flow with larger header compression gain is selected, and the UE allocates a context for the flow.

[0061] Further, Figure 3 The step S301 specifically can include the following steps: selecting the first EHC context with the compression gain lower than the second preset threshold; determining the creation time of the first EHC context, and if the creation time is greater than a preset time length, releasing the first EHC context.

[0062] In the embodiment, by setting the preset time length, repeated allocation and release of the context for the same Ethernet flow can be avoided.

[0063] Further, Figure 1 The step S102 specifically can include the following steps: determining whether the EHC context of the new Ethernet flow has been released within a preset time length before the current time; if not, determining to perform Ethernet header compression on the new Ethernet flow according to at least the current number of remaining EHC contexts. Or, if yes, not performing Ethernet header compression on the new Ethernet flow.

[0064] In the embodiment, to avoid repeatedly allocating and releasing contexts for the same Ethernet flow, when judging whether to compress the Ethernet header of the Ethernet flow, if the EHC context is released within a preset time length before the current time, the Ethernet header is not compressed again, that is, the context is not created for the Ethernet flow.

[0065] In a non-restrictive embodiment of the present application, Figure 1 Before the step S101, the method can further include the following steps: if there is a second EHC context in the saved EHC contexts without any corresponding Ethernet packet within a preset time length, releasing the second EHC context; or determining the compression gain corresponding to the saved EHC contexts, and if the compression gain corresponding to a third EHC context is lower than a third preset threshold, releasing the third EHC context.

[0066] In the embodiment, if the allocated EHC context is not used for a long time, that is, no corresponding Ethernet packet is sent within a preset time length, the user equipment releases the context.

[0067] Or, the gain brought by the saved EHC context is relatively low, that is, the compression gain is lower than a third preset threshold, the user equipment releases the context.

[0068] Different from the foregoing embodiments, in the embodiment of the present application, the user equipment actively monitors the saved EHC context, that is, selectively actively releases the saved EHC context, to improve the efficiency of subsequent Ethernet header compression.

[0069] Please refer to Figure 4 The embodiment of the present application further discloses an Ethernet header compression device 40, which can include a quantity judging module 401 and a compression judging module 402.

[0070] The quantity judging module 401 is configured to judge the number of the remaining EHC contexts when there is a new Ethernet flow to be sent, the Ethernet header of the new Ethernet flow is inconsistent with the Ethernet header of the saved EHC context; and the compression judging module 402 is configured to determine whether to compress the Ethernet header of the new Ethernet flow according to at least the number of the remaining EHC contexts.

[0071] In the embodiment of the present application, the number of the remaining contexts is used to determine whether to compress the Ethernet header of the new Ethernet flow, which can ensure that the EHC context is reasonably used and improve the Ethernet transmission efficiency.

[0072] Further, the compression judging module 402 can comprise: a compression gain calculating unit (not shown in the figure) configured to calculate a compression gain of the new Ethernet flow if the current remaining EHC context quantity is lower than a preset threshold, the compression gain representing transmission resources saved by compressing the new Ethernet flow; and a first judging unit (not shown in the figure) configured to determine whether to perform Ethernet header compression on the new Ethernet flow according to the compression gain.

[0073] In the embodiment of the present application, when the current remaining EHC context quantity is not large, the Ethernet header compression is selectively performed according to the compression gain of the new Ethernet flow, so that the Ethernet flow with large data quantity (or large header overhead) can be preferentially compressed, the data quantity is greatly reduced after the Ethernet header compression, and the use efficiency of the EHC context and the Ethernet transmission efficiency are improved.

[0074] Further, the compression judging module 402 can comprise: a second judging unit (not shown in the figure) configured to create an EHC context of the new Ethernet flow and perform an Ethernet header compression process for the new Ethernet flow if the current remaining EHC context quantity is greater than 0 and the compression gain is higher than a first preset threshold.

[0075] In the embodiment of the present application, the first EHC context with the compression gain lower than the second preset threshold is released, so that the EHC context can be used for the Ethernet flow with large header compression gain, and the transmission efficiency is improved.

[0076] For more details about the working principle and working mode of the Ethernet header compression device 40, refer to the related description in Figures 1 to 3 , which will not be described here.

[0077] The embodiment of the present application also discloses a storage medium, which is a computer readable storage medium, and has a computer program stored thereon, the computer program can execute the steps of the method shown in Figures 1-3 when running. The storage medium can include ROM, RAM, magnetic disk or optical disk, etc. The storage medium can also include non-volatile memory or non-transitory memory, etc.

[0078] The embodiment of the present application also discloses a user equipment, which can include a memory and a processor, and the memory has a computer program stored thereon, which can run on the processor. The processor can execute the steps of the method shown in Figures 1-3 Figures 1-3 when running the computer program. The user equipment includes but is not limited to terminal equipment such as mobile phone, computer and tablet computer, etc.

[0079] Although the present application has been disclosed with reference to the above examples, it is not intended to limit the present application. Any person skilled in the art, without departing from the spirit and scope of the present application, can make various changes and modifications, and the scope of protection of the present application should be limited by the scope defined in the claims.

Claims

1. An Ethernet header compression method, characterized by, The application comprises the following steps: When a new Ethernet flow needs to be transmitted, determining the number of currently remaining EHC contexts, the Ethernet header of the new Ethernet flow being inconsistent with the Ethernet header of the saved EHC context; Determining whether to compress the Ethernet header of the new Ethernet flow according to at least the number of currently remaining EHC contexts; If the number of currently remaining EHC contexts is lower than a preset threshold, indicating that the current idle context is insufficient, calculating the compression gain of the new Ethernet flow, the compression gain representing the transmission resource saved by compressing the new Ethernet flow, the compression gain considering factors including at least one of the following: the frequency of data packets in the Ethernet flow, the data packet size, and the Ethernet header size; If the number of currently remaining EHC contexts is greater than 0 and lower than the preset threshold, and the compression gain is higher than a first preset threshold, creating the EHC context of the new Ethernet flow, and performing the Ethernet header compression process for the new Ethernet flow.

2. The method of compressing Ethernet headers according to claim 1, wherein, The calculation of the compression gain of the new Ethernet flow comprises the following steps: Determining the number of data packets transmitted by the new Ethernet flow within a preset time period and the size of the Ethernet header of each data packet; Calculating the product of the number of data packets and the size of the Ethernet header as the compression gain.

3. The method for compressing Ethernet header according to claim 1, wherein, The determination of whether to compress the Ethernet header of the new Ethernet flow according to the compression gain comprises the following steps: If the number of currently remaining EHC contexts is 0 and the compression gain is higher than a first preset threshold, determining the compression gain corresponding to the saved EHC context, and selecting a first EHC context with a compression gain lower than a second preset threshold to release; Creating the EHC context of the new Ethernet flow, and performing the Ethernet header compression process for the new Ethernet flow.

4. The method of compressing Ethernet headers according to claim 3, wherein, The selection of the first EHC context with a compression gain lower than a second preset threshold to release comprises the following steps: Selecting a first EHC context with a compression gain lower than a second preset threshold; Determining the creation time of the first EHC context, and releasing the first EHC context if the creation time is greater than a preset time length.

5. The method for compressing Ethernet header according to claim 1, characterized in that, The determination of whether to compress the Ethernet header of the new Ethernet flow according to at least the number of currently remaining EHC contexts comprises the following steps: If the number of currently remaining EHC contexts is higher than a preset threshold, creating the EHC context of the new Ethernet flow, and performing the Ethernet header compression process for the new Ethernet flow.

6. The method for compressing Ethernet header according to claim 1, wherein, The determination of whether to compress the Ethernet header of the new Ethernet flow according to at least the number of currently remaining EHC contexts further comprises the following steps: Determining whether the EHC context of the new Ethernet flow has been released within a preset time length before the current time; If the EHC context has been released, not compressing the Ethernet header of the new Ethernet flow.

7. The method for compressing Ethernet header according to claim 1, wherein, The determination of the number of currently remaining EHC contexts further comprises the following steps: releasing the second EHC context if no Ethernet packet corresponding to the second EHC context is sent out within a preset time length; or, determining a compression gain corresponding to the saved EHC context, and releasing the third EHC context if a compression gain corresponding to the third EHC context is lower than a third preset threshold.

8. An Ethernet header compression device, characterized in that: The method comprises: a quantity determining module configured to determine a number of currently remaining EHC contexts when a new Ethernet flow needs to be sent, the Ethernet header of the new Ethernet flow being inconsistent with the Ethernet header of the saved EHC context; a compression determining module configured to determine whether to perform Ethernet header compression on the new Ethernet flow according to at least the number of currently remaining EHC contexts; the compression determining module is further configured to, when the number of currently remaining EHC contexts is lower than a preset threshold, indicating that the current idle context is insufficient, calculate a compression gain of the new Ethernet flow, the compression gain representing the transmission resource saved by performing compression on the new Ethernet flow; and when the number of currently remaining EHC contexts is greater than 0 and the compression gain is higher than a first preset threshold, create an EHC context of the new Ethernet flow, and perform an Ethernet header compression process for the new Ethernet flow, the preset threshold representing a threshold of sufficient context quantity, and the compression gain considering factors including at least one of the following: the frequency of data packets in the Ethernet flow, the data packet size, and the Ethernet header size.

9. A storage medium having stored thereon a computer program, characterized in that The computer program, when executed by a processor, performs the steps of the Ethernet header compression method of any one of claims 1 to 7. 10.A user equipment, comprising a memory and a processor, wherein a computer program is stored on the memory and executable on the processor, and characterized in that, The processor, when executing the computer program, performs the steps of the Ethernet header compression method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Enhancement on header compression

    US20180014225A1