WO2016070668A1 - Method, device, and computer storage medium for implementing data format conversion - Google Patents

Method, device, and computer storage medium for implementing data format conversion Download PDF

Info

Publication number
WO2016070668A1
WO2016070668A1 PCT/CN2015/087549 CN2015087549W WO2016070668A1 WO 2016070668 A1 WO2016070668 A1 WO 2016070668A1 CN 2015087549 W CN2015087549 W CN 2015087549W WO 2016070668 A1 WO2016070668 A1 WO 2016070668A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
beat
indication signal
spliced
switching position
Prior art date
Application number
PCT/CN2015/087549
Other languages
French (fr)
Chinese (zh)
Inventor
刘飞
陈亚亮
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016070668A1 publication Critical patent/WO2016070668A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

Provided in embodiments of the present invention are a method, device, and computer storage medium for implementing data format conversion. Segment format data is written into a cache, a polling read operation is performed on the cache to produce input data, any invalid byte in the input data is removed to produce invalid byte-removed input data, when beats of data containing multiple channels are determined to be present in the invalid byte-removed input data, the beats of data are spliced, and, spliced data is acquired and outputted.

Description

一种实现数据格式转换的方法、装置及计算机存储介质Method, device and computer storage medium for realizing data format conversion 技术领域Technical field
本发明涉及基于芯片间高速数据传输协议的数据格式传输技术,尤其涉及一种实现数据格式转换的方法、装置及计算机存储介质。The invention relates to a data format transmission technology based on an inter-chip high-speed data transmission protocol, in particular to a method, a device and a computer storage medium for realizing data format conversion.
背景技术Background technique
Interlaken是一种芯片间高速数据传输协议,能够实现高带宽及高可靠性的包传输。为了提高Interlaken接口的传输效率,分段(segment)格式数据被提出。在分段格式数据中,每一拍数据被分割成若干切片,每个切片具有独立的有效指示信号、无效字节指示信号、以及通道指示信号,且每一个切片都可能是以太网包头或包尾。而在非分段(no segment)格式数据中,每一拍数据只有一个有效指示信号、一个无效字节指示信号、一个通道指示信号、以及一个以太网包头或包尾指示信号。Interlaken is an inter-chip high-speed data transmission protocol that enables high-bandwidth and high-reliability packet transmission. In order to improve the transmission efficiency of the Interlaken interface, segment format data is proposed. In the segment format data, each beat data is divided into several slices, each slice having an independent valid indication signal, an invalid byte indication signal, and a channel indication signal, and each slice may be an Ethernet header or a packet. tail. In the non-segment format data, each beat data has only one valid indication signal, one invalid byte indication signal, one channel indication signal, and one Ethernet header or trailer end indication signal.
鉴于非分段格式数据的上述特点,可以看出非分段格式数据更便于数据的处理和传输,但目前并没有相关技术涉及从分段格式数据至非分段格式数据的转换。In view of the above characteristics of the non-segment format data, it can be seen that the non-segment format data is more convenient for data processing and transmission, but there is currently no related art related to conversion from segment format data to non-segment format data.
发明内容Summary of the invention
本发明实施例期望提供一种实现数据格式转换的方法、装置及计算机存储介质,能够实现从分段格式数据至非分段格式数据的转换。Embodiments of the present invention are desirable to provide a method, apparatus, and computer storage medium for implementing data format conversion, which can implement conversion from segmented format data to non-segmented format data.
本发明实施例的技术方案是这样实现的:The technical solution of the embodiment of the present invention is implemented as follows:
本发明实施例提供一种实现数据格式转换的方法,所述方法包括:An embodiment of the present invention provides a method for implementing data format conversion, where the method includes:
将分段格式数据写入缓存器;Write segmented format data to the buffer;
对所述缓存器进行轮询读操作,获得输入数据; Performing a polling read operation on the buffer to obtain input data;
去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;Removing invalid bytes in the input data to obtain input data after removing invalid bytes;
当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。When it is determined that the beat data including the plurality of channels exists in the input data after the invalid byte is removed, the beat data is spliced, and the stitched data is obtained and output.
上述方案中,所述将分段格式数据写入缓存器,包括:In the above solution, the segment format data is written into the buffer, including:
利用每一拍分段格式数据中第一个切片的有效指示信号进行缓存器的写控制操作;Performing a write control operation of the buffer by using a valid indication signal of the first slice in each beat segment format data;
响应所述写控制操作,将每一拍分段格式数据中每个切片的指示信号和通道数据写入缓存器。In response to the write control operation, an indication signal and channel data for each slice in each beat segment format data is written to the buffer.
上述方案中,所述当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,包括:In the above solution, when it is determined that there is a beat data including a plurality of channels in the input data after the invalid byte is removed, the stitching processing is performed on the beat data, including:
当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,确定通道切换位置;Determining a channel switching position when it is determined that there is a beat data containing a plurality of channels in the input data after the invalid byte is removed;
根据所述通道切换位置将所述拍数据分为通道切换位置前的对应数据和通道切换位置后的对应数据;And dividing the beat data into corresponding data before the channel switching position and corresponding data after the channel switching position according to the channel switching position;
将通道切换位置后的对应数据进行暂存,通道切换位置前的对应数据与已暂存的前一拍通道切换位置后的对应数据进行一次拼接,得到拼接处理后的数据。The corresponding data after the channel switching position is temporarily stored, and the corresponding data before the channel switching position and the corresponding data after the temporarily switched channel switching position are once spliced to obtain the spliced data.
上述方案中,所述方法还包括:当确定所输出的拼接处理后的数据中含有包尾指示信号时,根据包尾指示信号后字节数与非分段格式数据位宽的大小关系对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存。In the above solution, the method further includes: when determining that the outputted spliced data includes a packet tail indication signal, according to the size relationship between the number of bytes after the end of the packet indication signal and the non-segmented format data width The byte after the end of the packet indication signal in the output spliced data is temporarily stored.
上述方案中,所述方法还包括:当确定所输出的拼接处理后的数据中同时存在若干组满足非分段格式数据时,将多路非分段格式数据转换为一路非分段格式数据。In the above solution, the method further includes converting the multi-path non-segment format data into one non-segment format data when it is determined that the outputted spliced data has several groups satisfying the non-segment format data.
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存 储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述实现数据格式转换的方法。An embodiment of the present invention further provides a computer storage medium, where the computer storage medium is stored The computer executable instructions are used to execute the method for implementing data format conversion according to the embodiment of the present invention.
本发明实施例还提供一种实现数据格式转换的装置,所述装置包括写数据模块、读数据模块、去除模块和拼接处理模块;其中,An embodiment of the present invention further provides an apparatus for implementing data format conversion, where the apparatus includes a write data module, a read data module, a removal module, and a splicing processing module;
所述写数据模块,配置为将分段格式数据写入缓存器;The write data module is configured to write the segment format data into the buffer;
所述读数据模块,配置为对所述缓存器进行轮询读操作,获得输入数据;The read data module is configured to perform a polling read operation on the buffer to obtain input data;
所述去除模块,配置为去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;The removing module is configured to remove invalid bytes in the input data, and obtain input data after removing invalid bytes;
所述拼接处理模块,配置为当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。The splicing processing module is configured to perform splicing processing on the beat data when the tempo data containing the plurality of channels exists in the input data after the invalid byte is removed, and obtain and output the spliced data.
上述方案中,所述写数据模块包括写控制单元和写数据单元;其中,In the above solution, the write data module includes a write control unit and a write data unit; wherein
所述写控制单元,配置为利用每一拍分段格式数据中第一个切片的有效指示信号进行缓存器的写控制操作;The write control unit is configured to perform a write control operation of the buffer by using a valid indication signal of the first slice in each beat segment format data;
所述写数据单元,配置为响应所述写控制操作,将每一拍分段格式数据中每个切片的指示信号和通道数据写入缓存器。The write data unit is configured to, in response to the write control operation, write an indication signal and channel data for each slice in each beat segment format data to a buffer.
上述方案中,所述拼接处理模块包括确定单元、数据拆分单元和拼接处理单元;其中,In the above solution, the splicing processing module includes a determining unit, a data splitting unit, and a splicing processing unit;
所述确定单元,配置为当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,确定通道切换位置;The determining unit is configured to determine a channel switching position when there is beat data including a plurality of channels in the input data after determining the removal of the invalid byte;
所述数据拆分单元,配置为根据所述通道切换位置将所述拍数据分为通道切换位置前的对应数据和通道切换位置后的对应数据;The data splitting unit is configured to divide the beat data into corresponding data before the channel switching position and corresponding data after the channel switching position according to the channel switching position;
所述拼接处理单元,配置为将通道切换位置后的对应数据进行暂存,通道切换位置前的对应数据与已暂存的前一拍通道切换位置后的对应数据 进行一次拼接,得到拼接处理后的数据。The splicing processing unit is configured to temporarily store corresponding data after the channel switching position, corresponding data before the channel switching position and corresponding data after the temporarily switched previous channel switching position Perform a splicing to obtain the spliced data.
上述方案中,所述装置还包括包尾处理模块;其中,In the above solution, the device further includes a tail processing module;
所述包尾处理模块,配置为当确定所输出的拼接处理后的数据中含有包尾指示信号时,根据包尾指示信号后字节数与非分段格式数据位宽的大小关系对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存。The packet tail processing module is configured to: when it is determined that the outputted spliced data includes a tail end indication signal, outputting according to the size relationship between the number of bytes of the packet end indication signal and the non-segment format data bit width In the spliced data, the bytes following the end of the packet indication signal are temporarily stored.
上述方案中,所述装置还包括转换模块;其中,In the above solution, the device further includes a conversion module; wherein
所述转换模块,配置为当确定所输出的拼接处理后的数据中同时存在若干组满足非分段格式数据时,将多路非分段格式数据转换为一路非分段格式数据。The conversion module is configured to convert the multi-path non-segment format data into one non-segment format data when it is determined that the outputted spliced data has several sets of data satisfying the non-segment format.
本发明实施例所提供的实现数据格式转换的方法、装置及计算机存储介质,将分段格式数据写入缓存器,对所述缓存器进行轮询读操作,获得输入数据,去除所述输入数据中的无效字节,得到去除无效字节后的输入数据,当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。如此,能够实现从分段格式数据至非分段格式数据的转换,从而提高Interlaken接口的传输效率。The method and device for implementing data format conversion and the computer storage medium provided by the embodiments of the present invention write segment data into a buffer, perform a polling read operation on the buffer, obtain input data, and remove the input data. In the invalid byte, the input data after the invalid byte is removed, and when it is determined that the data of the plurality of channels is included in the input data after the invalid byte is removed, the beat data is spliced to obtain Output the stitched data. In this way, the conversion from segmented format data to non-segmented format data can be realized, thereby improving the transmission efficiency of the Interlaken interface.
附图说明DRAWINGS
图1为本发明实施例实现数据格式转换的方法的流程示意图一;1 is a schematic flowchart 1 of a method for implementing data format conversion according to an embodiment of the present invention;
图2为本发明实施例所述将分段格式数据写入缓存器的流程示意图;2 is a schematic flowchart of writing segment format data into a buffer according to an embodiment of the present invention;
图3为本发明实施例所述对数据进行拼接处理的流程示意图;3 is a schematic flowchart of splicing processing data according to an embodiment of the present invention;
图4为本发明实施例所述对数据进行拼接处理的实例效果图;FIG. 4 is a schematic diagram showing an example of splicing processing data according to an embodiment of the present invention; FIG.
图5为本发明实施例实现数据格式转换的方法的流程示意图二;FIG. 5 is a schematic flowchart 2 of a method for implementing data format conversion according to an embodiment of the present invention;
图6为本发明实施例所述对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存的实例效果图; FIG. 6 is a schematic diagram showing an example of temporary storage of bytes after the end-of-package indication signal in the outputted spliced data according to an embodiment of the present invention; FIG.
图7为本发明实施例实现数据格式转换的方法的流程示意图三;FIG. 7 is a schematic flowchart 3 of a method for implementing data format conversion according to an embodiment of the present invention;
图8为本发明实施例所述将多路非分段格式数据转换为一路非分段格式数据的流程示意图;FIG. 8 is a schematic flowchart of converting multi-channel non-segment format data into one non-segment format data according to an embodiment of the present invention; FIG.
图9为本发明一应用实例实现数据格式转换的方法的流程示意图;FIG. 9 is a schematic flowchart diagram of a method for implementing data format conversion according to an application example of the present invention;
图10为本发明实施例实现数据格式转换的装置的组成结构示意图一;10 is a schematic structural diagram 1 of a device for implementing data format conversion according to an embodiment of the present invention;
图11为本发明实施例实现数据格式转换的装置中所述写数据模块的组成结构示意图;FIG. 11 is a schematic structural diagram of a structure of a write data module in an apparatus for implementing data format conversion according to an embodiment of the present invention;
图12为本发明实施例实现数据格式转换的装置中所述拼接处理模块的组成结构示意图;FIG. 12 is a schematic structural diagram of a structure of the splicing processing module in an apparatus for implementing data format conversion according to an embodiment of the present invention;
图13为本发明实施例实现数据格式转换的装置的组成结构示意图二;FIG. 13 is a schematic structural diagram 2 of a device for implementing data format conversion according to an embodiment of the present invention; FIG.
图14为本发明实施例实现数据格式转换的装置的组成结构示意图三。FIG. 14 is a schematic structural diagram 3 of a device for implementing data format conversion according to an embodiment of the present invention.
具体实施方式detailed description
在本发明实施例中,将分段格式数据写入缓存器,对所述缓存器进行轮询读操作,获得输入数据,去除所述输入数据中的无效字节,得到去除无效字节后的输入数据,当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。In the embodiment of the present invention, the segment format data is written into the buffer, the buffer is subjected to a polling read operation, the input data is obtained, the invalid bytes in the input data are removed, and the invalid bytes are removed. Input data, when it is determined that there is a plurality of channels of beat data in the input data after the invalid bytes are removed, the stitched data is stitched, and the stitched data is obtained and output.
下面结合附图及具体实施例对本发明再作进一步详细的说明。The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
实施例一 Embodiment 1
图1为本发明实施例实现数据格式转换的方法的流程示意图一,如图1所示,本发明实施例实现数据格式转换的方法包括:FIG. 1 is a schematic flowchart 1 of a method for implementing data format conversion according to an embodiment of the present invention. As shown in FIG. 1 , a method for implementing data format conversion according to an embodiment of the present invention includes:
步骤S101:将分段格式数据写入缓存器;Step S101: Writing segment format data into the buffer;
这里,所述缓存器可以为先入先出数据缓存器(FIFO,First Input First Output)或其他可读写存储器。Here, the buffer may be a first input first output (FIFO) or other readable and writable memory.
在一实施例中,如图2所示,所述将分段格式数据写入缓存器,包括: In an embodiment, as shown in FIG. 2, the writing of the segment format data to the buffer includes:
步骤S101a:利用每一拍分段格式数据中第一个切片的有效指示信号进行缓存器的写控制操作;Step S101a: performing a write control operation of the buffer by using a valid indication signal of the first slice in each beat segment format data;
步骤S101b:响应所述写控制操作,将每一拍分段格式数据中每个切片的指示信号和通道数据写入缓存器。Step S101b: In response to the write control operation, the indication signal and the channel data of each slice in each beat segment format data are written into the buffer.
其中,所述每个切片的指示信号包括有效指示信号、通道指示信号、包头或包尾指示信号、以及无效字节指示信号。The indication signal of each slice includes a valid indication signal, a channel indication signal, a packet header or a trailer end indication signal, and an invalid byte indication signal.
步骤S102:对所述缓存器进行轮询读操作,获得输入数据;Step S102: Perform a polling read operation on the buffer to obtain input data.
具体地,在对所述缓存器进行轮询读操作的过程中,每次轮询读缓存器的个数与非分段格式数据位宽相关。Specifically, during the polling read operation of the buffer, the number of polling read buffers per time is related to the non-segment format data bit width.
这里,由于Interlaken接口是以64bit为一个传输单位,因此每次轮询读先进先出数据缓存器的个数与64bit的乘积等于非分段格式数据位宽。Here, since the Interlaken interface is a transmission unit of 64 bits, the product of the number of FIFO data buffers and the 64 bits per polling is equal to the data width of the non-segment format format.
需要说明的是,所述非分段格式数据位宽可以根据实际应用中对数据传输性能要求来预先设置。It should be noted that the non-segment format data bit width may be preset according to data transmission performance requirements in an actual application.
步骤S103:去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;Step S103: removing invalid bytes in the input data, and obtaining input data after removing invalid bytes;
具体地,首先根据所述输入数据中的有效指示信号去除部分无效数据,再根据所述输入数据中的无效字节指示信号,去除所述输入数据中的无效字节。Specifically, first, the partial invalid data is removed according to the valid indication signal in the input data, and the invalid byte in the input data is removed according to the invalid byte indication signal in the input data.
步骤S104:当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。Step S104: When it is determined that the beat data containing the plurality of channels exists in the input data after the invalid byte is removed, the beat data is spliced, and the stitched data is obtained and output.
具体地,通过步骤S104可以将所述拼接处理后的数据输出至寄存器;所述寄存器可以为随机存取存储器(RAM,Random Access Memory)。Specifically, the spliced data may be output to a register through step S104; the register may be a random access memory (RAM).
在一实施例中,如图3所示,所述当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,包括: In an embodiment, as shown in FIG. 3, when it is determined that the data of the plurality of channels is included in the input data after the invalid byte is removed, the stitching processing is performed on the beat data, including:
步骤S104a:当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,确定通道切换位置;Step S104a: determining that the channel switching position is determined when there is beat data including a plurality of channels in the input data after the invalid byte is removed;
具体地,遍历所述拍数据,通过查找通道切换标识的方式确定所述拍数据中的通道切换位置。Specifically, the beat data is traversed, and the channel switching position in the beat data is determined by finding a channel switching identifier.
步骤S104b:根据所述通道切换位置将所述拍数据分为通道切换位置前的对应数据和通道切换位置后的对应数据;Step S104b: dividing the beat data into corresponding data before the channel switching position and corresponding data after the channel switching position according to the channel switching position;
步骤S104c:将通道切换位置后的对应数据进行暂存,通道切换位置前的对应数据与已暂存的前一拍通道切换位置后的对应数据进行一次拼接,得到拼接处理后的数据。Step S104c: temporarily storing the corresponding data after the channel switching position, and splicing the corresponding data before the channel switching position with the corresponding data after the temporarily switched channel switching position to obtain the spliced data.
本发明实施例所述对含有多个通道的拍数据进行拼接处理的实例效果如图4所示。如此,通过本发明实施例所述实现数据格式转换的方法,能够实现从分段格式数据至非分段格式数据的转换,从而提高Interlaken接口的传输效率。An example effect of splicing the beat data containing a plurality of channels as shown in the embodiment of the present invention is shown in FIG. 4 . As such, the method for implementing data format conversion according to the embodiment of the present invention can implement conversion from segment format data to non-segment format data, thereby improving the transmission efficiency of the Interlaken interface.
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述实现数据格式转换的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for implementing data format conversion according to the embodiment of the invention.
实施例二 Embodiment 2
图5为本发明实施例实现数据格式转换的方法的流程示意图二,如图5所示,本发明实施例实现数据格式转换的方法包括:FIG. 5 is a schematic flowchart 2 of a method for implementing data format conversion according to an embodiment of the present invention. As shown in FIG. 5, a method for implementing data format conversion according to an embodiment of the present invention includes:
步骤S101:将分段格式数据写入缓存器;Step S101: Writing segment format data into the buffer;
步骤S102:对所述缓存器进行轮询读操作,获得输入数据;Step S102: Perform a polling read operation on the buffer to obtain input data.
步骤S103:去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;Step S103: removing invalid bytes in the input data, and obtaining input data after removing invalid bytes;
步骤S104:当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数 据;Step S104: When it is determined that the data of the plurality of channels is included in the input data after the invalid byte is removed, the stitching data is spliced, and the number of the stitched processing is obtained and outputted. according to;
本发明实施例二中的步骤S101至步骤S104可以分别对应地参见实施例一中的步骤S101至步骤S104,为节约篇幅,这里不再赘述。Steps S101 to S104 in the second embodiment of the present invention can be referred to the steps S101 to S104 in the first embodiment, respectively.
步骤S201:当确定所输出的拼接处理后的数据中含有包尾指示信号时,根据包尾指示信号后字节数与非分段格式数据位宽的大小关系对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存。Step S201: When it is determined that the outputted spliced data includes a tail-of-package indication signal, the outputted spliced data is output according to the size relationship between the number of bytes after the end-of-package indication signal and the non-segmented format data width. The byte following the end of the indication signal is temporarily stored.
具体地,根据包尾指示信号后字节数与非分段格式数据位宽的大小关系对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存,包括:Specifically, according to the size relationship between the number of bytes after the end of the packet indication signal and the non-segmented format data bit width, the byte after the end of the packet indication signal in the outputted spliced data is temporarily stored, including:
当包尾指示信号后字节数小于非分段格式数据位宽时,将所输出的拼接处理后的数据中包尾指示信号后的字节进行暂存,同时将所输出的拼接处理后的数据中包尾指示信号前的通道数据和通道指示信号和包头指示信号输出给下一级寄存器;When the number of bytes after the end of the packet indication signal is smaller than the data width of the non-segmented format data, the byte after the end of the packet indication signal in the outputted spliced data is temporarily stored, and the outputted spliced processing is performed. The channel data before the end of the packet indication signal and the channel indication signal and the packet header indication signal are output to the next stage register;
这里,本发明实施例所述对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存的实例效果图如图6(a)所示。Here, an example effect diagram of temporarily storing bytes after the end-of-package indication signal in the outputted spliced data according to the embodiment of the present invention is shown in FIG. 6(a).
当包尾指示信号后字节数等于非分段格式数据位宽时,直接将所输出的拼接处理后的数据输出给下一级寄存器;When the number of bytes after the end of the packet indication signal is equal to the non-segmented format data bit width, the outputted spliced data is directly output to the next stage register;
这里,本发明实施例所述对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存的实例效果图如图6(b)所示。Here, an example effect diagram of temporarily storing bytes after the end-of-package indication signal in the outputted spliced data according to the embodiment of the present invention is as shown in FIG. 6(b).
当包尾示信号后字节数大于非分段格式数据位宽时,将所输出的拼接处理后的数据中包尾指示信号后紧接的字节数为非分段格式数据位宽个数的字节和包尾指示信号前的通道数据和通道指示信号和包头指示信号一起输出给下一级寄存器,同时将所输出的拼接处理后的数据中剩余的字节进行暂存。When the number of bytes after the signal is greater than the non-segmented format data bit width, the number of bytes immediately following the end-of-package indication signal in the outputted spliced data is the number of non-segmented format data bits. The channel data before the end of the byte and the end of the indication signal is output to the next stage register together with the channel indication signal and the header indication signal, and the remaining bytes in the outputted spliced data are temporarily stored.
这里,本发明实施例所述对所输出的拼接处理后的数据中包尾指示信 号之后的字节进行暂存的实例效果图如图6(c)所示。Here, in the embodiment of the present invention, the end-of-package indication letter in the data after the splicing process is output An example effect diagram of the byte after the number is temporarily stored as shown in Figure 6(c).
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述实现数据格式转换的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for implementing data format conversion according to the embodiment of the invention.
实施例三 Embodiment 3
图7为本发明实施例实现数据格式转换的方法的流程示意图三,如图7所示,本发明实施例实现数据格式转换的方法包括:FIG. 7 is a schematic flowchart 3 of a method for implementing data format conversion according to an embodiment of the present invention. As shown in FIG. 7 , a method for implementing data format conversion according to an embodiment of the present invention includes:
步骤S101:将分段格式数据写入缓存器;Step S101: Writing segment format data into the buffer;
步骤S102:对所述缓存器进行轮询读操作,获得输入数据;Step S102: Perform a polling read operation on the buffer to obtain input data.
步骤S103:去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;Step S103: removing invalid bytes in the input data, and obtaining input data after removing invalid bytes;
步骤S104:当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据;Step S104: When it is determined that there is a beat data containing a plurality of channels in the input data after the invalid byte is removed, the shot data is spliced, and the stitched data is obtained and outputted;
本发明实施例三中的步骤S101至步骤S104可以分别对应地参见实施例一中的步骤S101至步骤S104,为节约篇幅,这里不再赘述。Steps S101 to S104 in the third embodiment of the present invention can be referred to the steps S101 to S104 in the first embodiment, respectively.
步骤S301:当确定所输出的拼接处理后的数据中同时存在若干组满足非分段格式数据时,将多路非分段格式数据转换为一路非分段格式数据。Step S301: When it is determined that the outputted spliced data has several groups satisfying the non-segment format data, the multiplex non-segment format data is converted into one non-segment format data.
这里,由于在步骤S104中通过将通道切换位置前的对应数据与已暂存的前一拍通道切换位置后的对应数据进行一次拼接所得到的拼接处理后的数据位宽可能大于非分段格式数据位宽,同时所得到的拼接处理后的数据中可能存在包尾指示信号,使得所输出的拼接处理后的数据会出现同时存在若干组满足非分段格式数据的情况。因此,当确定所输出的拼接处理后的数据中同时存在若干组满足非分段格式数据时,将多路非分段格式数据转换为一路非分段格式数据。 Here, since the splicing processed data bit width obtained by splicing the corresponding data before the channel switching position and the corresponding data of the previously recorded previous channel switching position in step S104 may be larger than the non-segment format The data bit width is wide, and at the same time, the obtained spliced data may have a tail end indication signal, so that the output spliced data may appear in a plurality of sets of data satisfying the non-segment format data. Therefore, when it is determined that the outputted spliced data has several sets of data satisfying the non-segment format format, the multiplex non-segment format data is converted into one non-segment format data.
在一实施例中,如图8所示,将多路非分段格式数据转换为一路非分段格式数据,包括:In an embodiment, as shown in FIG. 8, converting the multi-channel non-segment format data into one non-segment format data includes:
步骤S301a:根据所输出的拼接处理后的数据位宽与非分段格式数据位宽计算出同时满足非分段格式数据的最大组数N;其中,N为大于1的正整数。Step S301a: Calculate a maximum number N of sets of data satisfying the non-segment format data according to the output data bit width and the non-segment format data bit width; wherein N is a positive integer greater than 1.
步骤S301b:确定读取时的寄存器,如随机存储寄存器,的位宽为N个非分段格式数据位宽;Step S301b: determining a register at the time of reading, such as a random storage register, the bit width is N non-segment format data bit width;
步骤S301c:通过一个计数器来统计满足非分段格式数据位宽的组数加以控制对输出至寄存器中的拼接处理后的数据的读操作,从而达到将多路非分段格式数据转换为一路分段格式数据的目的。Step S301c: The number of groups satisfying the non-segment format data bit width is counted by a counter to control the read operation of the spliced data outputted to the register, thereby converting the multi-channel non-segment format data into one way. The purpose of the segment format data.
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述实现数据格式转换的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for implementing data format conversion according to the embodiment of the invention.
实施例四 Embodiment 4
图9为本发明一应用实例实现数据格式转换的方法的流程示意图,如图9所示,以分段格式数据位宽为4x128bit,非分段格式数据位宽为320bit,且预先将分段格式数据分割成4个切片为例来说明本发明实施例实现数据格式转换的方法的全过程,本发明实施例实现数据格式转换的方法包括:FIG. 9 is a schematic flowchart of a method for implementing data format conversion according to an application example of the present invention. As shown in FIG. 9, the data width of the segment format is 4×128 bits, and the data width of the non-segment format is 320 bits, and the segment format is pre-defined. The data is divided into four slices as an example to illustrate the whole process of the method for implementing data format conversion in the embodiment of the present invention. The method for implementing data format conversion in the embodiment of the present invention includes:
步骤S401~S402:将分段格式数据写入先进先出数据缓存器FIFO,对所述先进先出数据缓存器进行轮询读操作,获得输入数据;Steps S401 to S402: writing the segment format data into the FIFO data buffer FIFO, performing a polling read operation on the FIFO data buffer, and obtaining input data;
这里,所述FIFO个数的选取决定于所写入的分段格式数据位宽。由于Interlaken接口是以64bit为一个传输单位,则FIFO个数=所写入的分段格式数据位宽/64bit=8。Here, the selection of the number of FIFOs is determined by the written segment format data bit width. Since the Interlaken interface is a transmission unit of 64 bits, the number of FIFOs = the segmentation format data bit width written / 64 bits = 8.
这里,所述轮询读FIFO个数=非分段格式数据位宽/64bit=5。Here, the number of polling read FIFOs = non-segment format data bit width / 64 bit = 5.
具体地,采用8块FIFO进行数据缓存,切片0-3分别对应FIFO#0-7, 根据分段格式数据中的第0切片的有效指示信号产生8块FIFO写使能信号。当FIFO#0到达中水线时,启动FIFO读信号,每次轮询读5块FIFO。这里,所述轮询读规则为:第1拍读FIFO#0-FIFO#4,第2拍读FIFO FIFO#5-FIFO#1,第3拍读FIFO#2-FIFO#6,第4拍读FIFO#7-FIFO#3,第5拍读FIFO FIFO#4-FIFO#0,第6拍读FIFO#1-FIFO#5,第7拍读FIFO#6-FIFO#2,第8拍读FIFO#3-FIFO7,第9拍读FIFO#0-FIFO#4…,每8拍一个读循环周期。Specifically, 8 blocks of FIFO are used for data buffering, and slices 0-3 correspond to FIFO#0-7, respectively. An 8-block FIFO write enable signal is generated based on the valid indication signal of the 0th slice in the segment format data. When FIFO#0 reaches the waterline, the FIFO read signal is initiated, and each time the polling reads 5 FIFOs. Here, the polling read rule is: 1st beat FIFO #0-FIFO#4, 2nd beat FIFO FIFO#5-FIFO#1, 3rd beat FIFO#2-FIFO#6, 4th beat Read FIFO#7-FIFO#3, 5th beat FIFO FIFO#4-FIFO#0, 6th beat FIFO#1-FIFO#5, 7th beat FIFO#6-FIFO#2, 8th read FIFO#3-FIFO7, ninth beat FIFO#0-FIFO#4..., one read cycle every 8 beats.
步骤S403:去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;Step S403: Removing invalid bytes in the input data, and obtaining input data after removing invalid bytes;
具体地,首先根据所述输入数据中的有效指示信号去除部分无效数据,再判断无效字节指示信号是否大于等于64bit,若满足条件则将所述无线字节指示信号对应的无效字节。Specifically, first, part of the invalid data is removed according to the valid indication signal in the input data, and then it is determined whether the invalid byte indication signal is greater than or equal to 64 bits, and if the condition is met, the wireless byte indicates an invalid byte corresponding to the signal.
步骤S404:当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据;Step S404: When it is determined that the data of the plurality of channels is included in the input data after the invalid byte is removed, the stitching data is spliced, and the stitched data is obtained and outputted;
这里,当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,确定通道切换位置,若第1拍读取的5组FIFO数据中,第1组属于通道A,第2-5组属于通道B,则将通道A数据输出,通道B数据暂存;若第2拍读取的5组FIFO数据,第1-3属于通道B,第4-5属于通道C,则需将第1拍通道B暂存数据与第2拍通道B数据拼接输出(同时输出的还包含有效指示信号、通道指示信号、包头或包尾指示信号以及输出有效数据组数),通道C数据暂存。每1拍最多暂存4组数据,即4x64bit,在第2拍通道无切换时最多包含5组有效数据,即拼接后最多输出9组数据,即9x64bit。Here, when it is determined that the beat data including the plurality of channels exists in the input data after the invalid byte is removed, the channel switching position is determined. If the first group of the five sets of FIFO data read by the first beat belongs to the channel A, The second group belongs to channel B, the channel A data is output, and the channel B data is temporarily stored; if the second group reads 5 groups of FIFO data, the first 1-3 belongs to channel B, and the fourth to fifth belongs to channel C, Then, the first beat channel B temporary storage data and the second beat channel B data need to be spliced and outputted (the output also includes the valid indication signal, the channel indication signal, the packet header or the package tail indication signal, and the output valid data group number), channel C. Data temporary storage. Up to 4 sets of data are temporarily stored for each 1st shot, that is, 4x64bit. When there is no switching in the 2nd beat channel, there are up to 5 sets of valid data, that is, up to 9 sets of data are output after splicing, that is, 9x64bit.
具体地,在拼接处理操作中当接收到一个通道的数据,以该通道号为 地址从双口随机存取寄存器中读取上次拼接暂存数据,根据输入数据组数以及暂存数据组数进行拼接。暂存数据组数0-4,此时不可能含有包尾指示信号,输入数据组数1-9。当输入数据组数为9时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第4或9组数;当输入数据组数为8时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第3或8组数;当输入数据组数为7时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第2或7组数;当输入数据组数为6时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第1或6组数;当输入数据组数为5时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第5组数;当输入数据组数为4时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第4组数;当输入数据组数为3时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第3组数;当输入数据组数为2时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第2组数;当输入数据组数为1时,可能不存在包尾指示信号,也可能存在包尾指示信号,并对应第1组数。当输入数据组数为9时,包尾指示信号对应第2组数,此64bit数据中无效字节数3,暂存数据组数4时,则拼接结果为暂存4组数据+输入第1组数据、输入第2组数;输入第3-7组数据,输入第8-9组数需要暂存,以通道号为地址写入双口随机存取寄存器。Specifically, when the data of one channel is received in the splicing processing operation, the channel number is The address reads the last stitched temporary data from the dual-port random access register, and splicing according to the number of input data sets and the number of temporary data sets. The number of temporary data sets is 0-4. At this time, it is impossible to include the end of the indication signal, and the number of input data sets is 1-9. When the number of input data sets is 9, there may be no end-of-package indication signal, and there may be an end-of-package indication signal corresponding to the 4th or 9th group number; when the number of input data sets is 8, there may be no end-of-package indication signal There may also be a tail and tail indication signal corresponding to the 3rd or 8th group number; when the number of input data sets is 7, there may be no tail and tail indication signal, or there may be a tail and tail indication signal, and corresponding to the 2nd or 7th group When the number of input data sets is 6, there may be no end-of-package indication signal, and there may be a tail-end indication signal corresponding to the first or sixth group number; when the number of input data sets is 5, there may be no end-of-package The indication signal may also have an end-of-package indication signal corresponding to the fifth group number; when the number of input data groups is 4, there may be no end-of-package indication signal, and there may be a tail-end indication signal corresponding to the fourth group number; When the number of input data sets is 3, there may be no end-of-package indication signal, and there may be an end-of-package indication signal corresponding to the third group number; when the number of input data sets is 2, there may be no end-of-package indication signal, There may be a tail indication signal, and The number of the second group should be; when the number of input data sets is 1, there may be no end-of-package indication signal, or there may be an end-of-package indication signal, and corresponding to the first group number. When the number of input data sets is 9, the end of the packet indication signal corresponds to the second group number, the number of invalid bytes in the 64-bit data is 3, and when the number of temporary data sets is 4, the result of the splicing is temporary storage of 4 sets of data + input 1 Group data, input the second group number; input the 3-7 group data, input the 8-9 group number needs to be temporarily stored, and write the double port random access register with the channel number as the address.
步骤S405:当确定所输出的拼接处理后的数据中含有包尾指示信号时,根据包尾指示信号后字节数与非分段格式数据位宽的大小关系对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存;Step S405: When it is determined that the output data after the splicing process includes the end-of-package indication signal, the outputted spliced data according to the size relationship between the number of bytes after the end-of-package indication signal and the non-segmented format data bit width The byte after the end of the indication signal is temporarily stored;
通过步骤S404可以确定出可能的输出数据组数为1~9,包尾指示信号的位置可能位于任意一组,需要把所有情况列举出来进行处理。输入数据组数N时分别有N种情况,则共有9+8+7+6+5+4+3+2+1=45种情况。分别 产生各自情况下暂存字节、对应通道指示信号号、包头指示信号,根据输入数据组数进行筛选,并以通道号为地址写入双口随机存取寄存器,同时写入的数据还包含对应通道号、包头/包尾指示信号,并将剩余字节进行暂存。当输出数据组数9,无包尾指示信号或包尾指示信号对应第4或9组数时,直接输出给下一级寄存器;若包尾指示信号对应第3或8组数时,暂存第9组数;若包尾指示信号对应第2或7组数时,暂存第8-9组数;若包尾指示信号对应第1或6组数时,暂存第7-9组数;若包尾指示信号对应第5组数时,暂存第6-9组数。It can be determined in step S404 that the number of possible output data groups is 1 to 9, and the position of the end-of-package indication signal may be located in any group, and all cases need to be enumerated for processing. When there are N cases when the number of input data sets N, there are 9 cases of 9+8+7+6+5+4+3+2+1=45. Separate Generate the temporary storage byte, the corresponding channel indication signal number, and the packet header indication signal in each case, filter according to the number of input data groups, and write the dual-port random access register with the channel number as the address, and simultaneously write the corresponding data. The channel number, the header/packet end indication signal, and the remaining bytes are temporarily stored. When the number of output data sets is 9, the no-end indication signal or the end-of-pack indication signal corresponds to the 4th or 9th group number, and is directly output to the next-level register; if the end-of-package indication signal corresponds to the 3rd or 8th group number, temporary storage The number of the 9th group; if the end of the packet indication signal corresponds to the 2nd or 7th group number, temporarily store the 8-9th group number; if the end of the packet indication signal corresponds to the 1st or 6th group number, temporarily store the 7th to 9th group number If the end of the packet indication signal corresponds to the fifth group number, the number of groups 6-9 is temporarily stored.
步骤S406:当确定所输出的拼接处理后的数据中同时存在若干组满足非分段格式数据时,将多路非分段格式数据转换为一路非分段格式数据。Step S406: When it is determined that the outputted spliced data has several groups satisfying the non-segment format data, the multiplex non-segment format data is converted into one non-segment format data.
具体地,当完成所述拼接处理操作后,确定所输出的拼接处理后的数据中同时存在1~3组满足非分段格式数据时,需要采用1块数据位宽为3x320bit的双口随机存取寄存器进行并串转换,并通过1个计数器来统计满足非分段格式数据位宽的组数加以控制对输出至双口随机存取寄存器中的拼接处理后的数据的读操作,从而实现将多路非分段格式数据转换为一路分段格式数据。Specifically, after the splicing processing operation is completed, it is determined that one or three groups of data in the spliced data that are outputted meet the non-segment format data, and one double-port random storage with a data width of 3×320 bits is required. Taking a register to perform parallel-to-serial conversion, and counting the number of groups satisfying the non-segment format data bit width by one counter to control the read operation of the spliced data outputted to the dual-port random access register, thereby realizing Multi-channel non-segment format data is converted into one-way segment format data.
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行本发明实施例所述实现数据格式转换的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for implementing data format conversion according to the embodiment of the invention.
实施例五 Embodiment 5
图10为本发明实施例实现数据格式转换的装置的组成结构示意图一,如图10所示,本发明实施例实现数据格式转换的装置包括写数据模块51、读数据模块52、去除模块53和拼接处理模块54;其中,FIG. 10 is a schematic structural diagram of a device for implementing data format conversion according to an embodiment of the present invention. As shown in FIG. 10, an apparatus for implementing data format conversion according to an embodiment of the present invention includes a write data module 51, a read data module 52, a removal module 53, and Splicing processing module 54; wherein
所述写数据模块51,配置为将分段格式数据写入缓存器;The write data module 51 is configured to write the segment format data into the buffer;
所述读数据模块52,配置为对所述缓存器进行轮询读操作,获得输入 数据;The read data module 52 is configured to perform a polling read operation on the buffer to obtain an input. data;
所述去除模块53,配置为去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;The removing module 53 is configured to remove invalid bytes in the input data, and obtain input data after removing invalid bytes;
所述拼接处理模块54,配置为当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。The splicing processing module 54 is configured to perform splicing processing on the tempo data when the tempo data containing the plurality of channels exists in the input data after the invalid byte is removed, and obtain and output the spliced data.
在一实施例中,如图11所示,所述写数据模块51包括写控制单元511和写数据单元512;其中,In an embodiment, as shown in FIG. 11, the write data module 51 includes a write control unit 511 and a write data unit 512;
所述写控制单元511,配置为利用每一拍分段格式数据中第一个切片的有效指示信号进行缓存器的写控制操作;The write control unit 511 is configured to perform a write control operation of the buffer by using a valid indication signal of the first slice in each beat segment format data;
所述写数据单元512,配置为响应所述写控制操作,将每一拍分段格式数据中每个切片的指示信号和通道数据写入缓存器。The write data unit 512 is configured to, in response to the write control operation, write an indication signal and channel data for each slice in each beat segment format data to the buffer.
在一实施例中,如图12所示,所述拼接处理模块54包括确定单元541、数据拆分单元542和拼接处理单元543;其中,In an embodiment, as shown in FIG. 12, the splicing processing module 54 includes a determining unit 541, a data splitting unit 542, and a splicing processing unit 543;
所述确定单元541,配置为当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,确定通道切换位置;The determining unit 541 is configured to determine a channel switching position when there is beat data including a plurality of channels in the input data after determining the removal of the invalid byte;
所述数据拆分单元542,配置为根据所述通道切换位置将所述拍数据分为通道切换位置前的对应数据和通道切换位置后的对应数据;The data splitting unit 542 is configured to divide the beat data into corresponding data before the channel switching position and corresponding data after the channel switching position according to the channel switching position;
所述拼接处理单元543,配置为将通道切换位置后的对应数据进行暂存,通道切换位置前的对应数据与已暂存的前一拍通道切换位置后的对应数据进行一次拼接,得到拼接处理后的数据。The splicing processing unit 543 is configured to temporarily store the corresponding data after the channel switching position, and the corresponding data before the channel switching position and the corresponding data after the temporarily switched channel switching position are once spliced to obtain splicing processing. After the data.
在一实施例中,如图13所示,所述装置还包括包尾处理模块55;其中,In an embodiment, as shown in FIG. 13, the device further includes a tail processing module 55;
所述包尾处理模块55,配置为当确定所输出的拼接处理后的数据中含有包尾指示信号时,根据包尾指示信号后字节数与非分段格式数据位宽的大小关系对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂 存。The packet tail processing module 55 is configured to, when determining that the output data after the splicing process includes the end-of-package indication signal, according to the size relationship between the number of bytes after the end-of-package indication signal and the non-segment format data bit width The byte after the end of the packet indication signal in the output spliced data is temporarily suspended. Save.
在一实施例中,如图14所示,所述装置还包括转换模块56;其中,In an embodiment, as shown in FIG. 14, the device further includes a conversion module 56;
所述转换模块56,配置为当确定所输出的拼接处理后的数据中同时存在若干组满足非分段格式数据时,将多路非分段格式数据转换为一路非分段格式数据。The conversion module 56 is configured to convert the multi-path non-segment format data into one non-segment format data when it is determined that the outputted spliced data has several sets of data satisfying the non-segment format.
在实际应用中,所述各模块及其各模块所包括的单元均可由本发明实施例实现数据格式转换的装置中的中央处理器(Central Processing Unit,CPU)、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)、或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。In a practical application, the modules included in each module and each module thereof can be implemented by a central processing unit (CPU) and a microprocessor (Micro Processor Unit) in a device for implementing data format conversion according to an embodiment of the present invention. MPU), Digital Signal Processor (DSP), or Field Programmable Gate Array (FPGA).
本发明实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。The technical solutions described in the embodiments of the present invention can be arbitrarily combined without conflict.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。 The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention.
工业实用性Industrial applicability
本发明实施例所述实现数据格式转换的方法,将分段格式数据写入缓存器,对所述缓存器进行轮询读操作,获得输入数据,去除所述输入数据中的无效字节,得到去除无效字节后的输入数据,当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。如此,能够实现从分段格式数据至非分段格式数据的转换,从而提高Interlaken接口的传输效率。 The method for implementing data format conversion according to the embodiment of the present invention writes the segment format data into a buffer, performs a polling read operation on the buffer, obtains input data, and removes invalid bytes in the input data to obtain The input data after the invalid byte is removed. When it is determined that the data of the plurality of channels is included in the input data after the invalid byte is removed, the beat data is spliced, and the stitched data is obtained and output. In this way, the conversion from segmented format data to non-segmented format data can be realized, thereby improving the transmission efficiency of the Interlaken interface.

