Address resolution method and system based on simhash

Through the address resolution method combined with simhash algorithm and precise matching, the problem of low address resolution accuracy in the prior art is solved, efficient resolution of irregular addresses is achieved, and the accuracy of geographical location determination in logistics transportation is improved.

CN112287671BActive Publication Date: 2025-01-10SHENZHEN LEAPFROG NEW TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011050235.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-29
Publication Date
2025-01-10
Estimated Expiration
2040-09-29

AI Technical Summary

Technical Problem

The accuracy of the analysis results of the existing address resolution methods is not high, and it is affected by problems such as inconsistent descriptions of addresses of the same geographical location, irregularity and typos.

Method used

Using the address resolution method based on simhash, the address to be parsed is processed by word segmentation, and the exact match is performed first. If it fails, the simhash value is calculated and the sample address text entry in the address index is matched. The similarity is determined by using Haiming distance to improve the resolution accuracy. Rate.

Benefits of technology

It improves the accuracy of address resolution, reduces the calculation amount and efficiency in the parsing process, and can effectively handle irregular descriptions in addresses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112287671B_ABST
    Figure CN112287671B_ABST
Patent Text Reader

Abstract

The invention discloses an address resolution method and system based on simhash, and the method comprises: performing word segmentation processing on the acquired address to be resolved according to a word segmentation dictionary to obtain the address text entry to be resolved; accurately matching each address text entry to be resolved with the sample address text entry in the address index one by one, and if the matching is successful, outputting the longitude and latitude information corresponding to the address as the resolution result; if the matching fails, calculating the simhash value of each address text entry to be resolved; matching the simhash value of each address text entry to be resolved with the simhash value of the sample address text entry in the address index one by one, and obtaining at least one sample address text entry that meets the preset conditions; and taking the longitude and latitude information corresponding to the sample address text entry with the smallest address level as the resolution result. Through the above method, the accuracy of the resolution of the address to be resolved is improved, and the efficiency of address resolution is improved at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of logistics and transportation, and in particular to a simhash-based address resolution method and system. Background Art

[0002] With the development of e-commerce, both individuals and enterprises are increasingly dependent on the logistics system, and the logistics system has also developed rapidly, which has also put forward higher requirements for logistics management. In a transaction, both the sender and the recipient hope that the goods can be delivered safely and quickly. Therefore, it is particularly important for logistics companies to quickly and accurately collect and send goods, reduce costs, and improve efficiency in the fiercely competitive market environment.

[0003] In a complete logistics transportation process, after the sender submits the delivery application, the logistics company needs to quickly determine the accurate pickup location; in the process of goods transportation, it is necessary to consider how to effectively distribute the large number of goods waybills to improve resource utilization; when the goods arrive at the recipient's range, it is necessary to consider how to quickly and accurately deliver them to the recipient. These links are closely related to the geographical location. However, in the actual delivery process, both the geographical location of the recipient and the geographical location of the sender are expressed through address descriptions such as "No. xx, xx Road, xx Street, xx District, xx City, xx Province", rather than the actual geographical longitude and latitude coordinates. Because the longitude and latitude coordinates are not easy to obtain and remember for ordinary users, and the address description is a more general and easy-to-express form. However, the problem with address description is that different people have different descriptions of the same geographical location, the address description is not standardized, and even typos, homophones, synonyms, similar characters, etc. appear, which seriously affects the accuracy of address resolution. Therefore, it is particularly important to correctly parse the delivery address to obtain the correct geographical location coordinates. Summary of the invention

[0004] The invention provides a simhash-based address resolution method and system to solve the problem that the resolution result accuracy of the existing address resolution method is low.

[0005] In order to solve the above problems, the present invention provides an address resolution method based on simhash, comprising: S1, performing word segmentation processing on the acquired address to be resolved according to a pre-constructed word segmentation dictionary to obtain at least one address text entry to be resolved; S2, accurately matching each address text entry to be resolved with a sample address text entry in a pre-constructed address index one by one, if a completely consistent address is matched, outputting the longitude and latitude information corresponding to the address as a resolution result, if not, executing step S3; S3, calculating the simhash value of each address text entry to be resolved; S4, matching the simhash value of each address text entry to be resolved with the simhash value of the sample address text entry in the address index one by one according to the address text entry level from large to small, to obtain at least one sample address text entry that meets the preset conditions; S5, taking the longitude and latitude information corresponding to the sample address text entry with the smallest address level as the resolution result.

[0006] As a further improvement of the present invention, step S3 includes: S31, dividing each address text entry to be parsed into address blocks and address keywords one by one, and determining the weight value of each address block and address keyword according to a preset weight value rule; S32, calculating the hash value of each address block and address keyword by a hash algorithm; S33, multiplying the numerical value of 1 in the hash value of each address block and address keyword by the corresponding weight value, and multiplying the numerical value of 0 in the hash value of each address block and address keyword by the corresponding weight value; S34, accumulating the digital sequence obtained after calculating all address blocks and address keywords bit by bit to obtain a digital string; S35, replacing the numerical values ​​greater than 0 in the digital string with 1, and replacing the numerical values ​​less than 0 with 0, to obtain the simhash value of each address text entry.

