[go: up one dir, main page]

CN102215236B - Working mode switching method and device of robust header compression protocol (ROHC) layer - Google Patents

Working mode switching method and device of robust header compression protocol (ROHC) layer Download PDF

Info

Publication number
CN102215236B
CN102215236B CN201110157654.1A CN201110157654A CN102215236B CN 102215236 B CN102215236 B CN 102215236B CN 201110157654 A CN201110157654 A CN 201110157654A CN 102215236 B CN102215236 B CN 102215236B
Authority
CN
China
Prior art keywords
working mode
context information
link
mode
link library
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.)
Expired - Fee Related
Application number
CN201110157654.1A
Other languages
Chinese (zh)
Other versions
CN102215236A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201110157654.1A priority Critical patent/CN102215236B/en
Publication of CN102215236A publication Critical patent/CN102215236A/en
Priority to PCT/CN2011/080933 priority patent/WO2012171289A1/en
Application granted granted Critical
Publication of CN102215236B publication Critical patent/CN102215236B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

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

Abstract

本发明公开了一种ROHC层的工作模式切换方法和装置。其中,该方法包括:在需要进行ROHC层的工作模式切换时,根据切换前后的工作模式判断是否需要进行上下文信息转换;如果是,根据当前工作模式的上下文信息设置切换后的工作模式的上下文信息,并发起工作模式切换。根据本发明,解决了ROHC的工作模式切换中学习资源的浪费问题,提高了系统资源的利用率。

The invention discloses a working mode switching method and device of an ROHC layer. Wherein, the method includes: when it is necessary to switch the working mode of the ROHC layer, judging whether context information conversion is required according to the working modes before and after switching; if so, setting the context information of the switched working mode according to the context information of the current working mode , and initiate a working mode switch. According to the present invention, the problem of waste of learning resources in the switching of ROHC working modes is solved, and the utilization rate of system resources is improved.

Description

鲁棒性头压缩协议层的工作模式切换方法和装置Working mode switching method and device for robust header compression protocol layer

技术领域technical field

本发明涉及通信领域,具体而言,涉及一种鲁棒性头压缩协议(Robust HeaderCompression Protocol,ROHC)层的工作模式切换方法和装置。The present invention relates to the field of communications, in particular to a method and device for switching working modes of a Robust Header Compression Protocol (Robust Header Compression Protocol, ROHC) layer.

背景技术Background technique

ROHC为健壮的头压缩方案的简称,是一种基于IP的通用压缩技术,它可以应用于3G(3rd Generation Partnership Project,第三代合作伙伴计划)的任何一种标准,还可以应用在B3G的LTE(Long Term Evolution,长期演进)等技术上,主要工作在基站和用户终端之间。ROHC主要对分组流进行包头压缩,其功能实体分为压缩端和解压端,压缩端和解压端需各自维护一套上下文信息,当压缩端确信解压端维护了充分的上下文信息后,便进入压缩状态,开始发送压缩分组。之后压缩端和解压端会根据当前报文,有选择性的更新各自上下文信息,以保证压缩端和解压端上下文信息的同步。ROHC is the abbreviation of Robust Header Compression Scheme, which is a general IP-based compression technology, which can be applied to any standard of 3G (3rd Generation Partnership Project, third generation partnership project), and can also be applied to LTE (Long Term Evolution, long-term evolution) and other technologies mainly work between the base station and the user terminal. ROHC mainly compresses the header of the packet flow. Its functional entity is divided into a compression end and a decompression end. The compression end and the decompression end need to maintain a set of context information respectively. When the compression end is sure that the decompression end has maintained sufficient context information, it will enter compression. state, start sending compressed packets. After that, the compressor and the decompressor will selectively update their respective context information according to the current message, so as to ensure the synchronization of the context information of the compressor and decompressor.

ROHC针对数据包头中每个域值的变化规律采用不同的压缩算法,其中链表压缩(List compression)算法是专门用来压缩RTP(Real-time Transport Protocol实时传送协议)CSRC(Contribution Sourc,提供源,用以标识分信号源)选项的,RTP CSRC选项是由一系列元素(item)组成的,被称为链表(list),链表中的元素(item)为每个CSRC值,在相邻的包之间,链表是很少变化的,如果没有发生变化,压缩端可以不发送任何数据。如果发生了较小的变化,压缩端只需要发送链表之间发生变化的部分即可,从而达到压缩的目的;基于表的元素(Table-based item)压缩算法是用来有效压缩单个元素(item)的,它的基本思想是:压缩端为每个item分配一个唯一对应的标签(index),压缩端将发送过的item以及其index保存到一个Table表(也称为元素与标签的关系表)中,当压缩端确信解压端己经知道index和item之间的对应关系后,压缩端只要发送index来代替item,从而达到压缩的目的;同理,解压端也维护着一个Table表,表中保存着接收到的item和相应的index,当解压端只接收到index,没有item时,就可以根据index到Table表中查找到对应的item,从而正确解压。压缩端为每对item和index之间引入一个标示:Known(已知位)。Known有两种取值0和1,Known为0时,表示压缩端还没有确信解压端是否得知这对item与index之间的对应关系;Known为1时,表示压缩端已经确信解压端己经得知这对item与index之间的对应关系。Known初始时为0,什么时候将Known置为1,即压缩端什么时候确信解压端己经得知对应关系,与具体的工作模式有关。ROHC adopts different compression algorithms for the changing rules of each domain value in the data packet header. Among them, the list compression (List compression) algorithm is specially used to compress RTP (Real-time Transport Protocol) CSRC (Contribution Source, providing source, Used to identify sub-signal source) options, the RTP CSRC option is composed of a series of elements (items), called a linked list (list), and the elements (items) in the linked list are each CSRC value, in adjacent packets Between, the linked list rarely changes, if there is no change, the compression end may not send any data. If there is a small change, the compression end only needs to send the changed part of the linked list, so as to achieve the purpose of compression; the table-based element (Table-based item) compression algorithm is used to effectively compress a single element (item ), its basic idea is: the compression end assigns a unique corresponding label (index) to each item, and the compression end saves the sent item and its index to a Table table (also known as the relationship table between elements and labels ), when the compression end is sure that the decompression end already knows the correspondence between index and item, the compression end only needs to send the index instead of the item, so as to achieve the purpose of compression; similarly, the decompression end also maintains a Table table, which represents The received item and the corresponding index are stored in . When the decompression end only receives the index but no item, it can find the corresponding item in the Table table according to the index, so as to decompress correctly. The compression side introduces a mark between each pair of item and index: Known (known bit). Known has two values, 0 and 1. When Known is 0, it means that the compression end has not yet confirmed whether the decompression end knows the correspondence between the item and index; when Known is 1, it means that the compression end is sure that the decompression end has After learning the correspondence between the pair of item and index. Known is initially 0. When to set Known to 1, that is, when the compressor is sure that the decompressor has learned the corresponding relationship, it is related to the specific working mode.

现有技术中,ROHC支持三种工作模式:单向工作模式(即,U模式)、双向优化工作模式(即,0模式)、双向可靠工作模式(即,R模式)。In the prior art, ROHC supports three working modes: unidirectional working mode (ie, U mode), bidirectional optimized working mode (ie, 0 mode), and bidirectional reliable working mode (ie, R mode).

