CN102325006A - Encoding method and device, decoding method and device based on dynamic time slot - Google Patents

Encoding method and device, decoding method and device based on dynamic time slot Download PDF

Info

Publication number
CN102325006A
CN102325006A CN201110202161A CN201110202161A CN102325006A CN 102325006 A CN102325006 A CN 102325006A CN 201110202161 A CN201110202161 A CN 201110202161A CN 201110202161 A CN201110202161 A CN 201110202161A CN 102325006 A CN102325006 A CN 102325006A
Authority
CN
China
Prior art keywords
frame
time slot
data
bandwidth
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201110202161A
Other languages
Chinese (zh)
Other versions
CN102325006B (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.)
Shanghai Bocom Network Technology Co ltd
Original Assignee
SHANGHAI BOCOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI BOCOM INTELLIGENT NETWORK TECHNOLOGY CO LTD filed Critical SHANGHAI BOCOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
Priority to CN201110202161.5A priority Critical patent/CN102325006B/en
Publication of CN102325006A publication Critical patent/CN102325006A/en
Application granted granted Critical
Publication of CN102325006B publication Critical patent/CN102325006B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Time-Division Multiplex Systems (AREA)

Abstract

The embodiment of the invention discloses an encoding method and device as well as a decoding method and device based on a dynamic time slot, and relates to the field of communication. The encoding method comprises the following steps of: counting the numbers of correct frames, wrong frames and overrunning buffers; judging a time slot bandwidth required by the current data flow according to the null pointer, full pointer and current water level information of a buffer queue; distributing the time slot bandwidth to the current data flow; reading data in the buffer queue, and serially encoding the data according to code types of a frame interval, a frame header and a frame end; and mapping serially encoded data and channel time slot information into a super-frame, a frame, a sub-frame and bursts. Therefore, data frames can be easily and flexibly transmitted in coaxial cables or optical fiber channels in a length-changing manner; and furthermore, the methods and the devices can be applied to transmission and access of standard time division multiplex (TDM) services such as synchronous digital hierarchy (SDH), pseudo-synchronous digital hierarchy (PDH) and the like, so the bandwidth of data transmission is saved greatly.

Description

一种基于动态时隙的编码方法及装置、解码方法及装置Encoding method and device, decoding method and device based on dynamic time slot

技术领域 technical field

本发明涉及通信领域,尤其涉及一种基于动态时隙的编码方法及装置、解码方法及装置。The present invention relates to the communication field, in particular to a dynamic time slot-based encoding method and device, and a decoding method and device.

背景技术 Background technique

当前绝大部分数据业务都是以报文即数据帧的形式出现的,但由于数据业务的应用是各种各样的、不确定的,则数据帧的帧长也是变化的,例如,以太网业务、H.264码流数据、MPEG码流数据等,它们的数据帧大小不是固定不变的。而长距离的数据传输在物理线路上一般依靠同轴电缆或光纤进行,为了满足高速率要求,数据在物理线路上都是串行化传输的。At present, most data services appear in the form of messages, that is, data frames. However, due to the various and uncertain applications of data services, the frame length of data frames also changes. For example, Ethernet Business, H.264 code stream data, MPEG code stream data, etc., their data frame size is not fixed. However, long-distance data transmission generally relies on coaxial cables or optical fibers on physical lines. In order to meet high-speed requirements, data is transmitted serially on physical lines.

为了合理的、高效率的、简单可靠的把数据帧封装至各个时隙通道中以在串行化的通道上进行传输,需要通过特定的编码方式。但如果编码方式不能体现动态的,可变带宽的,就会浪费过多的带宽,如业务通道很多,浪费的带宽会是巨大的。In order to reasonably, efficiently, simply and reliably encapsulate the data frame into each time slot channel for transmission on the serialized channel, a specific encoding method is required. However, if the coding method cannot reflect the dynamic and variable bandwidth, too much bandwidth will be wasted. If there are many service channels, the wasted bandwidth will be huge.

发明内容 Contents of the invention

本发明实施例的目的是提供一种基于动态时隙的编码方法及装置,解码方法及装置,使数据帧在同轴电缆或光纤通道中,可简单灵活、变长地传输,同时该方法及装置也可以运用于SDH、PDH等标准TDM业务的传输及接入。The purpose of the embodiments of the present invention is to provide a dynamic time slot-based encoding method and device, a decoding method and device, so that data frames can be transmitted in a coaxial cable or fiber optic channel in a simple, flexible and variable length manner. At the same time, the method and The device can also be used for the transmission and access of standard TDM services such as SDH and PDH.

为了达到上述发明目的,本发明实施例提出的一种基于动态时隙的编码方法是通过以下技术方案实现的:In order to achieve the purpose of the above invention, a dynamic time slot-based coding method proposed in the embodiment of the present invention is realized through the following technical solutions:

一种基于动态时隙的编码方法,所述方法包括:A coding method based on dynamic time slots, said method comprising:

入口的缓存队列统计正确帧、错误帧及缓存溢出的个数;The entrance buffer queue counts the number of correct frames, error frames and buffer overflow;

上层控制模块根据缓存队列的空指针、满指针及当前水位信息判断当前的数据流量所需的时隙带宽;The upper layer control module judges the time slot bandwidth required by the current data flow according to the empty pointer, full pointer and current water level information of the cache queue;

为当前数据流量分配时隙带宽;Allocate slot bandwidth for current data traffic;

读取缓存队列中的数据,对所述数据根据帧间隔,帧头,帧尾的码型,进行变速的串行化编码;Read the data in the cache queue, and perform variable-speed serialization encoding on the data according to the frame interval, the frame header, and the code pattern of the frame tail;

将串行化编码后的数据和每个发送通道的配置信息映射到super-frame、frame、sub-frame、bursts中去,所述配置信息包括各通道的时隙映射信息。The serialized encoded data and the configuration information of each transmission channel are mapped to super-frame, frame, sub-frame, and bursts, and the configuration information includes time slot mapping information of each channel.

优选的实施下,所述方法包括:Under preferred implementation, the method includes:

为所述每个发送通道配置一所述缓存队列。One buffer queue is configured for each sending channel.

优选的实施下,所述为当前数据流量分配时隙带宽具体包括:Under preferred implementation, the allocation of time slot bandwidth for the current data traffic specifically includes:

根据当前通道端口的优先级信息及当前时隙带宽信息,按照带宽分配策略统一调配。According to the priority information of the current channel port and the bandwidth information of the current time slot, it is uniformly allocated according to the bandwidth allocation strategy.

优选的实施下,所述进行变速的串行化编码具体包括:Under preferred implementation, the serialized coding for changing the speed specifically includes:

根据时隙通道的位数,动态地选择编码的位宽和编码方式,所述编码方式包括串行编码和并行编码。According to the number of bits of the time slot channel, the encoding bit width and encoding mode are dynamically selected, and the encoding mode includes serial encoding and parallel encoding.

为了实现本发明的发明目的,本发明实施例还提供了一种基于动态时隙的解码方法,所述方法是通过以下的技术方案实现的:In order to achieve the purpose of the present invention, the embodiment of the present invention also provides a decoding method based on dynamic time slots, the method is achieved through the following technical solutions:

一种基于动态时隙的解码方法,所述方法包括:A decoding method based on dynamic time slots, said method comprising:

接收串行数据,并恢复出并行的原始数据;Receive serial data and restore parallel original data;

根据super-frame、frame、sub-frame、bursts的格式,同步解出super-frame、frame、sub-frame、bursts的时隙,并通过通道时隙映射信息,得到各通道的时隙映射表;According to the format of super-frame, frame, sub-frame, and bursts, the time slots of super-frame, frame, sub-frame, and bursts are solved synchronously, and the time slot mapping table of each channel is obtained through the channel time slot mapping information;

根据所述时隙映射表,将各通道的数据分离出来;Separate the data of each channel according to the time slot mapping table;

根据帧间隔、帧头、帧尾的码型,进行变速地解码,恢复出正常的数据帧格式。According to the code pattern of the frame interval, frame header and frame tail, it performs variable-speed decoding to restore the normal data frame format.

为了实现本发明的发明目的,本发明实施例还提供了一种基于动态时隙的编码装置,所述编码装置是通过以下的技术方案实现的:In order to achieve the purpose of the present invention, the embodiment of the present invention also provides a dynamic time slot-based encoding device, the encoding device is achieved through the following technical solutions:

一种基于动态时隙的编码装置,所述编码装置包括:An encoding device based on a dynamic time slot, the encoding device comprising:

缓存队列,用来缓存发送通道端口发来的业务数据,并统计正确帧、错误帧及缓存溢出的个数;The buffer queue is used to buffer the business data sent by the sending channel port, and count the number of correct frames, error frames and buffer overflow;

上层控制模块,用来根据缓存队列的空指针、满指针及当前水位信息判断当前的数据流量所需的时隙带宽;The upper layer control module is used to judge the time slot bandwidth required by the current data flow according to the empty pointer, full pointer and current water level information of the cache queue;

时隙分配模块,用来为当前数据流量分配时隙带宽;A time slot allocation module is used to allocate time slot bandwidth for current data traffic;

编码模块,用来读取缓存队列中的数据,对所述数据根据帧间隔,帧头,帧尾的码型,进行变速的串行化编码;The coding module is used to read the data in the cache queue, and carry out variable-speed serialization coding for the data according to the frame interval, the frame head, and the code pattern of the frame tail;

时隙映射模块,用来将串行化编码后的数据和每个发送通道的配置信息映射到super-frame、frame、sub-frame、bursts中,所述配置信息包括各通道的时隙映射信息。The time slot mapping module is used to map the serialized encoded data and the configuration information of each transmission channel to super-frame, frame, sub-frame, bursts, and the configuration information includes the time slot mapping information of each channel .