[0007] As a further improvement of the present invention, the pre-constructed address index is obtained through the following steps: dividing the pre-prepared sample address into multiple sample address text entries according to the word segmentation dictionary; calculating the simhash value of each sample address text entry, and assigning corresponding address level, administrative division affiliation, administrative division code, longitude and latitude information to each sample address text entry; using the simhash value, address level, administrative division affiliation, administrative division code, longitude and latitude information of the sample address text entry as attributes of the sample address text entry, and together with the sample address text entry, forming an address index.

[0008] As a further improvement of the present invention, step S4 includes: S41, according to the address text entry level from large to small, one by one calculates the Hamming distance between the simhash value of each address text entry to be parsed and the simhash value of the sample address text entry in the address index; S42, when the Hamming distance is less than a preset threshold, the sample address text entry meets the preset condition; repeat the steps of S41-S42 to obtain at least one sample address text entry that meets the preset condition.

[0009] As a further improvement of the present invention, after step S5, it also includes: S6, judging whether all the address text entries to be parsed match the sample address text entries in the address index; S7, if not, outputting the parsing result and marking the address level of the sample address text entry corresponding to the latitude and longitude information.

[0010] In order to solve the above problems, the present invention also provides an address resolution system based on simhash, comprising: a word segmentation module, used to perform word segmentation processing on the acquired address to be resolved according to a pre-constructed word segmentation dictionary, and obtain at least one address text entry to be resolved; a first matching module, used to accurately match each address text entry to be resolved with a sample address text entry in a pre-constructed address index one by one, and if a completely consistent address is matched, the longitude and latitude information corresponding to the address is output; a calculation module, used to calculate the simhash value of each address text entry to be resolved when the accurate match does not match a completely consistent address; a second matching module, according to the address text entry level from large to small, one by one, matches the simhash value of each address text entry to be resolved with the simhash value of the sample address text entry in the address index, and obtains at least one sample address text entry that meets the preset conditions; a result output module, used to use the longitude and latitude information corresponding to the sample address text entry with the smallest address level or the longitude and latitude information output by the first matching module as the resolution result.

[0011] As a further improvement of the present invention, the calculation module includes: a division unit, which is used to divide each address text entry to be parsed into address blocks and address keywords one by one, and determine the weight value of each address block and address keyword according to a preset weight value rule; a first calculation unit, which is used to calculate the hash value of each address block and address keyword by a hash algorithm; a second calculation unit, which is used to positively multiply the numerical value of 1 in the hash value of each address block and address keyword by the corresponding weight value, and negatively multiply the numerical value of 0 in the hash value of each address block and address keyword by the corresponding weight value; a third calculation unit, which is used to accumulate the digital sequence obtained after calculating all address blocks and address keywords in bitwise correspondence to obtain a digital string; a simhash value output unit, which is used to replace the numerical values ​​greater than 0 in the digital string with 1 and the numerical values ​​less than 0 with 0 to obtain the simhash value of each address text entry.

[0012] As a further improvement of the present invention, it also includes a construction module for a pre-constructed address index, and the construction module includes: a segmentation unit, used to segment the pre-prepared sample address into multiple sample address text entries according to a word segmentation dictionary; an attribute allocation unit, used to calculate the simhash value of each sample address text entry, and assign corresponding address level, administrative division affiliation, administrative division code, longitude and latitude information to each sample address text entry; an index construction unit, used to use the simhash value, address level, administrative division affiliation, administrative division code, longitude and latitude information of the sample address text entry as attributes of the sample address text entry, and together with the sample address text entry, constitute an address index.

[0013] As a further improvement of the present invention, the second matching module includes: a distance calculation unit, which is used to calculate the Hamming distance between the simhash value of each address text entry to be parsed and the simhash value of the sample address text entry in the address index one by one according to the address text entry level from large to small; an entry screening unit, which is used to calculate that when the Hamming distance is less than a preset threshold, the sample address text entry meets the preset conditions; repeatedly run the distance calculation unit and the entry screening unit to obtain at least one sample address text entry that meets the preset conditions.

[0014] As a further improvement of the present invention, it also includes: a judgment module, used to judge whether the address text entries to be parsed are all matched with the sample address text entries in the address index; a marking module, used to output the parsing results and mark the address level of the sample address text entries corresponding to the latitude and longitude information when the address text entries to be parsed are not all matched with the sample address text entries in the address index.