在R模式下工作时,主要通过反馈信息来同步压缩器和解压器上下文,压缩端上下文信息中为每对index和item维护着一个Table表,该Table表如表1所示,其中,表中的SN存放的是己经发送的携带index和item关系的包的SN的值,当表中的任何一个SN被反馈信息确认,则将该Known置为1,并清空表中的SN域。When working in R mode, the context of the compressor and decompressor is synchronized mainly through feedback information. A Table table is maintained for each pair of index and item in the context information of the compression end. The Table table is shown in Table 1, where The SN of SN stores the SN value of the sent packet carrying the relationship between index and item. When any SN in the table is confirmed by the feedback information, the Known is set to 1, and the SN field in the table is cleared.

表1Table 1

Indexi Index Known Known Item Item SN1,SN2,... SN1, SN2,...

在U/O模式下,由于缺乏反馈,压缩端维护的表如图2所示,压缩端需要在表中维护一个计数(Counter)值,用于表示发送的index和item对应关系的计数。在计数值到达一定的发送次数后,将该Known置为1。In U/O mode, due to the lack of feedback, the table maintained by the compression end is shown in Figure 2. The compression end needs to maintain a counter value in the table, which is used to represent the count of the corresponding relationship between the sent index and item. After the count value reaches a certain number of sending times, the Known is set to 1.

表2Table 2

Index Index Known Known Item Item Counter Counter

解压端上下文中也维护着一个Table表,解压端每收到一对item和index,将其放入表中,并将相应的Known置为1。A Table table is also maintained in the context of the decompression end. Whenever the decompression end receives a pair of item and index, it puts it into the table and sets the corresponding Known to 1.

同时,为了能及时有效的更新参考链表,压缩端上下文信息中维护有一个List库,此库中保存了有可能作为参考list的所有链表,由于Table表中已维护了item和index的对应关系,因此List库中的链表只需要保存index值即可。At the same time, in order to update the reference linked list in a timely and effective manner, a List library is maintained in the context information of the compressor. This library stores all linked lists that may be used as a reference list. Since the corresponding relationship between item and index has been maintained in the Table table, Therefore, the linked list in the List library only needs to save the index value.

针对ROHC的工作模式不同,参考链表的选取方式也不同。例如:在R模式下,List库中链表的唯一标识通过数据包的SN表示,并且需要维护list发送数据包的所有SN值,用于在收到反馈信息的时候,将反馈信息中SN所对应的链表选择作为参考链表;在U/O模式下,List库中链表的唯一标识是通过Gen_Id(链表标识)值表示,该值初始时随机产生,如果list没有发生变化,则该值不变,如果发生变化,则该值自增1,上下文信息中还需要维护当前list的发送次数,用于在发送次数达到发送list上限的时候,将Gen_Id值中Index对应的链表选择为参考链表。According to the different working modes of ROHC, the selection method of the reference linked list is also different. For example: in R mode, the unique identifier of the linked list in the List library is represented by the SN of the data packet, and all SN values of the data packets sent by the list need to be maintained, so that when the feedback information is received, the SN in the feedback information corresponds to The linked list is selected as the reference linked list; in U/O mode, the unique identifier of the linked list in the List library is represented by the Gen_Id (linked list identifier) value, which is randomly generated at the beginning. If the list does not change, the value remains unchanged. If it changes, the value will be incremented by 1. The context information also needs to maintain the sending times of the current list, which is used to select the linked list corresponding to Index in the Gen_Id value as the reference linked list when the sending times reach the upper limit of the sending list.

解压端上下文中也维护着一个List库,用于根据压缩端发送的list标示选择参考list所用。当前技术中,解压端可以根据当前的信道环境,误码率,时延大小,反馈信道是否存在,业务的优先级,流包的大小等等因素,随时发起模式转换,并且在U/O模式和R模式相互切换过程中,由于存储的链表上下文信息有所不同,会清空压缩端和解压端上下文中所维护的Table表和List库,待模式切换成功后,在新模式下重新维护Table表和List库。这种模式切换方式因未能继承之前的学习经验,导致学习资源浪费,进而影响模式切换后链表的压缩效率。A List library is also maintained in the context of the decompression side, which is used to select the reference list according to the list mark sent by the compression side. In the current technology, the decompression end can initiate mode conversion at any time according to the current channel environment, bit error rate, delay size, whether the feedback channel exists, service priority, stream packet size, etc., and in U/O mode In the process of switching between the R mode and the R mode, because the context information of the stored linked list is different, the Table table and List library maintained in the context of the compression end and the decompression end will be cleared. After the mode switching is successful, the Table table will be maintained in the new mode and the List library. This mode switching method fails to inherit the previous learning experience, resulting in a waste of learning resources, which in turn affects the compression efficiency of the linked list after the mode switching.

针对相关技术中ROHC的工作模式切换中学习资源的浪费问题,目前尚未提出有效的解决方案。Aiming at the problem of wasting learning resources in the ROHC working mode switching in the related art, no effective solution has been proposed yet.

发明内容Contents of the invention

本发明的主要目的在于提供一种鲁棒性头压缩协议层的工作模式切换方法和装置,以至少解决上述ROHC的工作模式切换中学习资源的浪费问题。The main purpose of the present invention is to provide a method and device for switching working modes of the robust header compression protocol layer, so as to at least solve the problem of wasting learning resources in the switching of working modes of ROHC.

根据本发明的一个方面,提供了一种ROHC层的工作模式切换方法,包括:在需要进行ROHC层的工作模式切换时,根据切换前后的工作模式判断是否需要进行上下文信息转换;如果是,根据当前工作模式的上下文信息设置切换后的工作模式的上下文信息,并发起工作模式切换。According to one aspect of the present invention, a method for switching operating modes of the ROHC layer is provided, including: when the operating modes of the ROHC layer need to be switched, judging whether context information conversion is required according to the operating modes before and after switching; if so, according to The context information of the current working mode sets the context information of the switched working mode, and initiates working mode switching.

其中,根据切换前后的工作模式判断是否需要进行上下文信息转换包括:如果当前工作模式为单向工作模式或双向优化工作模式,欲切换至双向可靠工作模式时,确定需要进行上下文信息转换;或者,如果当前工作模式为双向可靠工作模式,欲切换至单向工作模式或双向优化工作模式时,确定需要进行上下文信息转换。Among them, judging whether context information conversion is required according to the working modes before and after switching includes: if the current working mode is a one-way working mode or a two-way optimized working mode, when switching to a two-way reliable working mode, it is determined that context information conversion is required; or, If the current working mode is a two-way reliable working mode, when switching to a one-way working mode or a two-way optimized working mode, it is determined that context information conversion is required.

其中,根据当前工作模式的上下文信息设置切换后的工作模式的上下文信息包括:根据第一元素与标签关系表中的上下文信息设置第二元素与标签关系表中的上下文信息,其中,第一元素与标签关系表为当前工作模式下学习的元素与标签关系表,第二元素与标签关系表为切换后的工作模式对应的元素与标签关系表;根据第一链路库中的上下文信息设置第二链路库中的上下文信息,其中,第一链路库为当前工作模式下学习的链路库,第二链路库为切换后的工作模式对应的链路库。Wherein, setting the context information of the switched working mode according to the context information of the current working mode includes: setting the context information in the second element and label relationship table according to the context information in the first element and label relationship table, wherein the first element The relationship table with tags is the element-label relationship table learned in the current working mode, and the second element-label relationship table is the element-label relationship table corresponding to the switched working mode; according to the context information in the first link library, set the second Context information in two link libraries, wherein the first link library is the link library learned in the current working mode, and the second link library is the link library corresponding to the switched working mode.

