Method, device, computer equipment and storage medium for calculating list similarity

By combining editing distance and the longest common subsequence algorithm, the problem of inaccurate similarity calculation caused by word order changes in checklist matching in the prior art is solved, and higher matching accuracy and lower computational complexity are achieved .

CN112559559BActive Publication Date: 2025-02-11CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011554205.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-24
Publication Date
2025-02-11
Estimated Expiration
2040-12-24

AI Technical Summary

Technical Problem

The existing editing distance algorithm failed to effectively consider the order of multiple word combinations in the list screening match, resulting in inaccurate similarity calculations. For example, "Zhong Rongqing" and "Zhong Qingrong" were misjudged as the same person.

Method used

Combining the edit distance and the longest common subsequence algorithm, the word similarity is calculated by editing distance and adjusting the error score, then using the longest common subsequence to calculate the similarity, and finally the two are fused to obtain the final similarity.

Benefits of technology

It improves the accuracy of checklist screening matching, avoids the problem that a single algorithm cannot consider order changes, and effectively reduces the complexity of computing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112559559B_ABST
    Figure CN112559559B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, computer equipment and storage medium for calculating list similarity, and relates to the field of data processing technology. A specific implementation of the method includes: obtaining data to be screened and a list index; judging whether the data to be screened meets a predetermined rule; if the data to be screened meets the predetermined rule, obtaining the list words in the list index corresponding to the data to be screened, then using the edit distance calculation to obtain a first similarity, processed data to be screened, processed list words and an adjusted edit distance error score based on the data to be screened and the list words; if the first similarity is greater than a predetermined threshold, using the longest common subsequence to obtain a second similarity based on the processed data to be screened and the processed list words; combining the adjusted edit distance error score and the second similarity to obtain a final similarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, computer equipment and storage medium for calculating list similarity. Background Art

[0002] Currently, the method based on similarity matching between the customer to be screened and the listed customer data is being used in the field of list screening similarity matching.

[0003] Similarity is widely used in many fields such as automatic scoring systems, plagiarism detection systems, web search, data cleaning, DNA sequence matching, etc. Similarly, similarity matching calculations are often used in anti-money laundering and anti-terrorist financing list monitoring. There are many similarity measurement algorithms, such as the Heckel algorithm, Greedy String Tiling, Levenshtein Distance (LD) and Longest Common Subsequences (LCS). Different algorithms have different implementation principles, and their algorithm time complexity and calculated similarity will also be different.

[0004] The edit distance algorithm was proposed by Russian mathematician Vladimir Levenshtein in 1965. The edit distance algorithm is a quantitative measure of the degree of difference between two strings (such as English words). The measurement method is to analyze how many times it takes to convert a string A into another string B. The edit distance can be used in natural language processing. For example, spell checking determines which one (or which ones) is more likely through the edit distance between a misspelled word and other correct words. Generally speaking, the smaller the edit distance between two strings, the more similar they are. If two strings are equal, their edit distance is 0. Directly applying the edit distance algorithm to list screening matching can mainly consider the similarity of words, but it fails to consider the order of multiple word combinations, which may lead to inconsistent word combination order and consistent word combination similarity calculation results. For example, customer A: zhong rong qing and customer B: zhongqing rong are not actually the same person in China, but the edit distance algorithm may analyze customer A and customer B as the same person.

[0005] The longest common subsequence is the longest identical character sequence obtained by deleting zero or more characters from two given strings without changing the order of the remaining characters. The length of the longest common subsequence can be calculated by recursion or by dynamic programming. The similarity calculated by the longest common subsequence may have a slightly larger value deviation when the number of strings to be compared is more different.

[0006] Since the list name or address is not a comparison of a single string, any current method cannot accurately measure its similarity. In order to achieve matching accuracy and take into account the algorithm measurement time complexity, the present invention proposes a method for matching list names or addresses by combining edit distance and longest common subsequence. Summary of the invention

