WO2010054599A1 - Procédé, dispositif et système de stockage de données - Google Patents

Procédé, dispositif et système de stockage de données Download PDF

Info

Publication number
WO2010054599A1
WO2010054599A1 PCT/CN2009/074939 CN2009074939W WO2010054599A1 WO 2010054599 A1 WO2010054599 A1 WO 2010054599A1 CN 2009074939 W CN2009074939 W CN 2009074939W WO 2010054599 A1 WO2010054599 A1 WO 2010054599A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
level
determination
yes
skip
Prior art date
Application number
PCT/CN2009/074939
Other languages
English (en)
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 WO2010054599A1 publication Critical patent/WO2010054599A1/fr

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees

Definitions

  • the present invention relates to the field of data storage, and in particular, to a method, device and system for storing data.
  • IP FIB IP Forwarding Information Base
  • all the child nodes of the same node are sequentially stored in memory in order, and the result index information of the same node is also stored in the continuous memory, so that the corresponding child can be obtained by using only one pointer plus the offset. Node or result index information.
  • a technical problem to be solved by embodiments of the present invention is to provide a method and apparatus for storing data. Effective compression storage of single branches in routing entries.
  • a method for storing data, where the data is stored in a tree structure including:
  • next-level child node Determining whether the next-level child node is a mergeable node, and when the determination is yes, the next-level child node Merging with the jump node into one node;
  • the data is stored in a tree structure that has been merged through the nodes.
  • a device for storing data comprising:
  • a first determining module configured to determine whether a node in the tree structure is a skip node, and when the determination is yes, reading a next-level child node of the level of the skip node;
  • the second determining module is configured to determine whether the next-level child node is a mergeable node, and when the determination is yes, merge the next-level child node with the jump node into one node.
  • the embodiments of the present invention have the following beneficial effects:
  • the hopping node generated when the routing entry is stored in a tree structure is merged with the next-level child node at the level of the hopping node, and the routing entry is reduced.
  • the total node level when the tree structure is stored in the case of fixed node memory space, effectively improves the forwarding performance of the routing forwarding table and the performance of adding the maximum table item capacity.
  • Figure 1 is a schematic diagram showing data in a tree structure
  • FIG. 2 is a schematic diagram of a node structure generated by storing the tree structure form shown in FIG. 1;
  • FIG. 3 is a schematic flow chart of an embodiment of a method of the present invention.
  • Figure 4 and Figure 5 are schematic diagrams of the compression principle of the hopping node
  • FIG. 6 is a schematic diagram of a specific process of another method embodiment of the present invention.
  • FIG. 7 is a schematic diagram showing data in a tree structure form in another method embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a node generated by storing data in FIG. 7 in a tree structure according to the prior art
  • FIG. 9 is a schematic structural diagram of a node generated by storing data in FIG. 7 in a tree structure according to another method embodiment of the present invention
  • FIG. 10 is a schematic structural diagram of a system according to an embodiment of a device of the present invention.
  • FIG. 11 is a schematic structural diagram of a system according to another embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a system according to another embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a system according to another embodiment of the present invention.
  • the embodiments of the present invention will be more clearly understood from the following description of the embodiments of the present invention. Further details are described.
  • a skip node generated when the data is stored in a tree structure is merged with a next-level child node of the level at which the skip node is located, so that the tree having more node levels may exist.
  • the shape structure is effectively compressed, and in the case of fixed node memory space, the maximum capacity performance of the storage space and the forwarding performance of the data are improved.
  • FIG. 3 is a schematic flowchart of Embodiment 1 of the method of the present invention, including:
  • Figure 1 shows a routing entry in the form of a tree.
  • the black dot represents an entry containing prefix information
  • the white dot represents an entry that does not contain prefix information.
  • the search step size is taken as an example for description.
  • the routing entries are divided into several subtrees from top to bottom and from left to right (as shown in the dotted line of Figure 1), wherein each dashed box is stored as a node.
  • a schematic diagram of the tree structure node as shown in FIG. 2 is generated.
  • the prefix is mainly used to specify a network reachable and uniquely indicating the destination address of the network, and is composed of a matching prefix (segment or IP address) and a prefix length (subnet mask). For example, 1. 2. 3. 0/16 and 1. 2. 3. 0/24, indicating that the matching prefix is 1. 2. 3. 0 prefixes are two prefixes of 16 and 24 respectively.
  • the subtree is stored as a hopping node:
  • the routing entry in the subtree does not contain prefix information.
  • Each routing entry in the subtree has one and only one routing sub-entry.
  • the three routing entries in the level 31 node in Figure 1 do not contain the prefix information, and each routing entry of the level 31 node has only one routing sub-entry, which generates three routes corresponding to the level 31 node in Figure 1.
  • the jump node of the entry as shown in Figure 2, node level 31 node.
  • a node has two child nodes on a single-branch empty node path, as shown in Figure 4. This form of path compression compresses from the first empty node to the parent of the node where the branch occurs to generate a hop node.
  • a node with a prefix appears on the single-branch empty node path, as shown in Figure 5. This form of path compression compresses from the first empty node to the parent node where the prefixed node appears to generate a hop node.
  • ulSCTNode is the flag of the super trie node. When the flag is 1, it represents the super trie node. When it is 0, the read type is judged as other node types.
  • Type is the node type.
  • ulCmpLen indicates the length of the compressed single-branch path stored by the hop node, and the length value is a multiple of the search step size.
  • the routing entry is divided into the search step and stored in the node. As shown in Figure 1, the search step for segmenting the entry is 3.
  • ulPBMIOffSet is the longest matching entry offset.
  • ulPRI is the parity bit.
  • ulAddrChild indicates the jump node child address.
  • ulCmpDataHigh is used to store the single byte compression path high byte.
  • ulCmpDataLow is used to store the low byte of the single branch compression path.
  • next-level child node is a mergeable node. When the determination is yes, merge the next-level child node with the jump node into one node (303).
  • the mergeable node is a node that includes prefix information and/or a multi-branch path.
  • the splicing node includes a trie node and a tail node that are divided into steps according to the step size.
  • the sub-tree generated by dividing the routing table entry by step size is used. If a routing entry contains a prefix information in a subtree or any routing entry in the subtree has two or more sub-route entries, the entry in the subtree is stored as a trie node, as shown in Figure 1. An entry in the 21 node contains the prefix information. If one of the level 23 nodes has two sub-routing entries, the level 21 node and the level 23 node generate the node 21 and the node 23 in Figure 2 as the trie node.
  • the data structure of the trie node is shown in Table 2.
  • ulSCTNode is the super trie node flag. When the flag is 1, it represents the super trie node. When it is 0, it reads ulType and determines what other node type is.
  • ulType is the node type
  • ulResultAddr is used to indicate the result array address of the internal node, wherein the internal node is used to store an internal bitmap of the trie node, and the internal bitmap is used to represent the prefix information stored in the trie node;
  • ulPBMIOffSet is the longest matching entry offset
  • ulPRI is a parity bit
  • ulHavelNode is used to indicate whether the trie node has an internal Node internal node. For example, when ulHavelNode is 1, it indicates that there is an internal child node, and when 0, there is no internal child node;
  • ulAddrChild is used to point to the child address of the trie node
  • Extending Bitmap High Bits are used to store the high byte of the Extend Bitmap
  • Extending Bitmap Low Bits are used to store the low byte bits of the extended bitmap.
  • the tail node is stored as a tail node when the split subtree does not have any subtrees. As shown in Figure 1, level 41 node, without any sub-subtree, corresponding to node 41 in Figure 2, node 41 is the tail node.
  • the data structure of the tail node is shown in Table 3.
  • ulSCTNode is the super trie node flag. When the flag is 1, it represents the super trie node. When it is 0, it reads ulType and determines what other node type is.
  • ulType is the node type
  • ulResultAddr is the result array address corresponding to the tail node
  • ulPBMIOffSet is the longest matching entry offset
  • ulPRI [22] is the parity bit
  • Internal Bitmap Low Bits are used to store the internal byte low byte.
  • the embodiment of the present invention only describes the process of determining the merge of data once.
  • the foregoing operations may be performed on the nodes in the tree structure multiple times or according to preset conditions.
  • the hopping node in the tree structure and the subordinate node including the suffix information and/or the sub-node including the multi-branch path in the next level of the hopping node may be merged, thereby realizing the reduction of the node hierarchy.
  • FIG. 6 is a schematic flowchart of a second embodiment of a method according to the method of the present invention, including:
  • the node types in the tree structure in this embodiment include a skip node, a trie node, and a tail node. It should be noted that, in other embodiments, the acquiring node information may traverse the nodes in the tree structure from left to right and top to bottom in order from the root node to obtain information of each node.
  • Figure 7 shows the routing table entries.
  • Figure 7 shows the routing entries in the tree structure.
  • the black dot represents the entry with the prefix information
  • the white dot represents the entry without the prefix information.
  • the preset search step size is 3, and the table items in FIG. 7 are segmented and stored according to the search step size and the prior art, and a node graph as shown in FIG. 8 is generated, where Level 1: trie node
  • Level 2 Level 21 node + Level 22 node + 3 ⁇ 4 ⁇ Level 23 node
  • Level 3 Level 31 node + trie node (Level 32 node)
  • Level 4 End Node (Level 41 node )
  • the determination when the determination is no, it may continue to determine whether the other node is a jump node or whether the node in the real-time monitoring tree structure becomes a skip node because of the insertion or deletion of the entry.
  • node 21 and node 23 are both hop nodes.
  • the next-level child node 31 of the level at which the node 21 is located is read, and it is judged whether the node 31 is a trie node. When the determination is negative, it is determined whether the node is a tail node. When the determination is yes, the node 21 and the node 31 are all merged into a super jump tail node, that is, the node level 21 node in FIG. 9 is generated, and the data structure of the super jump tail node is as shown in Table 4.
  • ulSCTNode is a super trie node flag. When the flag is 1, it represents a super trie node. When it is 0, it reads ulType and determines what other node type is.
  • ulType is the node type
  • ulCmpData is used to store a single-branch compressed path stored in the original hop node
  • ulCmpLen is used to indicate the length of the single-branch compressed path stored in the original hop node
  • ulResultAddr is used to indicate the address array address corresponding to the super jump tail node
  • ulPBMIOffSet indicates the longest matching entry offset
  • ulPRI [22] is the parity bit
  • Internal Bitmap High Bits are used to store the internal byte high byte of the original tail node
  • Internal Bitmap Low Bits are used to store the low byte bits of the internal bitmap of the original tail node.
  • the next-level child node 32 of the level of the node 23 in FIG. 7 is read, and it is determined whether the node 32 is a trie node.
  • the determination is yes, the node 23 and the node 32 are merged into a super-trie node, that is, a generation diagram is generated.
  • 9 is the node level 23 node, and at the same time, the original node 41 in Fig. 7 automatically becomes the node 31 in Fig. 9.
  • the data structure of the super trie node is as shown in Table 5.
  • ulSCTNode is the super trie node flag. When the flag is 1, it represents the super trie node. When it is 0, it reads ulType and determines what other node type is.
  • ulType is the node type
  • ulCmpDataHigh is used to store the high byte of the single branch compression path stored in the original hop node
  • ulCmpDataLow is used to store the low byte of the single branch compression path stored in the original hop node
  • ulCmpLen is used to indicate the compression in the original hop node Single branch path length
  • ulResultAddr is used to indicate the result array of the internal node corresponding to the original trie node.
  • ulPBMIOffSet indicates the longest matching entry offset
  • ulHavelNode is used to indicate whether the original trie node has an internal Node internal node
  • ulAddrChild is used to indicate the child node address of the original trie node
  • Extending Bitmap is used to store the extended bitmap high byte of the original trie node
  • the Extending Bitmap is used to store the extended byte low byte of the original trie node.
  • Figure 9 is a block diagram of the final node merged, where:
  • the node hierarchy in Figure 9 is reduced by one layer, and the number of nodes is also reduced from seven in Figure 4 to five. It can be seen that, by merging the hopping node with the next-level child node of the hopping node, the node and the node tier generated when the routing table entry is stored in the tree structure are effectively reduced. In the case of memory space, the forwarding performance of the routing forwarding table and the performance of adding the maximum table entry capacity are effectively improved.
  • 603 and 605 have no necessary sequence, and can be executed in parallel in other embodiments. Or in a certain order.
  • the node type when a table item is inserted or deleted, the node type may be changed, and the corresponding node may be merged or split according to the changed type of the node.
  • the process of splitting or merging may be performed in real time after the node type is changed, or the tree structure of the stored data may be traversed at regular intervals and then operated according to the change of the latter node.
  • the solutions in the embodiments of the present invention may also be implemented on other data stored in a tree structure.
  • FIG. 10 is a schematic structural diagram of an apparatus for storing data according to an embodiment of the present invention, including: a first determining module 10, configured to determine whether a node in a tree structure is a skip node, and when the determination is yes, read the The second determining module 20 is configured to determine whether the next-level child node is a mergeable node, and when the determination is yes, the next-level child node is The jump nodes are merged into one node.
  • a first determining module 10 configured to determine whether a node in a tree structure is a skip node, and when the determination is yes, read the
  • the second determining module 20 is configured to determine whether the next-level child node is a mergeable node, and when the determination is yes, the next-level child node is The jump nodes are merged into one node.
  • the first determining module 10 may include:
  • the obtaining unit 11 is configured to acquire node type information of one or more nodes in the tree structure.
  • process of obtaining node type information may be traversed and acquired in a certain order.
  • the second determining unit 12 is configured to determine, according to the node type information, whether the acquired node is a skip node, and when the determination is yes, read the next-level child node of the level where the skip node is located.
  • the second determining module 20 may include:
  • the first determining unit 21 is configured to determine whether the next-level child node includes multi-branch path and/or prefix information, and when the determination is yes, merge the next-level child point with the hop node into one node.
  • the first determining unit 21 may include:
  • a first determining sub-unit 211 determining whether the next-level child node is a trie node, and when the determination is yes, combining the trie node and the hop node into a super-trie node;
  • the second determining sub-unit 212 is configured to determine whether the next-level child node is a tail node. When the determination is yes, the tail node and the hop node are merged into a super-hop tail node.
  • the device embodiment of the present invention can realize that the hop node generated when the data is stored in a tree structure is merged with the next-level child node at the level of the hop node, and the total data is stored in a tree structure. Festival The point hierarchy and the total number of nodes save space for data storage and improve data forwarding performance.
  • the present invention can be implemented by hardware, or can be implemented by means of software plus necessary general hardware platform, and the technical solution of the present invention. It may be embodied in the form of a software product, which may be stored in a computer readable storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for making a computer device (may be A personal computer, server, or network device, etc., performs the methods described in various embodiments of the present invention.
  • a computer readable storage medium which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a computer device may be A personal computer, server, or network device, etc., performs the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

L’invention concerne, selon un mode de réalisation, un procédé de stockage de données qui comprend les étapes suivantes: on estime si un nœud dans une structure arborescente est un nœud de saut; si le nœud est un nœud de saut, le sous-nœud de niveau suivant du nœud de saut est lu; on estime si le sous-nœud de niveau suivant est un nœud fusionnable et si tel est le cas, le sous-nœud de niveau suivant est fusionné avec le nœud de saut en un seul nœud; les données sont stockées selon la structure arborescente une fois que les nœuds ont fusionné. Grâce à cette invention, un nœud de saut généré lors du stockage de données dans des structures arborescentes peut être fusionné avec son sous-nœud de niveau suivant, le nombre de niveaux de nœuds et le nombre total de nœuds peuvent être réduits lors du stockage de données dans les structures arborescentes, de l’espace peut être économisé pour le stockage de données, et les performances d’envoi de données peuvent être améliorées.
PCT/CN2009/074939 2008-11-13 2009-11-13 Procédé, dispositif et système de stockage de données WO2010054599A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810219090.8 2008-11-13
CN2008102190908A CN101741708B (zh) 2008-11-13 2008-11-13 一种存储数据的方法和装置

Publications (1)

Publication Number Publication Date
WO2010054599A1 true WO2010054599A1 (fr) 2010-05-20

Family

ID=42169647

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/074939 WO2010054599A1 (fr) 2008-11-13 2009-11-13 Procédé, dispositif et système de stockage de données

Country Status (2)

Country Link
CN (1) CN101741708B (fr)
WO (1) WO2010054599A1 (fr)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377269A (zh) * 2019-06-17 2019-10-25 平安科技(深圳)有限公司 业务审批系统配置化方法、装置及存储介质
CN115827573A (zh) * 2023-02-16 2023-03-21 麒麟软件有限公司 基于Linux的key-value形数据存储和使用方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2477363A4 (fr) 2010-08-24 2012-08-22 Huawei Tech Co Ltd Procédés et dispositifs pour la construction, la compression et la consultation d'un arbre binaire
CN103870462B (zh) * 2012-12-10 2018-02-09 腾讯科技(深圳)有限公司 一种数据处理方法及装置
CN104424204B (zh) * 2013-08-21 2017-08-11 华为技术有限公司 索引机制合并方法、搜索方法、装置及设备
CN109542854B (zh) * 2018-11-14 2020-11-24 网易(杭州)网络有限公司 数据压缩方法、装置、介质及电子设备
CN112565072B (zh) * 2020-11-02 2022-08-09 鹏城实验室 一种路由表压缩方法、路由器及存储介质
CN118233371A (zh) * 2024-05-24 2024-06-21 新华三半导体技术有限公司 一种报文转发方法、装置、网络设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6385649B1 (en) * 1998-11-06 2002-05-07 Microsoft Corporation Routers and methods for optimal routing table compression
US20030236793A1 (en) * 2002-06-19 2003-12-25 Ericsson Inc. Compressed prefix tree structure and method for traversing a compressed prefix tree
CN101141389A (zh) * 2007-09-29 2008-03-12 华为技术有限公司 增强多位Trie树查找方法和装置
CN101241499A (zh) * 2008-02-26 2008-08-13 中兴通讯股份有限公司 Patricia树快速查找方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60123596T2 (de) * 2001-07-13 2007-08-16 France Telecom Verfahren zur Komprimierung einer Baumhierarchie, zugehöriges Signal und Verfahren zur Dekodierung eines Signals

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6385649B1 (en) * 1998-11-06 2002-05-07 Microsoft Corporation Routers and methods for optimal routing table compression
US20030236793A1 (en) * 2002-06-19 2003-12-25 Ericsson Inc. Compressed prefix tree structure and method for traversing a compressed prefix tree
CN101141389A (zh) * 2007-09-29 2008-03-12 华为技术有限公司 增强多位Trie树查找方法和装置
CN101241499A (zh) * 2008-02-26 2008-08-13 中兴通讯股份有限公司 Patricia树快速查找方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377269A (zh) * 2019-06-17 2019-10-25 平安科技(深圳)有限公司 业务审批系统配置化方法、装置及存储介质
CN110377269B (zh) * 2019-06-17 2024-04-19 平安科技(深圳)有限公司 业务审批系统配置化方法、装置及存储介质
CN115827573A (zh) * 2023-02-16 2023-03-21 麒麟软件有限公司 基于Linux的key-value形数据存储和使用方法

Also Published As

Publication number Publication date
CN101741708B (zh) 2012-11-21
CN101741708A (zh) 2010-06-16

Similar Documents

Publication Publication Date Title
WO2010054599A1 (fr) Procédé, dispositif et système de stockage de données
US6490592B1 (en) Method of and apparatus for generating a tree data structure supporting longest match lookup
US6691124B2 (en) Compact data structures for pipelined message forwarding lookups
US7702630B2 (en) Longest prefix match lookup using hash function
US7433871B2 (en) Efficient ipv4/ipv6 best matching prefix method and apparatus
US7774538B2 (en) Method for ternary contents address memory table management
WO2009135417A1 (fr) Procédé de correspondance du préfixe le plus long et dispositif basé sur la structure de données arborescente
KR100586461B1 (ko) 파이프라인 이진 트리를 이용한 ip 어드레스 검색 방법,하드웨어 구조 및 기록매체
US20090327316A1 (en) Dynamic Tree Bitmap for IP Lookup and Update
CN108134739B (zh) 一种基于索引特里树的路由查找方法及装置
JP2012524932A (ja) アドレス検索のためのデータ構造、方法、及びシステム
WO2013078644A1 (fr) Procédé et dispositif de stockage de préfixe de routage et procédé et dispositif de recherche d'adresse de routage
WO2011124030A1 (fr) Procédé et dispositif permettant de stocker une entrée de table de routage
JP3570323B2 (ja) アドレスに関するプレフィクスの格納方法
US20130294450A1 (en) Optimized trie-based address lookup
US20200267081A1 (en) Forwarding Table Management
WO2016143405A1 (fr) Dispositif de récupération, procédé de récupération, programme et support d'enregistrement
WO2009132556A1 (fr) Procédé et appareil de recherche de données
CN108322394A (zh) 路由表建立、查找、删除及状态变更方法和装置
JP2014504042A (ja) パケット分類器、パケット分類方法、及びパケット分類プログラム
CN110995876B (zh) 一种ip存储与查找的方法及装置
CN117435912A (zh) 基于网络数据包属性值长短特征的数据包索引与检索方法
CN108566335B (zh) 一种基于NetFlow的网络拓扑生成方法
JP2010199646A (ja) 経路決定プログラム、管理装置及びネットワーク・システム
KR100420957B1 (ko) 클래스 분할 기법을 이용한 라우팅 테이블 자료구조,라우팅 테이블을 이용한 라우팅 경로 검색방법 및 장치

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

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

Country of ref document: EP

Kind code of ref document: A1