Route prefix storing, matching and updating method and device based on names
A matching method and prefix matching technology, applied in the field of computer networks, can solve the problems that cannot meet the requirements of high efficiency and high accuracy of routing addressing, and the matching time cannot be well adapted, so as to reduce the probability of conflicts and achieve high efficiency. Prefix matching, the effect of speeding up the search
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0044] Step 11, establishing four Bloom filters, which is a schematic structural diagram of the Bloomfilter 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 B-prefix hash value of a prefix name, it is found that the k positions corresponding to the Bloom filter are not all zero, that is, some positions are shared ...
Embodiment 2
[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) layers 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 first 1 layer "www / ", the first 2 layers "www / baidu / ", the first 3 layers "www / baidu / cn / ", the first 4 layers "www / baidu / cn / news / ", the first 5 layers of the requested name Layer "www / baidu...
Embodiment 3
[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 names into a new Bloom filter and Trie.
[0066] Such as Figure 7 As shown, it is a request name B-prefix popularity list provided in this embodiment. In this example, ...
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