A matching verification method for store name similarity
Through the matching of the similarity of the store name, use Levintein's distance and the similarity of Yu Xian to generate weighted data, automatically school -to -store mapping relationships, solve the problem of errors in the mapping relationship of the Taichung store in the takeaway, reduce the requirements of server hardware configuration requirements , Reduce the cost of retailers.
Patent Information
- Application Number
- CN202210086908.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2042-01-25
AI Technical Summary
When retailers use takeaway middle platform, due to the huge number of new stores, operators cannot manually check whether the bound store mapping relationship is correct one by one, resulting in frequent binding errors and lack of automatic error correction mechanism, resulting in subsequent processes. and data error. At the same time, the operating data is large, which increases the requirements for server hardware configuration and increases the cost burden of retailers.
Provide a matching method with similarity of store names. By generating the data collection of the store name relationship group, the Levinstan distance and the similarity of the store name are calculated to generate weighted data, judge the correctness of the mapping relationship of the store, and issue it. Warning prompt.
It realizes automatic proofreading of store mapping relationships, reduces the need for manual verification, reduces CPU system power consumption, improves CPU operating efficiency, and reduces requirements for server hardware configuration, thereby reducing retailers' costs.
Smart Images

Figure CN115130532B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of data processing, and specifically refers to a matching verification method for store name similarity. Background Art
[0002] With the rapid development of the new retail industry, more and more retailers have begun to expand their retail channels by connecting to third-party food delivery platforms. The so-called third-party food delivery platforms refer to online local life service platforms that provide services such as ordering and delivery of food delivery orders, such as Meituan, Ele.me, and JD.com. In order to facilitate retailers to operate food delivery businesses through a unified operating platform, a food delivery middle platform was created. Since the food delivery middle platform is a unified operating platform formed by integrating and connecting to the open platform interfaces of multiple third-party food delivery platforms, a large number of retailers will use the food delivery middle platform to operate food delivery businesses, making the utilization rate of the food delivery middle platform very high.
[0003] In order to ensure the correspondence between retailers and third-party food delivery platforms, when retailers create new stores in the food delivery platform, the operators must bind the stores of the third-party food delivery platform with the stores of retailers to form a unique set of store mapping relationships. However, there are still the following defects when retailers use it: First, due to the huge number of new stores created, the operators of retailers cannot manually check whether the bound store mapping relationships are correct one by one, so there are often situations where store mapping relationships are incorrectly bound, such as mapping the registered store A to store B. In addition, in the binding process, there is no mechanism for early detection and error correction, and the operators cannot discover the mapping relationship errors in the first place, which will lead to errors in subsequent processes and data, with very serious consequences. Second, due to the large amount of operating data, retailers have high requirements for the hardware configuration of the server when using the food delivery platform system software, which invisibly greatly increases the cost burden of retailers. Summary of the invention
[0004] The purpose of the present invention is to overcome the above problems and provide a matching verification method for store name similarity.
[0005] The purpose of the present invention is achieved through the following technical solution: A matching verification method for store name similarity comprises the following steps:
[0006] Step 1: Generate a store name relationship group data set;
[0007] Step 2: sequentially obtain the first group of store name relationship groups from the store name relationship group data set, generate weighted data S3, and simultaneously store the generated weighted data S3 in the weighted data set M;
[0008] Step 3: Determine whether all store name relationship groups in the store name relationship group data set have been acquired. If so, generate the edit-vectorization composite coefficient Sm from the weighted data set M; if not, return to step 2;
[0009] Step 4: Determine one by one whether the generated weighted data S3 is greater than or equal to the editing-vectorization composite coefficient Sm. If yes, the store name mapping relationship is correct; if not, the store name mapping relationship is wrong and a warning prompt is issued.
[0010] Furthermore, the "generating a store name relationship group data set" described in step 1 specifically includes: determining whether there is an existing store name mapping relationship in the system. If so, the existing store name mapping relationship is automatically used as the store name relationship group data set; if not, it is necessary to upload the store name mapping relationship of the third-party platform store and the takeaway middle office store to form a store name relationship group data set.
[0011] Preferably, the "generating weighted data S3" in step 2 specifically includes the following steps:
[0012] (a) Obtain a store name relationship group, calculate the Levenshtein distance of the store name relationship group, and obtain the similarity S1;
[0013] (b) Calculate the cosine similarity of the store name relationship group to obtain the similarity S2;
[0014] (c) Similarity S1 and similarity S2 are weighted to generate weighted data S3, and the weighting formula of weighted data S3 is: S3 = ROUND (S1*3+S2*1, 2).
[0015] Further, the weighted data set M is a set of weighted data S3, and the number of the weighted data S3 is greater than or equal to 1.
[0016] In the present invention, the editing-vectorization composite coefficient Sm is the mode of the weighted data set M.
[0017] To ensure the accuracy of the mapping relationship, the store name mapping relationship includes at least the retail merchant store name and the third-party platform ID number, and the third-party platform ID number corresponds to the retail merchant store name one by one. At the same time, each store name relationship group in the store name relationship group data set must also correspond to the generated weighted data S3 one by one, and the retail merchant store name must not be repeated in this system.
[0018] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0019] 1. The present invention can automatically proofread the store mapping relationship entered into the system, and can prompt situations where the mapping relationship is wrong, inaccurate or duplicated, thereby effectively overcoming the defect that the traditional takeaway middle station cannot automatically proofread the store mapping relationship.
[0020] 2. The present invention can significantly reduce the system power consumption of the CPU and significantly improve the operating efficiency of the CPU, thereby reducing the hardware configuration requirements for the server to the greatest extent and significantly reducing the cost expenditure of retailers. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0022] The present invention will be further described in detail below in conjunction with examples, but the embodiments of the present invention are not limited thereto.
[0023] Example
[0024] like Figure 1 As shown, step 1 of the present invention is to generate a store name relationship group data set, and the so-called store name relationship group refers to the store name and quantity of the retail merchants as the core, and these retail merchants correspond their store names and quantities to the ID numbers given by the third-party takeaway platform through the takeaway mid-stage system, thereby establishing a store name mapping relationship. Since retail merchants generally have several actual stores (the name of each store is required to maintain uniqueness), and each retail merchant generally binds ID numbers to several different third-party takeaway platforms at the same time, according to the basic requirement that one store corresponds to a third-party takeaway platform ID number, the offline stores of the retail merchant will form multiple store name mapping relationships, and all these store name mapping relationships are combined together to form the store name relationship group data set.
[0025] For example, a retail merchant has 5 offline stores in a city, which are respectively recorded as merchant a1, merchant a2, merchant a3, merchant a4 and merchant a5, and the retail merchant is also stationed on platforms B, C and D. When mapping the store names, each third-party food delivery platform needs to assign 5 platform ID numbers to the retail merchant. For example, platform B assigns 5 platform ID numbers, namely B001, B002, B003, B004 and B005; platform C assigns 5 platform ID numbers, namely C001, C002, C003, C004 and C005; platform D also assigns 5 platform ID numbers, namely D001, D002, D003, D004 and D005. Assuming that the merchant a1 store is bound to B001, the merchant a1 store will form a set of store name mapping relationships with B001. Since the merchant a1 store is also bound to C001 and D001, the merchant a1 store will form 3 sets of store name mapping relationships in the system. Similarly, the merchant a2 store will also form 3 sets of store name mapping relationships in the system. And so on, the retail merchant will form 15 sets of store mapping relationships in the system, and the data set of these 15 sets of store mapping relationships is the store name relationship group data set.
[0026] In order to ensure the uniqueness of the store mapping relationship, the present invention requires that the store name entered by each retail merchant can only be unique and cannot be repeated. At the same time, the ID number given by each third-party food delivery platform is also unique and cannot be repeated. When the store mapping relationship corresponds, each store name can only correspond to one ID number in each third-party food delivery platform, that is, the third-party food delivery platform ID number is required to correspond to the retail merchant store name one by one, and no duplication is allowed.
[0027] Since different third-party food delivery platforms have different requirements for the information data to be entered when mapping store names, in order to overcome this defect, the present invention uses the store name as the only criterion for determining whether the mapping relationship is accurate. That is, when the retail merchant enters the binding relationship, its store name mapping relationship must include at least two elements: the store name of the retail merchant and the ID number of the third-party food delivery platform.
[0028] The above-mentioned generation of the store name relationship group data set also specifically includes the following contents: first determine whether there is an existing store name mapping relationship in the system. If so, the existing store name mapping relationship is automatically used as the store name relationship group data set; if not, it is necessary to newly enter the store name mapping relationship between the third-party food delivery platform store and the food delivery middle office store to form a store name relationship group data set. Since the retail merchants are bound to the third-party food delivery platform ID number through the food delivery middle office system, the store name mapping relationship between the third-party food delivery platform store and the food delivery middle office store is the store name mapping relationship between the third-party food delivery platform store and the retail merchants.
[0029] Among them, the main reason for determining whether there is an existing store name mapping relationship in the system is that before using the present invention, the retail merchant may have entered some store name mapping relationship groups in the takeaway middle station system, but whether these store name mapping relationship groups are correctly bound has not been verified. Therefore, if there is already an entered store name mapping relationship group before the verification using this method, it is still necessary to perform corresponding verification according to this method.
[0030] Step 2: sequentially obtain the first group of store name relationship groups from the store name relationship group data set, generate weighted data S3, and store the generated weighted data S3 in the weighted data set M at the same time.
[0031] Since the store name relationship group data set in step 1 contains more than one store name relationship group, when executing step 2, the system will automatically and continuously select a group of store name relationship groups from these store name relationship groups in sequence for calculation until all store name relationship groups are calculated. Since each group of store name relationship groups will obtain a weighted data S3 after calculation, when all store name relationship groups in the store name relationship group data set are calculated, a number of weighted data S3 will be obtained. When each weighted data S3 is generated, the system will store the weighted data S3 to obtain a weighted data set M.
[0032] The method for generating weighted data S3 is the core content of this technology, which is generated through the following steps:
[0033] (a) Obtain a store name relationship group, calculate the Levenshtein distance of the store name relationship group, and obtain the similarity S1.
[0034] The Levenshtein distance is a type of edit distance, which refers to the minimum number of edit operations required to convert one text string into another. The Levenshtein distance in this step is the similarity S1.
[0035] (b) Calculate the cosine similarity of the store name relationship group to obtain the similarity S2.
[0036] The cosine similarity is to measure the similarity between two vectors by measuring the cosine value of the angle between them. The cosine value of a 0-degree angle is 1, while the cosine value of any other angle is not greater than 1; and its minimum value is -1. Therefore, the cosine value of the angle between two vectors determines whether the two vectors point in roughly the same direction. When two vectors have the same direction, the cosine similarity value is 1; when the angle between the two vectors is 90°, the cosine similarity value is 0; when the two vectors point in completely opposite directions, the cosine similarity value is -1. This result is independent of the length of the vector, but only related to the direction in which the vector points. Cosine similarity is usually used in positive space, so the value given is between 0 and 1.
[0037] (c) Weighting the similarity S1 and the similarity S2 to generate weighted data S3. The weighting formula of the weighted data S3 is: S3 = ROUND (S1*3 + S2*1, 2). The function of the weighting formula is to round off the value obtained by the formula "S1*3 + S2*1" and retain 2 decimal places.
[0038] Among them, the values of Levenshtein distance and cosine similarity can be calculated using existing calculation formulas.
[0039] Step 3: Determine whether all the store name relationship groups in the store name relationship group data set have been acquired. If so, generate the edit-vectorization composite coefficient Sm from the weighted data set M, and execute step 4; if not, return to step 2, that is, start executing the procedure of "obtaining the first group of store name relationship groups in sequence from the store name relationship group data set, generating weighted data S3, and storing the generated weighted data S3 in the weighted data set M at the same time".
[0040] When the system determines that all store name relationship groups have been calculated, the weighted data S3 will no longer be calculated. The system will then generate the edit-vectorization composite coefficient Sm from the generated weighted data set M. The edit-vectorization composite coefficient Sm is the mode in the weighted data set M. The so-called mode refers to the value with an obvious central trend point in the statistical distribution, which represents the general level of the data and is also the value that appears most frequently in a set of data. For example: the mode of 2, 3, 3, 3, 4, 5 is 3.
[0041] Step 4: Determine one by one whether the generated weighted data S3 is greater than or equal to the editing-vectorization composite coefficient Sm. If yes, the store name mapping relationship is correct; if not, the store name mapping relationship is wrong and a warning prompt is issued.
[0042] Since several weighted data S3 have been generated through calculation in step 2, and each weighted data S3 corresponds to a unique store name mapping relationship, when the system calls each weighted data S3 that has been generated to compare data with the edit-vectorization compound coefficient Sm, its essence is to determine whether each store name mapping relationship is correct. When a certain weighted data S3 ≥ edit-vectorization compound coefficient Sm, it indicates that the mapping relationship of this group of store names is correct; as long as the weighted data S3 < edit-vectorization compound coefficient Sm, it indicates that the mapping relationship of this group of store names is incorrect, and the system will issue a corresponding prompt to inform the inputter that there is an error in the input.
[0043] For better explanation, the following cases are given for illustration.
[0044] Case 1: If there is already a store name mapping relationship data set between a third-party food delivery platform and the food delivery middle platform, and there is only one set of store name relationship groups in the data set, which is ['FS3023-01 Jiuding International', '711 Convenience Store (Jiuding International 3023 Store)'].
[0045] When the present invention is run, step 1 is first executed to determine if an existing store name relationship group data set already exists in the system.
[0046] Step 2: The system will automatically obtain the store name mapping relationship group ['FS3023-01 Jiuding International', '711 Convenience Store (Jiuding International 3023 Store)'] from the data set.
[0047] Then, the system will calculate the Levenshtein distance and obtain the similarity S1=0.058823526, and at the same time calculate the cosine similarity of the group of store names and obtain the similarity S2=0.6172134.
[0048] Finally, the system performs weighted calculation according to the formula S3=ROUND(S1*3+S2*1,2) to obtain weighted data S3=0.79, and stores the weighted data S3 into the weighted data set M at the same time.
[0049] Step 3, the system determines that the store name relationship groups in the above-mentioned store name relationship group data set have been obtained, then the system generates an edit-vectorization composite coefficient Sm from the weighted data set M, that is, obtains the majority in the weighted data set M, thereby obtaining the edit-vectorization composite coefficient Sm=0.79.
[0050] Step 4, since the weighted data S3 = 0.79 and the editing-vectorization composite coefficient SM = 0.79, the system determines that S3 ≥ Sm holds, so the system determines that the store name mapping relationship is correct.
[0051] Case 2: If there is no store name mapping relationship data set between a third-party food delivery platform and the food delivery middle office, then when the present invention is implemented, step 1 is first executed to determine that there is no store name relationship group data set in the system. Therefore, the system prompts that the store name mapping relationship between the third-party food delivery platform store and the food delivery middle office store needs to be entered to form a store name relationship group data set.
[0052] For example, under the prompt, enter the three store name relationship groups "{['FS3023-01 Jiuding International', '711 Convenience Store (Jiuding International 3023 Store)'], ['DG0322-01 Renmin Middle School', '711 Convenience Store (Renmin Middle School 0322 Store)'], ['GZ0326-00 Huadu Hospital', '711 Convenience Store (Huadu Hospital 0326 Store)']}".
[0053] Step 2: the system will automatically obtain the first set of store name mapping relationship groups from the data set, namely ['FS3023-01 Jiuding International', '711 Convenience Store (Jiuding International 3023 Store)'].
[0054] Then, the system will calculate the Levenshtein distance and obtain the similarity S1=0.058823526, and at the same time calculate the cosine similarity of the group of store names and obtain the similarity S2=0.6172134.
[0055] Finally, the system performs weighted calculation according to the formula S3=ROUND(S1*3+S2*1,2) to obtain weighted data S3=0.79, and stores the weighted data S3 into the weighted data set M at the same time.
[0056] Step 3, the system determines that the store name relationship group in the above store name relationship group data set has not been obtained, then the system automatically obtains the next group of store name relationship groups, that is, ['DG0322-01 Renminzhong', '711 Convenience Store (Renminzhong 0322 Store)']. The system continues to calculate its Levenshtein distance and obtains the similarity S1=0.0625, and at the same time calculates the cosine similarity of the group of store names and obtains the similarity S2=0.5853694. Finally, the system performs weighted calculation according to the formula S3=ROUND(S1*3+S2*1,2) to obtain weighted data S3=0.77, and at the same time stores the weighted data S3 in the weighted data set M.
[0057] The system determines that the store name relationship groups in the above store name relationship group data set have not been obtained, so the system automatically obtains the store name relationship group of the last group, that is, ['GZ0326-00 Huadu Hospital', '711 Convenience Store (Huadu Hospital 0326 Store)']. The system calculates its Levenshtein distance and obtains the similarity S1=0.058823526. At the same time, it calculates the cosine similarity of the group of store names and obtains the similarity S2=0.5962848. Finally, the system performs weighted calculation according to the formula S3=ROUND(S1*3+S2*1,2) to obtain weighted data S3=0.77, and stores the weighted data S3 in the weighted data set M at the same time.
[0058] After the system determines that all the above store name relationship groups have been acquired, it generates an edit-vectorization compound coefficient Sm from the weighted data set M, that is, obtains the mode in the weighted data set M, thereby obtaining the edit-vectorization compound coefficient Sm=0.77.
[0059] Step 4, the system determines in turn that the value 0.79 of S3 generated by the first group of store name relationship groups is greater than the value 0.77 of Sm, and then issues a prompt that the mapping relationship of the first group of store names is correct; the system continues to determine that the value 0.77 of S3 generated by the second group of store name relationship groups is equal to the value 0.77 of Sm, and then issues a prompt that the mapping relationship of the second group of store names is correct; the system continues to determine that the value 0.77 of S3 generated by the third group of store name relationship groups is equal to the value 0.77 of Sm, and then issues a prompt that the mapping relationship of the third group of store names is correct.
[0060] By adopting the steps and methods described above, it is possible to quickly determine whether the store mapping relationship entered into the takeaway middle station system is correct. At the same time, when the present invention is used, compared with other traditional algorithms or determination methods, when running in a server configured with the same parameters, its average power consumption and average time consumption are significantly different.
[0061] The following is the test data of average power consumption and average time consumption when the traditional determination method and the present invention are run in the same server.
[0062]
[0063] From the above data, it can be seen that when running in a server with the same parameter configuration, the average power consumption and average time consumption of each group of operations of the present invention are 1 / 10 of the average power consumption and average time consumption of the traditional technology. Therefore, the present invention can significantly reduce the configuration requirements for the server, and even under a lower configuration, the present invention can run smoothly and quickly.
[0064] As described above, the present invention can be well implemented.
Claims
1. A matching verification method for store name similarity, characterized in that: The following steps are involved: Step 1: Generate a store name relationship group data set; Step 2: sequentially obtain the first group of store name relationship groups from the store name relationship group data set, generate weighted data S3, and simultaneously store the generated weighted data S3 in the weighted data set M; Step 3: Determine whether all store name relationship groups in the store name relationship group data set have been acquired. If they have been acquired, generate the edit-vectorization composite coefficient Sm from the weighted data set M and execute step 4; if they have not been acquired, return to step 2; Step 4: Determine one by one whether the generated weighted data S3 is greater than or equal to the editing-vectorization composite coefficient Sm? If yes, the store name mapping relationship is correct; If not, the store name mapping relationship is incorrect and a warning prompt is issued; The "generating weighted data S3" described in step 2 specifically includes the following steps: (a) Obtain a store name relationship group, calculate the Levenshtein distance of the store name relationship group, and obtain the similarity S1; (b) Calculate the cosine similarity of the store name relationship group to obtain the similarity S2; (c) weighting the similarity S1 and the similarity S2 to generate weighted data S3; The edit-vectorization composite coefficient Sm is the mode of the weighted data set M; the store name relationship group includes at least the retail merchant store name and the third-party platform ID number, and the third-party platform ID number corresponds one-to-one to the retail merchant store name.
2. A store name similarity matching verification method according to claim 1, characterized in that: The "generating a store name relationship group data set" described in step 1 specifically includes: determining whether there is an existing store name mapping relationship in the system? If so, the existing store name mapping relationship is automatically used as the store name relationship group data set; if not, it is necessary to enter the store name mapping relationship between the third-party food delivery platform store and the food delivery middle platform store to form a store name relationship group data set.
3. A store name similarity matching verification method according to claim 2, characterized in that: The weighted data set M is a set of weighted data S3, and the number of the weighted data S3 is greater than or equal to 1.
4. A store name similarity matching verification method according to claim 3, characterized in that: The similarity S1 and the similarity S2 described in step (c) are weighted to generate weighted data S3, and the weighting formula is: 。
Citation Information
Patent Citations
Associated order placing method between different stores and associated order placing device thereof
CN107220795A
Store search information processing method, device and system
CN109949124A