上述当前工作模式为单向工作模式或双向优化工作模式,切换后的工作模式为双向可靠工作模式时,根据第一元素与标签关系表中的上下文信息设置第二元素与标签关系表中的上下文信息包括:在第一元素与标签关系表中查找元素发送计数值达到第一设定上限的元素,在第二元素与标签关系表中设置查找到的元素对应的已知位为已确定标识;根据第一链路库中的上下文信息设置第二链路库中的上下文信息包括:在第一链路库中查找链路发送计数值达到第二设定上限的链路,将查找到的链路作为参考链路设置在第二链路库中。The above-mentioned current working mode is a one-way working mode or a two-way optimized working mode. When the switched working mode is a two-way reliable working mode, set the context in the second element-label relationship table according to the context information in the first element-label relationship table The information includes: searching in the first element-label relationship table for an element whose sending count value reaches the first set upper limit, and setting the known bit corresponding to the found element in the second element-label relationship table as a confirmed identification; Setting the context information in the second link library according to the context information in the first link library includes: searching in the first link library for links whose link sending count value reaches the second set upper limit, and linking the found links The road is set as a reference link in the second link library.

当前工作模式为双向可靠工作模式,切换后的工作模式为单向工作模式或双向优化工作模式时,上述根据第一元素与标签关系表中的上下文信息设置第二元素与标签关系表中的上下文信息包括:统计第一元素与标签关系表中每个元素对应的数据包序列号SN的个数;将统计的个数作为第二元素与标签关系表中对应元素的发送计数值,并在第二元素与标签关系表中将发送计数值达到第一设定上限的元素对应的已知位设置为已确定标识;上述根据第一链路库中的上下文信息设置第二链路库中的上下文信息包括:统计第一链路库中每个链路对应的数据包序列号SN的个数;将统计的个数作为第二链路库中对应链路的发送计数值,将发送计数值达到第二设定上限的链路作为参考链路。When the current working mode is a two-way reliable working mode, and the switched working mode is a one-way working mode or a two-way optimized working mode, the above-mentioned context information in the second element-label relationship table is set according to the context information in the first element-label relationship table The information includes: counting the number of data packet serial numbers SN corresponding to each element in the first element and the label relationship table; taking the counted number as the sending count value of the corresponding element in the second element and the label relationship table, and In the two-element and label relationship table, the known bit corresponding to the element whose sending count value reaches the first set upper limit is set as a determined identifier; the above-mentioned context in the second link library is set according to the context information in the first link library The information includes: counting the number of data packet sequence numbers SN corresponding to each link in the first link library; using the counted number as the sending count value of the corresponding link in the second link library, and sending the count value up to The link with the second upper limit is used as the reference link.

发起工作模式切换之后,上述方法还包括:根据切换后的工作模式的上下文信息进行元素的压缩或解压缩。After the working mode switch is initiated, the above method further includes: compressing or decompressing elements according to the context information of the switched working mode.

根据本发明的另一方面,提供了一种ROHC层的工作模式切换装置,包括:信息转换判断模块,用于需要进行ROHC层的工作模式切换时,根据切换前后的工作模式判断是否需要进行上下文信息转换;信息设置模块,用于当信息转换判断模块的判断结果为是时,根据当前工作模式的上下文信息设置切换后的工作模式的上下文信息;模式切换模块,用于发起工作模式切换。According to another aspect of the present invention, a device for switching working modes of the ROHC layer is provided, including: an information conversion judging module, which is used to judge whether context switching is required according to the working modes before and after switching when the working mode switching of the ROHC layer is required. Information conversion; an information setting module, used to set the context information of the switched working mode according to the context information of the current working mode when the judgment result of the information conversion judging module is yes; a mode switching module, used to initiate the working mode switching.

其中,信息转换判断模块包括:第一确定单元,用于如果当前工作模式为单向工作模式或双向优化工作模式,欲切换至双向可靠工作模式时,确定需要进行上下文信息转换;或者,第二确定单元,用于如果当前工作模式为双向可靠工作模式,欲切换至单向工作模式或双向优化工作模式时,确定需要进行上下文信息转换。Wherein, the information conversion judging module includes: a first determination unit, which is used to determine the need for context information conversion when the current working mode is a one-way working mode or a two-way optimized working mode, and it is desired to switch to a two-way reliable working mode; or, the second The determining unit is configured to determine that context information conversion is required when the current working mode is the bidirectional reliable working mode and it is desired to switch to the unidirectional working mode or the bidirectional optimized working mode.

上述信息设置模块包括:关系表设置单元,用于根据第一元素与标签关系表中的上下文信息设置第二元素与标签关系表中的上下文信息,其中,第一元素与标签关系表为当前工作模式下学习的元素与标签关系表,第二元素与标签关系表为切换后的工作模式对应的元素与标签关系表;链路库设置单元,用于根据第一链路库中的上下文信息设置第二链路库中的上下文信息,其中,第一链路库为当前工作模式下学习的链路库,第二链路库为切换后的工作模式对应的链路库。The above information setting module includes: a relationship table setting unit, which is used to set the context information in the second element and label relationship table according to the context information in the first element and label relationship table, wherein the first element and label relationship table is the current working The element and label relationship table learned in the mode, the second element and label relationship table is the element and label relationship table corresponding to the switched working mode; the link library setting unit is used to set the link library according to the context information in the first link library The context information in the second link library, wherein the first link library is the link library learned in the current working mode, and the second link library is the link library corresponding to the switched working mode.

其中,上述关系表设置单元包括:元素查找子单元,用于当前工作模式为单向工作模式或双向优化工作模式,切换后的工作模式为双向可靠工作模式时,在第一元素与标签关系表中查找元素发送计数值达到第一设定上限的元素;第一关系表设置子单元,用于在第二元素与标签关系表中设置元素查找子单元查找到的元素对应的已知位为已确定标识;上述链路库设置单元包括:链路查找子单元,用于当前工作模式为单向工作模式或双向优化工作模式,切换后的工作模式为双向可靠工作模式时,在第一链路库中查找链路发送计数值达到第二设定上限的链路;第一链路库设置子单元,用于将链路查找子单元查找到的链路作为参考链路设置在第二链路库中。Wherein, the above-mentioned relationship table setting unit includes: an element search subunit, which is used for the current working mode to be a one-way working mode or a two-way optimization working mode, and when the switched working mode is a two-way reliable working mode, in the first element and label relationship table In the search element, send the element whose count value reaches the first set upper limit; the first relationship table setting subunit is used to set the known bit corresponding to the element found by the element search subunit in the second element and label relationship table as already Determine the identification; the above-mentioned link library setting unit includes: a link search subunit, which is used for the current working mode to be a one-way working mode or a two-way optimized working mode, and when the switched working mode is a bidirectional reliable working mode, in the first link Find links in the library whose count value reaches the second set upper limit; the first link library setting subunit is used to set the link found by the link search subunit as a reference link in the second link library.

其中,上述关系表设置单元包括:元素统计子单元,用于当前工作模式为双向可靠工作模式,切换后的工作模式为单向工作模式或双向优化工作模式时,统计第一元素与标签关系表中每个元素对应的数据包序列号SN的个数;第二关系表设置子单元,用于将元素统计子单元统计的个数作为第二元素与标签关系表中对应元素的发送计数值,并在第二元素与标签关系表中将发送计数值达到第一设定上限的元素对应的已知位设置为已确定标识;上述链路库设置单元包括:链路统计子单元,用于当前工作模式为双向可靠工作模式,切换后的工作模式为单向工作模式或双向优化工作模式时,统计第一链路库中每个链路对应的数据包序列号SN的个数;第二链路库设置子单元,用于将链路统计子单元统计的个数作为第二链路库中对应链路的发送计数值,将发送计数值达到第二设定上限的链路作为参考链路。Wherein, the above-mentioned relationship table setting unit includes: an element statistics subunit, which is used to count the relationship table between the first element and the label when the current working mode is a two-way reliable working mode, and the switched working mode is a one-way working mode or a two-way optimized working mode The number of the data packet sequence number SN corresponding to each element in the above; the second relationship table sets the subunit, which is used to use the number counted by the element statistics subunit as the sending count value of the corresponding element in the second element and the label relationship table, And in the second element and label relationship table, the known bit corresponding to the element whose sending count value reaches the first set upper limit is set as a determined identification; the above-mentioned link library setting unit includes: a link statistics subunit, used for the current The working mode is a two-way reliable working mode. When the switched working mode is a one-way working mode or a two-way optimized working mode, count the number of data packet sequence numbers SN corresponding to each link in the first link library; The link library setting subunit is used to use the number counted by the link statistics subunit as the sending count value of the corresponding link in the second link library, and use the link whose sending count value reaches the second set upper limit as the reference link .

