WO2021051431A1 - Forwarding method for network node in named data network, device, system, and storage medium - Google Patents

Forwarding method for network node in named data network, device, system, and storage medium Download PDF

Info

Publication number
WO2021051431A1
WO2021051431A1 PCT/CN2019/107695 CN2019107695W WO2021051431A1 WO 2021051431 A1 WO2021051431 A1 WO 2021051431A1 CN 2019107695 W CN2019107695 W CN 2019107695W WO 2021051431 A1 WO2021051431 A1 WO 2021051431A1
Authority
WO
WIPO (PCT)
Prior art keywords
entry
name
real
virtual
fib
Prior art date
Application number
PCT/CN2019/107695
Other languages
French (fr)
Chinese (zh)
Inventor
李挥
胡嘉伟
邬江兴
黄婷
伊鹏
马化军
尹峰
Original Assignee
北京大学深圳研究生院
国家数字交换系统工程技术研究中心
佛山赛思禅科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京大学深圳研究生院, 国家数字交换系统工程技术研究中心, 佛山赛思禅科技有限公司 filed Critical 北京大学深圳研究生院
Publication of WO2021051431A1 publication Critical patent/WO2021051431A1/en

Links

Images

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/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • 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

Definitions

  • the present invention relates to the field of Internet technology, and in particular to a forwarding method, device, system and storage medium for naming network nodes in a data network.
  • ICN Information Central Networking
  • CCN Content Central Networking
  • NDN Named Data Networking
  • the NDN branch is mainly discussed.
  • the network cares more about the data itself rather than the location of the data.
  • NDN realizes the multi-path transmission of data through an intelligent forwarding plane, and reduces the data request delay through the cache in the network, thereby achieving Efficient and reliable information distribution.
  • NDN uses hierarchical names to refer to every resource in the network, and designs a name-based content request and forwarding mechanism.
  • the NDN data transmission process relies on two types of data packets, namely, Interest Packet and Data Packet.
  • NDN uses a consumer-driven approach to complete its content request: the consumer adds the name of the requested content to the interest package, and the interest package is posted to the network; after the routing node receives the interest package, it will be at this node In the forwarding information table (Forwarding Information Base, FIB), the content name in the interest packet is queried based on the Longest Prefix Matching (LPM) method to obtain the port for forwarding the packet; when the interest packet is When the holder of the content accepts it, the holder will generate a data packet of the content and trace it back to the consumer along the path of the interest packet.
  • FIB Forwarding Information Base
  • NDN changes the message forwarding mechanism from address-oriented to name-oriented. In this way, NDN realizes the decoupling of content and location, and improves the flexibility and efficiency of the network.
  • name-oriented forwarding model also has its shortcomings: With the expansion of the network scale, the performance of the NDN forwarding plane tends to suffer a serious decline, including the rapid increase of forwarding delay, message congestion, and a large amount of memory. and so on. These problems are roughly caused by the following reasons:
  • the name-oriented forwarding plane uses the name as the search key, and the NDN name has unbounded length and variable styles. Therefore, various optimization algorithms based on regular IP addresses in the past are often difficult to apply to it; at the same time, the traditional linear
  • the search algorithm has a time cost proportional to the expected length of the name, and it is difficult to achieve better results for NDN names that are much longer than the IP address. The above reasons lead to a large delay in the query process.
  • NDN FIBs Because the objects referred to are more subtle, the number of NDN names is much larger than that of IP addresses, resulting in NDN FIBs often having an extremely large scale. Considering that the key value of FIB is an unbounded NDN name, when an appropriate compression strategy is not adopted, its memory footprint will far exceed the available capacity of existing equipment.
  • NDN is often difficult to apply in large-scale network practice, which is called the scalability problem of NDN.
  • the name-oriented forwarding mechanism is the key point that caused this problem and started to solve the problem.
  • Excellent forwarding plane design can ensure the efficiency and reliability of NDN network in large-scale applications, which has become the main focus of existing NDN researchers.
  • Prefix Tree also known as dictionary tree, is a data structure commonly used in string matching.
  • an edge refers to a segmented component (bits, characters%) of a name
  • a node refers to a specific name
  • the content of the name is the combination of components from the root to all edges on the path of the node.
  • the prefix parts that are the same between the names are merged into the upstream path, thereby achieving the compression of the data capacity and the preservation of the logical relationship between the names.
  • the prefix tree naturally supports the LPM algorithm and has good space utilization efficiency, most NDN implementations use the prefix tree for the design of its forwarding plane.
  • the disadvantage of the prefix tree is its slow query speed: its computational time cost is roughly proportional to the expected length of the name.
  • the query algorithm needs to match all the outgoing edges of the node one by one to find the The descending child node. Therefore, the NDN forwarding architecture based on the prefix tree will cause a large query delay and affect the overall performance of the network.
  • the query speed of the hash table will not be affected by the change of the name length and the size of the table entry, so it has better adaptability to the large-scale network environment.
  • the hash table needs to also store the complete key (here, the content name) in the table entry, which causes a large storage overhead.
  • the original hash table structure does not support the longest prefix matching algorithm, and the simplest linear implementation has a larger query time.
  • the existing NDN usually uses data compression schemes such as Footprint-Based Hash Table, and algorithm optimization schemes such as Random Search to improve the scalability of the system.
  • the forwarding plane will query the table for a prefix of length M. If the prefix does not exist in the table, it will insert the virtual entry corresponding to the prefix.
  • the virtual table entry can only be used to support the algorithm flow of random search, and cannot be used to guide the forwarding of interest packets.
  • a 2-stage LPM query starts with a prefix of length M, and only when the query hits, will it enter the linear search process for the complete name.
  • M takes a smaller value (2 or 3), which can speed up the query for invalid prefixes, thereby improving the resistance to DoS attacks.
  • FIB contains a series of hash tables numbered starting from 1, where the table numbered i only stores names with length i. For each name in the table, all its true prefixes must have corresponding entries in the FIB. If the corresponding entries do not exist, the corresponding virtual entries are inserted as padding.
  • the present invention provides a forwarding method for naming network nodes in a data network, which includes a hash table and a prefix tree.
  • the FIB is composed of the hash table and the prefix tree. For any name, all its true prefixes have corresponding entries in FIB.
  • the process of checking whether the prefix exists and adding corresponding auxiliary entries is called FIB reconstruction.
  • the entries are divided into Real entries and non-real entries, non-real entries are divided into virtual entries and semi-virtual entries;
  • the name is used as the key, and the node in the prefix tree is used as the value, thereby realizing fast retrieval of forwarding information from the name to the prefix tree;
  • Each edge in the prefix tree represents a name component, and each node of the prefix tree represents a name.
  • the node stores the forwarding information corresponding to the name and the corresponding category of the table item, as well as the pointer used to maintain the prefix tree structure;
  • Real entry The name in the real entry refers to the actual data and is used to guide the forwarding of the interest packet; before the FIB reconstruction, all the entries are real;
  • Non-real entry The auxiliary entry used to support the random search algorithm is called the non-real entry.
  • the name in the non-real entry does not refer to any actual data, and cannot be used to guide the forwarding of interest packets;
  • Virtual table entry if a non-real table entry does not have any real prefix, the non-real table entry is called a virtual table entry; when the random search process ends with a virtual table entry, it ends directly without any false negative error;
  • Semi-virtual entry if the non-real entry has a real prefix, the non-real entry is called a semi-virtual entry and needs to be searched back;
  • FIB forwarding information table
  • the forwarding method includes a searching step, and the searching step includes:
  • Step 1 Query the name in the interest packet through a random search algorithm to obtain the port for forwarding the message;
  • Step 2 Determine whether the prefix of the last HIT is real, if yes, return the prefix as the query result, otherwise go to step 3;
  • Step 3 Determine whether the prefix of the last HIT is virtual, if yes, return the query failure, otherwise go to step 4;
  • Step 4 Trace back up to the first real node in the prefix tree, and return its corresponding forwarding information.
  • the forwarding method further includes a deletion step.
  • the deletion step is used to discover and reclaim obsolete non-real entries, and the deletion step includes:
  • First delete step Determine whether the parent node of the corresponding entry is virtual, if it is virtual, then execute the first delete sub-step, if the parent node of the corresponding entry is real or semi-virtual, then the entry category of the name is modified Semi-virtual
  • the first deletion sub-step modify the category of the entry corresponding to the name to virtual, and then traverse the subtree rooted at the name. If a node meets the first and second conditions, then the category of the node is modified to virtual , The first condition: the category is semi-virtual, and the second condition: there is no real node on the path from the node to the name;
  • the second deletion step delete the entry, and then progressively check all the true prefixes of the name, if the corresponding node of the prefix meets the first and second points, then delete the node, the first point: the category is not In fact, the second point: it is a leaf node.
  • the present invention also provides a forwarding device for naming network nodes in a data network, which includes a hash table and a prefix tree.
  • the FIB is composed of the hash table and the prefix tree. For any name stored in the FIB, all the names are The true prefix has corresponding entries in FIB.
  • the process of checking whether the prefix exists and adding corresponding auxiliary entries is called FIB reconstruction. In the reconstructed FIB, the entries are divided into real entries and non-real entries. Entries, non-real entries are divided into virtual entries and semi-virtual entries;
  • the name is used as the key, and the node in the prefix tree is used as the value, thereby realizing fast retrieval of forwarding information from the name to the prefix tree;
  • Each edge in the prefix tree represents a name component, and each node of the prefix tree represents a name.
  • the node stores the forwarding information corresponding to the name and the corresponding category of the table item, as well as the pointer used to maintain the prefix tree structure;
  • Real entry The name in the real entry refers to the actual data and is used to guide the forwarding of the interest packet; before the FIB reconstruction, all the entries are real;
  • Non-real entry The auxiliary entry used to support the random search algorithm is called the non-real entry.
  • the name in the non-real entry does not refer to any actual data, and cannot be used to guide the forwarding of interest packets;
  • Virtual table entry if a non-real table entry does not have any real prefix, the non-real table entry is called a virtual table entry; when the random search process ends with a virtual table entry, it ends directly without any false negative error;
  • Semi-virtual entry if the non-real entry has a real prefix, the non-real entry is called a semi-virtual entry and needs to be searched back;
  • FIB forwarding information table
  • the forwarding device includes a search unit, and the search unit includes:
  • Query module used to query the name in the interest packet through a random search algorithm, so as to obtain the port for forwarding the message;
  • the first judgment module used to judge whether the prefix of the last HIT is true, if yes, return the prefix as the query result, otherwise execute the second judgment module;
  • the second judgment module used to judge whether the prefix of the last HIT is virtual, if yes, return the query failure, otherwise execute the return module;
  • Return module used to backtrack up to the first real node in the prefix tree and return its corresponding forwarding information.
  • the present invention also provides a forwarding system for naming network nodes in a data network, including: a memory, a processor, and a computer program stored on the memory, and the computer program is configured to be implemented when called by the processor The steps of the forwarding method of the present invention.
  • the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the forwarding method of the present invention when called by a processor.
  • the beneficial effects of the present invention are: the present invention realizes a FIB forwarding architecture and related algorithms that support random search, and completely solves the backtracking problem and outdated entry problems in it. At the same time, the experimental evaluation shows that the present invention hardly affects the algorithm. This ensures the efficiency and superiority of the random search algorithm, and lays an important foundation for designing an efficient NDN forwarding architecture and completely solving the scalability problem of NDN.
  • Figure 1 is a two-stage FIB query process diagram of the background technology
  • Figure 2 is a FIB query process diagram based on dichotomy in the background art
  • Figure 3 is a forwarding information table based on a hash table and a prefix tree of the present invention
  • FIG. 4 is a flowchart of the search steps of the present invention.
  • Figure 5 is a schematic diagram of the search process of the present invention.
  • FIG. 6 is a flowchart of the insertion steps of the present invention.
  • FIG. 7 is a flowchart of the deletion steps of the present invention.
  • Figure 8 is a performance comparison diagram of binary query and linear query.
  • the present invention discloses a forwarding method for naming network nodes in a data network.
  • the present invention focuses on solving the backtracking problem in random algorithms, which can cause so-called false negative errors (False Negative Error), which in turn leads to interest packets being covered. Discard for no reason.
  • the present invention also realizes timely detection and deletion of obsolete entries, thereby completing efficient recovery of memory.
  • the present invention designs a forwarding architecture based on the combination of a hash table and a prefix tree, where the hash table is used to support quick search, and the tree structure is used to store the logical relationship between names. We categorized the entries in the hash table to completely solve the problem of backtracking and outdated entries.
  • the present invention also designs matching operation algorithms to ensure the stability and correctness of the architecture.
  • the present invention uses the most basic binary search in random search as a case.
  • all its true prefixes must have corresponding entries in the table at the same time.
  • the process of checking whether the prefix exists and adding the corresponding auxiliary entries is called FIB reconstruction (FIB reconstruction).
  • FIB reconstruction In the reconstructed FIB, the table entries can be divided into the following two categories:
  • Real Entry The names in the real entry all refer to actual data, and can be used to guide the forwarding of interest packets. Before FIB reconstruction, all entries are real.
  • Non-Real Entry The auxiliary entry used to support the random search algorithm is called a non-real entry.
  • the name in the entry does not refer to any actual data and cannot be used Guide the forwarding of interest packages.
  • Virtual Entry If a non-real entry does not have any real prefix, we call the entry a virtual entry. When the binary search process ends with a dummy entry, it can end directly without any false negative errors.
  • Semi-virtual entry (Semi Virtual Entry): In contrast, if the non-real entry has a real prefix, the entry is called semi-virtual and requires a backtracking lookup.
  • the present invention designs a forwarding information table (FIB, Forwarding Information Base) based on a hash table and a prefix tree, where the hash table is used to support fast search, and the prefix tree is used to store the logical relationship between names.
  • FIB Forwarding Information Base
  • Figure 3 The main structure of FIB is shown in Figure 3:
  • the name (such as /c1/c4/c5) is used as the key, and the node (e1) in the prefix tree is used as the value. This achieves rapid retrieval of forwarded information from the name to the tree.
  • edges in the prefix tree all represent a name component (Name Component, such as /c1), and each node represents a name, that is, the splicing of all components on the path from the node to the root.
  • the node stores the forwarding information corresponding to the name and the corresponding category of the entry, as well as pointers used to maintain the tree structure. Since the name does not need to be recorded repeatedly in the tree, the introduction of the tree structure will only bring limited additional storage overhead.
  • the prefix tree helps us modify the categories of non-real entries in a dynamic environment. For example, if "/c1" is inserted into the FIB, all virtual entries with the prefix "/c1" need to be modified to semi-virtual, due to the diversity of NDN identification, it is not necessary to use the tree Under the premise of the structure, the modification can only be realized by traversing the entire table.
  • the prefix tree helps us speed up the backtracking process in the search algorithm: because each node in the tree has only one parent node, the process of backtracking does not require name or component query matching operations, so it has a faster search speed.
  • the prefix tree helps us clear outdated non-real entries in time, that is, those leaf nodes whose types are non-real. In the algorithm process of the table, as long as it is ensured that the types of all leaf nodes are not real, the cleaning of redundant table entries can be completed.
  • the forwarding method of the present invention includes a search step, and the search step includes:
  • Step 1 Query the name in the interest packet through a random search algorithm to obtain the port for forwarding the message.
  • the random search algorithm is a binary search algorithm
  • Step 2 After the binary search algorithm ends, first, judge whether the prefix of the last HIT is real, if it is, the LPM search has been successful, and return the prefix as the query result, otherwise go to step 3;
  • Step 3 Determine whether the prefix of the last HIT is virtual. If it is, you can be sure that there is no matching real prefix in the table, and return the query as a failure, otherwise go to step 4;
  • Step 4 It can be determined that the entry is a semi-virtual entry, and then it can be known that the entry has a real prefix, go back up in the prefix tree structure to find the real entry and return, that is, back up in the prefix tree to The first real node returns its corresponding forwarding information. Since the backtracking process in the prefix tree does not involve name matching and search, this process has minimal time overhead.
  • the present invention is also applicable to other advanced schemes based on binary search, thereby completely solving the backtracking problem in random search.
  • the forwarding method further includes an inserting step.
  • the inserting step is used to insert the name into the FIB, and the inserting step includes:
  • the first inserting step includes:
  • Step 1 Determine whether the entry corresponding to the name is a real entry, if so, update its forwarding information, otherwise proceed to step two;
  • Step 2 Determine whether the entry corresponding to the name is a virtual entry, if it is, then perform step three, otherwise perform the modification step;
  • Step 3 Modify all virtual entries in its subtree to semi-virtual entries, and then perform the modification steps;
  • Modification steps modify its category as a real entry and add forwarding information.
  • the issue of newly added entries is not involved at this time.
  • the situation of a real entry is trivial, so we only consider the case of a non-real entry: first, the category of the corresponding entry will be modified to real; if the entry is originally virtual, the virtual entry in the subtree needs Modify its category to semi-virtual. If the entry is originally semi-virtual, the subtree does not need to be modified.
  • the second inserting step includes:
  • the first processing step insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding semi-virtual entry if it does not exist;
  • the second processing step insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding virtual entry if it does not exist.
  • the second insertion step if the name to be inserted does not have a corresponding entry, the corresponding real entry is inserted, and the prefix is checked progressively from back to front to ensure that they all exist in the FIB. If a certain prefix is found to be absent, the corresponding non-real entry is inserted. The process continues until the algorithm reaches the LPM or the root node, and thus determines the category of the non-real node inserted in this process.
  • the forwarding method further includes a deletion step.
  • the deletion step is used to discover and reclaim outdated non-real entries, and the deletion step includes:
  • First delete step Determine whether the parent node of the corresponding entry is virtual, if it is virtual, then execute the first delete sub-step, if the parent node of the corresponding entry is real or semi-virtual, then the entry category of the name is modified Semi-virtual
  • the first deletion sub-step modify the category of the entry corresponding to the name to virtual, and then traverse the subtree rooted at the name. If a node meets the first and second conditions, then the category of the node is modified to virtual , The first condition: the category is semi-virtual, and the second condition: there is no real node on the path from the node to the name;
  • the second deletion step delete the entry, and then progressively check all the true prefixes of the name, if the corresponding node of the prefix meets the first and second points, then delete the node, the first point: the category is not In fact, the second point: it is a leaf node.
  • the category of non-real entries can be kept correct in a dynamic environment, and outdated non-real entries can be discovered and recycled in time, thereby ensuring the efficiency and stability of the forwarding plane. Therefore, the present invention completely solves the problem of outdated entries.
  • the invention also discloses a forwarding device for naming network nodes in a data network.
  • FIB includes a hash table and a prefix tree. For any name stored in the table, all its true prefixes have corresponding entries in the table. , The process of checking whether the prefix exists and adding corresponding auxiliary entries is called FIB reconstruction. In the reconstructed FIB, the entries are divided into real entries and non-real entries, and non-real entries are divided into virtual tables Entries and semi-virtual entries;
  • the name is used as the key, and the node in the prefix tree is used as the value, thereby realizing fast retrieval of forwarding information from the name to the prefix tree;
  • Each edge in the prefix tree represents a name component, and each node of the prefix tree represents a name.
  • the node stores the forwarding information corresponding to the name and the corresponding category of the table item, as well as the pointer used to maintain the prefix tree structure;
  • Real entry The name in the real entry refers to the actual data and is used to guide the forwarding of the interest packet; before the FIB reconstruction, all the entries are real;
  • Non-real entry The auxiliary entry used to support the random search algorithm is called the non-real entry.
  • the name in the non-real entry does not refer to any actual data, and cannot be used to guide the forwarding of interest packets;
  • Virtual table entry if a non-real table entry does not have any real prefix, the non-real table entry is called a virtual table entry; when the random search process ends with a virtual table entry, it ends directly without any false negative error;
  • Semi-virtual entry if the non-real entry has a real prefix, the non-real entry is called a semi-virtual entry and needs to be searched back;
  • FIB forwarding information table
  • the forwarding device includes a search unit, and the search unit includes:
  • Query module used to query the name in the interest packet through a random search algorithm, so as to obtain the port for forwarding the message;
  • the first judgment module used to judge whether the prefix of the last HIT is true, if yes, return the prefix as the query result, otherwise execute the second judgment module;
  • the second judgment module used to judge whether the prefix of the last HIT is virtual, if yes, return the query failure, otherwise execute the return module;
  • Return module used to backtrack up to the first real node in the prefix tree and return its corresponding forwarding information.
  • the forwarding device also includes an inserting unit, the inserting unit is used to insert a name into the FIB, and the inserting unit includes:
  • the first plug-in module includes:
  • the first insertion judgment module used to judge whether the entry corresponding to the name is a real entry, if so, then update its forwarding information, otherwise execute the second insertion judgment module;
  • Second insertion judgment module used to judge whether the entry corresponding to the name is a virtual entry, if so, then enter the execution module, otherwise enter the modification module;
  • Execution module used to modify all virtual entries in its subtree to semi-virtual entries, and then execute the modification module;
  • Modification module used to modify its category as a real entry and add forwarding information
  • the second plug-in module includes:
  • the first processing module used to insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding semi-virtual entry if it does not exist;
  • the second processing module used to insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding virtual entry if it does not exist;
  • the forwarding device further includes a deletion unit, the deletion unit is used to discover and reclaim outdated non-real entries, and the deletion unit includes:
  • First delete module used to determine whether the parent node of the corresponding entry is virtual, if it is virtual, then execute the first delete submodule, if the parent node of the corresponding entry is real or semi-virtual, then the name of the entry Modified the category to semi-virtual;
  • the first delete sub-module used to modify the category of the entry corresponding to the name to virtual, and then traverse the subtree rooted at the name, if a node meets the first and second conditions, then the category of the node is modified Is virtual, the first condition: the category is semi-virtual, and the second condition: there is no real node on the path from the node to the name;
  • the second delete module used to delete the entry, and then progressively check all the true prefixes of the name, if the corresponding node of the prefix meets the first and second points, then delete the node, the first point: category It is not real, and the second point: it is a leaf node.
  • the random search algorithm is a binary search algorithm.
  • the binary search algorithm is used to query the name in the interest packet to obtain the port forwarding the message; virtual table entry: if a non-real entry does not have any real prefix, then The non-real entry is called a virtual entry; when the binary search process ends with a virtual entry, it ends directly without any false negative error.
  • the present invention also discloses a forwarding system for naming network nodes in a data network, comprising: a memory, a processor, and a computer program stored on the memory, and the computer program is configured to be implemented when called by the processor The steps of the forwarding method of the present invention.
  • the present invention also discloses a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the forwarding method of the present invention when called by a processor.
  • the present invention realizes a FIB forwarding architecture and related algorithms that support random search, and completely solves the backtracking problem and outdated entry problems in it.
  • experimental evaluation shows that the present invention hardly affects the time cost of the algorithm, thereby ensuring The efficiency and superiority of the random search algorithm have laid an important foundation for us to design an efficient NDN forwarding architecture and completely solve the scalability problem of NDN.
  • the performance comparison between binary query and linear query is performed under different FIB table name prefix scales. Count the total time of one million name lookups and calculate the average lookup time (unit: us). The average number of components of the name prefix in the FIB table is 4.2, and the experimental result when the average number of components of the name prefix found is 11.2 is shown in Figure 8.
  • the average throughput of the binary query (the number of queries that can be processed/s) is 1.80 times that of the linear query, and when the scale of the FIB table is larger, that is, 1 billion, the present invention can still achieve a throughput of 0.2M.
  • the FIB forwarding data structure proposed by the present invention supports larger-scale name prefix storage and query, as shown in Table 1.
  • the data source of this experiment is the self-generated NDN identification. Since NDN is a new type of network architecture and has not yet been used in large-scale practical applications, it is difficult for us to obtain large-scale NDN data samples from actual network traffic. Therefore, we analyzed some statistical properties in the current network flow, simulated a large number of NDN identifiers, and generated a large-scale FIB table on this basis, so as to realize the evaluation and research of the present invention.

