WO2008040231A1 - Method and device for reassembling fragment data - Google Patents

Method and device for reassembling fragment data Download PDF

Info

Publication number
WO2008040231A1
WO2008040231A1 PCT/CN2007/070703 CN2007070703W WO2008040231A1 WO 2008040231 A1 WO2008040231 A1 WO 2008040231A1 CN 2007070703 W CN2007070703 W CN 2007070703W WO 2008040231 A1 WO2008040231 A1 WO 2008040231A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
information
fragment data
fragment
unit
Prior art date
Application number
PCT/CN2007/070703
Other languages
French (fr)
Chinese (zh)
Inventor
Yao Liu
Original Assignee
Huawei Technologies 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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2008040231A1 publication Critical patent/WO2008040231A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7453Address table lookup; Address filtering using hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/324Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC

Definitions

  • the present invention relates to the field of data processing in network communication systems, and more particularly to a method and apparatus for reassembling slice data.
  • the data transmission link has a limitation of a maximum transmission unit (MTU, Maxima Transmi t Uni t), that is, only data transmitted on the designated link that is less than or equal to the maximum transmission unit of the link can be transmitted. If the data that can be transmitted by the maximum transmission unit of the specified link is exceeded, then the intermediate node or the data source is fragmented, and then the reassembly of the fragmented data is performed at the receiving end or the intermediate node.
  • MTU Maxima Transmi t Uni t
  • the methods of data reorganization in the prior art include: software reorganization, firmware reorganization, and hardware reorganization.
  • the software reorganization is performed by software running in a central processing unit (CPU, Centra l Proces s ing Uni t), and the entire reorganization process needs to occupy an arithmetic processing unit and a dynamic memory (DRAM, Dynamic Random-Acces). s Memory ) resources.
  • the firmware reorganization is a software implemented by assembly language to complete the reassembly of the fragment data, and the firmware reorganization is for the reorganization of the specific fragment data, wherein the firmware is run in a dedicated device such as a digital signal processor or a network processor. Software implemented in pure assembly language.
  • the hardware reorganization is the reassembly of specific fragmentation data or a specific number of fragmentation data by dedicated hardware.
  • the software running in the central processing unit is responsible for the reorganization of the data in a fragmented reorganization manner, but it requires a large amount of resources of the central processing unit, and the reorganization speed is slow, Meet the requirements of high-speed data transfer;
  • ⁇ Recombining data in firmware reorganization mode is faster than software running in central processing unit responsible for fragment reorganization, but the firmware reorganization speed is still low, and it requires a large amount of firmware storage resources.
  • Embodiments of the present invention provide a method and apparatus for reassembling slice data, which can simultaneously satisfy high speed and flexible recombination requirements.
  • a method for reassembling slice data including: extracting feature values for slice data that needs to be reorganized, and searching corresponding information of the feature values in a memory;
  • the reassembly information of the fragment data is acquired; when all the fragment data that needs to be reassembled arrives, the fragment data is reorganized according to the recombination information of the fragment data.
  • an apparatus for reassembling slice data including: firmware for extracting feature values for slice data that needs to be reorganized, and when searching for corresponding information of the feature values Obtaining the reassembly information of the fragment data, and determining that all the fragmentation data that needs to be reassembled arrives, and reorganizing the fragmentation data according to the acquired reorganization information;
  • a content address storage configured to create the piecemeal data information that needs to be reorganized, and search for corresponding information of the feature value according to the feature value provided by the firmware, and feed back the search result to the firmware.
  • an apparatus for reassembling slice data including: an extracting unit, configured to extract feature values for the fragment data that needs to be reorganized;
  • a searching unit configured to search, in the memory, corresponding information of the feature value according to the feature value extracted by the extracting unit;
  • an obtaining unit configured to acquire, when the search unit searches for corresponding information of the feature value, reassembly information of the fragment data
  • a recombining unit configured to reassemble the fragment data according to the recombination information of the fragment data when all the fragment data that needs to be reassembled arrives.
  • the embodiment of the present invention extracts feature values for the fragment data that needs to be reorganized, the created fragment data information is searched by the content address memory, and then the fragment data is reorganized by the content address memory and the firmware.
  • the created fragment data information is searched by using the content address memory, and the speed thereof is much higher than the search speed of the central processing unit, and the firmware is The processing speed is almost the same as that of the hardware, so that the reorganization of high-speed fragmentation data can be completed.
  • Figure 1 is a flow chart of an embodiment of the method of the present invention
  • FIG. 3 is a schematic illustration of an embodiment of the apparatus of the present invention.
  • Figure 4 is a schematic illustration of another embodiment of the apparatus of the present invention.
  • An embodiment of the present invention provides a method for reassembling slice data: extracting feature values according to fragment data that needs to be reorganized, and the content address memory searches for the created fragment data information according to the feature value; determining the content address memory according to the search result Whether the fragmentation data information that needs to be reorganized has been created, and if so, the reassembly information of the fragmentation data is obtained from the content address memory, otherwise the process ends; determining whether all the fragmentation data that needs to be reassembled arrives, and if so, according to The acquired reorganization information reorganizes the fragmentation data, otherwise the process ends.
  • FIG. 1 is a flowchart of an embodiment of a method according to the present invention.
  • the process specifically includes the following steps: Step 101: Performing firmware extraction on a firmware of a dedicated device such as a digital signal processor or a network processor according to requirements Value, and searching for the content address memory according to the feature value, and then writing the feature value of the slice data, the related data structure, and the flag bit into the content address memory to form reassembly information of the slice data, wherein the data structure and the flag bit are The firmware is first created and then written to the content address memory.
  • a firmware of a dedicated device such as a digital signal processor or a network processor according to requirements Value
  • Step 102 The content address memory searches for the created fragmented data signal according to the feature value provided by the firmware. Search and return the search results to the firmware.
  • Step 103 The firmware determines, according to the search result, whether the content address memory has created the fragment data information, and if yes, performs step 104; otherwise, the process ends.
  • Step 104 The firmware acquires reassembly information of the fragment data from the content address memory, where the reassembly information is information created by the firmware on the content address memory, and specifically includes a feature value, a related data structure, and a flag bit.
  • Step 105 Determine whether all the fragment data that needs to be reassembled has arrived. If yes, go to step 106, otherwise end the process.
  • Step 106 Reassemble all the fragment data according to the acquired reassembly information, and send the reassembly data to the data link.
  • the embodiment of the present invention selects a content address memory (CAM, Content Addres sab le Memory) to search for the created fragment data information, because the content address memory is used to search for the created fragment data information.
  • CAM Content Addres sab le Memory
  • the firmware is software running in a dedicated device such as a digital signal processor or a network processor, and the processing speed of the firmware is almost the same as that of the hardware. Therefore, in the embodiment of the present invention, the firmware and the content address memory cooperate to complete the data reorganization, and thus The reorganization of high-speed fragmentation data can be completed.
  • the firmware is generally software programmable, so that it can be adjusted according to actual needs, thus maintaining the flexibility of software fragmentation and reorganization in the central processing unit.
  • FIG. 2 is a flowchart of another embodiment of the method according to the present invention.
  • the embodiment reorganizes the fragment data into two types: data reorganization under normal conditions and data reorganization under abnormal conditions.
  • the process specifically includes the following steps. :
  • Step 201 The fragmented data enters the system.
  • Step 202 The firmware running in a dedicated device such as a digital signal processor or a network processor determines whether the data needs to be reassembled according to the content of the fragmented data. If yes, step 203 is performed; otherwise, the process ends.
  • a dedicated device such as a digital signal processor or a network processor
  • Step 203 The firmware extracts the feature value according to the fragment data that needs to be reassembled, and searches the content address memory according to the feature value, and then writes the feature value of the fragment data, the related data structure, and the flag bit into the content address memory to form a fragment.
  • Data reorganization information, where the data structure and flag bits are The firmware is first created and then written to the content address memory.
  • Step 204 The content address memory searches for the created fragment data information, and returns the search result to the firmware.
  • Step 205 The firmware determines, according to the search result, whether the content address memory has created the fragmentation data information, and if yes, step 208 is performed, otherwise step 206 is performed.
  • Step 206 The firmware initializes the content address memory according to the feature value, and also initializes the related data structure and flag.
  • Step 207 Put the fragment data into the data fragment chain, and wait for the next fragment data, and end the process.
  • Step 209 The central processing unit determines whether the storage time of the reassembly information of the fragment data in the content address memory exceeds a preset time. If yes, it indicates that the reorganization process is abnormal, and then performs step 21 0; otherwise, step 21 1 is performed.
  • Step 21 The central processing unit performs aging processing on the reorganization information stored in the content address memory, and clears the reorganization information of the long-term occupied content address memory resources, so as to ensure that the fragmented data that needs to be reorganized subsequently can apply for the available content.
  • the address memory resource therefore, the central processing unit needs to periodically age the recombination information existing in the content address memory, thereby ensuring the rational use of resources.
  • Step 21 Determine whether all the fragment data has arrived. If yes, go to step 212. Otherwise, go to step 21 3.
  • Step 212 Reorganize all the fragment data according to the acquired reassembly information, and send the reassembly data to the data link, and end the process.
  • Step 21 Set the identification bit, for example, which fragment data has been reached, and then put the fragmentation data into the data fragmentation chain, wait for the next fragmentation data, and end the process.
  • Step 209 and step 21 0 are an exception processing process for the reassembly information of the fragment data to occupy the content address memory resource for a long time. If the entire reorganization process is normal, step 209 and step 21 0 may be removed.
  • the created fragmentation data information is assisted by the content address memory, and in addition, the created fragmentation data information can be searched by the central processing unit.
  • the embodiment of the present invention is a reorganization letter stored in the content address memory by the central processing unit. The aging process is performed, and the reorganization information can be aged by the firmware.
  • the storage medium is, for example, a ROM/RAM, a magnetic disk, an optical disk, or the like.
  • An embodiment of the present invention also provides an apparatus for reassembling slice data, the apparatus comprising firmware and a content address memory, wherein: firmware is used to extract feature values according to fragment data that needs to be reorganized, and the content address memory is provided according to firmware The feature value searches for the created fragment data information;
  • the firmware determines, according to the search result, whether the fragmentation data information that needs to be reassembled has been created in the content address memory, and acquires the reorganization information of the fragmentation data from the content address storage when the fragmentation data information that needs to be reorganized has been created. ;
  • the firmware determines whether all the fragmentation data that needs to be reassembled arrives, and reassembles the fragmentation data according to the acquired reassembly information when all the fragmentation data that needs to be reassembled arrives.
  • FIG. 3 is a schematic diagram of an embodiment of the apparatus of the present invention.
  • the apparatus includes at least a firmware 301, a content address memory 302, and may further include a central processing unit 303.
  • the firmware 301 is configured to extract feature values from the fragment data that needs to be reassembled, search the content address memory 302 according to the feature values, and write the feature values, related data structures, and flag bits that need to be reorganized into the content address memory.
  • 302 forms reassembly information, wherein the data structure and flag bits are both created by firmware 301 and then written to content address memory 302.
  • the content address memory 302 is configured to search for the created fragment data information according to the fragment data feature value provided by the firmware 301, and return the search result to the firmware 301;
  • the central processing unit 303 is configured to determine whether the time occupied by the reassembly information of the fragmentation data in the content address memory 302 exceeds a preset time, and aging the reassembly information when the reorganization information occupation time exceeds a preset time. .
  • the aging process is to clear the reassembly information, and release the content address storage 302 resource occupied by the reorganization information.
  • the firmware 301 extracts the feature value from the fragment data that needs to be reassembled, searches the content address memory 302 according to the feature value, and writes the feature value into the content address memory 302; the content address memory 302 is based on the fragment data feature value provided by the firmware 301.
  • the created piecemeal data information is searched and the search result is returned to the firmware 301.
  • the firmware 301 determines whether the content address memory 302 has created the slice data information based on the search result, and acquires the reassembly information of the slice data from the content address memory 302 if the slice data information has been created.
  • the central processing unit 303 determines whether the storage time of the reassembly information of the fragmentation data on the content address memory 302 exceeds a preset time, and stores the content address memory 302 in the case where the reorganization information is stored in the content address memory 302 for a preset time.
  • the reassembly information is subjected to aging processing, and the reassembly information of the resource occupies the content address memory 302 for a long time is cleared, so that the shard data that needs to be reassembled can be applied to the available content address memory resource.
  • the firmware 301 determines whether all the fragmentation data that needs to be reassembled has arrived, and reassembles all the fragmentation data according to the reassembly information when all the fragmentation data has arrived, and then transmits the reassembled data to the data link.
  • the central processing unit 303 aging the fragment data recombination information stored in the content address memory 302 by the central processing unit 303, and it may also age the recombination information by the firmware 301, if the firmware 301 is reorganized.
  • the information is aging, and the central processing unit 303 is required to send the determination result of whether the storage time exceeds the preset time to the firmware 301, and the firmware 301 determines whether the reorganization information needs to be aged according to the determination result.
  • the created fragment data information is searched by the content address memory 302. The embodiment of the present invention does not exclude the use of the central processing unit 303 to search for the created fragment data information.
  • FIG. 4 it is a schematic diagram of another embodiment of the apparatus of the present invention.
  • the apparatus at least includes: an extracting unit 401, a searching unit 402, an obtaining unit 403, and a recombining unit 404; wherein:
  • the extracting unit 401 is configured to extract feature values for the fragment data that needs to be reorganized
  • the searching unit 402 is configured to search for the corresponding information of the feature value in the content address memory 400 according to the feature value extracted by the extracting unit 401;
  • the obtaining unit 403 is configured to determine, according to the search result of the searching unit 402, that the content address memory 400 has created the fragmentation data information that needs to be reorganized, and when the searching unit searches for the corresponding information of the feature value, acquire the fragmentation data. Reorganization information;
  • the reorganization unit 404 is configured to reassemble the fragment data according to the reassembly information of the fragment data when all the fragment data that needs to be reassembled arrives.
  • the apparatus may further include a first determining unit 405, configured to enter the system according to The fragmented data content determines that the fragmentation data needs to be reorganized, and the extraction unit 401 is triggered.
  • a first determining unit 405 configured to enter the system according to The fragmented data content determines that the fragmentation data needs to be reorganized, and the extraction unit 401 is triggered.
  • the device may further include a second determining unit 406 and an aging unit 407, wherein: the second determining unit 406 is configured to determine whether the storage time of the reorganization information in the content address memory 400 exceeds a preset time, and outputting the discriminating when the preset time is exceeded. Result
  • the aging unit 407 is configured to age the recombination information according to the discriminating result.
  • the reassembly information of the acquired fragment data may include a feature value, a data structure, and a flag bit of the fragment data.
  • the device may further include an initialization unit 408, configured to initialize the content address memory 400 according to the feature value when the content address memory 400 does not create the fragment data information according to the search result of the search unit 402, that is, the The feature values, data structures, and flag bits of the slice data are written in the content address memory 400.
  • an initialization unit 408 configured to initialize the content address memory 400 according to the feature value when the content address memory 400 does not create the fragment data information according to the search result of the search unit 402, that is, the The feature values, data structures, and flag bits of the slice data are written in the content address memory 400.
  • the apparatus may further include a marking unit 409, configured to set the identification bit when only a part of the fragmentation data to be reassembled arrives, put the fragmentation data into the data fragmentation chain, and wait for the next fragmentation data.
  • a marking unit 409 configured to set the identification bit when only a part of the fragmentation data to be reassembled arrives, put the fragmentation data into the data fragmentation chain, and wait for the next fragmentation data.
  • the foregoing second judging unit 406 and the aging unit 407 may be disposed in the central processing unit in addition to the foregoing embodiment of the apparatus of the present invention, and may reassemble the fragment data stored in the content address memory 400.
  • the second judging unit 406 is disposed in the central processing unit, and the aging unit 407 is disposed in the content address memory 400, so that the second judging unit 406 in the central processing unit is required to store the storage time exceeding the preset.
  • the result of the determination of the time is sent to the aging unit 407 provided in the content address memory 400, and the aging unit 407 determines whether the reorganization information needs to be aged according to the judgment result.
  • the above-described initializing unit 408 and search unit 402 also do not exclude the possibility of being set in the content address memory 400.
  • the search unit 402 can be set to search the created slice data information in the content address memory 400, and does not exclude the possibility of being set in the central processing unit.
  • the embodiment of the present invention extracts feature values for the fragment data that needs to be recombined, and then searches for the created fragment data information by the content address memory, and then completes the reorganization of the fragment data by the content address memory and the firmware.
  • the content of the created fragmented data is searched by using the content address memory, which is much faster than the search speed of the central processing unit, and the processing speed of the firmware is almost the same as that of the hardware, so that the high-speed fragmented data can be completed.
  • the firmware is generally software programmable, so that it can be adjusted according to actual needs, thus maintaining the flexibility of software fragmentation re-running in the central processing unit.
  • the central processing unit determines whether the storage time of the reorganization information in the content address memory exceeds the preset time by the central processing unit, if the storage time exceeds the preset time, the central processing unit or firmware points to the content address memory.
  • the data reassembly information is aging, and the reassembly information that occupies the content address memory resource for a long time is cleared, so that the fragment data that needs to be reassembled can be applied to the available content address memory resource, thereby ensuring the rational use of the resource, and further Avoid the security vulnerabilities and resource utilization risks caused by the reorganization information of the created fragmented data for a long time.