通过本发明,采用利用切换前学习到的元素上下文信息设置切换后的元素上下文信息,使切换后不需要再清空之前的元素上下文信息重新学习,解决了ROHC的工作模式切换中学习资源的浪费问题,提高了系统资源的利用率。Through the present invention, the element context information learned before the switch is used to set the element context information after the switch, so that it is not necessary to clear the previous element context information after the switch and re-learn, and the waste of learning resources in the ROHC working mode switch is solved. , improving the utilization of system resources.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:

图1是根据本发明实施例1的ROHC层的工作模式切换方法流程图;FIG. 1 is a flowchart of a method for switching operating modes of an ROHC layer according to Embodiment 1 of the present invention;

图2是根据本发明实施例2的ROHC层的工作模式切换装置的结构框图。FIG. 2 is a structural block diagram of an apparatus for switching working modes of an ROHC layer according to Embodiment 2 of the present invention.

具体实施方式detailed description

下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

本发明实施例考虑到应用ROHC对分组流进行包头压缩时,压缩端和解压端会在某些情况下切换工作模式,例如,由U或O模式切换到R模式;为了提高工作模式切换后元素上下文信息的学习效率,有效地利用工作模式切换前的学习经验,提供了一种ROHC层的工作模式切换方法和装置。The embodiment of the present invention considers that when using ROHC to compress the header of the packet flow, the compression end and the decompression end will switch the working mode in some cases, for example, switch from U or O mode to R mode; The learning efficiency of the context information and the effective use of the learning experience before the switching of the working mode provide a method and device for switching the working mode of the ROHC layer.

实施例1Example 1

本实施例提供了一种ROHC层的工作模式切换方法,适用于压缩端和解压端,参见图1,该方法包括以下步骤(步骤S102-步骤S106):This embodiment provides a working mode switching method of the ROHC layer, which is applicable to the compression end and the decompression end. Referring to FIG. 1, the method includes the following steps (step S102-step S106):

步骤S102,在需要进行ROHC层的工作模式切换时,根据切换前后的工作模式判断是否需要进行上下文信息转换;Step S102, when it is necessary to switch the working mode of the ROHC layer, judge whether context information conversion is required according to the working modes before and after switching;

例如,如果当前工作模式为单向工作模式(U模式)或双向优化工作模式(O模式)(也可以简化表示成“U/O模式”),欲切换至双向可靠工作模式(R模式)时,确定需要进行上下文信息转换;或者,如果当前工作模式为R模式双向可靠工作模式,欲切换至单向工作模式或双向优化工作模式时,确定需要进行上下文信息转换。For example, if the current working mode is a one-way working mode (U mode) or a two-way optimized working mode (O mode) (it can also be simplified as "U/O mode"), when you want to switch to a two-way reliable working mode (R mode) , it is determined that context information conversion is required; or, if the current working mode is the R-mode bidirectional reliable working mode, when switching to a unidirectional working mode or a bidirectional optimized working mode, it is determined that context information conversion is required.

步骤S104,如果是,根据当前工作模式的上下文信息设置切换后的工作模式的上下文信息;Step S104, if yes, setting the context information of the switched working mode according to the context information of the current working mode;

本实施例中的上下文信息指元素(item)的上下文信息,该上下文信息通常保存在元素与标签关系表(即,Table表)和链路库(List库)中,元素与标签关系表和链路库具体包括的内容与相关技术中相同,例如,R模式下,Table表如前面的表1所示;U/O模式下,Table表如前面的表2所示。基于此,根据当前工作模式的上下文信息设置切换后的工作模式的上下文信息包括:The context information in this embodiment refers to the context information of an element (item), and the context information is usually stored in an element-label relationship table (that is, a Table table) and a link library (List library), and an element-label relationship table and a link library The specific content included in the road library is the same as that in related technologies. For example, in the R mode, the Table table is shown in the previous Table 1; in the U/O mode, the Table table is shown in the previous Table 2. Based on this, setting the context information of the switched working mode according to the context information of the current working mode includes:

1)根据第一元素与标签关系表中的上下文信息设置第二元素与标签关系表中的上下文信息,其中,第一元素与标签关系表为当前工作模式下学习的元素与标签关系表,第二元素与标签关系表为切换后的工作模式对应的元素与标签关系表;1) Set the context information in the second element and label relationship table according to the context information in the first element and label relationship table, wherein, the first element and label relationship table is the element and label relationship table learned in the current working mode, the first The two-element-label relationship table is the element-label relationship table corresponding to the switched working mode;

2)根据第一链路库中的上下文信息设置第二链路库中的上下文信息,其中,第一链路库为当前工作模式下学习的链路库,第二链路库为切换后的工作模式对应的链路库。2) Set the context information in the second link library according to the context information in the first link library, wherein the first link library is the link library learned in the current working mode, and the second link library is the switched The link library corresponding to the working mode.

对于当前工作模式为单向工作模式或双向优化工作模式,切换后的工作模式为双向可靠工作模式的情况,上述根据第一元素与标签关系表中的上下文信息设置第二元素与标签关系表中的上下文信息包括:在第一元素与标签关系表中查找元素发送计数值达到第一设定上限的元素,在第二元素与标签关系表中设置查找到的元素对应的已知位为已确定标识;For the case where the current working mode is a one-way working mode or a two-way optimized working mode, and the switched working mode is a two-way reliable working mode, the above-mentioned context information in the first element-label relationship table is set in the second element-label relationship table. The context information includes: search the first element-label relationship table for an element whose sending count value reaches the first set upper limit, and set the known bit corresponding to the found element in the second element-label relationship table as determined logo;

该情况下,上述根据第一链路库中的上下文信息设置第二链路库中的上下文信息包括:在第一链路库中查找链路发送计数值达到第二设定上限的链路,将查找到的链路作为参考链路设置在第二链路库中。In this case, the above-mentioned setting of the context information in the second link library according to the context information in the first link library includes: searching for links in the first link library whose link sending count value reaches the second set upper limit, Set the found link as a reference link in the second link library.

对于当前工作模式为双向可靠工作模式,切换后的工作模式为单向工作模式或双向优化工作模式的情况,上述根据第一元素与标签关系表中的上下文信息设置第二元素与标签关系表中的上下文信息包括:统计第一元素与标签关系表中每个元素对应的数据包序列号SN的个数;将统计的个数作为第二元素与标签关系表中对应元素的发送计数值,并在第二元素与标签关系表中将发送计数值达到第一设定上限的元素对应的已知位设置为已确定标识;For the case where the current working mode is a two-way reliable working mode, and the switched working mode is a one-way working mode or a two-way optimized working mode, the above-mentioned context information in the first element-label relationship table is set in the second element-label relationship table. The context information includes: counting the number of data packet sequence numbers SN corresponding to each element in the first element and the label relationship table; using the counted number as the sending count value of the corresponding element in the second element and the label relationship table, and In the second element and label relationship table, the known bit corresponding to the element whose sending count value reaches the first set upper limit is set as a determined flag;