[0015] Compared with the prior art, the simhash-based address resolution method of the present invention divides the address to be resolved into at least one address text entry to be resolved, and then uses each address text entry to be resolved to perform precise matching with the sample address text entry. If the matching is successful, the latitude and longitude information corresponding to the sample address text entry is output as the resolution result. If the matching fails, the simhash value of the address text entry to be resolved is calculated, and then the simhash value is matched with the simhash value of the sample address text entry to obtain the matching result. The simhash algorithm is applied to address coding resolution, thereby improving the accuracy of address resolution, so that the non-standard description in the address also has a higher resolution success rate. Moreover, before using the simhash value for matching, precise matching is performed first, and when the precise matching fails, the simhash value is used for matching. The calculation amount of precise matching is much smaller than the calculation amount of simhash value matching. When the address is written in a standard manner, precise matching can be directly matched successfully without subsequent calculation, thereby reducing the calculation amount in the address resolution process and improving the resolution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flow chart of an embodiment of an address resolution method based on simhash according to the present invention;

[0017] Figure 2 A schematic diagram of the process of calculating the simhash value of the address text entry to be parsed according to the present invention;

[0018] Figure 3 A schematic diagram of a flow chart of matching the simhash value of an address text entry to be parsed with the simhash value of a sample address text entry according to the present invention;

[0019] Figure 4 A flow chart of another embodiment of the address resolution method based on simhash of the present invention;

[0020] Figure 5 A schematic diagram of functional modules of an embodiment of an address resolution system based on simhash of the present invention;

[0021] Figure 6 It is a functional module schematic diagram of the computing module of the present invention;

[0022] Figure 7 It is a functional module schematic diagram of another embodiment of the address resolution system based on simhash of the present invention;

[0023] Figure 8 is a functional module schematic diagram of the second matching module of the present invention;

[0024] Fig. 9The figure is a functional module diagram of another embodiment of the address resolution system based on simhash of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0026] Figure 1 An embodiment of the address resolution method based on simhash of the present invention is shown. Figure 1 As shown, the simhash-based address resolution method includes the following steps:

[0027] Step S1: Segment the acquired address to be resolved according to a pre-built segmentation dictionary to obtain at least one address text entry to be resolved.

[0028] Specifically, after receiving a new waybill, the address to be resolved in the waybill is standardized, such as traditional and simplified font conversion, full-width and half-width conversion, and deletion of the email address or telephone number in the address to be resolved; then the address to be resolved is segmented using a word segmentation dictionary, and the description of the address to be resolved is divided into at least one address text entry to be resolved. For example, "Caizhi Building, Zhongguancun East Road, Haidian District, Beijing" is divided into four address text entries to be resolved after word segmentation: "Beijing (S), Haidian District (Q), Zhongguancun East Road (R), Caizhi Building (P)".

[0029] It should be noted that the word segmentation dictionary is pre-constructed. Specifically, in this embodiment, the words in the address are divided into entries according to the levels of province, city, district, township\street, community\village, road, house number, point of interest, etc., and each level is given a specific part of speech label, such as: province (S), city (C), district (Q), township\street (T), community\village (V), road (R), house number (N), point of interest (P), etc., where province, city, district, etc. are levels, and (S), (C), (Q) are corresponding parts of speech. The entries of the word segmentation dictionary are deduplicated according to the combination of part of speech and name, that is, there is only one entry with the same name and part of speech, and no other attributes are attached. For example, the point of interest named "Ocean Department Store" exists in many cities across the country, but there is only one entry named "Ocean Department Store" with the part of speech as point of interest in the word segmentation dictionary. For details, please refer to Table 1, which shows an example of a word segmentation dictionary:

[0030] Table 1 Word segmentation dictionary

[0031] level Part of Speech Entries Province\Municipality S Beijing, Tianjin, Hebei Province... city C Shijiazhuang City, Baoding City... Districts and counties Q Dongcheng District, Xicheng District, Zhengding County... Townships and streets T Beifang Town, Sungezhuang Township, Qingyuan Subdistrict... Community\Village V Cuihu Community Residents Committee, Shifo Village Committee... the way R Kexing Road, Guanshan Avenue... …… …… ……

[0032] Step S2: accurately match each address text entry to be parsed with the sample address text entry in the pre-built address index one by one. If a completely consistent address is matched, execute step S2'; if not, execute step S3.

[0033] Step S2': output the longitude and latitude information corresponding to the address as the analysis result.

[0034] Specifically, the address index is pre-built; the address index includes sample address text and attribute information corresponding to the sample address text, and the attribute information includes the address level, administrative division affiliation, administrative division code, longitude and latitude information, and simhash value of the sample address text entry. It should be noted that the address index is different from the word segmentation dictionary. For address text entries with the same name, if the attributes are different, multiple entries will exist in the address index at the same time. For example, "Ocean Department Store" exists in both Beijing and Shenzhen, but its attributes are different. In the address index, there will be "Ocean Department Store" with the administrative division attribute of Beijing and "Ocean Department Store" with the administrative division attribute of Shenzhen.