优选的实施下,所述每个发送通道都配置有一所述缓存队列。In a preferred implementation, each sending channel is configured with one buffer queue.

优选的实施下,所述时隙分配模块根据当前通道端口的优先级信息及当前时隙带宽信息,按照带宽分配策略统一调配。In a preferred implementation, the time slot allocation module is uniformly allocated according to the bandwidth allocation strategy according to the priority information of the current channel port and the bandwidth information of the current time slot.

优选的实施下,所述编码模块根据时隙通道的位数,动态地选择编码的位宽和编码方式,所述编码方式包括串行编码和并行编码。In a preferred implementation, the coding module dynamically selects a coding bit width and a coding method according to the number of bits of the time slot channel, and the coding method includes serial coding and parallel coding.

为了实现本发明的发明目的,本发明实施例还提供了一种基于动态时隙的解码装置,所述解码装置是通过以下的技术方案实现的:In order to achieve the purpose of the present invention, the embodiment of the present invention also provides a decoding device based on a dynamic time slot, and the decoding device is realized through the following technical solutions:

一种基于动态时隙的解码装置,所述解码装置包括:A decoding device based on a dynamic time slot, the decoding device comprising:

接收模块,用来接收下行的串行数据,并恢复出并行的原始数据;The receiving module is used to receive the downlink serial data and recover the parallel original data;

时隙解析模块,用来根据super-frame、frame、sub-frame、bursts的格式,同步解析出super-frame、frame、sub-frame、bursts的时隙,并通过通道时隙映射信息,得到各通道的时隙映射表;The time slot analysis module is used to synchronously analyze the time slots of super-frame, frame, sub-frame, and bursts according to the format of super-frame, frame, sub-frame, and bursts, and obtain each Channel time slot mapping table;

数据分离模块,用来根据所述时隙映射表,将各通道的数据分离出来;A data separation module, used to separate the data of each channel according to the time slot mapping table;

解码模块,用来根据帧间隔、帧头、帧尾的码型,进行变速地解码,恢复出正常的数据帧格式。The decoding module is used to perform variable-speed decoding according to the code pattern of the frame interval, frame header, and frame tail, and restore the normal data frame format.

本发明实施例通过所述基于动态时隙的编码方法及装置,解码方法及装置,使数据帧在同轴电缆或光纤通道中,可简单灵活、变长地传输,同时该方法及装置也可以运用于SDH、PDH等标准TDM业务的传输及接入,极大地节约了数据传输的带宽。The embodiment of the present invention uses the encoding method and device based on dynamic time slots, the decoding method and device, so that the data frame can be transmitted in a coaxial cable or fiber optic channel in a simple, flexible and variable-length manner. At the same time, the method and device can also It is applied to the transmission and access of standard TDM services such as SDH and PDH, which greatly saves the bandwidth of data transmission.

附图说明 Description of drawings

通过下面结合附图对其示例性实施例进行的描述,本发明上述特征和优点将会变得更加清楚和容易理解。The above-mentioned features and advantages of the present invention will become clearer and easier to understand through the following description of exemplary embodiments thereof in conjunction with the accompanying drawings.

图1为本发明实施例1一种编码方法流程图;Fig. 1 is a flow chart of an encoding method according to Embodiment 1 of the present invention;

图2为本发明实施例2一种解码方法流程图;FIG. 2 is a flowchart of a decoding method according to Embodiment 2 of the present invention;

图3为本发明实施例3一种变长帧转化为动态时隙的编、解码方法帧格式示意图;FIG. 3 is a schematic diagram of a frame format of a coding and decoding method for converting a variable-length frame into a dynamic time slot according to Embodiment 3 of the present invention;

图4为本发明实施例4一种编码装置示意图;FIG. 4 is a schematic diagram of an encoding device according to Embodiment 4 of the present invention;

图5为本发明实施例5一种解码装置示意图。Fig. 5 is a schematic diagram of a decoding device according to Embodiment 5 of the present invention.

具体实施方式 Detailed ways

下面结合附图对本发明作进一步详细说明。The present invention will be described in further detail below in conjunction with the accompanying drawings.

如图1所示,为本发明实施例1一种基于动态时隙的编码方法的流程图,所述方法包括:As shown in FIG. 1, it is a flow chart of a coding method based on a dynamic time slot in Embodiment 1 of the present invention, and the method includes:

S101.入口缓存队列统计正确帧、错误帧及缓存溢出的个数;S101. The entrance buffer queue counts the number of correct frames, error frames and buffer overflow;

S102.上层控制模块根据缓存队列的空指针、满指针及当前水位信息判断当前的数据流量所需的时隙带宽;S102. The upper layer control module judges the time slot bandwidth required for the current data flow according to the empty pointer, full pointer and current water level information of the cache queue;

S103.为当前数据流量分配时隙带宽;S103. Allocating time slot bandwidth for current data traffic;

S104.读取入口缓存队列中的数据,对所述数据根据帧间隔,帧头,帧尾的码型,进行变速的串行化编码;S104. Read the data in the entry buffer queue, and perform variable-speed serialization encoding on the data according to the frame interval, the frame header, and the code pattern of the frame tail;