Landscapes

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

Abstract

Provided are a forwarding method for a network node in a named data network, a device, a system, and a storage medium. The forwarding method comprises a FIB comprising a hash table and a prefix tree, and each name stored in the table has a proper prefix having a corresponding table entry in the table. A process of checking whether a prefix exists and adding a corresponding auxiliary table entry is called FIB reconfiguration. Table entries in a reconfigured FIB are classified into real table entries and non-real table entries, and the non-real table entries are classified into virtual table entries and semi-virtual table entries. The present invention provides an advantageous effect of implementing a FIB forwarding framework and a related algorithm that support random search, and resolves issues relating to backtracking and outdated entries. As shown by experimental evaluation, the present invention has almost no influence on time overheads of algorithms, thereby ensuring the efficiency and superior performance of random search algorithms. When used for designing a highly efficient NDN forwarding framework, the invention lays the foundations for fundamentally solving the scalability problem of NDNs.

Description

一种用于命名数据网络中网络节点的转发方法、装置、系统及存储介质A forwarding method, device, system and storage medium for naming network nodes in a data network 技术领域Technical field
本发明涉及互联网技术领域,尤其涉及一种用于命名数据网络中网络节点的转发方法、装置、系统及存储介质。The present invention relates to the field of Internet technology, and in particular to a forwarding method, device, system and storage medium for naming network nodes in a data network.
背景技术Background technique
信息中心网络(Information Centric Networking,ICN),包括内容中心网络(Content Centric networking,CCN)和命名数据网络(Named Data Networking,NDN),是一种旨在解决目前IP协议瓶颈的新型互联网架构。本发明中谈及的主要是其NDN分支,以下将由NDN作为内容中心网络的指代.在NDN中,网络更关心数据其自身,而非数据的所在位置。通过内容和具体地点的解耦,以及适当的转发和缓存策略设计,NDN通过具有智能性的转发平面实现了数据的多路径发送,并通过网络中缓存降低了数据的请求延迟,由此实现了高效、可靠的信息分发。Information Central Networking (ICN), including Content Central Networking (CCN) and Named Data Networking (NDN), is a new type of Internet architecture that aims to solve the bottleneck of the current IP protocol. In the present invention, the NDN branch is mainly discussed. In the following, NDN will be referred to as the content center network. In NDN, the network cares more about the data itself rather than the location of the data. Through the decoupling of content and specific locations, as well as the design of appropriate forwarding and caching strategies, NDN realizes the multi-path transmission of data through an intelligent forwarding plane, and reduces the data request delay through the cache in the network, thereby achieving Efficient and reliable information distribution.
如其名字所示,NDN使用层级化的名字指代网络中的每一个资源,并设计了基于名字的内容请求和转发机制。NDN的数据传输过程依赖于两种数据包,即兴趣包(Interest Packet)和数据包(Data Packet)。NDN使用消费者驱动(Consumer-Driven)的方式完成其内容请求:消费者将请求内容的名字添加到兴趣包中,并将兴趣包投放到网络;路由节点收到兴趣包后,将在本节点的转发信息表(Forwarding Information Base,FIB)中,基于最长前缀匹配(Longest Prefix Matching,LPM)的方式查询兴趣包中的内容名,以此获取转发出报文的端口;当兴趣包被该内容的持有者接受时,持有者将生成一个该内容的数据包,并沿着兴趣包的到来路径回溯给消费者。As its name suggests, NDN uses hierarchical names to refer to every resource in the network, and designs a name-based content request and forwarding mechanism. The NDN data transmission process relies on two types of data packets, namely, Interest Packet and Data Packet. NDN uses a consumer-driven approach to complete its content request: the consumer adds the name of the requested content to the interest package, and the interest package is posted to the network; after the routing node receives the interest package, it will be at this node In the forwarding information table (Forwarding Information Base, FIB), the content name in the interest packet is queried based on the Longest Prefix Matching (LPM) method to obtain the port for forwarding the packet; when the interest packet is When the holder of the content accepts it, the holder will generate a data packet of the content and trace it back to the consumer along the path of the interest packet.
NDN将报文的转发机制从面向地址变为了面向名字,通过这种方式,NDN实现了内容和所在位置的解耦,提升了网络的灵活性和高效性。然而,面向名字的转发模式同样存在其缺陷:随着网络规模的扩大,NDN转发平面的性能往往会产生 较为严重的下降,包括转发延迟的迅速增大,报文的拥塞,和内存的大量占用等等。这些问题大致由以下原因导致:NDN changes the message forwarding mechanism from address-oriented to name-oriented. In this way, NDN realizes the decoupling of content and location, and improves the flexibility and efficiency of the network. However, the name-oriented forwarding model also has its shortcomings: With the expansion of the network scale, the performance of the NDN forwarding plane tends to suffer a serious decline, including the rapid increase of forwarding delay, message congestion, and a large amount of memory. and so on. These problems are roughly caused by the following reasons:
1.面向名字的转发平面以名字作为查找的Key,而NDN名字具有无界的长度和多变的样式,因此,以往基于规则IP地址的各种优化算法往往难以应用于其中;同时,传统的线性搜索算法具有正比于名字期望长度的时间开销,对于远长于IP地址的NDN名字难以取得较好的效果。上述原因导致了查询过程的较大时延。1. The name-oriented forwarding plane uses the name as the search key, and the NDN name has unbounded length and variable styles. Therefore, various optimization algorithms based on regular IP addresses in the past are often difficult to apply to it; at the same time, the traditional linear The search algorithm has a time cost proportional to the expected length of the name, and it is difficult to achieve better results for NDN names that are much longer than the IP address. The above reasons lead to a large delay in the query process.
2.由于指代的对象更为细微,NDN名字的数目远远大于IP地址,导致NDN的FIB往往具有极为庞大的规模。考虑到FIB的键值为无界的NDN名字,当不采用适当的压缩策略时,其内存占用将远超过现有设备的可用容量。2. Because the objects referred to are more subtle, the number of NDN names is much larger than that of IP addresses, resulting in NDN FIBs often having an extremely large scale. Considering that the key value of FIB is an unbounded NDN name, when an appropriate compression strategy is not adopted, its memory footprint will far exceed the available capacity of existing equipment.
相比于稳定的IP地址,NDN名字极其容易发生变动,导致NDN中的FIB面对着频繁得多的更新需求,为此,FIB设计必须支持各种操作的高效性,以维护自身的即时和有效。Compared with stable IP addresses, NDN names are extremely prone to change, resulting in the FIB in NDN facing much more frequent update requirements. For this reason, FIB design must support the efficiency of various operations to maintain its own real-time and effective.
出于上述原因,NDN往往难以应用于大规模的网络实践中,这被称为NDN的可扩展性问题。其中,面向名字的转发机制是造成该问题,以及着手解决该问题的关键点,优秀的转发平面设计可以保证NDN网络在大规模应用中的高效与可靠,成为了现有NDN研究人员的主要着力方向之一。For the above reasons, NDN is often difficult to apply in large-scale network practice, which is called the scalability problem of NDN. Among them, the name-oriented forwarding mechanism is the key point that caused this problem and started to solve the problem. Excellent forwarding plane design can ensure the efficiency and reliability of NDN network in large-scale applications, which has become the main focus of existing NDN researchers. One of the directions.
前缀树(Prefix Tree,Trie)又称字典树,是一种常见于字符串匹配的数据结构。在字典树中,边指代名字的一个切分组件(比特,字符…),而节点指代一个具体的名字,该名字的内容即为根到该节点路径上所有边的组件拼合。在基于前缀树的存储结构中,名字间相同的前缀部分被合并为上游路径,由此实现了对数据容量的压缩,和对名字间逻辑关系的保存。Prefix Tree (Trie), also known as dictionary tree, is a data structure commonly used in string matching. In the dictionary tree, an edge refers to a segmented component (bits, characters...) of a name, and a node refers to a specific name, and the content of the name is the combination of components from the root to all edges on the path of the node. In the storage structure based on the prefix tree, the prefix parts that are the same between the names are merged into the upstream path, thereby achieving the compression of the data capacity and the preservation of the logical relationship between the names.
由于前缀树天然的支持LPM算法,且具有较好的空间利用效率,大多数NDN实现采用前缀树用于其转发平面的设计。前缀树的缺陷在于其较慢的查询速度:其计算的时间开销大致正比于名字的期望长度,同时,在每一层中,查询算法需要对节点的所有出边逐一地进行匹配,以找寻用于下降的子节点。因此,基于前缀树的NDN转发架构会造成较大的查询延迟,影响了网络的整体性能。Since the prefix tree naturally supports the LPM algorithm and has good space utilization efficiency, most NDN implementations use the prefix tree for the design of its forwarding plane. The disadvantage of the prefix tree is its slow query speed: its computational time cost is roughly proportional to the expected length of the name. At the same time, in each layer, the query algorithm needs to match all the outgoing edges of the node one by one to find the The descending child node. Therefore, the NDN forwarding architecture based on the prefix tree will cause a large query delay and affect the overall performance of the network.
与前缀树相对的,哈希表的查询速度不会受到名字长度和表项规模的变动影响,因此对于大规模的网络环境具有较好的适应性。然而,为了应对哈希碰撞,哈希表需要同样把完整的键(此处为内容名字)存入表项中,从而造成了较大的存储开销。同时,原始的哈希表结构不支持最长前缀匹配算法,而最简单的线性实现又具有较大的查询耗时。为了应对这些问题,现有的NDN通常使用足迹压缩表(Footprint-Based Hash Table)等数据压缩方案,和随机查询(Random Search)等算法优化方案以提升系统的可扩展性。Compared with the prefix tree, the query speed of the hash table will not be affected by the change of the name length and the size of the table entry, so it has better adaptability to the large-scale network environment. However, in order to deal with hash collisions, the hash table needs to also store the complete key (here, the content name) in the table entry, which causes a large storage overhead. At the same time, the original hash table structure does not support the longest prefix matching algorithm, and the simplest linear implementation has a larger query time. In order to cope with these problems, the existing NDN usually uses data compression schemes such as Footprint-Based Hash Table, and algorithm optimization schemes such as Random Search to improve the scalability of the system.
背景技术一,思科公司于2013年的“Named data networking on a router:Fast and DoS-resistant forwarding with hash tables”一文中,提出了一种可以有效应对DoS攻击的转发算法及架构。该团队设计了一种两段式(2-stage)的FIB查找方法,从而有效的提高了查询不命中时的算法效率,以此提升了系统的抗攻击能力。该算法的简要流程如下文所述:BACKGROUND OF THE INVENTION 1. In the 2013 article "Named data network on a router: Fast and DoS-resistant forwarding with hash tables", Cisco proposed a forwarding algorithm and architecture that can effectively respond to DoS attacks. The team designed a two-stage (2-stage) FIB search method, which effectively improves the efficiency of the algorithm when the query is missed, thereby enhancing the system's anti-attack ability. The brief flow of the algorithm is as follows:
1)每一个名字被插入到FIB中时,转发平面会在表中查询其长度为M的前缀,若该前缀不在表中存在,则插入该前缀对应的虚表项(Virtual Entry)。虚表项只可用于支持随机搜索的算法流程,而无法用于指导兴趣包的转发。1) When each name is inserted into the FIB, the forwarding plane will query the table for a prefix of length M. If the prefix does not exist in the table, it will insert the virtual entry corresponding to the prefix. The virtual table entry can only be used to support the algorithm flow of random search, and cannot be used to guide the forwarding of interest packets.
2)如图1所示,2段式LPM查询从长度为M的前缀开始,只有在查询命中的场合中,才会进入对完整名字的线性查找流程。通常情况下,M取较小的值(2或3),由此可以加快对于无效前缀的查询速度,从而提高了对DoS攻击的抵抗能力。2) As shown in Figure 1, a 2-stage LPM query starts with a prefix of length M, and only when the query hits, will it enter the linear search process for the complete name. Under normal circumstances, M takes a smaller value (2 or 3), which can speed up the query for invalid prefixes, thereby improving the resistance to DoS attacks.
背景技术一的缺点:在查询命中的场合,该方法依赖于耗时较多的线性搜索,由于线性搜索的时间开销正比于查询字串的期望长度,面对长度没有上界的NDN名字,该算法依旧存在着较大的待优化空间。Background Art One disadvantage: In the case of a query hit, this method relies on a more time-consuming linear search. Since the time cost of a linear search is proportional to the expected length of the query string, in the face of NDN names with no upper bound in length, The algorithm still has a large space to be optimized.
背景技术二,华盛顿大学的Haowei Yuan等于2015年的“Reliably Scalable Name Prefix Lookup”一文中,提出了基于二分查找的FIB加速方案,其概述如下:Background Art 2: In the article "Reliably Scalable Name Prefix Lookup" by the University of Washington, Haowei Yuan equals to 2015, a FIB acceleration scheme based on binary search is proposed, which is summarized as follows:
1)FIB包含编号从1开始的一系列哈希表,其中编号为i的表仅存储长度为i的名字。对于表中的每一个名字,其所有的真前缀都必须在FIB中存在对应的表项,若对应表项不存在,则插入相应的虚表项作为填充。1) FIB contains a series of hash tables numbered starting from 1, where the table numbered i only stores names with length i. For each name in the table, all its true prefixes must have corresponding entries in the FIB. If the corresponding entries do not exist, the corresponding virtual entries are inserted as padding.
2)如图2所示,在每一轮迭代中,面对待搜索范围[L,H],算法将选取其范围 的中间点(L+H)/2作为下一个搜索对象,并依据其查询结果确定下一轮迭代搜索范围。当待搜索范围缩小至0时,算法终止。2) As shown in Figure 2, in each iteration, the search range [L, H] is faced, and the algorithm will select the middle point (L+H)/2 of the range as the next search object, and query according to it The result determines the search range for the next iteration. When the search range is reduced to 0, the algorithm terminates.
通过二分查找,算法的时间开销与名字长度的关系从线性下降到了对数级,由此较大地提升了转发平面的运算效率。Through binary search, the relationship between the time cost of the algorithm and the length of the name is reduced from linear to logarithmic, thereby greatly improving the computational efficiency of the forwarding plane.
背景技术二的缺点:上述的二分查询方案,以及相似的很多随机搜索算法。均存在着所谓的回溯问题(Backtracking Problem),以及过时表项问题(Outdated Entry Problem)。The disadvantage of the second background technology: the above-mentioned binary query scheme and many similar random search algorithms. There are so-called backtracking problems (Backtracking Problem) and outdated entry problems (Outdated Entry Problem).
背景技术三,清华大学的Yi Wang于“Statistical Optimal Hash-based Longest Prefix Match”等文中,提出了一系列基于统计分布的随机搜索算法。不同于二分查询,在其设计方案中,每一轮迭代的查询长度由先验的统计分布计算得出,而非单纯的选取待查询范围的中心点。由此,该方案缩短了查询路径的期望长度,以此提升了转发平台的运算效率。Background Art Three, Yi Wang of Tsinghua University proposed a series of random search algorithms based on statistical distribution in articles such as "Statistical Optimal Hash-based Longest Prefix Match". Different from the binary query, in its design scheme, the query length of each iteration is calculated by a priori statistical distribution, rather than simply selecting the center point of the range to be queried. As a result, the solution shortens the expected length of the query path, thereby improving the computational efficiency of the forwarding platform.
背景技术三的缺点:同背景技术二类似,均存在着所谓的回溯问题(Backtrack ing Problem),以及过时表项问题(Outdated Entry Problem)。Disadvantages of background technology three: similar to background technology two, there are so-called backtracking problems (backtracking problems) and outdated entry problems (outdated entry problems).
回溯问题:在上述的二分查询过程中,在算法体执行完毕时,若最后一次HIT的前缀是虚表项,则FIB无法判断表中是否存在待查询名字相应的转发信息,为此,算法需要前往最后一次HIT的前缀并重新执行线性搜索。举例来说,若表中存有名字“/c1”与“/c1/c2/c3/c4”,则“/c1/c2/”与“/c1/c2/c3”会被插入以Backtracking problem: In the above binary query process, when the algorithm body is executed, if the prefix of the last HIT is a virtual table entry, FIB cannot determine whether there is forwarding information corresponding to the name to be queried in the table. For this reason, the algorithm needs Go to the prefix of the last HIT and re-execute the linear search. For example, if there are names "/c1" and "/c1/c2/c3/c4" in the table, then "/c1/c2/" and "/c1/c2/c3" will be inserted with
Figure PCTCN2019107695-appb-000001
Figure PCTCN2019107695-appb-000001
作为虚表项。此时,对名字“/c1/c2/c3/c5”的2分查询过程为:As a virtual table entry. At this time, the 2-point query process for the name "/c1/c2/c3/c5" is:
由于查询路径上的所有HIT前缀均为虚,若在二分查询之后算法直接结束,则会返回查询失败。然而,表中存在其LPM“/c1”,由此产生了一个假阴性(False Negative)错误。在传统的IP协议中,转发算法通过一个回溯查找解决这一问题,即前往最后一次HIT的前缀(此处为“/c1/c2/c3”)并执行线性查找,然而,如上文所述的,内容网络中的名字具有无界且远长于IP地址的长度,因此该方式难以应用到NDN实现中。Since all HIT prefixes on the query path are virtual, if the algorithm ends directly after the binary query, it will return the query failure. However, there is its LPM "/c1" in the table, resulting in a false negative (False Negative) error. In the traditional IP protocol, the forwarding algorithm solves this problem through a backtracking search, which is to go to the prefix of the last HIT (here "/c1/c2/c3") and perform a linear search. However, as described above , The name in the content network is unbounded and much longer than the length of the IP address, so this method is difficult to apply to NDN implementation.
过时表项问题:在现有的随机搜索方案中,过时的虚表项难以被及时删除,在上述例子中,若“/c1/c2/c3/c4”被删除,则“/c1/c2/”与“/c1/c2/c3”失去了其必要性并应当被及时删除以节省存储开销。然而,出于NDN标识的多样性,除非遍历全表,FIB难以判断一个辅助表项是否在表中拥有继承于它的其他表项。因此,过时辅助表项的积累同样会造成大量的内存浪费,影响了网络的整体性能。Outdated entries problem: In the existing random search scheme, outdated virtual entries are difficult to delete in time. In the above example, if "/c1/c2/c3/c4" is deleted, then "/c1/c2/ "And "/c1/c2/c3" have lost their necessity and should be deleted in time to save storage costs. However, due to the diversity of NDN identification, unless the entire table is traversed, it is difficult for FIB to determine whether an auxiliary table entry has other entries inherited from it in the table. Therefore, the accumulation of outdated auxiliary entries will also cause a large amount of memory waste and affect the overall performance of the network.
发明概述Summary of the invention
技术问题technical problem
问题的解决方案The solution to the problem
技术解决方案Technical solutions
为了解决随机搜索中的回溯问题,本发明提供了一种用于命名数据网络中网络节点的转发方法,包括哈希表、前缀树,由哈希表和前缀树构成FIB,对于FIB中存储的任一个名字,其所有的真前缀在FIB中拥有相应的表项,检查前缀是否存在并添加对应辅助表项的过程被称为FIB重构,在重构后的FIB中,表项被分为实表项和非实表项,非实表项分为虚表项和半虚表项;In order to solve the problem of backtracking in random search, the present invention provides a forwarding method for naming network nodes in a data network, which includes a hash table and a prefix tree. The FIB is composed of the hash table and the prefix tree. For any name, all its true prefixes have corresponding entries in FIB. The process of checking whether the prefix exists and adding corresponding auxiliary entries is called FIB reconstruction. In the reconstructed FIB, the entries are divided into Real entries and non-real entries, non-real entries are divided into virtual entries and semi-virtual entries;
在哈希表中,以名字作为key,并以前缀树中的节点作为value,由此实现了从名字到前缀树中转发信息的快速检索;In the hash table, the name is used as the key, and the node in the prefix tree is used as the value, thereby realizing fast retrieval of forwarding information from the name to the prefix tree;
前缀树中的边均代表一个名字组件,前缀树的每个节点都代表一个名字,该节点存储了名字对应的转发信息和表项的对应类别、以及用于维持前缀树结构的指针;Each edge in the prefix tree represents a name component, and each node of the prefix tree represents a name. The node stores the forwarding information corresponding to the name and the corresponding category of the table item, as well as the pointer used to maintain the prefix tree structure;
实表项:实表项中的名字均指代实际存在的数据,并用于指导兴趣包的转发;在FIB重构之前,所有的表项均为实;Real entry: The name in the real entry refers to the actual data and is used to guide the forwarding of the interest packet; before the FIB reconstruction, all the entries are real;
非实表项:用于支持随机搜索算法的辅助表项被称作非实表项,非实表项中的名字不指代任何实际存在的数据,且无法用于指导兴趣包的转发;Non-real entry: The auxiliary entry used to support the random search algorithm is called the non-real entry. The name in the non-real entry does not refer to any actual data, and cannot be used to guide the forwarding of interest packets;
虚表项:若一个非实表项不拥有任何实前缀,则称该非实表项为虚表项;当随机搜索过程以虚表项结束时,直接结束而不会产生任何假阴性错误;Virtual table entry: if a non-real table entry does not have any real prefix, the non-real table entry is called a virtual table entry; when the random search process ends with a virtual table entry, it ends directly without any false negative error;
半虚表项:若该非实表项存在实前缀,则该非实表项称为半虚表项并需要进行回溯查找;Semi-virtual entry: if the non-real entry has a real prefix, the non-real entry is called a semi-virtual entry and needs to be searched back;
FIB:转发信息表;FIB: forwarding information table;
该转发方法包括搜索步骤,所述搜索步骤包括:The forwarding method includes a searching step, and the searching step includes:
步骤1:通过随机搜索算法查询兴趣包中的名字,从而获取转发出报文的端口;Step 1: Query the name in the interest packet through a random search algorithm to obtain the port for forwarding the message;
步骤2:判断最后一次HIT的前缀是否为实,若是,返回该前缀作为查询结果,否则执行步骤3;Step 2: Determine whether the prefix of the last HIT is real, if yes, return the prefix as the query result, otherwise go to step 3;
步骤3:判断最后一次HIT的前缀是否为虚,若是,返回查询失败,否则执行步骤4;Step 3: Determine whether the prefix of the last HIT is virtual, if yes, return the query failure, otherwise go to step 4;
步骤4:在前缀树中向上回溯至第一个实节点,返回其对应的转发信息。Step 4: Trace back up to the first real node in the prefix tree, and return its corresponding forwarding information.
作为本发明的进一步改进,为了解决过时表项问题,该转发方法还包括删除步骤,所述删除步骤用于将过时的非实表项进行发现和回收,所述删除步骤包括:As a further improvement of the present invention, in order to solve the problem of obsolete entries, the forwarding method further includes a deletion step. The deletion step is used to discover and reclaim obsolete non-real entries, and the deletion step includes:
首先,判断在FIB中的待删除的名字的对应表项是否存在子节点,若是,那么执行第一删除步骤,否则执行第二删除步骤;First, determine whether there is a child node in the corresponding entry of the name to be deleted in the FIB, if so, execute the first deletion step, otherwise execute the second deletion step;
第一删除步骤:判断对应表项的父节点是否为虚,若为虚,那么,执行第一删除子步骤,若对应表项的父节点为实或半虚,那么,名字的表项类别修改为半虚;First delete step: Determine whether the parent node of the corresponding entry is virtual, if it is virtual, then execute the first delete sub-step, if the parent node of the corresponding entry is real or semi-virtual, then the entry category of the name is modified Semi-virtual
第一删除子步骤:将名字对应的表项类别修改为虚,然后,遍历以名字为根的子树,若其中某个节点满足第1条件和第2条件,那么该节点的类别修改为虚,第1条件:类别为半虚,第2条件:该节点到名字的路径上没有任何实节点;The first deletion sub-step: modify the category of the entry corresponding to the name to virtual, and then traverse the subtree rooted at the name. If a node meets the first and second conditions, then the category of the node is modified to virtual , The first condition: the category is semi-virtual, and the second condition: there is no real node on the path from the node to the name;
第二删除步骤:删除该表项,然后,递进地向上检查名字的所有真前缀,若该前缀的对应节点满足第一点和第二点,那么删除该节点,第一点:类别为非实,第二点:为叶节点。The second deletion step: delete the entry, and then progressively check all the true prefixes of the name, if the corresponding node of the prefix meets the first and second points, then delete the node, the first point: the category is not In fact, the second point: it is a leaf node.
本发明还提供了一种用于命名数据网络中网络节点的转发装置,其中,包括哈希表、前缀树,由哈希表和前缀树构成FIB,对于FIB中存储的任一个名字,其所有的真前缀在FIB中拥有相应的表项,检查前缀是否存在并添加对应辅助表项的过程被称为FIB重构,在重构后的FIB中,表项被分为实表项和非实表项,非实表项分为虚表项和半虚表项;The present invention also provides a forwarding device for naming network nodes in a data network, which includes a hash table and a prefix tree. The FIB is composed of the hash table and the prefix tree. For any name stored in the FIB, all the names are The true prefix has corresponding entries in FIB. The process of checking whether the prefix exists and adding corresponding auxiliary entries is called FIB reconstruction. In the reconstructed FIB, the entries are divided into real entries and non-real entries. Entries, non-real entries are divided into virtual entries and semi-virtual entries;
在哈希表中,以名字作为key,并以前缀树中的节点作为value,由此实现了从名字到前缀树中转发信息的快速检索;In the hash table, the name is used as the key, and the node in the prefix tree is used as the value, thereby realizing fast retrieval of forwarding information from the name to the prefix tree;
前缀树中的边均代表一个名字组件,前缀树的每个节点都代表一个名字,该节点存储了名字对应的转发信息和表项的对应类别、以及用于维持前缀树结构的指针;Each edge in the prefix tree represents a name component, and each node of the prefix tree represents a name. The node stores the forwarding information corresponding to the name and the corresponding category of the table item, as well as the pointer used to maintain the prefix tree structure;
实表项:实表项中的名字均指代实际存在的数据,并用于指导兴趣包的转发;在FIB重构之前,所有的表项均为实;Real entry: The name in the real entry refers to the actual data and is used to guide the forwarding of the interest packet; before the FIB reconstruction, all the entries are real;
非实表项:用于支持随机搜索算法的辅助表项被称作非实表项,非实表项中的名字不指代任何实际存在的数据,且无法用于指导兴趣包的转发;Non-real entry: The auxiliary entry used to support the random search algorithm is called the non-real entry. The name in the non-real entry does not refer to any actual data, and cannot be used to guide the forwarding of interest packets;
虚表项:若一个非实表项不拥有任何实前缀,则称该非实表项为虚表项;当随机搜索过程以虚表项结束时,直接结束而不会产生任何假阴性错误;Virtual table entry: if a non-real table entry does not have any real prefix, the non-real table entry is called a virtual table entry; when the random search process ends with a virtual table entry, it ends directly without any false negative error;
半虚表项:若该非实表项存在实前缀,则该非实表项称为半虚表项并需要进行回溯查找;Semi-virtual entry: if the non-real entry has a real prefix, the non-real entry is called a semi-virtual entry and needs to be searched back;
FIB:转发信息表;FIB: forwarding information table;
该转发装置包括搜索单元,所述搜索单元包括:The forwarding device includes a search unit, and the search unit includes:
查询模块:用于通过随机搜索算法查询兴趣包中的名字,从而获取转发出报文的端口;Query module: used to query the name in the interest packet through a random search algorithm, so as to obtain the port for forwarding the message;
第一判断模块:用于判断最后一次HIT的前缀是否为实,若是,返回该前缀作为查询结果,否则执行第二判断模块;The first judgment module: used to judge whether the prefix of the last HIT is true, if yes, return the prefix as the query result, otherwise execute the second judgment module;
第二判断模块:用于判断最后一次HIT的前缀是否为虚,若是,返回查询失败,否则执行返回模块;The second judgment module: used to judge whether the prefix of the last HIT is virtual, if yes, return the query failure, otherwise execute the return module;
返回模块:用于在前缀树中向上回溯至第一个实节点,返回其对应的转发信息。Return module: used to backtrack up to the first real node in the prefix tree and return its corresponding forwarding information.
本发明还提供了一种用于命名数据网络中网络节点的转发系统,包括:存储器、处理器以及存储在所述存储器上的计算机程序,所述计算机程序配置为由所述处理器调用时实现本发明所述的转发方法的步骤。The present invention also provides a forwarding system for naming network nodes in a data network, including: a memory, a processor, and a computer program stored on the memory, and the computer program is configured to be implemented when called by the processor The steps of the forwarding method of the present invention.
本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序配置为由处理器调用时实现本发明所述的转发方法 的步骤。The present invention also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the forwarding method of the present invention when called by a processor.
发明的有益效果The beneficial effects of the invention
有益效果Beneficial effect
本发明的有益效果是:本发明实现了一种支持随机搜索的FIB转发架构及相关算法,彻底解决了其中的回溯问题和过时表项问题,同时,实验评估表明,本发明几乎不会影响算法的时间开销,由此保证了随机搜索算法的高效性和优越性,为设计高效的NDN转发架构,彻底解决NDN的可扩展性问题打下了重要的基础。The beneficial effects of the present invention are: the present invention realizes a FIB forwarding architecture and related algorithms that support random search, and completely solves the backtracking problem and outdated entry problems in it. At the same time, the experimental evaluation shows that the present invention hardly affects the algorithm. This ensures the efficiency and superiority of the random search algorithm, and lays an important foundation for designing an efficient NDN forwarding architecture and completely solving the scalability problem of NDN.
对附图的简要说明Brief description of the drawings
附图说明Description of the drawings
图1是背景技术的两段式FIB查询过程图;Figure 1 is a two-stage FIB query process diagram of the background technology;
图2是背景技术的基于二分法的FIB查询过程图;Figure 2 is a FIB query process diagram based on dichotomy in the background art;
图3是本发明的基于哈希表和前缀树的转发信息表;Figure 3 is a forwarding information table based on a hash table and a prefix tree of the present invention;
图4是本发明的搜索步骤流程图;Figure 4 is a flowchart of the search steps of the present invention;
图5是本发明的搜索过程的示意图;Figure 5 is a schematic diagram of the search process of the present invention;
图6是本发明的插入步骤流程图;Figure 6 is a flowchart of the insertion steps of the present invention;
图7是本发明的删除步骤流程图;Figure 7 is a flowchart of the deletion steps of the present invention;
图8是二分查询与线性查询的性能对比图。Figure 8 is a performance comparison diagram of binary query and linear query.
发明实施例Invention embodiment
本发明的实施方式Embodiments of the present invention
本发明公开了一种用于命名数据网络中网络节点的转发方法,本发明着眼于解决随机算法中的回溯问题,该问题会造成所谓的假阴性错误(False Negative Error),进而导致兴趣包被无端丢弃。另外,本发明还实现了过时表项的及时侦测和删除,从而完成了内存的高效回收。The present invention discloses a forwarding method for naming network nodes in a data network. The present invention focuses on solving the backtracking problem in random algorithms, which can cause so-called false negative errors (False Negative Error), which in turn leads to interest packets being covered. Discard for no reason. In addition, the present invention also realizes timely detection and deletion of obsolete entries, thereby completing efficient recovery of memory.
本发明设计了一种基于哈希表和前缀树之结合的转发架构,其中哈希表用于支持快速查找,而树结构用于存储名字间的逻辑关系。我们对哈希表中的表项进行了分类,以彻底解决回溯问题和过时表项问题。本发明同样设计了相匹配的 操作算法,以保证该架构的稳定性和正确性。The present invention designs a forwarding architecture based on the combination of a hash table and a prefix tree, where the hash table is used to support quick search, and the tree structure is used to store the logical relationship between names. We categorized the entries in the hash table to completely solve the problem of backtracking and outdated entries. The present invention also designs matching operation algorithms to ensure the stability and correctness of the architecture.
为了便于介绍,本发明采用随机搜索中最基础的二分查找作为案例。为了支持二分查找过程,对于表中存储的任一个名字,其所有的真前缀必须同时在表中拥有相应的表项,检查前缀是否存在并添加对应辅助表项的过程被称为FIB重构(FIB reconstruction),在重构后的FIB中,表项可以被分为如下两类:For ease of introduction, the present invention uses the most basic binary search in random search as a case. In order to support the binary search process, for any name stored in the table, all its true prefixes must have corresponding entries in the table at the same time. The process of checking whether the prefix exists and adding the corresponding auxiliary entries is called FIB reconstruction ( FIB reconstruction). In the reconstructed FIB, the table entries can be divided into the following two categories:
1.实表项(Real Entry):实表项中的名字均指代实际存在的数据,并可以用于指导兴趣包的转发。在FIB重构之前,所有的表项均为实。1. Real Entry: The names in the real entry all refer to actual data, and can be used to guide the forwarding of interest packets. Before FIB reconstruction, all entries are real.
2.非实表项(Non-Real Entry):用于支持随机搜索算法的辅助表项被称作非实表项,该表项中的名字不指代任何实际存在的数据,且无法用于指导兴趣包的转发。2. Non-Real Entry: The auxiliary entry used to support the random search algorithm is called a non-real entry. The name in the entry does not refer to any actual data and cannot be used Guide the forwarding of interest packages.
接下来,为了称呼的简便,我们记实表项中的名字为实名字,实前缀和半虚名字等具有相似的含义。Next, for the convenience of addressing, we record the names in the real entries as real names, and real prefixes and semi-virtual names have similar meanings.
在背景技术的回溯问题介绍中,可见,该问题产生的根本原因在于“无法判断一个非实表项是否拥有实前缀”,为此,必须对所有非实表项对进行回溯过程,产生了较大的计算开销,为了应对这一问题,我们将非实表项细分为以下两类:In the introduction of the backtracking problem in the background technology, it can be seen that the root cause of the problem is "it is impossible to judge whether a non-real table item has a real prefix". For this reason, a backtracking process must be performed on all non-real table item pairs, resulting in relatively In order to cope with this problem, we divide the non-real entries into the following two categories:
1.虚表项(Virtual Entry):若一个非实表项不拥有任何实前缀,则我们称该表项为虚表项。当二分查找过程以虚表项结束时,可以直接结束而不会产生任何假阴性错误。1. Virtual Entry: If a non-real entry does not have any real prefix, we call the entry a virtual entry. When the binary search process ends with a dummy entry, it can end directly without any false negative errors.
2.半虚表项(Semi Virtual Entry):与之相对的,若该非实表项存在实前缀,则该表项称为半虚并需要进行回溯查找。2. Semi-virtual entry (Semi Virtual Entry): In contrast, if the non-real entry has a real prefix, the entry is called semi-virtual and requires a backtracking lookup.
对种类的进一步细分有助于我们优化回溯查询过程,并构成了本发明架构设计的基础之一。The further subdivision of categories helps us to optimize the backtracking query process and forms one of the foundations of the architecture design of the present invention.
本发明设计了基于哈希表和前缀树的转发信息表(FIB,Forwarding Information Base),其中哈希表用以支持快速查找,而前缀树用于存储名字间的逻辑关系。FIB的主要结构如图3所示:The present invention designs a forwarding information table (FIB, Forwarding Information Base) based on a hash table and a prefix tree, where the hash table is used to support fast search, and the prefix tree is used to store the logical relationship between names. The main structure of FIB is shown in Figure 3:
在哈希表中,以名字(如/c1/c4/c5)作为key,并以前缀树中的节点(e1)作为value。由此实现了从名字到树中转发信息的快速 检索。In the hash table, the name (such as /c1/c4/c5) is used as the key, and the node (e1) in the prefix tree is used as the value. This achieves rapid retrieval of forwarded information from the name to the tree.
前缀树中的边均代表一个名字组件(Name component,如/c1),而每个节点都代表一个名字,即该节点到root的路径上的所有组件的拼接。该节点存储了名字对应的转发信息和表项的对应类别,以及用于维持树结构的指针。由于名字不需要在树中重复记录,树结构的引入只会带来有限的额外存储开销。The edges in the prefix tree all represent a name component (Name Component, such as /c1), and each node represents a name, that is, the splicing of all components on the path from the node to the root. The node stores the forwarding information corresponding to the name and the corresponding category of the entry, as well as pointers used to maintain the tree structure. Since the name does not need to be recorded repeatedly in the tree, the introduction of the tree structure will only bring limited additional storage overhead.
前缀树的引入出于以下三点目的:The introduction of the prefix tree is for the following three purposes:
1.前缀树有助于我们在动态环境中及时修改非实表项的类别。举例而言,若“/c1”被插入了FIB中,则所有前缀为“/c1”的虚表项均需要将其类别修改为半虚,出于NDN标识的多样性,在不借助于树结构的前提下,该修改只有通过遍历全表才能得以实现。1. The prefix tree helps us modify the categories of non-real entries in a dynamic environment. For example, if "/c1" is inserted into the FIB, all virtual entries with the prefix "/c1" need to be modified to semi-virtual, due to the diversity of NDN identification, it is not necessary to use the tree Under the premise of the structure, the modification can only be realized by traversing the entire table.
2.前缀树有助于我们加速搜索算法中的回溯过程:因为树中的每个节点只拥有一个父节点,向上回溯的过程不需要进行名字或组件的查询匹配操作,因而具有较快的搜索速度。2. The prefix tree helps us speed up the backtracking process in the search algorithm: because each node in the tree has only one parent node, the process of backtracking does not require name or component query matching operations, so it has a faster search speed.
3.前缀树有助于我们及时清除过时的非实表项,即那些种类为非实的叶节点。在表的算法过程中,只要保证所有叶节点的种类均为非实,即可完成对多余表项的清理。3. The prefix tree helps us clear outdated non-real entries in time, that is, those leaf nodes whose types are non-real. In the algorithm process of the table, as long as it is ensured that the types of all leaf nodes are not real, the cleaning of redundant table entries can be completed.
如图4所示,本发明的转发方法包括搜索步骤,搜索步骤包括:As shown in Figure 4, the forwarding method of the present invention includes a search step, and the search step includes:
步骤1:通过随机搜索算法查询兴趣包中的名字,从而获取转发出报文的端口,例如,该随机搜索算法是二分查找算法;Step 1: Query the name in the interest packet through a random search algorithm to obtain the port for forwarding the message. For example, the random search algorithm is a binary search algorithm;
步骤2:在二分查找算法结束后,首先,判断最后一次HIT的前缀是否为实,若是,则LPM搜索已经成功,返回该前缀作为查询结果,否则执行步骤3;Step 2: After the binary search algorithm ends, first, judge whether the prefix of the last HIT is real, if it is, the LPM search has been successful, and return the prefix as the query result, otherwise go to step 3;
步骤3:判断最后一次HIT的前缀是否为虚,若是,可以确信表中不存在匹配的实前缀,返回查询失败,否则执行步骤4;Step 3: Determine whether the prefix of the last HIT is virtual. If it is, you can be sure that there is no matching real prefix in the table, and return the query as a failure, otherwise go to step 4;
步骤4:可以判定该表项为半虚表项,则可知该表项存在一个实的前缀,在前缀树结构内向上回溯以找到该实表项并返回,即,在前缀树中向上回溯至第一个实节点,返回其对应的转发信息。由于在前缀树内的回溯过程不涉及名字的匹配和查找,这一过程具有极小的时间开销。Step 4: It can be determined that the entry is a semi-virtual entry, and then it can be known that the entry has a real prefix, go back up in the prefix tree structure to find the real entry and return, that is, back up in the prefix tree to The first real node returns its corresponding forwarding information. Since the backtracking process in the prefix tree does not involve name matching and search, this process has minimal time overhead.
如图5所示,在对名字“/c1/c2/c3/c6/c7”的查询过程中,二分查找的最后HI T前缀为“/c1/c2/c3”,是一个半虚表项。由此进入了回溯过程:算法从“/c1/c2/c3”开始,向上回溯直至遇到第一个实际表项“/c1”,并返回其对应的转发信息。As shown in Figure 5, in the process of querying the name "/c1/c2/c3/c6/c7", the final HIT prefix of the binary search is "/c1/c2/c3", which is a semi-virtual entry. This enters the backtracking process: the algorithm starts from "/c1/c2/c3", goes back up until it encounters the first actual entry "/c1", and returns its corresponding forwarding information.
本发明同样适用于基于二分查找的其他高级方案,由此彻底解决了随机搜索中的回溯问题。The present invention is also applicable to other advanced schemes based on binary search, thereby completely solving the backtracking problem in random search.
如图6所示,该转发方法还包括插入步骤,所述插入步骤用于将名字插入到FIB中,所述插入步骤包括:As shown in FIG. 6, the forwarding method further includes an inserting step. The inserting step is used to insert the name into the FIB, and the inserting step includes:
首先,判断在FIB中查询待插入的名字是否存在,若是,那么执行第一插入步骤,否则执行第二插入步骤;First, determine whether the name to be inserted in the FIB query exists, if it is, then execute the first insertion step, otherwise execute the second insertion step;
所述第一插入步骤包括:The first inserting step includes:
步骤一:判断名字对应的表项是否为实表项,若是,那么更新其转发信息,否则执行步骤二;Step 1: Determine whether the entry corresponding to the name is a real entry, if so, update its forwarding information, otherwise proceed to step two;
步骤二:判断名字对应的表项是否为虚表项,若是,那么执行步骤三,否则执行修改步骤;Step 2: Determine whether the entry corresponding to the name is a virtual entry, if it is, then perform step three, otherwise perform the modification step;
步骤三:将其子树中所有的虚表项修改为半虚表项,然后执行修改步骤;Step 3: Modify all virtual entries in its subtree to semi-virtual entries, and then perform the modification steps;
修改步骤:修改其类别为实表项并添加转发信息。Modification steps: modify its category as a real entry and add forwarding information.
综上,在第一插入步骤中,若待插入的名字在FIB中已经存在对应项时,此时不涉及新加入表项的问题。实表项的情形是平凡的,因此我们只考虑是非实表项的情况:首先,该对应项的类别会被修改为实;若该表项原本为虚,则子树内的虚表项需要修改其类别至半虚。若该表项原本为半虚,则子树无需修改。In summary, in the first insertion step, if the name to be inserted already has a corresponding entry in the FIB, the issue of newly added entries is not involved at this time. The situation of a real entry is trivial, so we only consider the case of a non-real entry: first, the category of the corresponding entry will be modified to real; if the entry is originally virtual, the virtual entry in the subtree needs Modify its category to semi-virtual. If the entry is originally semi-virtual, the subtree does not need to be modified.
所述第二插入步骤包括:The second inserting step includes:
首先,在FIB中查询待插入的名字的LPM,若HIT且为实,那么执行第一处理步骤,若MISS、或HIT且为虚,那么执行第二处理步骤;First, query the LPM of the name to be inserted in the FIB, if HIT is real, then execute the first processing step, if MISS or HIT is virtual, then execute the second processing step;
第一处理步骤:插入名字对应的实表项,在FIB中查找名字所有的真前缀,若不存在则插入对应的半虚表项;The first processing step: insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding semi-virtual entry if it does not exist;
第二处理步骤:插入名字对应的实表项,在FIB中查找名字所有的真前缀,若不存在则插入对应的虚表项。The second processing step: insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding virtual entry if it does not exist.
综上,在第二插入步骤中,若待插入的名字不存在对应项,则插入对应的实表 项,同时从后向前递进地检查其前缀,以保证它们均存在于FIB之中。若某个前缀被发现不存在,则插入对应的非实表项,该过程持续到算法到达LPM或者根节点,并由此决定此过程中插入的非实节点的类别。In summary, in the second insertion step, if the name to be inserted does not have a corresponding entry, the corresponding real entry is inserted, and the prefix is checked progressively from back to front to ensure that they all exist in the FIB. If a certain prefix is found to be absent, the corresponding non-real entry is inserted. The process continues until the algorithm reaches the LPM or the root node, and thus determines the category of the non-real node inserted in this process.
如图7所示,该转发方法还包括删除步骤,所述删除步骤用于将过时的非实表项进行发现和回收,所述删除步骤包括:As shown in FIG. 7, the forwarding method further includes a deletion step. The deletion step is used to discover and reclaim outdated non-real entries, and the deletion step includes:
首先,判断在FIB中的待删除的名字的对应表项是否存在子节点,若是,那么执行第一删除步骤,否则执行第二删除步骤;First, determine whether there is a child node in the corresponding entry of the name to be deleted in the FIB, if so, execute the first deletion step, otherwise execute the second deletion step;
第一删除步骤:判断对应表项的父节点是否为虚,若为虚,那么,执行第一删除子步骤,若对应表项的父节点为实或半虚,那么,名字的表项类别修改为半虚;First delete step: Determine whether the parent node of the corresponding entry is virtual, if it is virtual, then execute the first delete sub-step, if the parent node of the corresponding entry is real or semi-virtual, then the entry category of the name is modified Semi-virtual
第一删除子步骤:将名字对应的表项类别修改为虚,然后,遍历以名字为根的子树,若其中某个节点满足第1条件和第2条件,那么该节点的类别修改为虚,第1条件:类别为半虚,第2条件:该节点到名字的路径上没有任何实节点;The first deletion sub-step: modify the category of the entry corresponding to the name to virtual, and then traverse the subtree rooted at the name. If a node meets the first and second conditions, then the category of the node is modified to virtual , The first condition: the category is semi-virtual, and the second condition: there is no real node on the path from the node to the name;
第二删除步骤:删除该表项,然后,递进地向上检查名字的所有真前缀,若该前缀的对应节点满足第一点和第二点,那么删除该节点,第一点:类别为非实,第二点:为叶节点。The second deletion step: delete the entry, and then progressively check all the true prefixes of the name, if the corresponding node of the prefix meets the first and second points, then delete the node, the first point: the category is not In fact, the second point: it is a leaf node.
通过本发明的删除步骤,非实表项的类别能够在动态环境保持正确,且过时的非实表项得以得到及时的发现和回收,以此保证了转发平面的高效性和稳定性。由此,本发明彻底解决了过时表项问题。Through the deletion step of the present invention, the category of non-real entries can be kept correct in a dynamic environment, and outdated non-real entries can be discovered and recycled in time, thereby ensuring the efficiency and stability of the forwarding plane. Therefore, the present invention completely solves the problem of outdated entries.
本发明还公开了一种用于命名数据网络中网络节点的转发装置,FIB包括哈希表和前缀树,对于表中存储的任一个名字,其所有的真前缀在表中拥有相应的表项,检查前缀是否存在并添加对应辅助表项的过程被称为FIB重构,在重构后的FIB中,表项被分为实表项和非实表项,非实表项分为虚表项和半虚表项;The invention also discloses a forwarding device for naming network nodes in a data network. FIB includes a hash table and a prefix tree. For any name stored in the table, all its true prefixes have corresponding entries in the table. , The process of checking whether the prefix exists and adding corresponding auxiliary entries is called FIB reconstruction. In the reconstructed FIB, the entries are divided into real entries and non-real entries, and non-real entries are divided into virtual tables Entries and semi-virtual entries;
在哈希表中,以名字作为key,并以前缀树中的节点作为value,由此实现了从名字到前缀树中转发信息的快速检索;In the hash table, the name is used as the key, and the node in the prefix tree is used as the value, thereby realizing fast retrieval of forwarding information from the name to the prefix tree;
前缀树中的边均代表一个名字组件,前缀树的每个节点都代表一个名字,该节点存储了名字对应的转发信息和表项的对应类别、以及用于维持前缀树结构的指针;Each edge in the prefix tree represents a name component, and each node of the prefix tree represents a name. The node stores the forwarding information corresponding to the name and the corresponding category of the table item, as well as the pointer used to maintain the prefix tree structure;
实表项:实表项中的名字均指代实际存在的数据,并用于指导兴趣包的转发;在FIB重构之前,所有的表项均为实;Real entry: The name in the real entry refers to the actual data and is used to guide the forwarding of the interest packet; before the FIB reconstruction, all the entries are real;
非实表项:用于支持随机搜索算法的辅助表项被称作非实表项,非实表项中的名字不指代任何实际存在的数据,且无法用于指导兴趣包的转发;Non-real entry: The auxiliary entry used to support the random search algorithm is called the non-real entry. The name in the non-real entry does not refer to any actual data, and cannot be used to guide the forwarding of interest packets;
虚表项:若一个非实表项不拥有任何实前缀,则称该非实表项为虚表项;当随机搜索过程以虚表项结束时,直接结束而不会产生任何假阴性错误;Virtual table entry: if a non-real table entry does not have any real prefix, the non-real table entry is called a virtual table entry; when the random search process ends with a virtual table entry, it ends directly without any false negative error;
半虚表项:若该非实表项存在实前缀,则该非实表项称为半虚表项并需要进行回溯查找;Semi-virtual entry: if the non-real entry has a real prefix, the non-real entry is called a semi-virtual entry and needs to be searched back;
FIB:转发信息表;FIB: forwarding information table;
该转发装置包括搜索单元,所述搜索单元包括:The forwarding device includes a search unit, and the search unit includes:
查询模块:用于通过随机搜索算法查询兴趣包中的名字,从而获取转发出报文的端口;Query module: used to query the name in the interest packet through a random search algorithm, so as to obtain the port for forwarding the message;
第一判断模块:用于判断最后一次HIT的前缀是否为实,若是,返回该前缀作为查询结果,否则执行第二判断模块;The first judgment module: used to judge whether the prefix of the last HIT is true, if yes, return the prefix as the query result, otherwise execute the second judgment module;
第二判断模块:用于判断最后一次HIT的前缀是否为虚,若是,返回查询失败,否则执行返回模块;The second judgment module: used to judge whether the prefix of the last HIT is virtual, if yes, return the query failure, otherwise execute the return module;
返回模块:用于在前缀树中向上回溯至第一个实节点,返回其对应的转发信息。Return module: used to backtrack up to the first real node in the prefix tree and return its corresponding forwarding information.
该转发装置还包括插入单元,所述插入单元用于将名字插入到FIB中,所述插入单元包括:The forwarding device also includes an inserting unit, the inserting unit is used to insert a name into the FIB, and the inserting unit includes:
首先,判断在FIB中查询待插入的名字是否存在,若是,那么执行第一插入模块,否则执行第二插入模块;First, determine whether the name to be inserted in the FIB query exists, if so, execute the first insertion module, otherwise execute the second insertion module;
所述第一插入模块包括:The first plug-in module includes:
第一插入判断模块:用于判断名字对应的表项是否为实表项,若是,那么更新其转发信息,否则执行第二插入判断模块;The first insertion judgment module: used to judge whether the entry corresponding to the name is a real entry, if so, then update its forwarding information, otherwise execute the second insertion judgment module;
第二插入判断模块:用于判断名字对应的表项是否为虚表项,若是,那么进入执行模块,否则进入修改模块;Second insertion judgment module: used to judge whether the entry corresponding to the name is a virtual entry, if so, then enter the execution module, otherwise enter the modification module;
执行模块:用于将其子树中所有的虚表项修改为半虚表项,然后执行修改模块 ;Execution module: used to modify all virtual entries in its subtree to semi-virtual entries, and then execute the modification module;
修改模块:用于修改其类别为实表项并添加转发信息;Modification module: used to modify its category as a real entry and add forwarding information;
所述第二插入模块包括:The second plug-in module includes:
首先,在FIB中查询待插入的名字的LPM,若HIT且为实,那么执行第一处理模块,若MISS、或HIT且为虚,那么执行第二处理模块;First, query the LPM of the name to be inserted in the FIB, if HIT is real, then execute the first processing module, if MISS or HIT is virtual, then execute the second processing module;
第一处理模块:用于插入名字对应的实表项,在FIB中查找名字所有的真前缀,若不存在则插入对应的半虚表项;The first processing module: used to insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding semi-virtual entry if it does not exist;
第二处理模块:用于插入名字对应的实表项,在FIB中查找名字所有的真前缀,若不存在则插入对应的虚表项;The second processing module: used to insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding virtual entry if it does not exist;
LPM:最长前缀匹配。LPM: Longest prefix match.
该转发装置还包括删除单元,所述删除单元用于将过时的非实表项进行发现和回收,所述删除单元包括:The forwarding device further includes a deletion unit, the deletion unit is used to discover and reclaim outdated non-real entries, and the deletion unit includes:
首先,判断在FIB中的待删除的名字的对应表项是否存在子节点,若是,那么执行第一删除模块,否则执行第二删除模块;First, determine whether there are child nodes in the corresponding entry of the name to be deleted in the FIB, if so, execute the first deletion module, otherwise execute the second deletion module;
第一删除模块:用于判断对应表项的父节点是否为虚,若为虚,那么,执行第一删除子模块,若对应表项的父节点为实或半虚,那么,名字的表项类别修改为半虚;First delete module: used to determine whether the parent node of the corresponding entry is virtual, if it is virtual, then execute the first delete submodule, if the parent node of the corresponding entry is real or semi-virtual, then the name of the entry Modified the category to semi-virtual;
第一删除子模块:用于将名字对应的表项类别修改为虚,然后,遍历以名字为根的子树,若其中某个节点满足第1条件和第2条件,那么该节点的类别修改为虚,第1条件:类别为半虚,第2条件:该节点到名字的路径上没有任何实节点;The first delete sub-module: used to modify the category of the entry corresponding to the name to virtual, and then traverse the subtree rooted at the name, if a node meets the first and second conditions, then the category of the node is modified Is virtual, the first condition: the category is semi-virtual, and the second condition: there is no real node on the path from the node to the name;
第二删除模块:用于删除该表项,然后,递进地向上检查名字的所有真前缀,若该前缀的对应节点满足第一点和第二点,那么删除该节点,第一点:类别为非实,第二点:为叶节点。The second delete module: used to delete the entry, and then progressively check all the true prefixes of the name, if the corresponding node of the prefix meets the first and second points, then delete the node, the first point: category It is not real, and the second point: it is a leaf node.
随机搜索算法为二分查找算法,在查询模块中,通过二分查找算法查询兴趣包中的名字,从而获取转发出报文的端口;虚表项:若一个非实表项不拥有任何实前缀,则称该非实表项为虚表项;当二分查找过程以虚表项结束时,直接结束而不会产生任何假阴性错误。The random search algorithm is a binary search algorithm. In the query module, the binary search algorithm is used to query the name in the interest packet to obtain the port forwarding the message; virtual table entry: if a non-real entry does not have any real prefix, then The non-real entry is called a virtual entry; when the binary search process ends with a virtual entry, it ends directly without any false negative error.
本发明还公开了一种用于命名数据网络中网络节点的转发系统,包括:存储器、处理器以及存储在所述存储器上的计算机程序,所述计算机程序配置为由所述处理器调用时实现本发明所述的转发方法的步骤。The present invention also discloses a forwarding system for naming network nodes in a data network, comprising: a memory, a processor, and a computer program stored on the memory, and the computer program is configured to be implemented when called by the processor The steps of the forwarding method of the present invention.
本发明还公开了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序配置为由处理器调用时实现本发明所述的转发方法的步骤。The present invention also discloses a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the forwarding method of the present invention when called by a processor.
本发明实现了一种支持随机搜索的FIB转发架构及相关算法,彻底解决了其中的回溯问题和过时表项问题,同时,实验评估表明,本发明几乎不会影响算法的时间开销,由此保证了随机搜索算法的高效性和优越性,为我们设计高效的NDN转发架构,彻底解决NDN的可扩展性问题打下了重要的基础。The present invention realizes a FIB forwarding architecture and related algorithms that support random search, and completely solves the backtracking problem and outdated entry problems in it. At the same time, experimental evaluation shows that the present invention hardly affects the time cost of the algorithm, thereby ensuring The efficiency and superiority of the random search algorithm have laid an important foundation for us to design an efficient NDN forwarding architecture and completely solve the scalability problem of NDN.
针对本发明提出的FIB转发数据结构,在不同的FIB表名字前缀规模下,进行二分查询与线性查询的性能对比。统计百万次名字查找的总时间,计算出平均查找时间(单位:us)。FIB表中name prefix的平均component数目为4.2,查找的name prefix的平均component数目为11.2时的实验结果如图8所示。二分查询的平均吞吐量(可处理的查询次数/s)为线性查询的1.80倍,且在FIB表规模较大即为10亿时,本发明仍能达到0.2M的吞吐量。With respect to the FIB forwarding data structure proposed in the present invention, the performance comparison between binary query and linear query is performed under different FIB table name prefix scales. Count the total time of one million name lookups and calculate the average lookup time (unit: us). The average number of components of the name prefix in the FIB table is 4.2, and the experimental result when the average number of components of the name prefix found is 11.2 is shown in Figure 8. The average throughput of the binary query (the number of queries that can be processed/s) is 1.80 times that of the linear query, and when the scale of the FIB table is larger, that is, 1 billion, the present invention can still achieve a throughput of 0.2M.
Figure PCTCN2019107695-appb-000002
Figure PCTCN2019107695-appb-000002
表1 FIB表规模与生成构建时间Table 1 FIB table scale and generation and construction time
同时,本发明提出的FIB转发数据结构支持较大规模的名字前缀存储与查询,如表1所示。本实验的数据来源是自主生成的NDN标识。由于NDN是一种新型的网络架构,尚未得到大规模的实际运用,我们难以从现实中的网络流量中获取大规模的NDN数据样本。因此我们分析了当前网络流中的一些统计性质,仿真得到大量的NDN标识,并在此基础之上生成大规模FIB表,从而实现对本发明的评估和研究。At the same time, the FIB forwarding data structure proposed by the present invention supports larger-scale name prefix storage and query, as shown in Table 1. The data source of this experiment is the self-generated NDN identification. Since NDN is a new type of network architecture and has not yet been used in large-scale practical applications, it is difficult for us to obtain large-scale NDN data samples from actual network traffic. Therefore, we analyzed some statistical properties in the current network flow, simulated a large number of NDN identifiers, and generated a large-scale FIB table on this basis, so as to realize the evaluation and research of the present invention.
以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明,不能认 定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above content is a further detailed description of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those of ordinary skill in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the protection scope of the present invention.