[0035] Exact matching means matching the address text term to be parsed with the sample address text term in the pre-built address index word for word. The match is successful only when the address text term to be parsed and the sample address text term are exactly the same. For example, if the address text term to be parsed is "Zhongguancun East Road", the sample address text term must also be "Zhongguancun East Road" to be accurately matched successfully. After the match is successful, the address text term with the smallest address level in the address to be parsed is output, corresponding to the latitude and longitude information of the sample address term in the address index, and this latitude and longitude information is output as the final parsing result.

[0036] It should be noted that exact matching requires that the text name of the address text entry in the address to be parsed is exactly the same as that of the sample address text entry in the address index. After obtaining the sample address text in the address index through the text name, the qualified results are filtered out through the restrictions of administrative division affiliation and address level and other attributes. For example, when the address to be parsed "Caizhi Building, Zhongguancun East Road, Haidian District, Beijing" is accurately matched, the address text entry "Zhongguancun East Road" matches multiple sample address text entries with the same text name "Zhongguancun East Road", but only "Zhongguancun East Road" with Haidian District as the administrative division and road level as the address is a valid match.

[0037] Step S3, calculating the simhash value of each address text entry to be parsed.

[0038] Specifically, when the exact match does not match a completely identical address, it means that the exact match fails. At this time, the simhash value of each address text entry to be resolved is calculated using the simhash algorithm.

[0039] Specifically, as Figure 2 shown, step S3 includes the following steps:

[0040] Step S31: Divide each address text entry to be parsed into address blocks and address keywords one by one, and determine the weight value of each address block and address keyword according to the preset weight value rule.

[0041] Specifically, divide each address text entry to be parsed into address blocks and address keywords. For example, after the word segmentation process of step S1, "Caizhi Building, Zhongguancun East Road, Haidian District, Beijing" is divided into four address text entries to be parsed: "Beijing (S), Haidian District (Q), Zhongguancun East Road (R), Caizhi Building (P)". Then divide these four address text entries to be parsed into address blocks and address keywords. For example, "Caizhi Building" can be further segmented into "Caizhi" and "Building", where "Caizhi" is the address block and "Building" is the address keyword. After the division is completed, determine the weight value of each address block and address keyword according to the preset weight value rule. This preset weight rule can be set according to the importance of the address keyword. For example, for the address block "Caizhi" and the address keyword "Building", the recognition rate of "Caizhi" is significantly higher than that of "Building". Therefore, the weight value of "Caizhi" can be set higher and the weight value of "Building" can be set lower.

[0042] Step S32: Calculate the hash value of each address block and address keyword through the hash algorithm.

[0043] Specifically, the hash value is an n-bit signature composed of binary numbers 0 and 1. For example, the hash value of the address block "Caizhi" calculated through the hash algorithm is "1, 0, 0, 1, 0, 1", and the hash value of the address keyword "Building" calculated through the hash algorithm is "1, 0, 1, 0, 1, 1". By converting the text string into a string of numbers, it is convenient to calculate the similarity between texts.

[0044] Step S33: Multiply the values of 1 in the hash value of each address block and address keyword by the corresponding positive weight value, and multiply the values of 0 in the hash value of each address block and address keyword by the corresponding negative weight value.

[0045] Specifically, after obtaining the hash value and the weight value, the weighted calculation is performed using the hash value and the weight value of the address block or the address keyword. Specifically, the 1 in the hash value is multiplied positively by the weight value, and the 0 in the hash value is multiplied negatively by the weight value. For example, through the hash algorithm, the hash value of the address block "Caizhi" is "1, 0, 0, 1, 0, 1", and the weight value set for "Caizhi" is 5. Then, the result obtained after the weighted calculation of "Caizhi" is "5, -5, -5, 5, -5, 5"; through the hash algorithm, the hash value of the address keyword "Building" is "1, 0, 1, 0, 1, 1", and the weight value set for "Building" is 4. Then, the result obtained after the weighted calculation of "Building" is "4, -4, 4, -4, 4, 4".

[0046] Step S34: Accumulate the digital sequences obtained after calculating all address blocks and address keywords bit by bit to obtain a digital string.

[0047] Specifically, continue to take the address text entry "Caizhi Building" as an example. Through the above steps, the result obtained after the weighted calculation of the address block "Caizhi" is "5, -5, -5, 5, -5, 5", and the result obtained after the weighted calculation of the address keyword "Building" is "4, -4, 4, -4, 4, 4". Accumulate the two digital sequences bit by bit, that is, "5 + 4, -5 + (-4), -5 + 4, 5 + (-4), -5 + 4, 5 + 4", to obtain the digital string "9, -9, -1, 1, -1, 9".

[0048] Step S35: Replace the numerical values greater than 0 in the digital string with 1, and replace the numerical values less than 0 with 0 to obtain the simhash value of each address text entry.