Claims (11)

  1. 一种实现数据格式转换的方法,所述方法包括:A method of implementing data format conversion, the method comprising:
    将分段格式数据写入缓存器;Write segmented format data to the buffer;
    对所述缓存器进行轮询读操作,获得输入数据;Performing a polling read operation on the buffer to obtain input data;
    去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;Removing invalid bytes in the input data to obtain input data after removing invalid bytes;
    当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。When it is determined that the beat data including the plurality of channels exists in the input data after the invalid byte is removed, the beat data is spliced, and the stitched data is obtained and output.
  2. 根据权利要求1所述的方法,其中,所述将分段格式数据写入缓存器,包括:The method of claim 1 wherein said writing segment format data to a buffer comprises:
    利用每一拍分段格式数据中第一个切片的有效指示信号进行缓存器的写控制操作;Performing a write control operation of the buffer by using a valid indication signal of the first slice in each beat segment format data;
    响应所述写控制操作,将每一拍分段格式数据中每个切片的指示信号和通道数据写入缓存器。In response to the write control operation, an indication signal and channel data for each slice in each beat segment format data is written to the buffer.
  3. 根据权利要求1所述的方法,其中,所述当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,包括:The method according to claim 1, wherein, when it is determined that there is a beat data containing a plurality of channels in the input data after the invalid byte is removed, the stitching processing is performed on the beat data, including:
    当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,确定通道切换位置;Determining a channel switching position when it is determined that there is a beat data containing a plurality of channels in the input data after the invalid byte is removed;
    根据所述通道切换位置将所述拍数据分为通道切换位置前的对应数据和通道切换位置后的对应数据;And dividing the beat data into corresponding data before the channel switching position and corresponding data after the channel switching position according to the channel switching position;
    将通道切换位置后的对应数据进行暂存,通道切换位置前的对应数据与已暂存的前一拍通道切换位置后的对应数据进行一次拼接,得到拼接处理后的数据。The corresponding data after the channel switching position is temporarily stored, and the corresponding data before the channel switching position and the corresponding data after the temporarily switched channel switching position are once spliced to obtain the spliced data.
  4. 根据权利要求1至3任一项所述的方法,其中,所述方法还包括:当确定所输出的拼接处理后的数据中含有包尾指示信号时,根据包尾指示 信号后字节数与非分段格式数据位宽的大小关系对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存。The method according to any one of claims 1 to 3, wherein the method further comprises: when it is determined that the outputted spliced data contains a tail-of-tail indication signal, according to the end of the packet indication The size relationship between the number of bytes after the signal and the data width of the non-segmented format is temporarily stored in the byte after the end of the signal indicating the output of the spliced data.
  5. 根据权利要求1至3任一项所述的方法,其中,所述方法还包括:当确定所输出的拼接处理后的数据中同时存在若干组满足非分段格式数据时,将多路非分段格式数据转换为一路非分段格式数据。The method according to any one of claims 1 to 3, wherein the method further comprises: when it is determined that the outputted spliced data has several sets of data that satisfy non-segmented format at the same time, the multiplex is non-divided The segment format data is converted into one non-segment format data.
  6. 一种实现数据格式转换的装置,所述装置包括写数据模块、读数据模块、去除模块和拼接处理模块;An apparatus for implementing data format conversion, the apparatus comprising a write data module, a read data module, a removal module, and a splicing processing module;
    所述写数据模块,配置为将分段格式数据写入缓存器;The write data module is configured to write the segment format data into the buffer;
    所述读数据模块,配置为对所述缓存器进行轮询读操作,获得输入数据;The read data module is configured to perform a polling read operation on the buffer to obtain input data;
    所述去除模块,配置为去除所述输入数据中的无效字节,得到去除无效字节后的输入数据;The removing module is configured to remove invalid bytes in the input data, and obtain input data after removing invalid bytes;
    所述拼接处理模块,配置为当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,对所述拍数据进行拼接处理,得到并输出拼接处理后的数据。The splicing processing module is configured to perform splicing processing on the beat data when the tempo data containing the plurality of channels exists in the input data after the invalid byte is removed, and obtain and output the spliced data.
  7. 根据权利要求6所述的装置,其中,所述写数据模块包括写控制单元和写数据单元;The apparatus of claim 6 wherein said write data module comprises a write control unit and a write data unit;
    所述写控制单元,配置为利用每一拍分段格式数据中第一个切片的有效指示信号进行缓存器的写控制操作;The write control unit is configured to perform a write control operation of the buffer by using a valid indication signal of the first slice in each beat segment format data;
    所述写数据单元,配置为响应所述写控制操作,将每一拍分段格式数据中每个切片的指示信号和通道数据写入缓存器。The write data unit is configured to, in response to the write control operation, write an indication signal and channel data for each slice in each beat segment format data to a buffer.
  8. 根据权利要求6所述的装置,其中,所述拼接处理模块包括确定单元、数据拆分单元和拼接处理单元;The apparatus according to claim 6, wherein the splicing processing module comprises a determining unit, a data splitting unit, and a splicing processing unit;
    所述确定单元,配置为当确定所述去除无效字节后的输入数据中存在含有多个通道的拍数据时,确定通道切换位置; The determining unit is configured to determine a channel switching position when there is beat data including a plurality of channels in the input data after determining the removal of the invalid byte;
    所述数据拆分单元,配置为根据所述通道切换位置将所述拍数据分为通道切换位置前的对应数据和通道切换位置后的对应数据;The data splitting unit is configured to divide the beat data into corresponding data before the channel switching position and corresponding data after the channel switching position according to the channel switching position;
    所述拼接处理单元,配置为将通道切换位置后的对应数据进行暂存,通道切换位置前的对应数据与已暂存的前一拍通道切换位置后的对应数据进行一次拼接,得到拼接处理后的数据。The splicing processing unit is configured to temporarily store the corresponding data after the channel switching position, and the corresponding data before the channel switching position is spliced with the corresponding data of the temporarily stored switching position of the previous shooting channel, and the splicing process is obtained. The data.
  9. 根据权利要求6至8任一项所述的装置,其中,所述装置还包括包尾处理模块;The apparatus according to any one of claims 6 to 8, wherein the apparatus further comprises a tail processing module;
    所述包尾处理模块,配置为当确定所输出的拼接处理后的数据中含有包尾指示信号时,根据包尾指示信号后字节数与非分段格式数据位宽的大小关系对所输出的拼接处理后的数据中包尾指示信号之后的字节进行暂存。The packet tail processing module is configured to: when it is determined that the outputted spliced data includes a tail end indication signal, outputting according to the size relationship between the number of bytes of the packet end indication signal and the non-segment format data bit width In the spliced data, the bytes following the end of the packet indication signal are temporarily stored.
  10. 根据权利要求6至8任一项所述的装置,其中,所述装置还包括转换模块;The apparatus according to any one of claims 6 to 8, wherein the apparatus further comprises a conversion module;
    所述转换模块,配置为当确定所输出的拼接处理后的数据中同时存在若干组满足非分段格式数据时,将多路非分段格式数据转换为一路非分段格式数据。The conversion module is configured to convert the multi-path non-segment format data into one non-segment format data when it is determined that the outputted spliced data has several sets of data satisfying the non-segment format.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述实现数据格式转换的方法。 A computer storage medium having stored therein computer executable instructions for performing the method of implementing data format conversion of any one of claims 1 to 5.