该情况下,上述根据第一链路库中的上下文信息设置第二链路库中的上下文信息包括:统计第一链路库中每个链路对应的数据包序列号SN的个数;将统计的个数作为第二链路库中对应链路的发送计数值,将发送计数值达到第二设定上限的链路作为参考链路。In this case, setting the context information in the second link library according to the context information in the first link library includes: counting the number of data packet sequence numbers SN corresponding to each link in the first link library; The counted number is used as the sending count value of the corresponding link in the second link library, and the link whose sending count value reaches the second set upper limit is used as the reference link.

在上述转换过程中,链表标识Gen_id与数据包序列号标识SN可以直接相互赋值。In the above conversion process, the linked list identifier Gen_id and the data packet serial number identifier SN can directly assign values to each other.

当然,对于根据切换前后的工作模式判断不需要进行上下文信息转换的情况,例如,U模式与O模式间的切换;这种情况可以在进行工作模式切换后,直接使用切换前的上下文信息进行压缩与解压缩。Of course, for situations where context information conversion is not required according to the working mode before and after switching, for example, switching between U mode and O mode; in this case, after the working mode is switched, the context information before switching can be directly used for compression with unzip.

步骤S106,发起工作模式切换。Step S106, initiating a working mode switch.

其中,步骤S106也可以先执行,即进行工作模式切换后再进行上下文信息的切换。Wherein, step S106 may also be executed first, that is, the context information is switched after the working mode is switched.

发起工作模式切换之后,上述方法还包括:根据切换后的工作模式的上下文信息进行元素的压缩或解压缩。After the working mode switch is initiated, the above method further includes: compressing or decompressing elements according to the context information of the switched working mode.

本实施例通过充分利用切换前学习到的元素上下文信息设置切换后的元素上下文信息,使切换后不需要再清空之前的元素上下文信息重新学习,解决了ROHC的工作模式切换中学习资源的浪费问题,提高了系统资源的利用率。同时,使用继承的元素上下文进行压缩/解压时,可以提高压缩的效率和压缩程度。In this embodiment, by making full use of the element context information learned before switching to set the element context information after switching, it is not necessary to clear the previous element context information and re-learn after switching, which solves the problem of waste of learning resources in the switching of ROHC working modes , improving the utilization of system resources. At the same time, when using the inherited element context for compression/decompression, the compression efficiency and compression degree can be improved.

上述方法的实现主要考虑了压缩器和解压器在U/O模式和R模式下所维护的Table表和List库的实质数据一致,即实际维护的item值一致,针对U/O模式和R模式上下文差异,进行了如下转换:The implementation of the above method mainly considers that the Table table maintained by the compressor and the decompressor in U/O mode and R mode are consistent with the actual data of the List library, that is, the actual maintained item values are consistent. For U/O mode and R mode Context differences, transformed as follows:

首先,Gen_Id和SN在U/O模式和R模式下,均可以唯一标识一个数据包,因此当U/O模式和R模式相互切换时,同时将Gen_Id和SN的值进行转换即可。First of all, Gen_Id and SN can uniquely identify a data packet in U/O mode and R mode, so when U/O mode and R mode are switched to each other, the values of Gen_Id and SN can be converted at the same time.

其中,Gen_Id首次随机产生,对接下来的数据包,会根据数据包的变化与否,选择性的对Gen_Id值加1,同时,Gen_Id用于标识此数据包;SN是数据包中自带、可以唯一标识一个数据包的字段;既然Gen_Id和SN都可以唯一标识一个数据包,那么在模式转化过程中,将两个字段相互赋值即可。Among them, Gen_Id is randomly generated for the first time. For the next data packet, the value of Gen_Id will be selectively increased by 1 according to whether the data packet changes or not. At the same time, Gen_Id is used to identify this data packet; A field that uniquely identifies a data packet; since both Gen_Id and SN can uniquely identify a data packet, it is sufficient to assign the two fields to each other during the mode conversion process.

其次,当由U/O模式切换到R模式时,将List库中达到list发送上限的list选择作为参考list即可,当由R模式切换到U/O模式时,将List库中所有list表对应的SN个数,转化为U/O模式下list的发送次数,然后将达到list发送上限的list选择作为参考list。Secondly, when switching from U/O mode to R mode, select the list in the List library that reaches the upper limit of list transmission as a reference list. When switching from R mode to U/O mode, all list tables in the List library The corresponding number of SNs is converted into the number of times the list is sent in U/O mode, and then the list that reaches the upper limit of list sending is selected as the reference list.

最后,对于所有模式切换过程中,index与item的对应关系保持不变,当由U/O模式切换到R模式时,将Table表中到达item发送上限的item置为已知位(即,将对应的Kown设置为),当由R模式切换到U/O模式时,将Table表中所有item对应的SN个数,转化为U/O模式下item的发送次数,然后将达到item发送上限的item置为已知位。Finally, for all mode switching processes, the corresponding relationship between index and item remains unchanged. When switching from U/O mode to R mode, the item in the Table table that reaches the upper limit of item sending is set as a known bit (that is, setting The corresponding Kown is set to ), when switching from R mode to U/O mode, convert the number of SNs corresponding to all items in the Table table into the number of times the item is sent in U/O mode, and then reach the upper limit of item sending item is set to a known bit.

因为U模式和O模式下所维护的链表上下文信息是一致的,因此当U模式和O模式相互切换时,不需要清空链表上下文信息,也不需要按照上述方式对上下文信息进行转换。Because the linked list context information maintained in the U mode and the O mode are consistent, when the U mode and the O mode are switched to each other, there is no need to clear the linked list context information, nor to convert the context information in the above-mentioned manner.

下面以由R模式切换到U模式为例,说明工作模式切换过程中的处理方式:The following takes switching from R mode to U mode as an example to illustrate the processing method during the working mode switching process:

当前模式为R模式,切换模式为U模式,当前参考list的SN为21,其实际list值为(3500、3600、3601),相对应的index为(0、2、3),假设模式切换后待发送的list的SN为24,其实际list值为(3500、3600、3601、3602),压缩器和解压器R模式下的Talbe表如表3所示,List库如表4所示。The current mode is R mode, the switching mode is U mode, the SN of the current reference list is 21, the actual list value is (3500, 3600, 3601), and the corresponding index is (0, 2, 3), assuming that after the mode is switched The SN of the list to be sent is 24, and its actual list value is (3500, 3600, 3601, 3602). The Talbe table in R mode of the compressor and decompressor is shown in Table 3, and the List library is shown in Table 4.

表3table 3

表4Table 4

SN SN Index1,Index2,...... Index1, Index2,  … SN1,SN2,...... SN1, SN2,  … 18 18 0,1,2,3 0, 1, 2, 3 18 18 19 19 0,1,3 0, 1, 3 19 19 20 20 0,2 0,2 20 20 21 twenty one 0,2,3 0, 2, 3 21,22,23 21, 22, 23 ......  … ......  … ......  …