[0007] In view of this, the embodiments of the present invention provide a method, device, computer equipment and storage medium for calculating the similarity of a list, which realizes that for the name or address information to be screened, the similarity of each element in the name or address is first calculated by the edit distance to obtain the initial decision matching score, and the similarity that fails to meet the threshold requirement is filtered out; then, according to the dimension of the word combination, the similarity of the name or address is calculated by the longest common subsequence to obtain the final decision matching score and the list screening matching result. The present invention can accurately screen out the matching results by combining the advantages of the edit distance algorithm and the longest common subsequence algorithm through decision fusion; avoids the situation in which the customer name order change is not considered to be screened out by using a single edit distance algorithm, for example: "Zhong Rongqing" and "Zhong Qingrong" are screened out; and avoids the problem of the weight of the word string length similarity score being effectively reflected by using a single longest common subsequence algorithm. The embodiments of the present invention comprehensively consider the characteristics of the data to be screened and the list data, effectively reducing the complexity of the calculation time, while improving the accuracy of the list screening match.

[0008] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for calculating list similarity is provided, which is characterized by comprising:

[0009] Get the data to be screened and the list index;

[0010] Determining whether the data to be screened meets a predetermined rule;

[0011] If the data to be screened satisfies the predetermined rule, and a list word in the list index corresponding to the data to be screened is obtained, then, according to the data to be screened and the list word, the data to be screened and the processed list data are processed by using the edit distance calculation to obtain a first similarity and an adjusted edit distance error score;

[0012] If the first similarity is greater than a predetermined threshold, obtaining a second similarity using the longest common subsequence according to the processed data to be screened and the processed list words;

[0013] The final similarity is obtained by combining the adjusted edit distance error score and the second similarity.

[0014] Optionally, the predetermined rule includes whether the data to be screened can be returned by the Solr engine.

[0015] Optionally, when the hit score according to the Solr engine is greater than the ratio of the minimum number of hit words for screening to the data to be screened, the Solr engine returns the data to be screened.

[0016] Optionally, the minimum number of hit words for screening is obtained by multiplying the number of words in the data to be screened by a predetermined threshold and rounding down.

[0017] Optionally, the adjusted edit distance error score is the sum of the unmatched scores of each word in the data to be screened.

[0018] Optionally, the unmatched score is the sum of the edit distance reduction coefficient scores of the words of the unmatched degree between the data to be screened and the list data.

[0019] Optionally, the score of each word is 100 divided by the number of words in the list.

[0020] Optionally, the edit distance reduction coefficient is a natural number between 0 and 1, and the edit distance reduction coefficient is variable.

[0021] Optionally, the edit distance reduction coefficient is greater than 0.5.

[0022] According to a second aspect of an embodiment of the present invention, there is provided a device for calculating list similarity, comprising:

[0023] A candidate word acquisition module, the candidate word acquisition module is used to obtain the data to be screened and the list index, and determine whether the data to be screened meets the predetermined rules;

[0024] A first similarity calculation module, wherein the first similarity calculation module is used to obtain a list word in the list index corresponding to the data to be screened when the data to be screened meets the predetermined rule, and obtain a first similarity and an adjusted edit distance error score by using the edit distance to calculate the processed data to be screened and the processed list data according to the data to be screened and the list word;

[0025] A second similarity calculation module, wherein the second similarity calculation module is used to obtain a second similarity using a longest common subsequence according to the processed data to be screened and the processed list words when the first similarity is greater than a predetermined threshold;

[0026] A fusion module is used to combine the adjusted edit distance error score and the second similarity to obtain a final similarity.

[0027] Optionally, the predetermined rule includes whether the data to be screened can be returned by the Solr engine.

[0028] Optionally, when the hit score according to the Solr engine is greater than the ratio of the minimum number of hit words for screening to the data to be screened, the Solr engine returns the data to be screened.

[0029] Optionally, the minimum number of hit words for screening is obtained by multiplying the number of words in the data to be screened by a predetermined threshold and rounding down.

[0030] Optionally, the adjusted edit distance error score is the sum of the unmatched scores of each word in the data to be screened.

[0031] Optionally, the unmatched score is the sum of the edit distance reduction coefficient scores of the words of the unmatched degree between the data to be screened and the list data.

[0032] Optionally, the score of each word is 100 divided by the number of words in the list.

[0033] Optionally, the edit distance reduction coefficient is a natural number between 0 and 1, and the edit distance reduction coefficient is variable.

[0034] Optionally, the edit distance reduction coefficient is greater than 0.5.

[0035] According to a third aspect of an embodiment of the present invention, there is provided a computer device, including:

[0036] one or more processors;

[0037] a memory for storing one or more computer programs;

[0038] When the one or more computer programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.

[0039] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method provided in the first aspect of the embodiment of the present invention is implemented.

[0040] The embodiments of the above invention have the following advantages or beneficial effects: through decision fusion, the advantages of the edit distance algorithm and the longest common subsequence algorithm are combined to accurately screen out the matching results; avoid using a single edit distance algorithm, which fails to consider the situation where the order of the customer's name changes and is screened out, for example: "Zhong Rongqing" and "Zhong Qingrong" are screened out; and avoid using a single longest common subsequence algorithm, which fails to effectively reflect the word string length similarity score weight problem. The embodiment of the present invention comprehensively considers the characteristics of the data to be screened and the list data, effectively reduces the complexity of the calculation time, and improves the accuracy of the list screening match.

[0041] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0043] Figure 1 is a schematic diagram of main steps of a method for calculating list similarity according to an embodiment of the present invention;

[0044] Figure 2 4 is a schematic diagram of main modules of a device for calculating list similarity according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0046] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.

[0047] According to one aspect of an embodiment of the present invention, a method for calculating list similarity is provided.

[0048] Figure 1 4 is a schematic diagram of main steps of a method for calculating list similarity according to an embodiment of the present invention.

[0049] like Figure 1 As shown, a method for calculating list similarity in an embodiment of the present invention mainly includes the following steps:

[0050] S101: Obtaining data to be screened and list index;

[0051] S102: Determine whether the data to be screened meets a predetermined rule;

[0052] S103: if the data to be screened meets the predetermined rule, and a list word in the list index corresponding to the data to be screened is obtained, then, according to the data to be screened and the list word, the data to be screened and the processed list data are processed by using the edit distance calculation to obtain a first similarity and an adjusted edit distance error score;

[0053] S104: if the first similarity is greater than a predetermined threshold, obtaining a second similarity using the longest common subsequence according to the processed data to be screened and the processed list words;

[0054] S105: Combining the adjusted edit distance error score and the second similarity to obtain a final similarity.

[0055] Generally speaking, the smaller the edit distance between two strings, the more similar they are. If two strings are equal, their edit distance is 0.

[0056] When the strings are not equal, we usually start scanning from the beginning of the string. If strA[0] = StrB[0];, the edit distance is still 0, and we can directly remove the first character of the string. At this time, the edit distance between StrA and StrB is equal to the edit distance between StrA[1]..StrA[A.length-1] and StrA[1]..StrB[B.length-1]. If StrA[0]! = StrB[0];, we need to consider the following: whether StrA[0] is equal to StrB[1]. In this case, we only need to add one character. Whether StrB[0] is equal to StrA[1]. If StrA[1] is not equal to StrB[1]; in this case, we can scan from the back to the front.

[0057] The longest common subsequence algorithm is to delete zero or more characters from two given strings respectively, but do not change the order of the remaining characters to obtain the longest sequence of identical characters. The length of the longest common subsequence can be calculated by recursive method or dynamic programming. Follow the steps below to calculate the longest common subsequence similarity:

[0058] 1. Given two sequences X =<x1,x2,...,xm> ,Y<y1,y2,...,yn> , find the longest common subsequence of X and Y.

[0059] 2. Introduce a two-dimensional array c[][], use c[i][j] to record the length of the longest common subsequence of X[i] and Y[j], and b[i][j] to record the value of the subproblem through which c[i][j] is obtained, so as to determine the direction of the search.

[0060] 3. Using bottom-up recursive calculation, before calculating c[i,j], c[i-1][j-1], c[i-1][j] and c[i][j-1] have all been calculated. At this time, we can calculate c[i][j] based on whether X[i]=Y[j] or X[i]!=Y[j], and we can get the following formula:

[0061]

[0062] 4. Calculate similarity:

[0063] The time complexity of this algorithm is O(m+n) and the space complexity is O(m.log(n)).

[0064] Optionally, the predetermined rule includes whether the data to be screened can be returned by the Solr engine.

[0065] Optionally, when the hit score according to the Solr engine is greater than the ratio of the minimum number of hit words for screening to the data to be screened, the Solr engine returns the data to be screened.