S105.将串行化编码后的数据和发送通道的配置信息映射到super-frame、frame、sub-frame、bursts中去,所述配置信息包括各通道的时隙映射信息。S105. Map the serialized encoded data and the configuration information of the transmission channel to super-frame, frame, sub-frame, and bursts, where the configuration information includes time slot mapping information of each channel.

上游多个数据帧通道与编码装置相连,其帧长在一定范围内,编码装置入口侧,对每个通道端口设置入口缓存队列,丢弃超出帧长范围的数据帧。Multiple upstream data frame channels are connected to the coding device, and the frame length is within a certain range. On the entrance side of the coding device, an entry buffer queue is set for each channel port, and data frames exceeding the frame length range are discarded.

入口缓存队列统计正确帧的个数、错误帧的个数以及缓存溢出的个数。The ingress buffer queue counts the number of correct frames, the number of error frames and the number of buffer overflows.

添加CRC32校验信息至数据帧尾,校验多项式为:G(x)=x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1。Add CRC32 check information to the end of the data frame, and the check polynomial is: G(x)=x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1.

上层控制模块根据缓存队列的空指针、满指针及当前水位信息,判断当前的数据流量所需的时隙带宽。若水位较满并有溢出现象,则说明出口带宽分配过低,可以增大配置;如水位较浅并经常为空,说明出口带宽较大,可以减少配置。The upper layer control module judges the time slot bandwidth required by the current data flow according to the empty pointer, full pointer and current water level information of the cache queue. If the water level is full and overflows, it means that the egress bandwidth allocation is too low, and the configuration can be increased; if the water level is shallow and often empty, it means that the egress bandwidth is large, and the configuration can be reduced.

时隙带宽根据当前通道端口的优先级信息及当前配置的时隙带宽信息,按照分配策略,统一调配。分配策略可以是SP严格优先级或WRR加权优先级。The time slot bandwidth is uniformly allocated according to the allocation strategy according to the priority information of the current channel port and the currently configured time slot bandwidth information. The allocation policy can be SP strict priority or WRR weighted priority.

SP策略中,优先确保高优先级的调度,因此低优先级有可能出现严重丢包的现象;WRR策略中,通过对权重系数设置,平衡高低优先级调度次序。In the SP policy, high-priority scheduling is prioritized, so low priority may cause severe packet loss; in the WRR policy, the scheduling order of high and low priorities is balanced by setting the weight coefficient.

分配完每个通道的时隙带宽后,出口队列数目及各自的出口带宽也基本确立。然后按照出口队列的通道ID,轮询的读取入口缓存的数据,进入统一的串行化编码。After the time slot bandwidth of each channel is allocated, the number of egress queues and their respective egress bandwidths are basically established. Then, according to the channel ID of the egress queue, the data in the ingress cache is read in a polling manner, and entered into a unified serialization code.

串行化码型分为帧间隔,帧头,帧尾。编码中运用变速模块,灵活的把编码和出口时隙的通道数目捆绑在一起,提高编码效率,以到达线速。变速模块指的是编码中,串行执行编码还是并行执行编码,动态的选择编码的位宽:如当前时隙通道为1bit,编码模块通过串行机制实现,如当前时隙通道为6bit,编码模块通过并行6bit来实现。The serialized pattern is divided into frame interval, frame header, and frame tail. The variable speed module is used in the encoding to flexibly bundle the encoding and the channel number of the outgoing time slot together to improve the encoding efficiency and achieve the wire speed. The variable speed module refers to whether the encoding is performed serially or in parallel during the encoding, and the bit width of the encoding is dynamically selected: if the current time slot channel is 1bit, the encoding module is realized through a serial mechanism. If the current time slot channel is 6bit, the encoding module The module is realized by parallel 6bit.

帧间隔以0x7E为码型,数据按bit移位读出,如遇到连续5个bit为1,则插入一个bit的0,所以帧头的码型为前面字节为0x7E后面不是;帧尾的码型为前面不是0x7E后面是。The frame interval uses 0x7E as the code pattern, and the data is read out by bit shifting. If five consecutive bits are 1, a bit of 0 is inserted, so the code pattern of the frame header is that the previous byte is 0x7E and the following is not; the frame end The code pattern is not 0x7E in the front, but 0x7E in the back.

串行化的业务数据和发送通道配置信息统一的映射到super-frame、frame、sub-frame、bursts中去,同时把各个通道的时隙映射信息封装在配置内容中,以使解码侧可以读取。The serialized business data and transmission channel configuration information are uniformly mapped to super-frame, frame, sub-frame, and bursts, and at the same time, the time slot mapping information of each channel is encapsulated in the configuration content, so that the decoding side can read Pick.

映射完后,进入串行数据加扰通道,以获得更好的DC性能。然后,进入下After mapping, enter the serial data scrambling channel for better DC performance. Then, enter the next