Claims (10)

  1. 一种用于命名数据网络中网络节点的转发方法,包括哈希表、前缀树,其特征在于,由哈希表和前缀树构成FIB,对于FIB中存储的任一个名字,其所有的真前缀在FIB中拥有相应的表项,检查前缀是否存在并添加对应辅助表项的过程被称为FIB重构,在重构后的FIB中,表项被分为实表项和非实表项,非实表项分为虚表项和半虚表项;A forwarding method for naming network nodes in a data network, including a hash table and a prefix tree. It is characterized in that the FIB is composed of a hash table and a prefix tree. For any name stored in the FIB, all its true prefixes The process of having corresponding entries in FIB, checking whether the prefix exists and adding corresponding auxiliary entries is called FIB reconstruction. In the reconstructed FIB, the entries are divided into real entries and non-real entries. Non-real entries are divided into virtual entries and semi-virtual entries;
    在哈希表中,以名字作为key,并以前缀树中的节点作为value,由此实现了从名字到前缀树中转发信息的快速检索;In the hash table, the name is used as the key, and the node in the prefix tree is used as the value, thereby realizing fast retrieval of forwarding information from the name to the prefix tree;
    前缀树中的边均代表一个名字组件,前缀树的每个节点都代表一个名字,该节点存储了名字对应的转发信息和表项的对应类别、以及用于维持前缀树结构的指针;Each edge in the prefix tree represents a name component, and each node of the prefix tree represents a name. The node stores the forwarding information corresponding to the name and the corresponding category of the table item, as well as the pointer used to maintain the prefix tree structure;
    实表项:实表项中的名字均指代实际存在的数据,并用于指导兴趣包的转发;在FIB重构之前,所有的表项均为实;Real entry: The name in the real entry refers to the actual data and is used to guide the forwarding of the interest packet; before the FIB reconstruction, all the entries are real;
    非实表项:用于支持随机搜索算法的辅助表项被称作非实表项,非实表项中的名字不指代任何实际存在的数据,且无法用于指导兴趣包的转发;Non-real entry: The auxiliary entry used to support the random search algorithm is called the non-real entry. The name in the non-real entry does not refer to any actual data, and cannot be used to guide the forwarding of interest packets;
    虚表项:若一个非实表项不拥有任何实前缀,则称该非实表项为虚表项;当随机搜索过程以虚表项结束时,直接结束而不会产生任何假阴性错误;Virtual table entry: if a non-real table entry does not have any real prefix, the non-real table entry is called a virtual table entry; when the random search process ends with a virtual table entry, it ends directly without any false negative error;
    半虚表项:若该非实表项存在实前缀,则该非实表项称为半虚表项并需要进行回溯查找;Semi-virtual entry: if the non-real entry has a real prefix, the non-real entry is called a semi-virtual entry and needs to be searched back;
    FIB:转发信息表;FIB: forwarding information table;
    该转发方法包括搜索步骤,所述搜索步骤包括:The forwarding method includes a searching step, and the searching step includes:
    步骤1:通过随机搜索算法查询兴趣包中的名字,从而获取转发出报文的端口;Step 1: Query the name in the interest packet through a random search algorithm to obtain the port for forwarding the message;
    步骤2:判断最后一次HIT的前缀是否为实,若是,返回该前缀作为查询结果,否则执行步骤3;Step 2: Determine whether the prefix of the last HIT is real, if yes, return the prefix as the query result, otherwise go to step 3;
    步骤3:判断最后一次HIT的前缀是否为虚,若是,返回查询失败,否则执行步骤4;Step 3: Determine whether the prefix of the last HIT is virtual, if yes, return the query failure, otherwise go to step 4;
    步骤4:在前缀树中向上回溯至第一个实节点,返回其对应的转发信息。Step 4: Trace back up to the first real node in the prefix tree, and return its corresponding forwarding information.
  2. 根据权利要求1所述的转发方法,其特征在于,该转发方法还包括插入步骤,所述插入步骤用于将名字插入到FIB中,所述插入步骤包括:The forwarding method according to claim 1, wherein the forwarding method further comprises an inserting step, and the inserting step is used to insert a name into the FIB, and the inserting step includes:
    首先,判断在FIB中查询待插入的名字是否存在,若是,那么执行第一插入步骤,否则执行第二插入步骤;First, determine whether the name to be inserted in the FIB query exists, if it is, then execute the first insertion step, otherwise execute the second insertion step;
    所述第一插入步骤包括:The first inserting step includes:
    步骤一:判断名字对应的表项是否为实表项,若是,那么更新其转发信息,否则执行步骤二;Step 1: Determine whether the entry corresponding to the name is a real entry, if so, update its forwarding information, otherwise proceed to step two;
    步骤二:判断名字对应的表项是否为虚表项,若是,那么执行步骤三,否则执行修改步骤;Step 2: Determine whether the entry corresponding to the name is a virtual entry, if it is, then perform step three, otherwise perform the modification step;
    步骤三:将其子树中所有的虚表项修改为半虚表项,然后执行修改步骤;Step 3: Modify all virtual entries in its subtree to semi-virtual entries, and then perform the modification steps;
    修改步骤:修改其类别为实表项并添加转发信息;Modification steps: modify its category as a real entry and add forwarding information;
    所述第二插入步骤包括:The second inserting step includes:
    首先,在FIB中查询待插入的名字的LPM,若HIT且为实,那么执行第一处理步骤,若MISS、或HIT且为虚,那么执行第二处理步骤;First, query the LPM of the name to be inserted in the FIB, if HIT is real, then execute the first processing step, if MISS or HIT is virtual, then execute the second processing step;
    第一处理步骤:插入名字对应的实表项,在FIB中查找名字所有的真前缀,若不存在则插入对应的半虚表项;The first processing step: insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding semi-virtual entry if it does not exist;
    第二处理步骤:插入名字对应的实表项,在FIB中查找名字所有的真前缀,若不存在则插入对应的虚表项;The second processing step: insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding virtual entry if it does not exist;
    LPM:最长前缀匹配。LPM: Longest prefix match.
  3. 根据权利要求1所述的转发方法,其特征在于,该转发方法还包括删除步骤,所述删除步骤用于将过时的非实表项进行发现和回收,所述删除步骤包括:The forwarding method according to claim 1, wherein the forwarding method further comprises a deleting step, the deleting step is used for discovering and recycling outdated non-real entries, and the deleting step comprises:
    首先,判断在FIB中的待删除的名字的对应表项是否存在子节点,若是,那么执行第一删除步骤,否则执行第二删除步骤;First, determine whether there is a child node in the corresponding entry of the name to be deleted in the FIB, if so, execute the first deletion step, otherwise execute the second deletion step;
    第一删除步骤:判断对应表项的父节点是否为虚,若为虚,那么,执行第一删除子步骤,若对应表项的父节点为实或半虚,那么,名字的表项类别修改为半虚;First delete step: Determine whether the parent node of the corresponding entry is virtual, if it is virtual, then execute the first delete sub-step, if the parent node of the corresponding entry is real or semi-virtual, then the entry category of the name is modified Semi-virtual
    第一删除子步骤:将名字对应的表项类别修改为虚,然后,遍历以名字为根的子树,若其中某个节点满足第1条件和第2条件,那么该节点的类别修改为虚,第1条件:类别为半虚,第2条件:该节点到名字的路径上没有任何实节点;The first deletion sub-step: modify the category of the entry corresponding to the name to virtual, and then traverse the subtree rooted at the name. If a node meets the first and second conditions, then the category of the node is modified to virtual , The first condition: the category is semi-virtual, and the second condition: there is no real node on the path from the node to the name;
    第二删除步骤:删除该表项,然后,递进地向上检查名字的所有真前缀,若该前缀的对应节点满足第一点和第二点,那么删除该节点,第一点:类别为非实,第二点:为叶节点。The second deletion step: delete the entry, and then progressively check all the true prefixes of the name, if the corresponding node of the prefix meets the first and second points, then delete the node, the first point: the category is not In fact, the second point: it is a leaf node.
  4. 根据权利要求1至3任一项所述的转发方法,其特征在于,随机搜索算法为二分查找算法,在步骤1中,通过二分查找算法查询兴趣包中的名字,从而获取转发出报文的端口;The forwarding method according to any one of claims 1 to 3, wherein the random search algorithm is a binary search algorithm, and in step 1, the name in the interest packet is queried by the binary search algorithm, so as to obtain the information of the forwarded message port;
    当二分查找过程以虚表项结束时,直接结束而不会产生任何假阴性错误。When the binary search process ends with a dummy entry, it ends directly without any false negative errors.
  5. 一种用于命名数据网络中网络节点的转发装置,包括哈希表、前缀树,其特征在于,由哈希表和前缀树构成FIB,对于FIB中存储的任一个名字,其所有的真前缀在FIB中拥有相应的表项,检查前缀是否存在并添加对应辅助表项的过程被称为FIB重构,在重构后的FIB中,表项被分为实表项和非实表项,非实表项分为虚表项和半虚表项;A forwarding device for naming network nodes in a data network, including a hash table and a prefix tree. It is characterized in that the FIB is formed by the hash table and the prefix tree. For any name stored in the FIB, all its true prefixes The process of having corresponding entries in FIB, checking whether the prefix exists and adding corresponding auxiliary entries is called FIB reconstruction. In the reconstructed FIB, the entries are divided into real entries and non-real entries. Non-real entries are divided into virtual entries and semi-virtual entries;
    在哈希表中,以名字作为key,并以前缀树中的节点作为value,由此实现了从名字到前缀树中转发信息的快速检索;In the hash table, the name is used as the key, and the node in the prefix tree is used as the value, thereby realizing fast retrieval of forwarding information from the name to the prefix tree;
    前缀树中的边均代表一个名字组件,前缀树的每个节点都代表一个名字,该节点存储了名字对应的转发信息和表项的对应类别、以及用于维持前缀树结构的指针;Each edge in the prefix tree represents a name component, and each node of the prefix tree represents a name. The node stores the forwarding information corresponding to the name and the corresponding category of the table item, as well as the pointer used to maintain the prefix tree structure;
    实表项:实表项中的名字均指代实际存在的数据,并用于指导兴趣包的转发;在FIB重构之前,所有的表项均为实;Real entry: The name in the real entry refers to the actual data and is used to guide the forwarding of the interest packet; before the FIB reconstruction, all the entries are real;
    非实表项:用于支持随机搜索算法的辅助表项被称作非实表项,非实表项中的名字不指代任何实际存在的数据,且无法用于指导兴趣包的转发;Non-real entry: The auxiliary entry used to support the random search algorithm is called the non-real entry. The name in the non-real entry does not refer to any actual data, and cannot be used to guide the forwarding of interest packets;
    虚表项:若一个非实表项不拥有任何实前缀,则称该非实表项为虚表项;当随机搜索过程以虚表项结束时,直接结束而不会产生任何假阴性错误;Virtual table entry: if a non-real table entry does not have any real prefix, the non-real table entry is called a virtual table entry; when the random search process ends with a virtual table entry, it ends directly without any false negative error;
    半虚表项:若该非实表项存在实前缀,则该非实表项称为半虚表项并需要进行回溯查找;Semi-virtual entry: if the non-real entry has a real prefix, the non-real entry is called a semi-virtual entry and needs to be searched back;
    FIB:转发信息表;FIB: forwarding information table;
    该转发装置包括搜索单元,所述搜索单元包括:The forwarding device includes a search unit, and the search unit includes:
    查询模块:用于通过随机搜索算法查询兴趣包中的名字,从而获取转发出报文的端口;Query module: used to query the name in the interest packet through a random search algorithm, so as to obtain the port for forwarding the message;
    第一判断模块:用于判断最后一次HIT的前缀是否为实,若是,返回该前缀作为查询结果,否则执行第二判断模块;The first judgment module: used to judge whether the prefix of the last HIT is true, if yes, return the prefix as the query result, otherwise execute the second judgment module;
    第二判断模块:用于判断最后一次HIT的前缀是否为虚,若是,返回查询失败,否则执行返回模块;The second judgment module: used to judge whether the prefix of the last HIT is virtual, if yes, return the query failure, otherwise execute the return module;
    返回模块:用于在前缀树中向上回溯至第一个实节点,返回其对应的转发信息。Return module: used to backtrack up to the first real node in the prefix tree and return its corresponding forwarding information.
  6. 根据权利要求5所述的转发装置,其特征在于,该转发装置还包括插入单元,所述插入单元用于将名字插入到FIB中,所述插入单元包括:The forwarding device according to claim 5, wherein the forwarding device further comprises an inserting unit, the inserting unit is configured to insert a name into the FIB, and the inserting unit comprises:
    首先,判断在FIB中查询待插入的名字是否存在,若是,那么执行第一插入模块,否则执行第二插入模块;First, determine whether the name to be inserted in the FIB query exists, if so, execute the first insertion module, otherwise execute the second insertion module;
    所述第一插入模块包括:The first plug-in module includes:
    第一插入判断模块:用于判断名字对应的表项是否为实表项,若是,那么更新其转发信息,否则执行第二插入判断模块;The first insertion judgment module: used to judge whether the entry corresponding to the name is a real entry, if so, then update its forwarding information, otherwise execute the second insertion judgment module;
    第二插入判断模块:用于判断名字对应的表项是否为虚表项,若是,那么进入执行模块,否则进入修改模块;Second insertion judgment module: used to judge whether the entry corresponding to the name is a virtual entry, if so, then enter the execution module, otherwise enter the modification module;
    执行模块:用于将其子树中所有的虚表项修改为半虚表项,然后执行修改模块;Execution module: used to modify all virtual entries in its subtree to semi-virtual entries, and then execute the modification module;
    修改模块:用于修改其类别为实表项并添加转发信息;Modification module: used to modify its category as a real entry and add forwarding information;
    所述第二插入模块包括:The second plug-in module includes:
    首先,在FIB中查询待插入的名字的LPM,若HIT且为实,那么执行第一处理模块,若MISS、或HIT且为虚,那么执行第二处理模块;First, query the LPM of the name to be inserted in the FIB, if HIT is real, then execute the first processing module, if MISS or HIT is virtual, then execute the second processing module;
    第一处理模块:用于插入名字对应的实表项,在FIB中查找名字所有的真前缀,若不存在则插入对应的半虚表项;The first processing module: used to insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding semi-virtual entry if it does not exist;
    第二处理模块:用于插入名字对应的实表项,在FIB中查找名字所有的真前缀,若不存在则插入对应的虚表项;The second processing module: used to insert the real entry corresponding to the name, find all the true prefixes of the name in the FIB, and insert the corresponding virtual entry if it does not exist;
    LPM:最长前缀匹配。LPM: Longest prefix match.
  7. 根据权利要求5所述的转发装置,其特征在于,该转发装置还包括删除单元,所述删除单元用于将过时的非实表项进行发现和回收,所述删除单元包括:The forwarding device according to claim 5, wherein the forwarding device further comprises a deleting unit, the deleting unit is configured to discover and reclaim outdated non-real entries, and the deleting unit comprises:
    首先,判断在FIB中的待删除的名字的对应表项是否存在子节点,若是,那么执行第一删除模块,否则执行第二删除模块;First, determine whether there are child nodes in the corresponding entry of the name to be deleted in the FIB, if so, execute the first deletion module, otherwise execute the second deletion module;
    第一删除模块:用于判断对应表项的父节点是否为虚,若为虚,那么,执行第一删除子模块,若对应表项的父节点为实或半虚,那么,名字的表项类别修改为半虚;First delete module: used to determine whether the parent node of the corresponding entry is virtual, if it is virtual, then execute the first delete submodule, if the parent node of the corresponding entry is real or semi-virtual, then the name of the entry Modified the category to semi-virtual;
    第一删除子模块:用于将名字对应的表项类别修改为虚,然后,遍历以名字为根的子树,若其中某个节点满足第1条件和第2条件,那么该节点的类别修改为虚,第1条件:类别为半虚,第2条件:该节点到名字的路径上没有任何实节点;The first delete submodule: used to modify the category of the entry corresponding to the name to virtual, and then traverse the subtree rooted by the name, if a node meets the first and second conditions, then the category of the node is modified Is virtual, the first condition: the category is semi-virtual, the second condition: there is no real node on the path from the node to the name;
    第二删除模块:用于删除该表项,然后,递进地向上检查名字的所有真前缀,若该前缀的对应节点满足第一点和第二点,那么删除该节点,第一点:类别为非实,第二点:为叶节点。The second delete module: used to delete the entry, and then progressively check all the true prefixes of the name, if the corresponding node of the prefix meets the first and second points, then delete the node, the first point: category It is not real, and the second point: it is a leaf node.
  8. 根据权利要求5至7任一项所述的转发装置,其特征在于,随机搜索算法为二分查找算法,在查询模块中,通过二分查找算法查询兴趣包中的名字,从而获取转发出报文的端口;The forwarding device according to any one of claims 5 to 7, wherein the random search algorithm is a binary search algorithm, and in the query module, the name in the interest packet is queried by the binary search algorithm to obtain the information of the forwarded message port;
    当二分查找过程以虚表项结束时,直接结束而不会产生任何假阴性错误。When the binary search process ends with a dummy entry, it ends directly without any false negative errors.
  9. 一种用于命名数据网络中网络节点的转发系统,其特征在于,包括:存储器、处理器以及存储在所述存储器上的计算机程序,所述计算机程序配置为由所述处理器调用时实现权利要求1-4中任一项所述的转发方法的步骤。A forwarding system for naming network nodes in a data network, comprising: a memory, a processor, and a computer program stored on the memory, and the computer program is configured to implement rights when called by the processor The steps of the forwarding method described in any one of 1-4 are required.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序配置为由处理器调用时实现权利要求1-4中任一项所述的转发方法的步骤。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is configured to implement the forwarding method according to any one of claims 1 to 4 when called by a processor A step of.
