Merchant name confirmation method and device, electronic equipment and program
By performing word segmentation processing and database matching of signature information, the accuracy of merchant name matching in online shopping is solved, which improves confirmation efficiency and accuracy and reduces costs.
Patent Information
- Application Number
- CN202411511150.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
AI Technical Summary
During online shopping, it is difficult to accurately match and display the correct business name, resulting in extremely low accuracy and a waste of labor and time costs.
By performing word segmentation processing on the signature information sent by the merchant to the user, multiple words are generated, and target labels and merchant names corresponding to each word are determined based on the preset database. Through forward and reverse matching operations, multiple words are obtained from Select the target merchant name from the merchant name.
It improves the efficiency and accuracy of merchant names, reduces the need for manual processing, and reduces costs.
Smart Images

Figure CN119477459A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and more particularly to a merchant name confirmation method, device, electronic device, and program. Background Art
[0002] With the rapid development of computer technology, online shopping has become a mainstream shopping method. During the shopping process, the merchant usually sends a text message or other reminder information to the user to inform the user of the current progress or situation.
[0003] The service provider platform has multiple different merchant terminals, and there is a possibility that different merchant terminals sell the same item, or the same merchant terminal is stationed in different service provider platforms. In this way, it is difficult to accurately match and display the correct merchant name when sending reminder information to the user terminal.
[0004] At present, the processing is assisted by manual and word segmentation fuzzy query, but the accuracy is extremely low and a lot of manpower and time costs are wasted. Summary of the invention
[0005] In view of the above technical problems, the embodiments of this specification provide a merchant name confirmation method, device, electronic device and program, which can improve the efficiency and accuracy of merchant name confirmation.
[0006] The embodiment of this specification provides a method for confirming a merchant name, including:
[0007] Get the signature information sent by the merchant to the user;
[0008] Performing word segmentation processing on the signature information to generate multiple words;
[0009] Based on a preset database, determining a target tag corresponding to each of the words, and a merchant name corresponding to each of the target tags;
[0010] According to the merchant names corresponding to the target tags, the number of tags and the number of numbers corresponding to the merchant names are selected from the preset database;
[0011] A target merchant name is selected from the plurality of merchant names according to the number of labels, the number of numbers and the category information of each merchant name, as well as each word and the target label corresponding to the word.
[0012] Optionally, the plurality of words have different parts of speech; the preset database includes a tag library and a merchant library;
[0013] The determining, based on a preset database, a target tag corresponding to each of the words and a merchant name corresponding to each of the target tags includes:
[0014] Combine words with different parts of speech to obtain multiple combined words;
[0015] Determine the score of each word and the score of each word combination respectively, and take the words and / or word combinations with scores greater than the set scores as target words;
[0016] Selecting a target tag matching the target word from the tag library;
[0017] According to the target tag, a merchant name corresponding to the target tag is selected from the merchant database by performing keyword matching and similarity calculation.
[0018] Optionally, the scores of each word and each combined word are determined separately in the following manner:
[0019] Score1=a1*math.sin(x / b1-b2)+a2*math.exp(-x / b3)+a3*math.log(x+c1)+a4
[0020] Among them, Score1 represents the score, x represents the length of the word or the combination of words, a1 represents the first weight coefficient, a2 represents the second weight coefficient, b1 represents the period scaling parameter, b2 represents the phase shift parameter, b3 represents the attenuation rate parameter, b4 represents the reference offset, and c1 represents the displacement parameter.
[0021] Optionally, selecting a target tag matching the target word from the tag library includes:
[0022] Using a search algorithm, select a tag containing the target word from the preset database;
[0023] Using an edit distance algorithm, respectively calculating a first similarity score between each target word and a label corresponding to the target word;
[0024] The tag corresponding to the first similarity with the highest value is used as the target tag.
[0025] Optionally, selecting a target merchant name from the plurality of merchant names according to the number of labels, the number of numbers and the category information of each merchant name, and each word and the target label corresponding to the word, includes:
[0026] Determine a first score according to the category information of each of the merchant names, the number of labels and the number of numbers corresponding to each merchant name;
[0027] Determining a second similarity score according to each merchant name and a target tag corresponding to the merchant name;
[0028] Determining a third similarity score according to each of the words and the target tag corresponding to the word;
[0029] Determining a comprehensive score for each merchant name according to the first score, the second similarity score, and the third similarity score;
[0030] The merchant name corresponding to the comprehensive score with the highest value is used as the merchant name.
[0031] Optionally, the first score is determined in the following manner:
[0032] Score2=(w1*shop_logo+w2*(shop_mark**a5)+w3*(shop_tel**a6)+w4*shop_key)*((b4+shop_mes)**(b5*shop_mes_i)); (2)
[0033] The comprehensive score for each merchant name is determined in the following manner:
[0034] Score=Score2 / ((d1+epsilon)-(shop_df**d2)*d3); (3)
[0035] Among them, shop_logo represents the logo of the trademark in the merchant name category information, shop_mark represents the number of tags corresponding to the merchant name, shop_tel represents the number of telephone numbers associated with the merchant name, shop_key represents the evaluation based on the degree of association between the merchant and the keyword, shop_mes represents the second similarity score (that is, the similarity score between the merchant name and the keyword), shop_mes_i represents the exponential adjustment coefficient of the similarity score, shop_df represents the third similarity score, w1 represents the first weight coefficient of the merchant logo, w2 represents the second weight coefficient of the number of tags, w3 represents the third weight coefficient of the number of numbers, w4 represents the fourth weight coefficient of the merchant key indicator, a5 represents the exponential coefficient of the number of tags corresponding to the merchant name, a6 represents the exponential coefficient of the number of telephone numbers associated with the merchant name, b4 represents the similarity benchmark offset, b5 represents the similarity index weight, d1 represents the benchmark value, d2 represents the similarity index parameter, d3 represents the scaling factor, and epsilon represents the minimum value.
[0036] Optionally, before selecting a target merchant name from a plurality of merchant names according to the number of labels, the number of numbers and the category information of each merchant name, and each of the words and the target label corresponding to the word, the method further includes:
[0037] According to the number of labels and numbers of each merchant name, the usage frequency score of each merchant name is determined, and merchant names with the usage frequency score lower than the set usage frequency score are filtered.
[0038] Optionally, the frequency of use score is determined in the following manner:
[0039] Score3=shop_mark*e1+shop_tel*e2+q1;
[0040] Among them, shop_mark represents the number of labels corresponding to the merchant name, shop_tel represents the number of numbers corresponding to the merchant name, e1 represents the label weight coefficient, e2 represents the telephone number weight coefficient, and q1 represents the bias term.
[0041] Optionally, the merchant name confirmation method further includes:
[0042] The target merchant name is displayed in the signature information sent to the user terminal.
[0043] The embodiment of this specification also provides a merchant name confirmation device, including:
[0044] A data acquisition unit, adapted to acquire signature information sent by the merchant terminal to the user terminal;
[0045] A word segmentation unit, performing word segmentation processing on the signature information to generate multiple words;
[0046] The processing unit is adapted to determine, based on a preset database, a target tag corresponding to each of the words and a merchant name corresponding to each of the target tags; and, according to the merchant name corresponding to each of the target tags, select the number of tags and the number of numbers corresponding to each of the merchant names from the preset database; and, according to the number of tags, the number of numbers and category information of each of the merchant names, as well as each of the words and the target tag corresponding to the word, select a target merchant name from a plurality of merchant names.
[0047] An embodiment of the present specification also provides an electronic device, comprising: at least one processor and at least one memory, wherein the memory stores one or more computer executable instructions, and the processor calls the one or more computer executable instructions to execute the merchant name confirmation method as described in any of the above items.
[0048] The embodiments of the present specification also provide a computer program product, including computer instructions, which, when executed by a processor, implement any of the aforementioned merchant name confirmation methods.
[0049] By adopting the merchant name confirmation method provided in the embodiment of this specification, multiple words can be generated by segmenting the signature information sent by the merchant end to the user end, and then based on the preset database, the target tag corresponding to each word and the merchant name corresponding to each target tag can be determined as the candidate merchant name; through the reverse matching operation, the number of tags and the number of numbers corresponding to each merchant name can be selected from the preset database, thereby reflecting the importance and frequency of use of each merchant name in the preset database, and then according to the number of tags, the number of numbers and the category information of each merchant name, as well as each word and the target tag corresponding to the word, the target merchant name is selected from multiple merchant names. By adopting the merchant name confirmation method in the above example, the target merchant name that matches the signature information can be selected from the preset database through forward matching and reverse matching operations, without manual processing, thereby improving the efficiency and accuracy of merchant name confirmation. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0051] Figure 1 A flowchart of a merchant name confirmation method in an embodiment of this specification is shown;
[0052] Figure 2 A flowchart showing a method for obtaining a merchant name in an embodiment of this specification;
[0053] Figure 3 A schematic diagram of the structure of a merchant name confirmation device in an embodiment of this specification is shown. DETAILED DESCRIPTION
[0054] As described in the background technology, the accuracy of assisting processing by means of manual and word segmentation fuzzy query is extremely low, and a lot of manpower and time costs are wasted. This is because: on the one hand, manual labels are matched with merchants, which easily leads to the generation of similar merchants; on the other hand, there is a lot of data in the query database, the processing speed is very slow, and the word segmentation fuzzy query method has low accuracy.
[0055] In order to solve the above technical problems, the embodiment of this specification provides a merchant name confirmation method, which can generate multiple words by segmenting the signature information sent by the merchant end to the user end, and then based on the preset database, it can determine the target tag corresponding to each word and the merchant name corresponding to each target tag as an alternative merchant name; through the reverse matching operation, the number of tags and the number of numbers corresponding to each merchant name can be selected from the preset database, thereby reflecting the importance and frequency of use of each merchant name in the preset database, and then according to the number of tags, the number of numbers and the category information of each merchant name, as well as each word and the target tag corresponding to the word, the target merchant name is selected from multiple merchant names. Using the merchant name confirmation method in the above example, through forward matching and reverse matching operations, the target merchant name that matches the signature information can be selected from the preset database without manual processing, thereby improving the efficiency and accuracy of merchant name confirmation.
[0056] In order to enable those skilled in the art to better understand the inventive concept, working principle and advantages of the embodiments of this specification, the merchant name confirmation scheme in the embodiments of this specification is described in detail below.
[0057] See also Figure 1 Flow chart of a merchant name confirmation method in an embodiment of this specification shown in FIG. Figure 1 As shown, the following steps can be performed:
[0058] S11, obtaining the signature information sent by the merchant end to the user end.
[0059] Among them, the merchant side refers to the merchant or seller who sells goods or services, and the merchant side can be a physical store, an online store or an e-commerce platform.
[0060] The user end refers to the consumer or customer who purchases goods or services. The user end can be an individual consumer, or a business or organization.
[0061] In a specific implementation, signature information refers to information sent by the merchant to the user, which contains characteristic information for permanently identifying the merchant, such as the merchant's name, representation or other relevant information, and may include information about the flow of goods during the shopping process, etc. By obtaining the signature information sent by the merchant to the user, the client's information can be determined.
[0062] S12, performing word segmentation processing on the signature information to generate multiple words.
[0063] In a specific implementation, the signature information may be a string of relatively messy codes, or some data that cannot meet the processing requirements. Therefore, the signature information may be segmented to obtain multiple words for representing the signature information from different angles.
[0064] In some embodiments, the signature information may be formatted before being segmented.
[0065] For example, when it is determined that there are brackets in the signature information, the brackets and the information in the brackets are removed; for another example, the part that does not comply with the pre-configured rules is removed.
[0066] In this embodiment, the non-conforming part may refer to "special symbols, spaces, full-width symbols, traditional Chinese characters and numbers in the signature information, as well as irrelevant information that may interfere with the word segmentation or matching process, such as advertising slogans, common modal particles, and even coded or abnormal characters, etc."
[0067] In some embodiments, multiple word segmentation methods may be used to perform word segmentation processing on the signature information.
[0068] In a specific implementation example, at least one of HanLP, THULAC, LTP, NLPIR, and Transformer may be used to perform word segmentation processing on the signature information.
[0069] In some other embodiments, the signature information may also be segmented by natural language processing, information retrieval, and machine translation.
[0070] S13, based on a preset database, determining a target tag corresponding to each of the words, and a merchant name corresponding to each of the target tags.
[0071] In a specific implementation, the preset database contains a variety of annotation information, which can be regarded as a label table for merchants. When multiple words are generated through word segmentation, the target label corresponding to each word can be selected from the preset database. The target label can be regarded as the data in the preset database that is closest to the word and can best express the word (i.e., the highest matching degree). Based on the target label, the corresponding merchant name can be selected from the preset database as the candidate merchant name.
[0072] In short, a target tag can correspond to at least one business name.
[0073] In a specific implementation, the preset database may be located in a local server or in a cloud server, and the embodiments of this specification do not impose any restrictions on the location of the preset database.
[0074] As an optional example, the preset database may be one or more of a distributed database, a data warehouse, a JavaScript Object Notation (JSON) database, and the like.
[0075] S14, according to the merchant names corresponding to the target tags, selecting the number of tags and the number of numbers corresponding to the merchant names from the preset database.
[0076] In a specific implementation, a merchant name may correspond to multiple tags in a preset database. By adopting steps S11 to S13, the merchant name corresponding to the target tag is determined. By performing a reverse matching operation, the number of tags and numbers corresponding to each merchant name can be selected from the preset database again. These number of tags and number can represent the importance and frequency of use of this merchant name in the preset database.
[0077] For example, the greater the number of tags and numbers, the higher the probability that the merchant name is the merchant name corresponding to the signature information.
[0078] S15, selecting a target merchant name from the plurality of merchant names according to the number of labels, the number of numbers and the category information of each merchant name, as well as each word and the target label corresponding to the word.
[0079] Specifically, by using steps S11 to S14, multiple merchant names can be obtained, and then based on the number of labels, number number and category information of each merchant name, as well as each word and the target label corresponding to the word, a preset calculation method can be used to select at least one merchant name as the target merchant name of the signature information.
[0080] Therefore, by adopting the merchant name confirmation method in the above example, through forward matching and reverse matching operations, the target merchant name that matches the signature information can be selected from the preset database without manual processing, thereby improving the merchant name confirmation efficiency and accuracy.
[0081] In order to enable those skilled in the art to better understand and implement the embodiments of this specification, the following is a detailed description with reference to the accompanying drawings and through specific examples.
[0082] In a specific implementation, after the signature information is segmented and multiple words are obtained, the part of speech of each word can be determined, that is, multiple words have different parts of speech (such as verbs, nouns, and adjectives, etc.), and then the multiple words can be grouped according to the part of speech (such as verb groups, noun groups, and adjective groups, etc.).
[0083] In a specific implementation, the preset database may include a label library and a merchant library, wherein there is a corresponding relationship between the label library and the merchant library, for example, one label library corresponds to one or more merchant libraries; for example, multiple merchant libraries correspond to one label library, etc. The embodiments of this specification do not limit the corresponding relationship between the label library and the merchant library.
[0084] In this case, see Figure 2 A flowchart of a method for obtaining a merchant name in an embodiment of this specification is shown in FIG. Figure 2 As shown, the following steps can be performed:
[0085] S21, combining words with different parts of speech to obtain a plurality of combined words.
[0086] In a specific implementation, after word segmentation, the words can be grouped according to their parts of speech, and then the words with different parts of speech can be combined respectively, so that more combined words for determining subsequent merchant names can be obtained based on the original acquired signature information.
[0087] In some embodiments, when performing the combination operation, each combined word may include at least one noun, so that all possible combinations of business names can be included.
[0088] In some embodiments, in order to expand the combined words, words with the same part of speech can also be combined. This specification does not specifically limit the combination of words.
[0089] S22, respectively determining the score of each word and the score of each combined word, and taking the words and / or combined words with scores greater than the set scores as target words.
[0090] In a specific implementation, both words and word combinations are obtained based on the original signature information, and the confidence levels of different words and / or word combinations are not exactly the same. This is because: when performing word segmentation or combination, there are some words or word combinations that will not be used as the final target merchant names (or the possibility of being used as the target merchant names is very low), so these words or word combinations can be filtered out in advance.
[0091] For example, words or word combinations that are too long or too short do not comply with regulations and need to be filtered out.
[0092] Based on this, the scores of each word and each combined word can be determined respectively, so that words and / or combined words with scores less than the set scores can be filtered out, and the remaining words and / or combined words can be used as target words.
[0093] In this way, by determining the score of each word and the score of each combined word, words and / or combined words with scores less than the set score can be filtered out as target words, reducing the amount of data to be processed subsequently and improving computing efficiency.
[0094] In some embodiments of this specification, the following methods may be used to determine the scores of each word and each combined word:
[0095] Score1=a1*math.sin(x / b1-b2)+a2*math.exp(-x / b3)+a3*math.log(x+c1)+a4(1)
[0096] Among them, Score1 represents the score, x represents the length of the word or the combination of words, a1 represents the first weight coefficient, a2 represents the second weight coefficient, a3 represents the third weight coefficient, a4 represents the reference offset, b1 represents the period scaling parameter, b2 represents the phase shift parameter, b3 represents the attenuation rate parameter, and c1 represents the displacement parameter.
[0097] The meaning of formula (1) is:
[0098] Sine function part (a1*math.sin(x / b1-b2)): Utilize the periodicity of the sine function to give higher scores to words of a certain length.
[0099] For example, if you want words with a length of 5 to get a higher score, you can adjust b1 and b2 so that the sine function reaches a peak at x=5.
[0100] Exponential decay function part (a2*math.exp(-x / b3)): exponentially decays the length of words to prevent long words from being scored too high and highlight the impact of short words.
[0101] Logarithmic function part (a3*math.log(x+c1)): Smooth the score as the length of the word increases to avoid the score being overly dependent on the length of the word.
[0102] Benchmark offset (a4): adjusts the final score to be within the expected range for ease of subsequent processing.
[0103] a1 (weight coefficient of the sine function): controls the influence of the sine function part in the overall score. Adjust the amplitude of the sine function so that it gives higher weight to words of a certain length. By analyzing historical data, a1 is set so that the sine function achieves the ideal scoring effect at the expected word length.
[0104] b1 (sine function period scaling parameter): Adjusts the period of the sine function, affecting the frequency of the function's fluctuations. By scaling the value of x, the period of the sine function is changed so that it fluctuates within a specific range of word lengths. Depending on the range of word lengths you wish to emphasize, set b1 to match those lengths.
[0105] b2 (phase shift parameter of the sine function): Shift the phase of the sine function to adjust the position of the peaks and troughs. By shifting the function, the score reaches a peak at a specific word length. Through experiments, b2 is determined so that the function reaches the highest score at the target word length.
[0106] a2 (weight coefficient of the exponential decay function): controls the influence of the exponential decay function part in the overall score. It decays longer words to prevent them from scoring too high. Set the value of a2 to appropriately reduce the score of long words, and adjust it according to the assessment of the importance of long words.
[0107] b3 (exponential decay function decay rate parameter): adjusts the decay speed of the exponential function. It controls how fast the exponential function value decreases as the length of the word increases. Set the value of b3 according to the degree of suppression you want to have on long words.
[0108] a3 (weight coefficient of logarithmic function): controls the influence of logarithmic function in the overall score. Smooths the effect of word length on the score to prevent the score from growing too fast with the length. Adjust the value of a3 according to the expected effect of word length on the score.
[0109] c1 (shift parameter of the logarithmic function): prevents the logarithmic function from making a mathematical error when x=0 (because log(0) is undefined). By adding an offset c1 to x, the input value of the logarithmic function is always positive.
[0110] a4 (baseline offset of scoring): adjust the base value of the overall scoring to make the final scoring result within a reasonable range for easy comparison and sorting.
[0111] By determining the score of a word or word combination based on the length of the word or word combination, it is more in line with reality because shorter or longer words or word combinations will not be used as target business names.
[0112] S23, selecting a target tag matching the target word from the tag library.
[0113] In a specific implementation, through step S22, a part of words or word combinations can be filtered, so that only target tags matching the remaining target words can be obtained.
[0114] In the actual matching process, a target word may have multiple similar tags in the tag library, and the meanings expressed by these similar tags may be completely different from or very different from the target word, so it is necessary to determine the exact target tag.
[0115] In some embodiments, the process of acquiring the target tag may include:
[0116] A1) Using a search algorithm, select tags containing the target words from a preset database.
[0117] Specifically, if the target tag is associated with the target word, the target tag at least contains the target word, and the tag containing the target word can be quickly selected from the preset database through the search algorithm.
[0118] In an optional example, a DFA algorithm may be used to select tags containing target words from a preset database.
[0119] In some other embodiments, any one of Trie tree (prefix tree), BM (Boyer-Moore) algorithm, KMP (Knuth-Morris-Pratt) algorithm, SimHash and local sensitive hashing (LSH) algorithm, Word2Vec and GloVe can be used to select a tag containing the target word from a preset database. A2) Using the edit distance algorithm, the first similarity score between each target word and the tag corresponding to the target word is calculated respectively.
[0120] A3) taking the tag corresponding to the first similarity with the highest value as the target tag.
[0121] S24, selecting a merchant name corresponding to the target tag from the merchant database by performing keyword matching according to the target tag.
[0122] Specifically, after confirming the target tag, the merchant name most relevant to the target tag can be retrieved in the merchant database through keyword matching, and then the actual merchant name is determined based on the number of tags corresponding to the merchant (indicating the number of times the merchant is marked in the database or the number of associated tags).
[0123] 1) Search method: In the merchant database, through keyword matching and similarity calculation, search for the merchant most relevant to the word obtained by word segmentation. Using the above method, through forward matching, the merchant name corresponding to each target tag can be determined. In order to determine which specific merchant name is the final target merchant name, a reverse matching operation can be performed to select the total number of tags and numbers corresponding to the merchant name from the preset database. In this way, the most likely merchant name can be determined.
[0124] More specifically, a first score is determined based on the category information of each of the merchant names, the number of tags and the number of numbers corresponding to each merchant name; a second similarity score is determined based on each merchant name and the target tag corresponding to the merchant name; a third similarity score is determined based on each of the words and the target tag corresponding to the word; a comprehensive score of each merchant name is determined based on the first score, the second similarity score and the third similarity score; and the merchant name corresponding to the comprehensive score with the highest value is used as the target merchant name.
[0125] In other words, based on the matching degree between the label and the signature information, and the matching degree between the label and the merchant name, the target merchant name can be determined.
[0126] In a specific example, the first score may be determined in the following manner:
[0127] Score2=(w1*shop_logo+w2*(shop_mark**a5)+w3*(shop_tel**a6)+w4*shop_key)*((b4+shop_mes)**(b5*shop_mes_i))(2)
[0128] Among them, shop_logo represents the trademark logo in the merchant name category information, shop_mark represents the number of labels corresponding to the merchant name, shop_tel represents the number of telephone numbers associated with the merchant name, shop_key represents the evaluation based on the degree of association between the merchant and the keyword, shop_mes represents the second similarity score (that is, the similarity score between the merchant name and the keyword), shop_mes_i represents the exponential adjustment coefficient of the similarity score, shop_df represents the third similarity score, w1 represents the first weight coefficient of the merchant logo, w2 represents the second weight coefficient of the number of labels, w3 represents the third weight coefficient of the number of numbers, w4 represents the fourth weight coefficient of the merchant key indicator, a5 represents the exponential coefficient of the number of labels corresponding to the merchant name, a6 represents the exponential coefficient of the number of telephone numbers associated with the merchant name, b4 represents the similarity baseline offset, and b5 represents the similarity index weight.
[0129] The following is an explanation of formula (2):
[0130] w1: Importance weight of the merchant logo (shop_logo).
[0131] w2: Importance weight of the number of labels (shop_mark).
[0132] w3: Importance weight of the number of numbers (shop_tel).
[0133] w4: weight of the merchant's key indicator (shop_key).
[0134] a5, a6 (exponential parameters): control the nonlinear impact of shop_mark and shop_tel on the score and adjust their sensitivity, where a5 is the exponential coefficient for the number of labels and a6 is the exponential coefficient for the number of numbers.
[0135] shop_logo: An indicator of whether the merchant has a logo (such as a trademark or LOGO), which indicates the merchant's credibility or popularity.
[0136] shop_mark: The number of tags associated with a merchant, indicating the merchant's degree of association in the system or the frequency of being marked.
[0137] shop_tel: The number of phone numbers associated with a merchant, indicating the richness of the merchant's contact information and the scale of its business.
[0138] shop_key: Evaluation based on the association between the merchant and the keyword.
[0139] In some optional solutions, there may be some merchant names that are not recorded in the preset database. In this case, the confirmation formula of the first score may be improved to further improve the accuracy of merchant name confirmation.
[0140] For example, optimize shop_mes: np.dot(vec1, vec2) / (np.linalg.norm(vec1)*np.linalg.norm(vec2)), where vec1 is the vector representation of the merchant name and vec2 is the vector representation of the keyword.
[0141] In a specific example, the comprehensive score of each merchant name may be determined in the following manner:
[0142] Score=Score2 / ((d1+epsilon)-(shop_df**d2)*d3);
[0143] Among them, shop_df represents the third similarity score, d1 represents the reference value, d2 represents the similarity index parameter, d3 represents the scaling factor, and epsilon represents the minimum value.
[0144] The instructions are as follows:
[0145] d1 (base value): provides a base value to ensure that the denominator is not zero or negative.
[0146] Epsilon (minimum value): Prevents the denominator from being zero and avoids division by zero errors.
[0147] shop_df (similarity score between the merchant name and the matching words): calculated by the edit distance or other similarity algorithms, reflecting the matching degree between the merchant name and the keyword.
[0148] d2 (similarity index parameter): an index parameter that performs an exponential transformation on shop_df to enhance the sensitivity to high similarity values.
[0149] d3 (scaling parameter): The coefficient by which shop_df is multiplied to control its weight in the denominator.
[0150] In this way, the value range of shop_df, such as the maximum value, minimum value, and average value, can be determined.
[0151] And from the above formula, it can be seen that the higher the third similarity score is, the greater the correlation between the word and the target tag is. The larger the comprehensive score of the corresponding merchant name is, the greater the correlation between the word and the merchant name is, so the merchant name can be used as the target merchant name.
[0152] In actual application, the inventors further discovered that there may be some merchant names that do not exist in the preset database, or there may be merchant names in the preset database but the merchant names are used less frequently and are less likely to be used as merchant names in signature information.
[0153] Based on this, in the merchant name confirmation method in the embodiment of this specification, before selecting the target merchant name from multiple merchant names based on the number of labels, number of numbers and category information of each merchant name, as well as each of the words and the target labels corresponding to the words, it also includes: determining the usage frequency score of each merchant name based on the number of labels and number of numbers of each merchant name, and filtering the merchant names whose usage frequency scores are lower than the set usage frequency scores.
[0154] By filtering the merchant names whose usage frequency scores are lower than the set usage frequency scores, merchant names with higher probability can be obtained, which can further improve the merchant name confirmation efficiency.
[0155] In some embodiments, the usage frequency score may be determined in the following manner:
[0156] Score3=shop_mark*e1+shop_tel*e2+q1;
[0157] Among them, shop_mark represents the number of labels corresponding to the merchant name, shop_tel represents the number of numbers corresponding to the merchant name, e1 represents the label weight coefficient, e2 represents the telephone number weight coefficient, and q1 represents the bias term.
[0158] The instructions are as follows:
[0159] shop_mark: The number of tags associated with a merchant, indicating the frequency with which the merchant is marked or associated in the system, reflecting the merchant's activity or level of attention on the platform.
[0160] shop_tel: The number of phone numbers associated with a merchant, indicating the number of contact methods provided by the merchant, reflecting the business scale or service scope of the merchant.
[0161] e1 (label weight coefficient): the contribution of each label to the merchant's importance score. Statistics show that the number of labels of a merchant has a certain positive correlation with its importance, but the growth rate is gradually slowing down, so a smaller coefficient is selected (as a non-limiting example, e1 can be equal to 0.1) to avoid too much impact on the score caused by too many labels.
[0162] e2 (phone number weight coefficient): It is found that the number of phone numbers has less impact on the importance of merchants than the label (as a non-limiting example, e2 can be equal to 0.05), which is smaller than the weight coefficient of the label.
[0163] q1 (baseline value or bias term): prevents new or small merchants from being completely ignored due to the small number of tags and phone numbers, and gives them a certain base score (as a non-limiting example, q1 can be equal to 5) to encourage diversity and fairness.
[0164] It should be noted that the values of e1, e2 and q1 in the above examples are only examples. As the data in the preset database increases, the values of e1, e2 and q1 may change.
[0165] It should also be noted that in actual application, merchants with high usage frequency may represent the current market trend. Prioritize the recommendation of more important and more frequently used merchants to improve matching accuracy. Merchants with high usage frequency have performed well in historical data and can be used as a reliable basis for recommendation. In this way, by calculating the importance and usage frequency of merchants, merchants can be sorted and recommended to users first. In a large amount of merchant information, more suitable merchants can be screened out to reduce information overload. According to the importance and usage frequency of merchants, the merchant ratings are dynamically adjusted to adapt to market changes and changes in user needs.
[0166] In some embodiments of the present specification, the above solution is adopted to determine the merchant name corresponding to the signature information, so that the target merchant name can be displayed in the signature information sent to the user end.
[0167] In some embodiments, the signature information may be sent to the user terminal in the form of a text message, and the target merchant name may be at the beginning of the text message.
[0168] As an example, if the confirmed target merchant name is A, the text message sent to the user terminal may be in the form of [A]****, where "****" may refer to the specific content of the text message.
[0169] This specification also provides a device corresponding to the above merchant name confirmation method, which is described in detail below with reference to the accompanying drawings through specific embodiments.
[0170] Reference Figure 3 The structure diagram of a merchant name confirmation device in the embodiment of this specification is shown in FIG. Figure 3 As shown, the merchant name confirmation device 100 may include:
[0171] The data acquisition unit 110 is adapted to acquire the signature information sent by the merchant end to the user end;
[0172] A word segmentation unit 120 performs word segmentation processing on the signature information to generate multiple words;
[0173] The processing unit 130 is adapted to determine, based on a preset database, a target tag corresponding to each of the words and a merchant name corresponding to each of the target tags; and, according to the merchant name corresponding to each of the target tags, select from the database the number of tags and the number of numbers corresponding to each of the merchant names; and, according to the number of tags, the number of numbers and category information of each of the merchant names, as well as each of the words and the target tag corresponding to the word, select a target merchant name from a plurality of merchant names.
[0174] It is understandable that the division of the above units is only a division of logical functions, and in actual implementation, they can be fully or partially integrated into one physical entity, or physically separated. In addition, the above units can be implemented in the form of a processor calling software.
[0175] By using the above-mentioned merchant name confirmation device 100, through forward matching and reverse matching operations, a target merchant name that matches the signature information can be selected from a preset database without manual processing, thereby improving the merchant name confirmation efficiency and accuracy.
[0176] In order to enable those skilled in the art to better understand and implement, an implementation example of the merchant name confirmation device is described in detail below.
[0177] In some embodiments of the present specification, the signature information may be a string of relatively messy codes, or some data that cannot meet the processing requirements, so the word segmentation unit can perform word segmentation processing on the signature information to obtain multiple words for representing the signature information from different angles.
[0178] In some embodiments, the signature information may be formatted before being segmented.
[0179] For example, when it is determined that there are brackets in the signature information, the brackets and the information in the brackets are removed; for another example, parts that do not comply with pre-configured rules, such as traditional Chinese characters, numbers, etc. in the signature information, are removed.
[0180] In some embodiments, the word segmentation unit may use a variety of word segmentation methods to perform word segmentation processing on the signature information.
[0181] In a specific implementation example, the word segmentation unit may use HanLP to perform word segmentation processing on the signature information.
[0182] In some other embodiments, the word segmentation unit may also perform word segmentation processing on the signature information through natural language processing, information retrieval, and machine translation.
[0183] In some embodiments of the present specification, when multiple words are generated through word segmentation processing, the processing unit can select a target tag corresponding to each word from a preset database. The target tag can be regarded as the data in the preset database that is closest to the word and can best express the word (i.e., the data with the highest matching degree).
[0184] The method of selecting target tags corresponding to each word from the preset database can refer to the above example.
[0185] Next, the processing unit may select a corresponding merchant name from a preset database according to the target tag as a candidate merchant name.
[0186] In short, a target tag can correspond to at least one business name.
[0187] In a specific implementation, a merchant name may correspond to multiple tags in a preset database. After determining the merchant name corresponding to the target tag, the processing unit can perform a reverse matching operation to select the number of tags and numbers corresponding to each merchant name from the preset database again. These number of tags and numbers can represent the importance and frequency of use of this merchant name in the preset database.
[0188] For example, the greater the number of tags and numbers, the higher the probability that the merchant name is the merchant name corresponding to the signature information.
[0189] Next, the processing unit may adopt the method in the above example to determine the comprehensive score of each merchant name by determining the first score, the second similarity score, and the third similarity score, and then the merchant name corresponding to the highest comprehensive score may be used as the target merchant name.
[0190] The process of determining the comprehensive score of each merchant name can be referred to in the above example and will not be described in detail here.
[0191] In other words, the processing unit can determine the target merchant name based on the matching degree between the label and the signature information, and the matching degree between the label and the merchant name.
[0192] In actual application, the inventors further discovered that there may be some merchant names that do not exist in the preset database, or there may be merchant names in the preset database but the merchant names are used less frequently and are less likely to be used as merchant names in signature information.
[0193] Based on this, the processing unit may also determine the usage frequency score of each merchant name according to the number of labels and the number of numbers of each merchant name, and filter merchant names whose usage frequency scores are lower than the set usage frequency scores.
[0194] By filtering the merchant names whose usage frequency scores are lower than the set usage frequency scores, merchant names with higher probability can be obtained, which can further improve the merchant name confirmation efficiency.
[0195] In some embodiments of the present specification, the above solution is adopted to determine the merchant name corresponding to the signature information, so that the target merchant name can be displayed in the signature information sent to the user end.
[0196] In some embodiments, the signature information may be sent to the user terminal in the form of a text message, and the target merchant name may be at the beginning of the text message.
[0197] As an example, if the confirmed target merchant name is A, the text message sent to the user terminal may be in the form of [A]****, where "****" may refer to the specific content of the text message.
[0198] The embodiment of this specification also provides an electronic device suitable for implementing the merchant name confirmation method, wherein the electronic device includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part to the random access memory (RAM), such as executing the method described in the above embodiment. In the RAM, various programs and data required for system operation are also stored. The CPU, ROM and RAM are connected to each other via a bus. The input / output (I / O) interface is also connected to the bus.
[0199] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part performs communication processing via a network such as the Internet. The drive 310 is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0200] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), various functions defined in the system of the present application are executed.
[0201] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media can 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), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0202] In the present application, 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, apparatus, or device. In the present application, 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 computer program. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0203] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the 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 flowchart, and the combination of boxes in the block diagram or flowchart 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.
[0204] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0205] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0206] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0207] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0208] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0209] Although the embodiments of this specification are disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. A merchant name confirmation method, characterized in that: include: Get the signature information sent by the merchant to the user; Performing word segmentation processing on the signature information to generate multiple words; Based on a preset database, determining a target tag corresponding to each of the words, and a merchant name corresponding to each of the target tags; According to the merchant names corresponding to the target tags, the number of tags and the number of numbers corresponding to the merchant names are selected from the preset database; A target merchant name is selected from the plurality of merchant names according to the number of labels, the number of numbers and the category information of each merchant name, as well as each word and the target label corresponding to the word.
2. The merchant name confirmation method according to claim 1, characterized in that: The plurality of words have different parts of speech; the preset database includes a tag library and a merchant library; The determining, based on a preset database, a target tag corresponding to each of the words and a merchant name corresponding to each of the target tags includes: Combine words with different parts of speech to obtain multiple combined words; Determine the score of each word and the score of each word combination respectively, and take the words and / or word combinations with scores greater than the set scores as target words; Selecting a target tag matching the target word from the tag library; According to the target tag, a merchant name corresponding to the target tag is selected from the merchant database by performing keyword matching.
3. The merchant name confirmation method according to claim 2, characterized in that: The scores of each word and each combined word are determined in the following way: Score1=a1*math.sin(x / b1-b2)+a2*math.exp(-x / b3)+a3*math.log(x+c1)+a4 Score1 represents the score, x represents the length of the word or the combination of words, a1 represents the first weight coefficient, a2 represents the second weight coefficient, a3 represents the third weight coefficient, a4 represents the reference offset, b1 represents the period scaling parameter, b2 represents the phase shift parameter, b3 represents the attenuation rate parameter, and c1 represents the displacement parameter.
4. The merchant name confirmation method according to claim 2, characterized in that: The step of selecting a target tag matching the target word from the tag library includes: Using a search algorithm, select a tag containing the target word from the preset database; Using an edit distance algorithm, respectively calculating a first similarity score between each target word and a label corresponding to the target word; The tag corresponding to the first similarity with the highest value is used as the target tag.
5. The merchant name confirmation method according to claim 1, characterized in that: The selecting a target merchant name from the plurality of merchant names according to the number of labels, the number of numbers and the category information of each merchant name, and each word and the target label corresponding to the word, comprises: Determine a first score according to the category information of each of the merchant names, the number of labels and the number of numbers corresponding to each merchant name; Determining a second similarity score according to each merchant name and a target tag corresponding to the merchant name; Determining a third similarity score according to each of the words and the target tag corresponding to the word; Determining a comprehensive score for each merchant name according to the first score, the second similarity score, and the third similarity score; The merchant name corresponding to the comprehensive score with the highest value is used as the target merchant name.
6. The merchant name confirmation method according to claim 5, characterized in that: The first score is determined in the following manner: Score2=(w1*shop_logo+w2*(shop_mark**a5)+w3*(shop_tel**a6)+w4*shop_key)*((b4+shop_mes)**(b5*shop_mes_i)); The comprehensive score for each merchant name is determined in the following manner: Score=Score2 / ((d1+epsilon)-(shop_df**d2)*d3); Among them, shop_logo represents the logo of the trademark in the merchant name category information, shop_mark represents the number of tags corresponding to the merchant name, shop_tel represents the number of telephone numbers associated with the merchant name, shop_key represents the evaluation based on the degree of association between the merchant and the keyword, shop_mes represents the second similarity score (that is, the similarity score between the merchant name and the keyword), shop_mes_i represents the exponential adjustment coefficient of the similarity score, shop_df represents the third similarity score, w1 represents the first weight coefficient of the merchant logo, w2 represents the second weight coefficient of the number of tags, w3 represents the third weight coefficient of the number of numbers, w4 represents the fourth weight coefficient of the merchant key indicator, a5 represents the exponential coefficient of the number of tags corresponding to the merchant name, a6 represents the exponential coefficient of the number of telephone numbers associated with the merchant name, b4 represents the similarity benchmark offset, b5 represents the similarity index weight, d1 represents the benchmark value, d2 represents the similarity index parameter, d3 represents the scaling factor, and epsilon represents the minimum value.
7. The merchant name confirmation method according to claim 1 or 6, characterized in that: Before selecting a target merchant name from a plurality of merchant names according to the number of labels, number of numbers and category information of each merchant name, and each of the words and the target label corresponding to the word, the method further includes: According to the number of labels and numbers of each merchant name, the usage frequency score of each merchant name is determined, and merchant names with the usage frequency score lower than the set usage frequency score are filtered.
8. The merchant name confirmation method according to claim 7, characterized in that: The frequency of use score is determined as follows: Score3=shop_mark*e1+shop_tel*e2+q1; Among them, shop_mark represents the number of labels corresponding to the merchant name, shop_tel represents the number of numbers corresponding to the merchant name, e1 represents the label weight coefficient, e2 represents the telephone number weight coefficient, and q1 represents the bias term.
9. The merchant name confirmation method according to claim 1, characterized in that: Also includes: The target merchant name is displayed in the signature information sent to the user terminal.
10. A merchant name confirmation device, characterized in that: include: A data acquisition unit, adapted to acquire signature information sent by the merchant terminal to the user terminal; A word segmentation unit, performing word segmentation processing on the signature information to generate multiple words; A processing unit, adapted to determine, based on a preset database, a target tag corresponding to each of the words and a merchant name corresponding to each of the target tags; And, according to the merchant names corresponding to each of the target tags, the number of tags and the number of numbers corresponding to each of the merchant names are selected from the database; and, according to the number of tags, the number of numbers and category information of each of the merchant names, as well as each of the words and the target tags corresponding to the words, a target merchant name is selected from the multiple merchant names.
11. An electronic device, characterized in that: include: At least one processor and at least one memory, the memory storing one or more computer executable instructions, the processor calling the one or more computer executable instructions to execute the merchant name confirmation method according to any one of claims 1 to 9.
12. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the merchant name confirmation method according to any one of claims 1 to 9.