Abstract

A method for reassembling fragment data is provided. The method includes: extracting the characteristic value from the fragment data needing to be reassembled; searching the memory for the information corresponding to the characteristic value; when the information corresponding to the characteristic value is found, obtaining the reassembly information of the fragment data; when all the fragments needing to be reassembled arrive, reassembling the fragments according to their reassembly information. A device for reassembling fragment data is also provided. Using the above method and device, not only the flexibility of software reassembly is kept, but also the high-speed performance of hardware reassembly is kept. Moreover the security leak and the resource utilization hidden trouble caused by the resource of Content Addressable Memory occupied for a long time by the established reassembly information of fragment data can be avoided.

Description

重组分片数据的方法与装置  Method and device for re-sampling data
本申请要求于 2006 年 9 月 18 日提交中国专利局、 申请号为 200610154184. 2 , 发明名称为 "重组分片数据的方法与装置" 的中国专利申请 的优先权, 其全部内容通过引用结合在本申请中。  This application claims priority to Chinese Patent Application No. 200610154184. 2, entitled "Method and Apparatus for Heavy-Piece Sheet Data", filed on September 18, 2006, the entire contents of which are incorporated by reference. In this application.
技术领域 Technical field
本发明涉及网络通信系统的数据处理领域,尤其涉及一种重组分片数据的 方法与装置。  The present invention relates to the field of data processing in network communication systems, and more particularly to a method and apparatus for reassembling slice data.
背景技术 Background technique
在网络中数据传输链路有一个最大传送单元 (MTU , Maxima l Transmi t Uni t )的限制,也就是在指定链路上只能传送小于或等于该链路最大传送单元 所能传输的数据。如果超过指定链路最大传送单元所能传输的数据, 那么就要 在中间节点或数据源头进行分片,然后在接收端或中间节点进行分片数据的重 组工作。  In the network, the data transmission link has a limitation of a maximum transmission unit (MTU, Maxima Transmi t Uni t), that is, only data transmitted on the designated link that is less than or equal to the maximum transmission unit of the link can be transmitted. If the data that can be transmitted by the maximum transmission unit of the specified link is exceeded, then the intermediate node or the data source is fragmented, and then the reassembly of the fragmented data is performed at the receiving end or the intermediate node.
现有技术中进行数据重组的方式包括:软件重组、固件重组以及硬件重组。 所述软件重组是通过运行于中央处理单元(CPU, Centra l Proces s ing Uni t ) 的软件来完成分片数据的重组,整个重组过程需要占用运算处理单元和动态存 储器 ( DRAM, Dynamic Random-Acces s Memory ) 的资源。 所述固件重组是通过 汇编语言实现的软件来完成分片数据的重组,并且固件重组是针对特定分片数 据的重组, 其中, 固件就是运行于数字信号处理器或网络处理器等专用器件中 并用纯汇编语言来实现的软件。所述硬件重组是通过专用硬件对特定分片数据 或者特定数量的分片数据进行重组。  The methods of data reorganization in the prior art include: software reorganization, firmware reorganization, and hardware reorganization. The software reorganization is performed by software running in a central processing unit (CPU, Centra l Proces s ing Uni t), and the entire reorganization process needs to occupy an arithmetic processing unit and a dynamic memory (DRAM, Dynamic Random-Acces). s Memory ) resources. The firmware reorganization is a software implemented by assembly language to complete the reassembly of the fragment data, and the firmware reorganization is for the reorganization of the specific fragment data, wherein the firmware is run in a dedicated device such as a digital signal processor or a network processor. Software implemented in pure assembly language. The hardware reorganization is the reassembly of specific fragmentation data or a specific number of fragmentation data by dedicated hardware.
在实现本发明的过程中,发明人经过研究发现: 釆用运行于中央处理单元 的软件负责分片重组方式对数据进行重组比较灵活,但是需要占用中央处理单 元大量资源, 并且重组速度慢, 不能满足高速数据传送的要求; 釆用固件重组 方式对数据进行重组的速度要高于运行于中央处理单元的软件负责分片重组, 但是单纯靠固件重组速度依然较低, 同时需要占用固件大量存储资源; 釆用硬 件重组方式对数据进行重组的速度相对前两种重组方式的速度要高出很多,但 是硬件一般只是针对特定分片数据的重组, 或者只能处理特定数量的分片数 据, 灵活性比较差, 不能满足高速、 灵活的重组需求。 由上述三种重组方式可 知, 现有技术的缺陷是对数据进行重组时不能同时满足高速和灵活的需求。 发明内容 In the process of implementing the present invention, the inventors have found through research that: The software running in the central processing unit is responsible for the reorganization of the data in a fragmented reorganization manner, but it requires a large amount of resources of the central processing unit, and the reorganization speed is slow, Meet the requirements of high-speed data transfer; 固件 Recombining data in firmware reorganization mode is faster than software running in central processing unit responsible for fragment reorganization, but the firmware reorganization speed is still low, and it requires a large amount of firmware storage resources. The speed of reorganizing data in hardware reorganization is much faster than the first two reorganization methods, but the hardware is generally only for the reorganization of specific fragmentation data, or can only process a certain number of fragmentation data, flexibility. Poor, can not meet the needs of high-speed, flexible restructuring. By the above three reorganization methods It is known that the drawback of the prior art is that the data cannot be reorganized to meet both high speed and flexible requirements. Summary of the invention
本发明实施例提供一种重组分片数据的方法与装置, 能够同时满足高速、 灵活的重组需求。  Embodiments of the present invention provide a method and apparatus for reassembling slice data, which can simultaneously satisfy high speed and flexible recombination requirements.
在本发明的一个实施例中, 可以提供一种重组分片数据的方法, 包括: 对需要重组的分片数据提取特征值,在存储器中搜索所述特征值的对应信 息;  In an embodiment of the present invention, a method for reassembling slice data may be provided, including: extracting feature values for slice data that needs to be reorganized, and searching corresponding information of the feature values in a memory;
当搜索到所述特征值的对应信息时, 获取所述分片数据的重组信息; 当所有需要重组的分片数据都到达时,根据所述分片数据的重组信息对分 片数据进行重组。  When the corresponding information of the feature value is searched, the reassembly information of the fragment data is acquired; when all the fragment data that needs to be reassembled arrives, the fragment data is reorganized according to the recombination information of the fragment data.
在本发明的另一个实施例中, 可以提供一种重组分片数据的装置, 包括: 固件, 用于对需要重组的分片数据提取特征值, 以及当搜索到所述特征值 的对应信息时, 获取所述分片数据的重组信息, 以及确定所有需要重组的分片 数据都到达时, 根据获取的重组信息对分片数据进行重组;  In another embodiment of the present invention, an apparatus for reassembling slice data may be provided, including: firmware for extracting feature values for slice data that needs to be reorganized, and when searching for corresponding information of the feature values Obtaining the reassembly information of the fragment data, and determining that all the fragmentation data that needs to be reassembled arrives, and reorganizing the fragmentation data according to the acquired reorganization information;
内容地址存储器, 用于创建所述需要重组的分片数据信息, 以及根据所述 固件提供的特征值搜索所述特征值的对应信息, 并将搜索结果反馈给所述固 件。  And a content address storage, configured to create the piecemeal data information that needs to be reorganized, and search for corresponding information of the feature value according to the feature value provided by the firmware, and feed back the search result to the firmware.
在本发明的另一个实施例中, 可以提供一种重组分片数据的装置, 包括: 提取单元, 用于对需要重组的分片数据提取特征值;  In another embodiment of the present invention, an apparatus for reassembling slice data may be provided, including: an extracting unit, configured to extract feature values for the fragment data that needs to be reorganized;
搜索单元,用于根据所述提取单元提取的特征值在存储器中搜索所述特征 值的对应信息;  a searching unit, configured to search, in the memory, corresponding information of the feature value according to the feature value extracted by the extracting unit;
获取单元, 用于当所述搜索单元搜索到所述特征值的对应信息时, 获取所 述分片数据的重组信息;  And an obtaining unit, configured to acquire, when the search unit searches for corresponding information of the feature value, reassembly information of the fragment data;
重组单元, 用于当所有需要重组的分片数据都到达时,根据所述分片数据 的重组信息对分片数据进行重组。  And a recombining unit, configured to reassemble the fragment data according to the recombination information of the fragment data when all the fragment data that needs to be reassembled arrives.
由于本发明实施例对需要重组的分片数据提取特征值,再由内容地址存储 器对已创建的分片数据信息进行搜索,然后通过内容地址存储器和固件配合完 成分片数据的重组。本发明实施例中通过使用内容地址存储器对已创建的分片 数据信息进行搜索, 其速度要远远高于中央处理单元的搜索速度, 同时固件的 处理速度同硬件几乎相当, 这样就可以完成高速分片数据的重组工作。 Because the embodiment of the present invention extracts feature values for the fragment data that needs to be reorganized, the created fragment data information is searched by the content address memory, and then the fragment data is reorganized by the content address memory and the firmware. In the embodiment of the present invention, the created fragment data information is searched by using the content address memory, and the speed thereof is much higher than the search speed of the central processing unit, and the firmware is The processing speed is almost the same as that of the hardware, so that the reorganization of high-speed fragmentation data can be completed.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下面描 述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲, 在不 付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description For some embodiments of the present invention, other drawings may be obtained from those skilled in the art without departing from the drawings.
图 1是本发明方法实施例的流程图;  Figure 1 is a flow chart of an embodiment of the method of the present invention;
图 2是本发明方法另一实施例的流程图;  2 is a flow chart of another embodiment of the method of the present invention;
图 3是本发明装置实施例的示意图;  Figure 3 is a schematic illustration of an embodiment of the apparatus of the present invention;
图 4是本发明装置另一实施例的示意图。  Figure 4 is a schematic illustration of another embodiment of the apparatus of the present invention.
具体实施方式 detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of the present invention.
本发明实施例提供了一种重组分片数据的方法:根据需要重组的分片数据 提取特征值, 内容地址存储器根据特征值对已创建的分片数据信息进行搜索; 根据搜索结果判断内容地址存储器中是否已创建所述需要重组的分片数据信 息, 如果是, 从内容地址存储器中获取分片数据的重组信息, 否则结束流程; 判断所有需要重组的分片数据是否都到达,如果是,根据获取的重组信息对分 片数据进行重组, 否则结束流程。  An embodiment of the present invention provides a method for reassembling slice data: extracting feature values according to fragment data that needs to be reorganized, and the content address memory searches for the created fragment data information according to the feature value; determining the content address memory according to the search result Whether the fragmentation data information that needs to be reorganized has been created, and if so, the reassembly information of the fragmentation data is obtained from the content address memory, otherwise the process ends; determining whether all the fragmentation data that needs to be reassembled arrives, and if so, according to The acquired reorganization information reorganizes the fragmentation data, otherwise the process ends.
下面, 再结合附图对本发明实施例方法的具体技术方案进行详细说明。 参照图 1 ,图 1是本发明方法实施例的流程图,该流程具体包括以下步骤: 步骤 101、运行在数字信号处理器或网络处理器等专用器件的固件根据需 要重组的分片数据提取特征值, 并根据特征值查找内容地址存储器,再将分片 数据的特征值、相关数据结构以及标志位写入内容地址存储器, 形成分片数据 的重组信息, 其中,数据结构和标志位都是由固件先创建再写入内容地址存储 器中。  The specific technical solutions of the method of the embodiment of the present invention are described in detail below with reference to the accompanying drawings. Referring to FIG. 1 , FIG. 1 is a flowchart of an embodiment of a method according to the present invention. The process specifically includes the following steps: Step 101: Performing firmware extraction on a firmware of a dedicated device such as a digital signal processor or a network processor according to requirements Value, and searching for the content address memory according to the feature value, and then writing the feature value of the slice data, the related data structure, and the flag bit into the content address memory to form reassembly information of the slice data, wherein the data structure and the flag bit are The firmware is first created and then written to the content address memory.
步骤 102、 内容地址存储器根据固件提供的特征值对已创建的分片数据信 息进行搜索, 并将搜索结果返回给固件。 Step 102: The content address memory searches for the created fragmented data signal according to the feature value provided by the firmware. Search and return the search results to the firmware.
步骤 103、 固件根据搜索结果判断内容地址存储器是否已创建该分片数据 信息, 如果是, 执行步骤 104 , 否则结束流程。  Step 103: The firmware determines, according to the search result, whether the content address memory has created the fragment data information, and if yes, performs step 104; otherwise, the process ends.
步骤 104、 固件从内容地址存储器中获取分片数据的重组信息, 其中, 重 组信息是由固件创建在内容地址存储器上的信息, 具体包括特征值、相关数据 结构和标志位。  Step 104: The firmware acquires reassembly information of the fragment data from the content address memory, where the reassembly information is information created by the firmware on the content address memory, and specifically includes a feature value, a related data structure, and a flag bit.
步骤 105、 判断所有需要重组的分片数据是否都已到达, 如果是, 执行步 骤 106 , 否则结束流程。  Step 105: Determine whether all the fragment data that needs to be reassembled has arrived. If yes, go to step 106, otherwise end the process.
步骤 106、 根据获取的重组信息对所有分片数据进行重组, 并将重组数据 发送给数据链路。  Step 106: Reassemble all the fragment data according to the acquired reassembly information, and send the reassembly data to the data link.
其中, 本发明实施例选用内容地址存储器 (CAM , Content Addres sab le Memory )对已创建的分片数据信息进行搜索, 因为使用内容地址存储器对已创 建的分片数据信息进行搜索的速度要远远高于中央处理单元的搜索速度,当然 也不排除釆用中央处理单元搜索已创建的分片数据信息。 另外, 固件就是运行 在数字信号处理器或网络处理器等专用器件中的软件,并且固件的处理速度同 硬件几乎相当,所以本发明实施例由固件和内容地址存储器配合完成数据的重 组, 这样就可以完成高速分片数据的重组工作。 同时固件一般都是软件可编程 的, 这样可以根据实际需要进行调整,从而保持了运行于中央处理单元的软件 分片重组的灵活性特点。  The embodiment of the present invention selects a content address memory (CAM, Content Addres sab le Memory) to search for the created fragment data information, because the content address memory is used to search for the created fragment data information. Higher than the search speed of the central processing unit, of course, does not exclude the use of the central processing unit to search for the created fragmentation data information. In addition, the firmware is software running in a dedicated device such as a digital signal processor or a network processor, and the processing speed of the firmware is almost the same as that of the hardware. Therefore, in the embodiment of the present invention, the firmware and the content address memory cooperate to complete the data reorganization, and thus The reorganization of high-speed fragmentation data can be completed. At the same time, the firmware is generally software programmable, so that it can be adjusted according to actual needs, thus maintaining the flexibility of software fragmentation and reorganization in the central processing unit.
参照图 2 , 图 2是本发明方法另一实施例的流程图, 该实施例将分片数据 重组分为正常情况下的数据重组和异常情况下的数据重组两种,该流程具体包 括以下步骤:  Referring to FIG. 2, FIG. 2 is a flowchart of another embodiment of the method according to the present invention. The embodiment reorganizes the fragment data into two types: data reorganization under normal conditions and data reorganization under abnormal conditions. The process specifically includes the following steps. :
步骤 201、 分片数据进入系统。  Step 201: The fragmented data enters the system.
步骤 202、运行在数字信号处理器或网络处理器等专用器件中的固件根据 分片数据内容判断所述数据是否需要重组, 如果是, 执行步骤 203 , 否则结束 流程。  Step 202: The firmware running in a dedicated device such as a digital signal processor or a network processor determines whether the data needs to be reassembled according to the content of the fragmented data. If yes, step 203 is performed; otherwise, the process ends.
步骤 203、 固件根据需要重组的分片数据提取特征值, 并根据该特征值查 找内容地址存储器,再将分片数据的特征值、相关数据结构以及标志位等写入 内容地址存储器, 形成分片数据的重组信息, 其中, 数据结构和标志位都是由 固件先创建再写入内容地址存储器中。 Step 203: The firmware extracts the feature value according to the fragment data that needs to be reassembled, and searches the content address memory according to the feature value, and then writes the feature value of the fragment data, the related data structure, and the flag bit into the content address memory to form a fragment. Data reorganization information, where the data structure and flag bits are The firmware is first created and then written to the content address memory.
步骤 204、 内容地址存储器对已创建的分片数据信息进行搜索, 并将搜索 结果返回给固件。  Step 204: The content address memory searches for the created fragment data information, and returns the search result to the firmware.
步骤 205、 固件根据搜索结果判断内容地址存储器是否已创建该分片数据 信息, 如果是, 执行步骤 208 , 否则执行步骤 206。  Step 205: The firmware determines, according to the search result, whether the content address memory has created the fragmentation data information, and if yes, step 208 is performed, otherwise step 206 is performed.
步骤 206、 固件根据特征值对内容地址存储器进行初始化, 同时也将相关 数据结构和标志也进行了初始化。  Step 206: The firmware initializes the content address memory according to the feature value, and also initializes the related data structure and flag.
步骤 207、将分片数据放入数据分片链, 并等待下一分片数据, 结束流程。 步骤 208、 固件从内容地址存储器中获取该分片数据的重组信息。  Step 207: Put the fragment data into the data fragment chain, and wait for the next fragment data, and end the process. Step 208: The firmware acquires reassembly information of the fragment data from the content address storage.
步骤 209、 中央处理单元判断分片数据的重组信息在内容地址存储器上的 存放时间是否超过预置时间,如果是,表明重组过程异常, 然后执行步骤 21 0 , 否则执行步骤 21 1。  Step 209: The central processing unit determines whether the storage time of the reassembly information of the fragment data in the content address memory exceeds a preset time. If yes, it indicates that the reorganization process is abnormal, and then performs step 21 0; otherwise, step 21 1 is performed.
步骤 21 0、 中央处理单元对存放在内容地址存储器的重组信息进行老化处 理,将那些长期占用内容地址存储器资源的重组信息进行清除, 这样可以保证 后续需要重组的分片数据可以申请到可用的内容地址存储器资源,因此中央处 理单元需要定期地对内容地址存储器中存在的重组信息进行老化,进而保证了 资源的合理利用。  Step 21: The central processing unit performs aging processing on the reorganization information stored in the content address memory, and clears the reorganization information of the long-term occupied content address memory resources, so as to ensure that the fragmented data that needs to be reorganized subsequently can apply for the available content. The address memory resource, therefore, the central processing unit needs to periodically age the recombination information existing in the content address memory, thereby ensuring the rational use of resources.
步骤 21 1、 判断所有分片数据是否都已到达, 如果是, 执行步骤 212 , 否 则执行步骤 21 3。  Step 21 1. Determine whether all the fragment data has arrived. If yes, go to step 212. Otherwise, go to step 21 3.
步骤 212、 根据获取的重组信息对所有分片数据进行重组, 并将重组数据 发送给数据链路, 结束流程。  Step 212: Reorganize all the fragment data according to the acquired reassembly information, and send the reassembly data to the data link, and end the process.
步骤 21 3、 设置标识位, 例如已经到达哪几个分片数据等, 再将分片数据 放入数据分片链, 等待下一分片数据, 结束流程。  Step 21 3. Set the identification bit, for example, which fragment data has been reached, and then put the fragmentation data into the data fragmentation chain, wait for the next fragmentation data, and end the process.
其中,步骤 209和步骤 21 0是对分片数据的重组信息长期占用内容地址存 储器资源的异常处理流程, 如果整个重组过程都是正常的, 则可以将步骤 209 和步骤 21 0去掉。  Step 209 and step 21 0 are an exception processing process for the reassembly information of the fragment data to occupy the content address memory resource for a long time. If the entire reorganization process is normal, step 209 and step 21 0 may be removed.
由上述可知,本发明实施例中是通过内容地址存储器协助查找已创建的分 片数据信息, 除此之外,还可以通过中央处理单元来查找已创建的分片数据信 息。 另外, 本发明实施例是由中央处理单元对存放在内容地址存储器的重组信 息进行老化处理, 此外还可以由固件对重组信息进行老化处理。 It can be seen from the above that in the embodiment of the present invention, the created fragmentation data information is assisted by the content address memory, and in addition, the created fragmentation data information can be searched by the central processing unit. In addition, the embodiment of the present invention is a reorganization letter stored in the content address memory by the central processing unit. The aging process is performed, and the reorganization information can be aged by the firmware.
此外需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中 的全部或部分步骤是可以通过程序指令相关的硬件来完成,所述的程序可以存 储于一计算机可读取的存储介质中, 所述的存储介质,如: ROM/RAM、磁碟、 光盘等。  In addition, it should be understood that those skilled in the art can understand that all or part of the steps of implementing the above embodiments may be completed by hardware related to program instructions, and the program may be stored in a computer readable storage medium. The storage medium is, for example, a ROM/RAM, a magnetic disk, an optical disk, or the like.
本发明实施例也提供了一种重组分片数据的装置,所述装置包括固件和内 容地址存储器, 其中: 固件用于根据需要重组的分片数据提取特征值, 内容地 址存储器用于根据固件提供的特征值对已创建的分片数据信息进行搜索;  An embodiment of the present invention also provides an apparatus for reassembling slice data, the apparatus comprising firmware and a content address memory, wherein: firmware is used to extract feature values according to fragment data that needs to be reorganized, and the content address memory is provided according to firmware The feature value searches for the created fragment data information;
固件根据搜索结果判断内容地址存储器中是否已创建所述需要重组的分 片数据信息,并在已创建所述需要重组的分片数据信息时从内容地址存储器中 获取所述分片数据的重组信息;  The firmware determines, according to the search result, whether the fragmentation data information that needs to be reassembled has been created in the content address memory, and acquires the reorganization information of the fragmentation data from the content address storage when the fragmentation data information that needs to be reorganized has been created. ;
固件再判断所有需要重组的分片数据是否都到达,并在所有需要重组的分 片数据都到达时, 根据获取的重组信息对分片数据进行重组。  The firmware then determines whether all the fragmentation data that needs to be reassembled arrives, and reassembles the fragmentation data according to the acquired reassembly information when all the fragmentation data that needs to be reassembled arrives.
参照图 3 , 图 3是本发明装置实施例示意图, 该装置至少包括固件 301、 内容地址存储器 302 , 也可以进一步包括中央处理单元 303。  Referring to FIG. 3, FIG. 3 is a schematic diagram of an embodiment of the apparatus of the present invention. The apparatus includes at least a firmware 301, a content address memory 302, and may further include a central processing unit 303.
其中, 固件 301 , 用于从需要重组的分片数据中提取特征值, 再根据特征 值查找内容地址存储器 302 , 以及将需要重组数据的特征值、 相关数据结构以 及标志位等写入内容地址存储器 302形成重组信息, 其中,数据结构和标志位 都是由固件 301先创建然后再写入内容地址存储器 302。  The firmware 301 is configured to extract feature values from the fragment data that needs to be reassembled, search the content address memory 302 according to the feature values, and write the feature values, related data structures, and flag bits that need to be reorganized into the content address memory. 302 forms reassembly information, wherein the data structure and flag bits are both created by firmware 301 and then written to content address memory 302.
其中, 内容地址存储器 302 , 用于根据固件 301提供的分片数据特征值搜 索已创建的分片数据信息, 以及将搜索结果返回给固件 301 ;  The content address memory 302 is configured to search for the created fragment data information according to the fragment data feature value provided by the firmware 301, and return the search result to the firmware 301;
其中, 中央处理单元 303 , 用于判断分片数据的重组信息在内容地址存储 器 302所占用的时间是否超过预置时间,并在重组信息占用时间超过预置时间 的情况对该重组信息进行老化处理。 其中, 所述老化处理就是清除重组信息, 并释放该重组信息所占用的内容地址存储器 302资源。  The central processing unit 303 is configured to determine whether the time occupied by the reassembly information of the fragmentation data in the content address memory 302 exceeds a preset time, and aging the reassembly information when the reorganization information occupation time exceeds a preset time. . The aging process is to clear the reassembly information, and release the content address storage 302 resource occupied by the reorganization information.
固件 301从需要重组的分片数据中提取特征值,再根据特征值查找内容地 址存储器 302 , 并将该特征值写入内容地址存储器 302 ; 内容地址存储器 302 根据固件 301提供的分片数据特征值对已创建的分片数据信息进行搜索,并将 搜索结果返回给固件 301。 固件 301根据搜索结果判断内容地址存储器 302是否已创建该分片数据信 息,并在已创建该分片数据信息的情况下从内容地址存储器 302中获取分片数 据的重组信息。 The firmware 301 extracts the feature value from the fragment data that needs to be reassembled, searches the content address memory 302 according to the feature value, and writes the feature value into the content address memory 302; the content address memory 302 is based on the fragment data feature value provided by the firmware 301. The created piecemeal data information is searched and the search result is returned to the firmware 301. The firmware 301 determines whether the content address memory 302 has created the slice data information based on the search result, and acquires the reassembly information of the slice data from the content address memory 302 if the slice data information has been created.
中央处理单元 303判断分片数据的重组信息在内容地址存储器 302上的存 放时间是否超过预置时间,并在重组信息在内容地址存储器 302存放时间超过 预置时间的情况对存放内容地址存储器 302的重组信息进行老化处理,将长期 占用内容地址存储器 302资源的重组信息进行清除,这样可以保证后续需要重 组的分片数据可以申请到可用的内容地址存储器资源。  The central processing unit 303 determines whether the storage time of the reassembly information of the fragmentation data on the content address memory 302 exceeds a preset time, and stores the content address memory 302 in the case where the reorganization information is stored in the content address memory 302 for a preset time. The reassembly information is subjected to aging processing, and the reassembly information of the resource occupies the content address memory 302 for a long time is cleared, so that the shard data that needs to be reassembled can be applied to the available content address memory resource.
固件 301判断所有需要重组的分片数据是否都已到达,并在所有分片数据 都已到达时根据重组信息对所有分片数据进行重组,再将重组数据发送给数据 链路。  The firmware 301 determines whether all the fragmentation data that needs to be reassembled has arrived, and reassembles all the fragmentation data according to the reassembly information when all the fragmentation data has arrived, and then transmits the reassembled data to the data link.
由装置实施例可知,本发明实施例是由中央处理单元 303对存储在内容地 址存储器 302的分片数据重组信息进行老化,它也可以由固件 301对重组信息 进行老化, 如果是固件 301对重组信息进行老化, 需要中央处理单元 303将存 放时间是否超过预置时间的判断结果发送给固件 301 , 固件 301再根据判断结 果决定是否需要对重组信息进行老化。 另外, 本发明实施例中是由内容地址存 储器 302对已创建的分片数据信息进行搜索,本发明实施例也不排除用中央处 理单元 303来搜索已创建的分片数据信息。  It can be seen from the embodiment of the present invention that the central processing unit 303 aging the fragment data recombination information stored in the content address memory 302 by the central processing unit 303, and it may also age the recombination information by the firmware 301, if the firmware 301 is reorganized. The information is aging, and the central processing unit 303 is required to send the determination result of whether the storage time exceeds the preset time to the firmware 301, and the firmware 301 determines whether the reorganization information needs to be aged according to the determination result. In addition, in the embodiment of the present invention, the created fragment data information is searched by the content address memory 302. The embodiment of the present invention does not exclude the use of the central processing unit 303 to search for the created fragment data information.
如图 4所示, 为本发明装置另一实施例的示意图。 该装置至少包括: 提取 单元 401、 搜索单元 402、 获取单元 403、 以及重组单元 404 ; 其中:  As shown in FIG. 4, it is a schematic diagram of another embodiment of the apparatus of the present invention. The apparatus at least includes: an extracting unit 401, a searching unit 402, an obtaining unit 403, and a recombining unit 404; wherein:
提取单元 401 , 用于对需要重组的分片数据提取特征值;  The extracting unit 401 is configured to extract feature values for the fragment data that needs to be reorganized;
搜索单元 402 ,用于根据提取单元 401提取的特征值在内容地址存储器 400 中搜索所述特征值的对应信息;  The searching unit 402 is configured to search for the corresponding information of the feature value in the content address memory 400 according to the feature value extracted by the extracting unit 401;
获取单元 403 ,用于根据搜索单元 402的搜索结果确定内容地址存储器 400 已创建所述需要重组的分片数据信息,当所述搜索单元搜索到所述特征值的对 应信息时, 获取分片数据的重组信息;  The obtaining unit 403 is configured to determine, according to the search result of the searching unit 402, that the content address memory 400 has created the fragmentation data information that needs to be reorganized, and when the searching unit searches for the corresponding information of the feature value, acquire the fragmentation data. Reorganization information;
重组单元 404 , 用于当所有需要重组的分片数据都到达时, 根据所述分片 数据的重组信息对分片数据进行重组。  The reorganization unit 404 is configured to reassemble the fragment data according to the reassembly information of the fragment data when all the fragment data that needs to be reassembled arrives.
参考图 4 , 该装置还可以进一步包括第一判断单元 405 , 用于根据进入系 统的分片数据内容确定分片数据需要重组, 并触发所述提取单元 401。 Referring to FIG. 4, the apparatus may further include a first determining unit 405, configured to enter the system according to The fragmented data content determines that the fragmentation data needs to be reorganized, and the extraction unit 401 is triggered.
该装置还可以进一步包括第二判断单元 406、 老化单元 407 , 其中: 第二判断单元 406 , 用于判断重组信息在内容地址存储器 400的存放时间 是否超过预置时间, 超过预置时间则输出判别结果;  The device may further include a second determining unit 406 and an aging unit 407, wherein: the second determining unit 406 is configured to determine whether the storage time of the reorganization information in the content address memory 400 exceeds a preset time, and outputting the discriminating when the preset time is exceeded. Result
老化单元 407 , 用于根据所述判别结果对所述重组信息进行老化。  The aging unit 407 is configured to age the recombination information according to the discriminating result.
其中, 所述获取分片数据的重组信息可以包括分片数据的特征值、数据结 构和标志位。  The reassembly information of the acquired fragment data may include a feature value, a data structure, and a flag bit of the fragment data.
该装置还可以进一步包括初始化单元 408 , 用于根据搜索单元 402的搜索 结果确定内容地址存储器 400没有创建该分片数据信息时,则根据所述特征值 对内容地址存储器 400进行初始化, 即将所述分片数据的特征值、数据结构和 标志位写入内容地址存储器 400中。  The device may further include an initialization unit 408, configured to initialize the content address memory 400 according to the feature value when the content address memory 400 does not create the fragment data information according to the search result of the search unit 402, that is, the The feature values, data structures, and flag bits of the slice data are written in the content address memory 400.
此外, 该装置还可以进一步包括标记单元 409 , 用于当只有部分需要重组 的分片数据到达时, 设置标识位, 将分片数据放入数据分片链, 等待下一分片 数据。  In addition, the apparatus may further include a marking unit 409, configured to set the identification bit when only a part of the fragmentation data to be reassembled arrives, put the fragmentation data into the data fragmentation chain, and wait for the next fragmentation data.
需要说明的是,上述第二判断单元 406和老化单元 407除了可以设置在本 发明装置的上述实施例中,也可以设置在中央处理单元中,对存储在内容地址 存储器 400的分片数据重组信息进行老化;还可以是第二判断单元 406设置在 中央处理单元中, 而老化单元 407设置在内容地址存储器 400中, 这样, 需要 中央处理单元中的第二判断单元 406 将存放时间是否超过预置时间的判断结 果发送给设置在内容地址存储器 400中的老化单元 407 , 由老化单元 407再根 据判断结果决定是否需要对重组信息进行老化。  It should be noted that the foregoing second judging unit 406 and the aging unit 407 may be disposed in the central processing unit in addition to the foregoing embodiment of the apparatus of the present invention, and may reassemble the fragment data stored in the content address memory 400. Performing aging; or the second judging unit 406 is disposed in the central processing unit, and the aging unit 407 is disposed in the content address memory 400, so that the second judging unit 406 in the central processing unit is required to store the storage time exceeding the preset. The result of the determination of the time is sent to the aging unit 407 provided in the content address memory 400, and the aging unit 407 determines whether the reorganization information needs to be aged according to the judgment result.
另外,上述初始化单元 408和搜索单元 402也不排除设置在内容地址存储 器 400中的可能。搜索单元 402可以设置在内容地址存储器 400对已创建的分 片数据信息进行搜索, 也不排除设置在中央处理单元的可能。  In addition, the above-described initializing unit 408 and search unit 402 also do not exclude the possibility of being set in the content address memory 400. The search unit 402 can be set to search the created slice data information in the content address memory 400, and does not exclude the possibility of being set in the central processing unit.
由于本发明实施例对需要重组的分片数据提取特征值,再由内容地址存储 器对已创建的分片数据信息进行搜索,然后通过内容地址存储器和固件配合完 成分片数据的重组,本发明实施例中通过使用内容地址存储器对已创建的分片 数据信息进行搜索, 其速度要远远高于中央处理单元的搜索速度, 同时固件的 处理速度同硬件几乎相当, 这样就可以完成高速分片数据的重组工作, 另夕卜, 固件一般都是软件可编程的, 这样可以根据实际需要进行调整,从而保持了运 行于中央处理单元的软件分片重组的灵活性特点。 The embodiment of the present invention extracts feature values for the fragment data that needs to be recombined, and then searches for the created fragment data information by the content address memory, and then completes the reorganization of the fragment data by the content address memory and the firmware. In the example, the content of the created fragmented data is searched by using the content address memory, which is much faster than the search speed of the central processing unit, and the processing speed of the firmware is almost the same as that of the hardware, so that the high-speed fragmented data can be completed. Reorganization work, another, The firmware is generally software programmable, so that it can be adjusted according to actual needs, thus maintaining the flexibility of software fragmentation re-running in the central processing unit.
其次,由于本发明实施例通过中央处理单元判断重组信息在内容地址存储 器的存放时间是否超过预置时间,如果存放时间超过预置时间, 中央处理单元 或固件就会对放置于内容地址存储器的分片数据重组信息进行老化,将那些长 期占用内容地址存储器资源的重组信息进行清除,这样可以保证后续需要重组 的分片数据可以申请到可用的内容地址存储器资源,从而保证了资源的合理利 用,进而避免已创建分片数据的重组信息长期占用内容地址存储器资源所带来 的安全漏洞和资源利用隐患。  Secondly, since the central processing unit determines whether the storage time of the reorganization information in the content address memory exceeds the preset time by the central processing unit, if the storage time exceeds the preset time, the central processing unit or firmware points to the content address memory. The data reassembly information is aging, and the reassembly information that occupies the content address memory resource for a long time is cleared, so that the fragment data that needs to be reassembled can be applied to the available content address memory resource, thereby ensuring the rational use of the resource, and further Avoid the security vulnerabilities and resource utilization risks caused by the reorganization information of the created fragmented data for a long time.
以上对本发明所提供的一种重组分片数据的方法与装置进行了详细介绍 , 说明只是用于帮助理解本发明的方法及其核心思想; 同时,对于本领域的一般 技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。  The method and apparatus for a heavy component slice data provided by the present invention are described in detail above, and the description is only for helping to understand the method of the present invention and its core idea; meanwhile, for those skilled in the art, according to the present invention, The present invention is not limited by the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种重组分片数据的方法, 其特征在于, 包括:  A method for weighting slice data, comprising:
对需要重组的分片数据提取特征值,在存储器中搜索所述特征值的对应信 息;  Extracting feature values for the fragment data that needs to be reorganized, and searching corresponding information of the feature values in the memory;
当搜索到所述特征值的对应信息时, 获取所述分片数据的重组信息; 当所有需要重组的分片数据都到达时,根据所述分片数据的重组信息对分 片数据进行重组。  When the corresponding information of the feature value is searched, the reassembly information of the fragment data is acquired; when all the fragment data that needs to be reassembled arrives, the fragment data is reorganized according to the recombination information of the fragment data.
2、 如权利要求 1所述的重组分片数据的方法, 其特征在于, 所述对需要 重组的分片数据提取特征值步骤之前进一步包括:  The method of extracting feature data according to claim 1, wherein the step of extracting feature values for the piece of data to be reassembled further comprises:
根据进入系统的分片数据内容确定所述分片数据需要重组。  It is determined that the fragment data needs to be reorganized according to the content of the fragment data entering the system.
3、 如权利要求 1或 2所述的重组分片数据的方法, 其特征在于, 所述获 取分片数据的重组信息之后进一步包括:  The method of reassembling slice data according to claim 1 or 2, wherein the obtaining the reassembly information of the fragment data further comprises:
确定所述重组信息在所述存储器的存放时间超过预置时间 ,则对所述重组 信息进行老化处理。  And determining that the reorganization information is stored in the memory for more than a preset time, and then performing the aging processing on the reassembly information.
4、 如权利要求 3所述的重组分片数据的方法, 其特征在于, 所述获取分 片数据的重组信息包括分片数据的特征值、 数据结构和标志位。  The method of reassembling slice data according to claim 3, wherein the recombination information of the acquired slice data comprises a feature value, a data structure, and a flag bit of the slice data.
5、 如权利要求 1所述的重组分片数据的方法, 其特征在于, 还包括: 根据搜索结果确定所述存储器没有创建该分片数据信息,则将所述分片数 据的特征值、 数据结构和标志位写入所述存储器中。  The method for reassembling the slice data according to claim 1, further comprising: determining, according to the search result, that the memory does not create the slice data information, and then using the feature value and data of the slice data Structure and flag bits are written to the memory.
6、 如权利要求 1所述的重组分片数据的方法, 其特征在于, 还包括: 当只有部分需要重组的分片数据到达时,设置标识位,再将分片数据放入 数据分片链, 等待下一分片数据。  The method for reassembling slice data according to claim 1, further comprising: setting a flag bit when only a part of the fragment data to be reassembled arrives, and then placing the slice data into the data slice chain , waiting for the next fragmentation data.
7、 一种重组分片数据的装置, 其特征在于, 包括:  7. A device for re-sampling data, comprising:
固件, 用于对需要重组的分片数据提取特征值, 以及当搜索到所述特征值 的对应信息时, 获取所述分片数据的重组信息, 以及确定所有需要重组的分片 数据都到达时, 根据获取的重组信息对分片数据进行重组;  Firmware, configured to extract feature values for the fragment data that needs to be reorganized, and obtain the recombination information of the fragment data when the corresponding information of the feature values is searched, and determine that all the fragment data that needs to be reassembled arrives Reorganizing the fragmented data according to the acquired reorganization information;
内容地址存储器, 用于创建所述需要重组的分片数据信息, 以及根据所述 固件提供的特征值搜索所述特征值的对应信息, 并将搜索结果反馈给所述固 件。 And a content address storage, configured to create the piecemeal data information that needs to be reorganized, and search for corresponding information of the feature value according to the feature value provided by the firmware, and feed back the search result to the firmware.
8、 如权利要求 7所述的重组分片数据的装置, 其特征在于, 还进一步包 括: 8. The apparatus of claim 7, wherein the method further comprises:
中央处理单元,用于确定重组信息在所述内容地址存储器的存放时间超过 预置时间, 则对所述重组信息进行老化。  The central processing unit is configured to determine that the reorganization information is stored in the content address memory for more than a preset time, and then the reassembly information is aged.
9、 如权利要求 7所述的重组分片数据的装置, 其特征在于, 还进一步包 括:  9. The apparatus of claim 7, wherein the method further comprises:
中央处理单元,用于确定重组信息在所述内容地址存储器的存放时间超过 预置时间;  a central processing unit, configured to determine that the reorganization information is stored in the content address memory for more than a preset time;
所述固件进一步用于根据所述中央处理单元的确定结果,对所述重组信息 进行老化。  The firmware is further configured to age the recombination information according to a determination result of the central processing unit.
10、 如权利要求 7或 9所述的重组分片数据的装置, 其特征在于, 所述固 件还进一步用于将分片数据的特征值、数据结构和标志位写入所述内容地址存 储器中。  10. The apparatus for reassembling slice data according to claim 7 or 9, wherein the firmware is further configured to write feature values, data structures, and flag bits of the slice data into the content address memory. .
11、 一种重组分片数据的装置, 其特征在于, 包括:  11. A device for re-sampling data, comprising:
提取单元, 用于对需要重组的分片数据提取特征值;  An extracting unit, configured to extract feature values from the fragment data that needs to be reorganized;
搜索单元,用于根据所述提取单元提取的特征值在存储器中搜索所述特征 值的对应信息;  a searching unit, configured to search, in the memory, corresponding information of the feature value according to the feature value extracted by the extracting unit;
获取单元, 用于当所述搜索单元搜索到所述特征值的对应信息时, 获取所 述分片数据的重组信息;  And an obtaining unit, configured to acquire, when the search unit searches for corresponding information of the feature value, reassembly information of the fragment data;
重组单元, 用于当所有需要重组的分片数据都到达时,根据所述分片数据 的重组信息对分片数据进行重组。  And a recombining unit, configured to reassemble the fragment data according to the recombination information of the fragment data when all the fragment data that needs to be reassembled arrives.
12、 如权利要求 11所述的重组分片数据的装置, 其特征在于, 还进一步 包括:  12. The apparatus of claim 11, wherein the method further comprises:
第一判断单元, 用于根据进入系统的分片数据内容确定分片数据需要重 组, 并触发所述提取单元。  The first determining unit is configured to determine that the fragment data needs to be reassembled according to the content of the fragmented data entering the system, and trigger the extracting unit.
1 3、 如权利要求 11或 12所述的重组分片数据的装置, 其特征在于, 还进 一步包括:  The apparatus for re-sampling data according to claim 11 or 12, further comprising:
第二判断单元,用于判断重组信息在所述存储器的存放时间是否超过预置 时间, 超过预置时间则输出判别结果; 老化单元, 用于根据所述第二判断单元输出的判别结果,对所述重组信息 进行老化。 a second determining unit, configured to determine whether the storage time of the reorganization information in the memory exceeds a preset time, and output a determination result when the preset time is exceeded; The aging unit is configured to age the recombination information according to the determination result output by the second determining unit.
14、 如权利要求 13所述的重组分片数据的装置, 其特征在于, 所述获取 分片数据的重组信息包括分片数据的特征值、 数据结构和标志位。  14. The apparatus for reassembling slice data according to claim 13, wherein the reassembly information of the acquisition fragment data comprises a feature value, a data structure, and a flag bit of the slice data.
15、 如权利要求 11所述的重组分片数据的装置, 其特征在于, 还包括: 初始化单元,用于根据所述搜索单元的搜索结果确定所述内容地址存储器 没有创建该分片数据信息时,将所述分片数据的特征值、数据结构和标志位写 入所述存储器中。  The apparatus of claim 11, further comprising: an initializing unit, configured to determine, according to a search result of the searching unit, that the content address memory does not create the fragment data information And writing the feature values, data structures, and flag bits of the slice data into the memory.
16、 如权利要求 11所述的重组分片数据的装置, 其特征在于, 还包括: 标记单元, 用于当只有部分需要重组的分片数据到达时, 设置标识位, 将 分片数据放入数据分片链。  The apparatus for reassembling slice data according to claim 11, further comprising: a marking unit, configured to: when only a part of the fragmentation data that needs to be reassembled arrives, set the identification bit, and put the fragmentation data into Data segmentation chain.
PCT/CN2007/070703 2006-09-18 2007-09-17 Method and device for reassembling fragment data WO2008040231A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNB2006101541842A CN100464536C (en) 2006-09-18 2006-09-18 Method and device for recomposing fragmented data
CN200610154184.2 2006-09-18