[0049] Specifically, continue to take the address text entry "Caizhi Building" as an example. Through the digital string "9, -9, -1, 1, -1, 9" calculated for "Caizhi Building" in the above steps, the 9 in the first place is greater than 0, so the numerical value of this bit is correspondingly replaced with 1, the -9 in the second place is less than 0, so the numerical value of this bit is correspondingly replaced with 0, and so on. Finally, the simhash value of the address text entry "Caizhi Building" to be parsed is "1, 0, 0, 1, 0, 1".

[0050] Furthermore, in this embodiment, the simhash value in the attribute of the sample address text entry in the address index is also obtained through the calculation process of steps S31 - S35. Specifically, the construction process of the pre - constructed address index is as follows:

[0051] 1. Split the pre - prepared sample address into multiple sample address text entries according to the word - segmentation dictionary.

[0052] The implementation process of this step can refer to the process of segmenting the address to be resolved in the above step S1, which will not be repeated here.

[0053] 2. Calculate the simhash value of each sample address text entry, and assign corresponding address level, administrative division affiliation, administrative division code, and longitude and latitude information to each sample address text entry.

[0054] Specifically, the process of calculating the simhash value of the sample address text entry refers to steps S31 to S35, which will not be repeated here. After the sample address text entry is calculated, the corresponding address level, administrative division affiliation, administrative division code, and longitude and latitude information are assigned to each sample address text entry, where the address level refers to the level corresponding to the sample address text entry, for example, "Beijing" corresponds to the provincial level, and "Haidian District" corresponds to the district level; administrative division affiliation refers to the affiliation relationship between sample address text entries of different address levels, for example, "Haidian District" belongs to "Beijing" in terms of administrative division; the administrative division code is a code uniformly formulated by the state, which can represent unique province, city, and district information; the longitude and latitude information is the geographical location corresponding to the sample address text entry on the map.

[0055] 3. The simhash value, address level, administrative division affiliation, administrative division code, and longitude and latitude information of the sample address text entry are used as attributes of the sample address text entry, and together with the sample address text entry, they constitute the address index.

[0056] It should be noted that the attributes of the sample address text entry are not limited to simhash value, address level, administrative division affiliation, administrative division code, longitude and latitude information, and this attribute can be expanded. For details, please refer to Table 2, which shows an example of address index:

[0057] Table 2 Address Index

[0058]

[0059]

[0060] Step S4: According to the address text entry level from large to small, the simhash value of each address text entry to be parsed is matched with the simhash value of the sample address text entry in the address index one by one to obtain at least one sample address text entry that meets the preset conditions.

[0061] Specifically, the preset condition can be pre-set, and the simhash value of the text entry of each address to be resolved is matched with the simhash value of the sample address text entry according to the preset condition, so as to obtain the sample address text entry that meets the preset condition.

[0062] Specifically, Figure 3 As shown, step S4 includes:

[0063] Step S41 , calculating the Hamming distance between the simhash value of each address text entry to be parsed and the simhash value of the sample address text entry in the address index one by one according to the address text entry level from large to small.

[0064] The simhash value obtained by calculation is expressed in the form of a digital string. The Hamming distance is obtained by XORing two simhash values. The two compared bits are 0 when they are the same and 1 when they are different. The number of 1s in the digital string obtained after XORing is the Hamming distance.

[0065] It should be noted that when performing simhash value matching, the address text entry in the address to be resolved is matched with the sample address text entry in the address index of the corresponding address level.

[0066] Step S42: When the Hamming distance is less than the preset threshold, the sample address text entry meets the preset condition.

[0067] It should be noted that the preset threshold is preset, and preferably, the preset threshold is 3. When the Hamming distance is less than the preset threshold, it is considered that the address text entry to be parsed has a high similarity with the sample address text entry, and the match is successful.

[0068] For example, taking the address text term "Caizhi Building" as an example, the simhash value of the address text term "Caizhi Building" obtained by step S3 is "1, 0, 0, 1, 0, 1", and by querying a sample address text term "Caizhi Building" in the address index corresponding to the same address level as the address text term "Caizhi Building", its simhash value is "1, 0, 0, 1, 1, 0", and the two are XORed to obtain "0, 0, 0, 0, 1, 1". The number of 1s in the digital string obtained by XOR is two, that is, the Hamming distance is 2. If 2 is less than the preset threshold, it is considered that the two match successfully.

[0069] Repeat steps S41-S42 to obtain at least one sample address text entry that meets the preset condition.

[0070] Specifically, continue to take "Beijing (S), Haidian District (Q), Zhongguancun East Road (R), Caizhi Building (P)" as an example for explanation. The address to be resolved is Beijing, Haidian District, Zhongguancun East Road, and Caizhi Building in descending order according to the address text entry level. Therefore, first calculate the Hamming distance between the simhash value of "Beijing" and the simhash value of each sample address text entry in the address index, and then judge the Hamming distance. When the Hamming distance is less than the preset threshold, the match is successful, and the sample address text entry corresponding to the Hamming distance meets the preset conditions; when "Beijing" is matched successfully, calculate the simhash value of "Haidian District", and then perform Hamming distance calculation on the simhash value of "Haidian District" and the sample address text entry, and then perform Hamming distance matching, and so on, until the last "Caizhi Building" is matched, thereby completing the simhash matching of the address to be resolved "Beijing (S), Haidian District (Q), Zhongguancun East Road (R), Caizhi Building (P)".