行串行发送模块。加扰模块的多形式为:G(X)=X16+X5+X4+X3+1Line serial transmission module. The multiple form of the scrambling module is: G(X)=X16+X5+X4+X3+1

如图2所示,为本发明实施例2一种基于动态时隙的解码方法的流程图,所述方法包括:As shown in FIG. 2, it is a flowchart of a decoding method based on a dynamic time slot in Embodiment 2 of the present invention, and the method includes:

S201.接收串行数据,并恢复出并行的原始数据;S201. Receive serial data, and restore parallel original data;

S202.根据super-frame、frame、sub-frame、bursts的格式,同步解出super-frame、frame、sub-frame、bursts的时隙,并通过通道时隙映射信息,得到各通道的时隙映射表;S202. According to the format of super-frame, frame, sub-frame, and bursts, synchronously solve the time slots of super-frame, frame, sub-frame, and bursts, and obtain the time slot mapping of each channel through the channel time slot mapping information surface;

S203.根据所述时隙映射表,将各通道的数据分离出来;S203. Separate the data of each channel according to the time slot mapping table;

S204.根据帧间隔、帧头、帧尾的码型,进行变速地解码,恢复出正常的数据帧格式。S204. Perform variable-speed decoding according to the code patterns of the frame interval, frame header, and frame tail, and restore the normal data frame format.

上游串行数据模块首先进入SERDES通道接收到串行数据,恢复出10bit或20bit并行的原始数据及发送时钟。The upstream serial data module first enters the SERDES channel to receive the serial data, and recovers the 10bit or 20bit parallel original data and sending clock.

根据super-frame、frame、sub-frame、bursts的格式,同步解出super-frame、frame、sub-frame、bursts的时隙。通过super-frame中的通道配置信息,获取当前super-frame中各个通道的时隙映射表。According to the format of super-frame, frame, sub-frame, and bursts, the time slots of super-frame, frame, sub-frame, and bursts are solved synchronously. Obtain the time slot mapping table of each channel in the current super-frame through the channel configuration information in the super-frame.

然后,按照时隙映射表,把各个通道的数据分离出来,进行各自的解码。Then, according to the time slot mapping table, the data of each channel is separated and decoded separately.

解码中运用变速模块,灵活动态地与时隙通道捆绑,以提高解码效率,达到线速。解码中,按照帧间隔,帧头,帧尾的码型,恢复出正常的数据帧格式。变速模块指的是解码中,串行执行解码还是并行执行解码,动态地选择并行解码的位宽;如当前时隙通道为1bit,解码通过串行机制实现,如当前时隙通道为6bit,解码通过并行6bit来实现。The variable speed module is used in the decoding, which is flexibly and dynamically bundled with the time slot channel to improve the decoding efficiency and achieve line speed. During decoding, the normal data frame format is restored according to the code pattern of the frame interval, frame header, and frame tail. The variable speed module refers to whether decoding is performed serially or in parallel during decoding, and the bit width of parallel decoding is dynamically selected; if the current time slot channel is 1bit, the decoding is realized through a serial mechanism; if the current time slot channel is 6bit, the decoding Realized by parallel 6bit.

解码中,如遇到0x7E,则代表帧间隔;帧头的码型为前面个字节为0x7E后面不是;帧尾的码型为前面不是0x7E后面是;帧中如遇到连续5个bit为1,则删除后面的0。During decoding, if 0x7E is encountered, it represents the frame interval; the code type of the frame header is that the first byte is 0x7E and the following is not; the code type of the frame end is that the front is not 0x7E, and the following is 1, delete the following 0.

恢复出的数据帧进入检测模块,校验数据帧的正确性。同时对所有通道进行统计,记录正确接收的数据帧,错误的数据帧,各个帧长的统计值,同时截取帧尾的CRC32校验信息。解码并进行校验后的数据帧,进入出口缓存队列。The recovered data frame enters the detection module to verify the correctness of the data frame. At the same time, it makes statistics on all channels, records correctly received data frames, wrong data frames, statistical values of each frame length, and intercepts CRC32 check information at the end of the frame. The decoded and verified data frame enters the egress buffer queue.

如图3所示,为本发明实施例3一种变长帧转化为动态时隙的编、解码方法中的帧格式,所述帧格式包括:As shown in Figure 3, it is a frame format in a method for encoding and decoding a variable-length frame into a dynamic time slot in Embodiment 3 of the present invention, and the frame format includes:

传输通道中由4种时隙帧组成,分为super-frame、frame、sub-frame、bursts。水平方向上,每个frame由16个sub-frame组成;垂直方向上,每个super-frame由16个frame组成,所以整个super-frame由16*16=256sub-frame组成。每个sub-frame长度是可设置的,如sub-frame是125us,相当于125000bit。CH(configuration head)存放同步信息、通道配置信息、时隙映射表。The transmission channel consists of four types of time slot frames, which are divided into super-frame, frame, sub-frame, and bursts. In the horizontal direction, each frame consists of 16 sub-frames; in the vertical direction, each super-frame consists of 16 frames, so the entire super-frame consists of 16*16=256 sub-frames. The length of each sub-frame is configurable, for example, the sub-frame is 125us, which is equivalent to 125000bit. CH (configuration head) stores synchronization information, channel configuration information, and time slot mapping table.