PCT/CN2019/107695 2019-09-18 2019-09-25 Forwarding method for network node in named data network, device, system, and storage medium WO2021051431A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910879763.0A CN110417661A (en) 2019-09-18 2019-09-18 It is a kind of for naming the retransmission method of network node, device, system and storage medium in data network
CN201910879763.0 2019-09-18

Publications (1)

Publication Number Publication Date
WO2021051431A1 true WO2021051431A1 (en) 2021-03-25

Family

ID=68370561

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/107695 WO2021051431A1 (en) 2019-09-18 2019-09-25 Forwarding method for network node in named data network, device, system, and storage medium

Country Status (2)

Country Link
CN (1) CN110417661A (en)
WO (1) WO2021051431A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992585A (en) * 2021-10-25 2022-01-28 天津职业技术师范大学(中国职业培训指导教师进修中心) Name splitting and searching method used in NDN
CN115967675A (en) * 2022-12-02 2023-04-14 北京理工大学 Method for establishing and searching NDN routing table based on bloom filter

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428093A (en) * 2013-07-03 2013-12-04 北京邮电大学 Route prefix storing, matching and updating method and device based on names
CN103595637A (en) * 2013-10-27 2014-02-19 西安电子科技大学 Method for utilizing content-centric network nodes to process data based on tree and hash table
US20150117253A1 (en) * 2013-10-30 2015-04-30 Palo Alto Research Center Incorporated Interest messages with a payload for a named data network

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9609014B2 (en) * 2014-05-22 2017-03-28 Cisco Systems, Inc. Method and apparatus for preventing insertion of malicious content at a named data network router
CN104333510B (en) * 2014-11-24 2017-10-20 重庆邮电大学 A kind of Tag switching retransmission method in name data network
JP2018014568A (en) * 2016-07-19 2018-01-25 富士通株式会社 Relay device and relay method
CN107248956B (en) * 2017-06-05 2019-10-15 北京邮电大学 A kind of method for routing and device of information centre's network
CN108092899B (en) * 2018-01-05 2020-07-28 北京工业大学 Routing strategy updating method based on named data network under MANET environment
CN110149274B (en) * 2019-05-20 2020-06-16 北京理工大学 Named data network comprehensive routing method based on position information and content push

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428093A (en) * 2013-07-03 2013-12-04 北京邮电大学 Route prefix storing, matching and updating method and device based on names
CN103595637A (en) * 2013-10-27 2014-02-19 西安电子科技大学 Method for utilizing content-centric network nodes to process data based on tree and hash table
US20150117253A1 (en) * 2013-10-30 2015-04-30 Palo Alto Research Center Incorporated Interest messages with a payload for a named data network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HUI LI; JIANGXING WU; XIN YANG; HAN WANG; JULONG LAN; KE XU; YUNYONG ZHANG; JINWU WEI; SHISHENG CHEN; WEI LIANG; FUSHENG ZHU; YIQI: "MIN: Co-Governing Multi-Identifier Network Architecture and Its Prototype on Operator’s Network", ARXIV.ORG, 1 August 2019 (2019-08-01), pages 1 - 13, XP081453678 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992585A (en) * 2021-10-25 2022-01-28 天津职业技术师范大学(中国职业培训指导教师进修中心) Name splitting and searching method used in NDN
CN115967675A (en) * 2022-12-02 2023-04-14 北京理工大学 Method for establishing and searching NDN routing table based on bloom filter