[0071] It should be noted that in the simhash matching process, if the current address text entry to be resolved is matched successfully, when the address text entry to be resolved at the next address level is matched, the sample address text entry under the current address text entry to be resolved is matched according to the administrative division. For example, when "Beijing" is matched successfully, when matching "Haidian District", "Haidian District" is matched with all sample address text entries under "Beijing", which effectively reduces the amount of calculation when matching the subsequent address text entries to be resolved and improves the matching efficiency.

[0072] In the embodiment of the present invention, since the traditional hash algorithm is to make the calculation result distribution relatively uniform, and the address information input by the user often has some slight differences from the actual address, for similar addresses, the use of the traditional hash algorithm will generate the same or similar hash values, so it is impossible to accurately determine whether the address matches through the hash value; and the present invention adopts the simhash algorithm to provide a feasible approach. The simhash algorithm is aimed at local sensitivity. Its main idea is dimensionality reduction, mapping high-dimensional feature vectors into low-dimensional feature vectors, and determining the similarity through the Hamming distance between the address text entry of the address to be resolved and the address text entry in the address index. In addition, when calculating the simhash value, the setting of the weight value is also increased, thereby improving the accuracy of address resolution.

[0073] Step S5: taking the longitude and latitude information corresponding to the sample address text entry with the smallest address level as the parsing result.

[0074] Specifically, after all address text terms to be parsed are matched, the longitude and latitude information corresponding to the sample address text term with the smallest address level among the matched sample address text terms is used as the parsing result.

[0075] Furthermore, in the simhash matching process, some of the address text entries to be parsed may fail to match. Figure 4 As shown, after step S5, the following steps are also included:

[0076] Step S6: Determine whether all the address text terms to be parsed match the sample address text terms in the address index. If not, execute step S7.

[0077] Step S7: while outputting the parsing result, annotate the address level of the sample address text entry corresponding to the latitude and longitude information.

[0078] It should be noted that in the simhash matching process, if a certain address text entry to be resolved is not successfully matched, then according to the administrative division relationship, the address text entry to be resolved of the previous address level of the address text entry to be resolved is used as the output, and the address level of the sample address text entry of the minimum address level that successfully matched is marked. For example, "Beijing (S), Haidian District (Q), Zhongguancun East Road (R), Caizhi Building (P)", after the simhash algorithm is matched, only "Beijing (S), Haidian District (Q), Zhongguancun East Road (R)" is successfully matched, while "Caizhi Building (P)" fails to match, then the latitude and longitude information corresponding to "Zhongguancun East Road (R)" is output as the final result, and the address level of "Road" is marked.

[0079] The simhash-based address resolution method of this embodiment divides the address to be resolved into at least one address text entry to be resolved, and then uses each address text entry to be resolved to perform precise matching with the sample address text entry. If the matching is successful, the latitude and longitude information corresponding to the sample address text entry is output. If the matching fails, the simhash value of the address text entry to be resolved is calculated, and then the simhash value is matched with the simhash value of the sample address text entry to obtain a matching result. The simhash algorithm is applied to address coding resolution, thereby improving the accuracy of address resolution, so that a higher resolution success rate is achieved for non-standard descriptions in the address. Moreover, before using the simhash value for matching, precise matching is performed first, and when the precise matching fails, the simhash value is used for matching. The calculation amount of precise matching is much smaller than that of simhash value matching. When the address is written in a standard manner, precise matching can be performed first to directly achieve successful matching without subsequent calculation, thereby reducing the calculation amount in the address resolution process and improving the resolution efficiency.

[0080] Figure 5 The following is a functional module diagram of an embodiment of the address resolution system based on simhash of the present invention. Figure 5 As shown, the simhash-based address resolution system 100 includes a word segmentation module 11 , a first matching module 12 , a calculation module 13 , a second matching module 14 and a result output module 15 .

[0081] Among them, the word segmentation module 11 is used to perform word segmentation processing on the acquired address to be resolved according to the pre-constructed word segmentation dictionary to obtain at least one address text entry to be resolved. The first matching module 12 is used to accurately match each address text entry to be resolved with the sample address text entry in the pre-constructed address index one by one, and if a completely consistent address is matched, the longitude and latitude information corresponding to the address is output. The calculation module 13 is used to calculate the simhash value of each address text entry to be resolved when the accurate match does not match a completely consistent address. The second matching module 14 matches the simhash value of each address text entry to be resolved with the simhash value of the sample address text entry in the address index one by one according to the address text entry level from large to small, and obtains at least one sample address text entry that meets the preset conditions. The result output module 15 is used to use the longitude and latitude information corresponding to the sample address text entry with the smallest address level or the longitude and latitude information output by the first matching module as the resolution result.

