A method and device for storing, matching and updating name-based routing prefixes
A matching method and prefix matching technology, applied in the field of computer networks, can solve the problems that the matching time cannot be well adapted, and cannot meet the needs of high efficiency and high accuracy of routing addressing, so as to reduce the probability of conflict and achieve high efficiency. Prefix matching, the effect of saving search time
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0043] Such as figure 1 As shown, the flow chart of Bloom filter and Trie initialization provided by Embodiment 1 of the present invention is as follows:
[0044] Step 11, establishing four Bloom filters, which is a structural schematic diagram of the Bloom filter provided by the present invention. Each Bloom filter is a bitset of length m, and the bitset is initialized to 0. Calculate the number of layers L of the prefix name, if L is less than or equal to m, directly use the prefix name as the B-prefix, otherwise intercept the first m layers as the B-prefix, and the last few layers as the T-suffix. Assuming there are k hash functions, use k hash functions to calculate B-prefix into k values v1=hash1(B-prefix), v2=hash2(B-prefix),...,vk=hashk(B- prefix), and finally set the values of k positions of the Bloom filter corresponding to v1, v2, ..., vk to 1 to complete the insertion.
[0045] As mentioned above, the Bloom filter will conflict, that is, after calculating the...
Embodiment 2
[0049] Embodiment 2 of the present invention provides a name-based routing request name prefix matching method, the process is as follows Figure 4 As shown, the method is as follows:
[0050] Step 13. Calculate the number of layers L of the requested name, intercept the first layer, the first two layers, ..., the first min(L, m) layer of the requested name, and use them as B-prefix_1, B-prefix_2, ..., B- prefix_min(L,m), the corresponding remaining part is used as T-suffix_1, T-suffix_2,..., T-suffix_min(L,m), B-prefix_1, B-prefix_2,..., B-prefix_min(L, m) Search in the corresponding Bloom filter in parallel, and store the search results in the stack s from large to small.
[0051] Such as Figure 5 As shown in , it is a schematic diagram of an initialized Bloom filter provided in this embodiment. In the process of searching for the requested name "www / baidu / cn / news / china / jiangsu / ", for the convenience of expression, m=5, including the following steps:
[0052]Get the fir...
Embodiment 3
[0062] The embodiment of the present invention provides a method for updating the routing table according to the popularity of name prefixes, specifically as follows:
[0063] Step 16, saving the prefix names whose prefix matches are successful in the list L;
[0064] Step 17. When the number of entries in the list L is equal to X, take out the first layer of all prefix names as B-prefix, count the number of different B-prefixes, and save each B-prefix and its number sum to the map In the table s; then, take out the first two layers of all prefix names as B-prefix, repeat the above steps until the first n layers are taken, and n is the number of layers of the prefix name with the largest number of layers;
[0065] Step 18, define the B-prefix whose number exceeds Y as the B-prefix of the prefix name with relatively high popularity, and delete their records in the corresponding Bloom filter and Trie, and rebuild a new Bloom filter and Trie, inserting the more popular prefix na...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com