A hash method to calculate the longest prefix matching lpm rule index
A longest prefix matching and rule technology, applied in the storage field, can solve problems such as unsatisfactory performance, and achieve the effect of simple method, simplified complexity, and easy operation
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] Embodiment 1: data A=1011100011, based on n=7,
[0035] Then rule A has a hash value of length 8
[0036] hash 8 =((1∧0)<<7)|((0∧1)<<6)|((1∧1)<<5)|((1∧1)<<4)|((1∧0 )<<3)|((0∧0)<<2)|((0∧0)),
[0037] hash 8 =1100100;
[0038] Then rule A has a hash value of length 9
[0039] hash 9 =((1λ1)<<7)|((1∧0)<<6)|((0∧0)<<5)|((0∧1)<<4)|((1∧0)< <3)|((0∧0)<<2)|((0∧1)),
[0040] hash 9 =0101101.
Embodiment 2
[0041] Embodiment 2: According to figure 2, a storage unit can store up to 16k rules, that is, n=14. The first 14 bits of the rule 10010000111011101110111000111001011100 are 10010000111011, then the rule has a hash value of length 14, which is the first fourteen bits; in the hash value of length 15, the rule has a hash value of length 14 and the fifteenth bit Combined together, it is 100100001110111, and the XOR operation is performed in turn to obtain a hash value of 10110001001100; the hash value of the rule with a length of 16 is combined by the hash value with a length of 15 of the rule and the sixteenth bit, which is 101100010011000, do the XOR operation in turn to get the hash value 11010011010100; the hash value of the rule with a length of 17 is combined with the 17th bit of the rule, which is 110100110101001, and the XOR is performed in turn The hash value obtained by the operation is 01110101111101; the hash value of the rule is 18 in length, and the hash value of ...
Embodiment 3
[0057] Embodiment 3: According to 3 and 4, for the same storage structure as Embodiment 2, the LPM rule with a length less than or equal to 14, its storage process is as follows Figure 4 所示,初始存储结构里没有规则,基地址为10010000111000,首先添加规则一100100001111,需要在地址为10010000111100、10010000111101、10010000111110和10010000111111上填写100100001111;添加规则二10010000111111,需要在地址为10010000111111上填写10010000111111; 添加规则三1001000011110,需要在地址为10010000111100和10010000111101上填写1001000011110;删除规则一100100001111,须把地址为10010000111110的数据擦除;添加规则四10010000111,需要在地址为10010000111000、10010000111001、10010000111010、10010000111011和10010000111110上 Fill in 10010000111; delete rule 2 10010000111111, change the address 10010000111111 to 10010000111; delete rule 3 1001000011110, change the address 10010000111100, 10010000111101 to 1001000011.
[0058] The benefits of the present invention are: the method of the present invention is simple and easy to operate, and the calculation and storage methods of the hash value are explained in detail fo...
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