Address similarity evaluation method, device, equipment and medium
By calculating the text similarity and target distance between addresses, combined with the evaluation method, the problem of inaccurate address similarity evaluation in the prior art is solved, and a more accurate address similarity evaluation is achieved.
Patent Information
- Application Number
- CN201910867136.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-12
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2039-09-12
AI Technical Summary
The existing address similarity evaluation method only performs similarity evaluation from the perspective of the text information of the address, resulting in inaccurate evaluation and inaccurate similarity between addresses.
By calculating the text similarity and target distance between addresses, and combining the two for evaluation, the similarity score of the address is determined by word segmentation processing, phrase union, preset text similarity calculation formula and GPS distance calculation formula.
It improves the accuracy of address similarity evaluation, avoids inaccuracy caused by purely from the perspective of text information, and provides more comprehensive and accurate similarity evaluation results.
Smart Images

Figure CN110598791B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial technology (Fintech), and in particular to an address similarity evaluation method, device, equipment and medium. Background Art
[0002] With the continuous development of Fintech, especially internet-based finance, more and more technologies are being applied in the financial sector. Address similarity assessment in the financial sector involves numerous technical applications. However, existing address similarity assessments are performed purely from the perspective of the textual information corresponding to the addresses. However, two addresses with similar textual information may actually be far apart. This leads to inaccurate address similarity assessments based solely on the textual information corresponding to the addresses. Summary of the Invention
[0003] The main purpose of the present invention is to provide an address similarity evaluation method, device, equipment and medium, aiming to solve the technical problem of inaccurate address similarity evaluation in the prior art.
[0004] To achieve the above objectives, an embodiment of the present invention provides an address similarity evaluation method, which includes:
[0005] Upon receiving an address comparison request, calculating the text similarity of the addresses to be compared in the address comparison request;
[0006] Calculating the target distance between the addresses to be compared;
[0007] The address similarity of the addresses to be compared is evaluated based on the text similarity and the target distance.
[0008] Optionally, when receiving an address comparison request, the step of calculating the text similarity of the address to be compared in the address comparison request includes:
[0009] When receiving an address comparison request, performing word segmentation processing on each address to be compared in the address comparison request to generate a word segmentation phrase corresponding to each address to be compared;
[0010] Performing phrase union processing on each of the segmented phrases to obtain a union phrase;
[0011] Calculating the number of times each word in the union phrase appears in the word phrase corresponding to each address to be compared, and generating a number set corresponding to each address to be compared;
[0012] The similarity of the number sets corresponding to the addresses to be compared is calculated using a preset text similarity calculation formula as the text similarity between the addresses to be compared.
[0013] Optionally, the step of calculating the target distance between the addresses to be compared includes:
[0014] Obtaining GPS information corresponding to each of the addresses to be compared;
[0015] The target distance between the addresses to be compared is calculated based on the GPS information corresponding to each of the addresses to be compared and a preset distance calculation formula.
[0016] Optionally, the step of obtaining a pre-configured GPS distance scoring parameter and determining a distance score according to the target distance and the GPS distance scoring parameter includes:
[0017] determining a text similarity score based on the text similarity;
[0018] Obtaining pre-configured GPS distance scoring parameters, and determining a distance score according to the target distance and the GPS distance scoring parameters;
[0019] The address similarity of the addresses to be compared is evaluated using the text similarity score and the distance score.
[0020] Optionally, the step of obtaining a pre-configured GPS distance scoring parameter and determining a distance score according to the target distance and the GPS distance scoring parameter includes:
[0021] Obtaining pre-configured GPS distance scoring parameters, and determining the scoring interval of the address to be compared according to the GPS distance scoring parameters;
[0022] A preset benchmark score is obtained, and a distance score is determined according to the scoring interval, the benchmark score, a starting value of the scoring interval, and the target distance.
[0023] Optionally, the step of evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance includes:
[0024] Determining whether the text similarity score and the distance score are all available;
[0025] If any one of the text similarity score and the distance score is unavailable, evaluating the address similarity based on the available score of the text similarity score and the distance score;
[0026] If both the text similarity score and the distance score are available, the address similarity of the addresses to be compared is evaluated using the text similarity score and the distance score.
[0027] Optionally, the step of evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance includes:
[0028] Determining whether one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score;
[0029] When one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score, the address similarity is evaluated using the other score greater than the second preset score.
[0030] Optionally, the step of evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance further includes:
[0031] If both the text similarity score and the distance score are not the first preset score, or one of the text similarity score and the distance score is the first preset score and the other score is not greater than the second preset score, obtaining the first weight and the second weight corresponding to the text similarity score and the distance score respectively;
[0032] The address similarity is evaluated based on the text similarity score and the distance score, as well as the first weight and the second weight.
[0033] The present invention also provides an address similarity evaluation device, the address similarity evaluation device comprising:
[0034] A receiving module, configured to calculate, upon receiving an address comparison request, the text similarity of the addresses to be compared in the address comparison request;
[0035] An acquisition module, configured to calculate a target distance between the addresses to be compared;
[0036] An evaluation module is used to evaluate the address similarity of the addresses to be compared based on the text similarity and the target distance.
[0037] Optionally, the receiving module includes:
[0038] The receiving unit is configured to, upon receiving an address comparison request, perform word segmentation processing on each address to be compared in the address comparison request, and generate a word segmentation phrase corresponding to each address to be compared;
[0039] a union unit, configured to perform a phrase union process on each of the segmented phrases to obtain a union phrase;
[0040] The first acquisition unit is configured to calculate the number of times each segmented word in the union phrase appears in the segmented phrase corresponding to each address to be compared, and generate a number set corresponding to each address to be compared;
[0041] The first calculation unit is configured to calculate the similarity of the number sets corresponding to the addresses to be compared with each other by using a preset text similarity calculation formula as the text similarity between the addresses to be compared with each other.
[0042] Optionally, the acquisition module includes:
[0043] A second acquiring unit is used to acquire GPS information corresponding to each of the addresses to be compared;
[0044] A second calculation unit is used to calculate the target distance between the addresses to be compared according to the GPS information corresponding to each of the addresses to be compared and a preset distance calculation formula;
[0045] a third acquiring unit, configured to acquire a pre-configured GPS distance scoring parameter, and determine a distance score according to the target distance and the GPS distance scoring parameter;
[0046] The address similarity of the addresses to be compared is evaluated using the text similarity score and the distance score.
[0047] Optionally, the third acquiring unit includes:
[0048] A first acquisition subunit, configured to determine a text similarity score based on the text similarity;
[0049] a second acquisition subunit, configured to acquire a pre-configured GPS distance scoring parameter, and determine a distance score according to the target distance and the GPS distance scoring parameter;
[0050] The third acquisition subunit is configured to evaluate the address similarity of the addresses to be compared using the text similarity score and the distance score.
[0051] Optionally, the second acquiring subunit is configured to:
[0052] Obtaining pre-configured GPS distance scoring parameters, and determining the scoring interval of the address to be compared according to the GPS distance scoring parameters;
[0053] A preset benchmark score is obtained, and a distance score is determined according to the scoring interval, the benchmark score, a starting value of the scoring interval, and the target distance.
[0054] Optionally, the address similarity evaluation device includes:
[0055] A judgment module, configured to judge whether the text similarity score and the distance score are all available;
[0056] a determination module configured to evaluate address similarity based on the available score among the text similarity score and the distance score if any one of the text similarity score and the distance score is unavailable;
[0057] An execution module is configured to evaluate the address similarity of the addresses to be compared using the text similarity score and the distance score if both the text similarity score and the distance score are available.
[0058] Optionally, the evaluation module includes:
[0059] a determining unit, configured to determine whether one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score;
[0060] The first evaluation unit is configured to evaluate address similarity using the score greater than the second preset score when one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score.
[0061] Optionally, the evaluation module includes:
[0062] a fourth acquiring unit, configured to acquire a first weight and a second weight corresponding to the text similarity score and the distance score, respectively, if neither the text similarity score nor the distance score is the first preset score, or if one of the text similarity score and the distance score is the first preset score and the other score is not greater than the second preset score;
[0063] The second evaluation unit is configured to evaluate the address similarity according to the text similarity score and the distance score, as well as the first weight and the second weight.
[0064] The present invention also provides a medium on which an address similarity evaluation program is stored. When the address similarity evaluation program is executed by a processor, the steps of the above-mentioned address similarity evaluation method are implemented.
[0065] Upon receiving an address comparison request, the present invention calculates the text similarity of the addresses to be compared in the address comparison request; calculates the target distance between the addresses to be compared; and evaluates the address similarity of the addresses to be compared using the text similarity and the target distance. In this application, address similarity is no longer evaluated purely from the perspective of the text information corresponding to the addresses. Instead, address similarity is evaluated by combining the similarity of the text information corresponding to the addresses with the similarity of the distance. This avoids the technical problem of inaccurate similarity evaluation caused by evaluating similarity purely from the perspective of the text information corresponding to the addresses, thereby improving the accuracy of the similarity evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 Schematic diagram of the flow of the first embodiment of the address similarity evaluation method of the present invention;
[0067] Figure 2 This is a detailed flowchart of the step of calculating the target distance between the addresses to be compared in the second embodiment of the address similarity evaluation method of the present invention;
[0068] Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the method of the present invention.
[0069] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0070] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0071] The present invention provides an address similarity evaluation method. In an embodiment of the address similarity evaluation method, referring to Figure 1 , the address similarity evaluation method includes:
[0072] Step S10, when an address comparison request is received, calculating the text similarity of the address to be compared in the address comparison request;
[0073] Step S20, calculating the target distance between the addresses to be compared;
[0074] Step S30 : evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance.
[0075] The specific steps are as follows:
[0076] Step S10, when an address comparison request is received, calculating the text similarity of the address to be compared in the address comparison request;
[0077] It should be noted that, in this embodiment, the address similarity evaluation method is applied to an address similarity evaluation device, which is equipped with an address similarity evaluation system. The address similarity evaluation system includes a preset word segmenter and a preset distance calculator, etc., wherein the preset word segmenter can be an IK word segmenter (IKAnalyzer). The IK word segmenter is an open source, lightweight Chinese word segmentation toolkit developed based on Java language. The preset word segmenter has functions such as word segmentation of addresses. For example, there are two addresses: Nanshan District, Shenzhen City, Guangdong Province and Bao'an District, Shenzhen City, Guangdong Province. The IK word segmenter will generate T1={Guangdong Province} for Nanshan District, Shenzhen City, Guangdong Province and Bao'an District, Shenzhen City, Guangdong Province, respectively. , Guangdong, Province, Shenzhen, City, Nanshan District, Nanshan, Mountain Area}; T2 = the word segmentation group of {Guangdong Province, Guangdong, Province, Shenzhen City, Shenzhen, City, Bao'an District, Bao'an, District}, the preset distance calculator can be a map tool, such as Tencent Map, etc. The preset distance calculator can calculate the distance between different addresses. When an address comparison request is received, wherein the address comparison request carries information of the address to be compared, and the address to be compared includes at least two addresses, the target text similarity corresponding to the address to be compared in the address comparison request is obtained through the preset word segmenter. After obtaining the text similarity, a text similarity score can also be obtained according to the target text similarity, and the corresponding dimension of the address similarity can be evaluated according to the text similarity score.
[0078] Specifically, when receiving an address comparison request, the step of calculating the text similarity of the address to be compared in the address comparison request includes:
[0079] Step S11, when receiving an address comparison request, performing word segmentation processing on each address to be compared in the address comparison request, and generating a word segmentation phrase corresponding to each address to be compared;
[0080] In this embodiment, when an address comparison request is received, each address to be compared in the address comparison request is segmented to generate a segmentation phrase corresponding to each address to be compared. Specifically, an IK segmenter generates an address keyword phrase based on the address to be compared in the address comparison request: T = {w1, w2, w3..wn}, where w1, w2, w3..wn, etc. are keywords. For example, the IK segmenter will generate segmentation phrases of T1 = {Guangdong Province, Guangdong Province, Province, Shenzhen City, Nanshan District, Nanshan Mountain Area}; T2 = {Guangdong Province, Guangdong Province, Shenzhen City, Shenzhen City, Bao'an District, Bao'an District} for Nanshan District, Shenzhen City, Guangdong Province, respectively.
[0081] Step S12, performing phrase union processing on each of the segmented phrases to obtain a union phrase;
[0082] After obtaining the segmented phrases, each segmented phrase is subjected to phrase union processing to obtain a union phrase, that is, a keyword that appears multiple times in the segmented phrase is retained only once to obtain a union phrase.
[0083] Calculate the number of times each segmented word in the union phrase appears in the segmented phrase corresponding to each address to be compared, and generate a set of times corresponding to each address to be compared. For example, there are 2 addresses to be compared, and find the number of times each segmented word in the union phrase appears in T1 and T2 to obtain m and a, m = {m1, m2, m3..mn}, n = {a1, a2, a3.an}, for example: T1 and T2, T1 = {Guangdong Province, Guangdong, Province, Shenzhen, City, Nanshan District, Nanshan, Mountain Area}; T2 = {Guangdong Province, Guangdong, Province, Shenzhen, Shenzhen, City, Bao'an District, Bao'an, District}, and the union phrase is {Guangdong Province, Guangdong, Province, Shenzhen, Shenzhen, City, Bao'an District, Bao'an, District, Nanshan District, Nanshan, Mountain Area, Shenzhen}.
[0084] Step S13, calculating the number of times each segmented word in the union phrase appears in the segmented phrase corresponding to each address to be compared, and generating a set of the number of times corresponding to each address to be compared;
[0085] Specifically, the number of times the combined word phrase appears in the segmented word phrase corresponding to each address to be compared is: the number of times it appears in T1 is m = [1(Guangdong Province), 1(Guangdong), 1(Province), 1(Shenzhen Stock Exchange), 1(City), 1(Nanshan District), 1(Nanshan), 1(Mountainous Area), 0(Shenzhen City), 0(Shenzhen), 0(District), 0(Bao'an District), 0(Bao'an)], and the number of times it appears in T2 is n = [1(Guangdong Province), 1(Guangdong), 1(Province), 0(Shenzhen Stock Exchange), 0(Mountainous Area), 1(Bao'an), 0(Nanshan), 0(Nanshan District), 1(Shenzhen City), 1(District), 1(Bao'an District), 1(Shenzhen City), 1(City)].
[0086] Step S14: calculating the similarity of the number sets corresponding to each of the addresses to be compared using a preset text similarity calculation formula as the text similarity between each of the addresses to be compared.
[0087] The similarity of the number sets corresponding to the addresses to be compared is calculated using a preset text similarity calculation formula as the text similarity between the addresses to be compared.
[0088] For example, the preset text similarity calculation formula can be:
[0089] Among them, the number of times each participle in the union phrase appears in T1 and T2 is m and a respectively, and n is the number of participles in the union phrase;
[0090] Specifically, for example, according to the number of times the above-mentioned combined word phrase appears in the segmented word phrase corresponding to each address to be compared, Round up to 47.
[0091] In addition, the preset text similarity calculation formula can be: angle cosine method. The angle cosine method is to express the address in text vector form, and then determine the size of the difference between the two vectors based on the cosine value of the angle between the two vectors, and use this as the similarity between the two addresses. The calculation principle of the angle cosine method text similarity is: if multiple phrases are {A1, B1}, {A2, B2}, etc., these phrases can be represented by two vectors starting from the origin in a plane rectangular coordinate system. We can judge the similarity of the vectors by the size of the angle between the vectors. The smaller the angle, the higher the similarity: the specific formula is:
[0092]
[0093] Use this formula to get the value of cosine. The closer the value is to 1, the smaller the angle is, and the more similar the two vectors are. This calculation method is called cosine similarity.
[0094] In addition, the preset text similarity calculation formula can be: edit distance method. Edit distance (Edit Distance), also known as Levenshtein distance, refers to the minimum number of editing operations required to convert two strings from one to another. The allowed editing operations include replacing one character with another, inserting a character, and deleting a character. The smaller the edit distance, the greater the similarity between the two strings.
[0095] The target text similarity is determined based on the number of times each segmented word in the union phrase appears in the segmented word phrase and a preset text similarity calculation formula. After obtaining the target text similarity, a text similarity score can also be determined based on the target text similarity.
[0096] Step S20, calculating the target distance between the addresses to be compared;
[0097] Calculate the target distance between the addresses to be compared. Specifically, the Earth is a nearly standard ellipsoid with an equatorial radius of 6378.140 km, a polar radius of 6356.755 km, and a mean radius of 6371.004 km. The mean radius of the Earth is denoted as R. If the 0-degree meridian is used as the reference, then the surface distance between any two points on the Earth's surface can be calculated based on their longitude and latitude. Assuming that the longitude and latitude of point A are (LonA, LatA) and the longitude and latitude of point B are (LonB, LatB), based on the 0-degree meridian, the east longitude is the positive longitude (Longitude), the west longitude is the negative longitude (-Longitude), the north latitude is 90-latitude (90-Latitude), and the south latitude is 90+latitude (90+Latitude). The two points after the above processing are calculated as (MLonA, MLatA) and (MLonB, MLatB). Then, according to trigonometric deduction, we can get the following formula for calculating the distance between two points: C = sin(MLatA)*sin(MLatB)+cos(MLatA)*cos(MLatB)*cos(MLonA-MLonB)
[0098] Distance = R*Arccos(C)*Pi / 180.
[0099] For example, A(113.9583,22.530101), B(113.887182,22.560876)
[0100] C=sin(22.530101)*sin(22.560876)+cos(22.530101)*cos(22.560876)*cos(113.9583-113.887182)=0.9999991986
[0101] Distance = R*Arccos(C)*Pi / 180 = 6378.137*Arccos(0.9999991986)*Pi / 180 = 0.8074832 (km)*1000 = 8074 m (rounded).
[0102] After obtaining the target distance, a distance score can also be obtained based on the target distance.
[0103] Step S30 : evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance.
[0104] In this embodiment, the address similarity of the addresses to be compared is evaluated by using the text similarity and the target distance. For example, specifically, the address similarity of the addresses to be compared can be evaluated by combining the text similarity score and the distance score to obtain and return an evaluation result.
[0105] It should be noted that, in this embodiment, the evaluation can be the address similarity score or the address similarity itself. When the address similarity score or address similarity is different, the evaluation results are different. The input address corresponding to the address comparison request can be classified according to the evaluation results. For example, the classification category can be a first classification result with a similarity greater than 90%, or it can be a second classification result with a similarity less than 90% and greater than 60%, or it can be a third classification result with a similarity less than 60%.
[0106] The step of evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance includes:
[0107] Step S31, determining whether the text similarity score and the distance score are all available;
[0108] In this embodiment, it is determined whether the text similarity score and the distance score are all available. Specifically, whether the text similarity score or the distance score is received within a preset time period is determined. When the text similarity score or the distance score is not received within the preset time period, the unreceived score is unavailable.
[0109] Step S32: If any one of the text similarity score and the distance score is unavailable, evaluating the address similarity based on the available score of the text similarity score and the distance score;
[0110] If any one of the text similarity score and the distance score is unavailable, the address similarity is evaluated based on the available score of the text similarity score and the distance score. For example, if the text similarity score is unavailable, the address similarity is evaluated based on the distance score to avoid the inability to obtain the evaluation result in a timely manner.
[0111] Step S33: If both the text similarity score and the distance score are available, the address similarity of the addresses to be compared is evaluated using the text similarity score and the distance score.
[0112] If both the text similarity score and the distance score are available, the address similarity of the addresses to be compared is evaluated using the text similarity score and the distance score to accurately obtain the address similarity.
[0113] Upon receiving an address comparison request, the present invention calculates the text similarity of the addresses to be compared in the address comparison request; calculates the target distance between the addresses to be compared; and evaluates the address similarity of the addresses to be compared using the text similarity and the target distance. In this application, address similarity is no longer evaluated purely from the perspective of the text information corresponding to the addresses. Instead, address similarity is evaluated by combining the similarity of the text information corresponding to the addresses with the similarity of the distance. This avoids the technical problem of inaccurate similarity evaluation caused by evaluating similarity purely from the perspective of the text information corresponding to the addresses, thereby improving the accuracy of the similarity evaluation.
[0114] Further, based on the first embodiment, referring to Figure 2 The present invention provides another embodiment of the method for evaluating address similarity. In this embodiment, the step of calculating the target distance between the addresses to be compared includes:
[0115] Step S21, obtaining GPS information corresponding to each of the addresses to be compared;
[0116] In this embodiment, the GPS information corresponding to each of the addresses to be compared is obtained, specifically, the longitude and latitude information in the GPS information is obtained.
[0117] Step S22 , calculating the target distance between the addresses to be compared according to the GPS information corresponding to each of the addresses to be compared and a preset distance calculation formula.
[0118] In this embodiment, after obtaining the latitude and longitude information in the GPS information, the target distance between the addresses to be compared is calculated according to the GPS information corresponding to each of the addresses to be compared and a preset distance calculation formula (which may include multiple ones).
[0119] The evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance includes:
[0120] Step C1, determining a text similarity score based on the text similarity;
[0121] Step C2, obtaining pre-configured GPS distance scoring parameters, and determining a distance score according to the target distance and the GPS distance scoring parameters;
[0122] Step C3: Evaluate the address similarity of the addresses to be compared using the text similarity score and the distance score.
[0123] A text similarity score is determined based on the text similarity. For example, if the text similarity is 50%, the text similarity score can be set to 100. A pre-configured GPS distance score parameter is obtained, and a distance score is determined based on the target distance and the GPS distance score parameter. Specifically, based on the configured GPS distance score parameter, the interval within the parameter is determined, and then the distance score is further determined. The address similarity of the to-be-compared addresses is evaluated using the text similarity score and the distance score. For example, assuming the GPS distance score parameter is "1000, 4000, 10000, 20000, 30000, 40000, 50000, 60000, 80000, 100000," the intervals are 1000-4000, 4000-10000, etc. After obtaining the scoring interval, the starting value of the interval is determined according to the scoring interval, such as the starting value of the 1000-4000 interval is 1000, and the starting value of the 4000-10000 interval is 4000.
[0124] Based on the configured GPS distance score parameters, determine which interval the distance falls into. Then, taking 100 as the base, subtract the interval number * 10 from 100, then subtract (distance - interval start value) / interval difference and round up. If the distance is greater than the maximum parameter value, the score is 0. For example, assuming the GPS distance score parameters are "1000,4000,10000,20000,30000,40000,50000,60000,80000,100000",
[0125] The distance is 800, then score = 100-0*10-(800-0) / 1000 (rounded) = 100.
[0126] The distance is 2000, then score = 100-1*10-(2000-1000) / 3000 (rounded) = 90.
[0127] The distance is 45000, then score = 100-6*10-(45000-40000) / 10000 (rounded) = 40.
[0128] If the distance is 110000, then score = 0.
[0129] In this embodiment, a text similarity score is determined based on the text similarity; a pre-configured GPS distance score parameter is obtained, and a distance score is determined based on the target distance and the GPS distance score parameter; and the address similarity of the addresses to be compared is evaluated using the text similarity score and the distance score. In this embodiment, accurate distance scoring lays the foundation for address similarity evaluation.
[0130] Furthermore, the present invention provides another embodiment of the method for evaluating address similarity. In this embodiment, the step of evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance includes:
[0131] Step S34, determining whether one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score;
[0132] Determine whether one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score, wherein the first preset score may be 0 and the second preset score may be a score greater than 80.
[0133] Step S35 : When one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score, address similarity is evaluated using the other score greater than the second preset score.
[0134] If one of the text similarity score and the distance score is a first preset score and the other is greater than a second preset score, the address similarity is evaluated based on the score greater than the second preset score. Specifically, if the angle score is 0 or the GPS score is greater than 80, the GPS score is used as the basis. If the GPS score is 0 or the angle score is greater than 80, the angle score is used as the basis. If both scores are 0, the return value is 0.
[0135] In this embodiment, by determining whether one of the text similarity score and the distance score is a first preset score and the other is greater than a second preset score; when one of the text similarity score and the distance score is the first preset score and the other is greater than the second preset score, address similarity is evaluated using the other score greater than the second preset score. In this embodiment, accurate address similarity evaluation is achieved.
[0136] Furthermore, the present invention provides another embodiment of the method for evaluating address similarity. In this embodiment, the step of evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance further includes:
[0137] Step S36: If neither the text similarity score nor the distance score is the first preset score, or if one of the text similarity score and the distance score is the first preset score and the other score is not greater than the second preset score, then obtaining a first weight and a second weight corresponding to the text similarity score and the distance score, respectively;
[0138] In this embodiment, if neither the text similarity score nor the distance score is the first preset score, or one of the text similarity score and the distance score is the first preset score and the other score is not greater than the second preset score, then the first weight and the second weight corresponding to the text similarity score and the distance score, respectively, are obtained. The purpose of obtaining the weights is to perform an overall evaluation of the address similarity.
[0139] Step S37 : evaluating the address similarity based on the text similarity score and the distance score, as well as the first weight and the second weight.
[0140] The address similarity is evaluated based on the text similarity score, the distance score, and the first and second weights. For example, if the GPS weight is 50, then score = (gpsScore*50+cosScore*(100-50)) / 100. For example, if GPS = 80 and cos = 64, then the comprehensive score socre = (80*50+64*50) / 100 = 72.
[0141] In this embodiment, if neither the text similarity score nor the distance score is a first preset score, or if one of the text similarity score and the distance score is a first preset score and the other is not greater than a second preset score, then a first weight and a second weight corresponding to the text similarity score and the distance score are obtained, respectively; and address similarity is evaluated based on the text similarity score, the distance score, and the first and second weights. In this embodiment, address similarity is obtained by combining the two scoring methods, thereby improving evaluation accuracy.
[0142] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0143] The address similarity evaluation device in the embodiment of the present invention may be a PC, or a terminal device such as a smart phone, a tablet computer, or a portable computer.
[0144] like Figure 3 As shown, the address similarity evaluation device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to implement communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as a disk storage device. The memory 1005 may also be a storage device independent of the processor 1001.
[0145] Optionally, the address similarity evaluation device may further include a target user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. The target user interface may include a display screen and an input unit such as a keyboard. Optionally, the target user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a WiFi interface).
[0146] Those skilled in the art will understand that Figure 3 The structure of the address similarity evaluation device shown in the figure does not constitute a limitation on the address similarity evaluation device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0147] like Figure 3 As shown, memory 1005, a computer storage medium, may include an operating system, a network communication module, and an address similarity evaluation program. The operating system manages and controls the hardware and software resources of the address similarity evaluation device and supports the operation of the address similarity evaluation program and other software and / or programs. The network communication module is used to enable communication between components within memory 1005, as well as with other hardware and software in the address similarity evaluation device.
[0148] exist Figure 3 In the address similarity evaluation device shown, the processor 1001 is configured to execute the address similarity evaluation program stored in the memory 1005 to implement the steps of any of the above-mentioned address similarity evaluation methods.
[0149] The specific implementation of the address similarity evaluation device of the present invention is basically the same as the embodiments of the above-mentioned address similarity evaluation method, and will not be repeated here.
[0150] In addition, an embodiment of the present invention further provides an address similarity evaluation device, the address similarity evaluation device comprising:
[0151] A receiving module, configured to calculate, upon receiving an address comparison request, the text similarity of the addresses to be compared in the address comparison request;
[0152] An acquisition module, configured to calculate a target distance between the addresses to be compared;
[0153] An evaluation module is used to evaluate the address similarity of the addresses to be compared based on the text similarity and the target distance.
[0154] Optionally, the receiving module includes:
[0155] The receiving unit is configured to, upon receiving an address comparison request, perform word segmentation processing on each address to be compared in the address comparison request, and generate a word segmentation phrase corresponding to each address to be compared;
[0156] a union unit, configured to perform a phrase union process on each of the segmented phrases to obtain a union phrase;
[0157] The first acquisition unit is configured to calculate the number of times each segmented word in the union phrase appears in the segmented phrase corresponding to each address to be compared, and generate a number set corresponding to each address to be compared;
[0158] The first calculation unit is configured to calculate the similarity of the number sets corresponding to the addresses to be compared with each other by using a preset text similarity calculation formula as the text similarity between the addresses to be compared with each other.
[0159] Optionally, the acquisition module includes:
[0160] A second acquiring unit is used to acquire GPS information corresponding to each of the addresses to be compared;
[0161] A second calculation unit is used to calculate the target distance between the addresses to be compared according to the GPS information corresponding to each of the addresses to be compared and a preset distance calculation formula;
[0162] a third acquiring unit, configured to acquire a pre-configured GPS distance scoring parameter, and determine a distance score according to the target distance and the GPS distance scoring parameter;
[0163] The address similarity of the addresses to be compared is evaluated using the text similarity score and the distance score.
[0164] Optionally, the third acquiring unit includes:
[0165] A first acquisition subunit, configured to determine a text similarity score based on the text similarity;
[0166] a second acquisition subunit, configured to acquire a pre-configured GPS distance scoring parameter, and determine a distance score according to the target distance and the GPS distance scoring parameter;
[0167] The third acquisition subunit is configured to evaluate the address similarity of the addresses to be compared using the text similarity score and the distance score.
[0168] Optionally, the second acquiring subunit is configured to:
[0169] Obtaining pre-configured GPS distance scoring parameters, and determining the scoring interval of the address to be compared according to the GPS distance scoring parameters;
[0170] A preset benchmark score is obtained, and a distance score is determined according to the scoring interval, the benchmark score, a starting value of the scoring interval, and the target distance.
[0171] Optionally, the address similarity evaluation device includes:
[0172] A judgment module, configured to judge whether the text similarity score and the distance score are all available;
[0173] a determination module configured to evaluate address similarity based on the available score among the text similarity score and the distance score if any one of the text similarity score and the distance score is unavailable;
[0174] An execution module is configured to evaluate the address similarity of the addresses to be compared using the text similarity score and the distance score if both the text similarity score and the distance score are available.
[0175] Optionally, the evaluation module includes:
[0176] a determining unit, configured to determine whether one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score;
[0177] The first evaluation unit is configured to evaluate address similarity using the score greater than the second preset score when one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score.
[0178] Optionally, the evaluation module includes:
[0179] a fourth acquiring unit, configured to acquire a first weight and a second weight corresponding to the text similarity score and the distance score, respectively, if neither the text similarity score nor the distance score is the first preset score, or if one of the text similarity score and the distance score is the first preset score and the other score is not greater than the second preset score;
[0180] The second evaluation unit is configured to evaluate the address similarity according to the text similarity score and the distance score, as well as the first weight and the second weight.
[0181] The specific implementation of the address similarity evaluation device is basically the same as the embodiments of the above-mentioned address similarity evaluation method, and will not be repeated here.
[0182] In addition, an embodiment of the present invention further proposes an address similarity evaluation device, which includes: a memory 109, a processor 110, and an address similarity evaluation program stored in the memory 109 and executable on the processor 110. When the address similarity evaluation program is executed by the processor 110, the steps of each embodiment of the above-mentioned address similarity evaluation method are implemented.
[0183] In addition, the present invention also provides a computer medium storing one or more programs, which can be executed by one or more processors to implement the steps of each embodiment of the above-mentioned address similarity evaluation method.
[0184] The expanded contents of the specific implementation of the device and medium (ie, computer medium) of the present invention are basically the same as those of the above-mentioned embodiments of the address similarity evaluation method, and are not described in detail here.
[0185] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0186] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0187] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0188] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.
Claims
1. A method for evaluating address similarity, characterized in that: The address similarity evaluation method comprises: When receiving an address comparison request, calculating the text similarity of the address to be compared in the address comparison request; Calculating the target distance between the addresses to be compared; Evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance; The evaluating of the address similarity of the to-be-compared addresses by using the text similarity and the target distance includes: determining a text similarity score according to the text similarity; Obtain a preconfigured GPS distance scoring parameter, determine the interval of the target distance in the GPS distance scoring parameter according to the preconfigured GPS distance scoring parameter, determine the starting value of the interval, calculate the difference between the target distance and the starting value, determine the interval difference between two values on both sides of the interval, determine the ratio between the difference and the interval difference and round it to obtain a rounded ratio, obtain a reference value, determine the interval value of the interval in the GPS distance scoring parameter, subtract the product of the interval value and 10 from the reference value, and then subtract the rounded ratio to obtain a distance score; The address similarity of the addresses to be compared is evaluated by using the text similarity score and the distance score.
2. The address similarity evaluation method according to claim 1, characterized in that: When receiving the address comparison request, the step of calculating the text similarity of the address to be compared in the address comparison request includes: When receiving an address comparison request, performing word segmentation processing on each address to be compared in the address comparison request to generate a word segmentation phrase corresponding to each address to be compared; Performing phrase union processing on each of the segmented word phrases to obtain a union phrase; Calculate the number of times each word in the union word group appears in the word group corresponding to each address to be compared, and generate a number set corresponding to each address to be compared; The similarities of the number sets corresponding to the addresses to be compared are calculated by a preset text similarity calculation formula as the text similarities between the addresses to be compared.
3. The address similarity evaluation method according to claim 1, characterized in that: The calculating the target distance between the addresses to be compared comprises: Obtaining GPS information corresponding to each of the addresses to be compared; The target distance between the addresses to be compared is calculated according to the GPS information corresponding to each of the addresses to be compared and a preset distance calculation formula.
4. The address similarity evaluation method according to any one of claims 1 to 3, characterized in that: The evaluating the address similarity of the to-be-compared addresses by using the text similarity and the target distance includes: Determining a text similarity score based on the text similarity; Obtaining a pre-configured GPS distance scoring parameter, and determining a distance score according to the target distance and the GPS distance scoring parameter; The address similarity of the addresses to be compared is evaluated based on the text similarity and the target distance.
5. The address similarity evaluation method according to claim 4, characterized in that: The step of evaluating the address similarity of the addresses to be compared by using the text similarity score and the distance score comprises: Determining whether the text similarity score and the distance score are all available; If any one of the text similarity score and the distance score is unavailable, evaluating the address similarity according to the available score of the text similarity score and the distance score; If both the text similarity score and the distance score are available, the address similarity of the addresses to be compared is evaluated by using the text similarity and the target distance.
6. The address similarity evaluation method according to claim 4, characterized in that: The step of evaluating the address similarity of the to-be-compared addresses by using the text similarity and the target distance comprises: Determine whether one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score; When one of the text similarity score and the distance score is a first preset score and the other score is greater than a second preset score, the address similarity is evaluated using the other score greater than the second preset score.
7. The address similarity evaluation method according to claim 6, characterized in that: The step of evaluating the address similarity of the to-be-compared addresses by using the text similarity and the target distance further includes: If both the text similarity score and the distance score are not the first preset score, or one of the text similarity score and the distance score is the first preset score and the other score is not greater than the second preset score, then obtaining the first weight and the second weight corresponding to the text similarity score and the distance score respectively; The address similarity is evaluated based on the text similarity score and the distance score, as well as the first weight and the second weight.
8. An address similarity evaluation device, characterized in that: The address similarity evaluation device comprises: A receiving module, configured to calculate the text similarity of the address to be compared in the address comparison request when receiving the address comparison request; An acquisition module, used for calculating the target distance between the addresses to be compared; An evaluation module, used for evaluating the address similarity of the addresses to be compared based on the text similarity and the target distance; The evaluating of the address similarity of the to-be-compared addresses by using the text similarity and the target distance includes: determining a text similarity score according to the text similarity; Obtain a preconfigured GPS distance scoring parameter, determine the interval of the target distance in the GPS distance scoring parameter according to the preconfigured GPS distance scoring parameter, determine the starting value of the interval, calculate the difference between the target distance and the starting value, determine the interval difference between two values on both sides of the interval, determine the ratio between the difference and the interval difference and round it to obtain a rounded ratio, obtain a reference value, determine the interval value of the interval in the GPS distance scoring parameter, subtract the product of the interval value and 10 from the reference value, and then subtract the rounded ratio to obtain a distance score; The address similarity of the addresses to be compared is evaluated by using the text similarity score and the distance score.
9. An address similarity evaluation device, characterized in that: The device comprises: a memory, a processor, and an address similarity evaluation program stored in the memory and executable on the processor. When the address similarity evaluation program is executed by the processor, the steps of the address similarity evaluation method according to any one of claims 1 to 7 are implemented.
10. A medium, characterized in that The medium stores an address similarity evaluation program, and when the address similarity evaluation program is executed by the processor, the steps of the address similarity evaluation method according to any one of claims 1 to 7 are implemented.