[0066] Optionally, the minimum number of hit words for screening is obtained by multiplying the number of words in the data to be screened by a predetermined threshold and rounding down.

[0067] For example, when the preset threshold is 0.75, the Solr hit rule is as follows:

[0068] For example:

[0069] The word to be screened is searchName;

[0070] The list word in the corresponding list index is entityName;

[0071] The minimum number of hit words for screening is mm;

[0072] mm = the number of words in searchName * 0.75 and round down

[0073] Such as searchName=zhong rong qing,

[0074] Then mm=3*0.75, which is rounded down to 2 words. Therefore, 2 words must be hit in order to be returned.

[0075] For example, the calculation process of the Solr engine's hit score Score is as follows:

[0076] Score = matchSize / max (number of words in searchName, number of words in entityName)

[0077] Among them, matchSize is the number of hit words.

[0078] Solr allows an edit distance deviation when the word length is greater than 4 characters. For example, michael can match nichael because there is only one edit distance, which is the deviation between m and n.

[0079] For example, when the words to be screened are Michael Jackson Mathon James Smis, and the list words in the corresponding list index are Nichael Jackson James Mathes, Michael can match Nichael, but Mathon cannot match Mathes, so the number of hit words is 3.

[0080] Then, mm=5*0.75 is rounded down to 3, and the ratio of the minimum number of hit words to the data to be screened is 3 / 5*100=60 points. The number of hit words is 3, and the number of large words is 5, so Score=3 / 5*100=60 points, which meets the conditions, so the result will be returned from Solr.

[0081] In addition, Score fine-tuning = Score + 1-0.01 * the number of words in the fuzzy match

[0082] For example, zhong rong qing and zhang rong qing, the number of fuzzy matching words is 1, and 1 is added to make the Score not less than the score before fine-tuning. The purpose of fine-tuning is to make the entity score on the exact match higher and rank it in front of the hit results.

[0083] Optionally, the adjusted edit distance error score is the sum of the unmatched scores of each word in the data to be screened.

[0084] Optionally, the unmatched score is the sum of the edit distance reduction coefficient scores of the words of the unmatched degree between the data to be screened and the list data.

[0085] Optionally, the score of each word is 100 divided by the number of words in the list.

[0086] Optionally, the edit distance reduction coefficient is a natural number between 0 and 1, and the edit distance reduction coefficient is variable. Preferably, the edit distance reduction coefficient is greater than 0.5.

[0087] Optionally, the edit distance reduction coefficient is greater than 0.5.

[0088] In the above example, the words to be screened are michael jackson mathon james smis, and the corresponding list words in the list index are nichael jackson james mathes. First, replace the same words with #, as follows:

[0089] searchName=Michael#mathon#sims

[0090] entityName=nichael##mathes

[0091] Taking the list words as the benchmark, there are 4 words in total, so the score of each word is 100 / 4=25 points. Assuming the edit distance reduction factor r=0.8, Nichael matches the edit distance of Michael / LeBron / Sims respectively, and the best match is taken, that is, Michael. The matching degree between Nichael and Michael is 1 / 7=0.86>=the preset threshold of 0.66, so Nichael and Michael are considered to match, and the mismatch degree between Nichael and Michael is 1 / 7, so the mismatch score is 1 / 7*25*0.8=2.9.

[0092] After the above calculation, the words to be screened and the list word names in the corresponding list index are converted into:

[0093] searchName=#0#mathon#sims

[0094] entityName=#0##mathes

[0095] That is, replace the match between nichael and michael with #0.

[0096] Then, the remaining words are matched.

[0097] In the matching between mathes and mathon / sims, mathes has a higher matching degree with mathon. The editing matching degree of mathes and mathon is 4 / 6=0.67>=0.66, so mathes and mathon are considered to be matched. The unmatched score of mathes and mathon is (1-0.67)*25*0.8=6.7.

[0098] After the above calculation, the words to be screened and the list word names in the corresponding list index are converted into:

[0099] searchName=#0##1#sims

[0100] entityName=#0###1

[0101] That is, replace the match between mathes and mathon with #1.

[0102] After two comparisons, the adjusted edit distance error score is 2.9+6.7=9.6 points, so the final first similarity is 100-9.6=90.4 points. If the threshold is set to 75 points, the first similarity is greater than the threshold, and the next step can be performed.