本发明实施例通过所述基于动态时隙的编码方法,解码方法,使数据帧在同轴电缆或光纤通道中,可简单灵活、变长地传输,同时该方法及装置也可以运用于SDH、PDH等标准TDM业务的传输及接入,极大地节约了数据传输的带宽。In the embodiment of the present invention, through the encoding method and decoding method based on the dynamic time slot, the data frame can be transmitted in a coaxial cable or fiber channel in a simple, flexible and variable length manner. At the same time, the method and device can also be applied to SDH, The transmission and access of standard TDM services such as PDH greatly saves the bandwidth of data transmission.

为了实现本发明的发明目的,如图4所示,本发明实施例还提供了一种基于动态时隙的编码装置,所述编码装置是通过以下的技术方案实现的:In order to achieve the purpose of the present invention, as shown in Figure 4, an embodiment of the present invention also provides a dynamic time slot-based encoding device, the encoding device is implemented through the following technical solutions:

一种基于动态时隙的编码装置,所述编码装置包括:An encoding device based on a dynamic time slot, the encoding device comprising:

缓存队列,用来缓存发送通道端口发来的业务数据,并统计正确帧、错误帧及缓存溢出的个数;The buffer queue is used to buffer the business data sent by the sending channel port, and count the number of correct frames, error frames and buffer overflow;

上层控制模块,用来根据缓存队列的空指针、满指针及当前水位信息判断当前的数据流量所需的时隙带宽;The upper layer control module is used to judge the time slot bandwidth required by the current data flow according to the empty pointer, full pointer and current water level information of the cache queue;

时隙分配模块,用来为当前数据流量分配时隙带宽;A time slot allocation module is used to allocate time slot bandwidth for current data traffic;

编码模块,用来读取缓存队列中的数据,对所述数据根据帧间隔,帧头,帧尾的码型,进行变速的串行化编码;The coding module is used to read the data in the cache queue, and carry out variable-speed serialization coding for the data according to the frame interval, the frame head, and the code pattern of the frame tail;

时隙映射模块,用来将串行化编码后的数据和每个发送通道的配置信息映射到super-frame、frame、sub-frame、bursts中,所述配置信息包括各通道的时隙映射信息。The time slot mapping module is used to map the serialized encoded data and the configuration information of each transmission channel to super-frame, frame, sub-frame, bursts, and the configuration information includes the time slot mapping information of each channel .

优选的实施下,所述每个发送通道都配置有一所述缓存队列。In a preferred implementation, each sending channel is configured with one buffer queue.

优选的实施下,所述时隙分配模块根据当前通道端口的优先级信息及当前时隙带宽信息,按照带宽分配策略统一调配。In a preferred implementation, the time slot allocation module is uniformly allocated according to the bandwidth allocation strategy according to the priority information of the current channel port and the bandwidth information of the current time slot.

优选的实施下,所述编码模块根据时隙通道的位数,动态地选择编码的位宽和编码方式,所述编码方式包括串行编码和并行编码。In a preferred implementation, the coding module dynamically selects a coding bit width and a coding method according to the number of bits of the time slot channel, and the coding method includes serial coding and parallel coding.

为了实现本发明的发明目的,如图5所示,本发明实施例5还提供了一种基于动态时隙的解码装置,所述解码装置是通过以下的技术方案实现的:In order to achieve the purpose of the present invention, as shown in Figure 5, Embodiment 5 of the present invention also provides a decoding device based on a dynamic time slot, and the decoding device is realized through the following technical solutions:

一种基于动态时隙的解码装置,所述解码装置包括:A decoding device based on a dynamic time slot, the decoding device comprising:

接收模块,用来接收下行的串行数据,并恢复出并行的原始数据;The receiving module is used to receive the downlink serial data and recover the parallel original data;

时隙解析模块,用来根据super-frame、frame、sub-frame、bursts的格式,同步解析出super-frame、frame、sub-frame、bursts的时隙,并通过通道时隙映射信息,得到各通道的时隙映射表;The time slot analysis module is used to synchronously analyze the time slots of super-frame, frame, sub-frame, and bursts according to the format of super-frame, frame, sub-frame, and bursts, and obtain each Channel time slot mapping table;

数据分离模块,用来根据所述时隙映射表,将各通道的数据分离出来;A data separation module, used to separate the data of each channel according to the time slot mapping table;

解码模块,用来根据帧间隔、帧头、帧尾的码型,进行变速地解码,恢复出正常的数据帧格式。The decoding module is used to perform variable-speed decoding according to the code pattern of the frame interval, frame header, and frame tail, and restore the normal data frame format.