PCT/CN2015/087549 2014-11-07 2015-08-19 Method, device, and computer storage medium for implementing data format conversion WO2016070668A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410626134.4 2014-11-07
CN201410626134.4A CN105573922B (en) 2014-11-07 2014-11-07 Method and device for realizing data format conversion

Publications (1)

Publication Number Publication Date
WO2016070668A1 true WO2016070668A1 (en) 2016-05-12

Family

ID=55884083

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/087549 WO2016070668A1 (en) 2014-11-07 2015-08-19 Method, device, and computer storage medium for implementing data format conversion

Country Status (2)

Country Link
CN (1) CN105573922B (en)
WO (1) WO2016070668A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107977343B (en) * 2017-11-22 2021-07-06 广东工业大学 Data conversion system
CN110708598B (en) * 2018-07-10 2021-08-06 视联动力信息技术股份有限公司 Video networking terminal and data processing method
CN112188281B (en) * 2019-07-03 2022-11-18 西安诺瓦星云科技股份有限公司 Image processing method, image processing apparatus, image processing system, and transmission card
CN111176725B (en) * 2019-12-27 2022-05-06 北京市商汤科技开发有限公司 Data processing method, device, equipment and storage medium
CN112153054B (en) * 2020-09-25 2023-04-07 超越科技股份有限公司 Method and system for realizing splicing cache with any byte length
CN114064532B (en) * 2021-11-08 2022-06-17 深圳华云信息系统有限公司 Data processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729593A (en) * 2008-11-03 2010-06-09 北大方正集团有限公司 Method, system and device for uploading and receiving file
CN102281321A (en) * 2011-04-25 2011-12-14 程旭 Data cloud storage partitioning and backup method and device
US8407245B2 (en) * 2010-11-24 2013-03-26 Microsoft Corporation Efficient string pattern matching for large pattern sets
US8504846B2 (en) * 2007-05-25 2013-08-06 Samsung Electronics Co., Ltd. Method and apparatus for secure storing of private data on user devices in telecommunications networks

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7995759B1 (en) * 2006-09-28 2011-08-09 Netapp, Inc. System and method for parallel compression of a single data stream
CN101931833A (en) * 2009-06-25 2010-12-29 中兴通讯股份有限公司 Device and method for realizing demapping of optical channel data unit
CN102387177B (en) * 2010-09-01 2015-05-06 腾讯科技(深圳)有限公司 Method and device for downloading audio-visual files
CN102508631B (en) * 2011-09-26 2014-07-30 福建星网锐捷网络有限公司 Written data processing device of first input first output (FIFO) for writing any byte data
CN103780506B (en) * 2012-10-26 2017-08-08 中兴通讯股份有限公司 A kind of data buffering system and method for ethernet device
CN103179214B (en) * 2013-04-10 2016-01-13 网宿科技股份有限公司 Based on the live TV stream plug-flow method and system of http protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504846B2 (en) * 2007-05-25 2013-08-06 Samsung Electronics Co., Ltd. Method and apparatus for secure storing of private data on user devices in telecommunications networks
CN101729593A (en) * 2008-11-03 2010-06-09 北大方正集团有限公司 Method, system and device for uploading and receiving file
US8407245B2 (en) * 2010-11-24 2013-03-26 Microsoft Corporation Efficient string pattern matching for large pattern sets
CN102281321A (en) * 2011-04-25 2011-12-14 程旭 Data cloud storage partitioning and backup method and device