[0103] According to the processed data to be screened and the processed list words, a second similarity is obtained by using the longest common subsequence.

[0104] searchName=#0##1#sims

[0105] entityName=#0###1

[0106] The longest common subsequence algorithm is used to calculate that the length of the longest common subsequence of searchName(#0##1#sims) and entityName(#0###1) is 3.

[0107] The second similarity is calculated according to the following formula: 100*(3 / 5)=60 points.

[0108]

[0109] Finally, the final similarity is obtained by combining the adjusted edit distance error score and the second similarity according to the following formula, that is, 60-9.6=50.4 points.

[0110] Score final =Score LCS -Score deduction:LD

[0111] The above descriptions are merely examples of the embodiments of the present invention, and the present invention is not limited to the methods described in the above embodiments.

[0112] According to a second aspect of an embodiment of the present invention, a device for calculating list similarity is provided.

[0113] Figure 2 4 is a schematic diagram of main modules of a device for calculating list similarity according to an embodiment of the present invention.

[0114] like Figure 2 As shown, a device 200 for calculating list similarity according to an embodiment of the present invention mainly includes the following modules:

[0115] A candidate word acquisition module 201, which is used to acquire the data to be screened and the list index, and determine whether the data to be screened meets the predetermined rules;

[0116] A first similarity calculation module 202, the first similarity calculation module is used to obtain the list words in the list index corresponding to the data to be screened when the data to be screened meets the predetermined rule, and obtain a first similarity and an adjusted edit distance error score by using the edit distance calculation of the processed data to be screened and the processed list data according to the data to be screened and the list words;

[0117] A second similarity calculation module 203, the second similarity calculation module is used to obtain a second similarity using the longest common subsequence according to the processed data to be screened and the processed list words when the first similarity is greater than a predetermined threshold;

[0118] A fusion module 204 is used to combine the adjusted edit distance error score and the second similarity to obtain a final similarity.

[0119] Optionally, the predetermined rule includes whether the data to be screened can be returned by the Solr engine.

[0120] Optionally, when the hit score according to the Solr engine is greater than the ratio of the minimum number of hit words for screening to the data to be screened, the Solr engine returns the data to be screened.

[0121] Optionally, the minimum number of hit words for screening is obtained by multiplying the number of words in the data to be screened by a predetermined threshold and rounding down.

[0122] Optionally, the adjusted edit distance error score is the sum of the unmatched scores of each word in the data to be screened.

[0123] Optionally, the unmatched score is the sum of the edit distance reduction coefficient scores of the words of the unmatched degree between the data to be screened and the list data.

[0124] Optionally, the score of each word is 100 divided by the number of words in the list.

[0125] Optionally, the edit distance reduction coefficient is a natural number between 0 and 1, and the edit distance reduction coefficient is variable.

[0126] Optionally, the generally taken edit distance reduction coefficient is greater than 0.5.

[0127] According to a third aspect of an embodiment of the present invention, a computer device is provided, wherein the computer device comprises:

[0128] one or more processors;

[0129] a memory for storing one or more computer programs;

[0130] When the one or more computer programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.

[0131] When the program is executed by the processor, the following steps are performed:

[0132] Get the data to be screened and the list index;

[0133] Determining whether the data to be screened meets a predetermined rule;

[0134] If the data to be screened satisfies the predetermined rule, and a list word in the list index corresponding to the data to be screened is obtained, then, according to the data to be screened and the list word, the data to be screened and the processed list data are processed by using the edit distance calculation to obtain a first similarity and an adjusted edit distance error score;

[0135] If the first similarity is greater than a predetermined threshold, obtaining a second similarity using the longest common subsequence according to the processed data to be screened and the processed list words;

[0136] The final similarity is obtained by combining the adjusted edit distance error score and the second similarity.

[0137] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0138] When the program is executed by the processor, the following steps are performed:

[0139] Get the data to be screened and the list index;

[0140] Determining whether the data to be screened meets a predetermined rule;

[0141] If the data to be screened satisfies the predetermined rule, and a list word in the list index corresponding to the data to be screened is obtained, then, according to the data to be screened and the list word, the data to be screened and the processed list data are processed by using the edit distance calculation to obtain a first similarity and an adjusted edit distance error score;