[0082] Based on the above embodiments, in other embodiments, such as Figure 6 As shown, the calculation module 13 includes a dividing unit 131 , a first calculation unit 132 , a second calculation unit 133 , a third calculation unit 134 and a simhash value output unit 135 .

[0083] Among them, the division unit 131 is used to divide each address text entry to be parsed into address blocks and address keywords one by one, and determine the weight value of each address block and address keyword according to the preset weight value rule; the first calculation unit 132 is used to calculate the hash value of each address block and address keyword through a hash algorithm; the second calculation unit 133 is used to positively multiply the numerical value of 1 in the hash value of each address block and address keyword with the corresponding weight value, and negatively multiply the numerical value of 0 in the hash value of each address block and address keyword with the corresponding weight value; the third calculation unit 134 is used to accumulate the digital sequence obtained after calculating all address blocks and address keywords in bitwise correspondence to obtain a digital string; the simhash value output unit 135 is used to replace the numerical values ​​greater than 0 in the digital string with 1 and the numerical values ​​less than 0 with 0 to obtain the simhash value of each address text entry.

[0084] Based on the above embodiments, in other embodiments, such as Figure 7 As shown, it also includes a construction module 16 for pre-constructing an address index. The construction module 16 includes a segmentation unit 161, an attribute allocation unit 162 and an index construction unit 163.

[0085] Among them, the segmentation unit 161 is used to segment the pre-prepared sample address into multiple sample address text entries according to the word segmentation dictionary; the attribute allocation unit 162 is used to calculate the simhash value of each sample address text entry, and allocate the corresponding address level, administrative division affiliation, administrative division code, longitude and latitude information to each sample address text entry; the index construction unit 163 is used to use the simhash value, address level, administrative division affiliation, administrative division code, longitude and latitude information of the sample address text entry as the attributes of the sample address text entry, and together with the sample address text entry, form an address index.

[0086] Based on the above embodiments, in other embodiments, such as Figure 8 As shown, the second matching module 14 includes a distance calculation unit 141 and a term screening unit 142 .

[0087] Among them, the distance calculation unit 141 is used to calculate the Hamming distance between the simhash value of each address text entry to be parsed and the simhash value of the sample address text entry in the address index one by one according to the address text entry level from large to small; the entry screening unit 142 is used to calculate that when the Hamming distance is less than a preset threshold, the sample address text entry meets the preset condition; the distance calculation unit 141 and the entry screening unit 142 are repeatedly run to obtain at least one sample address text entry that meets the preset condition.

[0088] Based on the above embodiments, in other embodiments, such as Fig. 9 As shown, it also includes a judgment module 17 and a marking module 18.

[0089] Among them, the judgment module 17 is used to judge whether the address text entries to be parsed are all matched with the sample address text entries in the address index; the marking module 18 is used to output the parsing results and mark the address level of the sample address text entries corresponding to the latitude and longitude information when the address text entries to be parsed are not all matched with the sample address text entries in the address index.

[0090] For other details of the technical solutions for implementing each module in the simhash-based address resolution system in the above embodiment, please refer to the description of the simhash-based address resolution method in the above embodiment, which will not be repeated here.

[0091] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0092] The specific implementation methods of the invention are described in detail above, but they are only examples, and the invention is not limited to the specific implementation methods described above. For those skilled in the art, any equivalent modification or substitution of the invention is also within the scope of the invention, therefore, the equalization, modification, improvement, etc. made without departing from the spirit and principle of the invention should be included in the scope of the invention.

Claims

1. A simhash-based address resolution method, characterized in that: include: S1. Segment the acquired address to be resolved according to a pre-built segmentation dictionary to obtain at least one address text entry to be resolved; S2, accurately matching each of the address text entries to be parsed with the sample address text entries in the pre-constructed address index one by one, if a completely consistent address is matched, outputting the longitude and latitude information corresponding to the address as the parsing result, if not, executing step S3; the pre-constructed address index is obtained by the following steps, dividing the pre-prepared sample address into multiple sample address text entries according to the word segmentation dictionary; calculating the simhash value of each sample address text entry, and assigning the corresponding address level, administrative division affiliation, administrative division code, longitude and latitude information to each sample address text entry; The simhash value, address level, administrative division affiliation, administrative division code, and longitude and latitude information of the sample address text entry are used as attributes of the sample address text entry, and together with the sample address text entry, they form an address index; S3, calculating the simhash value of each address text entry to be resolved; step S3 includes, S31, dividing each address text entry to be resolved into address blocks and address keywords one by one, and determining the weight value of each address block and address keyword according to the preset weight value rule; S32, calculating the hash value of each address block and address keyword by a hash algorithm; S33, multiplying the value of 1 in the hash value of each address block and address keyword by the corresponding weight value, and multiplying the value of 0 in the hash value of each address block and address keyword by the corresponding weight value; S34, accumulating the digital sequence obtained after calculating all address blocks and address keywords bit by bit to obtain a digital string; S35, replacing the values ​​greater than 0 in the digital string with 1, and replacing the values ​​less than 0 with 0, to obtain the simhash value of each address text entry; S4, according to the address text entry level from large to small, one by one, matching the simhash value of each address text entry to be parsed with the simhash value of the sample address text entry in the address index, to obtain at least one sample address text entry that meets the preset conditions; S5. Take the longitude and latitude information corresponding to the sample address text entry with the smallest address level as the parsing result.