模式切换后,如果清空Talbe表和List库以及相应的上下文信息,这时需要将待发送的SN=24的数据包的list信息全部发送给解压端,即将实际的list(3500、3600、3601、3602)原值发送,然后压缩端和解压端重新进行上下文信息的同步,以及Talbe表和List库的维护。如果采用本实施例提供的上述工作模式切换方法,则不清空上述Talbe表和List库,而是将其进行转换,转换后的Talbe表如表5所示,转换后的List库如表6所示。After the mode switching, if the Talbe table and the List library and the corresponding context information are cleared, all the list information of the data packets with SN=24 to be sent need to be sent to the decompression terminal, that is, the actual list (3500, 3600, 3601, 3602) The original value is sent, and then the compression end and the decompression end re-synchronize the context information, and maintain the Talbe table and the List library. If the above-mentioned working mode switching method provided by the present embodiment is adopted, the above-mentioned Talbe table and List storehouse are not emptied, but are converted. The converted Talbe table is as shown in Table 5, and the converted List storehouse is as shown in Table 6. Show.

表5table 5

Indexi(标签i) Indexi (label i) Known(已知位) Known (known bit) Item(元素) Item (element) Counter(元素计数值) Counter (element count value) 0 0 1 1 3500 3500 4 4 1 1 1 1 3501 3501 2 2 2 2 1 1 3600 3600 4 4 3 3 1 1 3601 3601 4 4 ......  … ......  … ......  … ......  …

表6Table 6

Gen_id Gen_id Index1,Index2,...... Index1, Index2,  … Counter(链路计数值) Counter (link count value) 18 18 0,1,2,3 0, 1, 2, 3 1 1 19 19 0,1,3 0, 1, 3 1 1 20 20 0,2 0,2 1 1 21 twenty one 0,2,3 0, 2, 3 3 3 ......  … ......  … ......  …

模式切换后,压缩器和解压器依然保存转换后的Talbe表和List库,以及相应的上下文信息,这时待发送SN=24的包的list信息便可以压缩后发送,由于当前参考list为(3500、3600、3601),待发送list为(3500、3600、3601、3602),按照链表压缩原理,只需要发送当前list和参考list的差别部分,即只需要将(3602)发送到解压端即可。After mode switching, the compressor and decompressor still save the Talbe table and List library after conversion, and the corresponding context information. At this time, the list information of the packet to be sent with SN=24 can be compressed and sent, because the current reference list is ( 3500, 3600, 3601), and the list to be sent is (3500, 3600, 3601, 3602). According to the principle of linked list compression, only the difference between the current list and the reference list needs to be sent, that is, only (3602) needs to be sent to the decompression terminal. Can.

根据本实施例提供的上述方法,可以保证各种模式切换过程中,压缩端和解压端所维护的链表上下文信息都不被清空,而是通过转换被有效地继承,进而保证了链表压缩下的无缝模式切换,有效提高了模式切换后链表压缩的效率。According to the above method provided by this embodiment, it can be ensured that during various mode switching processes, the linked list context information maintained by the compression end and the decompression end will not be cleared, but will be effectively inherited through conversion, thereby ensuring the link list under compression. Seamless mode switching effectively improves the efficiency of linked list compression after mode switching.

实施例2Example 2

本实施例提供了一种ROHC层的工作模式切换装置,该装置可以设置在压缩端或解压缩端的实体设备上,参见图2,该装置包括:This embodiment provides a working mode switching device of the ROHC layer, which device can be set on the physical device at the compression end or decompression end, see Figure 2, the device includes:

信息转换判断模块22,用于需要进行ROHC层的工作模式切换时,根据切换前后的工作模式判断是否需要进行上下文信息转换;The information conversion judging module 22 is used for judging whether context information conversion is required according to the working modes before and after switching when it is necessary to switch the working mode of the ROHC layer;

信息设置模块24,与信息转换判断模块22相连,用于当信息转换判断模块22的判断结果为是时,根据当前工作模式的上下文信息设置切换后的工作模式的上下文信息;The information setting module 24 is connected with the information conversion judgment module 22, and is used for setting the context information of the switched working mode according to the context information of the current working mode when the judgment result of the information conversion judgment module 22 is yes;

模式切换模块26,与信息设置模块24相连,用于发起工作模式切换。The mode switching module 26 is connected with the information setting module 24 and is used for initiating the working mode switching.

其中,信息转换判断模块22包括:第一确定单元,用于如果当前工作模式为单向工作模式或双向优化工作模式,欲切换至双向可靠工作模式时,确定需要进行上下文信息转换;或者,第二确定单元,用于如果当前工作模式为双向可靠工作模式,欲切换至单向工作模式或双向优化工作模式时,确定需要进行上下文信息转换。Wherein, the information conversion judging module 22 includes: a first determining unit, used to determine that context information conversion is required when switching to a bidirectional reliable working mode if the current working mode is a one-way working mode or a two-way optimized working mode; or, the second The second determination unit is used to determine the need to perform context information conversion when the current working mode is the bidirectional reliable working mode and it is desired to switch to the unidirectional working mode or the bidirectional optimized working mode.

上述信息设置模块24包括:关系表设置单元,用于根据第一元素与标签关系表中的上下文信息设置第二元素与标签关系表中的上下文信息,其中,第一元素与标签关系表为当前工作模式下学习的元素与标签关系表,第二元素与标签关系表为切换后的工作模式对应的元素与标签关系表;链路库设置单元,用于根据第一链路库中的上下文信息设置第二链路库中的上下文信息,其中,第一链路库为当前工作模式下学习的链路库,第二链路库为切换后的工作模式对应的链路库。The above information setting module 24 includes: a relationship table setting unit, which is used to set the context information in the second element and label relationship table according to the context information in the first element and label relationship table, wherein the first element and label relationship table is the current The element and label relationship table learned in the working mode, the second element and label relationship table is the element and label relationship table corresponding to the switched working mode; the link library setting unit is used for according to the context information in the first link library The context information in the second link library is set, wherein the first link library is the link library learned in the current working mode, and the second link library is the link library corresponding to the switched working mode.

根据切换前后工作模式的不同,上述关系表设置单元和链路库设置单元可以由两类实现方式,方式一针对当前工作模式为单向工作模式或双向优化工作模式,切换后的工作模式为双向可靠工作模式的情况,方式二针对当前工作模式为双向可靠工作模式,切换后的工作模式为单向工作模式或双向优化工作模式的情况,下面详见进行说明这两种方式。According to the different working modes before and after switching, the above-mentioned relationship table setting unit and link library setting unit can be implemented in two ways. The first way is for the current working mode to be a one-way working mode or a two-way optimized working mode, and the working mode after switching is two-way In the case of the reliable working mode, the second method is for the case where the current working mode is the bidirectional reliable working mode, and the switched working mode is the unidirectional working mode or the bidirectional optimized working mode.

方式一:method one:

上述关系表设置单元包括:元素查找子单元,用于当前工作模式为单向工作模式或双向优化工作模式,切换后的工作模式为双向可靠工作模式时,在第一元素与标签关系表中查找元素发送计数值达到第一设定上限的元素;第一关系表设置子单元,用于在第二元素与标签关系表中设置元素查找子单元查找到的元素对应的已知位为已确定标识;The above-mentioned relationship table setting unit includes: an element search subunit, which is used to search in the first element and label relationship table when the current working mode is a one-way working mode or a two-way optimization working mode, and the switched working mode is a two-way reliable working mode. The element whose count value reaches the first set upper limit is sent by the element; the first relationship table setting subunit is used to set the known bit corresponding to the element found by the element search subunit in the second element and tag relationship table as a determined identifier ;

上述链路库设置单元包括:链路查找子单元,用于当前工作模式为单向工作模式或双向优化工作模式,切换后的工作模式为双向可靠工作模式时,在第一链路库中查找链路发送计数值达到第二设定上限的链路;第一链路库设置子单元,用于将链路查找子单元查找到的链路作为参考链路设置在第二链路库中。The above-mentioned link library setting unit includes: a link search subunit, which is used to search in the first link library when the current working mode is a one-way working mode or a two-way optimized working mode, and the switched working mode is a two-way reliable working mode. The link whose count value reaches the second set upper limit is sent by the link; the first link library setting subunit is configured to set the link found by the link search subunit as a reference link in the second link library.