Publications (1)

Publication Number Publication Date
WO2008040231A1 true WO2008040231A1 (en) 2008-04-10

Family

ID=37859242

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/070703 WO2008040231A1 (en) 2006-09-18 2007-09-17 Method and device for reassembling fragment data

Country Status (2)

Country Link
CN (1) CN100464536C (en)
WO (1) WO2008040231A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113423129A (en) * 2021-05-25 2021-09-21 沈阳化工大学 Internet of things IM-D-SMART method based on negative fraction

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100464536C (en) * 2006-09-18 2009-02-25 华为技术有限公司 Method and device for recomposing fragmented data
CN101316232B (en) * 2008-07-09 2010-12-22 南京邮电大学 Fragmentation and reassembly method based on network protocol version six
CN101510223B (en) * 2009-04-03 2012-04-25 成都市华为赛门铁克科技有限公司 Data processing method and system
CN102811158A (en) * 2011-06-02 2012-12-05 中兴通讯股份有限公司 Data positioning and recombining method and corresponding device
CN103414714B (en) * 2013-08-07 2017-02-15 华为数字技术(苏州)有限公司 Method, device and equipment for processing messages
CN104731532B (en) * 2015-03-31 2018-05-04 四川效率源信息安全技术股份有限公司 A kind of method for repairing hard disk firmware area adaptation parameter module

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040004964A1 (en) * 2002-07-03 2004-01-08 Intel Corporation Method and apparatus to assemble data segments into full packets for efficient packet-based classification
CN1494274A (en) * 2002-10-31 2004-05-05 ����ͨѶ�ɷ����޹�˾ Method of realizing IP message partition and recombination based on network processor
WO2004107800A1 (en) * 2003-05-29 2004-12-09 Endace Technology Limited A method of recombining data units
CN1581793A (en) * 2003-08-05 2005-02-16 华为技术有限公司 Device and method for recombining internet protocol (IP) packet
CN1929453A (en) * 2006-09-18 2007-03-14 华为技术有限公司 Method and device for recomposing fragmented data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6636859B2 (en) * 2001-04-05 2003-10-21 International Business Machines Corporation Method and system for reassembling fragmented datagrams utilizing a plurality of concurrently accessible reassembly queues
CN1330162C (en) * 2004-12-02 2007-08-01 华为技术有限公司 Method for data segment cascade and recombination
CN100394717C (en) * 2005-10-25 2008-06-11 华中科技大学 Base station TCP agency confirmation method based on ARQ information and its system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040004964A1 (en) * 2002-07-03 2004-01-08 Intel Corporation Method and apparatus to assemble data segments into full packets for efficient packet-based classification
CN1494274A (en) * 2002-10-31 2004-05-05 ����ͨѶ�ɷ����޹�˾ Method of realizing IP message partition and recombination based on network processor
WO2004107800A1 (en) * 2003-05-29 2004-12-09 Endace Technology Limited A method of recombining data units
CN1581793A (en) * 2003-08-05 2005-02-16 华为技术有限公司 Device and method for recombining internet protocol (IP) packet
CN1929453A (en) * 2006-09-18 2007-03-14 华为技术有限公司 Method and device for recomposing fragmented data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113423129A (en) * 2021-05-25 2021-09-21 沈阳化工大学 Internet of things IM-D-SMART method based on negative fraction