2. The simhash-based address resolution method according to claim 1, characterized in that: The step S4 comprises: S41, calculating the Hamming distance between the simhash value of each address text entry to be parsed and the simhash value of the sample address text entry in the address index one by one according to the address text entry level from large to small; S42: When the Hamming distance is less than the preset threshold, the sample address text entry meets the preset condition; Steps S41-S42 are repeatedly executed to obtain at least one sample address text entry that meets the preset condition.

3. The simhash-based address resolution method according to claim 1, characterized in that: After step S5, the method further includes: S6, determining whether all address text entries to be parsed match sample address text entries in the address index; S7. If not, output the parsing result and mark the address level of the sample address text entry corresponding to the latitude and longitude information.

4. A simhash-based address resolution system, the system being used to implement the steps of the simhash-based address resolution method as claimed in any one of claims 1 to 3, characterized in that: include: A word segmentation module is used to perform word segmentation processing on the acquired address to be resolved according to a pre-built word segmentation dictionary to obtain at least one address text entry to be resolved; A first matching module is used to accurately match each of the address text entries to be parsed with the sample address text entries in the pre-built address index one by one, and if a completely consistent address is matched, the latitude and longitude information corresponding to the address is output; A calculation module, used for calculating the simhash value of each address text entry to be resolved when the exact match fails to find a completely identical address; The second matching module matches the simhash values ​​of the address text entries to be parsed with the simhash values ​​of the sample address text entries in the address index one by one according to the address text entry levels from large to small, and obtains at least one sample address text entry that meets the preset conditions; The result output module is used to use the longitude and latitude information corresponding to the sample address text entry with the smallest address level or the longitude and latitude information output by the first matching module as the parsing result.

5. The simhash-based address resolution system according to claim 4, characterized in that: The computing module comprises: A division unit, used to divide each address text entry to be parsed into address blocks and address keywords one by one, and determine the weight value of each address block and address keyword according to a preset weight value rule; A first calculation unit, used to calculate the hash value of each address block and address keyword by using a hash algorithm; A second calculation unit is used to positively multiply the value of 1 in the hash value of each address block and address keyword by the corresponding weight value, and negatively multiply the value of 0 in the hash value of each address block and address keyword by the corresponding weight value; A third calculation unit is used to accumulate the digital sequences obtained after calculating all address blocks and address keywords in bit-by-bit correspondence to obtain a digital string; The simhash value output unit is used to replace the numerical values ​​greater than 0 in the digital string with 1 and the numerical values ​​less than 0 with 0 to obtain the simhash value of each address text entry.

6. The simhash-based address resolution system according to claim 5, characterized in that: It also includes a building module for a pre-built address index, the building module including: A segmentation unit, used for segmenting the pre-prepared sample address into a plurality of sample address text entries according to a segmentation dictionary; The attribute allocation unit is used to calculate the simhash value of each sample address text entry and allocate the corresponding address level, administrative division affiliation, administrative division code, and longitude and latitude information to each sample address text entry; The index building unit is used to use the simhash value, address level, administrative division affiliation, administrative division code, and longitude and latitude information of the sample address text entry as attributes of the sample address text entry, and together with the sample address text entry, form an address index.

7. The simhash-based address resolution system according to claim 5, characterized in that: The second matching module includes: A distance calculation unit, used for calculating the Hamming distance between the simhash value of each address text entry to be parsed and the simhash value of the sample address text entry in the address index one by one according to the address text entry level from large to small; A term screening unit, configured to determine that when the Hamming distance is less than the preset threshold, the sample address text term meets a preset condition; The distance calculation unit and the term screening unit are repeatedly run to obtain at least one sample address text term that meets a preset condition.

8. The simhash-based address resolution system according to claim 4, characterized in that: It also includes: A judgment module, used to judge whether all address text entries to be parsed match the sample address text entries in the address index; The marking module is used to mark the address level of the sample address text entry corresponding to the latitude and longitude information while outputting the parsing result when the address text entry to be parsed is not fully matched to the sample address text entry in the address index.

Citation Information

Patent Citations

  • Method for quickly matching Chinese addresses in multi-level manner on basis of address feature words

    CN103914544A

  • Method for matching place name and address in news event based on geographical feature hierarchical segmented words

    CN105404686A