本发明实施例通过所述基于动态时隙的编码装置,解码装置,使数据帧在同轴电缆或光纤通道中,可简单灵活、变长地传输,同时该方法及装置也可以运用于SDH、PDH等标准TDM业务的传输及接入,极大地节约了数据传输的带宽。The embodiment of the present invention uses the encoding device and decoding device based on the dynamic time slot, so that the data frame can be transmitted in a coaxial cable or fiber channel in a simple, flexible and variable length manner. At the same time, the method and device can also be applied to SDH, The transmission and access of standard TDM services such as PDH greatly saves the bandwidth of data transmission.

本发明所属领域的一般技术人员可以理解,本发明以上实施例仅为本发明的优选实施例之一,为篇幅限制,这里不能逐一列举所有实施方式,任何可以体现本发明权利要求技术方案的实施,都在本发明的保护范围内。Those of ordinary skill in the field of the present invention can understand that the above embodiment of the present invention is only one of the preferred embodiments of the present invention, and is limited by space. All implementation modes cannot be listed here one by one, and any implementation that can embody the technical solution of the claims of the present invention , are all within the protection scope of the present invention.

需要注意的是,以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施方式仅限于此,在本发明的上述指导下,本领域技术人员可以在上述实施例的基础上进行各种改进和变形,而这些改进或者变形落在本发明的保护范围内。It should be noted that the above content is a further detailed description of the present invention in conjunction with specific embodiments, and it cannot be determined that the specific embodiments of the present invention are limited thereto. Under the guidance of the present invention, those skilled in the art can Various improvements and modifications are made on the basis of the invention, and these improvements or modifications fall within the protection scope of the present invention.

Claims (10)

1. the coding method based on dynamic slot is characterized in that, said method comprises:
The number that buffer queue statistical correction frame, erroneous frame and the buffer memory of inlet overflows;
The upper strata control module is judged the current required time slot bandwidth of data traffic according to the null pointer of buffer queue, full pointer and current water level information;
Be current data assignment of traffic time slot bandwidth;
Read the data in the buffer queue, to said data based frame period, frame head, the sign indicating number type of postamble carries out the serialization of speed change and encodes;
The configuration information of the data behind the serialization coding and each sendaisle is mapped among super-frame, frame, sub-frame, the bursts, and said configuration information comprises the time slot mapping information of each passage.
2. the method for claim 1 is characterized in that, said method comprises:
For said each sendaisle disposes a said buffer queue.
3. method as claimed in claim 2 is characterized in that, saidly specifically comprises for current data assignment of traffic time slot bandwidth:
According to the precedence information and the current time slots bandwidth information of current access port, according to the unified allocation of resources of allocated bandwidth strategy.
4. method as claimed in claim 3 is characterized in that, the said serialization coding that carries out speed change specifically comprises:
According to the figure place of time slot passage, dynamically select the bit wide and the coded system of coding, said coded system comprises serial code and parallel encoding.
5. the coding/decoding method based on dynamic slot is characterized in that, said method comprises:
Receive serial data, and recover parallel initial data;
According to the form of super-frame, frame, sub-frame, bursts, solve the time slot of super-frame, frame, sub-frame, bursts synchronously, and, obtain the time slot mapping table of each passage through the channel slot map information;
According to said time slot mapping table, the data separating of each passage is come out;
According to the sign indicating number type of frame period, frame head, postamble, carry out the decoding of speed change ground, recover normal data frame format.
6. the code device based on dynamic slot is characterized in that, said code device comprises:
Buffer queue is used for the business datum that buffer memory sendaisle port sends, and statistical correction frame, erroneous frame and the buffer memory number of overflowing;
The upper strata control module is used for judging the current required time slot bandwidth of data traffic according to the null pointer of buffer queue, full pointer and current water level information;
The time slot allocation module is used for being current data assignment of traffic time slot bandwidth;
Coding module is used for reading the data in the buffer queue, to said data based frame period, and frame head, the sign indicating number type of postamble carries out the serialization of speed change and encodes;
The time slot mapping module is used for the configuration information of the data behind the serialization coding and each sendaisle is mapped among super-frame, frame, sub-frame, the bursts, and said configuration information comprises the time slot mapping information of each passage.
7. code device as claimed in claim 6 is characterized in that, said each sendaisle all disposes a said buffer queue.
8. code device as claimed in claim 7 is characterized in that, said time slot allocation module is according to the precedence information and the current time slots bandwidth information of current access port, according to the unified allocation of resources of allocated bandwidth strategy.
9. code device as claimed in claim 8 is characterized in that, said coding module is dynamically selected the bit wide and the coded system of coding according to the figure place of time slot passage, and said coded system comprises serial code and parallel encoding.
10. the decoding device based on dynamic slot is characterized in that, said decoding device comprises:
Receiver module is used for receiving descending serial data, and recovers parallel initial data;
The time slot parsing module; Be used for form according to super-frame, frame, sub-frame, bursts; Parse the time slot of super-frame, frame, sub-frame, bursts synchronously, and, obtain the time slot mapping table of each passage through the channel slot map information;
The data separating module is used for according to said time slot mapping table the data separating of each passage being come out;
Decoder module is used for sign indicating number type according to frame period, frame head, postamble, carries out the decoding of speed change ground, recovers normal data frame format.
CN201110202161.5A 2011-07-19 2011-07-19 Encoding method and device as well as decoding method and device based on dynamic time slot Expired - Fee Related CN102325006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110202161.5A CN102325006B (en) 2011-07-19 2011-07-19 Encoding method and device as well as decoding method and device based on dynamic time slot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110202161.5A CN102325006B (en) 2011-07-19 2011-07-19 Encoding method and device as well as decoding method and device based on dynamic time slot