[0142] If the first similarity is greater than a predetermined threshold, obtaining a second similarity using the longest common subsequence according to the processed data to be screened and the processed list words;

[0143] The final similarity score is obtained by combining the adjusted edit distance error score and the second similarity score.

[0144] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a program code for executing the method shown in the flowchart.

[0145] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0146] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0147] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for calculating list similarity, characterized in that: The method comprises: Get the data to be screened and the list index; Determine whether the data to be screened meets a predetermined rule; the predetermined rule includes whether the data to be screened can be returned by the Solr engine; fine-tune the hit score according to the Solr engine, and when the hit score after fine-tuning is greater than the ratio of the minimum number of hit words for screening to the data to be screened, the Solr engine returns the data to be screened; the minimum number of hit words for screening is the number of words in the data to be screened multiplied by a predetermined threshold and rounded down; If the data to be screened satisfies the predetermined rule, and a list word in the list index corresponding to the data to be screened is obtained, then, according to the data to be screened and the list word, the data to be screened and the processed list data are processed by using the edit distance calculation to obtain a first similarity and an adjusted edit distance error score; If the first similarity is greater than a predetermined threshold, obtaining a second similarity using the longest common subsequence according to the processed data to be screened and the processed list words; The final similarity is obtained by combining the adjusted edit distance error score and the second similarity.

2. The method according to claim 1, characterized in that Further including: The adjusted edit distance error score is the sum of the unmatched scores of each word in the data to be screened.

3. The method according to claim 2, characterized in that Further including: The unmatched score is the sum of the edit distance reduction coefficient scores of the words of the unmatched degree between the to-be-screened data and the list data.

4. The method according to claim 3, characterized in that Further including: The score of each word is 100 divided by the number of words in the list.

5. The method according to claim 3, characterized in that: Further including: The edit distance reduction coefficient is a natural number between 0 and 1, and the edit distance reduction coefficient can be changed.

6. The method according to claim 5, characterized in that Further including: The edit distance reduction coefficient is greater than 0.

5.

7. A device for calculating list similarity, characterized in that: The device comprises: A candidate word acquisition module, the candidate word acquisition module is used to obtain the data to be screened and the list index, and determine whether the data to be screened meets the predetermined rules; the predetermined rules include whether the data to be screened can be returned by the Solr engine; the hit score according to the Solr engine is fine-tuned, and when the fine-tuned hit score is greater than the ratio of the minimum number of hit words for screening to the data to be screened, the Solr engine returns the data to be screened; the minimum number of hit words for screening is the number of words in the data to be screened multiplied by a predetermined threshold and rounded down; A first similarity calculation module, wherein the first similarity calculation module is used to obtain a list word in the list index corresponding to the data to be screened when the data to be screened meets the predetermined rule, and obtain a first similarity and an adjusted edit distance error score by using the edit distance to calculate the processed data to be screened and the processed list data according to the data to be screened and the list word; A second similarity calculation module, wherein the second similarity calculation module is used to obtain a second similarity using a longest common subsequence according to the processed data to be screened and the processed list words when the first similarity is greater than a predetermined threshold; A fusion module is used to combine the adjusted edit distance error score and the second similarity to obtain a final similarity.

8. The device according to claim 7, characterized in that Further including: The adjusted edit distance error score is the sum of the unmatched scores of each word in the data to be screened.

9. The device according to claim 8, characterized in that Further including: The unmatched score is the sum of the edit distance reduction coefficient scores of the words of the unmatched degree between the to-be-screened data and the list data.

10. The device according to claim 9, characterized in that Further including: The score of each word is 100 divided by the number of words in the list.

11. The device according to claim 9, characterized in that Further including: The edit distance reduction coefficient is a natural number between 0 and 1, and the edit distance reduction coefficient can be changed.

12. The device according to claim 11, characterized in that Further including: The edit distance reduction coefficient is greater than 0.

5.

13. A computer device, characterized in that: The computer device comprises: one or more processors; a memory for storing one or more computer programs; When the one or more computer programs are executed by the one or more processors, the one or more processors are caused to implement the method according to any one of claims 1 to 6.

14. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Approximate video retrieval method based on improvement of editing distance

    CN105678244A

  • List screening method and device

    CN112579646A