Also Published As

Publication number Publication date
CN105573922A (en) 2016-05-11
CN105573922B (en) 2020-07-10

Similar Documents

Publication Publication Date Title
WO2016070668A1 (en) Method, device, and computer storage medium for implementing data format conversion
WO2019227724A1 (en) Data read/write method and device, and circular queue
JP6340481B2 (en) Data caching method, apparatus and storage medium
WO2016011811A1 (en) Memory management method and apparatus, and storage medium
CN103714038B (en) A kind of data processing method and device
JP7074839B2 (en) Packet processing
WO2021232843A1 (en) Image data storage method, image data processing method and system, and related apparatus
US20160011987A1 (en) Efficient search key controller with standard bus interface, external memory interface, and interlaken lookaside interface
US9594702B2 (en) Multi-processor with efficient search key processing
WO2016202113A1 (en) Queue management method, apparatus, and storage medium
WO2016202158A1 (en) Message transmission method and device, and computer-readable storage medium
WO2019084789A1 (en) Direct memory access controller, data reading method, and data writing method
CN110968538B (en) Data buffering method and device
CN111181874A (en) Message processing method, device and storage medium
WO2016120906A1 (en) A/d conversion device, d/a conversion device and plc
JP2023505783A (en) GPU packet aggregation system
WO2016082362A1 (en) Method, device and apparatus for converting data bit width
EP2133797B1 (en) Dma transfer device and method
CN107025064B (en) A kind of data access method of the high IOPS of low latency
US9632959B2 (en) Efficient search key processing method
US10474599B1 (en) Striped direct memory access circuit
JP4920559B2 (en) Data processing device
JP5491282B2 (en) Data input / output device, data storage method and program
JP2758175B2 (en) Multiplexed frame conversion circuit
JP5803000B2 (en) DMA device, information processing device, and data transfer method

Legal Events

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

Ref document number: 15856963

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15856963

Country of ref document: EP

Kind code of ref document: A1