Publications (2)

Publication Number Publication Date
CN102325006A true CN102325006A (en) 2012-01-18
CN102325006B CN102325006B (en) 2014-04-30

Family

ID=45452682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110202161.5A Expired - Fee Related CN102325006B (en) 2011-07-19 2011-07-19 Encoding method and device as well as decoding method and device based on dynamic time slot

Country Status (1)

Country Link
CN (1) CN102325006B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012103829A3 (en) * 2012-03-20 2013-02-21 华为技术有限公司 Method, device and system for transmitting data in coaxial network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1541464A (en) * 2001-08-10 2004-10-27 ��������λ�Ƽ���˾ Dynamic link adaption for time division duplex (TDD)
CN1964275A (en) * 2005-11-08 2007-05-16 中兴通讯股份有限公司 A realization method to dynamically change maximum length of bandwidth request
EP2249487A2 (en) * 2009-05-05 2010-11-10 Gilat Satellite Networks, Inc. Elastic access scheme for two-way satellite communication systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1541464A (en) * 2001-08-10 2004-10-27 ��������λ�Ƽ���˾ Dynamic link adaption for time division duplex (TDD)
CN1964275A (en) * 2005-11-08 2007-05-16 中兴通讯股份有限公司 A realization method to dynamically change maximum length of bandwidth request
EP2249487A2 (en) * 2009-05-05 2010-11-10 Gilat Satellite Networks, Inc. Elastic access scheme for two-way satellite communication systems

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012103829A3 (en) * 2012-03-20 2013-02-21 华为技术有限公司 Method, device and system for transmitting data in coaxial network

Also Published As

Publication number Publication date
CN102325006B (en) 2014-04-30

Similar Documents

Publication Publication Date Title
US12074643B2 (en) Data transmission method and apparatus, terminal device and storage medium
CN106301678B (en) Data processing method, communication equipment and communication system
CN101227450B (en) Equipment, system and method for transmitting spending information
KR20210038959A (en) Service transmission method, equipment and computer storage medium
CN102752674B (en) Capturing circuit and writing control method of 10G EPON (10 Giga Ethernet Passive Optical Network) message
CN105406937B (en) Frame fixing method and device
CN106330417B (en) Method and device for data bearing and method and device for data analysis
CN102255809A (en) Method and apparatus for transmitting packet in optical transport network
CN102196321A (en) Method for transmitting 100GE (100gigabit Ethernet) data in OTN (Optical Transport Network) and data sending device
CN101035143B (en) Physical layer chip, signal transmission method and switch
JP2023523462A (en) Service data processing method, service data exchange method, service data extraction method and computer readable medium
CN105790883A (en) Signal processing method and communication device
JP2002185419A (en) Method for use in unit of communication system and unit
US8718069B2 (en) Transmission apparatus and signal transmission method for mapping packets in frames of synchronous network
KR102309444B1 (en) Data encapsulation, transmission methods, devices and computer storage media
CN102377675B (en) Dynamic bandwidth distribution method, device and system
CN102325006A (en) Encoding method and device, decoding method and device based on dynamic time slot
WO2021013025A1 (en) Data receiving method and apparatus, and data sending method and apparatus
EP2334096B1 (en) Method and device for large capacity cross in optical channel data unit
CN105959626B (en) A kind of monitoring display screen configuration information transmission method and device
CN102916910B (en) Synchronous multiplexing method on basis of asynchronous system
CN113853014A (en) Information transmission method, device, related equipment and storage medium
CN102215173A (en) Ethernet service transmitting and receiving method and device capable of dynamically configuring bandwidth
CN115065439B (en) A kind of SPN network constant bit rate service transmission method and device
CN117354159A (en) Slicing method, service processing method, communication node and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 201209 Chuansha Road, Shanghai, No. 221, room 11, building 955

Applicant after: BOCOM SMART NETWORK TECHNOLOGIES Inc.

Address before: 201209 Chuansha Road, Shanghai, No. 221, room 11, building 955

Applicant before: Shanghai Bocom Intelligent Network Technology Co.,Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 201209 Chuansha Road, Shanghai, No. 221, room 11, building 955

Patentee after: Shanghai Bocom Network Technology Co.,Ltd.

Address before: 201209 Chuansha Road, Shanghai, No. 221, room 11, building 955

Patentee before: BOCOM Smart Network Technologies Inc.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140430