Also Published As

Publication number Publication date
CN110417661A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
Li et al. Packet forwarding in named data networking requirements and survey of solutions
US11102120B2 (en) Storing keys with variable sizes in a multi-bank database
Wang et al. Namefilter: Achieving fast name lookup with low memory cost via applying two-stage bloom filters
Waldvogel et al. Scalable high speed IP routing lookups
Wang et al. Scalable name lookup in NDN using effective name component encoding
CN109921996A (en) A kind of virtual flow stream searching method of high performance OpenFlow
US7281085B1 (en) Method and device for virtualization of multiple data sets on same associative memory
CN103428093B (en) Route prefix storing, matching and updating method and device based on names
US20070171911A1 (en) Routing system and method for managing rule entry thereof
CN111966284A (en) OpenFlow large-scale flow table elastic energy-saving and efficient searching framework and method
WO2021051431A1 (en) Forwarding method for network node in named data network, device, system, and storage medium
Dai et al. BFAST: Unified and scalable index for NDN forwarding architecture
Yuan et al. Enhancing scalable name-based forwarding
Saxena et al. N-FIB: Scalable, memory efficient name-based forwarding
CN111984835A (en) IPv4 mask quintuple rule storage compression method and device
WO2022267018A1 (en) Packet matching method and apparatus, network device, and medium
Pan et al. Fast content store lookup using locality-aware skip list in content-centric networks
CN113328947B (en) Variable-length route searching method and device based on application of controllable prefix extension bloom filter
CN110460528A (en) Name the FIB storage organization and its application method of data network Forwarding plane
Dai et al. CONSERT: Constructing optimal name-based routing tables
CN111262785B (en) Multi-attribute probability caching method in named data network
CN110851658B (en) Tree index data structure, content storage pool, router and tree index method
Liu et al. Longest prefix matching with pruning
Huang et al. A hybrid approach to scalable name prefix lookup
Grigoryan et al. Boosting FIB Caching Performance with Aggregation

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

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

Country of ref document: EP

Kind code of ref document: A1