方式二:Method 2:

上述关系表设置单元包括:元素统计子单元,用于当前工作模式为双向可靠工作模式,切换后的工作模式为单向工作模式或双向优化工作模式时,统计第一元素与标签关系表中每个元素对应的数据包序列号SN的个数;第二关系表设置子单元,用于将元素统计子单元统计的个数作为第二元素与标签关系表中对应元素的发送计数值,并在第二元素与标签关系表中将发送计数值达到第一设定上限的元素对应的已知位设置为已确定标识;The above-mentioned relationship table setting unit includes: an element statistics subunit, which is used for counting each item in the first element and label relationship table when the current working mode is a two-way reliable working mode, and when the switched working mode is a one-way working mode or a two-way optimizing working mode. The number of the packet sequence number SN corresponding to the element; the second relationship table sets the subunit, which is used to send the count value of the corresponding element in the second element and the label relationship table as the number of the element statistics subunit statistics, and in In the second element and label relationship table, the known bit corresponding to the element whose sending count value reaches the first set upper limit is set as a determined flag;

上述链路库设置单元包括:链路统计子单元,用于当前工作模式为双向可靠工作模式,切换后的工作模式为单向工作模式或双向优化工作模式时,统计第一链路库中每个链路对应的数据包序列号SN的个数;第二链路库设置子单元,用于将链路统计子单元统计的个数作为第二链路库中对应链路的发送计数值,将发送计数值达到第二设定上限的链路作为参考链路。The above-mentioned link library setting unit includes: a link statistics subunit, which is used for counting each link in the first link library when the current working mode is a two-way reliable working mode, and when the switched working mode is a one-way working mode or a two-way optimized working mode. The number of the packet sequence number SN corresponding to each link; the second link storehouse is provided with a subunit, which is used to use the number counted by the link statistics subunit as the sending count value of the corresponding link in the second link storehouse, A link whose sending count value reaches the second set upper limit is used as a reference link.

在上述转换过程中,链表标识Gen_id与数据包序列号标识SN可以直接相互赋值。In the above conversion process, the linked list identifier Gen_id and the data packet serial number identifier SN can directly assign values to each other.

为了实现压缩与解压缩功能,上述装置还可以包括:压缩与解压缩模块,用于发起工作模式切换之后,根据所述切换后的工作模式的上下文信息进行元素的压缩或解压缩。In order to realize the compression and decompression function, the above device may further include: a compression and decompression module, configured to perform element compression or decompression according to the context information of the switched working mode after initiating the working mode switching.

本实施例通过充分利用切换前学习到的元素上下文信息设置切换后的元素上下文信息,使切换后不需要再清空之前的元素上下文信息重新学习,解决了ROHC的工作模式切换中学习资源的浪费问题,提高了系统资源的利用率。同时,使用继承的元素上下文进行压缩/解压时,可以提高压缩的效率和压缩程度。In this embodiment, by making full use of the element context information learned before switching to set the element context information after switching, it is not necessary to clear the previous element context information and re-learn after switching, which solves the problem of waste of learning resources in the switching of ROHC working modes , improving the utilization of system resources. At the same time, when using the inherited element context for compression/decompression, the compression efficiency and compression degree can be improved.

从以上的描述中可以看出,以上实施例可以保证各种模式切换过程中,压缩端和解压端所维护的链表上下文信息都不被清空,而是通过转换被有效地继承,进而保证了链表压缩下的无缝模式切换,有效提高了模式切换后链表压缩的效率。It can be seen from the above description that the above embodiments can ensure that the context information of the linked list maintained by the compression end and the decompression end is not cleared during various mode switching processes, but is effectively inherited through conversion, thereby ensuring that the linked list Seamless mode switching under compression effectively improves the efficiency of linked list compression after mode switching.

显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present invention is not limited to any specific combination of hardware and software.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (9)

1. A method for switching the working mode of a robust header compression protocol (ROHC) layer is characterized by comprising the following steps:
when the working mode of the ROHC layer needs to be switched, judging whether context information conversion is needed according to the working modes before and after switching;
if so, setting context information of the switched working mode according to the context information of the current working mode, and initiating the switching of the working mode;
wherein the setting of context information of the switched operating mode according to the context information of the current operating mode includes: setting context information in a second element and label relation table according to the context information in the first element and label relation table, wherein the first element and label relation table is an element and label relation table learned in the current working mode, and the second element and label relation table is an element and label relation table corresponding to the switched working mode; and setting context information in a second link library according to the context information in the first link library, wherein the first link library is a link library learned in the current working mode, and the second link library is a link library corresponding to the switched working mode.
2. The method of claim 1, wherein the determining whether context information conversion is required according to the working modes before and after switching comprises:
if the current working mode is a unidirectional working mode or a bidirectional optimization working mode, determining that context information conversion is needed when switching to a bidirectional reliable working mode; or,
and if the current working mode is a bidirectional reliable working mode, determining that context information conversion is needed when the current working mode is to be switched to a unidirectional working mode or a bidirectional optimized working mode.
3. The method according to claim 1, wherein the current operation mode is a unidirectional operation mode or a bidirectional optimized operation mode, and when the switched operation mode is a bidirectional reliable operation mode,
the setting the context information in the second element and tag relation table according to the context information in the first element and tag relation table includes: searching an element with a count value reaching a first set upper limit in the first element and label relation table, and setting a known bit corresponding to the searched element as a determined identifier in a second element and label relation table;
the setting the context information in the second link library according to the context information in the first link library comprises: and searching a link with a link sending count value reaching a second set upper limit in the first link library, and setting the searched link as a reference link in a second link library.
4. The method according to claim 1, wherein when the current operation mode is a bidirectional reliable operation mode, and the switched operation mode is a unidirectional operation mode or a bidirectional optimized operation mode,
the setting the context information in the second element and tag relation table according to the context information in the first element and tag relation table includes: counting the number of the data packet sequence numbers SN corresponding to each element in the first element and label relation table; taking the counted number as a sending count value of a corresponding element in the second element and label relation table, and setting a known bit corresponding to an element of which the sending count value reaches a first set upper limit in the second element and label relation table as a determined identifier;
the setting the context information in the second link library according to the context information in the first link library comprises: counting the number of the data packet serial numbers SN corresponding to each link in the first link library; and taking the counted number as a sending count value of a corresponding link in the second link library, and taking the link of which the sending count value reaches a second set upper limit as a reference link.
5. The method according to any of claims 1-4, wherein after the initiating the operating mode switch, the method further comprises:
and compressing or decompressing elements according to the context information of the switched working mode.
6. An operation mode switching device of a robust header compression protocol ROHC layer, comprising:
the information conversion judging module is used for judging whether context information conversion is needed according to the working modes before and after switching when the working modes of the ROHC layer need to be switched;
the information setting module is used for setting context information of the switched working mode according to the context information of the current working mode when the judgment result of the information conversion judgment module is yes;
the mode switching module is used for initiating the switching of the working modes;
wherein, the information setting module comprises: the relation table setting unit is used for setting context information in a second element and label relation table according to the context information in the first element and label relation table, wherein the first element and label relation table is an element and label relation table learned in the current working mode, and the second element and label relation table is an element and label relation table corresponding to the switched working mode;
and the link library setting unit is used for setting the context information in the second link library according to the context information in the first link library, wherein the first link library is a link library learned in the current working mode, and the second link library is a link library corresponding to the switched working mode.
7. The apparatus of claim 6, wherein the information conversion determining module comprises:
the first determining unit is used for determining that context information conversion is needed when the current working mode is a one-way working mode or a two-way optimization working mode and is to be switched to a two-way reliable working mode; or,
and the second determining unit is used for determining that context information conversion is required to be carried out when the current working mode is a bidirectional reliable working mode and is to be switched to a unidirectional working mode or a bidirectional optimized working mode.
8. The apparatus of claim 6,
the relationship table setting unit includes:
the element searching subunit is used for searching an element with a count value reaching a first set upper limit in the first element and label relation table when the current working mode is a unidirectional working mode or a bidirectional optimization working mode and the switched working mode is a bidirectional reliable working mode;
the first relation table setting subunit is configured to set, in the second element and tag relation table, the known bit corresponding to the element found by the element finding subunit as the determined identifier;
the link library setting unit includes:
the link searching subunit is used for searching a link, the transmission count value of which reaches a second set upper limit, in the first link library when the current working mode is a unidirectional working mode or a bidirectional optimized working mode and the switched working mode is a bidirectional reliable working mode;
and the first link library setting subunit is used for setting the link searched by the link searching subunit as a reference link in a second link library.
9. The apparatus of claim 6,
the relationship table setting unit includes:
the element counting subunit is used for counting the number of the data packet sequence numbers SN corresponding to each element in the first element and label relation table when the current working mode is a bidirectional reliable working mode and the switched working mode is a unidirectional working mode or a bidirectional optimized working mode;
a second relation table setting subunit, configured to use the number counted by the element counting subunit as a sending count value of a corresponding element in the second element-to-tag relation table, and set a known bit corresponding to an element whose sending count value reaches a first set upper limit in the second element-to-tag relation table as a determined identifier;
the link library setting unit includes:
the link counting subunit is used for counting the number of the data packet serial numbers SN corresponding to each link in the first link library when the current working mode is a bidirectional reliable working mode and the switched working mode is a unidirectional working mode or a bidirectional optimized working mode;
and the second link library setting subunit is configured to use the number counted by the link counting subunit as a sending count value of a corresponding link in the second link library, and use a link whose sending count value reaches a second set upper limit as a reference link.
CN201110157654.1A 2011-06-13 2011-06-13 Working mode switching method and device of robust header compression protocol (ROHC) layer Expired - Fee Related CN102215236B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110157654.1A CN102215236B (en) 2011-06-13 2011-06-13 Working mode switching method and device of robust header compression protocol (ROHC) layer
PCT/CN2011/080933 WO2012171289A1 (en) 2011-06-13 2011-10-18 Method and apparatus for switching working mode of robust header compression protocol layer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110157654.1A CN102215236B (en) 2011-06-13 2011-06-13 Working mode switching method and device of robust header compression protocol (ROHC) layer