Also Published As

Publication number Publication date
CN100464536C (en) 2009-02-25
CN1929453A (en) 2007-03-14

Similar Documents

Publication Publication Date Title
WO2008040231A1 (en) Method and device for reassembling fragment data
CN106657213B (en) File transmission method and device
JP5714497B2 (en) System and method enabling identification of different data sets
US6526446B1 (en) Hardware only transmission control protocol segmentation for a high performance network interface card
US20060215691A1 (en) Network adaptor, communication system and communication method
US9864538B1 (en) Data size reduction
US20190266193A1 (en) Data processing method for bloom filter, and bloom filter
US8788512B2 (en) Generating data feed specific parser circuits
JP2002538731A (en) Dynamic parsing in high performance network interfaces
US9398117B2 (en) Protocol data unit interface
US20230099304A1 (en) Zero-copy processing
US7466716B2 (en) Reducing latency in a channel adapter by accelerated I/O control block processing
CN114584560A (en) Fragmented frame recombination method and device
WO2018177041A1 (en) Method and apparatus for saving and recombining message fragment, and computer storage medium
US6636859B2 (en) Method and system for reassembling fragmented datagrams utilizing a plurality of concurrently accessible reassembly queues
CN112804003A (en) Optical module communication-based storage method, system and terminal
CN115037708B (en) Message processing method, system, device and computer readable storage medium
US8639836B2 (en) Smart nagling in a TCP connection
US10185783B2 (en) Data processing device, data processing method, and non-transitory computer readable medium
US10936227B2 (en) Method, device, and computer program product for recognizing reducible contents in data to be written
WO2023016407A1 (en) Data transmission method, system, apparatus, and device
CN111290700A (en) Distributed data reading and writing method and system
CN114567614B (en) Method and device for realizing ARP protocol processing based on FPGA
WO2022156376A1 (en) Method, system and device for prefetching target address, and medium
CN112019589B (en) Multi-level load balancing data packet processing 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: 07816909

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: 07816909

Country of ref document: EP

Kind code of ref document: A1