Message distribution method and device based on multiple hashes

A shunting device and re-hashing technology, which is applied in the computer field, can solve problems such as conflicts and long time-consuming shunting and filtering, and achieve the effects of improving construction efficiency, submitting shunting efficiency, and improving shunting efficiency

Active Publication Date: 2018-06-01
SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
6 Cites 3 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0004] However, the commonly used Hash algorithm cannot guarantee the unique correspondence between the inpu...
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Abstract

The invention provides a message distribution method and device based on multiple hashes. The method comprises the steps of: respectively calculating two hash results by utilizing two hash algorithms,taking a result that a spatial main table is searched by utilization of one hash result as a reference index, and taking a result that a spatial sub-table is searched by utilization of the other hashresult as an auxiliary index correction reference index. The device comprises a first calculation unit, a second calculation unit, a first searching unit, a second searching unit and a third calculation unit; the first calculation unit is used for calculating a hash result A by utilizing a hash algorithm A; the second calculation unit is used for calculating a hash result B by utilizing a hash algorithm B; the first searching unit is used for searching a hash spatial main table by utilizing the result A, so that a search result a is obtained; the second searching unit is used for searching ahash spatial sub-table by utilizing the result B, so that a search result b is obtained; and the third calculation unit is used for judging a conflict condition of the search result a, and calculatinga search destination table item index. According to the message distribution method and device based on multiple hashes provided by the invention, a double-hash search sequence is constructed by utilization of two hash functions; therefore, the conflict is effectively avoided; the distribution time is saved; and the distribution efficiency is increased.

Application Domain

Technology Topic

Image

  • Message distribution method and device based on multiple hashes
  • Message distribution method and device based on multiple hashes
  • Message distribution method and device based on multiple hashes

Examples

  • Experimental program(2)

Example Embodiment

[0040] Example 1
[0041] like figure 1 As shown, Embodiment 1 of the present invention provides a method for distributing packets based on multiple hashing, and the method includes the following steps:
[0042] S1: For the values ​​in the table to be looked up, use hash algorithm A and hash algorithm B with orthogonal relationship to calculate respectively, and obtain hash results a and b respectively.
[0043] S2: Use the hash result a as an index to search the main table of the hash space.
[0044] S3: Check whether the conflict flag of the table lookup result is valid. If the conflict flag bit of the table lookup result is valid, it means a conflict occurs, and go to the next step. If the conflict flag of the main table lookup result indicates that no conflict occurs, it is used to look up the target table item The index is a.
[0045] S4: Use the hash result b as an index to search the hash space sub-table, and the search result is b.
[0046] S5: Calculate the final destination entry index as a+b.
[0047] like figure 2 As shown, Embodiment 1 of the present invention provides a device for distributing messages based on multiple hashing, and the device includes a first calculation unit, a second calculation unit, a first search unit, a second search unit, and a third calculation unit unit.
[0048] Firstly, the first calculation unit calculates the hash result A by using the hash algorithm A.
[0049] Then, the second calculation unit calculates a hash result B using a hash algorithm B orthogonal to the hash algorithm A.
[0050] Thirdly, the first search unit uses the result A to search the master table of the hash space and obtains the search result a.
[0051] Fourth, the third calculation unit judges the conflict of the search result a, and enters the next link when a conflict occurs.
[0052] Fifth, the second search unit uses the result B to search the hash space sub-table and obtains the search result b.
[0053] Sixth, the third calculation unit calculates the index of the table entry for the search purpose. In the third calculation unit, the correspondence between the conflict situation of the search result a and the calculation of the table entry index for the search purpose is: if the search result a conflicts, the calculated The index of the lookup destination entry is a+b; if there is no conflict in the lookup result a, the calculated index of the lookup destination entry is a.

Example Embodiment

[0054] Example 2
[0055] like image 3 As shown, Embodiment 1 of the present invention provides a method for distributing packets based on multiple hashing, and the method includes the following steps:
[0056] S1: For the value of the table to be looked up, use the hash algorithm A to calculate, and get the hash result a.
[0057] S2: Use the hash result a as an index to search the main table of the hash space.
[0058] S3: Check whether the conflict flag of the table lookup result is valid. If the conflict flag bit of the table lookup result is valid, it means a conflict occurs, and go to the next step. If the conflict flag of the main table lookup result indicates that no conflict occurs, it is used to look up the target table item The index is a.
[0059] S4: For the value of the table to be looked up, use the hash algorithm B which has an orthogonal relationship with the hash algorithm A to calculate, and obtain the hash result b.
[0060] S5: Use the hash result b as an index to search the hash space subtable, and the search result is b.
[0061] S6: Calculate the final destination entry index as a+b.
[0062] like Figure 4 As shown, Embodiment 1 of the present invention provides a device for distributing messages based on multiple hashing, and the device includes a first calculation unit, a second calculation unit, a first search unit, a second search unit, and a third calculation unit unit.
[0063] Firstly, the first calculation unit calculates the hash result A by using the hash algorithm A.
[0064] Then, the first search unit uses the result A to search the hash space master table and obtains the search result a.
[0065] Thirdly, the third calculation unit judges the conflict situation of the search result a, and enters the next link when a conflict occurs.
[0066] Fourth, the second calculation unit calculates a hash result B using a hash algorithm B orthogonal to the hash algorithm A.
[0067] Fifth, the second search unit uses the result B to search the hash space sub-table and obtains the search result b.
[0068] Sixth, the third calculation unit calculates the index of the table entry for the search purpose. In the third calculation unit, the correspondence between the conflict situation of the search result a and the calculation of the table entry index for the search purpose is: if the search result a conflicts, the calculated The index of the lookup destination entry is a+b; if there is no conflict in the lookup result a, the calculated index of the lookup destination entry is a.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Similar technology patents

Anti-collision method for tag counting, reader/writer and tag counting system

ActiveCN109002743AAvoid confictResolve or reduce conflictSensing by electromagnetic radiationCollision problemBand counts
Owner:深圳市成为信息股份有限公司

Classification and recommendation of technical efficacy words

  • Improve build efficiency
  • Avoid confict

3D model building method and system

InactiveCN101499177AImprove build efficiencyApplicable to individual researchDiagnostic recording/measuringSensorsComputer visionResearch Object
Owner:SIEMENS SHANGHAI MEDICAL EQUIP LTD

Construction method and device for entity knowledge base

ActiveCN103678714AReduce a lot of wasteImprove build efficiencySpecial data processing applicationsInformation retrievalKnowledge building
Owner:BEIJING BAIDU NETCOM SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products