Publications (2)

Publication Number Publication Date
CN102215236A CN102215236A (en) 2011-10-12
CN102215236B true CN102215236B (en) 2017-02-08

Family

ID=44746366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110157654.1A Expired - Fee Related CN102215236B (en) 2011-06-13 2011-06-13 Working mode switching method and device of robust header compression protocol (ROHC) layer

Country Status (2)

Country Link
CN (1) CN102215236B (en)
WO (1) WO2012171289A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI692946B (en) 2018-10-23 2020-05-01 瑞昱半導體股份有限公司 Method for performing mode conversion of compression operation in transmission device and its corresponding transmission device, and transmission device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215236B (en) * 2011-06-13 2017-02-08 中兴通讯股份有限公司 Working mode switching method and device of robust header compression protocol (ROHC) layer
CN109219083A (en) * 2017-07-06 2019-01-15 深圳市中兴微电子技术有限公司 Optimization method and system in a kind of conversion of robustness header compression mode
CN107801212A (en) * 2017-10-17 2018-03-13 京信通信系统(中国)有限公司 A kind of communication means and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494641A (en) * 2008-01-23 2009-07-29 中兴通讯股份有限公司 Mode transition method and apparatus of robustness head compression technology

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1603339A1 (en) * 2004-06-01 2005-12-07 STMicroelectronics S.r.l. Method and system for communicating video data in a packet-switched network, related network and computer program product therefor
CN101364937B (en) * 2007-08-10 2013-12-18 华为技术有限公司 Method and system for keeping robust header compression mechanism communication
JP5327225B2 (en) * 2008-09-19 2013-10-30 富士通株式会社 Packet transmission method and reception node
CN101998438B (en) * 2009-08-17 2013-08-07 电信科学技术研究院 Method and equipment for improving performance of PDCP (Packet Data Convergence Protocol) ROHC (Robust Header Compression) algorithm
CN102045328B (en) * 2009-10-16 2016-08-03 中兴通讯股份有限公司 The method of a kind of robustness header compression pattern switching and decompression machine
CN101984621B (en) * 2010-10-25 2014-09-10 中兴通讯股份有限公司 Method and device for improving list compression efficiency in robustness header compression
CN102045769A (en) * 2010-12-23 2011-05-04 南京邮电大学 Heading compress text transfer method in Internet of things (IOT) prestressed handover
CN102215236B (en) * 2011-06-13 2017-02-08 中兴通讯股份有限公司 Working mode switching method and device of robust header compression protocol (ROHC) layer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494641A (en) * 2008-01-23 2009-07-29 中兴通讯股份有限公司 Mode transition method and apparatus of robustness head compression technology

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI692946B (en) 2018-10-23 2020-05-01 瑞昱半導體股份有限公司 Method for performing mode conversion of compression operation in transmission device and its corresponding transmission device, and transmission device

Also Published As

Publication number Publication date
WO2012171289A1 (en) 2012-12-20
CN102215236A (en) 2011-10-12

Similar Documents

Publication Publication Date Title
EP2832057B1 (en) Content centric m2m system
US7430617B2 (en) Method and system for header compression
US10904152B2 (en) Hardware-friendly mechanisms for in-band OAM processing
EP3531617B1 (en) Message transmission method and apparatus, node and computer storage medium
CN113508611B (en) Method and apparatus for flexibly supporting service in wireless communication system
JP2007189697A (en) Method for exchanging data packets in a network of distributed stations, apparatus for compressing data packets and apparatus for decompressing data packets
CN101350812A (en) A data transmission method, communication device and communication system
CN103825869A (en) Compression and decompression method for Ethernet message header, and compression and decompression device thereof
CN104995950A (en) A data transmission method and device
CN102215236B (en) Working mode switching method and device of robust header compression protocol (ROHC) layer
CN107659575B (en) Broadband cluster multimedia function body and session method thereof
CN104378290A (en) Message forwarding method and device
Abdelfadeel et al. Lschc: Layered static context header compression for lpwans
CN105591859A (en) Method and device for dynamically adjusting blocked port for ERPS ring
CN102065508B (en) Wireless bridge forwarding equipment and method
CN107846715A (en) Access point switching method and device of the Internet of Things based on transmission rate
CN106533503B (en) A kind of method and device of powerline network communication
CN116032440B (en) Data processing method, device, system and medium
CN110401513A (en) A data transmission method and device
CN103139752A (en) Transmission channel table modification method and device
CN109787903B (en) Non-collision multicast data feedback method in centralized network
CN105764092A (en) Original state message sending control method, compression end equipment, decompression end equipment, and system
CN102740357B (en) R Mode S O state robustness header compression method and apparatus
CN103312604B (en) Data pack transmission method and network system
KR101219611B1 (en) An efficient dissemination protocol for remote update in 6LoWPAN sensor network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170208